# Copyright (C) 2002-2003 Stanislav Sinyagin # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # $Id: configure.ac,v 1.1 2004/05/16 01:28:15 ssinyagin Exp $ # Stanislav Sinyagin # AC_INIT([rrdman],[1.0.1],[ssinyagin@users.sourceforge.net]) AC_CONFIG_AUX_DIR(conftools) AC_CANONICAL_HOST AM_INIT_AUTOMAKE(1.6) dnl where we install our stuff ... AC_ARG_ENABLE(allchecks, [AC_HELP_STRING([--disable-allchecks], [Disable all checks (for packaging only)])], [],[]) ##### if test "$enable_allchecks" != "no"; then AC_PATH_PROG(PERL, perl, no) AC_PATH_PROG(SED, sed, no) perllibdirs="\'\${libdir}\'" find_rrdtool () { if ${PERL} -e 'use RRDs' 2>/dev/null; then :; else AC_MSG_NOTICE([RRDs.pm is not in default Perl search paths.]) AC_MSG_CHECKING([RRDtool in /usr/local/rrdtool*]) with_rrdtool=`ls -1dr /usr/local/rrdtool* | head -1` if test -d $with_rrdtool; then AC_MSG_RESULT([${with_rrdtool}]) else AC_MSG_ERROR([Cannot find RRDtool]) fi test_rrdtool fi } test_rrdtool () { if test ! -r ${with_rrdtool}/lib/perl/RRDs.pm; then AC_MSG_ERROR([There is no lib/perl/RRDs.pm in ${with_rrdtool}]) fi perllibdirs=${perllibdirs}"\,\'"${with_rrdtool}"/lib/perl/\'" } AC_ARG_WITH(rrdtool, [AS_HELP_STRING(--with-rrdtool=DIR,RRDTool location)], test_rrdtool, find_rrdtool) AC_SUBST(perllibdirs, [${perllibdirs}]) fi # "$enable_allchecks" != "no" ##### AC_CONFIG_FILES([Makefile perlbin/Makefile doc/Makefile]) AC_CONFIG_FILES([substvars.sh], [chmod +x substvars.sh]) AC_SUBST(VERSION) AC_OUTPUT