remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB logic that includes copying the relevant LIB and INCLUDE data from either UnixODBC or iODBC, based on which was found; if both were found, prefer UnixODBC

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
This commit is contained in:
Kevin P. Fleming
2009-01-15 20:18:53 +00:00
parent 73694e15f1
commit 9a7efae8fd
10 changed files with 55 additions and 29 deletions

View File

@@ -1319,12 +1319,6 @@ 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], [])
# Non-glibc platforms require libexecinfo for backtrace support
@@ -1682,6 +1676,25 @@ if test "${USE_CURL}" != "no"; then
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