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
|
|
|
|
1999-04-20 09:03:12 +08:00
|
|
|
dnl
|
|
|
|
dnl Figure out which library file to link with for the Solid support.
|
|
|
|
dnl
|
|
|
|
AC_DEFUN(AC_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
|
2000-11-22 23:31:04 +08:00
|
|
|
IRIX) ac_solid_os=irx;; # Solid 2.3(?)/ 3.0 only
|
2000-07-25 02:01:42 +08:00
|
|
|
Linux) if ldd -v /bin/sh | grep GLIBC > /dev/null; then
|
2000-08-23 05:27:49 +08:00
|
|
|
AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ])
|
2000-07-24 22:21:18 +08:00
|
|
|
ac_solid_os=l2x
|
|
|
|
else
|
2000-08-23 05:27:49 +08:00
|
|
|
AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ])
|
2000-07-24 22:21:18 +08:00
|
|
|
ac_solid_os=lux
|
|
|
|
fi;;
|
1999-04-20 09:03:12 +08:00
|
|
|
SunOS) ac_solid_os=ssx;; # should we deal with SunOS 4?
|
2000-08-25 03:27:21 +08:00
|
|
|
FreeBSD) if test `expr $ac_solid_uname_r : '\(.\)'` -gt "2"; then
|
2000-11-22 23:31:04 +08:00
|
|
|
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 \
|
|
|
|
! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then
|
|
|
|
#
|
|
|
|
# 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"
|
2000-12-29 03:12:28 +08:00
|
|
|
echo "*********************************************************************"
|
|
|
|
else
|
2000-11-22 23:31:04 +08:00
|
|
|
ODBC_LFLAGS=-L$1
|
|
|
|
ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version}
|
|
|
|
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
|
|
|
|
AC_DEFUN(AC_FIND_EMPRESS_LIBS,[
|
|
|
|
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!.*/!!'`)
|
|
|
|
])
|
|
|
|
|
2001-05-09 23:35:31 +08:00
|
|
|
AC_DEFUN(AC_FIND_EMPRESS_BCS_LIBS,[
|
|
|
|
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!.*/!!'`)
|
|
|
|
])
|
|
|
|
|
1999-04-19 23:04:11 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
|
|
|
AC_MSG_CHECKING(for Adabas support)
|
|
|
|
AC_ARG_WITH(adabas,
|
|
|
|
[ --with-adabas[=DIR] Include Adabas D support. DIR is the Adabas base
|
|
|
|
install directory, defaults to /usr/local.],
|
|
|
|
[
|
2001-02-22 02:23:53 +08:00
|
|
|
PHP_WITH_SHARED
|
1999-04-19 23:04:11 +08:00
|
|
|
if test "$withval" = "yes"; then
|
|
|
|
withval=/usr/local
|
|
|
|
fi
|
|
|
|
if test "$withval" != "no"; then
|
2001-03-28 04:35:04 +08:00
|
|
|
PHP_ADD_INCLUDE($withval/incl)
|
|
|
|
PHP_ADD_LIBPATH($withval/lib)
|
2001-06-01 13:02:13 +08:00
|
|
|
ODBC_OBJS="$withval/lib/odbclib.a"
|
|
|
|
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"
|
2001-03-28 04:35:04 +08:00
|
|
|
PHP_ADD_LIBRARY(sqlptc)
|
|
|
|
PHP_ADD_LIBRARY(sqlrte)
|
|
|
|
PHP_ADD_LIBRARY_WITH_PATH(odbc_adabas, $abs_builddir/ext/odbc)
|
1999-04-19 23:04:11 +08:00
|
|
|
ODBC_TYPE=adabas
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_ADABAS,1,[ ])
|
1999-04-19 23:04:11 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
2000-10-17 23:23:18 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
|
|
|
AC_MSG_CHECKING(for SAP DB support)
|
|
|
|
AC_ARG_WITH(sapdb,
|
|
|
|
[ --with-sapdb[=DIR] Include SAP DB support. DIR is SAP DB base
|
|
|
|
install directory, defaults to /usr/local.],
|
|
|
|
[
|
2001-02-22 02:23:53 +08:00
|
|
|
PHP_WITH_SHARED
|
2000-10-17 23:23:18 +08:00
|
|
|
if test "$withval" = "yes"; then
|
|
|
|
withval=/usr/local
|
|
|
|
fi
|
|
|
|
if test "$withval" != "no"; then
|
2001-03-28 04:35:04 +08:00
|
|
|
PHP_ADD_INCLUDE($withval/incl)
|
|
|
|
PHP_ADD_LIBPATH($withval/lib)
|
|
|
|
PHP_ADD_LIBRARY(sqlod)
|
|
|
|
PHP_ADD_LIBRARY(sqlrte)
|
2000-10-17 23:23:18 +08:00
|
|
|
ODBC_TYPE=sapdb
|
|
|
|
AC_DEFINE(HAVE_SAPDB,1,[ ])
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
1999-04-19 23:04:11 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
|
|
|
AC_MSG_CHECKING(for Solid support)
|
|
|
|
AC_ARG_WITH(solid,
|
|
|
|
[ --with-solid[=DIR] Include Solid support. DIR is the Solid base
|
2000-03-27 03:47:28 +08:00
|
|
|
install directory, defaults to /usr/local/solid],
|
1999-04-19 23:04:11 +08:00
|
|
|
[
|
2001-02-22 02:23:53 +08:00
|
|
|
PHP_WITH_SHARED
|
1999-04-19 23:04:11 +08:00
|
|
|
if test "$withval" = "yes"; then
|
|
|
|
withval=/usr/local/solid
|
|
|
|
fi
|
|
|
|
if test "$withval" != "no"; then
|
|
|
|
ODBC_INCDIR=$withval/include
|
|
|
|
ODBC_LIBDIR=$withval/lib
|
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,[ ])
|
2000-11-22 23:31:04 +08:00
|
|
|
elif test -f $ODBC_LIBDIR/scl*30.a; then
|
2000-11-17 23:09:46 +08:00
|
|
|
AC_DEFINE(HAVE_SOLID_30,1,[ ])
|
2000-11-22 23:31:04 +08:00
|
|
|
elif test -f $ODBC_LIBDIR/scl*23.a; then
|
2000-07-01 03:22:52 +08:00
|
|
|
AC_DEFINE(HAVE_SOLID,1,[ ])
|
|
|
|
fi
|
1999-11-09 22:28:59 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_FIND_SOLID_LIBS($ODBC_LIBDIR)
|
1999-04-19 23:04:11 +08:00
|
|
|
else
|
1999-11-09 22:28:59 +08:00
|
|
|
AC_MSG_RESULT(no)
|
1999-04-19 23:04:11 +08:00
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
1999-10-29 04:33:43 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
|
|
|
AC_MSG_CHECKING(for IBM DB2 support)
|
|
|
|
AC_ARG_WITH(ibm-db2,
|
|
|
|
[ --with-ibm-db2[=DIR] Include IBM DB2 support. DIR is the DB2 base
|
|
|
|
install directory, defaults to /home/db2inst1/sqllib],
|
|
|
|
[
|
2000-12-07 19:13:49 +08:00
|
|
|
PHP_WITH_SHARED
|
1999-10-29 04:33:43 +08:00
|
|
|
if test "$withval" != "no"; then
|
|
|
|
if test "$withval" = "yes"; then
|
|
|
|
ODBC_INCDIR=/home/db2inst1/sqllib/include
|
|
|
|
ODBC_LIBDIR=/home/db2inst1/sqllib/lib
|
|
|
|
else
|
|
|
|
ODBC_INCDIR=$withval/include
|
|
|
|
ODBC_LIBDIR=$withval/lib
|
|
|
|
fi
|
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
2000-09-29 07:46:15 +08:00
|
|
|
ODBC_LFLAGS=-L$ODBC_LIBDIR
|
1999-11-09 22:28:59 +08:00
|
|
|
ODBC_TYPE=db2
|
2001-06-01 13:02:13 +08:00
|
|
|
ODBC_LIBS="-ldb2"
|
1999-12-30 21:19:56 +08:00
|
|
|
AC_DEFINE(HAVE_IBMDB2,1,[ ])
|
1999-10-29 04:33:43 +08:00
|
|
|
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
1999-04-19 23:04:11 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
|
|
|
AC_MSG_CHECKING(for Empress support)
|
|
|
|
AC_ARG_WITH(empress,
|
|
|
|
[ --with-empress[=DIR] Include Empress support. DIR is the Empress base
|
2001-05-12 17:13:42 +08:00
|
|
|
install directory, defaults to \$EMPRESSPATH.
|
|
|
|
From PHP4, this option only supports Empress Version
|
|
|
|
8.60 and above],
|
1999-04-19 23:04:11 +08:00
|
|
|
[
|
2001-02-22 02:23:53 +08:00
|
|
|
PHP_WITH_SHARED
|
1999-04-19 23:04:11 +08:00
|
|
|
if test "$withval" != "no"; then
|
|
|
|
if test "$withval" = "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
|
2001-05-09 23:35:31 +08:00
|
|
|
ODBC_INCDIR=$withval/include/odbc
|
|
|
|
ODBC_LIBDIR=$withval/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,[ ])
|
1999-04-19 23:04:11 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_FIND_EMPRESS_LIBS($ODBC_LIBDIR)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
2001-05-09 23:35:31 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
|
|
|
AC_MSG_CHECKING(for Empress local access support)
|
|
|
|
AC_ARG_WITH(empress-bcs,
|
2001-05-12 17:13:42 +08:00
|
|
|
[ --with-empress-bcs[=DIR]
|
|
|
|
Include Empress Local Access support. DIR is the
|
|
|
|
Empress base install directory, defaults to
|
|
|
|
\$EMPRESSPATH. From PHP4, this option only supports
|
|
|
|
Empress Version 8.60 and above.],
|
2001-05-09 23:35:31 +08:00
|
|
|
[
|
|
|
|
PHP_WITH_SHARED
|
|
|
|
if test "$withval" != "no"; then
|
|
|
|
if test "$withval" = "yes"; then
|
|
|
|
ODBC_INCDIR=$EMPRESSPATH/include/odbc
|
|
|
|
ODBC_LIBDIR=$EMPRESSPATH/shlib
|
|
|
|
else
|
|
|
|
ODBC_INCDIR=$withval/include/odbc
|
|
|
|
ODBC_LIBDIR=$withval/shlib
|
|
|
|
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
|
|
|
|
case $I in
|
|
|
|
$EMPRESSPATH/odbccl/lib/* | \
|
|
|
|
$EMPRESSPATH/rdbms/lib/* | \
|
|
|
|
$EMPRESSPATH/common/lib/*)
|
|
|
|
NEWLIST="$NEWLIST $I"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
ODBC_LIBS="-lempphpbcs -lms -lmscfg -lbasic -lbasic_os -lnlscstab -lnlsmsgtab -lm -ldl -lcrypt"
|
|
|
|
ODBC_TYPE=empress
|
|
|
|
AC_DEFINE(HAVE_EMPRESS,1,[ ])
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_FIND_EMPRESS_BCS_LIBS($ODBC_LIBDIR)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
1999-04-19 23:04:11 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
|
|
|
AC_MSG_CHECKING(for Velocis support)
|
|
|
|
AC_ARG_WITH(velocis,
|
1999-09-16 23:35:49 +08:00
|
|
|
[ --with-velocis[=DIR] Include Velocis support. DIR is the Velocis base
|
|
|
|
install directory, defaults to /usr/local/velocis.],
|
1999-04-19 23:04:11 +08:00
|
|
|
[
|
2001-02-22 02:23:53 +08:00
|
|
|
PHP_WITH_SHARED
|
2001-04-11 00:26:28 +08:00
|
|
|
|
1999-04-19 23:04:11 +08:00
|
|
|
if test "$withval" != "no"; then
|
|
|
|
if test "$withval" = "yes"; then
|
2001-04-11 00:26:28 +08:00
|
|
|
ODBC_INCDIR=/usr/local/velocis/include
|
|
|
|
ODBC_LIBDIR=/usr/local/velocis/lib
|
1999-04-19 23:04:11 +08:00
|
|
|
else
|
2001-04-11 00:26:28 +08:00
|
|
|
ODBC_INCDIR=$withval/include
|
|
|
|
ODBC_LIBDIR=$withval/lib
|
1999-04-19 23:04:11 +08:00
|
|
|
fi
|
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
|
|
|
ODBC_TYPE=velocis
|
2001-04-11 00:26:28 +08:00
|
|
|
ODBC_LFLAGS=-L$ODBC_LIBDIR
|
|
|
|
ODBC_LIBS="-lCadm -lCdict -lCenc -lCrdm -lCrpc -lCrdbc -lCrm -lCuapi -lutil"
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_VELOCIS,1,[ ])
|
2001-04-11 00:26:28 +08:00
|
|
|
|
1999-04-19 23:04:11 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$ODBC_TYPE"; then
|
|
|
|
AC_MSG_CHECKING(for a custom ODBC support)
|
|
|
|
AC_ARG_WITH(custom-odbc,
|
1999-09-16 23:35:49 +08:00
|
|
|
[ --with-custom-odbc[=DIR]
|
|
|
|
Include a user defined ODBC support.
|
1999-04-19 23:04:11 +08:00
|
|
|
The DIR is ODBC install base directory,
|
|
|
|
which defaults to /usr/local.
|
|
|
|
Make sure to define CUSTOM_ODBC_LIBS and
|
|
|
|
have some odbc.h in your include dirs.
|
|
|
|
E.g., you should define following for
|
|
|
|
Sybase SQL Anywhere 5.5.00 on QNX, prior to
|
|
|
|
run configure script:
|
2001-04-04 07:30:49 +08:00
|
|
|
CPPFLAGS=\"-DODBC_QNX -DSQLANY_BUG\"
|
1999-04-19 23:04:11 +08:00
|
|
|
LDFLAGS=-lunix
|
|
|
|
CUSTOM_ODBC_LIBS=\"-ldblib -lodbc\".],
|
|
|
|
[
|
|
|
|
if test "$withval" = "yes"; then
|
|
|
|
withval=/usr/local
|
|
|
|
fi
|
|
|
|
if test "$withval" != "no"; then
|
|
|
|
ODBC_INCDIR=$withval/include
|
|
|
|
ODBC_LIBDIR=$withval/lib
|
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
|
|
|
|
ODBC_TYPE=custom
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_CODBC,1,[ ])
|
1999-04-19 23:04:11 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$ODBC_TYPE"; then
|
|
|
|
AC_MSG_CHECKING(for iODBC support)
|
|
|
|
AC_ARG_WITH(iodbc,
|
|
|
|
[ --with-iodbc[=DIR] Include iODBC support. DIR is the iODBC base
|
|
|
|
install directory, defaults to /usr/local.],
|
|
|
|
[
|
2001-02-22 02:23:53 +08:00
|
|
|
PHP_WITH_SHARED
|
1999-04-19 23:04:11 +08:00
|
|
|
if test "$withval" = "yes"; then
|
|
|
|
withval=/usr/local
|
|
|
|
fi
|
|
|
|
if test "$withval" != "no"; then
|
2001-03-28 04:35:04 +08:00
|
|
|
PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib)
|
2001-06-01 14:26:22 +08:00
|
|
|
PHP_ADD_INCLUDE($withval/include, 1)
|
1999-04-19 23:04:11 +08:00
|
|
|
ODBC_TYPE=iodbc
|
2001-06-01 13:02:13 +08:00
|
|
|
ODBC_INCLUDE=-I$withval/include
|
|
|
|
ODBC_LFLAGS=-L$withval/lib
|
|
|
|
ODBC_LIBS=-liodbc
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_IODBC,1,[ ])
|
1999-04-19 23:04:11 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
1999-08-30 18:48:23 +08:00
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
1999-09-23 22:46:35 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
|
|
|
AC_MSG_CHECKING(for Easysoft ODBC-ODBC Bridge support)
|
|
|
|
AC_ARG_WITH(esoob,
|
|
|
|
[ --with-esoob[=DIR] Include Easysoft OOB support. DIR is the OOB base
|
|
|
|
install directory,
|
|
|
|
defaults to /usr/local/easysoft/oob/client.],
|
|
|
|
[
|
2001-02-22 02:23:53 +08:00
|
|
|
PHP_WITH_SHARED
|
1999-09-23 22:46:35 +08:00
|
|
|
if test "$withval" = "yes"; then
|
|
|
|
withval=/usr/local/easysoft/oob/client
|
|
|
|
fi
|
|
|
|
if test "$withval" != "no"; then
|
|
|
|
ODBC_INCDIR=$withval/include
|
|
|
|
ODBC_LIBDIR=$withval/lib
|
|
|
|
ODBC_LFLAGS=-L$ODBC_LIBDIR
|
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
|
|
|
ODBC_LIBS=-lesoobclient
|
|
|
|
ODBC_TYPE=ESOOB
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_ESOOB,1,[ ])
|
1999-09-23 22:46:35 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
1999-08-30 18:48:23 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
|
|
|
AC_MSG_CHECKING(for unixODBC support)
|
|
|
|
AC_ARG_WITH(unixODBC,
|
|
|
|
[ --with-unixODBC[=DIR] Include unixODBC support. DIR is the unixODBC base
|
|
|
|
install directory, defaults to /usr/local.],
|
|
|
|
[
|
2001-02-22 02:23:53 +08:00
|
|
|
PHP_WITH_SHARED
|
1999-08-30 18:48:23 +08:00
|
|
|
if test "$withval" = "yes"; then
|
|
|
|
withval=/usr/local
|
|
|
|
fi
|
|
|
|
if test "$withval" != "no"; then
|
|
|
|
ODBC_INCDIR=$withval/include
|
|
|
|
ODBC_LIBDIR=$withval/lib
|
|
|
|
ODBC_LFLAGS=-L$ODBC_LIBDIR
|
|
|
|
ODBC_INCLUDE=-I$ODBC_INCDIR
|
|
|
|
ODBC_LIBS=-lodbc
|
|
|
|
ODBC_TYPE=unixODBC
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_UNIXODBC,1,[ ])
|
1999-08-30 18:48:23 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
1999-04-19 23:04:11 +08:00
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$ODBC_TYPE"; then
|
|
|
|
AC_MSG_CHECKING(for OpenLink ODBC support)
|
|
|
|
AC_ARG_WITH(openlink,
|
|
|
|
[ --with-openlink[=DIR] Include OpenLink ODBC support. DIR is the
|
|
|
|
OpenLink base install directory, defaults to
|
2001-07-06 22:30:34 +08:00
|
|
|
/usr/local. This is the same as iODBC.],
|
1999-04-19 23:04:11 +08:00
|
|
|
[
|
2001-02-22 02:23:53 +08:00
|
|
|
PHP_WITH_SHARED
|
1999-04-19 23:04:11 +08:00
|
|
|
if test "$withval" = "yes"; then
|
2001-07-06 22:30:34 +08:00
|
|
|
withval=/usr/local
|
1999-04-19 23:04:11 +08:00
|
|
|
fi
|
|
|
|
if test "$withval" != "no"; then
|
2001-07-06 22:30:34 +08:00
|
|
|
PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib)
|
|
|
|
PHP_ADD_INCLUDE($withval/include, 1)
|
|
|
|
ODBC_TYPE=iodbc
|
|
|
|
ODBC_INCLUDE=-I$withval/include
|
|
|
|
ODBC_LFLAGS=-L$withval/lib
|
1999-04-19 23:04:11 +08:00
|
|
|
ODBC_LIBS=-liodbc
|
2001-07-06 22:30:34 +08:00
|
|
|
AC_DEFINE(HAVE_IODBC,1,[ ])
|
1999-04-19 23:04:11 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
2001-07-06 22:30:34 +08:00
|
|
|
echo "****************************************************************"
|
|
|
|
echo " --with-openlink will not be valid in future releases. Please "
|
|
|
|
echo " update your configure script to use --with-iodbc instead. "
|
|
|
|
echo "****************************************************************"
|
1999-04-19 23:04:11 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
1999-11-29 08:45:28 +08:00
|
|
|
if test -z "$ODBC_TYPE"; then
|
|
|
|
AC_MSG_CHECKING(for DBMaker support)
|
|
|
|
AC_ARG_WITH(dbmaker,
|
|
|
|
[ --with-dbmaker[=DIR] Include DBMaker support. DIR is the DBMaker base
|
|
|
|
install directory, defaults to where the latest
|
|
|
|
version of DBMaker is installed (such as
|
2000-03-27 03:47:28 +08:00
|
|
|
/home/dbmaker/3.6).],
|
1999-11-29 08:45:28 +08:00
|
|
|
[
|
2000-07-06 16:38:12 +08:00
|
|
|
PHP_WITH_SHARED
|
1999-11-29 08:45:28 +08:00
|
|
|
if test "$withval" = "yes"; then
|
|
|
|
# find dbmaker's home directory
|
|
|
|
DBMAKER_HOME=`grep "^dbmaker:" /etc/passwd | awk -F: '{print $6}'`
|
2000-07-06 16:38:12 +08:00
|
|
|
|
|
|
|
# check DBMaker version (from 5.0 to 2.0)
|
|
|
|
DBMAKER_VERSION=5.0
|
|
|
|
|
2001-02-22 02:23:53 +08:00
|
|
|
while test test ! -d $DBMAKER_HOME/$DBMAKER_VERSION -a \
|
|
|
|
"$DBMAKER_VERSION" != "2.9"; do
|
2000-07-06 16:38:12 +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; }'`
|
|
|
|
DBMAKER_VERSION=$MAJOR_V.$MINOR_V
|
|
|
|
done
|
|
|
|
|
2001-02-22 02:23:53 +08:00
|
|
|
if test "$DBMAKER_VERSION" = "2.9"; then
|
2000-07-06 16:38:12 +08:00
|
|
|
withval=$DBMAKER_HOME
|
|
|
|
else
|
|
|
|
DBMAKER_PATH=$DBMAKER_HOME/$DBMAKER_VERSION
|
|
|
|
fi
|
|
|
|
|
1999-11-29 08:45:28 +08:00
|
|
|
withval=$DBMAKER_PATH
|
|
|
|
fi
|
2000-07-06 16:38:12 +08:00
|
|
|
|
1999-11-29 08:45:28 +08:00
|
|
|
if test "$withval" != "no"; then
|
|
|
|
ODBC_INCDIR=$withval/include
|
|
|
|
ODBC_LIBDIR=$withval/lib
|
|
|
|
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])
|
|
|
|
|
|
|
|
if test "$shared" = "yes"; then
|
|
|
|
AC_MSG_RESULT(yes (shared))
|
2000-10-21 19:11:11 +08:00
|
|
|
ODBC_LIBS="-ldmapic -lc -lm"
|
2001-06-01 13:02:13 +08:00
|
|
|
ODBC_SHARED="odbc.la"
|
2000-07-06 16:38:12 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes (static))
|
2001-03-28 04:35:04 +08:00
|
|
|
PHP_ADD_LIBRARY_WITH_PATH(dmapic, $ODBC_LIBDIR)
|
|
|
|
PHP_ADD_INCLUDE($ODBC_INCDIR)
|
2001-06-01 13:02:13 +08:00
|
|
|
ODBC_STATIC="libphpext_odbc.la"
|
2000-07-06 16:38:12 +08:00
|
|
|
fi
|
|
|
|
|
1999-11-29 08:45:28 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
1999-12-31 08:21:01 +08:00
|
|
|
if test -n "$ODBC_TYPE"; then
|
1999-04-19 23:04:11 +08:00
|
|
|
INCLUDES="$INCLUDES $ODBC_INCLUDE"
|
2000-07-06 16:38:12 +08:00
|
|
|
if test "$ODBC_TYPE" != "dbmaker"; then
|
2002-02-07 03:10:35 +08:00
|
|
|
if test "$shared" != "yes"; then
|
2000-12-17 19:17:50 +08:00
|
|
|
EXTRA_LIBS="$EXTRA_LIBS $ODBC_LFLAGS $ODBC_LIBS"
|
|
|
|
fi
|
2000-07-06 16:38:12 +08:00
|
|
|
fi
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_UODBC,1,[ ])
|
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)
|
2000-07-06 16:38:12 +08:00
|
|
|
PHP_EXTENSION(odbc, $shared)
|
1999-04-19 23:04:11 +08:00
|
|
|
fi
|