diff options
Diffstat (limited to 'auto')
-rw-r--r-- | auto/make | 63 | ||||
-rw-r--r-- | auto/modules | 29 | ||||
-rw-r--r-- | auto/options | 4 | ||||
-rw-r--r-- | auto/os/conf | 11 | ||||
-rw-r--r-- | auto/os/freebsd | 1 |
5 files changed, 98 insertions, 10 deletions
@@ -32,7 +32,7 @@ if [ "$CC" = wcl386 ]; then fi -# ALL_INCS, required by OpenWatcom C precompiled headers +# ALL_INCS, required by the addons and by OpenWatcom C precompiled headers ngx_incs=`echo $CORE_INCS $NGX_OBJS $HTTP_INCS $IMAP_INCS\ | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \ @@ -120,10 +120,32 @@ END fi +if test -n "$NGX_ADDON_SRCS"; then + +cat << END >> $NGX_MAKEFILE + +ADDON_DEPS = \$(CORE_DPES) $NGX_ADDON_DEPS + +END + +fi + + # nginx ngx_all_srcs=`echo $ngx_all_srcs | sed -e "s/\//$ngx_regex_dirsep/g"` -ngx_modules_c=`echo $NGX_MODULES_C | sed -e "s/\//$ngx_regex_dirsep/g"` + +for ngx_src in $NGX_ADDON_SRCS +do + ngx_obj="addon/`basename \`dirname $ngx_src\``" + + test -d $NGX_OBJS/$ngx_obj || mkdir -p $NGX_OBJS/$ngx_obj + + ngx_obj=`echo $ngx_obj/\`basename $ngx_src\` \ + | sed -e "s/\//$ngx_regex_dirsep/g"` + + ngx_all_srcs="$ngx_all_srcs $ngx_obj" +done ngx_all_objs=`echo $ngx_all_srcs \ | sed -e "s/\([^ ]*\.\)cpp/$NGX_OBJS\/\1$ngx_objext/g" \ @@ -131,6 +153,8 @@ ngx_all_objs=`echo $ngx_all_srcs \ -e "s/\([^ ]*\.\)c/$NGX_OBJS\/\1$ngx_objext/g" \ -e "s/\([^ ]*\.\)S/$NGX_OBJS\/\1$ngx_objext/g"` +ngx_modules_c=`echo $NGX_MODULES_C | sed -e "s/\//$ngx_regex_dirsep/g"` + ngx_modules_obj=`echo $ngx_modules_c | sed -e "s/\(.*\.\)c/\1$ngx_objext/"` @@ -185,7 +209,6 @@ END for ngx_src in $CORE_SRCS do - ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"` ngx_obj=`echo $ngx_src \ | sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \ @@ -215,7 +238,6 @@ if [ $HTTP = YES ]; then for ngx_src in $HTTP_SRCS do - ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"` ngx_obj=`echo $ngx_src \ | sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \ @@ -229,7 +251,6 @@ $ngx_obj: \$(CORE_DEPS) \$(HTTP_DEPS)$ngx_cont$ngx_src $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src END - done fi @@ -247,7 +268,6 @@ if [ $IMAP = YES ]; then for ngx_src in $IMAP_SRCS do - ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"` ngx_obj=`echo $ngx_src \ | sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \ @@ -261,7 +281,38 @@ $ngx_obj: \$(CORE_DEPS) \$(IMAP_DEPS)$ngx_cont$ngx_src $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src END + done +fi + + +# the addons sources + +if test -n "$NGX_ADDON_SRCS"; then + + ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)" + + for ngx_src in $NGX_ADDON_SRCS + do + ngx_obj="addon/`basename \`dirname $ngx_src\``" + + ngx_obj=`echo $ngx_obj/\`basename $ngx_src\` \ + | sed -e "s/\//$ngx_regex_dirsep/g"` + + ngx_obj=`echo $ngx_obj \ + | sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \ + -e "s/^\(.*\.\)cc$/$ngx_objs_dir\1$ngx_objext/g" \ + -e "s/^\(.*\.\)c$/$ngx_objs_dir\1$ngx_objext/g" \ + -e "s/^\(.*\.\)S$/$ngx_objs_dir\1$ngx_objext/g"` + + ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"` + + cat << END >> $NGX_MAKEFILE + +$ngx_obj: \$(ADDON_DEPS)$ngx_cont$ngx_src + $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src + +END done fi diff --git a/auto/modules b/auto/modules index 2c001e28b..1fe9ac8d1 100644 --- a/auto/modules +++ b/auto/modules @@ -162,10 +162,32 @@ if [ $HTTP_STUB_STATUS = YES ]; then HTTP_SRCS="$HTTP_SRCS src/http/modules/ngx_http_stub_status_module.c" fi -if [ -r $NGX_OBJS/auto ]; then - . $NGX_OBJS/auto +#if [ -r $NGX_OBJS/auto ]; then +# . $NGX_OBJS/auto +#fi + + +if test -n "$NGX_ADDONS"; then + + echo configuring additional modules + + for ngx_addon_dir in $NGX_ADDONS + do + echo "adding module in $ngx_addon_dir" + + if test -f $ngx_addon_dir/config; then + . $ngx_addon_dir/config + + echo " + $ngx_addon_name was configured" + + else + echo "$0: error: no $ngx_addon_dir/config was found" + exit 1 + fi + done fi + modules="$CORE_MODULES $EVENT_MODULES" if [ $HTTP = YES ]; then @@ -174,8 +196,11 @@ if [ $HTTP = YES ]; then $HTTP_COPY_FILTER_MODULE \ $HTTP_RANGE_BODY_FILTER_MODULE \ $HTTP_NOT_MODIFIED_FILTER_MODULE" + + NGX_ADDON_DEPS="$NGX_ADDON_DEPS \$(HTTP_DEPS)" fi + IMAP_MODULES=$IMAP_MODULE if [ $IMAP = YES ]; then diff --git a/auto/options b/auto/options index 7bb93ac74..dd740fef3 100644 --- a/auto/options +++ b/auto/options @@ -63,7 +63,7 @@ HTTP_STUB_STATUS=NO IMAP=NO -NGX_MODULES= +NGX_ADDONS= USE_PCRE=NO PCRE=NONE @@ -139,7 +139,7 @@ do --with-imap) IMAP=YES ;; - --with-module=*) NGX_MODULES="$NGX_MODULES $values" ;; + --add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;; --with-cc=*) CC="$value" ;; --with-cpp=*) CPP="$value" ;; diff --git a/auto/os/conf b/auto/os/conf index 71a143df7..737519938 100644 --- a/auto/os/conf +++ b/auto/os/conf @@ -123,4 +123,15 @@ if [ $NGX_PLATFORM != win32 ]; then . auto/feature fi fi + + if [ NGX_SYSTEM != "NetBSD" ]; then + + # NetBSD 2.0 incompatibly defines kevent.udata as "intptr_t" + cat << END >> $NGX_AUTO_CONFIG_H + +#define NGX_KQUEUE_UDATA_T (void *) + +END + + fi fi diff --git a/auto/os/freebsd b/auto/os/freebsd index e35b933af..dfb547f3b 100644 --- a/auto/os/freebsd +++ b/auto/os/freebsd @@ -64,6 +64,7 @@ then EVENT_FOUND=YES fi + NGX_KQUEUE_CHECKED=YES |