summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-27 12:08:07 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-27 12:08:07 +0000
commit9599b05c3cd2145ea9cd9fe7ce98912705942740 (patch)
treea91d81b614547166f6b6d6e03307c1ba18a94106 /configure.in
parent957ecdfbb008733cded26a6dab20c7ac13814f58 (diff)
downloadhercules-9599b05c3cd2145ea9cd9fe7ce98912705942740.tar.gz
hercules-9599b05c3cd2145ea9cd9fe7ce98912705942740.tar.bz2
hercules-9599b05c3cd2145ea9cd9fe7ce98912705942740.tar.xz
hercules-9599b05c3cd2145ea9cd9fe7ce98912705942740.zip
* Changed the configure script:
- refined the mysql test (wasn't detecting 64 libraries compiled without -m64) - added a test for clock_gettime in -lrt (required for Debian) (run ./configure to update the Makefiles) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11985 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in66
1 files changed, 38 insertions, 28 deletions
diff --git a/configure.in b/configure.in
index 69a403895..2751d945e 100644
--- a/configure.in
+++ b/configure.in
@@ -289,6 +289,29 @@ fi
#
+# zlib library (required)
+#
+if test -n "${ZLIB_HOME}" ; then
+ LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
+ CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
+fi
+AC_CHECK_LIB([z], [inflateEnd], [],[AC_MSG_ERROR([zlib library not found or incompatible, please specify the correct path with --with-zlib=DIR... stopping])])
+AC_CHECK_HEADER([zlib.h], [], [AC_MSG_ERROR([zlib header not found, please specify the correct path with --with-zlib=DIR... stopping])])
+
+
+#
+# math library (required)
+#
+AC_CHECK_LIB([m], [sqrt], [], [AC_MSG_ERROR([math library not found... stopping])])
+
+
+#
+# clock_gettime (rt on Debian)
+#
+AC_CHECK_LIB([rt], [clock_gettime])
+
+
+#
# MySQL library (optional)
#
MYSQL_VERSION=""
@@ -302,22 +325,30 @@ else
AC_PATH_PROG([MYSQL_CONFIG_HOME], [mysql_config], [no])
fi
- AC_MSG_CHECKING([MySQL library (optional)])
if test "$MYSQL_CONFIG_HOME" != "no" ; then
- HAVE_MYSQL="yes"
MYSQL_VERSION="`$MYSQL_CONFIG_HOME --version`"
MYSQL_CFLAGS="`$MYSQL_CONFIG_HOME --include`"
MYSQL_LIBS="`$MYSQL_CONFIG_HOME --libs`"
+
+ MYSQL_OLD_LDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS $MYSQL_LIBS"
+ MYSQL_OLD_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS"
+ AC_CHECK_LIB([mysqlclient], [mysql_init], [HAVE_MYSQL="yes"], [])
+ AC_CHECK_HEADER([mysql.h], [], [HAVE_MYSQL=""])
+ CPPFLAGS="$MYSQL_OLD_CPPFLAGS"
+ LDFLAGS="$MYSQL_OLD_LDFLAGS"
+ fi
+ AC_MSG_CHECKING([MySQL library (optional)])
+ if test "$HAVE_MYSQL" = "yes" ; then
AC_MSG_RESULT([yes ($MYSQL_VERSION)])
- if test -n "`$MYSQL_CONFIG_HOME --cflags | grep -i '\-m64'`"; then
- AC_MSG_ERROR([$MYSQL_CONFIG_HOME reported a 64 bit MySQL, please specify a 32bit version with --with-mysql=<path to mysql_config>... stopping])
- fi
else
AC_MSG_RESULT([no])
if test "$require_mysql" = "yes" ; then
- AC_MSG_ERROR([MySQL not found (requested)])
+ AC_MSG_ERROR([MySQL not found or incompatible (requested)])
else
AC_MSG_NOTICE([disabling MySQL (optional)])
+ MYSQL_VERSION=""
+ MYSQL_CFLAGS=""
+ MYSQL_LIBS=""
fi
fi
fi
@@ -328,7 +359,6 @@ AC_SUBST([MYSQL_CFLAGS])
AC_SUBST([MYSQL_LIBS])
-
#
# PCRE library (optional)
#
@@ -361,7 +391,7 @@ else
else
AC_MSG_RESULT([no])
if test "$require_pcre" = "yes" ; then
- AC_MSG_ERROR([PCRE not found (requested)])
+ AC_MSG_ERROR([PCRE not found or incompatible (requested)])
else
AC_MSG_NOTICE([disabling PCRE (optional)])
fi
@@ -373,26 +403,6 @@ AC_SUBST([PCRE_LIBS])
AC_SUBST([PCRE_CFLAGS])
-
-#
-# zlib library (required)
-#
-if test -n "${ZLIB_HOME}" ; then
- LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
- CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
-fi
-AC_CHECK_LIB([z], [inflateEnd], ,[AC_MSG_ERROR([zlib library not found, please specify the correct path with --with-zlib=DIR... stopping])])
-AC_CHECK_HEADER([zlib.h], , [AC_MSG_ERROR([zlib header not found, please specify the correct path with --with-zlib=DIR... stopping])])
-
-
-
-#
-# math library (required)
-#
-AC_CHECK_LIB([m], [sqrt], [], [AC_MSG_ERROR([math library not found... stopping])])
-
-
-
#
# Host specific stuff
#