mirror of
https://github.com/pissnet/pissircd.git
synced 2024-06-05 07:48:44 +01:00
Don't build libmaxminddb by default, and fail when it's enabled but not present
This commit is contained in:
parent
c4a64f4aab
commit
f665206c4f
2 changed files with 51 additions and 40 deletions
|
@ -391,17 +391,14 @@ AC_DEFUN([CHECK_LIBMAXMINDDB],
|
|||
AC_ARG_ENABLE(libmaxminddb,
|
||||
[AC_HELP_STRING([--enable-libmaxminddb=no/yes],[enable GeoIP libmaxminddb support])],
|
||||
[enable_libmaxminddb=$enableval],
|
||||
[enable_libmaxminddb=yes])
|
||||
[enable_libmaxminddb=no])
|
||||
|
||||
AS_IF([test "x$enable_libmaxminddb" = "xyes"],
|
||||
[
|
||||
dnl see if the system provides it
|
||||
has_system_libmaxminddb="no"
|
||||
PKG_CHECK_MODULES([LIBMAXMINDDB], [libmaxminddb >= 1.6.0],
|
||||
[has_system_libmaxminddb=yes],
|
||||
[has_system_libmaxminddb=no
|
||||
AC_MSG_RESULT(not building libmaxminddb GeoIP support)
|
||||
])
|
||||
[has_system_libmaxminddb=yes])
|
||||
AS_IF([test "x$has_system_libmaxminddb" = "xyes"],
|
||||
[
|
||||
|
||||
|
|
84
configure
vendored
84
configure
vendored
|
@ -7363,8 +7363,8 @@ if test "x$with_system_pcre2" = "xyes"; then :
|
|||
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCRE2" >&5
|
||||
$as_echo_n "checking for PCRE2... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpcre2-8 >= 10.00" >&5
|
||||
$as_echo_n "checking for libpcre2-8 >= 10.00... " >&6; }
|
||||
|
||||
if test -n "$PCRE2_CFLAGS"; then
|
||||
pkg_cv_PCRE2_CFLAGS="$PCRE2_CFLAGS"
|
||||
|
@ -7404,7 +7404,7 @@ fi
|
|||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
|
@ -7422,7 +7422,7 @@ fi
|
|||
|
||||
has_system_pcre2=no
|
||||
elif test $pkg_failed = untried; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
has_system_pcre2=no
|
||||
else
|
||||
|
@ -7482,8 +7482,8 @@ if test "x$with_system_argon2" = "xyes"; then :
|
|||
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARGON2" >&5
|
||||
$as_echo_n "checking for ARGON2... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libargon2 >= 0~20161029" >&5
|
||||
$as_echo_n "checking for libargon2 >= 0~20161029... " >&6; }
|
||||
|
||||
if test -n "$ARGON2_CFLAGS"; then
|
||||
pkg_cv_ARGON2_CFLAGS="$ARGON2_CFLAGS"
|
||||
|
@ -7523,7 +7523,7 @@ fi
|
|||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
|
@ -7541,7 +7541,7 @@ fi
|
|||
|
||||
has_system_argon2=no
|
||||
elif test $pkg_failed = untried; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
has_system_argon2=no
|
||||
else
|
||||
|
@ -7600,8 +7600,8 @@ if test "x$with_system_sodium" = "xyes"; then :
|
|||
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SODIUM" >&5
|
||||
$as_echo_n "checking for SODIUM... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsodium >= 1.0.16" >&5
|
||||
$as_echo_n "checking for libsodium >= 1.0.16... " >&6; }
|
||||
|
||||
if test -n "$SODIUM_CFLAGS"; then
|
||||
pkg_cv_SODIUM_CFLAGS="$SODIUM_CFLAGS"
|
||||
|
@ -7641,7 +7641,7 @@ fi
|
|||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
|
@ -7659,7 +7659,7 @@ fi
|
|||
|
||||
has_system_sodium=no
|
||||
elif test $pkg_failed = untried; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
has_system_sodium=no
|
||||
else
|
||||
|
@ -7723,8 +7723,8 @@ if test "x$with_system_cares" = "xyes"; then :
|
|||
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CARES" >&5
|
||||
$as_echo_n "checking for CARES... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcares >= 1.6.0" >&5
|
||||
$as_echo_n "checking for libcares >= 1.6.0... " >&6; }
|
||||
|
||||
if test -n "$CARES_CFLAGS"; then
|
||||
pkg_cv_CARES_CFLAGS="$CARES_CFLAGS"
|
||||
|
@ -7764,7 +7764,7 @@ fi
|
|||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
|
@ -7782,7 +7782,7 @@ fi
|
|||
|
||||
has_system_cares=no
|
||||
elif test $pkg_failed = untried; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
has_system_cares=no
|
||||
else
|
||||
|
@ -7865,8 +7865,8 @@ if test "x$with_system_jansson" = "xyes"; then :
|
|||
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JANSSON" >&5
|
||||
$as_echo_n "checking for JANSSON... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jansson >= 2.0.0" >&5
|
||||
$as_echo_n "checking for jansson >= 2.0.0... " >&6; }
|
||||
|
||||
if test -n "$JANSSON_CFLAGS"; then
|
||||
pkg_cv_JANSSON_CFLAGS="$JANSSON_CFLAGS"
|
||||
|
@ -7906,7 +7906,7 @@ fi
|
|||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
|
@ -7924,7 +7924,7 @@ fi
|
|||
|
||||
has_system_jansson=no
|
||||
elif test $pkg_failed = untried; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
has_system_jansson=no
|
||||
else
|
||||
|
@ -8629,8 +8629,8 @@ fi
|
|||
has_system_geoip_classic="no"
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GEOIP_CLASSIC" >&5
|
||||
$as_echo_n "checking for GEOIP_CLASSIC... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for geoip >= 1.6.0" >&5
|
||||
$as_echo_n "checking for geoip >= 1.6.0... " >&6; }
|
||||
|
||||
if test -n "$GEOIP_CLASSIC_CFLAGS"; then
|
||||
pkg_cv_GEOIP_CLASSIC_CFLAGS="$GEOIP_CLASSIC_CFLAGS"
|
||||
|
@ -8670,7 +8670,7 @@ fi
|
|||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
|
@ -8688,7 +8688,7 @@ fi
|
|||
|
||||
has_system_geoip_classic=no
|
||||
elif test $pkg_failed = untried; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
has_system_geoip_classic=no
|
||||
else
|
||||
|
@ -8757,7 +8757,7 @@ fi
|
|||
if test "${enable_libmaxminddb+set}" = set; then :
|
||||
enableval=$enable_libmaxminddb; enable_libmaxminddb=$enableval
|
||||
else
|
||||
enable_libmaxminddb=yes
|
||||
enable_libmaxminddb=no
|
||||
fi
|
||||
|
||||
|
||||
|
@ -8766,8 +8766,8 @@ fi
|
|||
has_system_libmaxminddb="no"
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBMAXMINDDB" >&5
|
||||
$as_echo_n "checking for LIBMAXMINDDB... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmaxminddb >= 1.6.0" >&5
|
||||
$as_echo_n "checking for libmaxminddb >= 1.6.0... " >&6; }
|
||||
|
||||
if test -n "$LIBMAXMINDDB_CFLAGS"; then
|
||||
pkg_cv_LIBMAXMINDDB_CFLAGS="$LIBMAXMINDDB_CFLAGS"
|
||||
|
@ -8807,7 +8807,7 @@ fi
|
|||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
|
@ -8823,17 +8823,31 @@ fi
|
|||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$LIBMAXMINDDB_PKG_ERRORS" >&5
|
||||
|
||||
has_system_libmaxminddb=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not building libmaxminddb GeoIP support" >&5
|
||||
$as_echo "not building libmaxminddb GeoIP support" >&6; }
|
||||
as_fn_error $? "Package requirements (libmaxminddb >= 1.6.0) were not met:
|
||||
|
||||
$LIBMAXMINDDB_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
Alternatively, you may set the environment variables LIBMAXMINDDB_CFLAGS
|
||||
and LIBMAXMINDDB_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details." "$LINENO" 5
|
||||
elif test $pkg_failed = untried; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
has_system_libmaxminddb=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not building libmaxminddb GeoIP support" >&5
|
||||
$as_echo "not building libmaxminddb GeoIP support" >&6; }
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
Alternatively, you may set the environment variables LIBMAXMINDDB_CFLAGS
|
||||
and LIBMAXMINDDB_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
else
|
||||
LIBMAXMINDDB_CFLAGS=$pkg_cv_LIBMAXMINDDB_CFLAGS
|
||||
LIBMAXMINDDB_LIBS=$pkg_cv_LIBMAXMINDDB_LIBS
|
||||
|
|
Loading…
Add table
Reference in a new issue