Skip to content

Commit 6b3a69b

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 as done in other extensions.
1 parent 4dc7795 commit 6b3a69b

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

ext/odbc/config.m4

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

426426
AC_DEFINE([HAVE_UODBC], [1],
427427
[Define to 1 if the PHP extension 'odbc' is available.])
428+
AC_DEFINE_UNQUOTED([PHP_ODBC_CFLAGS], ["$ODBC_CFLAGS"],
429+
[The compile options that PHP odbc extension was built with.])
430+
AC_DEFINE_UNQUOTED([PHP_ODBC_LIBS], ["$ODBC_LIBS"],
431+
[The libraries linker flags that PHP odbc extension was built with.])
432+
AC_DEFINE_UNQUOTED([PHP_ODBC_LFLAGS], ["$ODBC_LFLAGS"],
433+
[The linker flags that PHP odbc extension was built with.])
434+
AC_DEFINE_UNQUOTED([PHP_ODBC_TYPE], ["$ODBC_TYPE"],
435+
[The ODBC library used in the PHP odbc extension.])
436+
428437
PHP_SUBST([ODBC_SHARED_LIBADD])
429-
AC_SUBST([ODBC_CFLAGS])
430-
AC_SUBST([ODBC_LIBS])
431-
AC_SUBST([ODBC_LFLAGS])
432-
AC_SUBST([ODBC_TYPE])
433438

434439
PHP_NEW_EXTENSION([odbc],
435440
[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)