diff options
author | Tobias Oetiker <tobi@oetiker.ch> | 2011-10-30 11:32:45 +0100 |
---|---|---|
committer | Tobias Oetiker <tobi@oetiker.ch> | 2011-10-30 11:32:45 +0100 |
commit | b061046f26e01821761ce7381f5782bc629dda17 (patch) | |
tree | 074610d8143052c614b3a758dd9a738dbf0d1d1a | |
parent | 677f0b4d837b4b040d085aedce6f09120a912cdf (diff) | |
parent | 89f91c4e71fa85bc992cabe001da01d762770fdd (diff) | |
download | smokeping-b061046f26e01821761ce7381f5782bc629dda17.tar.gz smokeping-b061046f26e01821761ce7381f5782bc629dda17.tar.xz |
Merge pull request #4 from twilde/master
Automatically configure config.dist paths
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | etc/config.dist.in (renamed from etc/config.dist) | 16 |
3 files changed, 13 insertions, 15 deletions
@@ -14,3 +14,4 @@ doc/*.[1-9] doc/smokeping_config.pod doc/smokeping_examples.pod doc/smokeping_install.txt +etc/config.dist diff --git a/configure.ac b/configure.ac index 2ff9ff3..d1e2efc 100644 --- a/configure.ac +++ b/configure.ac @@ -39,6 +39,7 @@ AC_PATH_PROG(RM, rm, no) AC_PATH_PROG(RMDIR, rmdir, no) AC_PATH_PROG(MKDIR, mkdir, no) AC_PATH_PROG(FIND, find, no) +AC_PATH_PROG(SENDMAIL, sendmail, /path/to/sendmail, [$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/usr/lib]) AC_PATH_PROGS(NROFF, [gnroff nroff]) AC_ARG_VAR(GMAKE, [Path to local GNU Make binary]) @@ -80,13 +81,9 @@ AC_SUBST(PERL5LIB) mod_ok=1 if test "$enable_pkgonly" != yes; then - prfx=$prefix - if test x$prfx = xNONE; then - prfx=$ac_default_prefix - fi for module in RRDs FCGI CGI CGI::Fast Config::Grammar Digest::HMAC_MD5 LWP; do AC_MSG_CHECKING([checking for perl module '$module']) - if ${PERL} -I$prfx/thirdparty/lib/perl5 -e 'use '$module 2>/dev/null ; then + if ${PERL} -I$prefix/thirdparty/lib/perl5 -e 'use '$module 2>/dev/null ; then AC_MSG_RESULT([Ok]) else AC_MSG_RESULT([Failed]) @@ -107,7 +104,7 @@ if test "$enable_pkgonly" != yes; then Now you can install local copies of the missing modules by running - ./setup/build-perl-modules.sh ${prfx}/thirdparty + ./setup/build-perl-modules.sh ${prefix}/thirdparty The RRDs perl module is part of RRDtool. Either use the rrdtool package provided by your OS or install rrdtool from source. @@ -121,7 +118,7 @@ NOTES fi -AC_CONFIG_FILES([Makefile bin/Makefile doc/Makefile htdocs/Makefile etc/Makefile lib/Makefile]) +AC_CONFIG_FILES([Makefile bin/Makefile doc/Makefile htdocs/Makefile etc/Makefile lib/Makefile etc/config.dist]) AC_SUBST(VERSION) diff --git a/etc/config.dist b/etc/config.dist.in index f641cac..ddae83e 100644 --- a/etc/config.dist +++ b/etc/config.dist.in @@ -3,17 +3,17 @@ owner = Peter Random contact = some@address.nowhere mailhost = my.mail.host -sendmail = /usr/lib/sendmail +sendmail = @SENDMAIL@ # NOTE: do not put the Image Cache below cgi-bin # since all files under cgi-bin will be executed ... this is not # good for images. -imgcache = /home/oetiker/public_html/smokeping-ms/cache +imgcache = @prefix@/cache imgurl = cache -datadir = /tmp/smokeping-ms/data -piddir = /tmp/smokeping-ms/var +datadir = @prefix@/data +piddir = @prefix@/var cgiurl = http://some.url/smokeping.cgi -smokemail = /home/oetiker/checkouts/smokeping/trunk/software/etc/smokemail.dist -tmail = /home/oetiker/checkouts/smokeping/trunk/software/etc/tmail.dist +smokemail = @prefix@/etc/smokemail.dist +tmail = @prefix@/etc/tmail.dist # specify this to get syslog logging syslogfacility = local0 # each probe is now run in its own process @@ -47,7 +47,7 @@ AVERAGE 0.5 144 720 *** Presentation *** -template = /home/oetiker/checkouts/smokeping/trunk/software/etc/basepage.html.dist +template = @prefix@/etc/basepage.html.dist + charts @@ -108,7 +108,7 @@ unison_tolerance = 2 binary = /usr/sbin/fping *** Slaves *** -secrets=/home/oetiker/checkouts/smokeping/trunk/software/etc/smokeping_secrets.dist +secrets=@prefix@/etc/smokeping_secrets.dist +boomer display_name=boomer color=0000ff |