diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2008-11-12 00:00:29 +0000 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2008-11-12 00:00:29 +0000 |
commit | 9ac53e797860a498ef0ea13d0e2b39df7b5cc6bd (patch) | |
tree | 0e0562f76987eae2d0a90f718fabf9670a2dc5cd | |
parent | 24e1815bb03777a193cc307cad7424bbf50b0415 (diff) | |
download | postgresql-9ac53e797860a498ef0ea13d0e2b39df7b5cc6bd.tar.gz postgresql-9ac53e797860a498ef0ea13d0e2b39df7b5cc6bd.zip |
Detect and error out on inability to get proper linkage information required for plperl, usually due to absence of perl ExtUtils::Embed module. Backpatch as far as 8.1.
-rw-r--r-- | config/perl.m4 | 12 | ||||
-rwxr-xr-x | configure | 15 |
2 files changed, 24 insertions, 3 deletions
diff --git a/config/perl.m4 b/config/perl.m4 index 55c34574ebc..808c86b52b8 100644 --- a/config/perl.m4 +++ b/config/perl.m4 @@ -1,4 +1,4 @@ -# $PostgreSQL: pgsql/config/perl.m4,v 1.3 2003/11/29 19:51:17 pgsql Exp $ +# $PostgreSQL: pgsql/config/perl.m4,v 1.3.10.1 2008/11/12 00:00:29 adunstan Exp $ # PGAC_PATH_PERL @@ -32,4 +32,12 @@ pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts` pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'` perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"` AC_SUBST(perl_embed_ldflags)dnl -AC_MSG_RESULT([$perl_embed_ldflags])]) +if test -z "$perl_embed_ldflags" ; then + AC_MSG_RESULT(no) + AC_MSG_ERROR([could not determine flags for linking embedded Perl. +This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not +installed.]) +else + AC_MSG_RESULT([$perl_embed_ldflags]) +fi +])# PGAC_CHECK_PERL_EMBED_LDFLAGS diff --git a/configure b/configure index c8f621ee2d0..7195d7d9749 100755 --- a/configure +++ b/configure @@ -5337,10 +5337,23 @@ echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts` pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'` perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"` -echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5 +if test -z "$perl_embed_ldflags" ; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: could not determine flags for linking embedded Perl. +This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not +installed." >&5 +echo "$as_me: error: could not determine flags for linking embedded Perl. +This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not +installed." >&2;} + { (exit 1); exit 1; }; } +else + echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5 echo "${ECHO_T}$perl_embed_ldflags" >&6 fi +fi + if test "$with_python" = yes; then # Extract the first word of "python", so it can be a program name with args. set dummy python; ac_word=$2 |