]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
use configure --enable-geoip to turn on GeoIP2
authorEvan Hunt <each@isc.org>
Fri, 28 Jun 2019 04:19:30 +0000 (21:19 -0700)
committerEvan Hunt <each@isc.org>
Thu, 4 Jul 2019 15:58:25 +0000 (08:58 -0700)
- instead of --with-geoip2, use --enable-geoip to turn on the GeoIP
  feature
- --with-maxminddb can be used to set the prefix for maxminddb

CHANGES
configure
configure.ac
doc/arm/notes.xml

diff --git a/CHANGES b/CHANGES
index c280ff44dd204e1dbf2a12d2e90e4b94e93ab4af..1474ddd9b591bf555c4629c577e18fc0a5cf9015 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -11,7 +11,7 @@
 5258.  [func]          Added support for the GeoIP2 API from MaxMind. This
                        will be compiled in by default if the "libmaxminddb"
                        library is found at compile time, but can be
-                       suppressed using "configure --without-geoip2".
+                       suppressed using "configure --disable-geoip".
 
                        Certain geoip ACL settings that were available with
                        legacy GeoIP are not available when using GeoIP2.
index c42dce3a31715e2d7097da856fe656d5884a69b0..883b2c3aa8f9cdd57ff8d0780f79a2d4e92ac619 100755 (executable)
--- a/configure
+++ b/configure
@@ -850,7 +850,6 @@ infodir
 docdir
 oldincludedir
 includedir
-runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -904,6 +903,8 @@ enable_kqueue
 enable_epoll
 enable_devpoll
 with_geoip2
+enable_geoip
+with_maxminddb
 with_locktype
 with_libtool
 enable_pthread_rwlock
@@ -1017,7 +1018,6 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1270,15 +1270,6 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
-  -runstatedir | --runstatedir | --runstatedi | --runstated \
-  | --runstate | --runstat | --runsta | --runst | --runs \
-  | --run | --ru | --r)
-    ac_prev=runstatedir ;;
-  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
-  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
-  | --run=* | --ru=* | --r=*)
-    runstatedir=$ac_optarg ;;
-
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1416,7 +1407,7 @@ fi
 for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
                datadir sysconfdir sharedstatedir localstatedir includedir \
                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-               libdir localedir mandir runstatedir
+               libdir localedir mandir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1569,7 +1560,6 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1624,6 +1614,8 @@ Optional Features:
   --enable-kqueue         use BSD kqueue when available [default=yes]
   --enable-epoll          use Linux epoll when available [default=auto]
   --enable-devpoll        use /dev/poll when available [default=yes]
+  --disable-geoip         support GeoIP2 geolocation ACLs if available
+                          [default=yes]
   --enable-pthread-rwlock use pthread rwlock instead of internal rwlock
                           implementation (EXPERIMENTAL)
   --enable-fips-mode      enable FIPS mode in OpenSSL library [default=no]
@@ -1660,7 +1652,8 @@ Optional Packages:
   --with-python=PATH      specify path to Python interpreter
   --with-python-install-dir=PATH
                           installation directory for Python modules
-  --with-geoip2=PATH      Build with MaxMind GeoIP2 support (auto|yes|no|path)
+  --with-geoip2           deprecated, use --with-maxminddb
+  --with-maxminddb=PATH   Build with MaxMind GeoIP2 support (auto|yes|no|path)
                           [default=auto]
   --with-locktype=ARG     Specify mutex lock type (adaptive or standard)
   --with-libtool          use GNU libtool
@@ -4005,7 +3998,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
                       && LARGE_OFF_T % 2147483647 == 1)
                      ? 1 : -1];
@@ -4051,7 +4044,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
                       && LARGE_OFF_T % 2147483647 == 1)
                      ? 1 : -1];
@@ -4075,7 +4068,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
                       && LARGE_OFF_T % 2147483647 == 1)
                      ? 1 : -1];
