mirror of
https://github.com/postgres/postgres.git
synced 2025-07-09 22:41:56 +03:00
Fix ELF test so it doesn't spit up on all non-ELF systems...
use Autoconf-approved method of testing for predefined symbols, and move it down to where we know what compiler to run and how to run it.
This commit is contained in:
852
src/configure
vendored
852
src/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -58,18 +58,12 @@ nextstep*) os=nextstep need_tas=no ;;
|
|||||||
exit;;
|
exit;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# If this test fails then it is ELF for sure
|
PORTNAME=${os}
|
||||||
if echo __ELF__ | ${CC} -E - | grep -q __ELF__
|
CPU=${host_cpu}
|
||||||
then
|
AC_LINK_FILES(backend/port/dynloader/${os}.c, backend/port/dynloader.c)
|
||||||
if test "X$elf" = "Xyes"
|
AC_LINK_FILES(backend/port/dynloader/${os}.h, include/dynloader.h)
|
||||||
then
|
AC_LINK_FILES(include/port/${os}.h, include/os.h)
|
||||||
ELF_SYS=true
|
AC_LINK_FILES(makefiles/Makefile.${os}, Makefile.port)
|
||||||
else
|
|
||||||
ELF_SYS=
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
ELF_SYS=true
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "X$need_tas" = "Xyes"
|
if test "X$need_tas" = "Xyes"
|
||||||
then
|
then
|
||||||
@ -78,13 +72,6 @@ then
|
|||||||
AC_SUBST(TAS)
|
AC_SUBST(TAS)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PORTNAME=${os}
|
|
||||||
CPU=${host_cpu}
|
|
||||||
AC_LINK_FILES(backend/port/dynloader/${os}.c, backend/port/dynloader.c)
|
|
||||||
AC_LINK_FILES(backend/port/dynloader/${os}.h, include/dynloader.h)
|
|
||||||
AC_LINK_FILES(include/port/${os}.h, include/os.h)
|
|
||||||
AC_LINK_FILES(makefiles/Makefile.${os}, Makefile.port)
|
|
||||||
|
|
||||||
echo "checking echo setting..."
|
echo "checking echo setting..."
|
||||||
if echo '\c' | grep -s c >/dev/null 2>&1
|
if echo '\c' | grep -s c >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
@ -424,6 +411,22 @@ echo "- setting CPPFLAGS=$CPPFLAGS"
|
|||||||
LDFLAGS="$LDFLAGS $PGSQL_LDFLAGS"
|
LDFLAGS="$LDFLAGS $PGSQL_LDFLAGS"
|
||||||
echo "- setting LDFLAGS=$LDFLAGS"
|
echo "- setting LDFLAGS=$LDFLAGS"
|
||||||
|
|
||||||
|
# Assume system is ELF if it predefines __ELF__ as 1,
|
||||||
|
# otherwise believe "elf" setting from check of host_os above.
|
||||||
|
AC_EGREP_CPP(yes,
|
||||||
|
[#if __ELF__
|
||||||
|
yes
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
ELF_SYS=true,
|
||||||
|
[if test "X$elf" = "Xyes"
|
||||||
|
then
|
||||||
|
ELF_SYS=true
|
||||||
|
else
|
||||||
|
ELF_SYS=
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
AC_SUBST(ELF_SYS)
|
AC_SUBST(ELF_SYS)
|
||||||
AC_SUBST(PORTNAME)
|
AC_SUBST(PORTNAME)
|
||||||
AC_SUBST(CPU)
|
AC_SUBST(CPU)
|
||||||
|
Reference in New Issue
Block a user