dnl Process this file with autoconf to produce a configure script. AC_INIT(src) AC_PREREQ(2.53) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE(prelude-lml, 0.8.6) AM_CONFIG_HEADER(config.h) AM_DISABLE_STATIC AM_MAINTAINER_MODE AM_PROG_LIBTOOL dnl Checks for programs. AC_PROG_CPP AC_PROG_CC AC_PROG_INSTALL AC_PROG_MAKE_SET AC_C_INLINE AC_C_BIGENDIAN AM_PROG_LEX AC_PROG_YACC AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) if test "x$prefix" = "xNONE"; then prefix="/usr/local" fi if test "x$localstatedir" = "x\${prefix}/var"; then localstatedir="$prefix/var" fi if test "x$sysconfdir" = "x\${prefix}/etc"; then sysconfdir="$prefix/etc" fi dnl ************************************************** dnl * Check for libprelude * dnl ************************************************** AC_PATH_GENERIC(libprelude, 0.8.6, , AC_MSG_ERROR(Cannot find libprelude: Is libprelude-config in the path?) ) dnl ************************************************** dnl * Check for PCRE * dnl ************************************************** AC_PATH_GENERIC(pcre, 3.0, , AC_MSG_ERROR(Cannot find pcre: Is pcre-config in the path?) ) dnl ************************************************** dnl * Check for Gtkdoc. * dnl ************************************************** AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) AM_CONDITIONAL(HAVE_GTK_DOC, test -n $GTKDOC) AC_SUBST(HAVE_GTK_DOC) AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=no]], enable_gtk_doc="$enableval", enable_gtk_doc=no) AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) dnl ************************************************** dnl * Html dir ? * dnl ************************************************** if test "x$with_html_dir" = "x" ; then HTML_DIR='${datadir}/doc/prelude-lml/html' else HTML_DIR=$with_html_dir fi AC_SUBST(HTML_DIR) dnl ************************************************** dnl * Check for FAM. * dnl ************************************************** enable_fam=no AC_ARG_ENABLE(fam, [ --enable-fam Use FAM for file change notification [default=auto]], enable_fam="$enableval", enable_fam=yes) for dir in /usr /usr/local /usr/pkg; do AC_CHECK_FILE($dir/lib/libfam.so, fam_lib_dir=$dir) AC_CHECK_FILE($dir/include/fam.h, fam_include_dir=$dir) done if test -n "$fam_lib_dir" && test -n "$fam_include_dir"; then enable_fam=yes fi if test x$fam_include_dir = x/usr; then fam_include_dir="" else fam_include="-I$fam_include_dir/include" fi if test x$enable_fam = xyes; then LIBPRELUDE_LIBS="$LIBPRELUDE_LIBS -lfam" LIBPRELUDE_CFLAGS="$LIBPRELUDE_CFLAGS $fam_include" AC_DEFINE(HAVE_FAM, , Tell whether FAM support should be compiled in) fi AM_CONDITIONAL(HAVE_FAM, test x$enable_fam = xyes) AC_CHECK_DECL(FILENAME_MAX, have_filename_max=yes, have_filename_max=no) if test x$have_filename_max = xno; then AC_DEFINE_UNQUOTED(FILENAME_MAX, 256, Define the maximum value of a filename) fi dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME dnl Checks for library functions. AC_TYPE_SIGNAL AC_FUNC_VPRINTF AC_CHECK_FUNCS(gettimeofday select socket strdup strerror strstr) configdir=$sysconfdir/prelude-lml prelude_conf=$configdir/prelude-lml.conf regex_conf=$configdir/plugins.rules plugindir=$libdir/prelude-lml log_plugin_dir=$plugindir AC_DEFINE_UNQUOTED(PRELUDE_CONF, "$prelude_conf", Path to the LML configuration file) defined="$defined $LIBPRELUDE_CFLAGS $PCRE_CFLAGS" AC_SUBST(defined) AC_SUBST(configdir) AC_SUBST(localstatedir) AC_SUBST(prelude_conf) AC_SUBST(regex_conf) AC_SUBST(log_plugin_dir) AC_SUBST(LIBWRAP_LIBS) CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \ -Wbad-function-cast -Wcast-qual -Wcast-align -Wnested-externs -Wunused" AC_SUBST(CFLAGS) AC_OUTPUT([ prelude-lml.conf plugins.rules Makefile src/Makefile src/include/Makefile plugins/Makefile plugins/debug/Makefile plugins/pax/Makefile plugins/simple/Makefile plugins/simple/ruleset/Makefile ]) echo echo "*** Dumping configuration ***" echo " - Enable FAM support : $enable_fam" echo " - Generate documentation : $enable_gtk_doc"