Skip to content

Commit

Permalink
Print checking message for all ODBC drivers
Browse files Browse the repository at this point in the history
This makes the output more readble in case no ODBC driver was selected
  • Loading branch information
kaplanlior authored and smalyshev committed Mar 23, 2015
1 parent 7a41574 commit 6f5ed34
Showing 1 changed file with 36 additions and 12 deletions.
48 changes: 36 additions & 12 deletions ext/odbc/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH(adabas,,
[ --with-adabas[=DIR] Include Adabas D support [/usr/local]],no,no)

AC_MSG_CHECKING([for Adabas support])
if test "$PHP_ADABAS" != "no"; then
AC_MSG_CHECKING([for Adabas support])
if test "$PHP_ADABAS" = "yes"; then
PHP_ADABAS=/usr/local
fi
Expand All @@ -128,15 +128,17 @@ PHP_ARG_WITH(adabas,,
PHP_ODBC_CHECK_HEADER(sqlext.h)
AC_DEFINE(HAVE_ADABAS,1,[ ])
AC_MSG_RESULT([$ext_output])
else
AC_MSG_RESULT(no)
fi
fi

if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH(sapdb,,
[ --with-sapdb[=DIR] Include SAP DB support [/usr/local]],no,no)

AC_MSG_CHECKING([for SAP DB support])
if test "$PHP_SAPDB" != "no"; then
AC_MSG_CHECKING([for SAP DB support])
if test "$PHP_SAPDB" = "yes"; then
PHP_SAPDB=/usr/local
fi
Expand All @@ -146,15 +148,17 @@ PHP_ARG_WITH(sapdb,,
ODBC_TYPE=sapdb
AC_DEFINE(HAVE_SAPDB,1,[ ])
AC_MSG_RESULT([$ext_output])
else
AC_MSG_RESULT(no)
fi
fi

if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH(solid,,
[ --with-solid[=DIR] Include Solid support [/usr/local/solid]],no,no)

AC_MSG_CHECKING(for Solid support)
if test "$PHP_SOLID" != "no"; then
AC_MSG_CHECKING(for Solid support)
if test "$PHP_SOLID" = "yes"; then
PHP_SOLID=/usr/local/solid
fi
Expand All @@ -171,15 +175,17 @@ PHP_ARG_WITH(solid,,
fi
AC_MSG_RESULT([$ext_output])
PHP_ODBC_FIND_SOLID_LIBS($ODBC_LIBDIR)
else
AC_MSG_RESULT(no)
fi
fi

if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH(ibm-db2,,
[ --with-ibm-db2[=DIR] Include IBM DB2 support [/home/db2inst1/sqllib]],no,no)

AC_MSG_CHECKING(for IBM DB2 support)
if test "$PHP_IBM_DB2" != "no"; then
AC_MSG_CHECKING(for IBM DB2 support)
if test "$PHP_IBM_DB2" = "yes"; then
ODBC_INCDIR=/home/db2inst1/sqllib/include
ODBC_LIBDIR=/home/db2inst1/sqllib/lib
Expand Down Expand Up @@ -208,15 +214,17 @@ You need to source your DB2 environment before running PHP configure:
], [
$ODBC_LFLAGS $ODBC_LIBS
])
else
AC_MSG_RESULT(no)
fi
fi

if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH(ODBCRouter,,
[ --with-ODBCRouter[=DIR] Include ODBCRouter.com support [/usr]],no,no)

AC_MSG_CHECKING(for ODBCRouter.com support)
if test "$PHP_ODBCROUTER" != "no"; then
AC_MSG_CHECKING(for ODBCRouter.com support)
if test "$PHP_ODBCROUTER" = "yes"; then
PHP_ODBCROUTER=/usr
fi
Expand All @@ -228,6 +236,8 @@ PHP_ARG_WITH(ODBCRouter,,
ODBC_TYPE=ODBCRouter
AC_DEFINE(HAVE_ODBC_ROUTER,1,[ ])
AC_MSG_RESULT([$ext_output])
else
AC_MSG_RESULT(no)
fi
fi

Expand All @@ -236,8 +246,8 @@ PHP_ARG_WITH(empress,,
[ --with-empress[=DIR] Include Empress support [\$EMPRESSPATH]
(Empress Version >= 8.60 required)],no,no)

AC_MSG_CHECKING(for Empress support)
if test "$PHP_EMPRESS" != "no"; then
AC_MSG_CHECKING(for Empress support)
if test "$PHP_EMPRESS" = "yes"; then
ODBC_INCDIR=$EMPRESSPATH/include/odbc
ODBC_LIBDIR=$EMPRESSPATH/shlib
Expand All @@ -251,6 +261,8 @@ PHP_ARG_WITH(empress,,
AC_DEFINE(HAVE_EMPRESS,1,[ ])
AC_MSG_RESULT([$ext_output])
PHP_ODBC_FIND_EMPRESS_LIBS($ODBC_LIBDIR)
else
AC_MSG_RESULT(no)
fi
fi

Expand All @@ -260,8 +272,8 @@ PHP_ARG_WITH(empress-bcs,,
Include Empress Local Access support [\$EMPRESSPATH]
(Empress Version >= 8.60 required)],no,no)

AC_MSG_CHECKING(for Empress local access support)
if test "$PHP_EMPRESS_BCS" != "no"; then
AC_MSG_CHECKING(for Empress local access support)
if test "$PHP_EMPRESS_BCS" = "yes"; then
ODBC_INCDIR=$EMPRESSPATH/include/odbc
ODBC_LIBDIR=$EMPRESSPATH/shlib
Expand Down Expand Up @@ -291,15 +303,17 @@ PHP_ARG_WITH(empress-bcs,,
AC_DEFINE(HAVE_EMPRESS,1,[ ])
AC_MSG_RESULT([$ext_output])
PHP_ODBC_FIND_EMPRESS_BCS_LIBS($ODBC_LIBDIR)
else
AC_MSG_RESULT(no)
fi
fi

if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH(birdstep,,
[ --with-birdstep[=DIR] Include Birdstep support [/usr/local/birdstep]],no,no)

AC_MSG_CHECKING(for Birdstep support)
if test "$PHP_BIRDSTEP" != "no"; then
AC_MSG_CHECKING(for Birdstep support)
if test "$PHP_BIRDSTEP" = "yes"; then
ODBC_INCDIR=/usr/local/birdstep/include
ODBC_LIBDIR=/usr/local/birdstep/lib
Expand Down Expand Up @@ -338,6 +352,8 @@ PHP_ARG_WITH(birdstep,,

AC_DEFINE(HAVE_BIRDSTEP,1,[ ])
AC_MSG_RESULT([$ext_output])
else
AC_MSG_RESULT(no)
fi
fi

Expand All @@ -352,8 +368,8 @@ PHP_ARG_WITH(custom-odbc,,
LDFLAGS=-lunix
CUSTOM_ODBC_LIBS=\"-ldblib -lodbc\"],no,no)

AC_MSG_CHECKING(for a custom ODBC support)
if test "$PHP_CUSTOM_ODBC" != "no"; then
AC_MSG_CHECKING(for a custom ODBC support)
if test "$PHP_CUSTOM_ODBC" = "yes"; then
PHP_CUSTOM_ODBC=/usr/local
fi
Expand All @@ -365,15 +381,17 @@ PHP_ARG_WITH(custom-odbc,,
ODBC_TYPE=custom-odbc
AC_DEFINE(HAVE_CODBC,1,[ ])
AC_MSG_RESULT([$ext_output])
else
AC_MSG_RESULT(no)
fi
fi

if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH(iodbc,,
[ --with-iodbc[=DIR] Include iODBC support [/usr/local]],no,no)

AC_MSG_CHECKING(for iODBC support)
if test "$PHP_IODBC" != "no"; then
AC_MSG_CHECKING(for iODBC support)
if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
Expand Down Expand Up @@ -401,15 +419,17 @@ PHP_ARG_WITH(iodbc,,
AC_DEFINE(HAVE_ODBC2,1,[ ])
AC_MSG_RESULT([$ext_output])
fi
else
AC_MSG_RESULT(no)
fi
fi

if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH(esoob,,
[ --with-esoob[=DIR] Include Easysoft OOB support [/usr/local/easysoft/oob/client]],no,no)

AC_MSG_CHECKING(for Easysoft ODBC-ODBC Bridge support)
if test "$PHP_ESOOB" != "no"; then
AC_MSG_CHECKING(for Easysoft ODBC-ODBC Bridge support)
if test "$PHP_ESOOB" = "yes"; then
PHP_ESOOB=/usr/local/easysoft/oob/client
fi
Expand Down Expand Up @@ -444,15 +464,17 @@ PHP_ARG_WITH(unixODBC,,
PHP_ODBC_CHECK_HEADER(sqlext.h)
AC_DEFINE(HAVE_UNIXODBC,1,[ ])
AC_MSG_RESULT([$ext_output])
else
AC_MSG_RESULT(no)
fi
fi

if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH(dbmaker,,
[ --with-dbmaker[=DIR] Include DBMaker support],no,no)

AC_MSG_CHECKING(for DBMaker support)
if test "$PHP_DBMAKER" != "no"; then
AC_MSG_CHECKING(for DBMaker support)
if test "$PHP_DBMAKER" = "yes"; then
# find dbmaker's home directory
DBMAKER_HOME=`grep "^dbmaker:" /etc/passwd | $AWK -F: '{print $6}'`
Expand Down Expand Up @@ -494,6 +516,8 @@ PHP_ARG_WITH(dbmaker,,
PHP_ADD_INCLUDE($ODBC_INCDIR)
ODBC_STATIC="libphpext_odbc.la"
fi
else
AC_MSG_RESULT(no)
fi
fi

Expand Down

0 comments on commit 6f5ed34

Please sign in to comment.