diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-10-11 12:53:40 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-10-11 12:53:40 +0000 |
commit | 341af8bcd0a7683b6c17ca23f1028ae47a9cf4c5 (patch) | |
tree | 749106882fa85e950b0257ac3084ac8c75aabcc2 /configure.ac | |
parent | 6e32d3f1dba30ac353d6bbdd93b7431eef6aa62d (diff) | |
download | rsyslog-341af8bcd0a7683b6c17ca23f1028ae47a9cf4c5.tar.gz rsyslog-341af8bcd0a7683b6c17ca23f1028ae47a9cf4c5.tar.xz rsyslog-341af8bcd0a7683b6c17ca23f1028ae47a9cf4c5.zip |
- changed the build system to use a single source tarball again (but
different makefiles for the main project and ommysql)
- applied fixes from Michael Biebl:
1.) fix failing compilation of ommysql plugin
(s/ommysql-config.h/config.h/)
2.) fix mysql configure check (although the default is no, we did check for
the mysql devel files)
3.) Create a separate Makefile.am for the doc files. This cleans up the
toplevel Makefile.am considerably and makes it much more readable and
maintainable.
3b) Assign the html doc files to html_DATA. This means, they are installed
to $(hmtdir), which by autoconf standards is
$(prefix)/share/doc/$packagename/.
4.) Reformat the SOURCES line to make it better readable and maintainable.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 54 |
1 files changed, 47 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 7abc5afa..da0aac81 100644 --- a/configure.ac +++ b/configure.ac @@ -13,6 +13,8 @@ AM_PROG_CC_C_O if test "$GCC" = "yes" then CFLAGS="$CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g" fi +AC_DISABLE_STATIC +AC_PROG_LIBTOOL AC_CANONICAL_HOST case "${host}" in @@ -131,8 +133,9 @@ AC_ARG_ENABLE(pthreads, esac], [enable_pthreads=yes] ) -AS_IF([test "x$enable_pthreads" != "xno"], - [AC_CHECK_HEADERS( + +if test "x$enable_pthreads" != "xno"; then + AC_CHECK_HEADERS( [pthread.h], [ AC_CHECK_LIB( @@ -148,8 +151,8 @@ AS_IF([test "x$enable_pthreads" != "xno"], ) ], [AC_MSG_FAILURE([pthread is missing])] - )] -) + ) +fi # klogd AC_ARG_ENABLE(klogd, @@ -170,7 +173,7 @@ fi # AC_MSG_CHECKING(for SYSLOG_UNIXAF support) AC_ARG_ENABLE([unix], - [AS_HELP_STRING([--disable-unix], [disable support for unix])], + [AS_HELP_STRING([--disable-unix], [Disable support for unix])], [ if test "x${enableval}" = "xyes"; then AC_MSG_RESULT([yes]) @@ -205,7 +208,7 @@ fi # AC_MSG_CHECKING(for FSSTND support) AC_ARG_ENABLE([fsstnd], - [AS_HELP_STRING([--disable-fsstnd], [disable support for FSSTND])], + [AS_HELP_STRING([--disable-fsstnd], [Disable support for FSSTND])], [ if test "x${enableval}" = "xyes"; then AC_MSG_RESULT([yes]) @@ -234,7 +237,43 @@ if test "$enable_debug" = "no"; then AC_DEFINE(NDEBUG, 1, [Defined if debug mode is disabled.]) fi -AC_CONFIG_FILES([Makefile]) + + +# SQL support +AC_ARG_ENABLE(mysql, + [AS_HELP_STRING([--enable-mysql],[Enable MySql database support @<:@default=no@:>@])], + [case "${enableval}" in + yes) enable_mysql="yes" ;; + no) enable_mysql="no" ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-mysql) ;; + esac], + [enable_mysql=no] +) +if test "x$enable_mysql" = "xyes"; then + AC_CHECK_HEADERS( + [mysql/mysql.h],, + [AC_MSG_FAILURE([MySQL is missing])] + ) + AC_SUBST(LIBS_TMP,[$LIBS]) + AC_SEARCH_LIBS( + [mysql_init], + [mysqlclient], + [mysql_cflags=`mysql_config --cflags` + mysql_libs=`mysql_config --libs` + ], + [AC_MSG_FAILURE([MySQL library is missing])], + [`mysql_config --libs`] + ) + AC_SUBST(LIBS,[$LIBS_TMP]) +fi +AM_CONDITIONAL(ENABLE_MYSQL, test x$enable_mysql = xyes) +AC_SUBST(mysql_cflags) +AC_SUBST(mysql_libs) + + + + +AC_CONFIG_FILES([Makefile doc/Makefile plugins/ommysql/Makefile]) AC_OUTPUT echo "****************************************************" @@ -244,6 +283,7 @@ echo "Multithreading support enabled: $enable_pthreads" echo "Klogd functionality enabled: $enable_klogd" echo "Regular expressions support enabled: $enable_regexp" echo "Zlib compression support enabled: $enable_zlib" +echo "MySql support enabled: $enable_mysql" echo "Large file support enabled: $enable_largefile" echo "Networking support enabled: $enable_inet" echo "Debug mode enabled: $enable_debug" |