dnl Process this file with autoconf to produce a configure script. AC_REVISION([$Id: configure.in,v 1.45 2003/09/18 21:21:25 crosser Exp $])dnl dnl $Log: configure.in,v $ dnl Revision 1.45 2003/09/18 21:21:25 crosser dnl bugfix: enclose ||'s in brackets properly dnl dnl Revision 1.44 2003/09/15 16:34:56 crosser dnl make this a release dnl dnl Revision 1.43 2003/09/14 21:16:17 crosser dnl I hardly beleive it but the new varpool thing seems to work! dnl dnl Revision 1.42 2003/09/14 20:21:32 crosser dnl make release before breaking compatibility dnl dnl Revision 1.41 2003/09/14 11:47:29 crosser dnl a few AC_TYPE macros for types used dnl dnl Revision 1.40 2003/09/13 19:39:32 crosser dnl new version dnl dnl Revision 1.39 2003/09/13 11:41:16 crosser dnl make new header parsing actually work dnl dnl Revision 1.38 2003/09/12 15:22:41 crosser dnl break parsing to separate modules (just placeholders for now) dnl dnl Revision 1.37 2003/09/12 14:18:34 crosser dnl placeholders for header processors dnl dnl Revision 1.36 2003/09/11 18:52:27 crosser dnl add todo, start new version dnl dnl Revision 1.35 2003/09/11 17:15:57 crosser dnl make queue file renaming on sigsegv configurable option dnl dnl Revision 1.34 2003/09/11 14:44:27 crosser dnl do not try to scan zero size file dnl dnl Revision 1.33 2003/09/11 05:30:38 crosser dnl cosmetics and typos dnl dnl Revision 1.32 2003/09/10 17:00:54 crosser dnl bump version dnl dnl Revision 1.31 2003/09/10 09:55:02 crosser dnl bump version dnl dnl Revision 1.30 2003/09/09 17:02:01 crosser dnl dispatch_ct introduced to invoke appropriate content processors dnl depending on content-type of the body(part) dnl dnl Revision 1.29 2003/09/08 12:55:55 crosser dnl make static and dynamic plugins syntactically identical dnl dnl Revision 1.28 2003/09/05 21:09:57 crosser dnl make check uses private configuration dnl dnl Revision 1.27 2003/09/05 17:43:27 crosser dnl placeholders for body decoders dnl dnl Revision 1.26 2003/09/05 10:10:42 crosser dnl make config parameter "gcfg.modconfdir" and access method dnl dnl Revision 1.25 2003/09/04 21:23:21 crosser dnl use strlcpy; dnl check_ct: regex matching works dnl dnl Revision 1.24 2003/09/03 21:09:22 crosser dnl completed switch from (start,len) pairs to slab_t descriptors dnl pass opaque attribute block between stages - so could separate dnl breakrfc822 into two stages (multibody is separate now) dnl dnl Revision 1.23 2003/09/03 19:41:39 crosser dnl work in progress on changed calling conventions dnl dnl Revision 1.22 2003/09/03 16:07:43 crosser dnl make pid file dnl make zmsctl look and work without termios dnl make zmsctl use socket name from config dnl dnl Revision 1.21 2003/09/03 14:42:12 crosser dnl do not report broken pipe dnl release 0.02 dnl dnl Revision 1.20 2003/09/02 22:20:11 crosser dnl make initial stage run time configurable dnl dnl Revision 1.19 2003/09/02 08:05:01 crosser dnl make dynamic loading work on Solaris dnl dnl Revision 1.18 2003/09/01 22:39:00 crosser dnl scan interesting headers dnl FIXME: skip processing of last header dnl dnl Revision 1.17 2003/09/01 18:20:45 crosser dnl proper test format dnl debugging readconfig error - int var dnl dnl Revision 1.16 2003/09/01 16:39:22 crosser dnl make DSO actually work dnl dnl Revision 1.15 2003/09/01 12:16:01 crosser dnl make (untested) branch to work without mmap() dnl dnl Revision 1.14 2003/09/01 06:03:30 crosser dnl implement code for "naeve" filter (but working yet) dnl dnl Revision 1.13 2003/08/31 21:18:37 crosser dnl made plugin framework dnl dnl Revision 1.12 2003/08/31 18:43:23 crosser dnl make the thing run in "filter" mode - from stdin to stdout dnl dnl Revision 1.11 2003/08/31 13:51:12 crosser dnl header autoconfing cleanups dnl dnl Revision 1.10 2003/08/31 12:58:58 crosser dnl make basic separation of lib/ plugins dnl configure REPLACE_FUNCS in a right way (hopefully) dnl dnl Revision 1.9 2003/08/31 11:48:46 crosser dnl filling inc and lib dnl dnl Revision 1.8 2003/08/25 10:03:10 crosser dnl in threaded version, make master thread wait for subthreads dnl make thing compile without termios (but zmsctl won't work in fact) dnl dnl Revision 1.7 2003/08/24 21:07:17 crosser dnl created the whole async infrastructure dnl dnl Revision 1.6 2003/08/22 14:43:32 crosser dnl organize make check dnl dnl Revision 1.5 2003/08/21 19:24:20 crosser dnl startup dnl dnl Revision 1.4 2003/08/21 18:06:15 crosser dnl populate directories dnl dnl Revision 1.3 2003/08/21 17:41:49 crosser dnl moving things to dirs dnl dnl Revision 1.2 2003/08/21 16:32:20 crosser dnl README, ansi2knr, stdio dnl dnl Revision 1.1.1.1 2003/08/21 16:01:14 crosser dnl Imported sources dnl AC_INIT(daemon/zmscanner.c) AM_INIT_AUTOMAKE(zmscanner, 0.22) AM_CONFIG_HEADER(config.h) AM_C_PROTOTYPES AC_LANG_C AC_PROG_CC if test "X$CC" = "Xgcc"; then CFLAGS="$CFLAGS -Wall -g" fi AC_ARG_ENABLE(debug_link, [ --enable-debug-link (only in forking version) install SIGSEGV handler that saves a copy of offending queue file], AC_DEFINE(DEBUG_LINK,1,[Save queue files that caused SEGV])) : ${DEFAULT_CONFIG=/usr/local/etc/zmscanner.conf} AC_ARG_WITH(config, [ --with-config=LOC location for the config file [[/usr/local/etc/zmscanner.conf]]], [ DEFAULT_CONFIG=$withval ]) AC_SUBST(DEFAULT_CONFIG)dnl AC_DEFINE_UNQUOTED(DEFAULT_CONFIG,"$DEFAULT_CONFIG", [Default path to config file])dnl : ${PLUGINS="breakzmsg breakrfc822 breakbody breakhdr breakhdr_ct breakhdr_cte\ decode_qp decode_b64 check_ct dispatch_ct"} AC_ARG_WITH(plugins, [ --with-plugins=LIST list of internal plugins [[breakzmsg breakrfc822 breakrfc822 breakbody decode_qp decode_b64 breakhdr breakhdr_ct breakhdr_cte check_ct dispatch_ct]]], PLUGINS="$withval") for f in $PLUGINS; do PLUG_SRC="$PLUG_SRC $f.c" PLUG_OBJ="$PLUG_OBJ $f.lo" done AC_SUBST(PLUGINS) AC_SUBST(PLUG_SRC) AC_SUBST(PLUG_OBJ) AC_ARG_ENABLE(pthreads, [ --disable-pthreads do not use pthreads even if they are present]) 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(CVS2CL, cvs2cl.pl, cvs2cl.pl)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 dnl Checks for libraries. AC_CHECK_LIB(socket, socket) if test "X$enable_pthreads" != "Xno"; then AC_CHECK_LIB(pthread, pthread_create) AC_CHECK_FUNCS(pthread_create) fi if test x$ac_cv_func_pthread_create = xyes; then AC_DEFINE(_REENTRANT,1,[need to define this for threaded build]) pthreads=yes else pthreads=no 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) AC_CHECK_HEADERS(sys/socket.h sys/mman.h sys/select.h regex.h) AC_CHECK_HEADERS(dlfcn.h link.h) dnl do not use termios. Change this if you want truly interactive zmsctl. dnl AC_CHECK_HEADERS(termios.h) AC_MSG_CHECKING([whether optarg is defined in headers]) AC_CACHE_VAL(ac_cv_optarg_defined, [AC_TRY_COMPILE([ #include #ifdef STDC_HEADERS #include #endif #ifdef HAVE_UNISTD_H #include #endif ], [ char *xxx; xxx=optarg; ], ac_cv_optarg_defined=yes, ac_cv_optarg_defined=no)])dnl AC_MSG_RESULT($ac_cv_optarg_defined) if test X$ac_cv_optarg_defined = Xyes; then AC_DEFINE(OPTARG_DEFINED,1,[whether optarg variable is defined]) fi dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIGNAL AC_TYPE_SIZE_T AC_TYPE_UID_T dnl Checks for library functions. AC_CHECK_FUNCS(socket select syslog setsid mmap cfmakeraw regcomp) AC_REPLACE_FUNCS(getopt strerror strlcpy) AC_FUNC_SETPGRP AC_CHECK_LIB(dl, dlopen) AC_CHECK_FUNCS(dlopen) if test x$ac_cv_func_dlopen = xyes; then dso=yes else dso=no fi if test x$ac_cv_func_socket != xyes; then AC_MSG_ERROR([Cannot work without BSD sockets!]) fi if test x$ac_cv_func_select != xyes; then AC_MSG_ERROR([Cannot work without select() function!]) fi AC_CONFIG_FILES([Makefile inc/Makefile lib/Makefile \ plugins/Makefile daemon/Makefile \ tests/Makefile tests/test.conf tests/try], [test -f tests/try && chmod +x tests/try]) AC_OUTPUT AC_MSG_RESULT([]) AC_MSG_RESULT([Default config file location: $DEFAULT_CONFIG]) AC_MSG_RESULT([Using pthreads: $pthreads]) AC_MSG_RESULT([Dynamically loaded modules: $dso]) AC_MSG_RESULT([Static plugins: $PLUGINS]) if test x$ac_cv_func_mmap != xyes; then AC_MSG_RESULT([ *** mmap() not present, zmscanner may be harmful for your system ***]) fi AC_MSG_RESULT([])