From c55226b7126079d78e4bf5c6fc290242001954a6 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Fri, 6 Sep 2019 12:26:06 -0600 Subject: [PATCH] geoip: add --disable-libgeoip Add ./configure argument --disable-libgeoip to disable libgeoip when --enable-geoip is requested. This will allow libmaxminddb to be picked up instead of libgeoip when both are installed on the system. --- configure.ac | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b7690c6141..41f52625be 100644 --- a/configure.ac +++ b/configure.ac @@ -2037,6 +2037,9 @@ AS_HELP_STRING([--enable-geoip],[Enable GeoIP support]), [ enable_geoip="yes"], [ enable_geoip="no"]) + AC_ARG_ENABLE(libgeoip, + AS_HELP_STRING([--disable-libgeoip], [Disable libgeoip support]), + [enable_libgeoip="$enableval"], [enable_libgeoip=yes]) AC_ARG_WITH(libgeoip_includes, [ --with-libgeoip-includes=DIR libgeoip include directory], [with_libgeoip_includes="$withval"],[with_libgeoip_includes="no"]) @@ -2057,7 +2060,11 @@ if test "$with_libmaxminddb_includes" != "no"; then CPPFLAGS="${CPPFLAGS} -I${with_libmaxminddb_includes}" fi - AC_CHECK_HEADER(GeoIP.h,GEOIP="yes",GEOIP="no") + if test "$enable_libgeoip" != "no"; then + AC_CHECK_HEADER(GeoIP.h,GEOIP="yes",GEOIP="no") + else + GEOIP="no" + fi if test "$GEOIP" = "no"; then AC_CHECK_HEADER(maxminddb.h,GEOIP="yes",GEOIP="no") if test "$GEOIP" = "yes"; then -- 2.47.2