From 9f2402b0d86333f5f7e9d50437036cd3124bde47 Mon Sep 17 00:00:00 2001 From: Tar Committer Date: Fri, 4 Jan 2002 21:31:49 +0000 Subject: Imported from rancid-2.2.tar.gz. --- configure.in | 91 +++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 66 insertions(+), 25 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 698d307..dbd4cfb 100644 --- a/configure.in +++ b/configure.in @@ -1,22 +1,64 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT() -AM_INIT_AUTOMAKE(PACKAGE, VERSION) +AC_PREREQ(2.13) +AC_INIT(CHANGES) -AC_CONFIG_SUBDIRS(bin util) +dnl VERSION needs to be updated such that 'make dist' uses the correct +dnl filename for the directory name and tarball. +VERSION=`sed -n 's/.*version.*"\(.*\)".*/\1/p' $srcdir/include/version.h.in|tr -d ' '` +PACKAGE=`sed -n 's/.*package.*"\(.*\)".*/\1/p' $srcdir/include/version.h.in|tr -d ' '` +AC_SUBST(VERSION) +AC_SUBST(PACKAGE) + +AM_INIT_AUTOMAKE($PACKAGE, $VERSION) + +AM_CONFIG_HEADER(include/config.h) dnl default install location AC_PREFIX_DEFAULT(/usr/local/rancid) -AC_SUBST(PACKAGE) -PACKAGE=rancid +AM_MAINTAINER_MODE() -# VERSION needs to be updated such that 'make dist' uses the correct -# filename for the directory name and tarball. -AC_SUBST(VERSION) -VERSION=2.2b8 +dnl AC_CONFIG_SUBDIRS(bin util) +AC_CONFIG_SUBDIRS(util) -AM_MAINTAINER_MODE() +# make sure MAKE sets ${MAKE} +AC_PATH_PROG(MAKE,gmake,no) +if test $MAKE = no; then + unset ac_cv_path_MAKE + AC_PATH_PROG(MAKE,make,no) + if test $MAKE = no; then + AC_MSG_ERROR([can't locate a make.]) + exit 1 + fi +fi +AC_PROG_MAKE_SET() + +# compiler specifics +AC_PROG_CC +AM_C_PROTOTYPES +AC_PROG_CPP +AC_C_CONST +AC_C_INLINE +AC_C_STRINGIZE + +# check includes/headers +AC_HEADER_STDC +AC_CHECK_HEADERS(limits.h memory.h siginfo.h string.h strings.h unistd.h) + +AC_CHECK_HEADERS(errno.h fcntl.h sys/types.h sys/wait.h) +dnl AC_CHECK_HEADERS(errno.h stdlib.h sys/types.h sys/wait.h) +dnl AC_CHECK_HEADERS(malloc.h) +AC_CHECK_HEADERS(sysexits.h) + +# check functions +AC_CHECK_FUNCS(memcpy memmove memset bcopy bzero strerror strchr strrchr \ + strstr strtok strrtok index rindex) +dnl AC_FUNC_VPRINTF + +# type checks +AC_TYPE_SIGNAL +AC_TYPE_SIZE_T # Check for a preference for using mail addresses like rancid+admin-group # instead of the standard rancid-admin-group @@ -68,17 +110,6 @@ AC_SUBST(DIFF_CMD) AC_PATH_PROG(SENDMAIL,sendmail,no, /usr/sbin:/usr/bin:/usr/lib) -AC_PATH_PROG(MAKE,gmake,no) -if test $MAKE = no; then - unset ac_cv_path_MAKE - AC_PATH_PROG(MAKE,make,no) - if test $MAKE = no; then - AC_MSG_ERROR([can't locate a make.]) - exit 1 - fi -fi -AC_PROG_MAKE_SET() - # Find an appropriate tar for use in "dist" targets. A "best guess" # is good enough -- if we can't find GNU tar, we don't really care. AC_CHECK_PROGS(TAR, gnutar gtar tar) @@ -103,7 +134,7 @@ if test $PERLV_PATH = no; then fi fi AC_SUBST(PERLV_PATH) -ac_cv_PERLV=`basename $PERLV_PATH` +PERLV=`basename $PERLV_PATH` AC_SUBST(PERLV) AC_PATH_PROG(EXPECT_PATH,expect,no) @@ -146,7 +177,7 @@ rd_cv_rd_bin_datas=$RD_BIN_DATAS # RD_BIN_PROGS are bin/ .in's that need to be installed with execute perms. RD_BIN_PROGS="cat5rancid control_rancid \ alogin arancid clogin create_cvs blogin brancid do-diffs elogin erancid \ -flogin francid jlogin jrancid hlogin hrancid par rancid-fe \ +flogin francid jlogin jrancid hlogin hrancid mrancid par rancid-fe \ rancid rename rrancid xrancid" AC_SUBST(RD_BIN_PROGS) rd_cv_rd_bin_progs=$RD_BIN_PROGS @@ -202,8 +233,18 @@ ENV_PATH=`echo $ENV_PATH | $PERLV_PATH -e 'foreach $x(split(":",<>)){next unless ac_cv_env_path=$ENV_PATH AC_SUBST(ENV_PATH) -AC_OUTPUT(Makefile \ - man/Makefile man/env.5 man/lg.conf.5 man/lg_intro.1) +AC_OUTPUT([ Makefile include/Makefile bin/Makefile util/Makefile \ + bin/alogin bin/arancid bin/blogin bin/brancid bin/cat5rancid \ + bin/clogin bin/control_rancid bin/create_cvs bin/do-diffs bin/elogin \ + bin/env bin/erancid bin/flogin bin/francid bin/jlogin bin/jrancid \ + bin/hlogin \ + bin/hrancid bin/mrancid bin/par bin/rancid-fe bin/rancid bin/rename \ + bin/rrancid bin/xrancid \ + man/Makefile man/env.5 man/lg.conf.5 man/lg_intro.1 \ + include/version.h \ + util/rtrfilter util/downreport ], \ + [ chmod a+x bin/*login bin/*rancid bin/par ] + ) # fix permissions on scripts. for file in $progs; do chmod a+x $file; done -- cgit