]> granicus.if.org Git - php/commitdiff
Use PKG_CHECK_MODULES to detect unixODBC
authorHugh McMaster <hugh.mcmaster@outlook.com>
Mon, 20 May 2019 12:48:14 +0000 (22:48 +1000)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 22 May 2019 07:04:05 +0000 (09:04 +0200)
UPGRADING
ext/odbc/config.m4

index 1de5b39187380fa093cdd24130a43f4dd00691e7..91f26e9a076628a73c383308dc2066338e99284e 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -536,6 +536,7 @@ The following extensions and SAPIs are affected:
 
 - ODBC:
   . --with-iodbc no longer accepts a directory.
+  . --with-unixODBC no longer accepts a directory.
 
 - OpenSSL:
   . --with-openssl no longer accepts a directory.
index 792aaef5bb8d88d5167cb5e17e91565a668fbcd0..1fdce146cd633306b57dc05ba4aa3bdd2668a733 100644 (file)
@@ -357,23 +357,16 @@ fi
 
 if test -z "$ODBC_TYPE"; then
 PHP_ARG_WITH([unixODBC],,
-  [AS_HELP_STRING([[--with-unixODBC[=DIR]]],
-    [Include unixODBC support [/usr/local]])])
+  [AS_HELP_STRING([--with-unixODBC],
+    [Include unixODBC support])])
 
-  AC_MSG_CHECKING(for unixODBC support)
+  AC_MSG_CHECKING(whether to build with unixODBC support)
   if test "$PHP_UNIXODBC" != "no"; then
-    if test "$PHP_UNIXODBC" = "yes"; then
-      PHP_UNIXODBC=/usr/local
-    fi
-    ODBC_INCDIR=$PHP_UNIXODBC/include
-    ODBC_LIBDIR=$PHP_UNIXODBC/$PHP_LIBDIR
-    ODBC_LFLAGS=-L$ODBC_LIBDIR
-    ODBC_CFLAGS=-I$ODBC_INCDIR
-    ODBC_LIBS=-lodbc
+    AC_MSG_RESULT(yes)
+    PKG_CHECK_MODULES([ODBC], [odbc])
+    PHP_EVAL_INCLINE($ODBC_CFLAGS)
     ODBC_TYPE=unixODBC
-    PHP_ODBC_CHECK_HEADER(sqlext.h)
     AC_DEFINE(HAVE_UNIXODBC,1,[ ])
-    AC_MSG_RESULT([$ext_output])
   else
     AC_MSG_RESULT(no)
   fi