0002-fix-libperl-probe.patch
text/x-diff
Filename: 0002-fix-libperl-probe.patch
Type: text/x-diff
Part: 1
Patch
Format: unified
Series: patch 0002
| File | + | − |
|---|---|---|
| configure | 5 | 0 |
| configure.in | 5 | 0 |
diff --git a/configure b/configure
index 1d664a4..6b1c779 100755
--- a/configure
+++ b/configure
@@ -18490,6 +18490,10 @@ fi
# On most platforms, if perl.h is there then libperl.so will be too, but at
# this writing Debian packages them separately. There is no known reason to
# waste cycles on separate probes for the Tcl or Python libraries, though.
+ # On some Red Hat platforms, the link attempt can fail if we don't use
+ # CFLAGS_SL while building the test program.
+ ac_save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $CFLAGS_SL"
pgac_save_LIBS=$LIBS
LIBS="$perl_embed_ldflags"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
@@ -18519,6 +18523,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$pgac_save_LIBS
+ CFLAGS=$ac_save_CFLAGS
CPPFLAGS=$ac_save_CPPFLAGS
fi
diff --git a/configure.in b/configure.in
index 50f4b26..2b9025c 100644
--- a/configure.in
+++ b/configure.in
@@ -2253,6 +2253,10 @@ if test "$with_perl" = yes; then
# On most platforms, if perl.h is there then libperl.so will be too, but at
# this writing Debian packages them separately. There is no known reason to
# waste cycles on separate probes for the Tcl or Python libraries, though.
+ # On some Red Hat platforms, the link attempt can fail if we don't use
+ # CFLAGS_SL while building the test program.
+ ac_save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $CFLAGS_SL"
pgac_save_LIBS=$LIBS
LIBS="$perl_embed_ldflags"
AC_MSG_CHECKING([for libperl])
@@ -2264,6 +2268,7 @@ if test "$with_perl" = yes; then
[AC_MSG_RESULT(no)
AC_MSG_ERROR([libperl library is required for Perl])])
LIBS=$pgac_save_LIBS
+ CFLAGS=$ac_save_CFLAGS
CPPFLAGS=$ac_save_CPPFLAGS
fi