summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-03-20 11:09:57 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-03-20 11:09:57 +0000
commita1542fae523a304cb0d67c2b29b9a31703487628 (patch)
treedd6853cb3c15dd51c37c60cf040da376a28ffe9a /configure.in
parent80ea72ef5feaca9c9b0368ad3f65e527ce653165 (diff)
downloadhercules-a1542fae523a304cb0d67c2b29b9a31703487628.tar.gz
hercules-a1542fae523a304cb0d67c2b29b9a31703487628.tar.bz2
hercules-a1542fae523a304cb0d67c2b29b9a31703487628.tar.xz
hercules-a1542fae523a304cb0d67c2b29b9a31703487628.zip
* 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
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in21
1 files changed, 19 insertions, 2 deletions
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])])
#