Skip to content

Commit b1b8059

Browse files
committed
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 (php_config.h) as done in other extensions.
1 parent 3ff6874 commit b1b8059

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

UPGRADING.INTERNALS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ PHP 8.5 INTERNALS UPGRADE NOTES
5252
- Linux build system changes
5353
. libdir is properly set when --libdir (ex: /usr/lib64) and --with-libdir (ex lib64)
5454
configure options are used to ${libdir}/php (ex: /usr/lib64/php)
55+
. PHP_ODBC_CFLAGS, PHP_ODBC_LFLAGS, PHP_ODBC_LIBS, PHP_ODBC_TYPE preprocessor
56+
macros defined by ext/odbc are now defined in php_config.h instead of the
57+
build-defs.h header.
5558

5659
========================
5760
3. Module changes

ext/odbc/config.m4

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,16 @@ if test -n "$ODBC_TYPE"; then
428428

429429
AC_DEFINE([HAVE_UODBC], [1],
430430
[Define to 1 if the PHP extension 'odbc' is available.])
431+
AC_DEFINE_UNQUOTED([PHP_ODBC_CFLAGS], ["$ODBC_CFLAGS"],
432+
[The compile options that PHP odbc extension was built with.])
433+
AC_DEFINE_UNQUOTED([PHP_ODBC_LIBS], ["$ODBC_LIBS"],
434+
[The libraries linker flags that PHP odbc extension was built with.])
435+
AC_DEFINE_UNQUOTED([PHP_ODBC_LFLAGS], ["$ODBC_LFLAGS"],
436+
[The linker flags that PHP odbc extension was built with.])
437+
AC_DEFINE_UNQUOTED([PHP_ODBC_TYPE], ["$ODBC_TYPE"],
438+
[The ODBC library used in the PHP odbc extension.])
439+
431440
PHP_SUBST([ODBC_SHARED_LIBADD])
432-
AC_SUBST([ODBC_CFLAGS])
433-
AC_SUBST([ODBC_LIBS])
434-
AC_SUBST([ODBC_LFLAGS])
435-
AC_SUBST([ODBC_TYPE])
436441

437442
PHP_NEW_EXTENSION([odbc],
438443
[php_odbc.c odbc_utils.c],

main/build-defs.h.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
*/
1616

1717
#define CONFIGURE_COMMAND "@CONFIGURE_COMMAND@"
18-
#define PHP_ODBC_CFLAGS "@ODBC_CFLAGS@"
19-
#define PHP_ODBC_LFLAGS "@ODBC_LFLAGS@"
20-
#define PHP_ODBC_LIBS "@ODBC_LIBS@"
21-
#define PHP_ODBC_TYPE "@ODBC_TYPE@"
2218
#define PHP_PROG_SENDMAIL "@PROG_SENDMAIL@"
2319
#define PEAR_INSTALLDIR "@EXPANDED_PEAR_INSTALLDIR@"
2420
#define PHP_INCLUDE_PATH "@INCLUDE_PATH@"

0 commit comments

Comments
 (0)