remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB logic that...
authorKevin P. Fleming <kpfleming@digium.com>
Thu, 15 Jan 2009 20:18:53 +0000 (20:18 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Thu, 15 Jan 2009 20:18:53 +0000 (20:18 +0000)
this stops modules from being linked against both sets of libraries on systems that have both installed

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168734 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c
build_tools/menuselect-deps.in
cdr/cdr_adaptive_odbc.c
cdr/cdr_odbc.c
configure
configure.ac
funcs/func_odbc.c
makeopts.in
res/res_config_odbc.c
res/res_odbc.c

index 20dd25c..04ddf1f 100644 (file)
@@ -47,10 +47,8 @@ c-client (http://www.washington.edu/imap/
 /*** MAKEOPTS
 <category name="MENUSELECT_OPTS_app_voicemail" displayname="Voicemail Build Options" positive_output="yes" remove_on_change="apps/app_voicemail.o apps/app_voicemail.so apps/app_directory.o apps/app_directory.so">
        <member name="ODBC_STORAGE" displayname="Storage of Voicemail using ODBC">
 /*** MAKEOPTS
 <category name="MENUSELECT_OPTS_app_voicemail" displayname="Voicemail Build Options" positive_output="yes" remove_on_change="apps/app_voicemail.o apps/app_voicemail.so apps/app_directory.o apps/app_directory.so">
        <member name="ODBC_STORAGE" displayname="Storage of Voicemail using ODBC">
-               <depend>odbc</depend>
+               <depend>generic_odbc</depend>
                <depend>ltdl</depend>
                <depend>ltdl</depend>
-               <use>unixodbc</use>
-               <use>iodbc</use>
                <conflict>IMAP_STORAGE</conflict>
                <defaultenabled>no</defaultenabled>
        </member>
                <conflict>IMAP_STORAGE</conflict>
                <defaultenabled>no</defaultenabled>
        </member>
index 2cb92f8..190c164 100644 (file)
@@ -3,6 +3,7 @@ CRYPTO=@PBX_CRYPTO@
 CURL=@PBX_CURL@
 DAHDI=@PBX_DAHDI@
 FREETDS=@PBX_FREETDS@
 CURL=@PBX_CURL@
 DAHDI=@PBX_DAHDI@
 FREETDS=@PBX_FREETDS@
+GENERIC_ODBC=@PBX_GENERIC_ODBC@
 GMIME=@PBX_GMIME@
 GNU_LD=@GNU_LD@
 GSM=@PBX_GSM@
 GMIME=@PBX_GMIME@
 GNU_LD=@GNU_LD@
 GSM=@PBX_GSM@
@@ -24,7 +25,6 @@ MISDN=@PBX_MISDN@
 NBS=@PBX_NBS@
 NETSNMP=@PBX_NETSNMP@
 NEWT=@PBX_NEWT@
 NBS=@PBX_NBS@
 NETSNMP=@PBX_NETSNMP@
 NEWT=@PBX_NEWT@
-ODBC=@PBX_ODBC@
 OGG=@PBX_OGG@
 OPENH323=@PBX_OPENH323@
 OSPTK=@PBX_OSPTK@
 OGG=@PBX_OGG@
 OPENH323=@PBX_OPENH323@
 OSPTK=@PBX_OSPTK@
index 6b9b090..6c72d19 100644 (file)
@@ -25,9 +25,8 @@
  */
 
 /*** MODULEINFO
  */
 
 /*** MODULEINFO
-       <depend>odbc</depend>
-       <use>unixodbc</use>
-       <use>iodbc</use>
+       <depend>generic_odbc</depend>
+       <depend>ltdl</depend>
  ***/
 
 #include "asterisk.h"
  ***/
 
 #include "asterisk.h"
index 1b49766..8af2edc 100644 (file)
  */
 
 /*** MODULEINFO
  */
 
 /*** MODULEINFO
-       <depend>odbc</depend>
+       <depend>generic_odbc</depend>
        <depend>ltdl</depend>
        <depend>ltdl</depend>
-       <use>unixodbc</use>
-       <use>iodbc</use>
  ***/
 
 #include "asterisk.h"
  ***/
 
 #include "asterisk.h"
index 1b6d730..40575e9 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# From configure.ac Revision: 166058 .
+# From configure.ac Revision: 168522 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for asterisk 1.6.
 #
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for asterisk 1.6.
 #
@@ -1013,6 +1013,9 @@ CONFIG_SDL
 CONFIG_GTK
 PKGCONFIG
 CURL_CONFIG
 CONFIG_GTK
 PKGCONFIG
 CURL_CONFIG
+GENERIC_ODBC_LIB
+GENERIC_ODBC_INCLUDE
+PBX_GENERIC_ODBC
 LTLIBOBJS'
 ac_subst_files=''
       ac_precious_vars='build_alias
 LTLIBOBJS'
 ac_subst_files=''
       ac_precious_vars='build_alias
@@ -52491,6 +52494,25 @@ _ACEOF
    fi
 fi
 
    fi
 fi
 
+# build a GENERIC_ODBC result based on the presence of either UnixODBC (preferred)
+# or iODBC
+
+PBX_GENERIC_ODBC=0
+
+if test "${PBX_UNIXODBC}" = 1; then
+   PBX_GENERIC_ODBC=1
+   GENERIC_ODBC_LIB="${UNIXODBC_LIB}"
+   GENERIC_ODBC_INCLUDE="${UNIXODBC_INCLUDE}"
+elif test "${PBX_IODBC}" = 1; then
+   PBX_GENERIC_ODBC=1
+   GENERIC_ODBC_LIB="${IODBC_LIB}"
+   GENERIC_ODBC_INCLUDE="${IODBC_INCLUDE}"
+fi
+
+
+
+
+
 ac_config_files="$ac_config_files build_tools/menuselect-deps makeopts channels/h323/Makefile"
 
 
 ac_config_files="$ac_config_files build_tools/menuselect-deps makeopts channels/h323/Makefile"
 
 
@@ -53706,10 +53728,13 @@ CONFIG_SDL!$CONFIG_SDL$ac_delim
 CONFIG_GTK!$CONFIG_GTK$ac_delim
 PKGCONFIG!$PKGCONFIG$ac_delim
 CURL_CONFIG!$CURL_CONFIG$ac_delim
 CONFIG_GTK!$CONFIG_GTK$ac_delim
 PKGCONFIG!$PKGCONFIG$ac_delim
 CURL_CONFIG!$CURL_CONFIG$ac_delim
+GENERIC_ODBC_LIB!$GENERIC_ODBC_LIB$ac_delim
+GENERIC_ODBC_INCLUDE!$GENERIC_ODBC_INCLUDE$ac_delim
+PBX_GENERIC_ODBC!$PBX_GENERIC_ODBC$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 7; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 10; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index bca65c7..5401ae9 100644 (file)
@@ -1319,12 +1319,6 @@ AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
 
 AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], [])
 
 
 AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], [])
 
