]> granicus.if.org Git - pdns/commitdiff
Override PKG_CONFIG sooner
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 13 Jan 2015 12:09:49 +0000 (13:09 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 13 Jan 2015 12:35:23 +0000 (13:35 +0100)
We need to override PKG_CONFIG before any calls to PKG_PROG_PKG_CONFIG

configure.ac

index cec49c3ed9a040bef77e835244b8c1a28911b3be..7f05c0af4dbd9ea9c6b9ceb65c9c713948388d1f 100644 (file)
@@ -60,6 +60,20 @@ AM_CONDITIONAL([RELEASE_BUILD], [test "$PACKAGE_VERSION" != "git"])
 # We use this to search for other libraries.
 eval full_libdir="\"$libdir\""
 
+# check if we want a static build
+AC_MSG_CHECKING([whether we will be building static binaries])
+
+AC_ARG_ENABLE([static-binaries],
+  [AS_HELP_STRING([--enable-static-binaries],[build static binaries @<:@default=no@:>@])],
+  [static=$enableval],
+  [static=no],
+)
+AC_MSG_RESULT([$static])
+
+AS_IF([test "x$static" != "xno"], [
+  PKG_CONFIG="$PKG_CONFIG --static"
+])
+
 # detect pkg-config explicitly
 PKG_PROG_PKG_CONFIG
 
@@ -162,17 +176,9 @@ PDNS_WITH_CRYPTOPP
 PDNS_ENABLE_ED25519
 PDNS_ENABLE_REMOTEBACKEND_ZEROMQ
 
-AC_MSG_CHECKING([whether we will be building static binaries])
-
-AC_ARG_ENABLE([static-binaries],
-  [AS_HELP_STRING([--enable-static-binaries],[build static binaries @<:@default=no@:>@])],
-  [static=$enableval],
-  [static=no],
-)
-AC_MSG_RESULT([$static])
-AS_IF([test "x$static" != "xno"],
-  [LDFLAGS="-all-static $LDFLAGS"]
-)
+AS_IF([test "x$static" != "xno"], [
+  LDFLAGS="-all-static $LDFLAGS"
+])
 
 modules="bind gmysql geo random"
 AC_ARG_WITH([modules],