diff options
author | Timm Friebe <thekid@php.net> | 2010-06-28 13:35:06 +0000 |
---|---|---|
committer | Timm Friebe <thekid@php.net> | 2010-06-28 13:35:06 +0000 |
commit | 0f022566aea3ecfbf0945e90a4438a239a1eb46d (patch) | |
tree | b659b2904e4bd20985eadd8087edc1b70843fc0d /ext | |
parent | 5c4e0080440842842db7a340f06ae5381a39121b (diff) | |
download | php-git-0f022566aea3ecfbf0945e90a4438a239a1eb46d.tar.gz |
- Added test for tds_sysdep_public.h and link against -lct only then
- Added test for libsybct64 and libsybct
# The former is a fix for newer versions of FreeTDS which no longer
# provide the tds.h - we need to distinguish in what we link against
# between FreeTDS and the official Sybase libraries, and this seems
# to do the job.
# The latter is the patch from bug #49276 (finally, and sorry)
Diffstat (limited to 'ext')
-rw-r--r-- | ext/sybase_ct/config.m4 | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/ext/sybase_ct/config.m4 b/ext/sybase_ct/config.m4 index 72a982463e..6f34760d02 100644 --- a/ext/sybase_ct/config.m4 +++ b/ext/sybase_ct/config.m4 @@ -31,9 +31,45 @@ if test "$PHP_SYBASE_CT" != "no"; then fi PHP_ADD_LIBPATH($SYBASE_CT_LIBDIR, SYBASE_CT_SHARED_LIBADD) - if test -f $SYBASE_CT_INCDIR/tds.h; then + if test -f $SYBASE_CT_INCDIR/tds.h -o -f $SYBASE_CT_INCDIR/tds_sysdep_public.h; then PHP_ADD_LIBRARY(ct,, SYBASE_CT_SHARED_LIBADD) SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lct" + else if test -f $SYBASE_CT_INCDIR/libsybct64; then + PHP_ADD_LIBRARY(sybcs64,, SYBASE_CT_SHARED_LIBADD) + PHP_ADD_LIBRARY(sybct64,, SYBASE_CT_SHARED_LIBADD) + PHP_ADD_LIBRARY(sybcomn64,, SYBASE_CT_SHARED_LIBADD) + PHP_ADD_LIBRARY(sybintl64,, SYBASE_CT_SHARED_LIBADD) + + SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lsybcs64 -lsybct64 -lsybcomn64 -lsybintl64" + + PHP_CHECK_LIBRARY(sybtcl64, netg_errstr, [ + PHP_ADD_LIBRARY(sybtcl64,,SYBASE_CT_SHARED_LIBADD) + ],[ + PHP_ADD_LIBRARY(sybtcl64,,SYBASE_CT_SHARED_LIBADD) + ],[ + $SYBASE_CT_LIBS + ]) + + PHP_CHECK_LIBRARY(insck64, insck__getVdate, [PHP_ADD_LIBRARY(insck64,, SYBASE_CT_SHARED_LIBADD)],[],[-L$SYBASE_CT_LIBDIR]) + PHP_CHECK_LIBRARY(insck64, bsd_tcp, [PHP_ADD_LIBRARY(insck64,, SYBASE_CT_SHARED_LIBADD)],[],[-L$SYBASE_CT_LIBDIR]) + else if test -f $SYBASE_CT_INCDIR/libsybct; then + PHP_ADD_LIBRARY(sybcs,, SYBASE_CT_SHARED_LIBADD) + PHP_ADD_LIBRARY(sybct,, SYBASE_CT_SHARED_LIBADD) + PHP_ADD_LIBRARY(sybcomn,, SYBASE_CT_SHARED_LIBADD) + PHP_ADD_LIBRARY(sybintl,, SYBASE_CT_SHARED_LIBADD) + + SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lsybcs -lsybct -lsybcomn -lsybintl" + + PHP_CHECK_LIBRARY(sybtcl, netg_errstr, [ + PHP_ADD_LIBRARY(sybtcl,,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]) else PHP_ADD_LIBRARY(cs,, SYBASE_CT_SHARED_LIBADD) PHP_ADD_LIBRARY(ct,, SYBASE_CT_SHARED_LIBADD) |