summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-14 03:45:05 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-14 03:45:05 +0000
commit364b6c4bb3463f7ffdf55b7f7adc3b515febb7c7 (patch)
treeec34bed54ae3e458afa1d6a74c41c396d89c9ad5 /configure.in
parentb9e69523ae1c8894fe5e70cfcaa72a5851f5f27c (diff)
downloadhercules-364b6c4bb3463f7ffdf55b7f7adc3b515febb7c7.tar.gz
hercules-364b6c4bb3463f7ffdf55b7f7adc3b515febb7c7.tar.bz2
hercules-364b6c4bb3463f7ffdf55b7f7adc3b515febb7c7.tar.xz
hercules-364b6c4bb3463f7ffdf55b7f7adc3b515febb7c7.zip
* Changes to the configure script:
- added options --with-MYSQL_CFLAGS and --with-MYSQL_LIBS to allow manual setting of those variables git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12586 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in65
1 files changed, 53 insertions, 12 deletions
diff --git a/configure.in b/configure.in
index ac0e7b436..6bc3d3918 100644
--- a/configure.in
+++ b/configure.in
@@ -120,6 +120,40 @@ AC_ARG_WITH(
#
+# Manual MYSQL_CFLAGS (optional)
+#
+AC_ARG_WITH(
+ [MYSQL_CFLAGS],
+ AC_HELP_STRING(
+ [--with-MYSQL_CFLAGS=ARG],
+ [specify MYSQL_CFLAGS manually (instead of using "mysql_config --include")]
+ ),
+ [
+ manual_MYSQL_CFLAGS="yes"
+ MYSQL_CFLAGS="$withval"
+ ],
+ [manual_MYSQL_CFLAGS="no"]
+)
+
+
+#
+# Manual MYSQL_LIBS (optional)
+#
+AC_ARG_WITH(
+ [MYSQL_LIBS],
+ AC_HELP_STRING(
+ [--with-MYSQL_LIBS=ARG],
+ [specify MYSQL_LIBS manually (instead of using "mysql_config --libs")]
+ ),
+ [
+ manual_MYSQL_LIBS="yes"
+ MYSQL_LIBS="$withval"
+ ],
+ [manual_MYSQL_LIBS="no"]
+)
+
+
+#
# Enable/disable PCRE and optionally specify the path (optional library)
#
AC_ARG_WITH(
@@ -337,11 +371,11 @@ AC_CHECK_LIB([rt], [clock_gettime])
#
# MySQL library (optional)
#
-MYSQL_VERSION=""
-MYSQL_CFLAGS=""
-MYSQL_LIBS=""
if test "$want_mysql" = "no" ; then
+ MYSQL_VERSION=""
+ MYSQL_CFLAGS=""
+ MYSQL_LIBS=""
AC_MSG_NOTICE([ignoring MySQL (optional)])
else
if test -z "$MYSQL_CONFIG_HOME"; then
@@ -350,16 +384,23 @@ else
if test "$MYSQL_CONFIG_HOME" != "no" ; then
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"
+ if test "$manual_MYSQL_CFLAGS" = "no" ; then
+ MYSQL_CFLAGS="`$MYSQL_CONFIG_HOME --include`"
+ fi
+ if test "$manual_MYSQL_LIBS" = "no" ; then
+ MYSQL_LIBS="`$MYSQL_CONFIG_HOME --libs`"
+ fi
+ else
+ MYSQL_VERSION="unknown"
fi
+
+ 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"
+
AC_MSG_CHECKING([MySQL library (optional)])
if test "$HAVE_MYSQL" = "yes" ; then
AC_MSG_RESULT([yes ($MYSQL_VERSION)])