diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-13 16:33:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-23 21:52:03 +0300 |
commit | 1f5a9d02c6aa41ded7dfbc0e1b1d22504f0e83fb (patch) | |
tree | 2a2cea46c0fa8076be0c9f94c13f9f07edb0cbcf /configure | |
parent | 3579235602638631f5d6e10e18567291d5de1350 (diff) | |
download | hercules-1f5a9d02c6aa41ded7dfbc0e1b1d22504f0e83fb.tar.gz hercules-1f5a9d02c6aa41ded7dfbc0e1b1d22504f0e83fb.tar.bz2 hercules-1f5a9d02c6aa41ded7dfbc0e1b1d22504f0e83fb.tar.xz hercules-1f5a9d02c6aa41ded7dfbc0e1b1d22504f0e83fb.zip |
In configure add option --enable-static
This option enable static build for server binaries and map cache.
For plugins this option enable static linking with gcc.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 128 |
1 files changed, 127 insertions, 1 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in 3a79f91. +# From configure.in 9c48781. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # @@ -626,6 +626,8 @@ LIBOBJS DLLEXT HAVE_PERL HAVE_DOXYGEN +PLUGINSTATIC +STATIC PCRE_CFLAGS PCRE_LIBS HAVE_PCRE @@ -701,6 +703,7 @@ enable_rdtsc enable_profiler enable_64bit enable_lto +enable_static enable_sanitize enable_renewal with_maxconn @@ -1352,6 +1355,8 @@ Optional Features: --disable-64bit Enforce 32bit output on x86_64 systems. --enable-lto Enables or Disables Linktime Code Optimization (LTO is enabled by default) + --enable-static Enables or Disables Statick Linking (STATIC is + disabled by default) --enable-sanitize Enables or Disables Sanitize Address Checking (SANITIZE is disabled by default) --disable-renewal Disable Ragnarok Renewal support (override settings @@ -3660,6 +3665,26 @@ fi # +# static linking +# +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; + enable_static="$enableval" + case $enableval in + "no");; + "yes");; + *) as_fn_error $? "invalid argument --enable-static=$disableval... stopping" "$LINENO" 5;; + esac + +else + enable_static="no" + +fi + + + +# # adress sanitize # # Check whether --enable-sanitize was given. @@ -7515,6 +7540,107 @@ fi + +# +# static Support test +# +if test "$enable_static" != "no" ; then + + STATIC="-static" + PLUGINSTATIC="-static-libgcc" + + OLD_CFLAGS="$CFLAGS" + OLD_LDFLAGS="$LDFLAGS" + OLD_LIBS="$LIBS" + + CFLAGS="$OLD_CFLAGS $MYSQL_CFLAGS $PCRE_CFLAGS -static" + LDFLAGS="$OLD_LDFLAGS -static" + LIBS="$OLD_LIBS $MYSQL_LIBS $PCRE_LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -static" >&5 +$as_echo_n "checking whether $CC supports -static... " >&6; } + if test "$cross_compiling" = yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: guessing no" >&5 +$as_echo "guessing no" >&6; } + STATIC="" + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int main(int argc, char **argv){ + return 0; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + STATIC="" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + CFLAGS="$OLD_CFLAGS -static-libgcc" + LDFLAGS="$OLD_LDFLAGS -static-libgcc" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -static-libgcc" >&5 +$as_echo_n "checking whether $CC supports -static-libgcc... " >&6; } + if test "$cross_compiling" = yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: guessing no" >&5 +$as_echo "guessing no" >&6; } + PLUGINSTATIC="" + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int main(int argc, char **argv){ + return 0; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PLUGINSTATIC="" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + + CFLAGS="$OLD_CFLAGS" + LDFLAGS="$OLD_LDFLAGS" + LIBS="$OLD_LIBS" +fi + +STATIC=${STATIC} + +PLUGINSTATIC=${PLUGINSTATIC} + + + + # # Doxygen, perl (for HPMHookGen) # |