# 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
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],