2004-03-01 14:00:04 -06:00
|
|
|
|
2004-09-29 11:00:49 -05:00
|
|
|
# Copyright (C) Igor Sysoev
|
|
|
|
|
|
|
|
|
2004-03-25 14:03:02 -06:00
|
|
|
case "$CC" in
|
2004-03-09 13:47:07 -06:00
|
|
|
|
|
|
|
cl)
|
|
|
|
makefile=makefile.msvc
|
2004-03-29 11:43:58 -06:00
|
|
|
opt="CPU_OPT=$CPU_OPT LIBC=$LIBC"
|
|
|
|
|
2004-03-09 13:47:07 -06:00
|
|
|
;;
|
|
|
|
|
|
|
|
wcl386)
|
|
|
|
makefile=makefile.owc
|
2004-03-29 11:43:58 -06:00
|
|
|
opt="CPU_OPT=$CPU_OPT"
|
|
|
|
;;
|
|
|
|
|
|
|
|
bcc32)
|
|
|
|
makefile=makefile.bcc
|
|
|
|
opt="-DCPU_OPT=$CPU_OPT"
|
2004-03-09 13:47:07 -06:00
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
2004-03-01 14:00:04 -06:00
|
|
|
|
|
|
|
case $PLATFORM in
|
|
|
|
|
2004-03-09 13:47:07 -06:00
|
|
|
win32)
|
2004-10-21 10:34:38 -05:00
|
|
|
line=`echo $ZLIB/zlib.lib: | sed -e "s/\//$ngx_regex_dirsep/g"`
|
2004-03-29 11:43:58 -06:00
|
|
|
echo "$line" >> $MAKEFILE
|
2004-03-09 13:47:07 -06:00
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "$ZLIB/libz.a:" >> $MAKEFILE
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
2004-03-11 15:34:52 -06:00
|
|
|
done=NO
|
|
|
|
|
|
|
|
|
2004-03-09 13:47:07 -06:00
|
|
|
case $PLATFORM in
|
|
|
|
|
|
|
|
win32)
|
2004-10-21 10:34:38 -05:00
|
|
|
zlib=`echo $ZLIB | sed -e "s/\//$ngx_regex_dirsep/g"`
|
2004-03-09 13:47:07 -06:00
|
|
|
|
|
|
|
cp auto/lib/zlib/$makefile $ZLIB
|
2004-03-29 11:43:58 -06:00
|
|
|
echo " cd $zlib" >> $MAKEFILE
|
|
|
|
echo " \$(MAKE) -f $makefile $opt" >> $MAKEFILE
|
2004-03-09 13:47:07 -06:00
|
|
|
echo " cd ..\\..\\.." >> $MAKEFILE
|
2004-03-11 15:34:52 -06:00
|
|
|
|
|
|
|
done=YES
|
2004-03-09 13:47:07 -06:00
|
|
|
;;
|
|
|
|
|
2004-03-12 10:57:08 -06:00
|
|
|
# FreeBSD: i386
|
|
|
|
# Linux: i686
|
2004-03-09 13:47:07 -06:00
|
|
|
|
2004-03-10 11:55:19 -06:00
|
|
|
*:i386 | *:i686)
|
2004-03-12 10:57:08 -06:00
|
|
|
case $ZLIB_ASM in
|
|
|
|
pentium)
|
|
|
|
echo " cd $ZLIB \\" >> $MAKEFILE
|
|
|
|
echo " && cp contrib/asm586/match.S . \\" >> $MAKEFILE
|
2004-03-25 14:03:02 -06:00
|
|
|
echo " && CFLAGS=\"$ZLIB_OPT -DASMV\" \\" >> $MAKEFILE
|
|
|
|
echo " CC=\"\$(CC)\" \\" >> $MAKEFILE
|
2004-03-12 10:57:08 -06:00
|
|
|
echo " ./configure \\" >> $MAKEFILE
|
|
|
|
echo " && \$(MAKE) OBJA=match.o libz.a" >> $MAKEFILE
|
|
|
|
|
|
|
|
done=YES
|
|
|
|
;;
|
|
|
|
|
|
|
|
pentiumpro)
|
|
|
|
echo " cd $ZLIB \\" >> $MAKEFILE
|
|
|
|
echo " && cp contrib/asm686/match.S . \\" >> $MAKEFILE
|
2004-03-25 14:03:02 -06:00
|
|
|
echo " && CFLAGS=\"$ZLIB_OPT -DASMV\" \\" >> $MAKEFILE
|
|
|
|
echo " CC=\"\$(CC)\" \\" >> $MAKEFILE
|
2004-03-12 10:57:08 -06:00
|
|
|
echo " ./configure \\" >> $MAKEFILE
|
|
|
|
echo " && \$(MAKE) OBJA=match.o libz.a" >> $MAKEFILE
|
|
|
|
|
|
|
|
done=YES
|
|
|
|
;;
|
2004-04-12 11:38:09 -05:00
|
|
|
|
2004-04-18 14:06:02 -05:00
|
|
|
NO)
|
|
|
|
;;
|
|
|
|
|
2004-04-12 11:38:09 -05:00
|
|
|
*)
|
2004-04-18 14:06:02 -05:00
|
|
|
echo "$0: error: invalid --with-zlib-asm=$ZLIB_ASM option."
|
2004-04-12 11:38:09 -05:00
|
|
|
echo "The valid values are \"pentium\" and \"pentiumpro\" only".
|
|
|
|
echo
|
|
|
|
|
|
|
|
exit 1;
|
|
|
|
;;
|
2004-03-12 10:57:08 -06:00
|
|
|
esac
|
2004-03-01 14:00:04 -06:00
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
2004-03-11 15:34:52 -06:00
|
|
|
|
|
|
|
if [ $done = NO ]; then
|
|
|
|
echo " cd $ZLIB \\" >> $MAKEFILE
|
2004-03-25 14:03:02 -06:00
|
|
|
echo " && CFLAGS=\"$ZLIB_OPT\" CC=\"\$(CC)\" \\" >> $MAKEFILE
|
|
|
|
echo " ./configure \\" >> $MAKEFILE
|
2004-03-11 15:34:52 -06:00
|
|
|
echo " && \$(MAKE) libz.a" >> $MAKEFILE
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2004-03-09 13:47:07 -06:00
|
|
|
echo >> $MAKEFILE
|