# $Id: configure.in,v 1.8 2002/04/12 19:05:29 coar Exp $ AC_INIT(autoresponder.in) # # Our own macros. # sinclude(acinclude.m4) MP_CONFIGURE_COMMAND(CONFIGURE_CMDLINE) AC_SUBST(CONFIGURE_CMDLINE) MP_CONFIG_NICE(config.nice) # # Checks for strings. # AC_MSG_CHECKING(package version) PACKAGE_VERSION=`grep -i 'Package version:' MANIFEST | cut -d: -f2 | sed -e 's,[ \t],,g;'` PACKAGE_VERSION=`eval echo ${PACKAGE_VERSION}` AC_MSG_RESULT(${PACKAGE_VERSION}) AC_SUBST(PACKAGE_VERSION) # # Figure out the files that are part of the distribution. # PACKAGE_FILES=`sed -e '1,/Package files:/d ; /^#$/,$d' < MANIFEST | sed -e 's/^# *//g;'` PACKAGE_FILES=`eval echo ${PACKAGE_FILES}` AC_SUBST(PACKAGE_FILES) # # Checks for programs. # AC_PROG_INSTALL AC_PATH_PROG(PERL, perl, "NOT-FOUND") if test "x${ac_cv_path_PERL}" = "xNOT-FOUND" ; then AC_MSG_ERROR(Perl interpreter not found; unable to continue) fi AC_SUBST(PERL) AC_PATH_PROG(SENDMAIL, sendmail) AC_SUBST(SENDMAIL) # # Check options # default="no" AC_ARG_ENABLE(history, [ --enable-history Enable one-autoreply-per-time-t handling], [ if test "$enableval" = "no" ; then AC_MSG_RESULT(no) else AC_MSG_RESULT(yes) fi ], [ AC_MSG_RESULT($default) enableval=$default ]) ENABLE_HISTORY=$enableval if test "$ENABLE_HISTORY" = "yes" ; then OPTION_HISTORY="1" else OPTION_HISTORY="0" fi AC_SUBST(OPTION_HISTORY) # # Check for necessary Perl modules. # MP_REQUIRED_MODULES="POSIX MIME::Parser Getopt::Long MIME::Base64 Fcntl" if test "$ENABLE_HISTORY" = "yes" ; then MP_REQUIRED_MODULES="$MP_REQUIRED_MODULES SDBM_File Mail::Address" fi MP_PERL_MODULE(${MP_REQUIRED_MODULES}) if test "x${mp_missing_pm}" != "x" ; then AC_MSG_WARN(Missing required Perl module(s): ${mp_missing_pm}) fi AC_OUTPUT(autoresponder Makefile) # # All done, say what we did. # B=`eval echo ${bindir}` ; B=`eval echo ${B}` M=`eval echo ${mandir}` ; M=`eval echo ${M}` S=`eval echo ${ac_cv_path_SENDMAIL}` ; S=`eval echo ${S}` echo "" echo "autoresponder has been configured with the following options." echo "" echo " User binaries: ${B}" echo " Man pages: ${M}" echo " sendmail: ${S}" echo " Perl interpreter location: ${ac_cv_path_PERL}" FL= for file in ${PACKAGE_FILES} ; do if test -z "$FL" ; then echo " Files in distribution: ${file}" else echo " ${file}" fi FL="${FL} ${file}" done echo "" if test "x${mp_missing_pm}" != "x" ; then echo "autoresponder requires the following Perl module(s):" echo "" echo " ${MP_REQUIRED_MODULES}" echo "" echo "configure was unable to find the following on your system:" echo "" echo " ${mp_missing_pm}" echo "" echo "You will need to install the missing module(s) before the" echo "package will run." echo "" fi echo "Now run 'make install'."