@@ -4120,7 +4113,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
                       && LARGE_OFF_T % 2147483647 == 1)
                      ? 1 : -1];
@@ -4144,7 +4137,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
                       && LARGE_OFF_T % 2147483647 == 1)
                      ? 1 : -1];
@@ -14444,21 +14437,41 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 #
 # GeoIP support?
 #
+# Should be on by default if libmaxminddb exists.
+#
 
 # Check whether --with-geoip2 was given.
 if test "${with_geoip2+set}" = set; then :
-  withval=$with_geoip2;
+  withval=$with_geoip2; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-geoip2 is DEPRECATED and will be removed in a future release, use --with-maxminddb instead" >&5
+$as_echo "$as_me: WARNING: --with-geoip2 is DEPRECATED and will be removed in a future release, use --with-maxminddb instead" >&2;}
 else
   with_geoip2="auto"
 fi
 
 
-# --with-geoip2 should be turned on by default if the library exists.
+# Check whether --enable-geoip was given.
+if test "${enable_geoip+set}" = set; then :
+  enableval=$enable_geoip;
+else
+  enable_geoip="yes"
+fi
+
+
+
+# Check whether --with-maxminddb was given.
+if test "${with_maxminddb+set}" = set; then :
+  withval=$with_maxminddb;
+else
+  with_maxminddb="$with_geoip2"
+fi
+
+
 GEOIP2LINKSRCS=
 GEOIP2LINKOBJS=
-case $with_geoip2 in #(
+if test "$enable_geoip" = "yes"; then :
+  case $with_maxminddb in #(
   no) :
-     ;; #(
+    as_fn_error $? "Use '--disable-geoip' to disable the GeoIP" "$LINENO" 5 ;; #(
   auto) :
 
 pkg_failed=no
@@ -14555,8 +14568,8 @@ MAXMINDDB_PREFIX=$pkg_cv_MAXMINDDB_PREFIX
 if test "x$MAXMINDDB_PREFIX" = x""; then :
   as_fn_error $? "libmaxminddb prefix not found in pkg-config; set MAXMINDDB_PREFIX in the environment" "$LINENO" 5
 fi
-                                      GEOIP2LINKSRCS='${GEOIP2LINKSRCS}'
-                                      GEOIP2LINKOBJS='${GEOIP2LINKOBJS}'
+                                         GEOIP2LINKSRCS='${GEOIP2LINKSRCS}'
+                                         GEOIP2LINKOBJS='${GEOIP2LINKOBJS}'
 
 fi ;; #(
   yes) :
@@ -14675,87 +14688,87 @@ MAXMINDDB_PREFIX=$pkg_cv_MAXMINDDB_PREFIX
 if test "x$MAXMINDDB_PREFIX" = x""; then :
   as_fn_error $? "libmaxminddb prefix not found in pkg-config; set MAXMINDDB_PREFIX in the environment" "$LINENO" 5
 fi
-                                      GEOIP2LINKSRCS='${GEOIP2LINKSRCS}'
-                                      GEOIP2LINKOBJS='${GEOIP2LINKOBJS}'
+                                        GEOIP2LINKSRCS='${GEOIP2LINKSRCS}'
+                                        GEOIP2LINKOBJS='${GEOIP2LINKOBJS}'
 
 fi ;; #(
   *) :
      # default
 
 
-  CCASFLAGS_geoip2_ax_save_flags=$CCASFLAGS
+  CCASFLAGS_maxminddb_ax_save_flags=$CCASFLAGS
 
 
 
-  CFLAGS_geoip2_ax_save_flags=$CFLAGS
+  CFLAGS_maxminddb_ax_save_flags=$CFLAGS
 
 
 
-  CPPFLAGS_geoip2_ax_save_flags=$CPPFLAGS
+  CPPFLAGS_maxminddb_ax_save_flags=$CPPFLAGS
 
 
 
