diff --git a/Changes b/Changes index 19f59ed09..077c6da64 100644 --- a/Changes +++ b/Changes @@ -3046,4 +3046,6 @@ seen. gmtime warning still there - help.conf: updated snomasks section. - Added a patch by baafie to fix a problem where environment variables could not be specified in the Config script (#0001657) -- Imported TRE 0.6.6 on Win32 +- Imported TRE 0.6.6 on Win32 and Linux +- Made use of TRE's pkg-config support to solve a problem with libintl reported by + raistlinmajere (#0001592) diff --git a/Makefile.in b/Makefile.in index 004ab5f03..0a4f7bcdc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -34,7 +34,7 @@ FROMDOS=/home/cmunk/bin/4dos # #XCFLAGS=-O -g -export-dynamic -IRCDLIBS=@IRCDLIBS@ -L../extras/regexp/lib -ltre +IRCDLIBS=@IRCDLIBS@ @TRELIBS@ CRYPTOLIB=@CRYPTOLIB@ OPENSSLINCLUDES= diff --git a/autoconf/configure.in b/autoconf/configure.in index 2da9692a6..d54bae1ca 100644 --- a/autoconf/configure.in +++ b/autoconf/configure.in @@ -28,6 +28,8 @@ AC_PATH_PROG(INSTALL,install) AC_CHECK_PROG(MAKER, gmake, gmake, make) AC_PATH_PROG(GMAKE,gmake) AC_PATH_PROG(GUNZIP, gunzip) +AC_PATH_PROG(PKGCONFIG, pkg-config) + dnl Checks for libraries. AC_CHECK_LIB(descrypt, crypt, [AC_DEFINE(HAVE_CRYPT) IRCDLIBS="$IRCDLIBS-ldescrypt " MKPASSWDLIBS="-ldescrypt"], AC_CHECK_LIB(crypt, crypt,[ AC_DEFINE(HAVE_CRYPT) IRCDLIBS="$IRCDLIBS-lcrypt " MKPASSWDLIBS="-lcrypt"])) @@ -374,8 +376,9 @@ else tar xf tre.tar fi dnl REMEMBER TO CHANGE WITH A NEW RELEASE! +tre_version="0.6.6" AC_MSG_RESULT(configuring TRE regex library) -cd tre-0.6.5 +cd tre-$tre_version ./configure --disable-agrep --disable-shared --disable-system-abi --disable-wchar --disable-multibyte --prefix=$cur_dir/extras/regexp AC_MSG_RESULT(compiling TRE regex library) $ac_cv_prog_MAKER @@ -383,6 +386,12 @@ AC_MSG_RESULT(installing TRE regex library) $ac_cv_prog_MAKER install TREINCDIR="$cur_dir/extras/regexp/include" AC_SUBST(TREINCDIR) +if test "x$ac_cv_path_PKGCONFIG" = "x" ; then + TRELIBS="-L../extras/regexp/lib -ltre" +else + TRELIBS=`$ac_cv_path_PKGCONFIG --libs tre.pc` +fi +AC_SUBST(TRELIBS) cd $cur_dir AC_OUTPUT(Makefile src/modules/Makefile unreal ircdcron/ircdchk) chmod 0700 unreal diff --git a/configure b/configure index 2b3454137..fd0a4b62c 100755 --- a/configure +++ b/configure @@ -2340,6 +2340,46 @@ else echo "${ECHO_T}no" >&6 fi +# Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PKGCONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG + +if test -n "$PKGCONFIG"; then + echo "$as_me:$LINENO: result: $PKGCONFIG" >&5 +echo "${ECHO_T}$PKGCONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + echo "$as_me:$LINENO: checking for crypt in -ldescrypt" >&5 echo $ECHO_N "checking for crypt in -ldescrypt... $ECHO_C" >&6 if test "${ac_cv_lib_descrypt_crypt+set}" = set; then @@ -9998,9 +10038,10 @@ else cp tre.tar.gz.bak tre.tar.gz tar xf tre.tar fi +tre_version="0.6.6" echo "$as_me:$LINENO: result: configuring TRE regex library" >&5 echo "${ECHO_T}configuring TRE regex library" >&6 -cd tre-0.6.5 +cd tre-$tre_version ./configure --disable-agrep --disable-shared --disable-system-abi --disable-wchar --disable-multibyte --prefix=$cur_dir/extras/regexp echo "$as_me:$LINENO: result: compiling TRE regex library" >&5 echo "${ECHO_T}compiling TRE regex library" >&6 @@ -10010,6 +10051,12 @@ echo "${ECHO_T}installing TRE regex library" >&6 $ac_cv_prog_MAKER install TREINCDIR="$cur_dir/extras/regexp/include" +if test "x$ac_cv_path_PKGCONFIG" = "x" ; then + TRELIBS="-L../extras/regexp/lib -ltre" +else + TRELIBS=`$ac_cv_path_PKGCONFIG --libs tre.pc` +fi + cd $cur_dir ac_config_files="$ac_config_files Makefile src/modules/Makefile unreal ircdcron/ircdchk" cat >confcache <<\_ACEOF @@ -10583,6 +10630,7 @@ s,@INSTALL@,$INSTALL,;t t s,@MAKER@,$MAKER,;t t s,@GMAKE@,$GMAKE,;t t s,@GUNZIP@,$GUNZIP,;t t +s,@PKGCONFIG@,$PKGCONFIG,;t t s,@IRCDLIBS@,$IRCDLIBS,;t t s,@MKPASSWDLIBS@,$MKPASSWDLIBS,;t t s,@CPP@,$CPP,;t t @@ -10595,6 +10643,7 @@ s,@IRCDDIR@,$IRCDDIR,;t t s,@BINDIR@,$BINDIR,;t t s,@FD_SETSIZE@,$FD_SETSIZE,;t t s,@TREINCDIR@,$TREINCDIR,;t t +s,@TRELIBS@,$TRELIBS,;t t CEOF _ACEOF diff --git a/extras/tre.tar.gz b/extras/tre.tar.gz index 68dadbc5e..63a31e235 100644 Binary files a/extras/tre.tar.gz and b/extras/tre.tar.gz differ