Skip to content

Commit

Permalink
nginx-0.0.2-2004-03-09-22:47:07 import
Browse files Browse the repository at this point in the history
  • Loading branch information
igorsysoev committed Mar 9, 2004
1 parent 833823c commit fc5a10a
Show file tree
Hide file tree
Showing 34 changed files with 545 additions and 172 deletions.
48 changes: 37 additions & 11 deletions auto/cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ case $CC in

have=HAVE_GCC_VARIADIC_MACROS . auto/have

LINK="\$(CC)"

OBJEXT=o
COMPILEONLY="-c "
COMPILEONLY="-c"
OBJOUT="-o "
BINOUT="-o "

Expand All @@ -58,8 +60,10 @@ case $CC in

have=HAVE_C99_VARIADIC_MACROS . auto/have

LINK="\$(CC)"

OBJEXT=o
COMPILEONLY="-c "
COMPILEONLY="-c"
OBJOUT="-o "
BINOUT="-o "

Expand Down Expand Up @@ -100,11 +104,14 @@ case $CC in
# disable logo
CFLAGS="$CFLAGS -nologo"

LINK="\$(CC)"

# link flags
CORE_LINK="$CORE_LINK -link"

# msvcrt.dll
CORE_LINK="$CORE_LINK -nodefaultlib:libcmt"
CORE_LIBS="$CORE_LIBS msvcrt.lib"

# static libc
#CORE_LINK="$CORE_LINK -nodefaultlib:msvcrt"
Expand All @@ -115,16 +122,23 @@ case $CC in
CFLAGS="$CFLAGS -Yd"
CORE_LINK="$CORE_LINK -debug -debugtype:coff"

# precompiled headers
CORE_DEPS="$CORE_DEPS ngx_config.pch"
PCH="ngx_config.pch"
BUILDPCH="-Ycngx_config.h"
USEPCH="-Yungx_config.h"

OBJEXT=obj
COMPILEONLY="-c "
COMPILEONLY="-c"
OBJOUT="-Fo"
BINOUT="-Fe"
BINEXT=.exe

CC_STRONG="$CC -W3 -WX"
;;


wcc386)
wcl386)
# Open Watcom 1.0

# optimization
Expand All @@ -139,16 +153,18 @@ case $CC in
CFLAGS="$CFLAGS -oe"
# disable stack checking calls
CFLAGS="$CFLAGS -s"
# optimize for Pentium Pro
#CFLAGS="$CFLAGS -6r"
CFLAGS="$CFLAGS -6s"
# optimize for Pentium Pro, register-based arguments
OWC_OPT="-6r"
# optimize for Pentium Pro, stack-based arguments
#OWC_OPT="-6s"
CFLAGS="$CFLAGS $OWC_OPT"

# warnings
#CFLAGS="$CFLAGS -w3"
CFLAGS="$CFLAGS -wx"

# stop on warning
#CFLAGS="$CFLAGS -we"
CFLAGS="$CFLAGS -we"

# built target is NT
CFLAGS="$CFLAGS -bt=nt"
Expand All @@ -162,13 +178,23 @@ case $CC in
# quiet
CFLAGS="$CFLAGS -zq"

# link traget is NT
# precompiled headers
CORE_DEPS="$CORE_DEPS $OBJS\\ngx_config.pch"
PCH="$OBJS\\ngx_config.pch"
BUILDPCH="-fhq=$OBJS\\ngx_config.pch"
USEPCH="-fh=$OBJS\\ngx_config.pch"

LINK="\$(CC)"

# link flags
CORE_LINK="$CORE_LINK -l=nt"

OBJEXT=obj
COMPILEONLY=
COMPILEONLY="-c"
OBJOUT="-fo"
BINOUT="-fo"
BINOUT="-fe="
BINEXT=.exe

INC_EQ=YES
MAKE_BS=YES
MAKE_SL=YES
Expand Down
3 changes: 3 additions & 0 deletions auto/init
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ NGX_ERR=$OBJS/autoconf.err

CC_WARN=$CC

PCH=NO
USEPCH=

BINEXT=
INC_EQ=NO
MAKE_BS=NO
MAKE_SL=NO
Expand Down
22 changes: 8 additions & 14 deletions auto/lib/make
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@

if [ "$PLATFORM" != "win32" ]; then

if [ $PCRE != NO ]; then
. auto/lib/pcre/make
fi


if [ $MD5 != NO ]; then
. auto/lib/md5/make
fi

if [ $MD5 != NO ]; then
. auto/lib/md5/make
fi

if [ $ZLIB != NO ]; then
. auto/lib/zlib/make
fi
if [ $ZLIB != NO ]; then
. auto/lib/zlib/make
fi

if [ $PCRE != NO ]; then
. auto/lib/pcre/make
fi
26 changes: 19 additions & 7 deletions auto/lib/md5/conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,25 @@ if [ $MD5 != NONE ]; then

CORE_INCS="$CORE_INCS -I $MD5"

if [ "$PLATFORM" = "win32" ]; then
CORE_LIBS="$CORE_LIBS md5.lib"
CORE_LINK="$CORE_LINK -libpath:$MD5"
else
LINK_DEPS="$LINK_DEPS $MD5/libmd5.a"
CORE_LIBS="$CORE_LIBS -L $MD5 -lmd5"
fi
case $CC in

cl)
LINK_DEPS="$LINK_DEPS $MD5/md5.lib"
CORE_LIBS="$CORE_LIBS md5.lib"
CORE_LINK="$CORE_LINK -libpath:$MD5"
;;

wcl386)
LINK_DEPS="$LINK_DEPS $MD5/md5.lib"
CORE_LIBS="$CORE_LIBS $MD5/md5.lib"
;;

