Created
April 13, 2009 08:05
-
-
Save yappo/94339 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- configure.in.orig 2009-04-13 16:38:51.000000000 +0900 | |
+++ configure.in 2009-04-13 17:00:46.000000000 +0900 | |
@@ -23,13 +23,15 @@ | |
AC_SUBST(MYSQL_INC) | |
-# check if prefix points to mysql 5.1 | |
-if test ! -e "${prefix}/include/mysql/plugin.h" -a ! -e "${prefix}/include/mysql.h" | |
-then | |
- echo "failed to lacate mysql 5.1 installation" >&2 | |
- echo "Please specify mysql 5.1 directory with --prefix option." >&2 | |
- exit 1 | |
-fi | |
+AC_ARG_WITH(mysql_config, | |
+ [ --with-mysql_config=/usr/bin/mysql_config mysql_config bin path ], | |
+ [ | |
+ mysql_include=`${with_mysql_config} --include | sed s/-I//` | |
+ libdir=`${with_mysql_config} --plugindir` | |
+ MYSQL_LIBDIR=`${with_mysql_config} --plugindir | sed "s/\/plugin//"` | |
+ ], | |
+ [ | |
+ mysql_include="${prefix}/include" | |
# change libdir to prefix/lib/mysql unless otherwise specified | |
MYSQL_LIBDIR="${prefix}/lib" | |
@@ -44,6 +46,18 @@ | |
libdir="${libdir}/plugin" | |
fi | |
fi | |
+ ] | |
+) | |
+ | |
+ | |
+# check if prefix points to mysql 5.1 | |
+if test ! -e "${mysql_include}/mysql/plugin.h" -a ! -e "${mysql_include}/mysql.h" | |
+then | |
+ echo "failed to lacate mysql 5.1 installation" >&2 | |
+ echo "Please specify mysql 5.1 directory with --prefix option." >&2 | |
+ exit 1 | |
+fi | |
+ | |
AC_SUBST(MYSQL_LIBDIR) | |
# We only support GCC and Sun's forte at the moment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment