mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Fix configure's check for libperl
perl's LDFLAGS where included in $LIBS when checking for libperl. This meant that e.g. the -L flag necessary for finding libperl was after the "-lperl" argument. This made the test fail. This moves these flags into $LDFLAGS (and later restores the old $LDFLAGS since only modperl needs those flags, modules/Makefile.in handles that). Thanks to sartek for reporting this is broken on solaris and testing the patch. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1496 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
5
configure
vendored
5
configure
vendored
@@ -3266,13 +3266,15 @@ fi
|
||||
|
||||
|
||||
if test -n "$PERL"; then
|
||||
my_saved_LDFLAGS="$LDFLAGS"
|
||||
appendLD `$PERL -MExtUtils::Embed -e ccopts -e ldopts`
|
||||
{ $as_echo "$as_me:$LINENO: checking for perl_alloc in -lperl" >&5
|
||||
$as_echo_n "checking for perl_alloc in -lperl... " >&6; }
|
||||
if test "${ac_cv_lib_perl_perl_alloc+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lperl `$PERL -MExtUtils::Embed -e ccopts -e ldopts` $LIBS"
|
||||
LIBS="-lperl $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
@@ -3339,6 +3341,7 @@ $as_echo "$as_me: error: could not find libperl. Try --disable-perl" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
LDFLAGS="$my_saved_LDFLAGS"
|
||||
else
|
||||
{ { $as_echo "$as_me:$LINENO: error: could not find perl binary. Try --disable-perl" >&5
|
||||
$as_echo "$as_me: error: could not find perl binary. Try --disable-perl" >&2;}
|
||||
|
||||
@@ -201,9 +201,11 @@ if test "$MODULES" = "yes"; then
|
||||
if test -z "$NOPERL"; then
|
||||
AC_PATH_PROG([PERL], [perl], [])
|
||||
if test -n "$PERL"; then
|
||||
my_saved_LDFLAGS="$LDFLAGS"
|
||||
appendLD `$PERL -MExtUtils::Embed -e ccopts -e ldopts`
|
||||
AC_CHECK_LIB(perl, perl_alloc,unset NOPERL,
|
||||
AC_MSG_ERROR([could not find libperl. Try --disable-perl]),
|
||||
[`$PERL -MExtUtils::Embed -e ccopts -e ldopts`])
|
||||
AC_MSG_ERROR([could not find libperl. Try --disable-perl]))
|
||||
LDFLAGS="$my_saved_LDFLAGS"
|
||||
else
|
||||
AC_MSG_ERROR([could not find perl binary. Try --disable-perl])
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user