*)
LINK_DEPS="$LINK_DEPS $MD5/libmd5.a"
CORE_LIBS="$CORE_LIBS -L $MD5 -lmd5"
;;

esac

else

Expand Down
44 changes: 38 additions & 6 deletions auto/lib/md5/make
Original file line number Diff line number Diff line change
@@ -1,24 +1,56 @@

echo "$MD5/libmd5.a:" >> $MAKEFILE
case $CC in

cl)
makefile=makefile.msvc
;;

wcl386)
makefile=makefile.owc
;;

esac


case $PLATFORM in

win32)
echo "$MD5/md5.lib:" >> $MAKEFILE
;;

*)
echo "$MD5/libmd5.a:" >> $MAKEFILE
;;

esac


case $PLATFORM in

win32)

cp auto/lib/md5/$makefile $MD5
echo " cd $MD5" >> $MAKEFILE
echo " \$(MAKE) -f $makefile OWC_OPT=$OWC_OPT" >> $MAKEFILE
echo " cd ..\\..\\.." >> $MAKEFILE
;;

SunOS:*:i386)
echo " cd $MD5 && \$(MAKE) x86-solaris" >> $MAKEFILE
echo " cd $MD5 && \$(MAKE) x86-solaris" >> $MAKEFILE
;;

*:i386)
echo " cd $MD5 && \$(MAKE) x86-elf" >> $MAKEFILE
echo " cd $MD5 && \$(MAKE) x86-elf" >> $MAKEFILE
;;

*)
if [ $CC = gcc ]; then
echo " cd $MD5 && \$(MAKE) gcc" >> $MAKEFILE
echo " cd $MD5 && \$(MAKE) gcc" >> $MAKEFILE
else
echo " cd $MD5 && \$(MAKE) cc" >> $MAKEFILE
echo " cd $MD5 && \$(MAKE) cc" >> $MAKEFILE
fi
;;

esac

echo >> $MAKEFILE
echo >> $MAKEFILE
8 changes: 4 additions & 4 deletions auto/lib/md5/makefile.msvc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

all:
cl -nologo -c -MT -O2 -Ob1 -Oi -Gs -D MD5_ASM -D L_ENDIAN \
md5_dgst.c md5_one.c
CFLAGS = -nologo -c -MT -O2 -Ob1 -Oi -Gs -D MD5_ASM -D L_ENDIAN

link -lib -out:md5.lib md5_dgst.obj md5_one.obj asm/m-win32.obj
md5.lib:
cl $(CFLAGS) md5_dgst.c
link -lib -out:md5.lib md5_dgst.obj asm/m-win32.obj
12 changes: 12 additions & 0 deletions auto/lib/md5/makefile.owc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s $(OWC_OPT)

md5.lib:
wcl386 $(CFLAGS) -bm -dL_ENDIAN md5_dgst.c
wlib -n md5.lib md5_dgst.obj

#md5.lib:
asm:
wcl386 $(CFLAGS) -bm -dMD5_ASM -dL_ENDIAN md5_dgst.c
wcl386 $(CFLAGS) asm\m-win32.asm
wlib -n md5.lib md5_dgst.obj m-win32.obj
63 changes: 40 additions & 23 deletions auto/lib/pcre/conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,54 @@ if [ $PCRE != NONE ]; then
CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
CORE_SRCS="$CORE_SRCS $REGEX_SRCS"

if [ "$PLATFORM" = "win32" ]; then
have=HAVE_PCRE . auto/have
have=PCRE_STATIC . auto/have
CORE_LIBS="$CORE_LIBS pcre.lib"
CORE_LINK="$CORE_LINK -libpath:$PCRE"
else
have=HAVE_PCRE . auto/have
CORE_DEPS="$CORE_DEPS $PCRE/.libs/libpcre.a"
CORE_LIBS="$CORE_LIBS -L $PCRE/.libs -lpcre"
fi
case $CC in

cl)
have=HAVE_PCRE . auto/have
have=PCRE_STATIC . auto/have
CORE_DEPS="$CORE_DEPS $PCRE/pcre.lib"
#CORE_DEPS="$PCRE/pcre.lib $CORE_DEPS"
CORE_LIBS="$CORE_LIBS pcre.lib"
CORE_LINK="$CORE_LINK -libpath:$PCRE"
;;

wcl386)
have=HAVE_PCRE . auto/have
have=PCRE_STATIC . auto/have
CORE_DEPS="$CORE_DEPS $PCRE/pcre.lib"
CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib"
;;

*)
have=HAVE_PCRE . auto/have
CORE_DEPS="$CORE_DEPS $PCRE/.libs/libpcre.a"
CORE_LIBS="$CORE_LIBS -L $PCRE/.libs -lpcre"
;;

esac

else

ngx_lib_inc="#include <pcre.h>"
if [ $PLATFORM != win32 ]; then
ngx_lib_inc="#include <pcre.h>"

ngx_lib="PCRE"
ngx_lib_test="pcre *re; pcre_compile(re, 0, NULL, 0, NULL)"
ngx_libs=-lpcre
. auto/lib/test
ngx_lib="PCRE"
ngx_lib_test="pcre *re; pcre_compile(re, 0, NULL, 0, NULL)"
ngx_libs=-lpcre
. auto/lib/test


if [ $ngx_found = yes ]; then
have=HAVE_PCRE . auto/have
if [ $ngx_found = yes ]; then
have=HAVE_PCRE . auto/have

CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
CORE_LIBS="$CORE_LIBS $ngx_libs"
CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
CORE_LIBS="$CORE_LIBS $ngx_libs"

PCRE=YES
else
PCRE=NO
PCRE=YES
else
PCRE=NO
fi
fi

fi
Loading

0 comments on commit fc5a10a

Please sign in to comment.