forked from Mirrors/freeswitch
Improve configure handling of ODBC
This commit changes behavior such that if --disable-core-odbc-support is provided we'll build without ODBC even if the libraries are there. Previously we would always quietly build with ODBC support if it was on the system. Contrary to what was said in commit72a804983
, my 2012 commitffc8e81b7
did not affect the behavior of --disable-core-odbc-support. We never recognized the flag as being different from not providing the option at all. What the commit did do was to cause us to fail loudly if --enable-core-odbc-support was provided but the system libraries were not there. This behavior is preserved. (That commit also caused us to potentially run certain checks twice, which this commit resolves.) You can also now provide --enable-core-odbc-support=optional which has the same effect as the default behavior. FS-6173 --resolve Thanks-to: James Le Cuirot <chewi@aura-online.co.uk>
This commit is contained in:
parent
3cad316804
commit
ab2bc7c689
15
configure.in
15
configure.in
|
@ -403,13 +403,16 @@ AM_CONDITIONAL([ENABLE_ZRTP],[test "x$enable_zrtp" != "xno"])
|
|||
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
|
||||
[AS_HELP_STRING([--enable-core-odbc-support], [Compile with ODBC Support (default is optional)])],,[enable_core_odbc_support="optional"])
|
||||
if ! test "$enable_core_odbc_support" = "no"; then
|
||||
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]))
|
||||
elif test "$enable_core_odbc_support" = "yes"; then
|
||||
AC_MSG_ERROR([no usable libodbc; please install unixodbc devel package or equivalent])
|
||||
else
|
||||
enable_core_odbc_support="no"
|
||||
fi
|
||||
fi
|
||||
|
||||
CHECK_LIBUUID
|
||||
|
|
Loading…
Reference in New Issue