From 753835b45646af72b97cb518279d8bae4829707f Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Fri, 10 Jan 2014 14:37:41 +0000 Subject: [PATCH 1/2] Fix --disable-core-odbc-support In commit ffc8e81b763c4e11e02309b99e2a4b4aa666e845, tc ensured that configure would abort if libodbc was not found. However this resulted in the library check being done twice, as well as rendering --disable-core-odbc-support ineffective. If libodbc was found, it would enable core ODBC support regardless. This fix ensures the check is only done once or not at all if core ODBC support is explicitly disabled. Signed-off-by: Travis Cross --- configure.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index f8db4899e2..0d5aa1e01f 100644 --- a/configure.in +++ b/configure.in @@ -399,12 +399,13 @@ AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"]) AC_ARG_ENABLE(core-odbc-support, [AS_HELP_STRING([--enable-core-odbc-support], [Compile with ODBC Support])],,[enable_core_odbc_support="no"]) -AX_LIB_ODBC -if test "$ac_cv_found_odbc" = "yes" ; then - enable_core_odbc_support="yes" -fi if test "x$enable_core_odbc_support" != "xno"; then - AC_CHECK_LIB([odbc], [SQLDisconnect],, AC_MSG_ERROR([no usable libodbc; please install unixodbc devel package or equivalent])) + AX_LIB_ODBC + if test "x$ac_cv_found_odbc" = "xyes" ; then + enable_core_odbc_support="yes" + elif test "x$enable_core_odbc_support" = "xyes" ; then + AC_MSG_ERROR([no usable libodbc; please install unixodbc devel package or equivalent]) + fi fi CHECK_LIBUUID From f7176ca108ff8ae43c3c900fb61e0e20ade56265 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Fri, 31 Jan 2014 18:14:32 +0000 Subject: [PATCH 2/2] Ensure we don't set HAVE_ODBC unless we really do --- configure.in | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.in b/configure.in index 0d5aa1e01f..a811482646 100644 --- a/configure.in +++ b/configure.in @@ -397,6 +397,7 @@ AM_CONDITIONAL([ENABLE_ZRTP],[test "x$enable_zrtp" != "xno"]) AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"]) +enable_core_odbc_support="no" AC_ARG_ENABLE(core-odbc-support, [AS_HELP_STRING([--enable-core-odbc-support], [Compile with ODBC Support])],,[enable_core_odbc_support="no"]) if test "x$enable_core_odbc_support" != "xno"; then