From: Jason Ish Date: Fri, 6 Sep 2019 18:26:06 +0000 (-0600) Subject: geoip: add --disable-libgeoip X-Git-Tag: suricata-4.1.5~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F4179%2Fhead;p=thirdparty%2Fsuricata.git 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. --- 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