1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Refactor HAVE_SQLDATASOURCES check (#15222)

On Windows, this preprocessor macro is moved to odbc extension, in
Autotools check CS is synced and some basic help text is added.
This commit is contained in:
Peter Kokot
2024-08-04 11:57:01 +02:00
committed by GitHub
parent dcdcb3cbfe
commit f16ab75171
3 changed files with 8 additions and 7 deletions

View File

@@ -440,12 +440,13 @@ fi
dnl Extension setup
if test -n "$ODBC_TYPE"; then
if test "$ODBC_TYPE" != "dbmaker"; then
PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], ODBC_SHARED_LIBADD)
if test "$ODBC_TYPE" != "solid"; then
AC_DEFINE(HAVE_SQLDATASOURCES,1,[ ])
fi
fi
AS_VAR_IF([ODBC_TYPE], [dbmaker],, [
PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], [ODBC_SHARED_LIBADD])
AS_VAR_IF([ODBC_TYPE], [solid],,
[AC_DEFINE([HAVE_SQLDATASOURCES], [1],
[Define to 1 if ODBC library has 'SQLDataSources', as a function or
macro.])])
])
AC_DEFINE([HAVE_UODBC], [1],
[Define to 1 if the PHP extension 'odbc' is available.])

View File

@@ -9,6 +9,7 @@ if (PHP_ODBC == "yes") {
&& CHECK_HEADER_ADD_INCLUDE("sqlext.h", "CFLAGS_ODBC")) {
EXTENSION("odbc", "php_odbc.c odbc_utils.c", PHP_ODBC_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
AC_DEFINE("HAVE_UODBC", 1, "Define to 1 if the PHP extension 'odbc' is available.");
AC_DEFINE("HAVE_SQLDATASOURCES", 1, "Define to 1 if ODBC library has 'SQLDataSources', as a function or macro.");
if ("no" == PHP_ODBCVER) {
AC_DEFINE("ODBCVER", "0x0350", "The highest supported ODBC version", false);
} else if ("0" != PHP_ODBCVER) {

View File

@@ -95,7 +95,6 @@
#define HAVE_GLOB
#define PHP_SHLIB_SUFFIX "dll"
#define PHP_SHLIB_EXT_PREFIX "php_"
#define HAVE_SQLDATASOURCES
/* Win32 supports socketpair by the emulation in win32/sockets.c */
#define HAVE_SOCKETPAIR 1