From 364b6c4bb3463f7ffdf55b7f7adc3b515febb7c7 Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Mon, 14 Apr 2008 03:45:05 +0000 Subject: * 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 --- configure | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 58 insertions(+), 13 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 51846550b..b44e53d20 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 12578 . +# From configure.in Revision: 12586 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # @@ -1267,6 +1267,10 @@ Optional Packages: --with-mysql[=ARG] use MySQL client library, optionally specify the path to the mysql_config executable (by default mysql is used if found) + --with-MYSQL_CFLAGS=ARG specify MYSQL_CFLAGS manually (instead of using + "mysql_config --include") + --with-MYSQL_LIBS=ARG specify MYSQL_LIBS manually (instead of using + "mysql_config --libs") --with-pcre[=ARG] use PCRE library, optionally specify the full path of pcre installation directory (by default pcre is used if found) @@ -1832,6 +1836,40 @@ fi +# +# Manual MYSQL_CFLAGS (optional) +# + +# Check whether --with-MYSQL_CFLAGS was given. +if test "${with_MYSQL_CFLAGS+set}" = set; then + withval=$with_MYSQL_CFLAGS; + manual_MYSQL_CFLAGS="yes" + MYSQL_CFLAGS="$withval" + +else + manual_MYSQL_CFLAGS="no" + +fi + + + +# +# Manual MYSQL_LIBS (optional) +# + +# Check whether --with-MYSQL_LIBS was given. +if test "${with_MYSQL_LIBS+set}" = set; then + withval=$with_MYSQL_LIBS; + manual_MYSQL_LIBS="yes" + MYSQL_LIBS="$withval" + +else + manual_MYSQL_LIBS="no" + +fi + + + # # Enable/disable PCRE and optionally specify the path (optional library) # @@ -4778,11 +4816,11 @@ fi # # MySQL library (optional) # -MYSQL_VERSION="" -MYSQL_CFLAGS="" -MYSQL_LIBS="" if test "$want_mysql" = "no" ; then + MYSQL_VERSION="" + MYSQL_CFLAGS="" + MYSQL_LIBS="" { echo "$as_me:$LINENO: ignoring MySQL (optional)" >&5 echo "$as_me: ignoring MySQL (optional)" >&6;} else @@ -4832,12 +4870,19 @@ fi 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`" + 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" - { echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient" >&5 + MYSQL_OLD_LDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS $MYSQL_LIBS" + MYSQL_OLD_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS" + { echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient" >&5 echo $ECHO_N "checking for mysql_init in -lmysqlclient... $ECHO_C" >&6; } if test "${ac_cv_lib_mysqlclient_mysql_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4902,7 +4947,7 @@ if test $ac_cv_lib_mysqlclient_mysql_init = yes; then HAVE_MYSQL="yes" fi - if test "${ac_cv_header_mysql_h+set}" = set; then + if test "${ac_cv_header_mysql_h+set}" = set; then { echo "$as_me:$LINENO: checking for mysql.h" >&5 echo $ECHO_N "checking for mysql.h... $ECHO_C" >&6; } if test "${ac_cv_header_mysql_h+set}" = set; then @@ -5034,9 +5079,9 @@ else fi - CPPFLAGS="$MYSQL_OLD_CPPFLAGS" - LDFLAGS="$MYSQL_OLD_LDFLAGS" - fi + CPPFLAGS="$MYSQL_OLD_CPPFLAGS" + LDFLAGS="$MYSQL_OLD_LDFLAGS" + { echo "$as_me:$LINENO: checking MySQL library (optional)" >&5 echo $ECHO_N "checking MySQL library (optional)... $ECHO_C" >&6; } if test "$HAVE_MYSQL" = "yes" ; then -- cgit v1.2.3-60-g2f50