Skip to content

Commit

Permalink
Someone strap down Jani and give him a sedative please.
Browse files Browse the repository at this point in the history
This makes our toolchain work with the latest versions
of autoconf and avoids a lot of end-user grief.
  • Loading branch information
rasmus committed Nov 25, 2009
1 parent 8b7a3d0 commit ef83c32
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,32 @@ if test "$PHP_PDO_4D" != "no"; then
],[
AC_MSG_CHECKING([for PDO includes])
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
pdo_cv_inc_path=$abs_srcdir/ext
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
pdo_cv_inc_path=$abs_srcdir/ext
elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$prefix/include/php/ext
pdo_cv_inc_path=$prefix/include/php/ext
else
AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
fi
AC_MSG_RESULT($pdo_inc_path)
AC_MSG_RESULT($pdo_cv_inc_path)
])
PHP_ADD_INCLUDE($pdo_inc_path)
PHP_ADD_INCLUDE("$pdo_inc_path/pdo")
PHP_ADD_INCLUDE($pdo_cv_inc_path)
PHP_ADD_INCLUDE("$pdo_cv_inc_path/pdo")

if test "$PHP_PDO_4D" != "yes"; then
PDO_4D_DIR=$PHP_PDO_4D
PHP_ADD_INCLUDE("$PHP_PDO_4D/include")
PHP_ADD_LIBRARY_WITH_PATH(4d_sql, "$PDO_4D_DIR/lib", PDO_4D_SHARED_LIBADD)

AC_DEFINE(HAVE_PDO_4D,1,[ ])
PHP_NEW_EXTENSION(pdo_4d, pdo_4d.c 4d_driver.c 4d_statement.c, $ext_shared,,-I$pdo_inc_path)
PHP_NEW_EXTENSION(pdo_4d, pdo_4d.c 4d_driver.c 4d_statement.c, $ext_shared,,-I$pdo_cv_inc_path)
else
#use bundled lib4d_sql
pdo_4d_sources=" pdo_4d.c 4d_driver.c 4d_statement.c"
lib4d_sql_sources="lib4d_sql/base64.c lib4d_sql/communication.c lib4d_sql/fourd.c lib4d_sql/fourd_interne.c lib4d_sql/fourd_result.c lib4d_sql/fourd_type.c lib4d_sql/sqlstate.c lib4d_sql/utils.c"

PHP_NEW_EXTENSION(pdo_4d, $lib4d_sql_sources $pdo_4d_sources, $ext_shared,,-I$pdo_inc_path -I@ext_srcdir@/lib4d_sql)
PHP_NEW_EXTENSION(pdo_4d, $lib4d_sql_sources $pdo_4d_sources, $ext_shared,,-I$pdo_cv_inc_path -I@ext_srcdir@/lib4d_sql)
PHP_ADD_BUILD_DIR($ext_builddir/lib4d_sql)

AC_DEFINE(HAVE_PDO_4D,1,[ ])
Expand Down

0 comments on commit ef83c32

Please sign in to comment.