Skip to content
Snippets Groups Projects
Commit afaa76db authored by Marcus Comstedt's avatar Marcus Comstedt
Browse files

Added checks for $ORACLE_HOME and $ORACLE_SID.

Rev: src/modules/Oracle/configure.in:1.2
parent 77c8967c
No related branches found
No related tags found
No related merge requests found
# #
# $Id: configure.in,v 1.1 1997/05/17 01:56:32 marcus Exp $ # $Id: configure.in,v 1.2 1997/05/17 21:49:08 marcus Exp $
# #
# Configure script for the oracle module # Configure script for the oracle module
# #
...@@ -15,9 +15,41 @@ AC_ARG_WITH(oracle, [ --without-oracle no support for the Oracle databas ...@@ -15,9 +15,41 @@ AC_ARG_WITH(oracle, [ --without-oracle no support for the Oracle databas
if test x$with_oracle = xyes; then if test x$with_oracle = xyes; then
AC_MSG_CHECKING(if \$ORACLE_HOME is set)
AC_CACHE_VAL(pike_cv_oracle_oracle_home, [
if test x"$ORACLE_HOME" = x; then
pike_cv_oracle_oracle_home=no
else
pike_cv_oracle_oracle_home="$ORACLE_HOME"
fi
])
AC_MSG_RESULT($pike_cv_oracle_oracle_home)
if test x"$pike_cv_oracle_oracle_home" = xno; then :; else
AC_DEFINE_UNQUOTED(ORACLE_HOME, "${pike_cv_oracle_oracle_home}")
fi
AC_MSG_CHECKING(if \$ORACLE_SID is set)
AC_CACHE_VAL(pike_cv_oracle_oracle_sid, [
if test x"$ORACLE_SID" = x; then
pike_cv_oracle_oracle_sid=no
else
pike_cv_oracle_oracle_sid="$ORACLE_SID"
fi
])
AC_MSG_RESULT($pike_cv_oracle_oracle_sid)
if test x"$pike_cv_oracle_oracle_sid" = xno; then :; else
AC_DEFINE_UNQUOTED(ORACLE_SID, "${pike_cv_oracle_oracle_sid}")
fi
AC_MSG_CHECKING(for Oracle oratab) AC_MSG_CHECKING(for Oracle oratab)
oratab_locations="/var/opt/oracle/oratab /hemligt/stlle/dr/filerna/ligger/under/AIX" oratab_locations="/var/opt/oracle/oratab"
AC_CACHE_VAL(pike_cv_oracle_oratab_file, [ AC_CACHE_VAL(pike_cv_oracle_oratab_file, [
...@@ -33,55 +65,77 @@ if test x$with_oracle = xyes; then ...@@ -33,55 +65,77 @@ if test x$with_oracle = xyes; then
AC_MSG_RESULT($pike_cv_oracle_oratab_file) AC_MSG_RESULT($pike_cv_oracle_oratab_file)
if test x$pike_cv_oracle_oratab_file = xno; then :; else AC_MSG_CHECKING(for Oracle libraries)
AC_MSG_CHECKING(for Oracle libraries)
echo no > conftest echo no > conftest
sed -e '/^#/d' < $pike_cv_oracle_oratab_file | while IFS=":" read sid dir bootstart; do if test x"$pike_cv_oracle_oracle_home" != xno -a -f "$pike_cv_oracle_oracle_home/lib/libclient.a"; then
if test -d "$dir/." -a -f "$dir/lib/libclient.a"; then
AC_DEFINE_UNQUOTED(ORACLE_HOME, "${dir}") echo "$pike_cv_oracle_oracle_home/lib" > conftest
AC_DEFINE_UNQUOTED(ORACLE_SID, "${sid}")
echo "$dir/lib" > conftest else
break if test x"$pike_cv_oracle_oratab_file" = xno; then :; else
else
: sed -e '/^#/d' < $pike_cv_oracle_oratab_file | while IFS=":" read sid dir bootstart; do
fi if test -d "$dir/." -a -f "$dir/lib/libclient.a"; then
done if test x"$pike_cv_oracle_oracle_home" = xno; then
AC_DEFINE_UNQUOTED(ORACLE_HOME, "${dir}")
else
:
fi
if test x"$pike_cv_oracle_oracle_sid" = xno; then
AC_DEFINE_UNQUOTED(ORACLE_SID, "${sid}")
else
:
fi
echo "$dir/lib" > conftest
break
else
:
fi
done
fi
fi
IFS="" read oracle_lib_dir < conftest IFS="" read oracle_lib_dir < conftest
AC_MSG_RESULT($oracle_lib_dir) AC_MSG_RESULT($oracle_lib_dir)
AC_MSG_CHECKING(for Oracle includes) AC_MSG_CHECKING(for Oracle includes)
echo no > conftest echo no > conftest
sed -e '/^#/d' < $pike_cv_oracle_oratab_file | while IFS=":" read sid dir bootstart; do
if test -d "$dir/." -a -f "$dir/rdbms/demo/ocidfn.h"; then
echo "$dir/rdbms/demo" > conftest
break
else
:
fi
done
IFS="" read oracle_include_dir < conftest if test x"$pike_cv_oracle_oracle_home" != xno -a -f "$pike_cv_oracle_oracle_home/rdbms/demo/ocidfn.h"; then
AC_MSG_RESULT($oracle_include_dir) echo "$pike_cv_oracle_oracle_home/rdbms/demo" > conftest
if test "x$oracle_lib_dir" = xno -o "x$oracle_include_dir" = xno; then :; else else
if test x"$pike_cv_oracle_oratab_file" = xno; then :; else
sed -e '/^#/d' < $pike_cv_oracle_oratab_file | while IFS=":" read sid dir bootstart; do
if test -d "$dir/." -a -f "$dir/rdbms/demo/ocidfn.h"; then
echo "$dir/rdbms/demo" > conftest
break
else
:
fi
done
fi
fi
CPPFLAGS="-I\"$oracle_include_dir\" ${CPPFLAGS}" IFS="" read oracle_include_dir < conftest
dnl ORACLE_LIBS="-L\"$oracle_lib_dir\" -lclient -lnlsrtl3 -lcommon -lsqlnet -lnlsrtl3 -lcore3 -lcommon -lnlsrtl3 -lgeneric -lcv6 -lnlsrtl3 -lncr -lcore3 -lsqlnet -lepc" AC_MSG_RESULT($oracle_include_dir)
ORACLE_LIBS="-L\"$oracle_lib_dir\" -lclient -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lepc -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 -lcore3 -lnlsrtl3 -lsocket -lnsl -lm -ldl -laio -lm -lcore3" if test "x$oracle_lib_dir" = xno -o "x$oracle_include_dir" = xno; then :; else
AC_DEFINE(HAVE_ORACLE) CPPFLAGS="-I\"$oracle_include_dir\" ${CPPFLAGS}"
fi dnl ORACLE_LIBS="-L\"$oracle_lib_dir\" -lclient -lnlsrtl3 -lcommon -lsqlnet -lnlsrtl3 -lcore3 -lcommon -lnlsrtl3 -lgeneric -lcv6 -lnlsrtl3 -lncr -lcore3 -lsqlnet -lepc"
ORACLE_LIBS="-L\"$oracle_lib_dir\" -lclient -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lepc -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 -lcore3 -lnlsrtl3 -lsocket -lnsl -lm -ldl -laio -lm -lcore3"
AC_DEFINE(HAVE_ORACLE)
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment