1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-30 21:06:37 +02:00

Fix geoip library build and geoip_classic loading

This commit is contained in:
k4be
2021-08-26 11:25:26 +02:00
parent a6643fcd38
commit b15ddd760a
4 changed files with 31 additions and 25 deletions
+2 -1
View File
@@ -365,7 +365,8 @@ AC_DEFUN([CHECK_GEOIP_CLASSIC],
$ac_cv_prog_MAKER install || exit 1
dnl Try pkg-config first...
AS_IF([test -n "$ac_cv_path_PKGCONFIG"],
[GEOIP_CLASSIC_LIBS="`$ac_cv_path_PKGCONFIG --libs geoip.pc`"])
[GEOIP_CLASSIC_LIBS="`$ac_cv_path_PKGCONFIG --libs geoip.pc`"
GEOIP_CLASSIC_CFLAGS="`$ac_cv_path_PKGCONFIG --cflags geoip.pc`"])
dnl In case the system does not have pkg-config, fallback to hardcoded settings...
AS_IF([test -z "$GEOIP_CLASSIC_LIBS"],
[GEOIP_CLASSIC_LIBS="-L$PRIVATELIBDIR -lGeoIP"
Vendored
+27 -24
View File
@@ -659,6 +659,7 @@ LDFLAGS_PRIVATELIBS
PIDFILE
DOCDIR
PERMDATADIR
PRIVATELIBDIR
TMPDIR
CACHEDIR
LOGDIR
@@ -6511,6 +6512,7 @@ fi
# Check whether --with-maxconnections was given.
if test "${with_maxconnections+set}" = set; then :
withval=$with_maxconnections; ac_fd=$withval
@@ -7304,8 +7306,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"
@@ -7345,7 +7347,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
@@ -7363,7 +7365,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
@@ -7423,8 +7425,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"
@@ -7464,7 +7466,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
@@ -7482,7 +7484,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
@@ -7541,8 +7543,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"
@@ -7582,7 +7584,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
@@ -7600,7 +7602,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
@@ -7664,8 +7666,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"
@@ -7705,7 +7707,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
@@ -7723,7 +7725,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
@@ -7806,8 +7808,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"
@@ -7847,7 +7849,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
@@ -7865,7 +7867,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
@@ -8570,8 +8572,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"
@@ -8611,7 +8613,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
@@ -8629,7 +8631,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
@@ -8675,6 +8677,7 @@ $as_echo "installing GeoIP Classic library" >&6; }
$ac_cv_prog_MAKER install || exit 1
if test -n "$ac_cv_path_PKGCONFIG"; then :
GEOIP_CLASSIC_LIBS="`$ac_cv_path_PKGCONFIG --libs geoip.pc`"
GEOIP_CLASSIC_CFLAGS="`$ac_cv_path_PKGCONFIG --cflags geoip.pc`"
fi
if test -z "$GEOIP_CLASSIC_LIBS"; then :
GEOIP_CLASSIC_LIBS="-L$PRIVATELIBDIR -lGeoIP"
+1
View File
@@ -485,6 +485,7 @@ AC_SUBST(MODULESDIR)
AC_SUBST(LOGDIR)
AC_SUBST(CACHEDIR)
AC_SUBST(TMPDIR)
AC_SUBST(PRIVATELIBDIR)
dnl Why o why PERMDATADIR and not DATADIR you ask?
dnl well, Because DATADIR conflicts with the Windows SDK header files.. amazing.
AC_SUBST(PERMDATADIR)
+1
View File
@@ -17,6 +17,7 @@ if [ "$1" = "start" ] ; then
# When built with --with-asan, ASan does not dump core by default because
# older gcc/clang might dump a 16TB core file. We explicitly enable it here.
export ASAN_OPTIONS="abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1:log_path=@TMPDIR@/unrealircd_asan:detect_leaks=0"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:@PRIVATELIBDIR@"
# Check if ~/Unrealxxx/unrealircd.conf exists but the file
# ~/unrealircd/conf/unrealircd.conf does not.