diff options
author | foobar <sniper@php.net> | 2005-09-23 09:40:24 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2005-09-23 09:40:24 +0000 |
commit | 09f0161160026c5ba5bbee2853d5a360225a3b96 (patch) | |
tree | 69c3807c713b8102e1b1b29900ea5202054b3310 /acinclude.m4 | |
parent | e3a1bf1e6216a977be9d7e34276dd55baa478450 (diff) | |
download | php-git-09f0161160026c5ba5bbee2853d5a360225a3b96.tar.gz |
ws fix
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 158 |
1 files changed, 80 insertions, 78 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 8055ad0560..72cba6d967 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -255,14 +255,14 @@ dnl append to the array which has been dynamically chosen at m4 time dnl choose the right compiler/flags/etc. for the source-file case $ac_src in - *.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; - *.s[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; - *.S[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; - *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;; + *.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; + *.s[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; + *.S[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; + *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;; esac dnl create a rule for the object/source combo - cat >>Makefile.objects<<EOF + cat >>Makefile.objects<<EOF $ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src $ac_comp EOF @@ -301,27 +301,27 @@ dnl AC_DEFUN([PHP_RUNPATH_SWITCH],[ AC_MSG_CHECKING([if compiler supports -R]) AC_CACHE_VAL(php_cv_cc_dashr,[ - SAVE_LIBS=$LIBS - LIBS="-R /usr/$PHP_LIBDIR $LIBS" - AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no) - LIBS=$SAVE_LIBS]) + SAVE_LIBS=$LIBS + LIBS="-R /usr/$PHP_LIBDIR $LIBS" + AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no) + LIBS=$SAVE_LIBS]) AC_MSG_RESULT([$php_cv_cc_dashr]) if test $php_cv_cc_dashr = "yes"; then - ld_runpath_switch=-R + ld_runpath_switch=-R else - AC_MSG_CHECKING([if compiler supports -Wl,-rpath,]) - AC_CACHE_VAL(php_cv_cc_rpath,[ - SAVE_LIBS=$LIBS - LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS" - AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no) - LIBS=$SAVE_LIBS]) - AC_MSG_RESULT([$php_cv_cc_rpath]) - if test $php_cv_cc_rpath = "yes"; then - ld_runpath_switch=-Wl,-rpath, - else - dnl something innocuous - ld_runpath_switch=-L - fi + AC_MSG_CHECKING([if compiler supports -Wl,-rpath,]) + AC_CACHE_VAL(php_cv_cc_rpath,[ + SAVE_LIBS=$LIBS + LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS" + AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no) + LIBS=$SAVE_LIBS]) + AC_MSG_RESULT([$php_cv_cc_rpath]) + if test $php_cv_cc_rpath = "yes"; then + ld_runpath_switch=-Wl,-rpath, + else + dnl something innocuous + ld_runpath_switch=-L + fi fi ]) @@ -951,12 +951,12 @@ dnl ---------------------------------------------- Static module dnl ---------------------------------------------- Shared module PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes) case $host_alias in - *netware*) - PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6) - ;; - *) - PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6) - ;; + *netware*[)] + PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6) + ;; + *[)] + PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6) + ;; esac AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module) fi @@ -1238,16 +1238,16 @@ AC_DEFUN([PHP_READDIR_R_TYPE],[ #endif main() { - DIR *dir; - char entry[sizeof(struct dirent)+PATH_MAX]; - struct dirent *pentry = (struct dirent *) &entry; - - dir = opendir("/"); - if (!dir) - exit(1); - if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0) - exit(0); - exit(1); + DIR *dir; + char entry[sizeof(struct dirent)+PATH_MAX]; + struct dirent *pentry = (struct dirent *) &entry; + + dir = opendir("/"); + if (!dir) + exit(1); + if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0) + exit(0); + exit(1); } ],[ ac_cv_what_readdir_r=POSIX @@ -1378,17 +1378,17 @@ AC_DEFUN([PHP_AC_BROKEN_SNPRINTF],[ AC_TRY_RUN([ #define NULL (0L) main() { - char buf[20]; - int res = 0; - res = res || (snprintf(buf, 2, "marcus") != 6); - res = res || (buf[1] != '\0'); - /* Implementations may consider this as an encoding error */ - snprintf(buf, 0, "boerger"); - /* However, they MUST ignore the pointer */ - res = res || (buf[0] != 'm'); - res = res || (snprintf(NULL, 0, "boerger") != 7); - res = res || (snprintf(buf, sizeof(buf), "%f", 0.12345678) != 8); - exit(res); + char buf[20]; + int res = 0; + res = res || (snprintf(buf, 2, "marcus") != 6); + res = res || (buf[1] != '\0'); + /* Implementations may consider this as an encoding error */ + snprintf(buf, 0, "boerger"); + /* However, they MUST ignore the pointer */ + res = res || (buf[0] != 'm'); + res = res || (snprintf(NULL, 0, "boerger") != 7); + res = res || (snprintf(buf, sizeof(buf), "%f", 0.12345678) != 8); + exit(res); } ],[ ac_cv_broken_snprintf=no @@ -1419,14 +1419,16 @@ AC_DEFUN([PHP_SOLARIS_PIC_WEIRDNESS],[ if test -n "$EXT_SHARED"; then os=`uname -sr 2>/dev/null` case $os in - "SunOS 5.6"|"SunOS 5.7"[)] - case $CC in - gcc*|egcs*) CFLAGS="$CFLAGS -fPIC";; - *[)] CFLAGS="$CFLAGS -fpic";; - esac - AC_MSG_RESULT([yes]);; - *[)] - AC_MSG_RESULT([no]);; + "SunOS 5.6"|"SunOS 5.7"[)] + case $CC in + gcc*|egcs*) + CFLAGS="$CFLAGS -fPIC";; + *[)] + CFLAGS="$CFLAGS -fpic";; + esac + AC_MSG_RESULT([yes]);; + *[)] + AC_MSG_RESULT([no]);; esac else AC_MSG_RESULT([no]) @@ -1560,10 +1562,10 @@ AC_DEFUN([PHP_BROKEN_GETCWD],[ os=`uname -sr 2>/dev/null` case $os in SunOS*[)] - AC_DEFINE(HAVE_BROKEN_GETCWD,1, [Define if system has broken getcwd]) - AC_MSG_RESULT([yes]);; - *[)] - AC_MSG_RESULT([no]);; + AC_DEFINE(HAVE_BROKEN_GETCWD,1, [Define if system has broken getcwd]) + AC_MSG_RESULT([yes]);; + *[)] + AC_MSG_RESULT([no]);; esac ]) @@ -1583,8 +1585,8 @@ int main(int argc, char *argv[]) fp = fopen(filename, "w"); if (fp == NULL) { - perror("fopen"); - exit(2); + perror("fopen"); + exit(2); } fputs("foobar", fp); fclose(fp); @@ -1594,7 +1596,7 @@ int main(int argc, char *argv[]) fclose(fp); unlink(filename); if (position == 0) - return 1; + return 1; return 0; } ], @@ -1612,10 +1614,10 @@ choke me )]) if test "$have_broken_glibc_fopen_append" = "yes"; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+]) + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+]) else - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) fi ]) @@ -1644,7 +1646,7 @@ AC_TRY_RUN([ #include <stdio.h> struct cookiedata { - __off64_t pos; + __off64_t pos; }; __ssize_t reader(void *cookie, char *buffer, size_t size) @@ -1663,7 +1665,7 @@ main() { FILE *fp = fopencookie(&g, "r", funcs); if (fp && fseek(fp, 8192, SEEK_SET) == 0 && g.pos == 8192) - exit(0); + exit(0); exit(1); } @@ -1897,14 +1899,14 @@ AC_DEFUN([PHP_C_BIGENDIAN], [ int main(void) { - short one = 1; - char *cp = (char *)&one; - - if (*cp == 0) { - return(0); - } else { - return(1); - } + short one = 1; + char *cp = (char *)&one; + + if (*cp == 0) { + return(0); + } else { + return(1); + } } ], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown]) ]) |