2001-12-01 03:00:13 +08:00
|
|
|
dnl
|
2001-06-01 13:02:13 +08:00
|
|
|
dnl $Id$
|
2001-12-01 03:00:13 +08:00
|
|
|
dnl
|
2001-06-01 13:02:13 +08:00
|
|
|
|
2005-06-22 16:26:00 +08:00
|
|
|
AC_DEFUN([PHP_ODBC_CHECK_HEADER],[
|
|
|
|
if ! test -f "$ODBC_INCDIR/$1"; then
|
|
|
|
AC_MSG_ERROR([ODBC header file '$ODBC_INCDIR/$1' not found!])
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
1999-04-20 09:03:12 +08:00
|
|
|
dnl
|
|
|
|
dnl Figure out which library file to link with for the Solid support.
|
|
|
|
dnl
|
2005-06-22 16:26:00 +08:00
|
|
|
AC_DEFUN([PHP_ODBC_FIND_SOLID_LIBS],[
|
2000-07-01 03:22:52 +08:00
|
|
|
AC_MSG_CHECKING([Solid library file])
|
|
|
|
ac_solid_uname_r=`uname -r 2>/dev/null`
|
1999-04-20 09:03:12 +08:00
|
|
|
ac_solid_uname_s=`uname -s 2>/dev/null`
|
|
|
|
case $ac_solid_uname_s in
|
2000-11-22 23:31:04 +08:00
|
|
|
AIX) ac_solid_os=a3x;; # a4x for AIX4/ Solid 2.3/3.0 only
|
2000-07-01 03:22:52 +08:00
|
|
|
HP-UX) ac_solid_os=h9x;; # h1x for hpux11, h0x for hpux10
|
2002-11-13 01:31:39 +08:00
|
|
|
IRIX) ac_solid_os=irx;; # Solid 2.3(?)/ 3.0 only
|
|
|
|
Linux)
|
|
|
|
if ldd -v /bin/sh | grep GLIBC > /dev/null; then
|
|
|
|
AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ])
|
|
|
|
ac_solid_os=l2x
|
2005-06-22 16:26:00 +08:00
|
|
|
else
|
2002-11-13 01:31:39 +08:00
|
|
|
AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ])
|
|
|
|
ac_solid_os=lux
|
|
|
|
fi;;
|
|
|
|
SunOS)
|
|
|
|
ac_solid_os=ssx;; # should we deal with SunOS 4?
|
|
|
|
FreeBSD)
|
|
|
|
if test `expr $ac_solid_uname_r : '\(.\)'` -gt "2"; then
|
|
|
|
AC_DEFINE(SS_FBX,1,[Needed in sqlunix.h for wchar defs ])
|
|
|
|
ac_solid_os=fex
|
|
|
|
else
|
|
|
|
AC_DEFINE(SS_FBX,1,[Needed in sqlunix.h for wchar defs ])
|
|
|
|
ac_solid_os=fbx
|
|
|
|
fi;;
|
1999-04-20 09:03:12 +08:00
|
|
|
esac
|
2000-07-01 03:22:52 +08:00
|
|
|
|
2000-11-22 23:31:04 +08:00
|
|
|
if test -f $1/soc${ac_solid_os}35.a; then
|
|
|
|
ac_solid_version=35
|
|
|
|
ac_solid_prefix=soc
|
|
|
|
elif test -f $1/scl${ac_solid_os}30.a; then
|
2000-11-17 23:09:46 +08:00
|
|
|
ac_solid_version=30
|
2000-07-01 03:22:52 +08:00
|
|
|
ac_solid_prefix=scl
|
|
|
|
elif test -f $1/scl${ac_solid_os}23.a; then
|
|
|
|
ac_solid_version=23
|
|
|
|
ac_solid_prefix=scl
|
|
|
|
fi
|
|
|
|
|
2000-11-22 23:31:04 +08:00
|
|
|
#
|
|
|
|
# Check for the library files, and setup the ODBC_LIBS path...
|
|
|
|
#
|
|
|
|
if test ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \
|
2005-06-22 16:26:00 +08:00
|
|
|
! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then
|
2002-11-13 01:31:39 +08:00
|
|
|
#
|
|
|
|
# we have an error and should bail out, as we can't find the libs!
|
|
|
|
#
|
|
|
|
echo ""
|
|
|
|
echo "*********************************************************************"
|
|
|
|
echo "* Unable to locate $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
|
|
|
|
echo "* Please correct this by creating the following links and reconfiguring:"
|
|
|
|
echo "* $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a"
|
|
|
|
echo "* $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so"
|
|
|
|
echo "*********************************************************************"
|
2000-12-29 03:12:28 +08:00
|
|
|
else
|
2002-11-13 01:31:39 +08:00
|
|
|
ODBC_LFLAGS=-L$1
|
|
|
|
ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version}
|
2000-11-22 23:31:04 +08:00
|
|
|
fi
|
|
|
|
|
1999-04-20 09:03:12 +08:00
|
|
|
AC_MSG_RESULT(`echo $ODBC_LIBS | sed -e 's!.*/!!'`)
|
|
|
|
])
|
|
|
|
|
2000-07-01 03:22:52 +08:00
|
|
|
|
1999-04-20 09:03:12 +08:00
|
|
|
dnl
|
|
|
|
dnl Figure out which library file to link with for the Empress support.
|
|
|
|
dnl
|
2005-06-22 16:26:00 +08:00
|
|
|
|
|
|
|
AC_DEFUN([PHP_ODBC_FIND_EMPRESS_LIBS],[
|
1999-04-20 09:03:12 +08:00
|
|
|
AC_MSG_CHECKING([Empress library file])
|
2001-05-09 23:35:31 +08:00
|
|
|
ODBC_LIBS=`echo $1/libempodbccl.so | cut -d' ' -f1`
|
1999-04-20 09:03:12 +08:00
|
|
|
if test ! -f $ODBC_LIBS; then
|
2001-05-09 23:35:31 +08:00
|
|
|
ODBC_LIBS=`echo $1/libempodbccl.so | cut -d' ' -f1`
|
1999-04-20 09:03:12 +08:00
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(`echo $ODBC_LIBS | sed -e 's!.*/!!'`)
|
|
|
|
])
|
|
|
|
|
2005-06-22 16:26:00 +08:00
|
|
|
AC_DEFUN([PHP_ODBC_FIND_EMPRESS_BCS_LIBS],[
|
2001-05-09 23:35:31 +08:00
|
|
|
AC_MSG_CHECKING([Empress local access library file])
|
|
|
|
ODBCBCS_LIBS=`echo $1/libempodbcbcs.a | cut -d' ' -f1`
|
|
|
|
if test ! -f $ODBCBCS_LIBS; then
|
|
|
|
ODBCBCS_LIBS=`echo $1/libempodbcbcs.a | cut -d' ' -f1`
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(`echo $ODBCBCS_LIBS | sed -e 's!.*/!!'`)
|
|
|
|
])
|
|
|
|
|
2007-07-12 07:20:37 +08:00
|
|
|
dnl
|
|
|
|
dnl configure options
|
|
|
|
dnl
|
2015-03-08 14:34:51 +08:00
|
|
|
|
|
|
|
PHP_ARG_WITH(odbcver,,
|
|
|
|
[ --with-odbcver[=HEX] Force support for the passed ODBC version. A hex number is expected, default 0x0300.
|
|
|
|
Use the special value of 0 to prevent an explicit ODBCVER to be defined. ], 0x0300)
|
|
|
|
|
1999-04-19 23:04:11 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
2007-07-12 07:20:37 +08:00
|
|
|
PHP_ARG_WITH(adabas,,
|
2015-03-25 17:33:08 +08:00
|
|
|
[ --with-adabas[=DIR] Include Adabas D support [/usr/local]])
|
2007-07-12 07:20:37 +08:00
|
|
|
|
2015-03-23 04:30:32 +08:00
|
|
|
AC_MSG_CHECKING([for Adabas support])
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$PHP_ADABAS" != "no"; then
|
|
|
|
if test "$PHP_ADABAS" = "yes"; then
|
|
|
|
PHP_ADABAS=/usr/local
|
|
|
|
fi
|
|
|
|
PHP_ADD_INCLUDE($PHP_ADABAS/incl)
|
|
|
|
PHP_ADD_LIBPATH($PHP_ADABAS/$PHP_LIBDIR)
|
|
|
|
ODBC_OBJS="$PHP_ADABAS/$PHP_LIBDIR/odbclib.a"
|
2001-06-01 13:02:13 +08:00
|
|
|
ODBC_LIB="$abs_builddir/ext/odbc/libodbc_adabas.a"
|
1999-12-31 08:21:01 +08:00
|
|
|
$srcdir/build/shtool mkdir -f -p ext/odbc
|
|
|
|
rm -f "$ODBC_LIB"
|
|
|
|
cp "$ODBC_OBJS" "$ODBC_LIB"
|
2002-11-13 01:31:39 +08:00
|
|
|
PHP_ADD_LIBRARY(sqlptc)
|
|
|
|
PHP_ADD_LIBRARY(sqlrte)
|
2001-03-28 04:35:04 +08:00
|
|
|
PHP_ADD_LIBRARY_WITH_PATH(odbc_adabas, $abs_builddir/ext/odbc)
|
1999-04-19 23:04:11 +08:00
|
|
|
ODBC_TYPE=adabas
|
2007-07-17 20:12:26 +08:00
|
|
|
ODBC_INCDIR=$PHP_ADABAS/incl
|
2005-06-22 16:26:00 +08:00
|
|
|
PHP_ODBC_CHECK_HEADER(sqlext.h)
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_ADABAS,1,[ ])
|
2007-07-12 07:20:37 +08:00
|
|
|
AC_MSG_RESULT([$ext_output])
|
2015-03-23 04:30:32 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
1999-04-19 23:04:11 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2000-10-17 23:23:18 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
2007-07-12 07:20:37 +08:00
|
|
|
PHP_ARG_WITH(sapdb,,
|
2015-03-25 17:33:08 +08:00
|
|
|
[ --with-sapdb[=DIR] Include SAP DB support [/usr/local]])
|
2007-07-12 07:20:37 +08:00
|
|
|
|
2015-03-23 04:30:32 +08:00
|
|
|
AC_MSG_CHECKING([for SAP DB support])
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$PHP_SAPDB" != "no"; then
|
|
|
|
if test "$PHP_SAPDB" = "yes"; then
|
|
|
|
PHP_SAPDB=/usr/local
|
|
|
|
fi
|
|
|
|
PHP_ADD_INCLUDE($PHP_SAPDB/incl)
|
2007-07-31 21:02:00 +08:00
|
|
|
PHP_ADD_LIBPATH($PHP_SAPDB/$PHP_LIBDIR)
|
2002-03-12 17:54:46 +08:00
|
|
|
PHP_ADD_LIBRARY(sqlod)
|
2000-10-17 23:23:18 +08:00
|
|
|
ODBC_TYPE=sapdb
|
|
|
|
AC_DEFINE(HAVE_SAPDB,1,[ ])
|
2007-07-12 07:20:37 +08:00
|
|
|
AC_MSG_RESULT([$ext_output])
|
2015-03-23 04:30:32 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
2000-10-17 23:23:18 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
1999-04-19 23:04:11 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
2007-07-12 07:20:37 +08:00
|
|
|
PHP_ARG_WITH(solid,,
|
2015-03-25 17:33:08 +08:00
|
|
|
[ --with-solid[=DIR] Include Solid support [/usr/local/solid]])
|
2007-07-12 07:20:37 +08:00
|
|
|
|
2015-03-23 04:30:32 +08:00
|
|
|
AC_MSG_CHECKING(for Solid support)
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$PHP_SOLID" != "no"; then
|
|
|
|
if test "$PHP_SOLID" = "yes"; then
|
|
|
|
PHP_SOLID=/usr/local/solid
|
|
|
|
fi
|
|
|
|
ODBC_INCDIR=$PHP_SOLID/include
|
|
|
|
ODBC_LIBDIR=$PHP_SOLID/$PHP_LIBDIR
|
1999-11-09 22:28:59 +08:00
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
|
|
|
ODBC_TYPE=solid
|
2000-11-17 23:09:46 +08:00
|
|
|
if test -f $ODBC_LIBDIR/soc*35.a; then
|
2000-07-01 03:22:52 +08:00
|
|
|
AC_DEFINE(HAVE_SOLID_35,1,[ ])
|
2002-11-13 01:31:39 +08:00
|
|
|
elif test -f $ODBC_LIBDIR/scl*30.a; then
|
|
|
|
AC_DEFINE(HAVE_SOLID_30,1,[ ])
|
|
|
|
elif test -f $ODBC_LIBDIR/scl*23.a; then
|
2000-07-01 03:22:52 +08:00
|
|
|
AC_DEFINE(HAVE_SOLID,1,[ ])
|
|
|
|
fi
|
2007-07-12 07:20:37 +08:00
|
|
|
AC_MSG_RESULT([$ext_output])
|
2005-06-22 16:26:00 +08:00
|
|
|
PHP_ODBC_FIND_SOLID_LIBS($ODBC_LIBDIR)
|
2015-03-23 04:30:32 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
1999-04-19 23:04:11 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
1999-10-29 04:33:43 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
2007-07-12 07:20:37 +08:00
|
|
|
PHP_ARG_WITH(ibm-db2,,
|
2015-03-25 17:33:08 +08:00
|
|
|
[ --with-ibm-db2[=DIR] Include IBM DB2 support [/home/db2inst1/sqllib]])
|
2007-07-12 07:20:37 +08:00
|
|
|
|
2015-03-23 04:30:32 +08:00
|
|
|
AC_MSG_CHECKING(for IBM DB2 support)
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$PHP_IBM_DB2" != "no"; then
|
|
|
|
if test "$PHP_IBM_DB2" = "yes"; then
|
2003-02-25 19:48:50 +08:00
|
|
|
ODBC_INCDIR=/home/db2inst1/sqllib/include
|
|
|
|
ODBC_LIBDIR=/home/db2inst1/sqllib/lib
|
1999-10-29 04:33:43 +08:00
|
|
|
else
|
2007-07-12 07:20:37 +08:00
|
|
|
ODBC_INCDIR=$PHP_IBM_DB2/include
|
|
|
|
ODBC_LIBDIR=$PHP_IBM_DB2/$PHP_LIBDIR
|
1999-10-29 04:33:43 +08:00
|
|
|
fi
|
2005-01-19 05:16:32 +08:00
|
|
|
|
2005-06-22 16:26:00 +08:00
|
|
|
PHP_ODBC_CHECK_HEADER(sqlcli1.h)
|
|
|
|
|
1999-10-29 04:33:43 +08:00
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
2000-09-29 07:46:15 +08:00
|
|
|
ODBC_LFLAGS=-L$ODBC_LIBDIR
|
2007-07-12 07:20:37 +08:00
|
|
|
ODBC_TYPE=ibm-db2
|
2003-02-25 19:48:50 +08:00
|
|
|
ODBC_LIBS=-ldb2
|
1999-10-29 04:33:43 +08:00
|
|
|
|
2005-04-04 18:50:32 +08:00
|
|
|
PHP_TEST_BUILD(SQLExecute, [
|
|
|
|
AC_DEFINE(HAVE_IBMDB2,1,[ ])
|
2007-07-12 07:20:37 +08:00
|
|
|
AC_MSG_RESULT([$ext_output])
|
2005-04-11 03:18:37 +08:00
|
|
|
], [
|
2005-04-04 18:50:32 +08:00
|
|
|
AC_MSG_RESULT(no)
|
2005-04-11 03:18:37 +08:00
|
|
|
AC_MSG_ERROR([
|
|
|
|
build test failed. Please check the config.log for details.
|
|
|
|
You need to source your DB2 environment before running PHP configure:
|
2005-04-11 03:23:59 +08:00
|
|
|
# . \$IBM_DB2/db2profile
|
2005-04-11 03:18:37 +08:00
|
|
|
])
|
|
|
|
], [
|
2005-04-04 18:50:32 +08:00
|
|
|
$ODBC_LFLAGS $ODBC_LIBS
|
|
|
|
])
|
2015-03-23 04:30:32 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
1999-10-29 04:33:43 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2005-01-13 10:06:39 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
2007-07-12 07:20:37 +08:00
|
|
|
PHP_ARG_WITH(ODBCRouter,,
|
2015-03-25 17:33:08 +08:00
|
|
|
[ --with-ODBCRouter[=DIR] Include ODBCRouter.com support [/usr]])
|
2007-07-12 07:20:37 +08:00
|
|
|
|
2015-03-23 04:30:32 +08:00
|
|
|
AC_MSG_CHECKING(for ODBCRouter.com support)
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$PHP_ODBCROUTER" != "no"; then
|
|
|
|
if test "$PHP_ODBCROUTER" = "yes"; then
|
|
|
|
PHP_ODBCROUTER=/usr
|
|
|
|
fi
|
|
|
|
ODBC_INCDIR=$PHP_ODBCROUTER/include
|
|
|
|
ODBC_LIBDIR=$PHP_ODBCROUTER/lib
|
2005-01-13 10:06:39 +08:00
|
|
|
ODBC_LFLAGS=-L$ODBC_LIBDIR
|
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
|
|
|
ODBC_LIBS=-lodbcsdk
|
|
|
|
ODBC_TYPE=ODBCRouter
|
|
|
|
AC_DEFINE(HAVE_ODBC_ROUTER,1,[ ])
|
2007-07-12 07:20:37 +08:00
|
|
|
AC_MSG_RESULT([$ext_output])
|
2015-03-23 04:30:32 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
2005-01-13 10:06:39 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
1999-04-19 23:04:11 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
2007-07-12 07:20:37 +08:00
|
|
|
PHP_ARG_WITH(empress,,
|
2013-08-07 02:06:09 +08:00
|
|
|
[ --with-empress[=DIR] Include Empress support [\$EMPRESSPATH]
|
2015-03-25 17:33:08 +08:00
|
|
|
(Empress Version >= 8.60 required)])
|
2007-07-12 07:20:37 +08:00
|
|
|
|
2015-03-23 04:30:32 +08:00
|
|
|
AC_MSG_CHECKING(for Empress support)
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$PHP_EMPRESS" != "no"; then
|
|
|
|
if test "$PHP_EMPRESS" = "yes"; then
|
2001-05-09 23:35:31 +08:00
|
|
|
ODBC_INCDIR=$EMPRESSPATH/include/odbc
|
|
|
|
ODBC_LIBDIR=$EMPRESSPATH/shlib
|
1999-04-19 23:04:11 +08:00
|
|
|
else
|
2007-07-12 07:20:37 +08:00
|
|
|
ODBC_INCDIR=$PHP_EMPRESS/include/odbc
|
|
|
|
ODBC_LIBDIR=$PHP_EMPRESS/shlib
|
1999-04-19 23:04:11 +08:00
|
|
|
fi
|
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
2001-04-11 00:26:28 +08:00
|
|
|
ODBC_LFLAGS=-L$ODBC_LIBDIR
|
1999-04-19 23:04:11 +08:00
|
|
|
ODBC_TYPE=empress
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_EMPRESS,1,[ ])
|
2007-07-12 07:20:37 +08:00
|
|
|
AC_MSG_RESULT([$ext_output])
|
2005-06-22 16:26:00 +08:00
|
|
|
PHP_ODBC_FIND_EMPRESS_LIBS($ODBC_LIBDIR)
|
2015-03-23 04:30:32 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
1999-04-19 23:04:11 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2001-05-09 23:35:31 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
2007-07-12 07:20:37 +08:00
|
|
|
PHP_ARG_WITH(empress-bcs,,
|
2001-05-12 17:13:42 +08:00
|
|
|
[ --with-empress-bcs[=DIR]
|
2007-07-04 01:25:43 +08:00
|
|
|
Include Empress Local Access support [\$EMPRESSPATH]
|
2015-03-25 17:33:08 +08:00
|
|
|
(Empress Version >= 8.60 required)])
|
2007-07-12 07:20:37 +08:00
|
|
|
|
2015-03-23 04:30:32 +08:00
|
|
|
AC_MSG_CHECKING(for Empress local access support)
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$PHP_EMPRESS_BCS" != "no"; then
|
|
|
|
if test "$PHP_EMPRESS_BCS" = "yes"; then
|
2001-05-09 23:35:31 +08:00
|
|
|
ODBC_INCDIR=$EMPRESSPATH/include/odbc
|
|
|
|
ODBC_LIBDIR=$EMPRESSPATH/shlib
|
|
|
|
else
|
2007-07-12 07:20:37 +08:00
|
|
|
ODBC_INCDIR=$PHP_EMPRESS_BCS/include/odbc
|
|
|
|
ODBC_LIBDIR=$PHP_EMPRESS_BCS/shlib
|
2001-05-09 23:35:31 +08:00
|
|
|
fi
|
|
|
|
CC="empocc -bcs";export CC;
|
|
|
|
LD="empocc -bcs";export LD;
|
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
|
|
|
ODBC_LFLAGS=-L$ODBC_LIBDIR
|
|
|
|
LIST=`empocc -listlines -bcs -o a a.c`
|
|
|
|
|
|
|
|
NEWLIST=
|
|
|
|
for I in $LIST
|
|
|
|
do
|
2007-07-12 07:20:37 +08:00
|
|
|
case $I in
|
|
|
|
$EMPRESSPATH/odbccl/lib/* | \
|
|
|
|
$EMPRESSPATH/rdbms/lib/* | \
|
|
|
|
$EMPRESSPATH/common/lib/*)
|
|
|
|
NEWLIST="$NEWLIST $I"
|
|
|
|
;;
|
|
|
|
esac
|
2001-05-09 23:35:31 +08:00
|
|
|
done
|
|
|
|
ODBC_LIBS="-lempphpbcs -lms -lmscfg -lbasic -lbasic_os -lnlscstab -lnlsmsgtab -lm -ldl -lcrypt"
|
2007-07-12 07:20:37 +08:00
|
|
|
ODBC_TYPE=empress-bcs
|
2001-05-09 23:35:31 +08:00
|
|
|
AC_DEFINE(HAVE_EMPRESS,1,[ ])
|
2007-07-12 07:20:37 +08:00
|
|
|
AC_MSG_RESULT([$ext_output])
|
2005-06-22 16:26:00 +08:00
|
|
|
PHP_ODBC_FIND_EMPRESS_BCS_LIBS($ODBC_LIBDIR)
|
2015-03-23 04:30:32 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
2001-05-09 23:35:31 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
1999-04-19 23:04:11 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
2007-07-12 07:20:37 +08:00
|
|
|
PHP_ARG_WITH(birdstep,,
|
2015-03-25 17:33:08 +08:00
|
|
|
[ --with-birdstep[=DIR] Include Birdstep support [/usr/local/birdstep]])
|
2007-07-12 07:20:37 +08:00
|
|
|
|
2015-03-23 04:30:32 +08:00
|
|
|
AC_MSG_CHECKING(for Birdstep support)
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$PHP_BIRDSTEP" != "no"; then
|
|
|
|
if test "$PHP_BIRDSTEP" = "yes"; then
|
2002-03-04 17:10:32 +08:00
|
|
|
ODBC_INCDIR=/usr/local/birdstep/include
|
|
|
|
ODBC_LIBDIR=/usr/local/birdstep/lib
|
1999-04-19 23:04:11 +08:00
|
|
|
else
|
2007-07-12 07:20:37 +08:00
|
|
|
ODBC_INCDIR=$PHP_BIRDSTEP/include
|
|
|
|
ODBC_LIBDIR=$PHP_BIRDSTEP/$PHP_LIBDIR
|
1999-04-19 23:04:11 +08:00
|
|
|
fi
|
2005-04-15 05:17:20 +08:00
|
|
|
|
|
|
|
case $host_alias in
|
|
|
|
*aix*[)]
|
|
|
|
AC_DEFINE(AIX,1,[ ]);;
|
|
|
|
*hpux*[)]
|
|
|
|
AC_DEFINE(HPUX,1,[ ]);;
|
|
|
|
*linux*[)]
|
|
|
|
AC_DEFINE(LINUX,1,[ ]);;
|
|
|
|
*qnx*[)]
|
|
|
|
AC_DEFINE(NEUTRINO,1,[ ]);;
|
|
|
|
i?86-*-solaris*[)]
|
|
|
|
AC_DEFINE(ISOLARIS,1,[ ]);;
|
|
|
|
sparc-*-solaris*[)]
|
|
|
|
AC_DEFINE(SOLARIS,1,[ ]);;
|
|
|
|
*unixware*[)]
|
|
|
|
AC_DEFINE(UNIXWARE,1,[ ]);;
|
|
|
|
esac
|
|
|
|
|
1999-04-19 23:04:11 +08:00
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
2002-03-04 17:10:32 +08:00
|
|
|
ODBC_TYPE=birdstep
|
2001-04-11 00:26:28 +08:00
|
|
|
ODBC_LFLAGS=-L$ODBC_LIBDIR
|
|
|
|
ODBC_LIBS="-lCadm -lCdict -lCenc -lCrdm -lCrpc -lCrdbc -lCrm -lCuapi -lutil"
|
2005-04-15 05:17:20 +08:00
|
|
|
|
2005-11-22 03:06:04 +08:00
|
|
|
if test -f "$ODBC_LIBDIR/libCrdbc32.$SHLIB_SUFFIX_NAME"; then
|
2005-04-15 05:17:20 +08:00
|
|
|
ODBC_LIBS="-lCrdbc32 -lCadm32 -lCncp32 -lCrm32 -lCsql32 -lCdict32 -lCrdm32 -lCrpc32 -lutil"
|
2005-11-22 03:06:04 +08:00
|
|
|
elif test -f "$ODBC_LIBDIR/libCrdbc.$SHLIB_SUFFIX_NAME"; then
|
2005-04-15 05:17:20 +08:00
|
|
|
ODBC_LIBS="-lCrdbc -lCadm -lCncp -lCrm -lCsql -lCdict -lCrdm -lCrpc -lutil"
|
|
|
|
fi
|
|
|
|
|
2002-03-04 17:10:32 +08:00
|
|
|
AC_DEFINE(HAVE_BIRDSTEP,1,[ ])
|
2007-07-12 07:20:37 +08:00
|
|
|
AC_MSG_RESULT([$ext_output])
|
2015-03-23 04:30:32 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
1999-04-19 23:04:11 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$ODBC_TYPE"; then
|
2007-07-12 07:20:37 +08:00
|
|
|
PHP_ARG_WITH(custom-odbc,,
|
2013-08-07 02:06:09 +08:00
|
|
|
[ --with-custom-odbc[=DIR] Include user defined ODBC support. DIR is ODBC install base
|
2007-07-04 01:25:43 +08:00
|
|
|
directory [/usr/local]. Make sure to define CUSTOM_ODBC_LIBS and
|
|
|
|
have some odbc.h in your include dirs. f.e. you should define
|
|
|
|
following for Sybase SQL Anywhere 5.5.00 on QNX, prior to
|
|
|
|
running this configure script:
|
2013-08-07 02:06:09 +08:00
|
|
|
CPPFLAGS=\"-DODBC_QNX -DSQLANY_BUG\"
|
|
|
|
LDFLAGS=-lunix
|
2015-03-25 17:33:08 +08:00
|
|
|
CUSTOM_ODBC_LIBS=\"-ldblib -lodbc\"])
|
2007-07-12 07:20:37 +08:00
|
|
|
|
2015-03-23 04:30:32 +08:00
|
|
|
AC_MSG_CHECKING(for a custom ODBC support)
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$PHP_CUSTOM_ODBC" != "no"; then
|
|
|
|
if test "$PHP_CUSTOM_ODBC" = "yes"; then
|
|
|
|
PHP_CUSTOM_ODBC=/usr/local
|
|
|
|
fi
|
|
|
|
ODBC_INCDIR=$PHP_CUSTOM_ODBC/include
|
|
|
|
ODBC_LIBDIR=$PHP_CUSTOM_ODBC/$PHP_LIBDIR
|
1999-08-09 00:26:26 +08:00
|
|
|
ODBC_LFLAGS=-L$ODBC_LIBDIR
|
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
1999-04-19 23:04:11 +08:00
|
|
|
ODBC_LIBS=$CUSTOM_ODBC_LIBS
|
2007-07-12 07:20:37 +08:00
|
|
|
ODBC_TYPE=custom-odbc
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_CODBC,1,[ ])
|
2013-07-24 07:54:16 +08:00
|
|
|
AC_MSG_RESULT([$ext_output])
|
2015-03-23 04:30:32 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
1999-04-19 23:04:11 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$ODBC_TYPE"; then
|
2007-07-12 07:20:37 +08:00
|
|
|
PHP_ARG_WITH(iodbc,,
|
2015-03-25 17:33:08 +08:00
|
|
|
[ --with-iodbc[=DIR] Include iODBC support [/usr/local]])
|
2007-07-12 07:20:37 +08:00
|
|
|
|
2015-03-23 04:30:32 +08:00
|
|
|
AC_MSG_CHECKING(for iODBC support)
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$PHP_IODBC" != "no"; then
|
2013-08-17 20:22:11 +08:00
|
|
|
if test -z "$PKG_CONFIG"; then
|
|
|
|
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
|
|
|
fi
|
|
|
|
if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libiodbc ; then
|
|
|
|
PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
|
|
|
|
ODBC_TYPE=iodbc
|
|
|
|
ODBC_INCLUDE=`$PKG_CONFIG --cflags-only-I libiodbc`
|
|
|
|
ODBC_LFLAGS=`$PKG_CONFIG --libs-only-L libiodbc`
|
|
|
|
ODBC_LIBS=`$PKG_CONFIG --libs-only-l libiodbc`
|
|
|
|
PHP_EVAL_INCLINE($ODBC_INCLUDE)
|
|
|
|
AC_DEFINE(HAVE_IODBC,1,[ ])
|
|
|
|
AC_DEFINE(HAVE_ODBC2,1,[ ])
|
|
|
|
AC_MSG_RESULT([$ext_output])
|
|
|
|
else
|
|
|
|
if test "$PHP_IODBC" = "yes"; then
|
|
|
|
PHP_IODBC=/usr/local
|
|
|
|
fi
|
|
|
|
PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
|
|
|
|
PHP_ADD_INCLUDE($PHP_IODBC/include, 1)
|
|
|
|
ODBC_TYPE=iodbc
|
|
|
|
ODBC_INCLUDE=-I$PHP_IODBC/include
|
|
|
|
ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR
|
|
|
|
ODBC_LIBS=-liodbc
|
|
|
|
AC_DEFINE(HAVE_IODBC,1,[ ])
|
|
|
|
AC_DEFINE(HAVE_ODBC2,1,[ ])
|
|
|
|
AC_MSG_RESULT([$ext_output])
|
2007-07-12 07:20:37 +08:00
|
|
|
fi
|
2015-03-23 04:30:32 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
1999-04-19 23:04:11 +08:00
|
|
|
fi
|
1999-08-30 18:48:23 +08:00
|
|
|
fi
|
|
|
|
|
1999-09-23 22:46:35 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
2007-07-12 07:20:37 +08:00
|
|
|
PHP_ARG_WITH(esoob,,
|
2015-03-25 17:33:08 +08:00
|
|
|
[ --with-esoob[=DIR] Include Easysoft OOB support [/usr/local/easysoft/oob/client]])
|
2007-07-12 07:20:37 +08:00
|
|
|
|
2015-03-23 04:30:32 +08:00
|
|
|
AC_MSG_CHECKING(for Easysoft ODBC-ODBC Bridge support)
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$PHP_ESOOB" != "no"; then
|
|
|
|
if test "$PHP_ESOOB" = "yes"; then
|
|
|
|
PHP_ESOOB=/usr/local/easysoft/oob/client
|
|
|
|
fi
|
|
|
|
ODBC_INCDIR=$PHP_ESOOB/include
|
|
|
|
ODBC_LIBDIR=$PHP_ESOOB/$PHP_LIBDIR
|
1999-09-23 22:46:35 +08:00
|
|
|
ODBC_LFLAGS=-L$ODBC_LIBDIR
|
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
|
|
|
ODBC_LIBS=-lesoobclient
|
2007-07-12 07:20:37 +08:00
|
|
|
ODBC_TYPE=esoob
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_ESOOB,1,[ ])
|
2007-07-12 07:20:37 +08:00
|
|
|
AC_MSG_RESULT([$ext_output])
|
2015-03-23 04:28:16 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
1999-09-23 22:46:35 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
1999-08-30 18:48:23 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
2007-07-12 07:20:37 +08:00
|
|
|
PHP_ARG_WITH(unixODBC,,
|
2015-03-25 17:33:08 +08:00
|
|
|
[ --with-unixODBC[=DIR] Include unixODBC support [/usr/local]])
|
2007-07-12 07:20:37 +08:00
|
|
|
|
2015-03-23 04:28:16 +08:00
|
|
|
AC_MSG_CHECKING(for unixODBC support)
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$PHP_UNIXODBC" != "no"; then
|
|
|
|
if test "$PHP_UNIXODBC" = "yes"; then
|
|
|
|
PHP_UNIXODBC=/usr/local
|
|
|
|
fi
|
|
|
|
ODBC_INCDIR=$PHP_UNIXODBC/include
|
|
|
|
ODBC_LIBDIR=$PHP_UNIXODBC/$PHP_LIBDIR
|
1999-08-30 18:48:23 +08:00
|
|
|
ODBC_LFLAGS=-L$ODBC_LIBDIR
|
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
|
|
|
ODBC_LIBS=-lodbc
|
|
|
|
ODBC_TYPE=unixODBC
|
2005-06-22 16:26:00 +08:00
|
|
|
PHP_ODBC_CHECK_HEADER(sqlext.h)
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_UNIXODBC,1,[ ])
|
2007-07-12 07:20:37 +08:00
|
|
|
AC_MSG_RESULT([$ext_output])
|
2015-03-23 04:30:32 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
1999-08-30 18:48:23 +08:00
|
|
|
fi
|
1999-04-19 23:04:11 +08:00
|
|
|
fi
|
|
|
|
|
1999-11-29 08:45:28 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
2007-07-12 07:20:37 +08:00
|
|
|
PHP_ARG_WITH(dbmaker,,
|
2015-03-25 17:33:08 +08:00
|
|
|
[ --with-dbmaker[=DIR] Include DBMaker support])
|
2007-07-12 07:20:37 +08:00
|
|
|
|
2015-03-23 04:30:32 +08:00
|
|
|
AC_MSG_CHECKING(for DBMaker support)
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$PHP_DBMAKER" != "no"; then
|
|
|
|
if test "$PHP_DBMAKER" = "yes"; then
|
|
|
|
# find dbmaker's home directory
|
|
|
|
DBMAKER_HOME=`grep "^dbmaker:" /etc/passwd | $AWK -F: '{print $6}'`
|
|
|
|
|
|
|
|
# check DBMaker version (from 5.0 to 2.0)
|
|
|
|
DBMAKER_VERSION=5.0
|
|
|
|
|
|
|
|
while test ! -d $DBMAKER_HOME/$DBMAKER_VERSION -a "$DBMAKER_VERSION" != "2.9"; do
|
2005-05-07 10:51:53 +08:00
|
|
|
DM_VER=`echo $DBMAKER_VERSION | sed -e 's/\.//' | $AWK '{ print $1-1;}'`
|
|
|
|
MAJOR_V=`echo $DM_VER | $AWK '{ print $1/10; }' | $AWK -F. '{ print $1; }'`
|
|
|
|
MINOR_V=`echo $DM_VER | $AWK '{ print $1%10; }'`
|
2000-07-06 16:38:12 +08:00
|
|
|
DBMAKER_VERSION=$MAJOR_V.$MINOR_V
|
2007-07-12 07:20:37 +08:00
|
|
|
done
|
2000-07-06 16:38:12 +08:00
|
|
|
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$DBMAKER_VERSION" = "2.9"; then
|
|
|
|
PHP_DBMAKER=$DBMAKER_HOME
|
|
|
|
else
|
|
|
|
PHP_DBMAKER=$DBMAKER_HOME/$DBMAKER_VERSION
|
|
|
|
fi
|
2000-07-06 16:38:12 +08:00
|
|
|
fi
|
|
|
|
|
2007-07-12 07:20:37 +08:00
|
|
|
ODBC_INCDIR=$PHP_DBMAKER/include
|
|
|
|
ODBC_LIBDIR=$PHP_DBMAKER/$PHP_LIBDIR
|
1999-11-29 08:45:28 +08:00
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
|
|
|
ODBC_LFLAGS=-L$ODBC_LIBDIR
|
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
|
|
|
ODBC_LIBS="-ldmapic -lc"
|
|
|
|
ODBC_TYPE=dbmaker
|
2000-07-06 16:38:12 +08:00
|
|
|
|
|
|
|
AC_DEFINE(HAVE_DBMAKER,1,[Whether you want DBMaker])
|
|
|
|
|
2007-07-12 07:20:37 +08:00
|
|
|
if test "$ext_shared" = "yes"; then
|
|
|
|
AC_MSG_RESULT([yes (shared)])
|
|
|
|
ODBC_LIBS="-ldmapic -lc -lm"
|
|
|
|
ODBC_SHARED="odbc.la"
|
2000-07-06 16:38:12 +08:00
|
|
|
else
|
2007-07-12 07:20:37 +08:00
|
|
|
AC_MSG_RESULT([yes (static)])
|
|
|
|
PHP_ADD_LIBRARY_WITH_PATH(dmapic, $ODBC_LIBDIR)
|
|
|
|
PHP_ADD_INCLUDE($ODBC_INCDIR)
|
|
|
|
ODBC_STATIC="libphpext_odbc.la"
|
2000-07-06 16:38:12 +08:00
|
|
|
fi
|
2015-03-23 04:30:32 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
1999-11-29 08:45:28 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-02-07 02:00:27 +08:00
|
|
|
if test "no" != "$PHP_ODBCVER"; then
|
|
|
|
if test "$PHP_ODBCVER" != "0"; then
|
|
|
|
AC_DEFINE_UNQUOTED(ODBCVER, $PHP_ODBCVER, [ The highest supported ODBC version ])
|
|
|
|
fi
|
|
|
|
else
|
2015-03-23 07:07:09 +08:00
|
|
|
AC_DEFINE(ODBCVER, 0x0300, [ The highest supported ODBC version ])
|
2015-02-07 02:00:27 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2007-07-12 07:20:37 +08:00
|
|
|
dnl
|
|
|
|
dnl Extension setup
|
|
|
|
dnl
|
1999-12-31 08:21:01 +08:00
|
|
|
if test -n "$ODBC_TYPE"; then
|
2000-07-06 16:38:12 +08:00
|
|
|
if test "$ODBC_TYPE" != "dbmaker"; then
|
2003-03-11 11:11:36 +08:00
|
|
|
PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], ODBC_SHARED_LIBADD)
|
2006-01-10 22:15:35 +08:00
|
|
|
if test "$ODBC_TYPE" != "birdstep" && test "$ODBC_TYPE" != "solid"; then
|
2005-04-22 07:01:53 +08:00
|
|
|
AC_DEFINE(HAVE_SQLDATASOURCES,1,[ ])
|
|
|
|
fi
|
2000-07-06 16:38:12 +08:00
|
|
|
fi
|
2007-07-12 07:20:37 +08:00
|
|
|
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_UODBC,1,[ ])
|
2003-03-11 11:11:36 +08:00
|
|
|
PHP_SUBST(ODBC_SHARED_LIBADD)
|
1999-12-30 10:59:53 +08:00
|
|
|
PHP_SUBST(ODBC_INCDIR)
|
|
|
|
PHP_SUBST(ODBC_LIBDIR)
|
2001-06-01 13:02:13 +08:00
|
|
|
PHP_SUBST_OLD(ODBC_INCLUDE)
|
|
|
|
PHP_SUBST_OLD(ODBC_LIBS)
|
|
|
|
PHP_SUBST_OLD(ODBC_LFLAGS)
|
2000-12-21 01:21:37 +08:00
|
|
|
PHP_SUBST_OLD(ODBC_TYPE)
|
2002-06-14 08:07:16 +08:00
|
|
|
|
2015-03-25 22:11:21 +08:00
|
|
|
PHP_NEW_EXTENSION(odbc, php_odbc.c, $ext_shared,, [$ODBC_INCLUDE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
|
2015-03-23 04:28:16 +08:00
|
|
|
else
|
|
|
|
AC_MSG_CHECKING([for any ODBC driver support])
|
|
|
|
AC_MSG_RESULT(no)
|
1999-04-19 23:04:11 +08:00
|
|
|
fi
|