1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Adjust configure to use "+Olibmerrno" with HP-UX C compiler, if possible.

This is reported to be necessary on some versions of that OS.  In service
of this, cause PGAC_PROG_CC_CFLAGS_OPT to reject switches that result in
compiler warnings, since on yet other versions of that OS, the switch does
nothing except provoke a warning.

Report and patch by Ibrar Ahmed, further tweaking by me.
This commit is contained in:
Tom Lane
2011-05-26 17:29:33 -04:00
parent 7b158d1bae
commit 44404f3945
3 changed files with 94 additions and 0 deletions

View File

@ -130,9 +130,12 @@ AC_DEFUN([PGAC_PROG_CC_CFLAGS_OPT],
AC_CACHE_CHECK([whether $CC supports $1], [Ac_cachevar],
[pgac_save_CFLAGS=$CFLAGS
CFLAGS="$pgac_save_CFLAGS $1"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[Ac_cachevar=yes],
[Ac_cachevar=no])
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"])
if test x"$Ac_cachevar" = x"yes"; then
CFLAGS="$CFLAGS $1"