Permalink
Browse files

Override PKG_CONFIG sooner

We need to override PKG_CONFIG before any calls to PKG_PROG_PKG_CONFIG

(cherry picked from commit a49b335)

Conflicts:
	configure.ac
  • Loading branch information...
1 parent b418d52 commit 705a73f34f1c963c1b96d3fcb0b2f74260e31204 @rubenk rubenk committed Jan 13, 2015
Showing with 16 additions and 16 deletions.
  1. +16 −16 configure.ac
View
@@ -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
@@ -194,24 +208,10 @@ PDNS_ENABLE_PKCS11
PDNS_WITH_CRYPTOPP
PDNS_ENABLE_REMOTEBACKEND_ZEROMQ
-AC_MSG_CHECKING([whether we should build static binaries])
-AC_ARG_ENABLE([static-binaries],
- [AS_HELP_STRING([--enable-static-binaries],[build static binaries])],
- [case "${enableval}" in
- yes) static=true ;;
- no) static=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-static-binaries) ;;
- esac],
- [debug=false]
-)
-AC_MSG_RESULT([$static])
-
-AM_CONDITIONAL([ALLSTATIC], [test "x$static" = "xtrue"])
-
-if test "x$static" = "xtrue"; then
+AS_IF([test "x$static" != "xno"], [
LDFLAGS="-all-static $LDFLAGS"
-fi
+])
modules="bind gmysql geo random"
AC_ARG_WITH([modules],

0 comments on commit 705a73f

Please sign in to comment.