From: Sascha Schumann Date: Fri, 3 Dec 1999 14:50:32 +0000 (+0000) Subject: Add check for socklen_t (we cannot use AC_CHECK_TYPE, because socklen_t X-Git-Tag: PRE_RETURN_REF_PATCH~110 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ebaeb919da0e31c392f56d1f62529d56044d85a0;p=php Add check for socklen_t (we cannot use AC_CHECK_TYPE, because socklen_t is defined in sys/socket.h). --- diff --git a/configure.in b/configure.in index 38aff64191..16bdd78582 100644 --- a/configure.in +++ b/configure.in @@ -14,7 +14,7 @@ if test -n "$with_apache" && test -n "$with_apxs"; then fi cwd=`pwd` -passthru="$@" +for i in $@; do passthru="$passthru \"$i\""; done CONFIGURE_COMMAND=$0 for arg in "$@"; do @@ -53,13 +53,13 @@ if test $? -ne 0 ; then else rm -f php_version.h.new fi -AC_SUBST(PHP_VERSION) AM_CONFIG_HEADER(php_config.h) AM_MAINTAINER_MODE phplibdir=$libdir/php AC_SUBST(phplibdir) +AC_SUBST(PHP_VERSION) dnl We want this one before the checks, so the checks can modify CFLAGS. test -z "$CFLAGS" && auto_cflags=1 @@ -253,22 +253,38 @@ if test "$ac_cv_struct_tm_gmtoff" = yes; then AC_DEFINE(HAVE_TM_GMTOFF) fi -AC_CACHE_CHECK(for struct flock,php_struct_flock, +AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock, AC_TRY_COMPILE([ #include #include ], [struct flock x;], [ - php_struct_flock=yes + ac_cv_struct_flock=yes ],[ - php_struct_flock=no + ac_cv_struct_flock=no ]) ) -if test "$php_struct_flock" = "yes" ; then + +AC_CACHE_CHECK(for socklen_t,ac_cv_socklen_t, + AC_TRY_COMPILE([ +#include +#include +],[ +socklen_t x; +],[ + ac_cv_socklen_t=yes +],[ + ac_cv_socklen_t=no +])) + + +if test "$ac_cv_struct_flock" = "yes" ; then AC_DEFINE(HAVE_STRUCT_FLOCK, 1) -else - AC_DEFINE(HAVE_STRUCT_FLOCK, 0) +fi + +if test "$ac_cv_socklen_t" = "no"; then + AC_DEFINE(socklen_t, "unsigned int", [Unix98 specifies to be socklen_t at least unsigned 32-bit]) fi AC_CHECK_SIZEOF(long, 8)