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
Branches
Tags
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,22 +65,37 @@ if test x$with_oracle = xyes; then ...@@ -33,22 +65,37 @@ 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
if test x"$pike_cv_oracle_oracle_home" != xno -a -f "$pike_cv_oracle_oracle_home/lib/libclient.a"; then
echo "$pike_cv_oracle_oracle_home/lib" > conftest
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 sed -e '/^#/d' < $pike_cv_oracle_oratab_file | while IFS=":" read sid dir bootstart; do
if test -d "$dir/." -a -f "$dir/lib/libclient.a"; then if test -d "$dir/." -a -f "$dir/lib/libclient.a"; then
if test x"$pike_cv_oracle_oracle_home" = xno; then
AC_DEFINE_UNQUOTED(ORACLE_HOME, "${dir}") AC_DEFINE_UNQUOTED(ORACLE_HOME, "${dir}")
else
:
fi
if test x"$pike_cv_oracle_oracle_sid" = xno; then
AC_DEFINE_UNQUOTED(ORACLE_SID, "${sid}") AC_DEFINE_UNQUOTED(ORACLE_SID, "${sid}")
else
:
fi
echo "$dir/lib" > conftest echo "$dir/lib" > conftest
break break
else else
: :
fi fi
done done
fi
fi
IFS="" read oracle_lib_dir < conftest IFS="" read oracle_lib_dir < conftest
...@@ -58,6 +105,13 @@ if test x$with_oracle = xyes; then ...@@ -58,6 +105,13 @@ if test x$with_oracle = xyes; then
echo no > conftest echo no > conftest
if test x"$pike_cv_oracle_oracle_home" != xno -a -f "$pike_cv_oracle_oracle_home/rdbms/demo/ocidfn.h"; then
echo "$pike_cv_oracle_oracle_home/rdbms/demo" > conftest
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 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 if test -d "$dir/." -a -f "$dir/rdbms/demo/ocidfn.h"; then
echo "$dir/rdbms/demo" > conftest echo "$dir/rdbms/demo" > conftest
...@@ -66,6 +120,8 @@ if test x$with_oracle = xyes; then ...@@ -66,6 +120,8 @@ if test x$with_oracle = xyes; then
: :
fi fi
done done
fi
fi
IFS="" read oracle_include_dir < conftest IFS="" read oracle_include_dir < conftest
...@@ -83,8 +139,6 @@ if test x$with_oracle = xyes; then ...@@ -83,8 +139,6 @@ if test x$with_oracle = xyes; then
fi fi
fi
else else
: :
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment