]> granicus.if.org Git - apache/commitdiff
Submitted by: Sascha Schumann <sascha@schumann.cx>
authorrasmus <rasmus@unknown>
Fri, 24 Dec 1999 18:40:27 +0000 (18:40 +0000)
committerrasmus <rasmus@unknown>
Fri, 24 Dec 1999 18:40:27 +0000 (18:40 +0000)
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
configure.in
include/ap_config.h

index 9193a24d22d3f7c2a957279f0477de578913bc7a..6ab9ca7e077a7de8fa41306d55411a5318c81f14 100644 (file)
@@ -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 <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+],[
+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)
+])
index 58205e3aa0fa1a870b80678f41675d81e3751422..3fa600b992d63a218ef7bd147551d8a5938f7267 100644 (file)
@@ -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
index 37e37ea2d3c2e160ec8305a03e6ee708c5fa5ec2..9569a6b67978726917702ec2f13b4bd52b80d050 100644 (file)
@@ -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