From f01f009625847ab61cfa36ed0ecde9870a96045f Mon Sep 17 00:00:00 2001 From: Barak Itkin Date: Fri, 18 May 2012 16:30:39 +0300 Subject: [PATCH] Fix the configure script to work when the math functions are built-in --- configure.ac | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9dc739c..9783595 100644 --- a/configure.ac +++ b/configure.ac @@ -27,15 +27,23 @@ LT_INIT # Find a C compiler AC_PROG_CC +# Finding a function which may be built-in in GCC is known to fail when using +# -Werror, so we will only add that option afterwards. For more information, see +# the discussion at http://lists.gnu.org/archive/html/bug-autoconf/2010-01/msg00031.html + # Pedantic errors please -CFLAGS="$CFLAGS -Wall -Werror -ansi -pedantic" +CFLAGS="$CFLAGS -Wall -ansi -pedantic" # Find the standard math functions # Taken from http://www.flameeyes.eu/autotools-mythbuster/autoconf/finding.html +AC_CHECK_HEADERS([math.h]) AC_SEARCH_LIBS([log10], [m], [], [ AC_MSG_ERROR([unable to find the log10() function]) ]) +# Warnings as errors please +CFLAGS="$CFLAGS -Werror" + # Find GLib support via pkg-config PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.28]) -- 2.50.1