apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r667438 - in /apr/apr-util/branches/1.3.x: CHANGES Makefile.in build.conf build/dbd.m4 build/dso.m4 configure.in include/apu.h.in
Date Fri, 13 Jun 2008 09:27:19 GMT
Author: bojan
Date: Fri Jun 13 02:27:19 2008
New Revision: 667438

URL: http://svn.apache.org/viewvc?rev=667438&view=rev
Log:
Backport r663499, r667299 and r667300 from the trunk.

Original messages:
- otherwise install-modules-yes in Makefile and the shell will complains on
  syntax error because APU_MODULES is only a space (on Solaris for example).
- make ODBC DBD driver compile on Unix
- also make it (ODBC DBD) link :-)

Modified:
    apr/apr-util/branches/1.3.x/CHANGES
    apr/apr-util/branches/1.3.x/Makefile.in
    apr/apr-util/branches/1.3.x/build.conf
    apr/apr-util/branches/1.3.x/build/dbd.m4
    apr/apr-util/branches/1.3.x/build/dso.m4
    apr/apr-util/branches/1.3.x/configure.in
    apr/apr-util/branches/1.3.x/include/apu.h.in

Modified: apr/apr-util/branches/1.3.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/CHANGES?rev=667438&r1=667437&r2=667438&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/CHANGES [utf-8] (original)
+++ apr/apr-util/branches/1.3.x/CHANGES [utf-8] Fri Jun 13 02:27:19 2008
@@ -1,7 +1,7 @@
                                                      -*- coding: utf-8 -*-
 Changes with APR-util 1.3.1
 
-
+  *) Add ODBC DBD Driver [Tom Donovan]
 
 Changes with APR-util 1.3.0
 

Modified: apr/apr-util/branches/1.3.x/Makefile.in
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/Makefile.in?rev=667438&r1=667437&r2=667438&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/Makefile.in (original)
+++ apr/apr-util/branches/1.3.x/Makefile.in Fri Jun 13 02:27:19 2008
@@ -36,6 +36,7 @@
 LDADD_dbd_sqlite3 = @LDADD_dbd_sqlite3@
 LDADD_dbd_mysql = @LDADD_dbd_mysql@
 LDADD_dbd_freetds = @LDADD_dbd_freetds@
+LDADD_dbd_odbc = @LDADD_dbd_odbc@
 LDADD_ldap = @LDADD_ldap@
 
 TARGETS = $(TARGET_LIB) aprutil.exp apu-config.out $(APU_MODULES)

