Outsmart autoconf

When checking for libperl, evil little autoconf thought we intent to use perl
everywhere (HAHA, no!) so it went forward and added -lperl to $LIBS. Despite
this being a bad idea in general (come on, it's perl!), this also made
subsequent checks fail because the linker didn't find libperl (we reverted back
LDFLAGS to an older value after checking for perl and so the path to libperl got
lost).

Fix this by outsmarting autoconf. Let's wait for the autofail to strike back!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1946 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-04-27 15:30:50 +00:00
parent a9c983da25
commit 0c00623a09
2 changed files with 4 additions and 7 deletions
Vendored
+1 -6
View File
@@ -3416,12 +3416,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perl_perl_alloc" >&5
$as_echo "$ac_cv_lib_perl_perl_alloc" >&6; }
if test "x$ac_cv_lib_perl_perl_alloc" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPERL 1
_ACEOF
LIBS="-lperl $LIBS"
: No, we do not want autoconf to do sth automatically
else
PERL="no"
fi
+3 -1
View File
@@ -242,7 +242,9 @@ if test "x$PERL" != "xno"; then
if test -n "$PERL_BINARY"; then
my_saved_LDFLAGS="$LDFLAGS"
appendLD `$PERL_BINARY -MExtUtils::Embed -e ccopts -e ldopts`
AC_CHECK_LIB(perl, perl_alloc,, PERL="no")
AC_CHECK_LIB(perl, perl_alloc,
[: No, we do not want autoconf to do sth automatically],
PERL="no")
LDFLAGS="$my_saved_LDFLAGS"
else
PERL="no"