mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-03-15 06:48:10 +08:00
occtl: use maxminddb when available
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
This commit is contained in:
18
configure.ac
18
configure.ac
@@ -163,13 +163,28 @@ if test "$test_for_libnl" = yes;then
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(maxmind,
|
||||
AS_HELP_STRING([--without-maxmind], [do not try to use the maxmind library]),
|
||||
test_for_maxmind=$withval,
|
||||
test_for_maxmind=yes)
|
||||
|
||||
have_maxmind=no
|
||||
if test "$test_for_maxmind" = yes;then
|
||||
PKG_CHECK_MODULES(MAXMIND, libmaxminddb >= 1.0.0, [have_maxmind=yes], [have_maxmind=no])
|
||||
if test "$have_maxmind" = yes;then
|
||||
AC_DEFINE(HAVE_MAXMIND, 1, [have libmaxminddb])
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_MAXMIND, test "x$have_maxmind" != xno)
|
||||
|
||||
AC_ARG_WITH(geoip,
|
||||
AS_HELP_STRING([--without-geoip], [do not try to use the geoip library]),
|
||||
test_for_geoip=$withval,
|
||||
test_for_geoip=yes)
|
||||
|
||||
have_geoip=no
|
||||
if test "$test_for_geoip" = yes;then
|
||||
if test "$test_for_geoip" = yes && test "$have_maxmind" != yes;then
|
||||
PKG_CHECK_MODULES(GEOIP, geoip >= 1.6.0, [have_geoip=yes], [have_geoip=no])
|
||||
if test "$have_geoip" = yes;then
|
||||
AC_DEFINE(HAVE_GEOIP, 1, [have libgeoip])
|
||||
@@ -601,6 +616,7 @@ Summary of build options:
|
||||
libnl3: ${have_libnl3}
|
||||
liboath: ${have_liboath}
|
||||
libgeoip: ${have_geoip}
|
||||
libmaxminddb: ${have_maxmind}
|
||||
glibc (sha2crypt): ${have_glibc}
|
||||
local talloc: ${with_local_talloc}
|
||||
local protobuf-c: ${with_local_protobuf_c}
|
||||
|
||||
Reference in New Issue
Block a user