aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index efd96bcc479..4a4175544b7 100644
--- a/configure.in
+++ b/configure.in
@@ -926,6 +926,15 @@ You might have to rebuild your Perl installation. Refer to the
documentation for details. Use --without-perl to disable building
PL/Perl.])
fi
+ # On most platforms, archlibexp is also where the Perl include files live ...
+ perl_includedir="$perl_archlibexp"
+ # ... but on some macOS versions, we must look under $PG_SYSROOT instead
+ if test x"$PG_SYSROOT" != x"" ; then
+ if test -d "$PG_SYSROOT$perl_archlibexp" ; then
+ perl_includedir="$PG_SYSROOT$perl_archlibexp"
+ fi
+ fi
+ AC_SUBST(perl_includedir)dnl
PGAC_CHECK_PERL_EMBED_CCFLAGS
PGAC_CHECK_PERL_EMBED_LDFLAGS
fi
@@ -2041,7 +2050,7 @@ fi
# check for <perl.h>
if test "$with_perl" = yes; then
ac_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
+ CPPFLAGS="$CPPFLAGS -I$perl_includedir/CORE"
AC_CHECK_HEADER(perl.h, [], [AC_MSG_ERROR([header file <perl.h> is required for Perl])],
[#include <EXTERN.h>])
# While we're at it, check that we can link to libperl.