2001-12-01 03:00:13 +08:00
|
|
|
dnl
|
1999-08-13 08:14:17 +08:00
|
|
|
dnl $Id$
|
2001-12-01 03:00:13 +08:00
|
|
|
dnl
|
1999-08-13 08:14:17 +08:00
|
|
|
|
2001-06-22 23:52:25 +08:00
|
|
|
PHP_ARG_WITH(sybase-ct, for Sybase-CT support,
|
1999-08-13 08:14:17 +08:00
|
|
|
[ --with-sybase-ct[=DIR] Include Sybase-CT support. DIR is the Sybase home
|
2007-07-04 01:24:39 +08:00
|
|
|
directory [/home/sybase]])
|
2001-06-22 23:52:25 +08:00
|
|
|
|
|
|
|
if test "$PHP_SYBASE_CT" != "no"; then
|
2003-03-17 23:56:17 +08:00
|
|
|
|
2008-07-02 01:29:48 +08:00
|
|
|
if test "$PHP_SYBASE" && test "$PHP_SYBASE" != "no" && test "$ext_shared" = "no"; then
|
2003-03-17 23:56:17 +08:00
|
|
|
AC_MSG_ERROR([You can not use both --with-sybase and --with-sybase-ct in same build!])
|
|
|
|
fi
|
|
|
|
|
2001-06-22 23:52:25 +08:00
|
|
|
AC_DEFINE(HAVE_SYBASE_CT,1,[ ])
|
2002-03-13 00:44:00 +08:00
|
|
|
PHP_NEW_EXTENSION(sybase_ct, php_sybase_ct.c, $ext_shared)
|
2001-06-22 23:52:25 +08:00
|
|
|
PHP_SUBST(SYBASE_CT_SHARED_LIBADD)
|
|
|
|
|
|
|
|
if test "$PHP_SYBASE_CT" = "yes"; then
|
|
|
|
SYBASE_CT_INCDIR=/home/sybase/include
|
|
|
|
SYBASE_CT_LIBDIR=/home/sybase/lib
|
1999-08-13 08:14:17 +08:00
|
|
|
else
|
2001-06-22 23:52:25 +08:00
|
|
|
SYBASE_CT_INCDIR=$PHP_SYBASE_CT/include
|
|
|
|
SYBASE_CT_LIBDIR=$PHP_SYBASE_CT/lib
|
1999-08-13 08:14:17 +08:00
|
|
|
fi
|
2001-06-22 23:52:25 +08:00
|
|
|
|
2001-10-23 18:31:56 +08:00
|
|
|
if test -f $SYBASE_CT_INCDIR/ctpublic.h; then
|
|
|
|
PHP_ADD_INCLUDE($SYBASE_CT_INCDIR)
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([ctpublic.h missing!])
|
|
|
|
fi
|
|
|
|
|
2001-06-22 23:52:25 +08:00
|
|
|
PHP_ADD_LIBPATH($SYBASE_CT_LIBDIR, SYBASE_CT_SHARED_LIBADD)
|
2001-12-01 06:12:31 +08:00
|
|
|
if test -f $SYBASE_CT_INCDIR/tds.h; then
|
|
|
|
PHP_ADD_LIBRARY(ct,, SYBASE_CT_SHARED_LIBADD)
|
|
|
|
SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lct"
|
|
|
|
else
|
|
|
|
PHP_ADD_LIBRARY(cs,, SYBASE_CT_SHARED_LIBADD)
|
|
|
|
PHP_ADD_LIBRARY(ct,, SYBASE_CT_SHARED_LIBADD)
|
|
|
|
PHP_ADD_LIBRARY(comn,, SYBASE_CT_SHARED_LIBADD)
|
|
|
|
PHP_ADD_LIBRARY(intl,, SYBASE_CT_SHARED_LIBADD)
|
|
|
|
|
|
|
|
SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lcs -lct -lcomn -lintl"
|
|
|
|
|
|
|
|
PHP_CHECK_LIBRARY(tcl, netg_errstr, [
|
|
|
|
PHP_ADD_LIBRARY(tcl,,SYBASE_CT_SHARED_LIBADD)
|
|
|
|
],[
|
|
|
|
PHP_ADD_LIBRARY(sybtcl,,SYBASE_CT_SHARED_LIBADD)
|
|
|
|
],[
|
|
|
|
$SYBASE_CT_LIBS
|
|
|
|
])
|
|
|
|
|
|
|
|
PHP_CHECK_LIBRARY(insck, insck__getVdate, [PHP_ADD_LIBRARY(insck,, SYBASE_CT_SHARED_LIBADD)],[],[-L$SYBASE_CT_LIBDIR])
|
|
|
|
PHP_CHECK_LIBRARY(insck, bsd_tcp, [PHP_ADD_LIBRARY(insck,, SYBASE_CT_SHARED_LIBADD)],[],[-L$SYBASE_CT_LIBDIR])
|
|
|
|
fi
|
2001-06-22 23:52:25 +08:00
|
|
|
fi
|