truncl: Fix autoconf test.
authorBruno Haible <bruno@clisp.org>
Fri, 30 Jul 2010 19:18:13 +0000 (21:18 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 30 Jul 2010 19:18:13 +0000 (21:18 +0200)
ChangeLog
m4/truncl.m4

index 79b35368825ca260905ac06510726eb479a9eeb9..5a8f0b40aea9e872010fd370711e6ae8e3e94162 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-30  Bruno Haible  <bruno@clisp.org>
+
+       truncl: Fix autoconf test.
+       * m4/truncl.m4 (gl_FUNC_TRUNCL): Add TRUNCL_LIBM to LIBS while testing
+       whether truncl works.
+       Reported by Rainer Tammer.
+
 2010-07-30  Bruno Haible  <bruno@clisp.org>
 
        round: Update regarding AIX.
index 0498585b2033a1df69aa736fe914a0fdac099913..49f006520fa3f741e01fb7981a56d5012fb35dae 100644 (file)
@@ -1,4 +1,4 @@
-# truncl.m4 serial 4
+# truncl.m4 serial 5
 dnl Copyright (C) 2007-2008, 2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -40,6 +40,8 @@ AC_DEFUN([gl_FUNC_TRUNCL],
       TRUNCL_LIBM=
     fi
     dnl Test whether truncl() works. It crashes on OSF/1 4.0d.
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $TRUNCL_LIBM"
     AC_CACHE_CHECK([whether truncl works], [gl_cv_func_truncl_works],
       [
         AC_TRY_RUN([
@@ -56,6 +58,7 @@ int main()
            esac
           ])
       ])
+    LIBS="$save_LIBS"
     case "$gl_cv_func_truncl_works" in
       *yes) ;;
       *) REPLACE_TRUNCL=1 ;;