diff options
author | Ondřej Surý <ondrej@sury.org> | 2013-10-27 20:38:12 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2013-10-27 20:38:12 +0100 |
commit | 749e5ad39dbac3f4f62be438367f8cdf90056815 (patch) | |
tree | ad0677df3bf44a6761380686e400ffd878585288 /ext/odbc/config.m4 | |
parent | 4ed39205864f58ba7c368e4ae1362d8214469fd9 (diff) | |
download | php-749e5ad39dbac3f4f62be438367f8cdf90056815.tar.gz |
New upstream version 5.4.21upstream/5.4.21
Diffstat (limited to 'ext/odbc/config.m4')
-rw-r--r-- | ext/odbc/config.m4 | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4 index 5be3288f3..a1201db57 100644 --- a/ext/odbc/config.m4 +++ b/ext/odbc/config.m4 @@ -370,18 +370,33 @@ PHP_ARG_WITH(iodbc,, if test "$PHP_IODBC" != "no"; then AC_MSG_CHECKING(for iODBC support) - if test "$PHP_IODBC" = "yes"; then - PHP_IODBC=/usr/local + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libiodbc ; then + PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR) + ODBC_TYPE=iodbc + ODBC_INCLUDE=`$PKG_CONFIG --cflags-only-I libiodbc` + ODBC_LFLAGS=`$PKG_CONFIG --libs-only-L libiodbc` + ODBC_LIBS=`$PKG_CONFIG --libs-only-l libiodbc` + PHP_EVAL_INCLINE($ODBC_INCLUDE) + AC_DEFINE(HAVE_IODBC,1,[ ]) + AC_DEFINE(HAVE_ODBC2,1,[ ]) + AC_MSG_RESULT([$ext_output]) + else + if test "$PHP_IODBC" = "yes"; then + PHP_IODBC=/usr/local + fi + PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR) + PHP_ADD_INCLUDE($PHP_IODBC/include, 1) + ODBC_TYPE=iodbc + ODBC_INCLUDE=-I$PHP_IODBC/include + ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR + ODBC_LIBS=-liodbc + AC_DEFINE(HAVE_IODBC,1,[ ]) + AC_DEFINE(HAVE_ODBC2,1,[ ]) + AC_MSG_RESULT([$ext_output]) fi - PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR) - PHP_ADD_INCLUDE($PHP_IODBC/include, 1) - ODBC_TYPE=iodbc - ODBC_INCLUDE=-I$PHP_IODBC/include - ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR - ODBC_LIBS=-liodbc - AC_DEFINE(HAVE_IODBC,1,[ ]) - AC_DEFINE(HAVE_ODBC2,1,[ ]) - AC_MSG_RESULT([$ext_output]) fi fi |