@@ -328,6 +328,9 @@ AM_CONDITIONAL(RECURSOR,test x"$enable_recursor" = "xyes")
328
328
for a in $modules $dynmodules
329
329
do
330
330
case "$a" in
331
+ oracle|goracle)
332
+ needoracle=yes
333
+ ;;
331
334
gmysql )
332
335
needmysql=yes
333
336
;;
382
385
esac
383
386
done
384
387
388
+ AM_CONDITIONAL(ORACLE,test x"$needoracle" = "xyes")
389
+
390
+ if test "$needoracle"
391
+ then
392
+ AC_ARG_WITH ( oracle_includes , [ --with-oracle-includes=<path> instantclient sdk include dir] )
393
+ AC_ARG_WITH ( oracle_libs , [ --with-oracle-libs=<path> instantclient oracle library dir] )
394
+
395
+ if test x"$with_oracle_includes" = "x"
396
+ then
397
+ # check possible locations
398
+ for p1 in /usr/include/oracle /usr/local/include/oracle
399
+ do
400
+ for p2 in $p1/*/client*
401
+ do
402
+ if test -d "$p2"
403
+ then
404
+ with_oracle_includes=$p2
405
+ fi
406
+ done
407
+ done
408
+ fi
409
+
410
+ if test x"$with_oracle_includes" = x && test "$ORACLE_HOME/rdbms/public" != "/rdbms/public"; then
411
+ if test -d $ORACLE_HOME/rdbms/public; then
412
+ with_oracle_includes=$ORACLE_HOME/rdbms/public
413
+ fi
414
+ fi
415
+
416
+ # test header
417
+ old_CXXFLAGS="$CXXFLAGS"
418
+ old_CFLAGS="$CFLAGS"
419
+ CXXFLAGS="$CXXFLAGS -I$with_oracle_includes"
420
+ CPPFLAGS="$CPPFLAGS -I$with_oracle_includes"
421
+ AC_CHECK_HEADER ( [ oci.h] , ORACLE_CFLAGS="-I$with_oracle_includes" , AC_MSG_ERROR ( [ Could not find oci.h] ) )
422
+ CXXFLAGS="$old_CXXFLAGS"
423
+ CPPFLAGS="$old_CPPFLAGS"
424
+ AC_SUBST ( [ ORACLE_CFLAGS] )
425
+ AC_SUBST ( [ ORACLE_LIBS] )
426
+
427
+ if test x"$with_oracle_libs" = "x"
428
+ then
429
+ # check possible locationse
430
+ for p1 in /usr/lib/oracle /usr/local/lib/oracle
431
+ do
432
+ for p2 in $p1/*/client*/lib
433
+ do
434
+ if test -d "$p2"
435
+ then
436
+ with_oracle_libs=$p2
437
+ fi
438
+ done
439
+ done
440
+ fi
441
+
442
+ if test x"$with_oracle_libs" = x && test "$ORACLE_HOME/lib" != "/lib"; then
443
+ if test -d $ORACLE_HOME/lib; then
444
+ with_oracle_libs=$ORACLE_HOME/lib
445
+ fi
446
+ fi
447
+
448
+ # we have to check for client9 as well...
449
+
450
+ # test -lclntsh
451
+ old_LDFLAGS="$LDFLAGS"
452
+ LDFLAGS="-L$with_oracle_libs -lnnz11 -locci"
453
+ AC_CHECK_LIB ( [ clntsh] ,[ OCIEnvInit] ,ORACLE_LIBS="-L$with_oracle_libs - lnnz11 - lclntsh - locci" ,
454
+ AC_CHECK_LIB ( [ client9] , [ OCIEnvInit] ,ORACLE_LIBS="-L$with_oracle_libs - lclient9 - lclntsh9" ,AC_MSG_ERROR ( [ Could not find client libraries] ) ) )
455
+ LDFLAGS="$old_LDFLAGS"
456
+ fi
385
457
386
458
if test "$needmysql"
387
459
then
0 commit comments