summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWenhui Zhang <zhang@php.net>2001-05-09 15:35:31 +0000
committerWenhui Zhang <zhang@php.net>2001-05-09 15:35:31 +0000
commitb6b5039f255ce0c88c2b2805065cbe000daa7ec0 (patch)
tree731a13a3a1d642c046db298689cb820aca2bedf3
parent855cad5c54a8a962b837f06d3de0ecb1cd54d629 (diff)
downloadphp-git-b6b5039f255ce0c88c2b2805065cbe000daa7ec0.tar.gz
Change for Empress PHP support
-rw-r--r--ext/odbc/config.m478
-rw-r--r--ext/odbc/php_odbc.h2
-rw-r--r--ext/odbc/setup.stub12
3 files changed, 80 insertions, 12 deletions
diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4
index 500aa4a87e..330855955c 100644
--- a/ext/odbc/config.m4
+++ b/ext/odbc/config.m4
@@ -69,13 +69,22 @@ 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])
- ODBC_LIBS=`echo $1/empodbc.so | cut -d' ' -f1`
+ ODBC_LIBS=`echo $1/libempodbccl.so | cut -d' ' -f1`
if test ! -f $ODBC_LIBS; then
- ODBC_LIBS=`echo $1/empodbc.a | cut -d' ' -f1`
+ ODBC_LIBS=`echo $1/libempodbccl.so | cut -d' ' -f1`
fi
AC_MSG_RESULT(`echo $ODBC_LIBS | sed -e 's!.*/!!'`)
])
+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!.*/!!'`)
+])
+
if test -z "$ODBC_TYPE"; then
AC_MSG_CHECKING(for Adabas support)
AC_ARG_WITH(adabas,
@@ -201,16 +210,18 @@ 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
- install directory, defaults to \$EMPRESSPATH],
+ install directory, defaults to \$EMPRESSPATH.
+ From PHP4, this option only supports Empress Version
+ 8.60 and above],
[
PHP_WITH_SHARED
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
- ODBC_INCDIR=$EMPRESSPATH/odbccl/include
- ODBC_LIBDIR=$EMPRESSPATH/odbccl/lib
+ ODBC_INCDIR=$EMPRESSPATH/include/odbc
+ ODBC_LIBDIR=$EMPRESSPATH/shlib
else
- ODBC_INCDIR=$withval/include
- ODBC_LIBDIR=$withval/lib
+ ODBC_INCDIR=$withval/include/odbc
+ ODBC_LIBDIR=$withval/shlib
fi
ODBC_INCLUDE=-I$ODBC_INCDIR
ODBC_LFLAGS=-L$ODBC_LIBDIR
@@ -227,6 +238,53 @@ AC_ARG_WITH(empress,
fi
if test -z "$ODBC_TYPE"; then
+AC_MSG_CHECKING(for Empress local access support)
+AC_ARG_WITH(empress-bcs,
+[ --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],
+[
+ 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
+
+if test -z "$ODBC_TYPE"; then
AC_MSG_CHECKING(for Velocis support)
AC_ARG_WITH(velocis,
[ --with-velocis[=DIR] Include Velocis support. DIR is the Velocis base
@@ -474,10 +532,10 @@ if test -n "$ODBC_TYPE"; then
fi
AC_DEFINE(HAVE_UODBC,1,[ ])
PHP_SUBST(ODBC_INCDIR)
+ PHP_SUBST(ODBC_INCLUDE)
PHP_SUBST(ODBC_LIBDIR)
- PHP_SUBST_OLD(ODBC_INCLUDE)
- PHP_SUBST_OLD(ODBC_LIBS)
- PHP_SUBST_OLD(ODBC_LFLAGS)
+ PHP_SUBST(ODBC_LIBS)
+ PHP_SUBST(ODBC_LFLAGS)
PHP_SUBST_OLD(ODBC_TYPE)
PHP_EXTENSION(odbc, $shared)
fi
diff --git a/ext/odbc/php_odbc.h b/ext/odbc/php_odbc.h
index b6cba7b4fb..9c6b210850 100644
--- a/ext/odbc/php_odbc.h
+++ b/ext/odbc/php_odbc.h
@@ -246,7 +246,7 @@ PHP_FUNCTION(odbc_statistics);
#define ODBC_SQL_ENV_T SQLHANDLE
#define ODBC_SQL_CONN_T SQLHANDLE
#define ODBC_SQL_STMT_T SQLHANDLE
-#elif defined( HAVE_SOLID_35 ) || defined( HAVE_SAPDB )
+#elif defined( HAVE_SOLID_35 ) || defined( HAVE_SAPDB ) || defined ( HAVE_EMPRESS )
#define ODBC_SQL_ENV_T SQLHENV
#define ODBC_SQL_CONN_T SQLHDBC
#define ODBC_SQL_STMT_T SQLHSTMT
diff --git a/ext/odbc/setup.stub b/ext/odbc/setup.stub
index 859750c9ea..62693a67b1 100644
--- a/ext/odbc/setup.stub
+++ b/ext/odbc/setup.stub
@@ -11,7 +11,17 @@ if test "$option_value_with_solid" = "no"; then
define_option with-empress 'Empress support?' yesnodir \
"no $EMPRESSPATH Empress home" \
' Whether to build PHP with Empress support. Has been confirmed to
- work with Empress Version 8.10. If you have not set up your
+ work with Empress Version 8.60. If you have not set up your
+ Empress environment, enter what $EMPRESSPATH is usually set to here.
+ More info about Empress can be found at http://www.empress.com/.'
+fi
+
+# Empress
+if test "$option_value_with_solid" = "no"; then
+define_option with-empress-bcs 'Empress support?' yesnodir \
+ "no $EMPRESSPATH Empress home" \
+' Whether to build PHP with Empress support. Has been confirmed to
+ work with Empress Version 8.60. If you have not set up your
Empress environment, enter what $EMPRESSPATH is usually set to here.
More info about Empress can be found at http://www.empress.com/.'
fi