summaryrefslogtreecommitdiff
path: root/config/c-compiler.m4
diff options
context:
space:
mode:
authorTom Lane2011-05-26 21:29:33 +0000
committerTom Lane2011-05-26 21:29:33 +0000
commit44404f394517f89a0bebb1aaace6e64ad79d2817 (patch)
treeaa4709ac762a6e97693dbd01fb586b65570c134f /config/c-compiler.m4
parent7b158d1baed859971c1aa792bff6a7e1f721cf91 (diff)
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.
Diffstat (limited to 'config/c-compiler.m4')
-rw-r--r--config/c-compiler.m43
1 files changed, 3 insertions, 0 deletions
diff --git a/config/c-compiler.m4 b/config/c-compiler.m4
index 9c069f4c929..9398ca6c477 100644
--- a/config/c-compiler.m4
+++ b/config/c-compiler.m4
@@ -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"