# PGAC_CHECK_PERL_EMBED_LDFLAGS
# -----------------------------
# We are after Embed's ldopts, but without the subset mentioned in
-# Config's ccdlflags; and also without any -arch flags, which recent
-# Apple releases put in unhelpfully. (If you want a multiarch build
-# you'd better be specifying it in more places than plperl's final link.)
+# Config's ccdlflags and ldflags. (Those are the choices of those who
+# built the Perl installation, which are not necessarily appropriate
+# for building PostgreSQL.)
AC_DEFUN([PGAC_CHECK_PERL_EMBED_LDFLAGS],
[AC_REQUIRE([PGAC_PATH_PERL])
AC_MSG_CHECKING(for flags to link embedded Perl)
fi
else
pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
- pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
- perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e ["s/ -arch [-a-zA-Z0-9_]*//g"]`
+ pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
+ perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
fi
AC_SUBST(perl_embed_ldflags)dnl
if test -z "$perl_embed_ldflags" ; then
fi
else
pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
- pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
- perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
+ pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
+ perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
fi
if test -z "$perl_embed_ldflags" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5