summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Wilde <github@krellis.org>2011-10-30 02:54:08 +0200
committerTim Wilde <github@krellis.org>2011-10-30 02:54:08 +0200
commita40ae75d8c76fe578f54cd5afd879de4ae0b744f (patch)
tree8d8e77a9c334b7756fbd04a3741d54617507930e
parent677f0b4d837b4b040d085aedce6f09120a912cdf (diff)
downloadsmokeping-a40ae75d8c76fe578f54cd5afd879de4ae0b744f.tar.gz
smokeping-a40ae75d8c76fe578f54cd5afd879de4ae0b744f.tar.xz
Automatically configure etc/config.dist paths
-rw-r--r--configure.ac11
-rw-r--r--etc/config.dist.in (renamed from etc/config.dist)16
2 files changed, 12 insertions, 15 deletions
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