1dnl 2dnl $Id$ 3dnl 4 5AC_DEFUN([PHP_ODBC_CHECK_HEADER],[ 6if ! test -f "$ODBC_INCDIR/$1"; then 7 AC_MSG_ERROR([ODBC header file '$ODBC_INCDIR/$1' not found!]) 8fi 9]) 10 11dnl 12dnl Figure out which library file to link with for the Solid support. 13dnl 14AC_DEFUN([PHP_ODBC_FIND_SOLID_LIBS],[ 15 AC_MSG_CHECKING([Solid library file]) 16 ac_solid_uname_r=`uname -r 2>/dev/null` 17 ac_solid_uname_s=`uname -s 2>/dev/null` 18 case $ac_solid_uname_s in 19 AIX) ac_solid_os=a3x;; # a4x for AIX4/ Solid 2.3/3.0 only 20 HP-UX) ac_solid_os=h9x;; # h1x for hpux11, h0x for hpux10 21 IRIX) ac_solid_os=irx;; # Solid 2.3(?)/ 3.0 only 22 Linux) 23 if ldd -v /bin/sh | grep GLIBC > /dev/null; then 24 AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ]) 25 ac_solid_os=l2x 26 else 27 AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ]) 28 ac_solid_os=lux 29 fi;; 30 SunOS) 31 ac_solid_os=ssx;; # should we deal with SunOS 4? 32 FreeBSD) 33 if test `expr $ac_solid_uname_r : '\(.\)'` -gt "2"; then 34 AC_DEFINE(SS_FBX,1,[Needed in sqlunix.h for wchar defs ]) 35 ac_solid_os=fex 36 else 37 AC_DEFINE(SS_FBX,1,[Needed in sqlunix.h for wchar defs ]) 38 ac_solid_os=fbx 39 fi;; 40 esac 41 42 if test -f $1/soc${ac_solid_os}35.a; then 43 ac_solid_version=35 44 ac_solid_prefix=soc 45 elif test -f $1/scl${ac_solid_os}30.a; then 46 ac_solid_version=30 47 ac_solid_prefix=scl 48 elif test -f $1/scl${ac_solid_os}23.a; then 49 ac_solid_version=23 50 ac_solid_prefix=scl 51 fi 52 53# 54# Check for the library files, and setup the ODBC_LIBS path... 55# 56if test ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \ 57 ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then 58 # 59 # we have an error and should bail out, as we can't find the libs! 60 # 61 echo "" 62 echo "*********************************************************************" 63 echo "* Unable to locate $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" 64 echo "* Please correct this by creating the following links and reconfiguring:" 65 echo "* $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a" 66 echo "* $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -> $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so" 67 echo "*********************************************************************" 68else 69 ODBC_LFLAGS=-L$1 70 ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version} 71fi 72 73 AC_MSG_RESULT(`echo $ODBC_LIBS | sed -e 's!.*/!!'`) 74]) 75 76 77dnl 78dnl Figure out which library file to link with for the Empress support. 79dnl 80 81AC_DEFUN([PHP_ODBC_FIND_EMPRESS_LIBS],[ 82 AC_MSG_CHECKING([Empress library file]) 83 ODBC_LIBS=`echo $1/libempodbccl.so | cut -d' ' -f1` 84 if test ! -f $ODBC_LIBS; then 85 ODBC_LIBS=`echo $1/libempodbccl.so | cut -d' ' -f1` 86 fi 87 AC_MSG_RESULT(`echo $ODBC_LIBS | sed -e 's!.*/!!'`) 88]) 89 90AC_DEFUN([PHP_ODBC_FIND_EMPRESS_BCS_LIBS],[ 91 AC_MSG_CHECKING([Empress local access library file]) 92 ODBCBCS_LIBS=`echo $1/libempodbcbcs.a | cut -d' ' -f1` 93 if test ! -f $ODBCBCS_LIBS; then 94 ODBCBCS_LIBS=`echo $1/libempodbcbcs.a | cut -d' ' -f1` 95 fi 96 AC_MSG_RESULT(`echo $ODBCBCS_LIBS | sed -e 's!.*/!!'`) 97]) 98 99dnl 100dnl configure options 101dnl 102 103PHP_ARG_WITH(odbcver,, 104[ --with-odbcver[=HEX] Force support for the passed ODBC version. A hex number is expected, default 0x0300. 105 Use the special value of 0 to prevent an explicit ODBCVER to be defined. ], 0x0300) 106 107if test -z "$ODBC_TYPE"; then 108PHP_ARG_WITH(adabas,, 109[ --with-adabas[=DIR] Include Adabas D support [/usr/local]]) 110 111 AC_MSG_CHECKING([for Adabas support]) 112 if test "$PHP_ADABAS" != "no"; then 113 if test "$PHP_ADABAS" = "yes"; then 114 PHP_ADABAS=/usr/local 115 fi 116 PHP_ADD_INCLUDE($PHP_ADABAS/incl) 117 PHP_ADD_LIBPATH($PHP_ADABAS/$PHP_LIBDIR) 118 ODBC_OBJS="$PHP_ADABAS/$PHP_LIBDIR/odbclib.a" 119 ODBC_LIB="$abs_builddir/ext/odbc/libodbc_adabas.a" 120 $srcdir/build/shtool mkdir -f -p ext/odbc 121 rm -f "$ODBC_LIB" 122 cp "$ODBC_OBJS" "$ODBC_LIB" 123 PHP_ADD_LIBRARY(sqlptc) 124 PHP_ADD_LIBRARY(sqlrte) 125 PHP_ADD_LIBRARY_WITH_PATH(odbc_adabas, $abs_builddir/ext/odbc) 126 ODBC_TYPE=adabas 127 ODBC_INCDIR=$PHP_ADABAS/incl 128 PHP_ODBC_CHECK_HEADER(sqlext.h) 129 AC_DEFINE(HAVE_ADABAS,1,[ ]) 130 AC_MSG_RESULT([$ext_output]) 131 else 132 AC_MSG_RESULT(no) 133 fi 134fi 135 136if test -z "$ODBC_TYPE"; then 137PHP_ARG_WITH(sapdb,, 138[ --with-sapdb[=DIR] Include SAP DB support [/usr/local]]) 139 140 AC_MSG_CHECKING([for SAP DB support]) 141 if test "$PHP_SAPDB" != "no"; then 142 if test "$PHP_SAPDB" = "yes"; then 143 PHP_SAPDB=/usr/local 144 fi 145 PHP_ADD_INCLUDE($PHP_SAPDB/incl) 146 PHP_ADD_LIBPATH($PHP_SAPDB/$PHP_LIBDIR) 147 PHP_ADD_LIBRARY(sqlod) 148 ODBC_TYPE=sapdb 149 AC_DEFINE(HAVE_SAPDB,1,[ ]) 150 AC_MSG_RESULT([$ext_output]) 151 else 152 AC_MSG_RESULT(no) 153 fi 154fi 155 156if test -z "$ODBC_TYPE"; then 157PHP_ARG_WITH(solid,, 158[ --with-solid[=DIR] Include Solid support [/usr/local/solid]]) 159 160 AC_MSG_CHECKING(for Solid support) 161 if test "$PHP_SOLID" != "no"; then 162 if test "$PHP_SOLID" = "yes"; then 163 PHP_SOLID=/usr/local/solid 164 fi 165 ODBC_INCDIR=$PHP_SOLID/include 166 ODBC_LIBDIR=$PHP_SOLID/$PHP_LIBDIR 167 ODBC_INCLUDE=-I$ODBC_INCDIR 168 ODBC_TYPE=solid 169 if test -f $ODBC_LIBDIR/soc*35.a; then 170 AC_DEFINE(HAVE_SOLID_35,1,[ ]) 171 elif test -f $ODBC_LIBDIR/scl*30.a; then 172 AC_DEFINE(HAVE_SOLID_30,1,[ ]) 173 elif test -f $ODBC_LIBDIR/scl*23.a; then 174 AC_DEFINE(HAVE_SOLID,1,[ ]) 175 fi 176 AC_MSG_RESULT([$ext_output]) 177 PHP_ODBC_FIND_SOLID_LIBS($ODBC_LIBDIR) 178 else 179 AC_MSG_RESULT(no) 180 fi 181fi 182 183if test -z "$ODBC_TYPE"; then 184PHP_ARG_WITH(ibm-db2,, 185[ --with-ibm-db2[=DIR] Include IBM DB2 support [/home/db2inst1/sqllib]]) 186 187 AC_MSG_CHECKING(for IBM DB2 support) 188 if test "$PHP_IBM_DB2" != "no"; then 189 if test "$PHP_IBM_DB2" = "yes"; then 190 ODBC_INCDIR=/home/db2inst1/sqllib/include 191 ODBC_LIBDIR=/home/db2inst1/sqllib/lib 192 else 193 ODBC_INCDIR=$PHP_IBM_DB2/include 194 ODBC_LIBDIR=$PHP_IBM_DB2/$PHP_LIBDIR 195 fi 196 197 PHP_ODBC_CHECK_HEADER(sqlcli1.h) 198 199 ODBC_INCLUDE=-I$ODBC_INCDIR 200 ODBC_LFLAGS=-L$ODBC_LIBDIR 201 ODBC_TYPE=ibm-db2 202 ODBC_LIBS=-ldb2 203 204 PHP_TEST_BUILD(SQLExecute, [ 205 AC_DEFINE(HAVE_IBMDB2,1,[ ]) 206 AC_MSG_RESULT([$ext_output]) 207 ], [ 208 AC_MSG_RESULT(no) 209 AC_MSG_ERROR([ 210build test failed. Please check the config.log for details. 211You need to source your DB2 environment before running PHP configure: 212# . \$IBM_DB2/db2profile 213]) 214 ], [ 215 $ODBC_LFLAGS $ODBC_LIBS 216 ]) 217 else 218 AC_MSG_RESULT(no) 219 fi 220fi 221 222if test -z "$ODBC_TYPE"; then 223PHP_ARG_WITH(ODBCRouter,, 224[ --with-ODBCRouter[=DIR] Include ODBCRouter.com support [/usr]]) 225 226 AC_MSG_CHECKING(for ODBCRouter.com support) 227 if test "$PHP_ODBCROUTER" != "no"; then 228 if test "$PHP_ODBCROUTER" = "yes"; then 229 PHP_ODBCROUTER=/usr 230 fi 231 ODBC_INCDIR=$PHP_ODBCROUTER/include 232 ODBC_LIBDIR=$PHP_ODBCROUTER/lib 233 ODBC_LFLAGS=-L$ODBC_LIBDIR 234 ODBC_INCLUDE=-I$ODBC_INCDIR 235 ODBC_LIBS=-lodbcsdk 236 ODBC_TYPE=ODBCRouter 237 AC_DEFINE(HAVE_ODBC_ROUTER,1,[ ]) 238 AC_MSG_RESULT([$ext_output]) 239 else 240 AC_MSG_RESULT(no) 241 fi 242fi 243 244if test -z "$ODBC_TYPE"; then 245PHP_ARG_WITH(empress,, 246[ --with-empress[=DIR] Include Empress support [\$EMPRESSPATH] 247 (Empress Version >= 8.60 required)]) 248 249 AC_MSG_CHECKING(for Empress support) 250 if test "$PHP_EMPRESS" != "no"; then 251 if test "$PHP_EMPRESS" = "yes"; then 252 ODBC_INCDIR=$EMPRESSPATH/include/odbc 253 ODBC_LIBDIR=$EMPRESSPATH/shlib 254 else 255 ODBC_INCDIR=$PHP_EMPRESS/include/odbc 256 ODBC_LIBDIR=$PHP_EMPRESS/shlib 257 fi 258 ODBC_INCLUDE=-I$ODBC_INCDIR 259 ODBC_LFLAGS=-L$ODBC_LIBDIR 260 ODBC_TYPE=empress 261 AC_DEFINE(HAVE_EMPRESS,1,[ ]) 262 AC_MSG_RESULT([$ext_output]) 263 PHP_ODBC_FIND_EMPRESS_LIBS($ODBC_LIBDIR) 264 else 265 AC_MSG_RESULT(no) 266 fi 267fi 268 269if test -z "$ODBC_TYPE"; then 270PHP_ARG_WITH(empress-bcs,, 271[ --with-empress-bcs[=DIR] 272 Include Empress Local Access support [\$EMPRESSPATH] 273 (Empress Version >= 8.60 required)]) 274 275 AC_MSG_CHECKING(for Empress local access support) 276 if test "$PHP_EMPRESS_BCS" != "no"; then 277 if test "$PHP_EMPRESS_BCS" = "yes"; then 278 ODBC_INCDIR=$EMPRESSPATH/include/odbc 279 ODBC_LIBDIR=$EMPRESSPATH/shlib 280 else 281 ODBC_INCDIR=$PHP_EMPRESS_BCS/include/odbc 282 ODBC_LIBDIR=$PHP_EMPRESS_BCS/shlib 283 fi 284 CC="empocc -bcs";export CC; 285 LD="empocc -bcs";export LD; 286 ODBC_INCLUDE=-I$ODBC_INCDIR 287 ODBC_LFLAGS=-L$ODBC_LIBDIR 288 LIST=`empocc -listlines -bcs -o a a.c` 289 290 NEWLIST= 291 for I in $LIST 292 do 293 case $I in 294 $EMPRESSPATH/odbccl/lib/* | \ 295 $EMPRESSPATH/rdbms/lib/* | \ 296 $EMPRESSPATH/common/lib/*) 297 NEWLIST="$NEWLIST $I" 298 ;; 299 esac 300 done 301 ODBC_LIBS="-lempphpbcs -lms -lmscfg -lbasic -lbasic_os -lnlscstab -lnlsmsgtab -lm -ldl -lcrypt" 302 ODBC_TYPE=empress-bcs 303 AC_DEFINE(HAVE_EMPRESS,1,[ ]) 304 AC_MSG_RESULT([$ext_output]) 305 PHP_ODBC_FIND_EMPRESS_BCS_LIBS($ODBC_LIBDIR) 306 else 307 AC_MSG_RESULT(no) 308 fi 309fi 310 311if test -z "$ODBC_TYPE"; then 312PHP_ARG_WITH(birdstep,, 313[ --with-birdstep[=DIR] Include Birdstep support [/usr/local/birdstep]]) 314 315 AC_MSG_CHECKING(for Birdstep support) 316 if test "$PHP_BIRDSTEP" != "no"; then 317 if test "$PHP_BIRDSTEP" = "yes"; then 318 ODBC_INCDIR=/usr/local/birdstep/include 319 ODBC_LIBDIR=/usr/local/birdstep/lib 320 else 321 ODBC_INCDIR=$PHP_BIRDSTEP/include 322 ODBC_LIBDIR=$PHP_BIRDSTEP/$PHP_LIBDIR 323 fi 324 325 case $host_alias in 326 *aix*[)] 327 AC_DEFINE(AIX,1,[ ]);; 328 *hpux*[)] 329 AC_DEFINE(HPUX,1,[ ]);; 330 *linux*[)] 331 AC_DEFINE(LINUX,1,[ ]);; 332 *qnx*[)] 333 AC_DEFINE(NEUTRINO,1,[ ]);; 334 i?86-*-solaris*[)] 335 AC_DEFINE(ISOLARIS,1,[ ]);; 336 sparc-*-solaris*[)] 337 AC_DEFINE(SOLARIS,1,[ ]);; 338 *unixware*[)] 339 AC_DEFINE(UNIXWARE,1,[ ]);; 340 esac 341 342 ODBC_INCLUDE=-I$ODBC_INCDIR 343 ODBC_TYPE=birdstep 344 ODBC_LFLAGS=-L$ODBC_LIBDIR 345 ODBC_LIBS="-lCadm -lCdict -lCenc -lCrdm -lCrpc -lCrdbc -lCrm -lCuapi -lutil" 346 347 if test -f "$ODBC_LIBDIR/libCrdbc32.$SHLIB_SUFFIX_NAME"; then 348 ODBC_LIBS="-lCrdbc32 -lCadm32 -lCncp32 -lCrm32 -lCsql32 -lCdict32 -lCrdm32 -lCrpc32 -lutil" 349 elif test -f "$ODBC_LIBDIR/libCrdbc.$SHLIB_SUFFIX_NAME"; then 350 ODBC_LIBS="-lCrdbc -lCadm -lCncp -lCrm -lCsql -lCdict -lCrdm -lCrpc -lutil" 351 fi 352 353 AC_DEFINE(HAVE_BIRDSTEP,1,[ ]) 354 AC_MSG_RESULT([$ext_output]) 355 else 356 AC_MSG_RESULT(no) 357 fi 358fi 359 360if test -z "$ODBC_TYPE"; then 361PHP_ARG_WITH(custom-odbc,, 362[ --with-custom-odbc[=DIR] Include user defined ODBC support. DIR is ODBC install base 363 directory [/usr/local]. Make sure to define CUSTOM_ODBC_LIBS and 364 have some odbc.h in your include dirs. f.e. you should define 365 following for Sybase SQL Anywhere 5.5.00 on QNX, prior to 366 running this configure script: 367 CPPFLAGS=\"-DODBC_QNX -DSQLANY_BUG\" 368 LDFLAGS=-lunix 369 CUSTOM_ODBC_LIBS=\"-ldblib -lodbc\"]) 370 371 AC_MSG_CHECKING(for a custom ODBC support) 372 if test "$PHP_CUSTOM_ODBC" != "no"; then 373 if test "$PHP_CUSTOM_ODBC" = "yes"; then 374 PHP_CUSTOM_ODBC=/usr/local 375 fi 376 ODBC_INCDIR=$PHP_CUSTOM_ODBC/include 377 ODBC_LIBDIR=$PHP_CUSTOM_ODBC/$PHP_LIBDIR 378 ODBC_LFLAGS=-L$ODBC_LIBDIR 379 ODBC_INCLUDE=-I$ODBC_INCDIR 380 ODBC_LIBS=$CUSTOM_ODBC_LIBS 381 ODBC_TYPE=custom-odbc 382 AC_DEFINE(HAVE_CODBC,1,[ ]) 383 AC_MSG_RESULT([$ext_output]) 384 else 385 AC_MSG_RESULT(no) 386 fi 387fi 388 389if test -z "$ODBC_TYPE"; then 390PHP_ARG_WITH(iodbc,, 391[ --with-iodbc[=DIR] Include iODBC support [/usr/local]]) 392 393 AC_MSG_CHECKING(for iODBC support) 394 if test "$PHP_IODBC" != "no"; then 395 if test -z "$PKG_CONFIG"; then 396 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 397 fi 398 if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libiodbc ; then 399 PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR) 400 ODBC_TYPE=iodbc 401 ODBC_INCLUDE=`$PKG_CONFIG --cflags-only-I libiodbc` 402 ODBC_LFLAGS=`$PKG_CONFIG --libs-only-L libiodbc` 403 ODBC_LIBS=`$PKG_CONFIG --libs-only-l libiodbc` 404 PHP_EVAL_INCLINE($ODBC_INCLUDE) 405 AC_DEFINE(HAVE_IODBC,1,[ ]) 406 AC_DEFINE(HAVE_ODBC2,1,[ ]) 407 AC_MSG_RESULT([$ext_output]) 408 else 409 if test "$PHP_IODBC" = "yes"; then 410 PHP_IODBC=/usr/local 411 fi 412 PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR) 413 PHP_ADD_INCLUDE($PHP_IODBC/include, 1) 414 ODBC_TYPE=iodbc 415 ODBC_INCLUDE=-I$PHP_IODBC/include 416 ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR 417 ODBC_LIBS=-liodbc 418 AC_DEFINE(HAVE_IODBC,1,[ ]) 419 AC_DEFINE(HAVE_ODBC2,1,[ ]) 420 AC_MSG_RESULT([$ext_output]) 421 fi 422 else 423 AC_MSG_RESULT(no) 424 fi 425fi 426 427if test -z "$ODBC_TYPE"; then 428PHP_ARG_WITH(esoob,, 429[ --with-esoob[=DIR] Include Easysoft OOB support [/usr/local/easysoft/oob/client]]) 430 431 AC_MSG_CHECKING(for Easysoft ODBC-ODBC Bridge support) 432 if test "$PHP_ESOOB" != "no"; then 433 if test "$PHP_ESOOB" = "yes"; then 434 PHP_ESOOB=/usr/local/easysoft/oob/client 435 fi 436 ODBC_INCDIR=$PHP_ESOOB/include 437 ODBC_LIBDIR=$PHP_ESOOB/$PHP_LIBDIR 438 ODBC_LFLAGS=-L$ODBC_LIBDIR 439 ODBC_INCLUDE=-I$ODBC_INCDIR 440 ODBC_LIBS=-lesoobclient 441 ODBC_TYPE=esoob 442 AC_DEFINE(HAVE_ESOOB,1,[ ]) 443 AC_MSG_RESULT([$ext_output]) 444 else 445 AC_MSG_RESULT(no) 446 fi 447fi 448 449if test -z "$ODBC_TYPE"; then 450PHP_ARG_WITH(unixODBC,, 451[ --with-unixODBC[=DIR] Include unixODBC support [/usr/local]]) 452 453 AC_MSG_CHECKING(for unixODBC support) 454 if test "$PHP_UNIXODBC" != "no"; then 455 if test "$PHP_UNIXODBC" = "yes"; then 456 PHP_UNIXODBC=/usr/local 457 fi 458 ODBC_INCDIR=$PHP_UNIXODBC/include 459 ODBC_LIBDIR=$PHP_UNIXODBC/$PHP_LIBDIR 460 ODBC_LFLAGS=-L$ODBC_LIBDIR 461 ODBC_INCLUDE=-I$ODBC_INCDIR 462 ODBC_LIBS=-lodbc 463 ODBC_TYPE=unixODBC 464 PHP_ODBC_CHECK_HEADER(sqlext.h) 465 AC_DEFINE(HAVE_UNIXODBC,1,[ ]) 466 AC_MSG_RESULT([$ext_output]) 467 else 468 AC_MSG_RESULT(no) 469 fi 470fi 471 472if test -z "$ODBC_TYPE"; then 473PHP_ARG_WITH(dbmaker,, 474[ --with-dbmaker[=DIR] Include DBMaker support]) 475 476 AC_MSG_CHECKING(for DBMaker support) 477 if test "$PHP_DBMAKER" != "no"; then 478 if test "$PHP_DBMAKER" = "yes"; then 479 # find dbmaker's home directory 480 DBMAKER_HOME=`grep "^dbmaker:" /etc/passwd | $AWK -F: '{print $6}'` 481 482 # check DBMaker version (from 5.0 to 2.0) 483 DBMAKER_VERSION=5.0 484 485 while test ! -d $DBMAKER_HOME/$DBMAKER_VERSION -a "$DBMAKER_VERSION" != "2.9"; do 486 DM_VER=`echo $DBMAKER_VERSION | sed -e 's/\.//' | $AWK '{ print $1-1;}'` 487 MAJOR_V=`echo $DM_VER | $AWK '{ print $1/10; }' | $AWK -F. '{ print $1; }'` 488 MINOR_V=`echo $DM_VER | $AWK '{ print $1%10; }'` 489 DBMAKER_VERSION=$MAJOR_V.$MINOR_V 490 done 491 492 if test "$DBMAKER_VERSION" = "2.9"; then 493 PHP_DBMAKER=$DBMAKER_HOME 494 else 495 PHP_DBMAKER=$DBMAKER_HOME/$DBMAKER_VERSION 496 fi 497 fi 498 499 ODBC_INCDIR=$PHP_DBMAKER/include 500 ODBC_LIBDIR=$PHP_DBMAKER/$PHP_LIBDIR 501 ODBC_INCLUDE=-I$ODBC_INCDIR 502 ODBC_LFLAGS=-L$ODBC_LIBDIR 503 ODBC_INCLUDE=-I$ODBC_INCDIR 504 ODBC_LIBS="-ldmapic -lc" 505 ODBC_TYPE=dbmaker 506 507 AC_DEFINE(HAVE_DBMAKER,1,[Whether you want DBMaker]) 508 509 if test "$ext_shared" = "yes"; then 510 AC_MSG_RESULT([yes (shared)]) 511 ODBC_LIBS="-ldmapic -lc -lm" 512 ODBC_SHARED="odbc.la" 513 else 514 AC_MSG_RESULT([yes (static)]) 515 PHP_ADD_LIBRARY_WITH_PATH(dmapic, $ODBC_LIBDIR) 516 PHP_ADD_INCLUDE($ODBC_INCDIR) 517 ODBC_STATIC="libphpext_odbc.la" 518 fi 519 else 520 AC_MSG_RESULT(no) 521 fi 522fi 523 524if test "no" != "$PHP_ODBCVER"; then 525 if test "$PHP_ODBCVER" != "0"; then 526 AC_DEFINE_UNQUOTED(ODBCVER, $PHP_ODBCVER, [ The highest supported ODBC version ]) 527 fi 528else 529 AC_DEFINE(ODBCVER, 0x0300, [ The highest supported ODBC version ]) 530fi 531 532 533dnl 534dnl Extension setup 535dnl 536if test -n "$ODBC_TYPE"; then 537 if test "$ODBC_TYPE" != "dbmaker"; then 538 PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], ODBC_SHARED_LIBADD) 539 if test "$ODBC_TYPE" != "birdstep" && test "$ODBC_TYPE" != "solid"; then 540 AC_DEFINE(HAVE_SQLDATASOURCES,1,[ ]) 541 fi 542 fi 543 544 AC_DEFINE(HAVE_UODBC,1,[ ]) 545 PHP_SUBST(ODBC_SHARED_LIBADD) 546 PHP_SUBST(ODBC_INCDIR) 547 PHP_SUBST(ODBC_LIBDIR) 548 PHP_SUBST_OLD(ODBC_INCLUDE) 549 PHP_SUBST_OLD(ODBC_LIBS) 550 PHP_SUBST_OLD(ODBC_LFLAGS) 551 PHP_SUBST_OLD(ODBC_TYPE) 552 553 PHP_NEW_EXTENSION(odbc, php_odbc.c, $ext_shared,, [$ODBC_INCLUDE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) 554else 555 AC_MSG_CHECKING([for any ODBC driver support]) 556 AC_MSG_RESULT(no) 557fi 558