summaryrefslogtreecommitdiff
path: root/ext/mysql
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>1999-04-23 03:28:47 +0000
committerRasmus Lerdorf <rasmus@php.net>1999-04-23 03:28:47 +0000
commitcad2318a549dff68a7c4d36b5b6b8924f57e6547 (patch)
tree8005d6ec7d40391acdba7b031d9a0361cc6a2e05 /ext/mysql
parent551fe7780b570701e93d4680f677801f39e41b49 (diff)
downloadphp-git-cad2318a549dff68a7c4d36b5b6b8924f57e6547.tar.gz
Module work
Diffstat (limited to 'ext/mysql')
-rw-r--r--ext/mysql/config.m423
1 files changed, 19 insertions, 4 deletions
diff --git a/ext/mysql/config.m4 b/ext/mysql/config.m4
index a6ba195a0e..d8c826bfe6 100644
--- a/ext/mysql/config.m4
+++ b/ext/mysql/config.m4
@@ -3,13 +3,28 @@ dnl $Id$
AC_MSG_CHECKING(for MySQL support)
AC_ARG_WITH(mysql,
[ --with-mysql[=DIR] Include MySQL support. DIR is the MySQL base
- install directory, defaults to /usr/local.],
+ install directory, defaults to searching through
+ a number of common places for the MySQL files.],
[
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
- MYSQL_INCDIR=/usr/local/include/mysql
- MYSQL_LIBDIR=/usr/local/lib/mysql
- else
+ if test -f /usr/include/mysql/mysql.h; then
+ MYSQL_INCDIR=/usr/include/mysql
+ MYSQL_LIBDIR=/usr/lib/mysql
+ elif test -f /usr/include/mysql.h; then
+ MYSQL_INCDIR=/usr/include
+ MYSQL_LIBDIR=/usr/lib
+ elif test -f /usr/local/include/mysql/mysql.h; then
+ MYSQL_INCDIR=/usr/local/include/mysql
+ MYSQL_LIBDIR=/usr/local/lib/mysql
+ elif test -f /usr/local/include/mysql.h; then
+ MYSQL_INCDIR=/usr/local/include
+ MYSQL_LIBDIR=/usr/local/lib
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Invalid MySQL directory - unable to find mysql.h)
+ fi
+ else
if test -f $withval/include/mysql/mysql.h; then
MYSQL_INCDIR=$withval/include/mysql
MYSQL_LIBDIR=$withval/lib/mysql