Skip to content

Commit

Permalink
* Removing Maxmind GeoIP v1 support (1)
Browse files Browse the repository at this point in the history
  • Loading branch information
paololucente committed Jun 23, 2023
1 parent 7e4b440 commit 1d8d4e7
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 51 deletions.
24 changes: 0 additions & 24 deletions QUICKSTART
Original file line number Diff line number Diff line change
Expand Up @@ -2668,30 +2668,6 @@ dst_host_coords. Pre-requisite for the feature to work are: a) a working
installed Maxmind GeoIP library and headers and b) a Maxmind GeoIP database
(freely available). Two steps to quickly start with GeoIP lookups in pmacct:

GeoIP v1 (libGeoIP):
* Have libGeoIP library and headers available to compile against; have a GeoIP
database also available: http://dev.maxmind.com/geoip/legacy/install/country/

* To compile the pmacct package with support for GeoIP lookups, the code must
be configured for compilation as follows:

shell> ./configure --enable-geoip [ ... ]

But, for example, should you have installed libGeoIP in /usr/local/geoip and
pkg-config is unable to help, you can supply this non-default location as
follows (assuming you are running the bash shell):

shell> export GEOIP_LIBS="-L/usr/local/geoip/lib -lgeoip"
shell> export GEOIP_CFLAGS="-I/usr/local/geoip/include"
shell> ./configure --enable-geoip [ ... ]

* Include as part of the pmacct configuration the following fragment:

...
geoip_ipv4_file: /path/to/GeoIP/GeoIP.dat
aggregate: src_host_country, dst_host_country, ...
...

GeoIP v2 (libmaxminddb):
* Have libmaxminddb library and headers to compile against, available at:
https://github.com/maxmind/libmaxminddb/releases ; have also a database
Expand Down
2 changes: 0 additions & 2 deletions bin/configure-help-replace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
REDIS_LIBS linker flags for REDIS, overriding pkg-config
GNUTLS_CFLAGS C compiler flags for GNUTLS, overriding pkg-config
GNUTLS_LIBS linker flags for GNUTLS, overriding pkg-config
GEOIP_CFLAGS C compiler flags for GEOIP, overriding pkg-config
GEOIP_LIBS linker flags for GEOIP, overriding pkg-config
GEOIPV2_CFLAGS C compiler flags for GEOIPV2, overriding pkg-config
GEOIPV2_LIBS linker flags for GEOIPV2, overriding pkg-config
JANSSON_CFLAGS C compiler flags for JANSSON, overriding pkg-config
Expand Down
24 changes: 0 additions & 24 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -719,30 +719,6 @@ AC_ARG_ENABLE(gnutls,
)
dnl finish: GnuTLS handling

dnl start: geoip handling
AC_MSG_CHECKING(whether to enable GeoIP support)
AC_ARG_ENABLE(geoip,
[ --enable-geoip Enable GeoIP support (default: no)],
[ case "$enableval" in
yes)
AC_MSG_RESULT(yes)
dnl reasonably old Maxmind GeoIP v1 already support pkg-config
PKG_CHECK_MODULES([GEOIP], [geoip >= 1.0.0], [
SUPPORTS="${SUPPORTS} geoip"
USING_MMGEOIP="yes"
PMACCT_CFLAGS="$PMACCT_CFLAGS $GEOIP_CFLAGS"
AC_DEFINE(WITH_GEOIP, 1)
])
;;
no)
AC_MSG_RESULT(no)
;;
esac ],
[
AC_MSG_RESULT(no)
]
)

AC_MSG_CHECKING(whether to enable GeoIPv2 (libmaxminddb) support)
AC_ARG_ENABLE(geoipv2,
[ --enable-geoipv2 Enable GeoIPv2 (libmaxminddb) support (default: no)],
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sbin_PROGRAMS =
bin_PROGRAMS =
EXTRA_PROGRAMS =

AM_LDFLAGS = @GEOIP_LIBS@ @GEOIPV2_LIBS@
AM_LDFLAGS = @GEOIPV2_LIBS@
if WITH_JANSSON
AM_LDFLAGS += @JANSSON_LIBS@
endif
Expand Down

0 comments on commit 1d8d4e7

Please sign in to comment.