From 6b3a69b2b05ccc6c73e334504d2e95d9c9def916 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Mon, 2 Sep 2024 02:04:27 +0200 Subject: [PATCH] Autotools: Move PHP_ODBC_* defines to configuration header The PHP_ODBC_* defines are remains of the PHP 2 and 3 era where the ODBC functionality was part of the PHP core and was later moved to an extension. This moves these defines to a regular PHP configuration header as done in other extensions. --- ext/odbc/config.m4 | 13 +++++++++---- main/build-defs.h.in | 4 ---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4 index ed72b777f5ded..c2e5c5c6ec90e 100644 --- a/ext/odbc/config.m4 +++ b/ext/odbc/config.m4 @@ -425,11 +425,16 @@ if test -n "$ODBC_TYPE"; then AC_DEFINE([HAVE_UODBC], [1], [Define to 1 if the PHP extension 'odbc' is available.]) + AC_DEFINE_UNQUOTED([PHP_ODBC_CFLAGS], ["$ODBC_CFLAGS"], + [The compile options that PHP odbc extension was built with.]) + AC_DEFINE_UNQUOTED([PHP_ODBC_LIBS], ["$ODBC_LIBS"], + [The libraries linker flags that PHP odbc extension was built with.]) + AC_DEFINE_UNQUOTED([PHP_ODBC_LFLAGS], ["$ODBC_LFLAGS"], + [The linker flags that PHP odbc extension was built with.]) + AC_DEFINE_UNQUOTED([PHP_ODBC_TYPE], ["$ODBC_TYPE"], + [The ODBC library used in the PHP odbc extension.]) + PHP_SUBST([ODBC_SHARED_LIBADD]) - AC_SUBST([ODBC_CFLAGS]) - AC_SUBST([ODBC_LIBS]) - AC_SUBST([ODBC_LFLAGS]) - AC_SUBST([ODBC_TYPE]) PHP_NEW_EXTENSION([odbc], [php_odbc.c odbc_utils.c], diff --git a/main/build-defs.h.in b/main/build-defs.h.in index f0cbdb631c0d5..72cd9c30fb743 100644 --- a/main/build-defs.h.in +++ b/main/build-defs.h.in @@ -15,10 +15,6 @@ */ #define CONFIGURE_COMMAND "@CONFIGURE_COMMAND@" -#define PHP_ODBC_CFLAGS "@ODBC_CFLAGS@" -#define PHP_ODBC_LFLAGS "@ODBC_LFLAGS@" -#define PHP_ODBC_LIBS "@ODBC_LIBS@" -#define PHP_ODBC_TYPE "@ODBC_TYPE@" #define PHP_PROG_SENDMAIL "@PROG_SENDMAIL@" #define PEAR_INSTALLDIR "@EXPANDED_PEAR_INSTALLDIR@" #define PHP_INCLUDE_PATH "@INCLUDE_PATH@"