diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.in b/configure.in index ffac14af4cd..d47b4e5911b 100644 --- a/configure.in +++ b/configure.in @@ -972,7 +972,7 @@ PL/Perl.]) 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 + if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then perl_includedir="$PG_SYSROOT$perl_archlibexp" fi fi @@ -2102,6 +2102,11 @@ if test "$with_tcl" = yes; then AC_MSG_ERROR([cannot build PL/Tcl because Tcl is not a shared library Use --without-tcl to disable building PL/Tcl.]) fi + # Some macOS versions report an include spec that uses -iwithsysroot. + # We don't really want to use -isysroot, so translate that if we can. + if test x"$PG_SYSROOT" != x"" ; then + TCL_INCLUDE_SPEC="`echo "$TCL_INCLUDE_SPEC" | sed "s|-iwithsysroot */|-I $PG_SYSROOT/|"`" + fi # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h> ac_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS" |