]> granicus.if.org Git - icinga2/commitdiff
ido: Build ido_mysql only if mysql headers/libs detected.
authorMichael Friedrich <michael.friedrich@netways.de>
Thu, 8 Aug 2013 14:44:16 +0000 (16:44 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Thu, 8 Aug 2013 14:44:42 +0000 (16:44 +0200)
fixes #4416

components/ido_mysql/Makefile.am
configure.ac

index 998474f411f11b5c1bc937383a6315f3134b4499..8e48e0e430948f225c46d26ede960e14df136db9 100644 (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
index af54c31dcf42524f997f3c6668545a18ba1c1b7c..6cf9042d0ca8dc0952e4ccb28012c52e1487173c 100644 (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])