[asterisk-commits] mvanbaak: trunk r146925 - in /trunk: ./ apps/ build_tools/ cdr/ funcs/ includ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Oct 6 18:14:34 CDT 2008
Author: mvanbaak
Date: Mon Oct 6 18:14:33 2008
New Revision: 146925
URL: http://svn.digium.com/view/asterisk?view=rev&rev=146925
Log:
All ODBC parts can now use either unixodbc or iodbc.
This allows for the ODBC parts to work on OpenBSD as well.
99.99% of the work is done by seanbright (bow, bow) and I actually
did nothing but test and yell at him that it still didn't work :)
Thanks for helping out !
Modified:
trunk/apps/app_voicemail.c
trunk/build_tools/menuselect-deps.in
trunk/cdr/cdr_adaptive_odbc.c
trunk/cdr/cdr_odbc.c
trunk/configure
trunk/configure.ac
trunk/funcs/func_odbc.c
trunk/include/asterisk/autoconfig.h.in
trunk/makeopts.in
trunk/res/res_config_odbc.c
trunk/res/res_odbc.c
Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=146925&r1=146924&r2=146925
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Mon Oct 6 18:14:33 2008
@@ -47,8 +47,10 @@
/*** MAKEOPTS
<category name="MENUSELECT_OPTS_app_voicemail" displayname="Voicemail Build Options" positive_output="yes" remove_on_change="apps/app_voicemail.o apps/app_directory.o">
<member name="ODBC_STORAGE" displayname="Storage of Voicemail using ODBC">
- <depend>unixodbc</depend>
+ <depend>unixodbc_or_iodbc</depend>
<depend>ltdl</depend>
+ <use>unixodbc</use>
+ <use>iodbc</use>
<conflict>IMAP_STORAGE</conflict>
<defaultenabled>no</defaultenabled>
</member>
Modified: trunk/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/menuselect-deps.in?view=diff&rev=146925&r1=146924&r2=146925
==============================================================================
--- trunk/build_tools/menuselect-deps.in (original)
+++ trunk/build_tools/menuselect-deps.in Mon Oct 6 18:14:33 2008
@@ -13,6 +13,7 @@
ICONV=@PBX_ICONV@
IKSEMEL=@PBX_IKSEMEL@
IMAP_TK=@PBX_IMAP_TK@
+IODBC=@PBX_IODBC@
ISDNNET=@PBX_ISDNNET@
IXJUSER=@PBX_IXJUSER@
JACK=@PBX_JACK@
@@ -23,6 +24,7 @@
NBS=@PBX_NBS@
NETSNMP=@PBX_NETSNMP@
NEWT=@PBX_NEWT@
+UNIXODBC_OR_IODBC=@PBX_ODBC@
OGG=@PBX_OGG@
OPENH323=@PBX_OPENH323@
OSPTK=@PBX_OSPTK@
Modified: trunk/cdr/cdr_adaptive_odbc.c
URL: http://svn.digium.com/view/asterisk/trunk/cdr/cdr_adaptive_odbc.c?view=diff&rev=146925&r1=146924&r2=146925
==============================================================================
--- trunk/cdr/cdr_adaptive_odbc.c (original)
+++ trunk/cdr/cdr_adaptive_odbc.c Mon Oct 6 18:14:33 2008
@@ -25,7 +25,9 @@
*/
/*** MODULEINFO
- <depend>unixodbc</depend>
+ <depend>unixodbc_or_iodbc</depend>
+ <use>unixodbc</use>
+ <use>iodbc</use>
***/
#include "asterisk.h"
Modified: trunk/cdr/cdr_odbc.c
URL: http://svn.digium.com/view/asterisk/trunk/cdr/cdr_odbc.c?view=diff&rev=146925&r1=146924&r2=146925
==============================================================================
--- trunk/cdr/cdr_odbc.c (original)
+++ trunk/cdr/cdr_odbc.c Mon Oct 6 18:14:33 2008
@@ -29,8 +29,10 @@
*/
/*** MODULEINFO
- <depend>unixodbc</depend>
+ <depend>unixodbc_or_iodbc</depend>
<depend>ltdl</depend>
+ <use>unixodbc</use>
+ <use>iodbc</use>
***/
#include "asterisk.h"
Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?view=diff&rev=146925&r1=146924&r2=146925
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon Oct 6 18:14:33 2008
@@ -27,7 +27,7 @@
AC_USE_SYSTEM_EXTENSIONS # note- does not work on FreeBSD
case "${host_os}" in
- freebsd*)
+ freebsd*|openbsd*)
ac_default_prefix=/usr/local
CPPFLAGS=-I/usr/local/include
LDFLAGS=-L/usr/local/lib
@@ -220,6 +220,7 @@
AST_EXT_LIB_SETUP([ICONV], [Iconv Library], [iconv])
AST_EXT_LIB_SETUP([IKSEMEL], [Iksemel Jabber Library], [iksemel])
AST_EXT_LIB_SETUP([IMAP_TK], [UW IMAP Toolkit], [imap])
+AST_EXT_LIB_SETUP([IODBC], [iODBC], [iodbc])
AST_EXT_LIB_SETUP([ISDNNET], [ISDN4Linux Library], [isdnnet])
AST_EXT_LIB_SETUP([JACK], [Jack Audio Connection Kit], [jack])
AST_EXT_LIB_SETUP([LDAP], [OpenLDAP], [ldap])
@@ -230,7 +231,6 @@
AST_EXT_LIB_SETUP([NCURSES], [ncurses], [ncurses])
AST_EXT_LIB_SETUP([NETSNMP], [Net-SNMP], [netsnmp])
AST_EXT_LIB_SETUP([NEWT], [newt], [newt])
-AST_EXT_LIB_SETUP([UNIXODBC], [unixODBC], [odbc])
AST_EXT_LIB_SETUP([OGG], [OGG], [ogg])
AST_EXT_LIB_SETUP([OSPTK], [OSP Toolkit], [osptk])
AST_EXT_LIB_SETUP([OSS], [Open Sound System], [oss])
@@ -257,6 +257,7 @@
AST_EXT_LIB_SETUP([TERMCAP], [Termcap], [termcap])
AST_EXT_LIB_SETUP([TINFO], [Term Info], [tinfo])
AST_EXT_LIB_SETUP([TONEZONE], [tonezone], [tonezone])
+AST_EXT_LIB_SETUP([UNIXODBC], [unixODBC], [unixodbc])
AST_EXT_LIB_SETUP([USB], [usb], [usb])
AST_EXT_LIB_SETUP([VORBIS], [Vorbis], [vorbis])
AST_EXT_LIB_SETUP([VPB], [Voicetronix API], [vpb])
@@ -1226,6 +1227,8 @@
LIBS="${saved_libs}"
fi
+AST_EXT_LIB_CHECK([IODBC], [iodbc], [SQLConnect], [sql.h], [-lpthread])
+
AST_EXT_LIB_CHECK([JACK], [jack], [jack_activate], [jack/jack.h])
# Needed by unixodbc
@@ -1256,6 +1259,12 @@
AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.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], [])
Modified: trunk/funcs/func_odbc.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_odbc.c?view=diff&rev=146925&r1=146924&r2=146925
==============================================================================
--- trunk/funcs/func_odbc.c (original)
+++ trunk/funcs/func_odbc.c Mon Oct 6 18:14:33 2008
@@ -27,9 +27,11 @@
*/
/*** MODULEINFO
- <depend>unixodbc</depend>
+ <depend>unixodbc_or_iodbc</depend>
<depend>ltdl</depend>
<depend>res_odbc</depend>
+ <use>unixodbc</use>
+ <use>iodbc</use>
***/
#include "asterisk.h"
Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=146925&r1=146924&r2=146925
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Mon Oct 6 18:14:33 2008
@@ -376,6 +376,12 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+
+/* Define this to indicate the ${IODBC_DESCRIP} library */
+#undef HAVE_IODBC
+
+/* Define to indicate the ${IODBC_DESCRIP} library version */
+#undef HAVE_IODBC_VERSION
/* Define if your system has the IP_MTU_DISCOVER headers. */
#undef HAVE_IP_MTU_DISCOVER
Modified: trunk/makeopts.in
URL: http://svn.digium.com/view/asterisk/trunk/makeopts.in?view=diff&rev=146925&r1=146924&r2=146925
==============================================================================
--- trunk/makeopts.in (original)
+++ trunk/makeopts.in Mon Oct 6 18:14:33 2008
@@ -106,6 +106,9 @@
IMAP_TK_INCLUDE=@IMAP_TK_INCLUDE@
IMAP_TK_LIB=@IMAP_TK_LIB@
+IODBC_INCLUDE=@IODBC_INCLUDE@
+IODBC_LIB=@IODBC_LIB@
+
JACK_INCLUDE=@JACK_INCLUDE@
JACK_LIB=@JACK_LIB@
Modified: trunk/res/res_config_odbc.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_config_odbc.c?view=diff&rev=146925&r1=146924&r2=146925
==============================================================================
--- trunk/res/res_config_odbc.c (original)
+++ trunk/res/res_config_odbc.c Mon Oct 6 18:14:33 2008
@@ -29,9 +29,11 @@
*/
/*** MODULEINFO
- <depend>unixodbc</depend>
+ <depend>unixodbc_or_iodbc</depend>
<depend>ltdl</depend>
<depend>res_odbc</depend>
+ <use>unixodbc</use>
+ <use>iodbc</use>
***/
#include "asterisk.h"
Modified: trunk/res/res_odbc.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_odbc.c?view=diff&rev=146925&r1=146924&r2=146925
==============================================================================
--- trunk/res/res_odbc.c (original)
+++ trunk/res/res_odbc.c Mon Oct 6 18:14:33 2008
@@ -30,8 +30,10 @@
*/
/*** MODULEINFO
- <depend>unixodbc</depend>
+ <depend>unixodbc_or_iodbc</depend>
<depend>ltdl</depend>
+ <use>unixodbc</use>
+ <use>iodbc</use>
***/
#include "asterisk.h"
More information about the asterisk-commits
mailing list