diff --git a/configure b/configure index dacef817ded..d1334e71e54 100755 --- a/configure +++ b/configure @@ -16264,8 +16264,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 42989b932b0..916a94a8b18 100644 --- a/configure.in +++ b/configure.in @@ -2234,8 +2234,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