mirror of
https://github.com/php/php-src.git
synced 2024-12-18 22:41:20 +08:00
- Changed output to be more verbose as to what libraries are used
- Changed check for 64-bit vs 32-bit build environment to check sizeof(int) instead of assuming that if libsybct64.so exists, it must be 64-bit # Bug #53540: Correct Sybase 15.0 libraries not found by configure
This commit is contained in:
parent
d42683cbd2
commit
9c98b18950
@ -15,7 +15,7 @@ if test "$PHP_SYBASE_CT" != "no"; then
|
||||
AC_DEFINE(HAVE_SYBASE_CT,1,[ ])
|
||||
PHP_NEW_EXTENSION(sybase_ct, php_sybase_ct.c, $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
|
||||
@ -24,17 +24,37 @@ if test "$PHP_SYBASE_CT" != "no"; then
|
||||
SYBASE_CT_LIBDIR=$PHP_SYBASE_CT/lib
|
||||
fi
|
||||
|
||||
dnl Determine whether we're building 64 or 32 bit...
|
||||
AC_CHECK_SIZEOF(long int, 4)
|
||||
AC_MSG_CHECKING([checking if we're on a 64-bit platform])
|
||||
if test "$ac_cv_sizeof_long_int" = "4"; then
|
||||
AC_MSG_RESULT([no])
|
||||
PHP_SYBASE_64=no
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
PHP_SYBASE_64=yes
|
||||
fi
|
||||
|
||||
|
||||
AC_MSG_CHECKING([Checking for ctpublic.h])
|
||||
if test -f $SYBASE_CT_INCDIR/ctpublic.h; then
|
||||
AC_MSG_RESULT([found in $SYBASE_CT_INCDIR])
|
||||
PHP_ADD_INCLUDE($SYBASE_CT_INCDIR)
|
||||
else
|
||||
AC_MSG_ERROR([ctpublic.h missing!])
|
||||
fi
|
||||
|
||||
|
||||
AC_MSG_CHECKING([Checking Sybase libdir])
|
||||
AC_MSG_RESULT([Have $SYBASE_CT_LIBDIR])
|
||||
|
||||
AC_MSG_CHECKING([Checking for Sybase platform libraries])
|
||||
|
||||
PHP_ADD_LIBPATH($SYBASE_CT_LIBDIR, SYBASE_CT_SHARED_LIBADD)
|
||||
if test -f $SYBASE_CT_INCDIR/tds.h || test -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"
|
||||
elif test -f $SYBASE_CT_INCDIR/libsybct64.so; then
|
||||
AC_MSG_RESULT([FreeTDS: $SYBASE_CT_LIBS])
|
||||
elif test -f $SYBASE_CT_LIBDIR/libsybct64.so && test $PHP_SYBASE_64 = "yes"; 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)
|
||||
@ -46,6 +66,7 @@ if test "$PHP_SYBASE_CT" != "no"; then
|
||||
*) CFLAGS="${CFLAGS} -DSYB_LP64" ;; #
|
||||
esac
|
||||
SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lsybcs64 -lsybct64 -lsybcomn64 -lsybintl64"
|
||||
AC_MSG_RESULT([Sybase64: $SYBASE_CT_LIBS])
|
||||
|
||||
PHP_CHECK_LIBRARY(sybtcl64, netg_errstr, [
|
||||
PHP_ADD_LIBRARY(sybtcl64,,SYBASE_CT_SHARED_LIBADD)
|
||||
@ -57,13 +78,14 @@ if test "$PHP_SYBASE_CT" != "no"; then
|
||||
|
||||
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])
|
||||
elif test -f $SYBASE_CT_INCDIR/libsybct.so; then
|
||||
elif test -f $SYBASE_CT_LIBDIR/libsybct.so; 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"
|
||||
AC_MSG_RESULT([Sybase32 syb-prefix: $SYBASE_CT_LIBS])
|
||||
|
||||
PHP_CHECK_LIBRARY(sybtcl, netg_errstr, [
|
||||
PHP_ADD_LIBRARY(sybtcl,,SYBASE_CT_SHARED_LIBADD)
|
||||
@ -82,6 +104,7 @@ if test "$PHP_SYBASE_CT" != "no"; then
|
||||
PHP_ADD_LIBRARY(intl,, SYBASE_CT_SHARED_LIBADD)
|
||||
|
||||
SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lcs -lct -lcomn -lintl"
|
||||
AC_MSG_RESULT([Sybase32 default: $SYBASE_CT_LIBS])
|
||||
|
||||
PHP_CHECK_LIBRARY(tcl, netg_errstr, [
|
||||
PHP_ADD_LIBRARY(tcl,,SYBASE_CT_SHARED_LIBADD)
|
||||
|
Loading…
Reference in New Issue
Block a user