From a1542fae523a304cb0d67c2b29b9a31703487628 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Sun, 20 Mar 2011 11:09:57 +0000 Subject: * Updates the to configure script. - Added check, whether or not '-Wno-pointer-sign' can actually be used (caused warnings with g++). - Math library is no longer considered required, when math functions are available without it (made configure fail on platforms, where no separate math library is present). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14749 54d463be-8e91-2dee-dedb-b68131a5f0ec --- configure.in | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index afc35ee3a..c659ad142 100644 --- a/configure.in +++ b/configure.in @@ -318,7 +318,24 @@ OLD_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wno-pointer-sign" AC_COMPILE_IFELSE( [int foo;], - [AC_MSG_RESULT([yes])], + [ + AC_MSG_RESULT([yes]) + AC_MSG_CHECKING([whether $CC can actually use -Wno-pointer-sign]) + # This option causes warnings in C++ mode + # Note: -Werror must be before -Wno-pointer-sign, otherwise it does not do anything + CFLAGS="$OLD_CFLAGS -Werror -Wno-pointer-sign" + AC_COMPILE_IFELSE( + [int foo;], + [ + AC_MSG_RESULT([yes]) + CFLAGS="$OLD_CFLAGS -Wno-pointer-sign" + ], + [ + AC_MSG_RESULT([no]) + CFLAGS="$OLD_CFLAGS" + ] + ) + ], [ AC_MSG_RESULT([no]) CFLAGS="$OLD_CFLAGS" @@ -555,7 +572,7 @@ AC_CHECK_HEADER([zlib.h], [], [AC_MSG_ERROR([zlib header not found, please speci # # math library (required) # -AC_CHECK_LIB([m], [sqrt], [], [AC_MSG_ERROR([math library not found... stopping])]) +AC_SEARCH_LIBS([sqrt], [m], [], [AC_MSG_ERROR([math library not found... stopping])]) # -- cgit v1.2.3-60-g2f50