diff options
Diffstat (limited to 'config/c-compiler.m4')
-rw-r--r-- | config/c-compiler.m4 | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/config/c-compiler.m4 b/config/c-compiler.m4 index cc25cf94ba0..2e3fba877a3 100644 --- a/config/c-compiler.m4 +++ b/config/c-compiler.m4 @@ -1,5 +1,5 @@ # Macros to detect C compiler features -# $PostgreSQL: pgsql/config/c-compiler.m4,v 1.16 2008/04/18 18:43:08 alvherre Exp $ +# $PostgreSQL: pgsql/config/c-compiler.m4,v 1.17 2008/05/18 20:13:12 tgl Exp $ # PGAC_C_SIGNED @@ -110,3 +110,19 @@ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [CFLAGS="$pgac_save_CFLAGS" AC_MSG_RESULT(no)]) ])# PGAC_PROG_CC_CFLAGS_OPT + + + +# PGAC_PROG_CC_LDFLAGS_OPT +# ------------------------ +# Given a string, check if the compiler supports the string as a +# command-line option. If it does, add the string to LDFLAGS. +AC_DEFUN([PGAC_PROG_CC_LDFLAGS_OPT], +[AC_MSG_CHECKING([if $CC supports $1]) +pgac_save_LDFLAGS=$LDFLAGS +LDFLAGS="$pgac_save_LDFLAGS $1" +AC_LINK_IFELSE([AC_LANG_PROGRAM()], + AC_MSG_RESULT(yes), + [LDFLAGS="$pgac_save_LDFLAGS" + AC_MSG_RESULT(no)]) +])# PGAC_PROG_CC_LDFLAGS_OPT |