1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
# Copyright (C) Igor Sysoev
# Copyright (C) NGINX, Inc.
NJS_CC_OPT=${NJS_CC_OPT:--O}
NJS_LD_OPT=${NJS_CC_OPT:--O}
NJS_DEBUG=NO
NJS_DEBUG_MEMORY=NO
NJS_DEBUG_OPCODE=NO
NJS_DEBUG_GENERATOR=NO
NJS_ADDRESS_SANITIZER=NO
NJS_ADDR2LINE=NO
NJS_QUICKJS=NO
NJS_TRY_QUICKJS=YES
NJS_OPENSSL=YES
NJS_LIBXML2=YES
NJS_ZLIB=YES
NJS_PCRE=YES
NJS_TRY_PCRE2=YES
NJS_TRY_GOTO=YES
NJS_CONFIGURE_OPTIONS=
for njs_option
do
case "$njs_option" in
-*=*) value=`echo "$njs_option" | sed -e 's#[-_a-zA-Z0-9]*=##'` ;;
*) value="" ;;
esac
case "$njs_option" in
--cc=*) CC="$value" ;;
--cc-opt=*) NJS_CC_OPT="$value" ;;
--ld-opt=*) NJS_LD_OPT="$value" ;;
--ar=*) AR="$value" ;;
--build-dir=*) NJS_BUILD_DIR="$value" ;;
--address-sanitizer=*) NJS_ADDRESS_SANITIZER="$value" ;;
--addr2line=*) NJS_ADDR2LINE="$value" ;;
--debug=*) NJS_DEBUG="$value" ;;
--debug-memory=*) NJS_DEBUG_MEMORY="$value" ;;
--debug-opcode=*) NJS_DEBUG_OPCODE="$value" ;;
--debug-generator=*) NJS_DEBUG_GENERATOR="$value" ;;
--no-quickjs) NJS_TRY_QUICKJS=NO ;;
--no-openssl) NJS_OPENSSL=NO ;;
--no-libxml2) NJS_LIBXML2=NO ;;
--no-zlib) NJS_ZLIB=NO ;;
--no-pcre) NJS_PCRE=NO ;;
--no-pcre2) NJS_TRY_PCRE2=NO ;;
--no-goto) NJS_TRY_GOTO=NO ;;
--with-quickjs) NJS_TRY_QUICKJS=YES; NJS_QUICKJS=YES ;;
--help)
. auto/help
exit 0
;;
*)
echo
echo $0: error: invalid option \"$njs_option\".
echo Run \"$0 --help\" to see available options.
echo
exit 1
;;
esac
njs_opt=`echo $njs_option | sed -e "s#\(--[^=]*=\)\(.* .*\)#\1'\2'#"`
NJS_CONFIGURE_OPTIONS="$NJS_CONFIGURE_OPTIONS $njs_opt"
done
if [ "$NJS_DEBUG_MEMORY" = "YES" ]; then
NJS_DEBUG=YES
fi
if [ "$NJS_DEBUG_OPCODE" = "YES" ]; then
NJS_ADDR2LINE=YES
fi
|