-  CXXFLAGS_geoip2_ax_save_flags=$CXXFLAGS
+  CXXFLAGS_maxminddb_ax_save_flags=$CXXFLAGS
 
 
 
-  ERLCFLAGS_geoip2_ax_save_flags=$ERLCFLAGS
+  ERLCFLAGS_maxminddb_ax_save_flags=$ERLCFLAGS
 
 
 
-  FCFLAGS_geoip2_ax_save_flags=$FCFLAGS
+  FCFLAGS_maxminddb_ax_save_flags=$FCFLAGS
 
 
 
-  FCLIBS_geoip2_ax_save_flags=$FCLIBS
+  FCLIBS_maxminddb_ax_save_flags=$FCLIBS
 
 
 
-  FFLAGS_geoip2_ax_save_flags=$FFLAGS
+  FFLAGS_maxminddb_ax_save_flags=$FFLAGS
 
 
 
-  FLIBS_geoip2_ax_save_flags=$FLIBS
+  FLIBS_maxminddb_ax_save_flags=$FLIBS
 
 
 
-  GCJFLAGS_geoip2_ax_save_flags=$GCJFLAGS
+  GCJFLAGS_maxminddb_ax_save_flags=$GCJFLAGS
 
 
 
-  JAVACFLAGS_geoip2_ax_save_flags=$JAVACFLAGS
+  JAVACFLAGS_maxminddb_ax_save_flags=$JAVACFLAGS
 
 
 
-  LDFLAGS_geoip2_ax_save_flags=$LDFLAGS
+  LDFLAGS_maxminddb_ax_save_flags=$LDFLAGS
 
 
 
-  LIBS_geoip2_ax_save_flags=$LIBS
+  LIBS_maxminddb_ax_save_flags=$LIBS
 
 
 
-  OBJCFLAGS_geoip2_ax_save_flags=$OBJCFLAGS
+  OBJCFLAGS_maxminddb_ax_save_flags=$OBJCFLAGS
 
 
 
-  OBJCXXFLAGS_geoip2_ax_save_flags=$OBJCXXFLAGS
+  OBJCXXFLAGS_maxminddb_ax_save_flags=$OBJCXXFLAGS
 
 
 
-  UPCFLAGS_geoip2_ax_save_flags=$UPCFLAGS
+  UPCFLAGS_maxminddb_ax_save_flags=$UPCFLAGS
 
 
 
-  VALAFLAGS_geoip2_ax_save_flags=$VALAFLAGS
+  VALAFLAGS_maxminddb_ax_save_flags=$VALAFLAGS
 
 
 
