]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Add new configure option `--enable-fully-static` to enable full static build if
authorGeorge Thessalonikefs <george@nlnetlabs.nl>
Wed, 23 Oct 2019 12:40:24 +0000 (14:40 +0200)
committerGeorge Thessalonikefs <george@nlnetlabs.nl>
Wed, 23 Oct 2019 14:10:07 +0000 (16:10 +0200)
requested; in relation to #91.

configure
configure.ac
doc/Changelog

index 4e222879ee94c65fe8d7473f8daf3fcae970b454..76909d289a98e4c6332ef8e3e6d97800c5679ee8 100755 (executable)
--- a/configure
+++ b/configure
@@ -872,6 +872,7 @@ with_libevent
 with_libexpat
 with_libhiredis
 enable_static_exe
+enable_fully_static
 enable_lock_checks
 enable_allsymbols
 enable_dnstap
@@ -1559,7 +1560,8 @@ Optional Features:
   --enable-tfo-client     Enable TCP Fast Open for client mode
   --enable-tfo-server     Enable TCP Fast Open for server mode
   --enable-static-exe     enable to compile executables statically against
-                          (event) libs, for debug purposes
+                          (event) uninstalled libs, for debug purposes
+  --enable-fully-static   enable to compile fully static
   --enable-lock-checks    enable to check lock and unlock calls, for debug
                           purposes
   --enable-allsymbols     export all symbols from libunbound and link binaries
@@ -19394,7 +19396,7 @@ _ACEOF
 
 fi
 
-# set static linking if requested
+# set static linking for uninstalled libraries if requested
 
 staticexe=""
 # Check whether --enable-static-exe was given.
@@ -19416,6 +19418,25 @@ if test x_$enable_static_exe = x_yes; then
        fi
 fi
 
+# set full static linking if requested
+# Check whether --enable-fully-static was given.
+if test "${enable_fully_static+set}" = set; then :
+  enableval=$enable_fully_static;
+fi
+
+if test x_$enable_fully_static = x_yes; then
+       staticexe="-all-static"
+       if test "$on_mingw" = yes; then
+               # for static compile, include gdi32 and zlib here.
+               if echo $LIBS | grep 'lgdi32' >/dev/null; then
+                       :
+               else
+                       LIBS="$LIBS -lgdi32"
+               fi
+               LIBS="$LIBS -lz"
+       fi
+fi
+
 # set lock checking if requested
 # Check whether --enable-lock_checks was given.
 if test "${enable_lock_checks+set}" = set; then :
index 216a78c65fa526d289657c54cb614d9947d4cf9e..c23ba244e54b4278d65eeb36660f8024711d3ba8 100644 (file)
@@ -1299,11 +1299,11 @@ if test x_$withval = x_yes -o x_$withval != x_no; then
     ])
 fi
 
-# set static linking if requested
+# set static linking for uninstalled libraries if requested
 AC_SUBST(staticexe)
 staticexe=""
 AC_ARG_ENABLE(static-exe, AC_HELP_STRING([--enable-static-exe],
-       [ enable to compile executables statically against (event) libs, for debug purposes ]), 
+       [ enable to compile executables statically against (event) uninstalled libs, for debug purposes ]),
        , )
 if test x_$enable_static_exe = x_yes; then
        staticexe="-static"
@@ -1319,6 +1319,23 @@ if test x_$enable_static_exe = x_yes; then
        fi
 fi
 
+# set full static linking if requested
+AC_ARG_ENABLE(fully-static, AC_HELP_STRING([--enable-fully-static],
+       [ enable to compile fully static ]),
+       , )
+if test x_$enable_fully_static = x_yes; then
+       staticexe="-all-static"
+       if test "$on_mingw" = yes; then
+               # for static compile, include gdi32 and zlib here.
+               if echo $LIBS | grep 'lgdi32' >/dev/null; then
+                       :
+               else
+                       LIBS="$LIBS -lgdi32"
+               fi
+               LIBS="$LIBS -lz"
+       fi
+fi
+
 # set lock checking if requested
 AC_ARG_ENABLE(lock_checks, AC_HELP_STRING([--enable-lock-checks],
        [ enable to check lock and unlock calls, for debug purposes ]), 
index 30073dfb8e89f5c217ddbf8923825d9e35a69d8e..11f59f42f3c65a3615619ffaedd85b7358023bfc 100644 (file)
@@ -1,3 +1,7 @@
+23 October 2019: George
+       - Add new configure option `--enable-fully-static` to enable full static
+         build if requested; in relation to #91.
+
 23 October 2019: Wouter
        - Merge #97: manpage: Add missing word on unbound.conf,
          from Erethon.