dnl Process this file with autoconf to produce a configure script. AC_REVISION([$Id: configure.in 447 2007-02-23 23:05:25Z crosser $])dnl AC_INIT(dspam.c) AM_INIT_AUTOMAKE(zms_dspam, 0.01) AM_CONFIG_HEADER(config.h) AM_C_PROTOTYPES AC_LANG_C AC_PROG_CC AC_PROG_MAKE_SET AC_SUBST(PROGS)dnl AC_SUBST(LIBPROGS)dnl AC_PATH_PROG(ECHO, echo, echo)dnl AC_PATH_PROG(LN, ln, ln)dnl AC_PATH_PROG(MV, mv, mv)dnl AC_PATH_PROG(RM, rm, rm)dnl AC_PATH_PROG(PERL, perl, perl)dnl AC_PATH_PROG(NROFF, nroff, nroff)dnl AC_PATH_PROG(AR, ar, ar)dnl AC_PATH_PROG(LD, ld, ld)dnl AC_PATH_PROG(SED, sed, sed)dnl AC_PROG_INSTALL AC_PROG_LN_S AM_PROG_LIBTOOL AC_PATH_PROG(ZMSCANNER_CONFIG,zmscanner-config) AC_ARG_WITH(zmscanner_config, [ --with-zmscanner-config=PATH path to zmscanner-config program], [ZMSCANNER_CONFIG=$withval]) ZMSCANNER_VERSION=`$ZMSCANNER_CONFIG --version` if test $? != 0; then AC_MSG_ERROR([cannot run zmscanner-config program]) fi case "$ZMSCANNER_VERSION" in 0.*|1.9[[0-6]]) AC_MSG_ERROR([incompatible version $ZMSCANNER_VERSION of zmscanner]);; esac AC_MSG_RESULT([using ZMScanner version $ZMSCANNER_VERSION]) AC_SUBST(ZMSCANNER_VERSION) CFLAGS="`$ZMSCANNER_CONFIG --cflags` $CFLAGS" LIBS="`$ZMSCANNER_CONFIG --libs` $LIBS" zmslibdir="`$ZMSCANNER_CONFIG --libexecdir`" ZMSCANNER_COMMAND="`$ZMSCANNER_CONFIG --binpath`" ZMSCHAT_COMMAND="`$ZMSCANNER_CONFIG --chatpath`" AC_SUBST(LIBS CFLAGS zmslibdir ZMSCANNER_COMMAND ZMSCHAT_COMMAND) AC_ARG_WITH([dspam-libs], AC_HELP_STRING([--with-dspam-libs=PATH], [directory with libdspam library])) if test "X$with_dspam_libs = "Xyes" || test "X$with_dspam_libs = "Xno"; then AC_MSG_ERROR([--with-dspam-libs must be PATH]) fi if test "X$with_dspam_libs" != "X"; then LIBS="$LIBS -L$with_dspam_libs" fi AC_ARG_WITH([dspam-includes], AC_HELP_STRING([--with-dspam-includes=PATH], [directory with libdspam.h header])) if test "X$with_dspam_includes = "Xyes" || test "X$with_dspam_includes = "Xno"; then AC_MSG_ERROR([--with-dspam-includes must be PATH]) fi if test "X$with_dspam_includes" != "X"; then CPPFLAGS="$CPPFLAGS -I$with_dspam_includes" fi dnl Checks for header files. AC_HEADER_STDC AC_HEADER_TIME AC_CHECK_HEADERS(errno.h unistd.h stddef.h fcntl.h sys/stat.h dlfcn.h) AC_CHECK_HEADERS(zmscanner.h) AC_CHECK_HEADERS(libdspam.h) if test "X$ac_cv_header_libdspam_h" != "Xyes"; then AC_MSG_RESULT([cannot find libdspam.h, will use libdspam_glue.h]) fi dnl Checks for library functions. AC_CHECK_FUNCS(syslog) AC_CHECK_LIB(dl, dlopen) AC_CHECK_FUNCS(dlopen) AC_CHECK_LIB(dspam, dspam_init) if test "X$ac_cv_lib_dspam_dspam_init" != "Xyes"; then AC_MSG_ERROR([cannot find libdspam, specify --with-dspam-libs=PATH]) fi AC_CONFIG_FILES([Makefile tests/Makefile tests/test.conf \ tests/startserver tests/tryscan tests/stopserver], [test -f tests/startserver && chmod +x tests/startserver test -f tests/tryscan && chmod +x tests/tryscan test -f tests/stopserver && chmod +x tests/stopserver]) AC_OUTPUT