From 02f37bd8c4bfdd35869007d142267cd9a1f671b9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 6 Nov 2006 03:44:38 +0000 Subject: Revert to the pre-8.2 method of probing for libm, that is, always include it if it links properly. It seems too risky to assume that standard functions like pow() are not special-cased by the compiler. Per report from Andreas Lange that build fails on Solaris cc compiler with -fast. Even though we don't consider that a supported option, I'm worried that similar issues will arise with other compilers. --- configure.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 471e9b9ba6..514329473a 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $PostgreSQL: pgsql/configure.in,v 1.485 2006/10/30 22:15:04 petere Exp $ +dnl $PostgreSQL: pgsql/configure.in,v 1.486 2006/11/06 03:44:37 tgl Exp $ dnl dnl Developers, please strive to achieve this order: dnl @@ -640,9 +640,14 @@ AC_DEFINE_UNQUOTED(PG_VERSION_NUM, $PG_VERSION_NUM, [PostgreSQL version as a num ## ## Libraries ## +## Most libraries are included only if they demonstrably provide a function +## we need, but libm is an exception: always include it, because there are +## too many compilers that play cute optimization games that will break +## probes for standard functions such as pow(). +## +AC_CHECK_LIB(m, main) AC_SEARCH_LIBS(setproctitle, util) -AC_SEARCH_LIBS(pow, m) AC_SEARCH_LIBS(dlopen, dl) AC_SEARCH_LIBS(socket, [socket wsock32]) AC_SEARCH_LIBS(shl_load, dld) -- cgit v1.2.1