mirror of
https://github.com/pissnet/pissircd.git
synced 2024-06-05 07:48:44 +01:00
Build with PCRE2 (not used yet). Enhance SSL build error (may need more fixing).
This commit is contained in:
parent
ffe6877fbe
commit
547b2d69d0
5 changed files with 206 additions and 14 deletions
|
@ -34,11 +34,11 @@ FROMDOS=/home/cmunk/bin/4dos
|
|||
#
|
||||
|
||||
#XCFLAGS=-O -g -export-dynamic
|
||||
IRCDLIBS=@IRCDLIBS@ @TRE_LIBS@ @CARES_LIBS@
|
||||
IRCDLIBS=@IRCDLIBS@ @TRE_LIBS@ @PCRE2_LIBS@ @CARES_LIBS@
|
||||
CRYPTOLIB=@CRYPTOLIB@
|
||||
OPENSSLINCLUDES=
|
||||
|
||||
XCFLAGS=@TRE_CFLAGS@ @CARES_CFLAGS@ @CFLAGS@
|
||||
XCFLAGS=@TRE_CFLAGS@ @PCRE2_CFLAGS@ @CARES_CFLAGS@ @CFLAGS@
|
||||
#
|
||||
# use the following on MIPS:
|
||||
#CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
|
||||
|
|
|
@ -189,21 +189,15 @@ AS_IF([test $enable_ssl != "no"],
|
|||
AC_MSG_RESULT(not found)
|
||||
echo ""
|
||||
echo "Apparently you do not have both the openssl binary and openssl development libraries installed."
|
||||
echo "You have two options:"
|
||||
echo "a) Install the needed binaries and libraries"
|
||||
echo " and run ./Config"
|
||||
echo "OR"
|
||||
echo "b) If you don't need SSL..."
|
||||
echo " Run ./Config and say 'no' when asked about SSL"
|
||||
echo " (or pass --disable-ssl to ./configure)"
|
||||
echo ""
|
||||
echo "Please install the needed binaries and libraries."
|
||||
echo "The package is often called 'openssl-dev', 'openssl-devel' or 'libssl-dev'"
|
||||
echo "After doing so re-run ./Config"
|
||||
exit 1
|
||||
else
|
||||
CRYPTOLIB="-lssl -lcrypto";
|
||||
if test ! "$ssldir" = "/usr" ; then
|
||||
LDFLAGS="$LDFLAGS -L$ssldir/lib";
|
||||
fi
|
||||
AC_DEFINE([USE_SSL], [], [Define if you want to allow SSL connections])
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
|
159
configure
vendored
159
configure
vendored
|
@ -628,6 +628,8 @@ UNRLINCDIR
|
|||
URL
|
||||
CARES_LIBS
|
||||
CARES_CFLAGS
|
||||
PCRE2_LIBS
|
||||
PCRE2_CFLAGS
|
||||
PKG_CONFIG_LIBDIR
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG
|
||||
|
@ -717,6 +719,7 @@ with_disableusermod
|
|||
with_operoverride_verify
|
||||
with_disable_extendedban_stacking
|
||||
with_system_tre
|
||||
with_system_pcre2
|
||||
with_system_cares
|
||||
enable_ssl
|
||||
enable_dynamic_linking
|
||||
|
@ -737,6 +740,8 @@ PKG_CONFIG_PATH
|
|||
PKG_CONFIG_LIBDIR
|
||||
TRE_CFLAGS
|
||||
TRE_LIBS
|
||||
PCRE2_CFLAGS
|
||||
PCRE2_LIBS
|
||||
CARES_CFLAGS
|
||||
CARES_LIBS'
|
||||
|
||||
|
@ -1382,6 +1387,8 @@ Optional Packages:
|
|||
Disable extended ban stacking
|
||||
--with-system-tre Use the system tre package instead of bundled,
|
||||
discovered using pkg-config
|
||||
--with-system-pcre2 Use the system pcre2 package instead of bundled,
|
||||
discovered using pkg-config
|
||||
--with-system-cares Use the system c-ares (at least version 1.6.0)
|
||||
package instead of bundled c-ares, discovered using
|
||||
pkg-config
|
||||
|
@ -1402,6 +1409,9 @@ Some influential environment variables:
|
|||
path overriding pkg-config's built-in search path
|
||||
TRE_CFLAGS C compiler flags for TRE, overriding pkg-config
|
||||
TRE_LIBS linker flags for TRE, overriding pkg-config
|
||||
PCRE2_CFLAGS
|
||||
C compiler flags for PCRE2, overriding pkg-config
|
||||
PCRE2_LIBS linker flags for PCRE2, overriding pkg-config
|
||||
CARES_CFLAGS
|
||||
C compiler flags for CARES, overriding pkg-config
|
||||
CARES_LIBS linker flags for CARES, overriding pkg-config
|
||||
|
@ -6181,6 +6191,14 @@ else
|
|||
fi
|
||||
|
||||
|
||||
# Check whether --with-system-pcre2 was given.
|
||||
if test "${with_system_pcre2+set}" = set; then :
|
||||
withval=$with_system_pcre2;
|
||||
else
|
||||
with_system_pcre2=no
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-system-cares was given.
|
||||
if test "${with_system_cares+set}" = set; then :
|
||||
withval=$with_system_cares;
|
||||
|
@ -6226,9 +6244,9 @@ $as_echo "found in $ssldir/include" >&6; }
|
|||
$as_echo "not found" >&6; }
|
||||
echo ""
|
||||
echo "Apparently you do not have both the openssl binary and openssl development libraries installed."
|
||||
echo ""
|
||||
echo "Please install the needed binaries and libraries"
|
||||
echo "and run ./Config"
|
||||
echo "Please install the needed binaries and libraries."
|
||||
echo "The package is often called 'openssl-dev', 'openssl-devel' or 'libssl-dev'"
|
||||
echo "After doing so re-run ./Config"
|
||||
exit 1
|
||||
else
|
||||
CRYPTOLIB="-lssl -lcrypto";
|
||||
|
@ -6823,6 +6841,141 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test "x$with_system_pcre2" = "xno"; then :
|
||||
|
||||
pcre2_version="10.10"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: extracting PCRE2 regex library" >&5
|
||||
$as_echo "extracting PCRE2 regex library" >&6; }
|
||||
cur_dir=`pwd`
|
||||
cd extras
|
||||
rm -rf pcre2-$pcre2_version pcre2
|
||||
if test "x$ac_cv_path_GUNZIP" = "x" ; then
|
||||
tar xfz pcre2.tar.gz
|
||||
else
|
||||
cp pcre2.tar.gz pcre2.tar.gz.bak
|
||||
gunzip -f pcre2.tar.gz
|
||||
cp pcre2.tar.gz.bak pcre2.tar.gz
|
||||
tar xf pcre2.tar
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: configuring PCRE2 regex library" >&5
|
||||
$as_echo "configuring PCRE2 regex library" >&6; }
|
||||
cd pcre2-$pcre2_version
|
||||
./configure --enable-jit --disable-shared --disable-unicode --prefix=$cur_dir/extras/pcre2 || exit 1
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: compiling PCRE2 regex library" >&5
|
||||
$as_echo "compiling PCRE2 regex library" >&6; }
|
||||
$ac_cv_prog_MAKER || exit 1
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: installing PCRE2 regex library" >&5
|
||||
$as_echo "installing PCRE2 regex library" >&6; }
|
||||
$ac_cv_prog_MAKER install || exit 1
|
||||
PCRE2_CFLAGS="-I$cur_dir/extras/pcre2/include"
|
||||
|
||||
|
||||
PCRE2_LIBS=
|
||||
if test -n "$ac_cv_path_PKGCONFIG"; then :
|
||||
PCRE2_LIBS="`$ac_cv_path_PKGCONFIG --static --libs libpcre2-8.pc | sed -e 's,-L\([^ ]*regex[^ ]*lib\)\( .*\)-lpcre2-8,\1/libpcre2-8.a \2,'`"
|
||||
fi
|
||||
if test -z "$PCRE2_LIBS"; then :
|
||||
PCRE2_LIBS="../extras/pcre2/lib/libpcre2-8.a"
|
||||
fi
|
||||
|
||||
cd $cur_dir
|
||||
|
||||
else
|
||||
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCRE2" >&5
|
||||
$as_echo_n "checking for PCRE2... " >&6; }
|
||||
|
||||
if test -n "$PCRE2_CFLAGS"; then
|
||||
pkg_cv_PCRE2_CFLAGS="$PCRE2_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8 >= 10.00\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libpcre2-8 >= 10.00") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_PCRE2_CFLAGS=`$PKG_CONFIG --cflags "libpcre2-8 >= 10.00" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$PCRE2_LIBS"; then
|
||||
pkg_cv_PCRE2_LIBS="$PCRE2_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8 >= 10.00\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libpcre2-8 >= 10.00") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_PCRE2_LIBS=`$PKG_CONFIG --libs "libpcre2-8 >= 10.00" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
PCRE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcre2-8 >= 10.00" 2>&1`
|
||||
else
|
||||
PCRE2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcre2-8 >= 10.00" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$PCRE2_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "Package requirements (libpcre2-8 >= 10.00) were not met:
|
||||
|
||||
$PCRE2_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 PCRE2_CFLAGS
|
||||
and PCRE2_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 "no" >&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 PCRE2_CFLAGS
|
||||
and PCRE2_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
|
||||
PCRE2_CFLAGS=$pkg_cv_PCRE2_CFLAGS
|
||||
PCRE2_LIBS=$pkg_cv_PCRE2_LIBS
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test "x$with_system_cares" = "xno"; then :
|
||||
|
||||
cares_version="1.10.0"
|
||||
|
|
45
configure.ac
45
configure.ac
|
@ -515,6 +515,7 @@ AC_ARG_WITH(disable-extendedban-stacking, [AS_HELP_STRING([--with-disable-extend
|
|||
[AS_IF([test $withval = "yes"],
|
||||
[AC_DEFINE([DISABLE_STACKED_EXTBANS], [], [Define to disable extended ban stacking (~q:~c:\#chan, etc)])])])
|
||||
AC_ARG_WITH(system-tre, [AS_HELP_STRING([--with-system-tre], [Use the system tre package instead of bundled, discovered using pkg-config])], [], [with_system_tre=no])
|
||||
AC_ARG_WITH(system-pcre2, [AS_HELP_STRING([--with-system-pcre2], [Use the system pcre2 package instead of bundled, discovered using pkg-config])], [], [with_system_pcre2=no])
|
||||
AC_ARG_WITH(system-cares, [AS_HELP_STRING([--with-system-cares], [Use the system c-ares (at least version 1.6.0) package instead of bundled c-ares, discovered using pkg-config])], [], [with_system_cares=no])
|
||||
CHECK_SSL
|
||||
AC_ARG_ENABLE(dynamic-linking, [AS_HELP_STRING([--disable-dynamic-linking], [Make the IRCd statically link with shared objects rather than dynamically (noone knows if disabling dynamic linking actually does anything or not)])],
|
||||
|
@ -608,6 +609,50 @@ dnl use pkgconfig for tre:
|
|||
PKG_CHECK_MODULES([TRE], tre >= 0.7.5)
|
||||
])
|
||||
|
||||
AS_IF([test "x$with_system_pcre2" = "xno"],[
|
||||
dnl REMEMBER TO CHANGE WITH A NEW PCRE2 RELEASE!
|
||||
pcre2_version="10.10"
|
||||
AC_MSG_RESULT(extracting PCRE2 regex library)
|
||||
cur_dir=`pwd`
|
||||
cd extras
|
||||
dnl remove old pcre2 directory to force a recompile...
|
||||
dnl and remove its installation prefix just to clean things up.
|
||||
rm -rf pcre2-$pcre2_version pcre2
|
||||
if test "x$ac_cv_path_GUNZIP" = "x" ; then
|
||||
tar xfz pcre2.tar.gz
|
||||
else
|
||||
cp pcre2.tar.gz pcre2.tar.gz.bak
|
||||
gunzip -f pcre2.tar.gz
|
||||
cp pcre2.tar.gz.bak pcre2.tar.gz
|
||||
tar xf pcre2.tar
|
||||
fi
|
||||
AC_MSG_RESULT(configuring PCRE2 regex library)
|
||||
cd pcre2-$pcre2_version
|
||||
./configure --enable-jit --disable-shared --disable-unicode --prefix=$cur_dir/extras/pcre2 || exit 1
|
||||
AC_MSG_RESULT(compiling PCRE2 regex library)
|
||||
$ac_cv_prog_MAKER || exit 1
|
||||
AC_MSG_RESULT(installing PCRE2 regex library)
|
||||
$ac_cv_prog_MAKER install || exit 1
|
||||
PCRE2_CFLAGS="-I$cur_dir/extras/pcre2/include"
|
||||
AC_SUBST(PCRE2_CFLAGS)
|
||||
|
||||
PCRE2_LIBS=
|
||||
dnl See c-ares's compilation section for more info on this hack.
|
||||
dnl ensure that we're linking against the bundled version of pcre2
|
||||
dnl (we only reach this code if linking against the bundled version is desired).
|
||||
AS_IF([test -n "$ac_cv_path_PKGCONFIG"],
|
||||
[PCRE2_LIBS="`$ac_cv_path_PKGCONFIG --static --libs libpcre2-8.pc | sed -e ['s,-L\([^ ]*regex[^ ]*lib\)\( .*\)-lpcre2-8,\1/libpcre2-8.a \2,']`"])
|
||||
dnl For when pkg-config isn't available -- or for when pkg-config
|
||||
dnl doesn't see the libpcre2-8.pc file somehow... (#3982)
|
||||
AS_IF([test -z "$PCRE2_LIBS"],
|
||||
[PCRE2_LIBS="../extras/pcre2/lib/libpcre2-8.a"])
|
||||
AC_SUBST(PCRE2_LIBS)
|
||||
cd $cur_dir
|
||||
],[
|
||||
dnl use pkgconfig for pcre2:
|
||||
PKG_CHECK_MODULES([PCRE2], libpcre2-8 >= 10.00)
|
||||
])
|
||||
|
||||
AS_IF([test "x$with_system_cares" = "xno"],[
|
||||
dnl REMEMBER TO CHANGE WITH A NEW C-ARES RELEASE!
|
||||
dnl NOTE: when changing this here, ALSO change it in ./curlinstall
|
||||
|
|
BIN
extras/pcre2.tar.gz
Normal file
BIN
extras/pcre2.tar.gz
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue