diff options
author | Tom Lane | 2008-05-20 03:30:22 +0000 |
---|---|---|
committer | Tom Lane | 2008-05-20 03:30:22 +0000 |
commit | 1ac1bea076be24f03c9c59911a8575222baef7f1 (patch) | |
tree | 09291270abcfd8c4170101a077b616b7dd998e52 /config/c-compiler.m4 | |
parent | 9f194709665e1f7d7e5064ee4e78134eb0a6b125 (diff) |
Adjust -Wl,--asneeded test to avoid using the switch if it breaks
libreadline. What we will do for compatibility :-(
Diffstat (limited to 'config/c-compiler.m4')
-rw-r--r-- | config/c-compiler.m4 | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/config/c-compiler.m4 b/config/c-compiler.m4 index 2e3fba877a3..7422f9572e6 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.17 2008/05/18 20:13:12 tgl Exp $ +# $PostgreSQL: pgsql/config/c-compiler.m4,v 1.18 2008/05/20 03:30:21 tgl Exp $ # PGAC_C_SIGNED @@ -117,11 +117,13 @@ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], # ------------------------ # Given a string, check if the compiler supports the string as a # command-line option. If it does, add the string to LDFLAGS. +# For reasons you'd really rather not know about, this checks whether +# you can link to a particular function, not just whether you can link. 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_LINK_IFELSE([AC_LANG_CALL([],[$2])], AC_MSG_RESULT(yes), [LDFLAGS="$pgac_save_LDFLAGS" AC_MSG_RESULT(no)]) |