-PBX_ODBC=0
-if test "$PBX_IODBC" = "1" -o "$PBX_UNIXODBC" = "1"; then
-   PBX_ODBC=1
-fi
-AC_SUBST(PBX_ODBC)
-
 AST_EXT_LIB_CHECK([OGG], [ogg], [ogg_sync_init], [])
 
 # Non-glibc platforms require libexecinfo for backtrace support
 AST_EXT_LIB_CHECK([OGG], [ogg], [ogg_sync_init], [])
 
 # Non-glibc platforms require libexecinfo for backtrace support
@@ -1682,6 +1676,25 @@ if test "${USE_CURL}" != "no"; then
    fi
 fi
 
    fi
 fi
 
+# build a GENERIC_ODBC result based on the presence of either UnixODBC (preferred)
+# or iODBC
+
+PBX_GENERIC_ODBC=0
+
+if test "${PBX_UNIXODBC}" = 1; then
+   PBX_GENERIC_ODBC=1
+   GENERIC_ODBC_LIB="${UNIXODBC_LIB}"
+   GENERIC_ODBC_INCLUDE="${UNIXODBC_INCLUDE}"
+elif test "${PBX_IODBC}" = 1; then
+   PBX_GENERIC_ODBC=1
+   GENERIC_ODBC_LIB="${IODBC_LIB}"
+   GENERIC_ODBC_INCLUDE="${IODBC_INCLUDE}"
+fi
+
+AC_SUBST([GENERIC_ODBC_LIB])
+AC_SUBST([GENERIC_ODBC_INCLUDE])
+AC_SUBST([PBX_GENERIC_ODBC])
+
 AC_CONFIG_FILES([build_tools/menuselect-deps makeopts channels/h323/Makefile])
 AST_CHECK_MANDATORY
 
 AC_CONFIG_FILES([build_tools/menuselect-deps makeopts channels/h323/Makefile])
 AST_CHECK_MANDATORY
 
index 06ffecc..e1006a2 100644 (file)
  */
 
 /*** MODULEINFO
  */
 
 /*** MODULEINFO
-       <depend>odbc</depend>
-       <depend>ltdl</depend>
        <depend>res_odbc</depend>
        <depend>res_odbc</depend>
-       <use>unixodbc</use>
-       <use>iodbc</use>
  ***/
 
 #define USE_ODBC
  ***/
 
 #define USE_ODBC
index 09020e5..3cdb62e 100644 (file)
@@ -85,6 +85,9 @@ EDITLINE_LIB=@EDITLINE_LIB@
 FREETDS_INCLUDE=@FREETDS_INCLUDE@
 FREETDS_LIB=@FREETDS_LIB@
 
 FREETDS_INCLUDE=@FREETDS_INCLUDE@
 FREETDS_LIB=@FREETDS_LIB@
 
+GENERIC_ODBC_INCLUDE=@GENERIC_ODBC_INCLUDE@
+GENERIC_ODBC_LIB=@GENERIC_ODBC_LIB@
+
 GMIME_INCLUDE=@GMIME_INCLUDE@
 GMIME_LIB=@GMIME_LIB@
 
 GMIME_INCLUDE=@GMIME_INCLUDE@
 GMIME_LIB=@GMIME_LIB@
 
index 8de4314..3ecb70e 100644 (file)
  */
 
 /*** MODULEINFO
  */
 
 /*** MODULEINFO
-       <depend>odbc</depend>
-       <depend>ltdl</depend>
        <depend>res_odbc</depend>
        <depend>res_odbc</depend>
-       <use>unixodbc</use>
-       <use>iodbc</use>
  ***/
 
 #include "asterisk.h"
  ***/
 
 #include "asterisk.h"
index 5864c7d..165cf87 100644 (file)
  */
 
 /*** MODULEINFO
  */
 
 /*** MODULEINFO
-       <depend>odbc</depend>
+       <depend>generic_odbc</depend>
        <depend>ltdl</depend>
        <depend>ltdl</depend>
-       <use>unixodbc</use>
-       <use>iodbc</use>
  ***/
 
 #include "asterisk.h"
  ***/
 
 #include "asterisk.h"