summaryrefslogtreecommitdiff
path: root/ext/odbc/config.m4
diff options
context:
space:
mode:
Diffstat (limited to 'ext/odbc/config.m4')
-rw-r--r--ext/odbc/config.m454
1 files changed, 54 insertions, 0 deletions
diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4
index ee2a0e443e..9158e60fe2 100644
--- a/ext/odbc/config.m4
+++ b/ext/odbc/config.m4
@@ -50,6 +50,27 @@ AC_DEFUN(AC_FIND_EMPRESS_LIBS,[
AC_MSG_RESULT(`echo $ODBC_LIBS | sed -e 's!.*/!!'`)
])
+dnl
+dnl Figure out the path where the newest DBMaker is installed.
+dnl
+AC_DEFUN(AC_FIND_DBMAKER_PATH,[
+ AC_MSG_CHECKING([DBMaker version])
+ if [ test -d "$1/4.0" ]; then
+ DBMAKER_PATH=$1/4.0
+ elif [ test -d "$1/3.6" ]; then
+ DBMAKER_PATH=$1/3.6
+ elif [ test -d "$1/3.5" ]; then
+ DBMAKER_PATH=$1/3.5
+ elif [ test -d "$1/3.01" ]; then
+ DBMAKER_PATH=$1/3.01
+ elif [ test -d "$1/3.0" ]; then
+ DBMAKER_PATH=$1/3.0
+ else
+ DBMAKER_PATH=$1
+ fi
+ AC_MSG_RESULT(`echo $DBMAKER_PATH | sed -e 's!.*/!!'`)
+])
+
if test -z "$ODBC_TYPE"; then
AC_MSG_CHECKING(for Adabas support)
AC_ARG_WITH(adabas,
@@ -331,6 +352,39 @@ AC_ARG_WITH(openlink,
])
fi
+if test -z "$ODBC_TYPE"; then
+AC_MSG_CHECKING(for DBMaker support)
+AC_ARG_WITH(dbmaker,
+[ --with-dbmaker[=DIR] Include DBMaker support. DIR is the DBMaker base
+ install directory, defaults to where the latest
+ version of DBMaker is installed (such as
+ /home/dbmaker/3.6).
+],
+[
+ if test "$withval" = "yes"; then
+ # find dbmaker's home directory
+ DBMAKER_HOME=`grep "^dbmaker:" /etc/passwd | awk -F: '{print $6}'`
+ AC_FIND_DBMAKER_PATH($DBMAKER_HOME)
+ withval=$DBMAKER_PATH
+ fi
+ if test "$withval" != "no"; then
+ ODBC_INCDIR=$withval/include
+ ODBC_LIBDIR=$withval/lib
+ ODBC_INCLUDE=-I$ODBC_INCDIR
+ ODBC_LFLAGS=-L$ODBC_LIBDIR
+ ODBC_INCLUDE=-I$ODBC_INCDIR
+ ODBC_LIBS="-ldmapic -lc"
+ ODBC_TYPE=dbmaker
+ AC_DEFINE(HAVE_DBMAKER)
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+],[
+ AC_MSG_RESULT(no)
+])
+fi
+
if test -n "$ODBC_TYPE"; then
INCLUDES="$INCLUDES $ODBC_INCLUDE"
EXTRA_LIBS="$EXTRA_LIBS $ODBC_LFLAGS $ODBC_LIBS"