]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fix --disable-core-odbc-support
authorJames Le Cuirot <james.le-cuirot@yakara.com>
Fri, 10 Jan 2014 14:37:41 +0000 (14:37 +0000)
committerTravis Cross <tc@traviscross.com>
Fri, 31 Jan 2014 18:53:56 +0000 (18:53 +0000)
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 <tc@traviscross.com>
configure.in

index f8db4899e24b264bcb5154860de2b7cd25037323..0d5aa1e01ff07681e5682d9a2c91714cb956c7c7 100644 (file)
@@ -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