Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/auto
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-02-24 20:31:46 +0300
committerIgor Sysoev <igor@sysoev.ru>2004-02-24 20:31:46 +0300
commit48fef6654cc90e05004648423cb5dd7c6f7770f0 (patch)
treec61d52b4dddfb64e28de98bf402b96706f0be418 /auto
parentb54698b5798b7f1a54226274347ce1faee5a92a4 (diff)
nginx-0.0.2-2004-02-24-20:31:46 import
Diffstat (limited to 'auto')
-rw-r--r--auto/fmt/ptrfmt62
-rw-r--r--auto/make6
-rw-r--r--auto/os/freebsd16
-rw-r--r--auto/sources1
-rw-r--r--auto/threads6
-rwxr-xr-xauto/unix8
6 files changed, 93 insertions, 6 deletions
diff --git a/auto/fmt/ptrfmt b/auto/fmt/ptrfmt
new file mode 100644
index 000000000..8bbdcd10c
--- /dev/null
+++ b/auto/fmt/ptrfmt
@@ -0,0 +1,62 @@
+
+echo $ngx_n "checking for $ngx_type printf() format ..." $ngx_c
+echo >> $NGX_ERR
+echo "checking for $ngx_type printf() format" >> $NGX_ERR
+
+ngx_fmt=no
+comma=
+fmtX=
+
+for fmt in $ngx_formats
+do
+
+ cat << END > $NGX_AUTOTEST.c
+
+int main() {
+ printf("$fmt", ($ngx_type) $ngx_max_size);
+ return 0;
+}
+
+END
+
+ eval "$CC_WARN $CC_TEST_FLAGS -o $NGX_AUTOTEST $NGX_AUTOTEST.c \
+ >> $NGX_ERR 2>&1"
+
+ max_size=`echo $ngx_max_size | sed -e "s/L*\$//"`
+
+ if [ -x $NGX_AUTOTEST ]; then
+ if [ "`$NGX_AUTOTEST`" = $max_size ]; then
+ ngx_fmt=$fmt
+ fi
+ fi
+
+ rm $NGX_AUTOTEST*
+
+ if [ $ngx_fmt != no ]; then
+ break
+ fi
+
+ fmtX=`echo $fmt | sed -e "s/d/X/"`
+
+ echo $ngx_n "$comma \"${fmtX}\" is not appropriate" $ngx_c
+ comma=","
+done
+
+
+if [ $ngx_fmt = no ]; then
+ echo "$0: error: printf() $ngx_type format not found"
+ exit 1
+fi
+
+fmtX="%0`expr 2 \* ${ngx_ptr_bytes}`"
+ngx_fmt=`echo $ngx_fmt | sed -e "s/d/X/" -e "s/^%/$fmtX/"`
+
+echo "$comma \"${ngx_fmt}\" used"
+
+cat << END >> $NGX_AUTO_CONFIG_H
+
+#ifndef $ngx_fmt_name
+#define $ngx_fmt_name "$ngx_fmt"
+#endif
+
+END
diff --git a/auto/make b/auto/make
index 1394a1d21..c486de4f0 100644
--- a/auto/make
+++ b/auto/make
@@ -59,7 +59,7 @@ echo "nginx: \\" >> $MAKEFILE
for src in $CORE_SRCS $HTTP_SRCS
do
- obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/"`
+ obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/" -e "s/\.S\$/.$OBJEXT/"`
echo " $OBJS/$obj \\" >> $MAKEFILE
done
@@ -74,7 +74,7 @@ echo " \$(CC) ${BINOUT}nginx \\" >> $MAKEFILE
for src in $CORE_SRCS $HTTP_SRCS
do
- obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/"`
+ obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/" -e "s/\.S\$/.$OBJEXT/"`
echo " $OBJS/$obj \\" >> $MAKEFILE
done
@@ -100,7 +100,7 @@ echo >> $MAKEFILE
for src in $CORE_SRCS
do
- obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/"`
+ obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/" -e "s/\.S\$/.$OBJEXT/"`
echo "$OBJS/$obj: \\" >> $MAKEFILE
echo " $src $deps" >> $MAKEFILE
diff --git a/auto/os/freebsd b/auto/os/freebsd
index dfe4ea748..a0748f6fc 100644
--- a/auto/os/freebsd
+++ b/auto/os/freebsd
@@ -11,9 +11,21 @@ version=`grep "#define __FreeBSD_version" /usr/include/osreldate.h \
| sed -e 's/^.* \(.*\)$/\1/'`
+# setproctitle() in libutil
+
+if [ \( $version -ge 500000 -a $version -lt 500012 \) \
+ -o $version -lt 410002 ]
+then
+ echo " + setproctitle() in libutil"
+
+ CORE_LIBS="$CORE_LIBS -lutil"
+fi
+
# sendfile
if [ $version -gt 300007 ]; then
+ echo " + sendfile() found"
+
have=HAVE_SENDFILE . auto/have
CORE_SRCS="$CORE_SRCS $FREEBSD_SENDFILE_SRCS"
fi
@@ -24,6 +36,8 @@ fi
if [ \( $version -lt 500000 -a $version -ge 410000 \) \
-o $version -ge 500011 ]
then
+ echo " + kqueue found"
+
have=HAVE_KQUEUE . auto/have
have=HAVE_CLEAR_EVENT . auto/have
CORE_SRCS="$CORE_SRCS $KQUEUE_SRCS"
@@ -37,6 +51,8 @@ fi
if [ \( $version -lt 500000 -a $version -ge 430000 \) \
-o $version -ge 500018 ]
then
+ echo " + kqueue's NOTE_LAWAT found"
+
have=HAVE_LOWAT_EVENT . auto/have
fi
diff --git a/auto/sources b/auto/sources
index 17e6a4abb..e2220766e 100644
--- a/auto/sources
+++ b/auto/sources
@@ -120,6 +120,7 @@ FREEBSD_DEPS=src/os/unix/ngx_freebsd_config.h
FREEBSD_SRCS=src/os/unix/ngx_freebsd_init.c
FREEBSD_SENDFILE_SRCS=src/os/unix/ngx_freebsd_sendfile_chain.c
FREEBSD_RFORK_SRCS="src/os/unix/ngx_freebsd_rfork_thread.c"
+FREEBSD_RFORK_THREAD_SRCS="src/os/unix/rfork_thread.S"
LINUX_DEPS=src/os/unix/ngx_linux_config.h
LINUX_SRCS=src/os/unix/ngx_linux_init.c
diff --git a/auto/threads b/auto/threads
index 71fbcb6ef..0c677f1d6 100644
--- a/auto/threads
+++ b/auto/threads
@@ -1,7 +1,13 @@
if [ $USE_THREADS = "rfork" ]; then
+
have=NGX_THREADS . auto/have
have=USE_RFORK . auto/have
CORE_DEPS="$CORE_DEPS $UNIX_THREADS_DEPS"
CORE_SRCS="$CORE_SRCS $FREEBSD_RFORK_SRCS"
+
+ if [ $version -lt 501000 ]; then
+ CORE_SRCS="$CORE_SRCS $FREEBSD_RFORK_THREAD_SRCS"
+ fi
+
fi
diff --git a/auto/unix b/auto/unix
index d6fc3730e..017f7bf6a 100755
--- a/auto/unix
+++ b/auto/unix
@@ -4,16 +4,18 @@ ngx_fmt_collect=yes
# C types
-ngx_type="int"; . auto/types/sizeof;
+ngx_type="int"; . auto/types/sizeof
ngx_formats="%d"; . auto/fmt/fmt
-ngx_type="long"; . auto/types/sizeof;
+ngx_type="long"; . auto/types/sizeof
ngx_formats="%ld"; . auto/fmt/fmt
-ngx_type="long long"; . auto/types/sizeof;
+ngx_type="long long"; . auto/types/sizeof
ngx_formats="%lld %qd"; . auto/fmt/fmt
ngx_type="void *"; . auto/types/sizeof; ngx_ptr_bytes=$ngx_bytes
+ngx_fmt_name=PTR_FMT;
+eval ngx_formats=\${ngx_${ngx_bytes}_fmt}; . auto/fmt/ptrfmt
# POSIX types