1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
|
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"
|