nginx-0.0.2-2004-02-09-10:46:43 import
diff --git a/auto/configure b/auto/configure index 4287a4e..a145a9e 100755 --- a/auto/configure +++ b/auto/configure
@@ -3,8 +3,13 @@ . auto/init . auto/sources +test $OBJ || mkdir $OBJ echo > $NGX_AUTO_CONFIG_H +if [ "$PLATFORM" != win32 ]; then + . auto/headers +fi + . auto/os/conf . auto/modules
diff --git a/auto/fmt/xfmt b/auto/fmt/xfmt index 31f4d71..2509f3f 100644 --- a/auto/fmt/xfmt +++ b/auto/fmt/xfmt
@@ -1,6 +1,8 @@ -echo "#ifndef $ngx_fmt_name" >> $NGX_AUTO_CONFIG_H -echo "#define $ngx_fmt_name \"$ngx_fmt\"" | sed -e 's/d"$/x"/' \ - >> $NGX_AUTO_CONFIG_H -echo "#endif" >> $NGX_AUTO_CONFIG_H -echo >> $NGX_AUTO_CONFIG_H +cat << END | sed -e 's/d"$/x"/' >> $NGX_AUTO_CONFIG_H + +#ifndef $ngx_fmt_name +#define $ngx_fmt_name "$ngx_fmt" +#endif + +END
diff --git a/auto/func b/auto/func index 37b2bff..acbab9c 100644 --- a/auto/func +++ b/auto/func
@@ -24,15 +24,7 @@ if [ -x $NGX_AUTOTEST ]; then echo " found" - - cat << END >> $NGX_AUTO_CONFIG_H - -#ifndef HAVE_$func -#define HAVE_$func 1 -#endif - -END - + have=HAVE_$func . auto/have ngx_found=yes else
diff --git a/auto/headers b/auto/headers new file mode 100644 index 0000000..9c9ac51 --- /dev/null +++ b/auto/headers
@@ -0,0 +1,3 @@ + +ngx_inc="unistd.h"; . auto/inc +ngx_inc="inttypes.h"; . auto/inc
diff --git a/auto/inc b/auto/inc index fc71a11..0419f11 100644 --- a/auto/inc +++ b/auto/inc
@@ -21,15 +21,7 @@ if [ -x $NGX_AUTOTEST ]; then echo " found" - - cat << END >> $NGX_AUTO_CONFIG_H - -#ifndef HAVE_$inc -#define HAVE_$inc 1 -#endif - -END - + have=HAVE_$inc . auto/have eval "NGX_$inc='#include <$ngx_inc>'" ngx_found=yes
diff --git a/auto/lib/md5/conf b/auto/lib/md5/conf index 1a54ed5..ab8b51b 100644 --- a/auto/lib/md5/conf +++ b/auto/lib/md5/conf
@@ -1,5 +1,5 @@ -if [ $MD5 != NO ]; then +if [ $MD5 != NONE ]; then if grep MD5_Init $MD5/md5.h >/dev/null; then # OpenSSL md5 @@ -25,6 +25,8 @@ ngx_lib_inc="#include <sys/types.h> #include <md5.h>" + MD5=NO + # Solaris 8/9 ngx_lib="rsaref md5" ngx_lib_test="MD5_CTX md5; MD5Init(&md5)"
diff --git a/auto/lib/zlib/conf b/auto/lib/zlib/conf index b8bbade..60fd8d8 100644 --- a/auto/lib/zlib/conf +++ b/auto/lib/zlib/conf
@@ -1,5 +1,5 @@ -if [ $ZLIB != NO ]; then +if [ $ZLIB != NONE ]; then CORE_INCS="$CORE_INCS -I $ZLIB" if [ "$PLATFORM" = "win32" ]; then @@ -23,6 +23,8 @@ if [ $ngx_found = yes ]; then CORE_LIBS="$CORE_LIBS $ngx_libs" ZLIB=YES + else + ZLIB=NO fi fi
diff --git a/auto/options b/auto/options index 61e446e..08d0468 100644 --- a/auto/options +++ b/auto/options
@@ -22,12 +22,10 @@ PCRE=NO USE_MD5=NO -MD5=NO -MD5_LIB=NO +MD5=NONE USE_ZLIB=NO -ZLIB=NO -ZLIB_LIB=NO +ZLIB=NONE for option
diff --git a/auto/os/freebsd b/auto/os/freebsd index ee68543..0835b74 100644 --- a/auto/os/freebsd +++ b/auto/os/freebsd
@@ -1,11 +1,8 @@ - CORE_INCS="$UNIX_INCS" CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS" CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS" -MD5_LIB="-lmd" -ZLIB_LIB="-lz" version=`grep "#define __FreeBSD_version" /usr/include/osreldate.h \ | sed -e 's/^.* \(.*\)$/\1/'`
diff --git a/auto/os/linux b/auto/os/linux index 3a020e9..b71034c 100644 --- a/auto/os/linux +++ b/auto/os/linux
@@ -4,7 +4,6 @@ CORE_SRCS="$UNIX_SRCS $LINUX_SRCS" EVENT_MODULES="$EVENT_MODULES" -ZLIB_LIB="-lz" CC_TEST_FLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" @@ -13,7 +12,7 @@ ngx_func="epoll"; ngx_func_inc="#include <sys/epoll.h>" -ngx_func_test="int fd = 1; int n; +ngx_func_test="int efd = 0, fd = 1, n; struct epoll_event ee; ee.events = EPOLLIN|EPOLLOUT|EPOLLET; ee.data.ptr = NULL; @@ -21,7 +20,7 @@ . auto/func if [ $ngx_found = yes ]; then - CFLAGS="$CFLAGS -D HAVE_EPOLL=1" + have=HAVE_EPOLL . auto/have CORE_SRCS="$CORE_SRCS $EPOLL_SRCS" EVENT_MODULES="$EVENT_MODULES $EPOLL_MODULE" EVENT_FOUND=YES @@ -39,7 +38,6 @@ . auto/func if [ $ngx_found = yes ]; then - CFLAGS="$CFLAGS -D HAVE_SENDFILE=1" CORE_SRCS="$CORE_SRCS $LINUX_SENDFILE_SRCS" fi @@ -49,6 +47,14 @@ CC_TEST_FLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" ngx_func="sendfile64()"; . auto/func + +# prctl(PR_SET_DUMPABLE) + +ngx_func="prctl()"; +ngx_func_inc="#include <sys/prctl.h>" +ngx_func_test="prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)" +. auto/func + if [ $ngx_found = yes ]; then - CFLAGS="$CFLAGS -D HAVE_SENDFILE64=1" + have=HAVE_PR_SET_DUMPABLE . auto/have fi
diff --git a/auto/os/solaris b/auto/os/solaris index 363ac1d..dd6c85c 100644 --- a/auto/os/solaris +++ b/auto/os/solaris
@@ -4,17 +4,16 @@ CORE_SRCS="$UNIX_SRCS $SOLARIS_SRCS " EVENT_MODULES="$EVENT_MODULES" -MD5_LIB="-lmd5" -ZLIB_LIB="-lz" CORE_LIBS="$CORE_LIBS -lsocket -lnsl" + CC_TEST_FLAGS="-D_FILE_OFFSET_BITS=64" ngx_inc="sys/devpoll.h"; . auto/inc if [ $ngx_found = yes ]; then - CFLAGS="$CFLAGS -D HAVE_DEVPOLL=1" + have=HAVE_DEVPOLL . auto/have CORE_SRCS="$CORE_SRCS $DEVPOLL_SRCS" EVENT_MODULES="$EVENT_MODULES $DEVPOLL_MODULE" EVENT_FOUND=YES @@ -25,13 +24,13 @@ ngx_func_inc="#include <sys/sendfile.h>" ngx_func_libs="-lsendfile" ngx_func_test="int fd = 1; sendfilevec_t vec[1]; - size_t sent = 1; ssize_t n; + size_t sent; ssize_t n; n = sendfilev(fd, vec, 1, &sent)" . auto/func if [ $ngx_found = yes ]; then - CFLAGS="$CFLAGS -D HAVE_SENDFILE=1" + have=HAVE_SENDFILE . auto/have CORE_SRCS="$CORE_SRCS $SOLARIS_SENDFILEV_SRCS" CORE_LIBS="$CORE_LIBS -lsendfile" fi
diff --git a/auto/summary b/auto/summary index 28fe5f5..6546067 100644 --- a/auto/summary +++ b/auto/summary
@@ -3,21 +3,24 @@ echo "Configuration summary" case $PCRE in - YES) echo " + using system PCRE library" ;; - NO) echo " + PCRE library is not found" ;; - *) echo " + using PCRE library: $PCRE" ;; + YES) echo " + using system PCRE library" ;; + NONE) echo " + PCRE library is not used" ;; + NO) echo " + PCRE library is not found" ;; + *) echo " + using PCRE library: $PCRE" ;; esac case $MD5 in - YES) echo " + using system md5 library" ;; - NO) echo " + md5 library is not found" ;; - *) echo " + using md5 library: $MD5" ;; + YES) echo " + using system md5 library" ;; + NONE) echo " + md5 library is not used" ;; + NO) echo " + md5 library is not found" ;; + *) echo " + using md5 library: $MD5" ;; esac case $ZLIB in - YES) echo " + using system zlib library" ;; - NO) echo " + zlib library is not found" ;; - *) echo " + using zlib library: $ZLIB" ;; + YES) echo " + using system zlib library" ;; + NONE) echo " + zlib library is not used" ;; + NO) echo " + zlib library is not found" ;; + *) echo " + using zlib library: $ZLIB" ;; esac echo
diff --git a/auto/unix b/auto/unix index 172c73c..3aa1883 100755 --- a/auto/unix +++ b/auto/unix
@@ -16,12 +16,7 @@ ngx_type="void *"; . auto/types/sizeof; ngx_ptr_bytes=$ngx_bytes -# headers - -ngx_inc="unistd.h"; . auto/inc -ngx_inc="inttypes.h"; . auto/inc - -#POSIX types +# POSIX types NGX_AUTO_CONFIG="#include \"../$NGX_AUTO_CONFIG_H\"" @@ -43,6 +38,15 @@ . auto/types/uintptr_t +ngx_func="sin_len" +ngx_func_inc="#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h>" + +ngx_func_test="struct sockaddr_in sa; sa.sin_len = 5" +. auto/func + + # printf() formats CC_WARN=$CC_STRONG @@ -70,19 +74,15 @@ ngx_func="pread()" ngx_func_inc= -ngx_func_test=" -char buf[1]; -ssize_t n; -n = pread(0, buf, 1, 0)" +ngx_func_test="char buf[1]; ssize_t n; + n = pread(0, buf, 1, 0)" . auto/func ngx_func="pwrite()" ngx_func_inc= -ngx_func_test=" -char buf[1]; -ssize_t n; -n = pwrite(1, buf, 1, 0)" +ngx_func_test="char buf[1]; ssize_t n; + n = pwrite(1, buf, 1, 0)" . auto/func @@ -94,7 +94,7 @@ ngx_func="strerror_r()" ngx_func_inc="#include <string.h>" -ngx_func_test="char buf[20]; strerror_r(1, buf, 20)" +ngx_func_test="char buf[20]; int n; n = strerror_r(1, buf, 20)" . auto/func