From 191c4462f144b4602f2989dcf102c274dfcb8e86 Mon Sep 17 00:00:00 2001 From: rasmus Date: Fri, 24 Dec 1999 18:40:27 +0000 Subject: [PATCH] Submitted by: Sascha Schumann Reviewed by: Rasmus Lerdorf - INADDR_NONE is not defined. Supply a replacement - APACHE_MODULE() used a non-portable shell construct - inet_addr() needs -lnsl -lsocket. Neccessary checks added - For POSIX conformance, _POSIX_PTHREAD_SEMANTICS is required. This fixes i.e. sigwait() problems. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84367 13f79535-47bb-0310-9956-ffa450edef68 --- acinclude.m4 | 25 +++++++++++++++++++++++-- configure.in | 10 ++++++++++ include/ap_config.h | 3 +++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 9193a24d22..6ab9ca7e07 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -12,7 +12,7 @@ AC_DEFUN(APACHE_MODULE,[ if test -d "$cwd/$srcdir/modules/standard" ; then dnl MOD_SUBDIRS="$MOD_SUBDIRS $1" if test "$2" != "shared" -a "$2" != "yes"; then - libname=$(basename $1) + libname="`basename $1`" _extlib="libapachemod_${libname}.a" MOD_LTLIBS="$MOD_LTLIBS modules/standard/libapachemod_${libname}.la" MOD_LIBS="$MOD_LIBS standard/$_extlib" @@ -137,4 +137,25 @@ define(APACHE_CHECK_THREADS, [dnl threads_result="Threads not found" done ] ) - + +dnl +dnl APACHE_INADDR_NONE +dnl +dnl checks for missing INADDR_NONE macro +dnl +AC_DEFUN(APACHE_INADDR_NONE,[ + AC_TRY_COMPILE([ +#include +#include +#include +],[ +unsigned long foo = INADDR_NONE; +],[ + HAVE_INADDR_NONE=yes +],[ + HAVE_INADDR_NONE=no + AC_DEFINE(INADDR_NONE, ((unsigned int) 0xffffffff), [ ]) +]) + AC_MSG_CHECKING(whether system defines INADDR_NONE) + AC_MSG_RESULT($HAVE_INADDR_NONE) +]) diff --git a/configure.in b/configure.in index 58205e3aa0..3fa600b992 100644 --- a/configure.in +++ b/configure.in @@ -88,10 +88,20 @@ memmove \ bzero \ ) +AC_CHECK_LIB(nsl, gethostbyname) +AC_CHECK_LIB(socket, socket) + AC_CHECK_FUNCS(inet_addr inet_network, break, [ AC_MSG_ERROR(inet_addr function not found) ]) +APACHE_INADDR_NONE + +case "`uname -sr`" in +"SunOS 5"*) + CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS";; +esac + AC_FUNC_SELECT_ARGTYPES dnl Check if we'll actually need to cast select args all the time diff --git a/include/ap_config.h b/include/ap_config.h index 37e37ea2d3..9569a6b679 100644 --- a/include/ap_config.h +++ b/include/ap_config.h @@ -195,6 +195,9 @@ typedef int rlim_t; int gethostname(char *name, int namelen); #define HAVE_SYSLOG 1 #define SYS_SIGLIST _sys_siglist +#ifndef INADDR_NONE +#define INADDR_NONE ((unsigned int) 0xffffffff) +#endif #elif defined(IRIX) #undef HAVE_GMTOFF -- 2.50.1