From: Barak Itkin Date: Fri, 18 May 2012 13:30:39 +0000 (+0300) Subject: Fix the configure script to work when the math functions are built-in X-Git-Tag: p2tc-0.1.0~74 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f01f009625847ab61cfa36ed0ecde9870a96045f;p=poly2tri-c Fix the configure script to work when the math functions are built-in --- 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])