Modified: apr/apr-util/branches/1.3.x/build.conf
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/build.conf?rev=667438&r1=667437&r2=667438&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/build.conf (original)
+++ apr/apr-util/branches/1.3.x/build.conf Fri Jun 13 02:27:19 2008
@@ -28,7 +28,7 @@
 # the public headers
 headers = include/*.h include/private/*.h
 
-modules = ldap dbd_pgsql dbd_sqlite2 dbd_sqlite3 dbd_oracle dbd_mysql dbd_freetds
+modules = ldap dbd_pgsql dbd_sqlite2 dbd_sqlite3 dbd_oracle dbd_mysql dbd_freetds dbd_odbc
 
 # gen_uri_delim.c
 
@@ -59,6 +59,10 @@
 paths = dbd/apr_dbd_freetds.c
 target = dbd/apr_dbd_freetds.la
 
+[dbd_odbc]
+paths = dbd/apr_dbd_odbc.c
+target = dbd/apr_dbd_odbc.la
+
 [ldap]
 paths = ldap/apr_ldap_init.c \
         ldap/apr_ldap_option.c \

Modified: apr/apr-util/branches/1.3.x/build/dbd.m4
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/build/dbd.m4?rev=667438&r1=667437&r2=667438&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/build/dbd.m4 (original)
+++ apr/apr-util/branches/1.3.x/build/dbd.m4 Fri Jun 13 02:27:19 2008
@@ -387,3 +387,89 @@
 ])
 dnl
 
+AC_DEFUN([APU_CHECK_DBD_ODBC], [
+  apu_have_odbc=0
+
+  old_libs="$LIBS"
+  old_cppflags="$CPPFLAGS"
+  old_ldflags="$LDFLAGS"
+
+  AC_ARG_WITH([odbc], APR_HELP_STRING([--with-odbc=DIR], [specify ODBC location]),
+  [
+    if test "$withval" = "yes"; then
+      AC_PATH_PROG([ODBC_CONFIG],[odbc_config])
+      if test "x$ODBC_CONFIG" != 'x'; then
+        odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
+        odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
+        odbc_LIBS="`$ODBC_CONFIG --libs`"
+
+        APR_ADDTO(CPPFLAGS, [$odbc_CPPFLAGS])
+        APR_ADDTO(LDFLAGS, [$odbc_LDFLAGS])
+        APR_ADDTO(LIBS, [$odbc_LIBS])
+      fi
+
+      AC_CHECK_HEADERS(sql.h, AC_CHECK_LIB(odbc, SQLAllocHandle, [apu_have_odbc=1]))
+      if test "$apu_have_odbc" = "0"; then
+        AC_CHECK_HEADERS(odbc/sql.h, AC_CHECK_LIB(odbc, SQLAllocHandle, [apu_have_odbc=1]))
+      fi
+      if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
+        APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$odbc_CPPFLAGS])
+      fi
+    elif test "$withval" = "no"; then
+      :
+    else
+      AC_PATH_PROG([ODBC_CONFIG],[odbc_config],,[$withval/bin])
+      if test "x$ODBC_CONFIG" != 'x'; then
+        odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
+        odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
+        odbc_LIBS="`$ODBC_CONFIG --libs`"
+      else
+        odbc_CPPFLAGS="-I$withval/include"
+        odbc_LDFLAGS="-L$withval/lib "
+      fi
+
+      APR_ADDTO(CPPFLAGS, [$odbc_CPPFLAGS])
+      APR_ADDTO(LDFLAGS, [$odbc_LDFLAGS])
+      APR_ADDTO(LIBS, [$odbc_LIBS])
+
+      AC_MSG_NOTICE(checking for odbc in $withval)
+      AC_CHECK_HEADERS(sql.h, AC_CHECK_LIB(odbc, SQLAllocHandle, [apu_have_odbc=1]))
+      if test "$apu_have_odbc" = "0"; then
+        AC_CHECK_HEADERS(odbc/sql.h, AC_CHECK_LIB(odbc, SQLAllocHandle, [apu_have_odbc=1]))
+      fi
+      if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
+        APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$odbc_CPPFLAGS])
+      fi
+    fi
+  ], [
+    AC_PATH_PROG([ODBC_CONFIG],[odbc_config])
+    if test "x$ODBC_CONFIG" != 'x'; then
+      odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
+      odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
+      odbc_LIBS="`$ODBC_CONFIG --libs`"
+
+      APR_ADDTO(CPPFLAGS, [$odbc_CPPFLAGS])
+      APR_ADDTO(LDFLAGS, [$odbc_LDFLAGS])
+      APR_ADDTO(LIBS, [$odbc_LIBS])
+    fi
+
+    AC_CHECK_HEADERS(sql.h, AC_CHECK_LIB(odbc, SQLAllocHandle, [apu_have_odbc=1]))
+    if test "$apu_have_odbc" = "0"; then
+      AC_CHECK_HEADERS(odbc/sql.h, AC_CHECK_LIB(odbc, SQLAllocHandle, [apu_have_odbc=1]))
+    fi
+    if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
+      APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$odbc_CPPFLAGS])
+    fi
+  ])
+  AC_SUBST(apu_have_odbc)
+  dnl Since we have already done the AC_CHECK_LIB tests, if we have it, 
+  dnl we know the library is there.
+  if test "$apu_have_odbc" = "1"; then
+    LDADD_dbd_odbc="$odbc_LDFLAGS -lodbc $odbc_LIBS"
+  fi
+  AC_SUBST(LDADD_dbd_odbc)
+
+  LIBS="$old_libs"
+  CPPFLAGS="$old_cppflags"
+  LDFLAGS="$old_ldflags"
+])

Modified: apr/apr-util/branches/1.3.x/build/dso.m4
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/build/dso.m4?rev=667438&r1=667437&r2=667438&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/build/dso.m4 (original)
+++ apr/apr-util/branches/1.3.x/build/dso.m4 Fri Jun 13 02:27:19 2008
@@ -34,6 +34,7 @@
      test $apu_have_sqlite2 = 1 && objs="$objs dbd/apr_dbd_sqlite2.lo"
      test $apu_have_sqlite3 = 1 && objs="$objs dbd/apr_dbd_sqlite3.lo"
      test $apu_have_freetds = 1 && objs="$objs dbd/apr_dbd_freetds.lo"
+     test $apu_have_odbc = 1 && objs="$objs dbd/apr_dbd_odbc.lo"
      test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_init.lo"
      test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_option.lo"
      test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_rebind.lo"
@@ -53,9 +54,9 @@
        done
      fi
 
-     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle
$LDADD_dbd_mysql $LDADD_dbd_freetds"
+     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle
$LDADD_dbd_mysql $LDADD_dbd_freetds $LDADD_dbd_odbc"
      APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_ldap"
-     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3
$LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds"
+     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3
$LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds $LDADD_dbd_odbc"
      APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_ldap"
   else
      AC_DEFINE([APU_DSO_BUILD], 1, [Define if modular components are built as DSOs])
@@ -67,8 +68,11 @@
      test $apu_have_sqlite2 = 1 && dsos="$dsos dbd/apr_dbd_sqlite2.la"
      test $apu_have_sqlite3 = 1 && dsos="$dsos dbd/apr_dbd_sqlite3.la"
      test $apu_have_freetds = 1 && dsos="$dsos dbd/apr_dbd_freetds.la"
+     test $apu_have_odbc = 1 && dsos="$dsos dbd/apr_dbd_odbc.la"
      test $apu_has_ldap = 1 && dsos="$dsos ldap/apr_ldap.la"
 
-     APU_MODULES="$APU_MODULES $dsos"
+     if test -n "$dsos"; then
+        APU_MODULES="$APU_MODULES $dsos"
+     fi
   fi
 ])

Modified: apr/apr-util/branches/1.3.x/configure.in
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/configure.in?rev=667438&r1=667437&r2=667438&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/configure.in (original)
+++ apr/apr-util/branches/1.3.x/configure.in Fri Jun 13 02:27:19 2008
@@ -157,6 +157,7 @@
 APU_CHECK_DBD_SQLITE2
 APU_CHECK_DBD_ORACLE
 APU_CHECK_DBD_FREETDS
+APU_CHECK_DBD_ODBC
 APU_FIND_EXPAT
 APU_FIND_ICONV
 

Modified: apr/apr-util/branches/1.3.x/include/apu.h.in
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/include/apu.h.in?rev=667438&r1=667437&r2=667438&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/include/apu.h.in (original)
+++ apr/apr-util/branches/1.3.x/include/apu.h.in Fri Jun 13 02:27:19 2008
@@ -100,6 +100,7 @@
 #define APU_HAVE_SQLITE2       @apu_have_sqlite2@
 #define APU_HAVE_ORACLE        @apu_have_oracle@
 #define APU_HAVE_FREETDS       @apu_have_freetds@
+#define APU_HAVE_ODBC          @apu_have_odbc@
 
 #define APU_HAVE_APR_ICONV     @have_apr_iconv@
 #define APU_HAVE_ICONV         @have_iconv@



Mime
View raw message