Skip to content

Autotools: Move PHP_ODBC_* defines to configuration header #15708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ PHP 8.5 INTERNALS UPGRADE NOTES
- Linux build system changes
. libdir is properly set when --libdir (ex: /usr/lib64) and --with-libdir (ex lib64)
configure options are used to ${libdir}/php (ex: /usr/lib64/php)
. PHP_ODBC_CFLAGS, PHP_ODBC_LFLAGS, PHP_ODBC_LIBS, PHP_ODBC_TYPE preprocessor
macros defined by ext/odbc are now defined in php_config.h instead of the
build-defs.h header.

========================
3. Module changes
Expand Down
13 changes: 9 additions & 4 deletions ext/odbc/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,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],
Expand Down
4 changes: 0 additions & 4 deletions main/build-defs.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@"
Expand Down