changeset 33189:37d7bd3f8a39

truncl: Fix autoconf test.
author Bruno Haible <bruno@clisp.org>
date Fri, 30 Jul 2010 21:18:13 +0200
parents c0da50f818a3
children fa8013e6e2f4
files ChangeLog m4/truncl.m4
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jul 30 21:14:41 2010 +0200
+++ b/ChangeLog	Fri Jul 30 21:18:13 2010 +0200
@@ -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.
--- a/m4/truncl.m4	Fri Jul 30 21:14:41 2010 +0200
+++ b/m4/truncl.m4	Fri Jul 30 21:18:13 2010 +0200
@@ -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 @@
       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 @@
            esac
           ])
       ])
+    LIBS="$save_LIBS"
     case "$gl_cv_func_truncl_works" in
       *yes) ;;
       *) REPLACE_TRUNCL=1 ;;