summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2d39c0c)
raw | patch | inline | side by side (parent: 2d39c0c)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 28 Jun 2005 21:03:20 +0000 (21:03 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 28 Jun 2005 21:03:20 +0000 (21:03 +0000) |
* make the perl module compilation environement configurable -- Stan Sinyagin ssinyagin on yahoo.com
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@649 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@649 a5681a0c-68f1-0310-ab6d-d61299d08faa
index e939dc7663695c9c9792720d12308801e7a79c7a..d68bb4b114ab053535ac5e052ce0929513e2639c 100644 (file)
-SUBDIRS = tcl python
+
+if BUILD_TCL
+SUB_tcl = tcl
+endif
+
+if BUILD_PYTHON
+SUB_python = python
+endif
+
+SUBDIRS = $(SUB_tcl) $(SUB_python)
+
# the following files are not mentioned in any other Makefile
EXTRA_DIST = perl-piped/MANIFEST perl-piped/README perl-piped/Makefile.PL perl-piped/RRDp.pm perl-piped/t/base.t \
perl-shared/ntmake.pl perl-shared/MANIFEST perl-shared/README perl-shared/Makefile.PL perl-shared/RRDs.pm perl-shared/RRDs.xs perl-shared/t/base.t
index 6510f1e56eca9ca1eb1c27c324e38f185013270e..f89e92c230ae077571d22785c82c6c5e8b0c8db9 100644 (file)
#pythondir = $(pyexecdir)/python@PYTHON_VERSION@/site-packages
-if BUILD_PYTHON
-
python_PROGRAMS = rrdtoolmodule.so
rrdtoolmodule_so_LDFLAGS = -module -shared
clean:
rm -rf build
-endif
index e31daa8594e160598b3105f3796280c634bac4d5..9931975f718a50f0f241ebda7f1109f984b6b024 100644 (file)
pkglibdir = @TCL_PACKAGE_DIR@
-if BUILD_TCL
-
# Automake doen't like `tclrrd$(VERSION)$(TCL_SHLIB_SUFFIX)' as
# library name. So we build and install this library `by hand'.
#
@$(NORMAL_INSTALL)
$(INSTALL_PROGRAM) $(TCL_RRD_LIB) $(DESTDIR)$(libdir)/$(TCL_RRD_LIB)
-endif
-
-diff:
- cd .. ; diff -c -u -r -N --exclude Makefile --exclude html --exclude doc --exclude Makefile.in --exclude Makefile.old --exclude perl --exclude aclocal.m4 --exclude configure rrdtool-1.0.13 rrdtool-1.0.13-ibr > rrdtool-1.0.13-ibr.patch
-
-
diff --git a/program/configure.ac b/program/configure.ac
index 2647dce389e5b4b70bb1b76c3f1e3d522857113f..03c920f7f328c9021018ce7473907384c1976c83 100644 (file)
--- a/program/configure.ac
+++ b/program/configure.ac
[],[enable_perl=yes])
+AC_ARG_VAR(PERLCC, [[] C compiler for Perl modules])
+AC_ARG_VAR(PERLCCFLAGS, [[] CC flags for Perl modules])
+AC_ARG_VAR(PERLLD, [[same as PERLCC] Linker for Perl modules])
+AC_ARG_VAR(PERLLDFLAGS, [[] LD flags for Perl modules])
+
if test "x$PERL" = "xno" -o x$enable_perl = xno; then
COMP_PERL=
else
AC_MSG_CHECKING(for the perl version you are running)
PERL_VERSION=`$PERL -MConfig -e 'print $Config{version}'`
AC_MSG_RESULT($PERL_VERSION)
- AC_MSG_CHECKING(for the C compiler perl wants to use to build its modules)
- perlcc=`$PERL -MConfig -e 'print $Config{cc}'`
- AC_MSG_RESULT($perlcc)
- if test ! -x "$perlcc"; then
- AC_PATH_PROG(PERLCC, "${perlcc}", no)
- if test "$PERLCC" = "no"; then
- AC_MSG_WARN([
-I would not find the Compiler ($perlcc) that was originally used to compile your
-perl binary. You should either make sure that this compiler is available on your
-system, or use a different perl setup that was compiled with $CC.
-
-I will disable the compilation of the RRDs perl module.
+ if test -z "$PERLCC"; then
+ AC_MSG_CHECKING(for the C compiler perl wants to use to build its modules)
+ perlcc=`$PERL -MConfig -e 'print $Config{cc}'`
+ AC_MSG_RESULT($perlcc)
+ if test ! -x "$perlcc"; then
+ AC_PATH_PROG(PERL_CC, "${perlcc}", no)
+ if test "$PERL_CC" = "no"; then
+ AC_MSG_WARN([
+I would not find the Compiler ($perlcc) that was originally used to compile
+your perl binary. You should either make sure that this compiler is
+available on your system, pick an other compiler and set PERLCC
+appropriately, or use a different perl setup that was compiled locally.
+
+I will disable the compilation of the RRDs perl module for now.
])
- COMP_PERL="perl_piped"
- fi
+ COMP_PERL="perl_piped"
+ fi
+ fi
fi
fi
AC_MSG_CHECKING(Perl Modules to build)
your perl setup thinks it is best.],
[PERL_MAKE_OPTIONS=],[])
+if test ! -z "$PERLCC"; then
+ PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS CC=$PERLCC"
+
+ if test ! -z "$PERLCCFLAGS"; then
+ PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS CCFLAGS=$PERLCCFLAGS"
+ fi
+
+ if test -z "$PERLLD"; then
+ PERLLD=$PERLCC
+ fi
+ PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS LD=$PERLLD"
+
+ if test ! -z "$PERLLDFLAGS"; then
+ PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS LDFLAGS=$PERLLDFLAGS"
+ fi
+fi
+
AC_ARG_WITH(perl-options,
[ --with-perl-options=[OPTIONS] options to pass on command-line when
generating Makefile from Makefile.PL. If you set this
AC_PATH_PROGS(NROFF, gnroff nroff)
AC_PATH_PROGS(TROFF, groff troff)
+AC_ARG_VAR(RRDDOCDIR, [[DATADIR/doc/PACKAGE-VERSION] Documentation directory])
+if test -z "$RRDDOCDIR"; then
+ RRDDOCDIR='${datadir}/doc/${PACKAGE}-${VERSION}'; fi
+
dnl Does the compiler like -Wall and -pedantic?
if test "$GCC" = "yes"; then
oCFLAGS=$CFLAGS
index c176fad75d20387730ff8da76a2673f0e8773697..83b3753b9b4e94d0b4232a212334644ff504d9b3 100644 (file)
--- a/program/doc/Makefile.am
+++ b/program/doc/Makefile.am
# what should go into the distribution
EXTRA_DIST= $(POD) $(HTML) $(MAN) $(TXT) rrdtool-dump.dtd rrdtool-xport.dtd
-# some install rules if the install pat
-DOCPREFIX:=$(shell echo "@prefix@" | grep rrd >/dev/null || echo "rrdtool-@VERSION@/")
-idocdir = $(prefix)/share/doc/$(DOCPREFIX)txt
+idocdir = $(RRDDOCDIR)/txt
idoc_DATA = $(POD) $(TXT)
-ihtmldir = $(prefix)/share/doc/$(DOCPREFIX)html
+ihtmldir = $(RRDDOCDIR)/html
ihtml_DATA = $(HTML)
imandir = $(mandir)/man1
iman_DATA = $(MAN)
index b10cc2c30af0c8c36b908d88d258c0796c70587f..747ce3d2f16a9438768b66af08d06c2ac55563ac 100644 (file)
EXTRA_DIST = cgi-demo.cgi.in piped-demo.pl.in shared-demo.pl.in \
stripes.pl.in bigtops.pl.in minmax.pl.in 4charts.pl.in
-EXPREFIX:=$(shell echo "@prefix@" | grep rrd >/dev/null || echo "rrdtool-@VERSION@/")
-examplesdir = $(prefix)/$(EXPREFIX)examples
+examplesdir = $(pkgdatadir)/examples
examples_SCRIPTS = cgi-demo.cgi piped-demo.pl shared-demo.pl \
stripes.pl bigtops.pl minmax.pl 4charts.pl