]> granicus.if.org Git - php/commitdiff
Change for Empress PHP support
authorWenhui Zhang <zhang@php.net>
Wed, 9 May 2001 15:35:31 +0000 (15:35 +0000)
committerWenhui Zhang <zhang@php.net>
Wed, 9 May 2001 15:35:31 +0000 (15:35 +0000)
ext/odbc/config.m4
ext/odbc/php_odbc.h
ext/odbc/setup.stub

index 500aa4a87ec06950020938d878067474cb5d0738..330855955cc26342fde65ad4d0ab5f857eab9c50 100644 (file)
@@ -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
@@ -226,6 +237,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,
@@ -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
index b6cba7b4fb1fa2bd817ee2219ecc32fdb93db3af..9c6b210850fa9c1f6162d12d586f93a4986c2b3b 100644 (file)
@@ -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
index 859750c9ea1e2e07d0c35c617c181e9c53b87093..62693a67b1943ee37030d25456c2e708ce86609e 100644 (file)
@@ -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