summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorHaruna <haru@dotalux.com>2014-10-23 21:24:50 +0200
committerHaruna <haru@dotalux.com>2014-10-23 21:24:50 +0200
commit32d658cc23e4f935a388876a8525ac0e7159154a (patch)
tree2a2cea46c0fa8076be0c9f94c13f9f07edb0cbcf /configure
parent3579235602638631f5d6e10e18567291d5de1350 (diff)
parent1f5a9d02c6aa41ded7dfbc0e1b1d22504f0e83fb (diff)
downloadhercules-32d658cc23e4f935a388876a8525ac0e7159154a.tar.gz
hercules-32d658cc23e4f935a388876a8525ac0e7159154a.tar.bz2
hercules-32d658cc23e4f935a388876a8525ac0e7159154a.tar.xz
hercules-32d658cc23e4f935a388876a8525ac0e7159154a.zip
Merge pull request #347 from 4144/static
In configure add option --enable-static
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure128
1 files changed, 127 insertions, 1 deletions
diff --git a/configure b/configure
index 815b7d21a..33184288b 100755
--- a/configure
+++ b/configure
@@ -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)
#