Comparison

configure @ 8285:433b2a41351f

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Fri, 29 Sep 2017 13:45:03 +0200
parent 8284:22460456c3a3
child 8448:f516a52f19e8
comparison
equal deleted inserted replaced
8271:c09deab9989e 8285:433b2a41351f
71 arc4random: OpenBSD kernel 71 arc4random: OpenBSD kernel
72 openssl: OpenSSL RAND method 72 openssl: OpenSSL RAND method
73 Default is to use /dev/urandom 73 Default is to use /dev/urandom
74 --cflags=FLAGS Flags to pass to the compiler 74 --cflags=FLAGS Flags to pass to the compiler
75 Default is $CFLAGS 75 Default is $CFLAGS
76 --add-cflags=FLAGS Adds additional CFLAGS, preserving defaults.
77 Can be repeated.
76 --ldflags=FLAGS Flags to pass to the linker 78 --ldflags=FLAGS Flags to pass to the linker
77 Default is $LDFLAGS 79 Default is $LDFLAGS
80 --add-ldflags=FLAGS Adds additional linker flags, preserving defaults.
81 Can be repeated.
78 --c-compiler=CC The C compiler to use when building modules. 82 --c-compiler=CC The C compiler to use when building modules.
79 Default is $CC 83 Default is $CC
84 --compiler-wrapper=WRAPPER Adds a prefix to compiler and linker calls,
85 usable for eg distcc or ccache.
80 --linker=CC The linker to use when building modules. 86 --linker=CC The linker to use when building modules.
81 Default is $LD 87 Default is $LD
82 --require-config Will cause $APP_NAME to refuse to run when
83 it fails to find a configuration file
84 --no-example-certs Disables generation of example certificates. 88 --no-example-certs Disables generation of example certificates.
85 EOF 89 EOF
86 } 90 }
87 91
88 # Helper functions 92 # Helper functions
169 OSTYPE_SET=yes 173 OSTYPE_SET=yes
170 if [ "$OSTYPE" = "debian" ]; then 174 if [ "$OSTYPE" = "debian" ]; then
171 if [ "$LUA_SUFFIX_SET" != "yes" ]; then 175 if [ "$LUA_SUFFIX_SET" != "yes" ]; then
172 LUA_SUFFIX="5.1"; 176 LUA_SUFFIX="5.1";
173 LUA_SUFFIX_SET=yes 177 LUA_SUFFIX_SET=yes
178 fi
179 if [ "$RUNWITH_SET" != "yes" ]; then
180 RUNWITH="lua$LUA_SUFFIX";
181 RUNWITH_SET=yes
174 fi 182 fi
175 LUA_INCDIR="/usr/include/lua$LUA_SUFFIX" 183 LUA_INCDIR="/usr/include/lua$LUA_SUFFIX"
176 LUA_INCDIR_SET=yes 184 LUA_INCDIR_SET=yes
177 CFLAGS="$CFLAGS -ggdb" 185 CFLAGS="$CFLAGS -ggdb"
178 fi 186 fi
236 ;; 244 ;;
237 --datadir) 245 --datadir)
238 DATADIR="$value" 246 DATADIR="$value"
239 DATADIR_SET=yes 247 DATADIR_SET=yes
240 ;; 248 ;;
241 --require-config)
242 REQUIRE_CONFIG=yes
243 ;;
244 --lua-suffix) 249 --lua-suffix)
245 [ -n "$value" ] || die "Missing value in flag $key." 250 [ -n "$value" ] || die "Missing value in flag $key."
246 LUA_SUFFIX="$value" 251 LUA_SUFFIX="$value"
247 LUA_SUFFIX_SET=yes 252 LUA_SUFFIX_SET=yes
248 ;; 253 ;;
499 echo "lua.h version mismatch (interpreter: $LUA_VERSION; lua.h: $header_version)." 504 echo "lua.h version mismatch (interpreter: $LUA_VERSION; lua.h: $header_version)."
500 die "You may want to use the flag --with-lua or --with-lua-include. See --help." 505 die "You may want to use the flag --with-lua or --with-lua-include. See --help."
501 fi 506 fi
502 fi 507 fi
503 508
504 echo_n "Configuring for system... "
505 if uname -s
506 then
507 UNAME_S=`uname -s`
508 else
509 die "Could not determine operating system. 'uname -s' failed."
510 fi
511 echo_n "Configuring for architecture... "
512 if uname -m
513 then
514 UNAME_M=`uname -m`
515 else
516 die "Could not determine processor architecture. 'uname -m' failed."
517 fi
518
519 if [ "$UNAME_S" = Linux ]
520 then
521 GCC_ARCH=`gcc -print-multiarch 2>/dev/null`
522 if [ -n "$GCC_ARCH" -a -d "/usr/lib/$GCC_ARCH" ]
523 then
524 MULTIARCH_SUBDIR="lib/$GCC_ARCH"
525 elif [ -d "/usr/lib64" ]
526 then
527 # Useful for Fedora systems
528 MULTIARCH_SUBDIR="lib64"
529 fi
530 fi
531
532 if [ "$IDN_LIBRARY" = "icu" ] 509 if [ "$IDN_LIBRARY" = "icu" ]
533 then 510 then
534 IDNA_LIBS="$ICU_FLAGS" 511 IDNA_LIBS="$ICU_FLAGS"
535 CFLAGS="$CFLAGS -DUSE_STRINGPREP_ICU" 512 CFLAGS="$CFLAGS -DUSE_STRINGPREP_ICU"
536 fi 513 fi
572 LUA_DIR=$LUA_DIR 549 LUA_DIR=$LUA_DIR
573 LUA_DIR_SET=$LUA_DIR_SET 550 LUA_DIR_SET=$LUA_DIR_SET
574 LUA_INCDIR=$LUA_INCDIR 551 LUA_INCDIR=$LUA_INCDIR
575 LUA_LIBDIR=$LUA_LIBDIR 552 LUA_LIBDIR=$LUA_LIBDIR
576 LUA_BINDIR=$LUA_BINDIR 553 LUA_BINDIR=$LUA_BINDIR
577 MULTIARCH_SUBDIR=$MULTIARCH_SUBDIR
578 REQUIRE_CONFIG=$REQUIRE_CONFIG
579 IDN_LIB=$IDN_LIB 554 IDN_LIB=$IDN_LIB
580 IDNA_LIBS=$IDNA_LIBS 555 IDNA_LIBS=$IDNA_LIBS
581 OPENSSL_LIBS=$OPENSSL_LIBS 556 OPENSSL_LIBS=$OPENSSL_LIBS
582 CFLAGS=$CFLAGS 557 CFLAGS=$CFLAGS
583 LDFLAGS=$LDFLAGS 558 LDFLAGS=$LDFLAGS