-           MAXMINDDB_CFLAGS="-I$with_geoip2/include"
-           MAXMINDDB_LIBS="-L$with_geoip2/libs"
-           CFLAGS="$CFLAGS $MAXMINDDB_CFLAGS"
-           LDFLAGS="$LDFLAGS $MAXMINDDB_LIBS"
-           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MMDB_open" >&5
+                  MAXMINDDB_CFLAGS="-I$with_maxminddb/include"
+                  MAXMINDDB_LIBS="-L$with_maxminddb/libs"
+                  CFLAGS="$CFLAGS $MAXMINDDB_CFLAGS"
+                  LDFLAGS="$LDFLAGS $MAXMINDDB_LIBS"
+                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MMDB_open" >&5
 $as_echo_n "checking for library containing MMDB_open... " >&6; }
 if ${ac_cv_search_MMDB_open+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -14811,21 +14824,23 @@ if test "$ac_res" != no; then :
 
 $as_echo "#define HAVE_GEOIP2 1" >>confdefs.h
 
-                           GEOIP2LINKSRCS='${GEOIP2LINKSRCS}'
-                           GEOIP2LINKOBJS='${GEOIP2LINKOBJS}'
-                           MAXMINDDB_LIBS="$MAXMINDDB_LIBS $ac_cv_search_mmdb_open"
-                           { $as_echo "$as_me:${as_lineno-$LINENO}: GeoIP2 default database path set to $with_geoip2/share/GeoIP" >&5
-$as_echo "$as_me: GeoIP2 default database path set to $with_geoip2/share/GeoIP" >&6;}
-                           eval MAXMINDDB_PREFIX=\$$with_geoip2
+                                  GEOIP2LINKSRCS='${GEOIP2LINKSRCS}'
+                                  GEOIP2LINKOBJS='${GEOIP2LINKOBJS}'
+                                  MAXMINDDB_LIBS="$MAXMINDDB_LIBS $ac_cv_search_mmdb_open"
+                                  { $as_echo "$as_me:${as_lineno-$LINENO}: GeoIP2 default database path set to $with_maxminddb/share/GeoIP" >&5
+$as_echo "$as_me: GeoIP2 default database path set to $with_maxminddb/share/GeoIP" >&6;}
+                                  eval MAXMINDDB_PREFIX=\$$with_maxminddb
 
 else
   as_fn_error $? "GeoIP2 requested, but libmaxminddb not found" "$LINENO" 5
 fi
 
-        ;;
+               ;;
 esac
 
 
+fi
+
 
 
 
@@ -25473,7 +25488,7 @@ report() {
     test "large" = "$use_tuning" && echo "    Large-system tuning (--with-tuning)"
     test "no" = "$use_dnstap" || \
            echo "    Allow 'dnstap' packet logging (--enable-dnstap)"
-    test -z "$MAXMINDDB_LIBS" || echo "    GeoIP2 access control (--with-geoip2)"
+    test -z "$MAXMINDDB_LIBS" || echo "    GeoIP2 access control (--enable-geoip)"
     test "no" = "$use_gssapi" || echo "    GSS-API (--with-gssapi)"
     if test "yes" = "$enable_full_report" -o "aes" != "$with_cc_alg"; then
        echo "        Algorithm: $with_cc_alg"
@@ -25537,7 +25552,7 @@ report() {
 
     test "no" = "$use_dnstap" && \
            echo "    Allow 'dnstap' packet logging (--enable-dnstap)"
-    test -z "$MAXMINDDB_LIBS" && echo "    GeoIP2 access control (--with-geoip2)"
+    test -z "$MAXMINDDB_LIBS" && echo "    GeoIP2 access control (--enable-geoip)"
     test "no" = "$use_gssapi" && echo "    GSS-API (--with-gssapi)"
 
     test "no" = "$enable_dnsrps" && \
index 4cbda235e4b9342e816fa0379aa2cccc592b95f5..d94c654e925db224d9ba6161bb4881c5274617a2 100644 (file)
@@ -510,51 +510,65 @@ AC_C_BIGENDIAN
 #
 # GeoIP support?
 #
+# Should be on by default if libmaxminddb exists.
+#
 AC_ARG_WITH([geoip2],
-           [AS_HELP_STRING([--with-geoip2=PATH],
+           [AS_HELP_STRING([--with-geoip2],
+                           [deprecated, use --with-maxminddb])],
+           [AC_MSG_WARN([--with-geoip2 is DEPRECATED and will be removed in a future release, use --with-maxminddb instead])],
+           [with_geoip2="auto"])
+
+AC_ARG_ENABLE([geoip],
+             [AS_HELP_STRING([--disable-geoip],
+                             [support GeoIP2 geolocation ACLs if available [default=yes]])],
+             [], [enable_geoip="yes"])
+
+AC_ARG_WITH([maxminddb],
+           [AS_HELP_STRING([--with-maxminddb=PATH],
                            [Build with MaxMind GeoIP2 support (auto|yes|no|path) [default=auto]])],
-           [], with_geoip2="auto")
+           [], [with_maxminddb="$with_geoip2"])
 
-# --with-geoip2 should be turned on by default if the library exists.
 GEOIP2LINKSRCS=
 GEOIP2LINKOBJS=
-AS_CASE([$with_geoip2],
-       [no],[],
-       [auto],[PKG_CHECK_MODULES([MAXMINDDB], [libmaxminddb],
-                                     [AC_DEFINE([HAVE_GEOIP2], [1], [Build with GeoIP2 support])
-                                      PKG_CHECK_VAR([MAXMINDDB_PREFIX], [libmaxminddb], [prefix], [], [AC_MSG_ERROR([libmaxminddb prefix not found in pkg-config; set MAXMINDDB_PREFIX in the environment])])
-                                      GEOIP2LINKSRCS='${GEOIP2LINKSRCS}'
-                                      GEOIP2LINKOBJS='${GEOIP2LINKOBJS}'
-                                     ],[:])],
-       [yes],[PKG_CHECK_MODULES([MAXMINDDB], [libmaxminddb],
-                                     [AC_DEFINE([HAVE_GEOIP2], [1], [Build with GeoIP2 support])
-                                      PKG_CHECK_VAR([MAXMINDDB_PREFIX], [libmaxminddb], [prefix], [], [AC_MSG_ERROR([libmaxminddb prefix not found in pkg-config; set MAXMINDDB_PREFIX in the environment])])
-                                      GEOIP2LINKSRCS='${GEOIP2LINKSRCS}'
-                                      GEOIP2LINKOBJS='${GEOIP2LINKOBJS}'
-                                     ])],
-       [ # default
-           AX_SAVE_FLAGS([geoip2])
-           MAXMINDDB_CFLAGS="-I$with_geoip2/include"
-           MAXMINDDB_LIBS="-L$with_geoip2/libs"
-           CFLAGS="$CFLAGS $MAXMINDDB_CFLAGS"
-           LDFLAGS="$LDFLAGS $MAXMINDDB_LIBS"
-           AC_SEARCH_LIBS([MMDB_open], [maxminddb],
-                          [AC_DEFINE([HAVE_GEOIP2], [1], [Build with GeoIP2 support])
-                           GEOIP2LINKSRCS='${GEOIP2LINKSRCS}'
-                           GEOIP2LINKOBJS='${GEOIP2LINKOBJS}'
-                           MAXMINDDB_LIBS="$MAXMINDDB_LIBS $ac_cv_search_mmdb_open"
-                           AC_MSG_NOTICE([GeoIP2 default database path set to $with_geoip2/share/GeoIP])
-                           AS_VAR_COPY([MAXMINDDB_PREFIX], [$with_geoip2])
-                          ],
-                          [AC_MSG_ERROR([GeoIP2 requested, but libmaxminddb not found])])
-       ])
-AC_ARG_VAR([MAXMINDDB_PREFIX], [value of prefix for MAXMINDDB, overriding pkg-config])
+AS_IF([test "$enable_geoip" = "yes"],
+      [AS_CASE([$with_maxminddb],
+              [no],[AC_MSG_ERROR([Use '--disable-geoip' to disable the GeoIP])],
+              [auto],[PKG_CHECK_MODULES([MAXMINDDB], [libmaxminddb],
+                                        [AC_DEFINE([HAVE_GEOIP2], [1], [Build with GeoIP2 support])
+                                         PKG_CHECK_VAR([MAXMINDDB_PREFIX], [libmaxminddb], [prefix], [], [AC_MSG_ERROR([libmaxminddb prefix not found in pkg-config; set MAXMINDDB_PREFIX in the environment])])
+                                         GEOIP2LINKSRCS='${GEOIP2LINKSRCS}'
+                                         GEOIP2LINKOBJS='${GEOIP2LINKOBJS}'
+                                        ],[:])],
+              [yes],[PKG_CHECK_MODULES([MAXMINDDB], [libmaxminddb],
+                                       [AC_DEFINE([HAVE_GEOIP2], [1], [Build with GeoIP2 support])
+                                        PKG_CHECK_VAR([MAXMINDDB_PREFIX], [libmaxminddb], [prefix], [], [AC_MSG_ERROR([libmaxminddb prefix not found in pkg-config; set MAXMINDDB_PREFIX in the environment])])
+                                        GEOIP2LINKSRCS='${GEOIP2LINKSRCS}'
+                                        GEOIP2LINKOBJS='${GEOIP2LINKOBJS}'
+                                       ])],
+              [ # default
+                  AX_SAVE_FLAGS([maxminddb])
+                  MAXMINDDB_CFLAGS="-I$with_maxminddb/include"
+                  MAXMINDDB_LIBS="-L$with_maxminddb/libs"
+                  CFLAGS="$CFLAGS $MAXMINDDB_CFLAGS"
+                  LDFLAGS="$LDFLAGS $MAXMINDDB_LIBS"
+                  AC_SEARCH_LIBS([MMDB_open], [maxminddb],
+                                 [AC_DEFINE([HAVE_GEOIP2], [1], [Build with GeoIP2 support])
+                                  GEOIP2LINKSRCS='${GEOIP2LINKSRCS}'
+                                  GEOIP2LINKOBJS='${GEOIP2LINKOBJS}'
+                                  MAXMINDDB_LIBS="$MAXMINDDB_LIBS $ac_cv_search_mmdb_open"
+                                  AC_MSG_NOTICE([GeoIP2 default database path set to $with_maxminddb/share/GeoIP])
+                                  AS_VAR_COPY([MAXMINDDB_PREFIX], [$with_maxminddb])
+                                 ],
+                                 [AC_MSG_ERROR([GeoIP2 requested, but libmaxminddb not found])])
+              ])
+       AC_ARG_VAR([MAXMINDDB_PREFIX], [value of prefix for MAXMINDDB, overriding pkg-config])
+])
+
 AC_SUBST([MAXMINDDB_CFLAGS])
 AC_SUBST([MAXMINDDB_LIBS])
 AC_SUBST([GEOIP2LINKSRCS])
 AC_SUBST([GEOIP2LINKOBJS])
 
-
 #
 # Do we have arc4random(), etc ?
 #
@@ -2906,7 +2920,7 @@ report() {
     test "large" = "$use_tuning" && echo "    Large-system tuning (--with-tuning)"
     test "no" = "$use_dnstap" || \
            echo "    Allow 'dnstap' packet logging (--enable-dnstap)"
-    test -z "$MAXMINDDB_LIBS" || echo "    GeoIP2 access control (--with-geoip2)"
+    test -z "$MAXMINDDB_LIBS" || echo "    GeoIP2 access control (--enable-geoip)"
     test "no" = "$use_gssapi" || echo "    GSS-API (--with-gssapi)"
     if test "yes" = "$enable_full_report" -o "aes" != "$with_cc_alg"; then
        echo "        Algorithm: $with_cc_alg"
@@ -2970,7 +2984,7 @@ report() {
 
     test "no" = "$use_dnstap" && \
            echo "    Allow 'dnstap' packet logging (--enable-dnstap)"
-    test -z "$MAXMINDDB_LIBS" && echo "    GeoIP2 access control (--with-geoip2)"
+    test -z "$MAXMINDDB_LIBS" && echo "    GeoIP2 access control (--enable-geoip)"
     test "no" = "$use_gssapi" && echo "    GSS-API (--with-gssapi)"
 
     test "no" = "$enable_dnsrps" && \
index d9ab62be439216cc5bb50420e582e27361841ee9..4a4cfbd5e2c644bc15571be3bda7706e24d17020 100644 (file)
          The GeoIP2 API from MaxMind is now supported. Geolocation support
          will be compiled in by default if the <command>libmaxminddb</command>
          library is found at compile time, but can be turned off by using
-         <command>configure --without-geoip2</command>.
+         <command>configure --disable-geoip</command>.
        </para>
        <para>
          The default path to the GeoIP2 databases will be set based