From 4e3d9411473f378b502d32e24eebe2d905d142bf Mon Sep 17 00:00:00 2001 From: jylam Date: Sun, 19 Oct 2008 10:24:41 +0000 Subject: [PATCH] * Added a better math library detection git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@3016 92316355-f0b4-4df1-b90c-862c8a59935f --- configure.ac | 5 +++++ src/Makefile.am | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 63e4788..bf88938 100644 --- a/configure.ac +++ b/configure.ac @@ -87,6 +87,9 @@ CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer" # Code qui fait des warnings == code de porc == deux baffes dans ta gueule CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare" + +AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm") + # Use DevIL? #AC_CHECK_HEADERS(IL/il.h, # [ac_cv_my_have_il="yes"], @@ -169,6 +172,8 @@ if test "${ac_cv_my_have_il}" = "no" -a "${ac_cv_my_have_ole}" = "no" -a "${ac_c AC_MSG_ERROR([[cannot find DevIL, OLE, SDL_Image, Imlib2, Cocoa, or OpenCV, please install one of them]]) fi +AC_SUBST(MATH_LIBS) + # Build pipi-sharp? AC_PATH_PROG(GMCS, gmcs, no) AM_CONDITIONAL(USE_CSHARP, test "${GMCS}" != "no") diff --git a/src/Makefile.am b/src/Makefile.am index 22f3b9d..10e6631 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,5 +5,6 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/pipi -I../pipi bin_PROGRAMS = pipi pipi_SOURCES = pipi.c $(GETOPT) -pipi_LDADD = ../pipi/libpipi.la $(GETOPT_LIBS) +pipi_LDADD = ../pipi/libpipi.la $(GETOPT_LIBS) @MATH_LIBS@ +