summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorPeter Eisentraut2001-09-22 22:54:33 +0000
committerPeter Eisentraut2001-09-22 22:54:33 +0000
commit364a7ebe26a20625f7c0b27a59ebbbdb8378587f (patch)
tree954b9ab0a58c727478022e277ca4d0a006b4c153 /configure.in
parent39ceaa19f03faa11fbcab6bc050e3b494258afe0 (diff)
Provide some initial support for building the ODBC driver for
an already installed iODBC or unixODBC driver manager. In particular, use the include files provided by the driver manager over our own, and use the odbcinst library of the driver manager rather than gpps.c. Migrate portability sections common to several files into psqlodbc.h.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in17
1 files changed, 16 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 28f60e5de1..7dc5af0ee0 100644
--- a/configure.in
+++ b/configure.in
@@ -567,8 +567,23 @@ fi
AC_MSG_CHECKING([whether to build the ODBC driver])
PGAC_ARG_BOOL(enable, odbc, no, [ --enable-odbc build the ODBC driver package])
-AC_MSG_RESULT([$enable_odbc])
+PGAC_ARG_BOOL(with, unixodbc, no, [ --with-unixodbc build ODBC driver for unixODBC])
+PGAC_ARG_BOOL(with, iodbc, no, [ --with-iodbc build ODBC driver for iODBC])
+if test "$with_unixodbc" = yes && test "$with_iodbc" = yes; then
+ AC_MSG_ERROR([ODBC driver cannot be built for both unixODBC and iODBC])
+fi
+if test "$with_unixodbc" = yes || test "$with_iodbc" = yes; then
+ enable_odbc=yes
+fi
+case $enable_odbc:$with_unixodbc:$with_iodbc in
+ yes:no:no) AC_MSG_RESULT([yes (stand-alone)]);;
+ yes:yes:no) AC_MSG_RESULT([yes (unixODBC)]); AC_DEFINE(WITH_UNIXODBC);;
+ yes:no:yes) AC_MSG_RESULT([yes (iODBC)]); AC_DEFINE(WITH_IODBC);;
+ no:*) AC_MSG_RESULT(no);;
+esac
AC_SUBST([enable_odbc])
+AC_SUBST([with_unixodbc])
+AC_SUBST([with_iodbc])
# Allow for overriding the default location of the odbcinst.ini