ido: Build ido_mysql only if mysql headers/libs detected.

fixes #4416
This commit is contained in:
Michael Friedrich 2013-08-08 16:44:16 +02:00
parent 07d98feccb
commit 5633eda892
2 changed files with 12 additions and 1 deletions

View File

@ -1,5 +1,6 @@
## Process this file with automake to produce Makefile.in
if MYSQL_USE
pkglib_LTLIBRARIES = \
libido_mysql.la
@ -38,3 +39,10 @@ libido_mysql_la_LIBADD = \
${top_builddir}/lib/remoting/libremoting.la \
${top_builddir}/lib/icinga/libicinga.la \
${top_builddir}/lib/ido/libido.la
else
all-local:
@echo 'MySQL not enabled. Install libs/headers and rerun configure/make.'
endif

View File

@ -63,7 +63,6 @@ AX_BOOST_THREAD
AX_BOOST_SYSTEM
AX_BOOST_UNIT_TEST_FRAMEWORK
AX_BOOST_PROGRAM_OPTIONS
AX_LIB_MYSQL([5.0])
AX_CHECK_OPENSSL([], [AC_MSG_ERROR([You need the OpenSSL headers and libraries in order to build this application])])
AC_CHECK_LIB(ssl, SSL_new)
AC_CHECK_LIB(crypto, X509_NAME_oneline)
@ -96,6 +95,10 @@ if test "x$enable_coverage" = "xyes"; then
fi
AC_MSG_RESULT($enable_coverage)
AX_LIB_MYSQL([5.0])
AC_CHECK_HEADERS([mysql/mysql.h], [mysql_use=true], [AC_MSG_WARN([mysql.h not found. Will not build mysql related libs/components.])])
AM_CONDITIONAL(MYSQL_USE, test x"$mysql_use" = x"true")
AX_PYTHON_DEFAULT
AX_PYTHON_ENABLE
AX_PYTHON_VERSION_ENSURE([2.5])