aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure2
-rw-r--r--configure.in2
-rw-r--r--src/template/darwin1
3 files changed, 5 insertions, 0 deletions
diff --git a/configure b/configure
index e616927a066..86b6a9aa5ff 100755
--- a/configure
+++ b/configure
@@ -19031,8 +19031,10 @@ _ACEOF
# literally, so that it's possible to override it at build time using
# a command like "make ... PG_SYSROOT=path". This has to be done after
# we've finished all configure checks that depend on CPPFLAGS.
+# The same for LDFLAGS, too.
if test x"$PG_SYSROOT" != x; then
CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
+ LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
fi
diff --git a/configure.in b/configure.in
index 8697482d80a..e4b43a235f3 100644
--- a/configure.in
+++ b/configure.in
@@ -2427,8 +2427,10 @@ AC_SUBST(PG_VERSION_NUM)
# literally, so that it's possible to override it at build time using
# a command like "make ... PG_SYSROOT=path". This has to be done after
# we've finished all configure checks that depend on CPPFLAGS.
+# The same for LDFLAGS, too.
if test x"$PG_SYSROOT" != x; then
CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
+ LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
fi
AC_SUBST(PG_SYSROOT)
diff --git a/src/template/darwin b/src/template/darwin
index f4d4e9d7cf8..32414d21a98 100644
--- a/src/template/darwin
+++ b/src/template/darwin
@@ -11,6 +11,7 @@ fi
if test x"$PG_SYSROOT" != x"" ; then
if test -d "$PG_SYSROOT" ; then
CPPFLAGS="-isysroot $PG_SYSROOT $CPPFLAGS"
+ LDFLAGS="-isysroot $PG_SYSROOT $LDFLAGS"
else
PG_SYSROOT=""
fi