]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
geoip: add --disable-libgeoip 4179/head
authorJason Ish <jason.ish@oisf.net>
Fri, 6 Sep 2019 18:26:06 +0000 (12:26 -0600)
committerJason Ish <jason.ish@oisf.net>
Fri, 6 Sep 2019 18:26:06 +0000 (12:26 -0600)
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

index b7690c6141b4ad9eb0a03032413aa5fd5a9571a1..41f52625be4fb2a1556f405f5748148f376358b9 100644 (file)
                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"])
         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