diff options
author | foobar <sniper@php.net> | 2001-06-22 15:52:25 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2001-06-22 15:52:25 +0000 |
commit | d87e59a1a3dea4a376e49697b670160189a303ff (patch) | |
tree | 87d91f08b294ab8ad96fc66e0de021c6776fdf66 /ext/sybase_ct | |
parent | f61eac29ad7a0e68f8bc3436d6222a47566245af (diff) | |
download | php-git-d87e59a1a3dea4a376e49697b670160189a303ff.tar.gz |
Make it possible to build this extension as shared module.
Diffstat (limited to 'ext/sybase_ct')
-rw-r--r-- | ext/sybase_ct/Makefile.in | 7 | ||||
-rw-r--r-- | ext/sybase_ct/config.m4 | 73 |
2 files changed, 39 insertions, 41 deletions
diff --git a/ext/sybase_ct/Makefile.in b/ext/sybase_ct/Makefile.in index 4b495e4a85..54194fe6fd 100644 --- a/ext/sybase_ct/Makefile.in +++ b/ext/sybase_ct/Makefile.in @@ -1,5 +1,8 @@ -LTLIBRARY_NAME = libsybase_ct.la -LTLIBRARY_SOURCES = php_sybase_ct.c +LTLIBRARY_NAME = libsybase_ct.la +LTLIBRARY_SOURCES = php_sybase_ct.c +LTLIBRARY_SHARED_NAME = sybase_ct.la +LTLIBRARY_SHARED_LIBADD = $(SYBASE_CT_SHARED_LIBADD) include $(top_srcdir)/build/dynlib.mk + diff --git a/ext/sybase_ct/config.m4 b/ext/sybase_ct/config.m4 index bb640d75c0..d2ba808fe7 100644 --- a/ext/sybase_ct/config.m4 +++ b/ext/sybase_ct/config.m4 @@ -1,44 +1,39 @@ dnl $Id$ -AC_MSG_CHECKING(for Sybase-CT support) -AC_ARG_WITH(sybase-ct, +PHP_ARG_WITH(sybase-ct, for Sybase-CT support, [ --with-sybase-ct[=DIR] Include Sybase-CT support. DIR is the Sybase home - directory, defaults to /home/sybase.], -[ - if test "$withval" != "no"; then - AC_MSG_RESULT(yes) - if test -z "$SYBASE_LIBS"; then - PHP_EXTENSION(sybase_ct) - fi - AC_DEFINE(HAVE_SYBASE_CT,1,[ ]) - if test "$withval" = "yes"; then - SYBASE_CT_INCDIR=/home/sybase/include - SYBASE_CT_LIBDIR=/home/sybase/lib - else - SYBASE_CT_INCDIR=$withval/include - SYBASE_CT_LIBDIR=$withval/lib - fi - PHP_ADD_INCLUDE($SYBASE_CT_INCDIR) - PHP_ADD_LIBPATH($SYBASE_CT_LIBDIR) - PHP_ADD_LIBRARY(cs) - PHP_ADD_LIBRARY(ct) - PHP_ADD_LIBRARY(comn) - PHP_ADD_LIBRARY(intl) - SYBASE_CT_LIBS="-lcs -lct -lcomn -lintl" - old_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -L$SYBASE_CT_LIBDIR" - AC_CHECK_LIB(tcl, netg_errstr, - [ PHP_ADD_LIBRARY(tcl) ], - [ PHP_ADD_LIBRARY(sybtcl) ], - [ $SYBASE_CT_LIBS ]) - AC_CHECK_LIB(insck, insck__getVdate, - [ PHP_ADD_LIBRARY(insck) ]) - AC_CHECK_LIB(insck, bsd_tcp, - [ PHP_ADD_LIBRARY(insck) ]) - LDFLAGS=$old_LDFLAGS + directory. Defaults to /home/sybase.]) + +if test "$PHP_SYBASE_CT" != "no"; then + AC_DEFINE(HAVE_SYBASE_CT,1,[ ]) + PHP_EXTENSION(sybase_ct,$ext_shared) + 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 else - AC_MSG_RESULT(no) + SYBASE_CT_INCDIR=$PHP_SYBASE_CT/include + SYBASE_CT_LIBDIR=$PHP_SYBASE_CT/lib fi -],[ - AC_MSG_RESULT(no) -]) + + PHP_ADD_INCLUDE($SYBASE_CT_INCDIR) + PHP_ADD_LIBPATH($SYBASE_CT_LIBDIR, SYBASE_CT_SHARED_LIBADD) + 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" + + AC_CHECK_LIB(tcl, netg_errstr, [ + PHP_ADD_LIBRARY(tcl,,SYBASE_CT_SHARED_LIBADD) + ],[ + PHP_ADD_LIBRARY(sybtcl,,SYBASE_CT_SHARED_LIBADD) + ],[ + $SYBASE_CT_LIBS + ]) + + AC_CHECK_LIB(insck, insck__getVdate, [PHP_ADD_LIBRARY(insck,, SYBASE_CT_SHARED_LIBADD)],[],[-L$SYBASE_CT_LIBDIR]) + AC_CHECK_LIB(insck, bsd_tcp, [PHP_ADD_LIBRARY(insck,, SYBASE_CT_SHARED_LIBADD)],[],[-L$SYBASE_CT_LIBDIR]) +fi |