From 0c00623a09aad528709662db8af738692c38637b Mon Sep 17 00:00:00 2001 From: psychon Date: Tue, 27 Apr 2010 15:30:50 +0000 Subject: [PATCH] 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 --- configure | 7 +------ configure.in | 4 +++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/configure b/configure index a3cdd155..71bdea27 100755 --- a/configure +++ b/configure @@ -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 diff --git a/configure.in b/configure.in index 82542466..b8b5c19d 100644 --- a/configure.in +++ b/configure.in @@ -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"