]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fix configure ODBC logic
authorTravis Cross <tc@traviscross.com>
Fri, 31 Jan 2014 22:05:43 +0000 (22:05 +0000)
committerTravis Cross <tc@traviscross.com>
Fri, 31 Jan 2014 22:13:02 +0000 (22:13 +0000)
...and rewrite entire block for better clarity of purpose.

We might want to look more closely at the AX_LIB_ODBC macro as well.

This amends commit 60c56109bc57ec2b73dcced346ec3e7db8a18325.

configure.in

index a811482646670049d3ebcd401206ebe703927d5a..ec448ca124413724999c6cf3876b00ee66498488 100644 (file)
@@ -397,15 +397,17 @@ 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"])
+       [AS_HELP_STRING([--enable-core-odbc-support], [Compile with ODBC Support])],[enable_core_odbc_support="yes"],[enable_core_odbc_support="no"])
 if test "x$enable_core_odbc_support" != "xno"; then
   AX_LIB_ODBC
-  if test "x$ac_cv_found_odbc" = "xyes" ; then
+  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])
+  else
+    if test "x$enable_core_odbc_support" = "xyes"; then
+      AC_MSG_ERROR([no usable libodbc; please install unixodbc devel package or equivalent])
+    else
+      enable_core_odbc_support="no"
   fi
 fi