]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Moved contrib/PerlLib/ to bindings/perl/.
authorSebastian Harl <sh@tokkee.org>
Sun, 30 Sep 2007 22:08:43 +0000 (00:08 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Mon, 1 Oct 2007 05:46:51 +0000 (07:46 +0200)
Added bindings/Makefile.am and bindings/perl/Collectd/Makefile.PL,
bindings/perl/Makefile.PL to integrate the Perl modules into the build
system and the official distribution.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Makefile.am
bindings/Makefile.am [new file with mode: 0644]
bindings/perl/Collectd.pm [moved from contrib/PerlLib/Collectd.pm with 100% similarity]
bindings/perl/Collectd/Makefile.PL [new file with mode: 0644]
bindings/perl/Collectd/Unixsock.pm [moved from contrib/PerlLib/Collectd/Unixsock.pm with 100% similarity]
bindings/perl/Makefile.PL [new file with mode: 0644]
configure.in

index 34c36cc0d0d8e66e3e7ab99158847827c03e3036..dfef7dd4f786146b54e8a7fab45578cc84d94386 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = libltdl src
+SUBDIRS = libltdl src bindings
 
 INCLUDES = $(LTDLINCL)
 
diff --git a/bindings/Makefile.am b/bindings/Makefile.am
new file mode 100644 (file)
index 0000000..37e31ea
--- /dev/null
@@ -0,0 +1,18 @@
+EXTRA_DIST = perl/Collectd.pm perl/Makefile.PL perl/Collectd/Makefile.PL perl/Collectd/Unixsock.pm
+
+all-local: @PERL_BINDINGS@
+
+install-exec-local:
+       [ ! -f perl/Makefile ] || $(MAKE) -C perl install
+
+clean-local:
+       [ ! -f perl/Makefile ] || $(MAKE) -C perl realclean
+
+perl: perl/Makefile
+       $(MAKE) -C perl
+
+perl/Makefile: perl/Makefile.PL perl/Collectd/Makefile.PL
+       cd perl && @PERL@ Makefile.PL PREFIX=$(prefix) @PERL_BINDINGS_OPTIONS@
+
+.PHONY: perl
+
diff --git a/bindings/perl/Collectd/Makefile.PL b/bindings/perl/Collectd/Makefile.PL
new file mode 100644 (file)
index 0000000..be0ec91
--- /dev/null
@@ -0,0 +1,9 @@
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+       'NAME'          => 'Collectd::Unixsock',
+       'VERSION'       => '4.1.2',
+       'AUTHOR'        => 'Florian Forster <octo@verplant.org>',
+);
+
+# vim: set sw=4 ts=4 tw=78 noexpandtab :
diff --git a/bindings/perl/Makefile.PL b/bindings/perl/Makefile.PL
new file mode 100644 (file)
index 0000000..fab2dae
--- /dev/null
@@ -0,0 +1,9 @@
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+       'NAME'          => 'Collectd',
+       'VERSION'       => '4.1.2',
+       'AUTHOR'        => 'Sebastian Harl <sh@tokkee.org>',
+);
+
+# vim: set sw=4 ts=4 tw=78 noexpandtab :
index 54d38d5882d3bc1c666c7f0e1d134b2fbb4f7ae4..f67186edd8bf04937a43fc8110a1b4b7ff27300c 100644 (file)
@@ -1145,6 +1145,9 @@ AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to l
 [
        with_libperl="yes"
 ])
+
+AC_SUBST(PERL, "$perl_interpreter")
+
 if test "x$with_libperl" = "xyes"
 then
   SAVE_CFLAGS=$CFLAGS
@@ -1817,7 +1820,29 @@ AC_PLUGIN([vserver],     [$plugin_vserver],    [Linux VServer statistics])
 AC_PLUGIN([wireless],    [$plugin_wireless],   [Wireless statistics])
 AC_PLUGIN([xmms],        [$with_libxmms],      [XMMS statistics])
 
-AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile)
+dnl Perl bindings
+AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
+[
+       if test "x$withval" != "xno" && test "x$withval" != "xyes"
+       then
+               PERL_BINDINGS_OPTIONS="$withval"
+               with_perl_bindings="yes"
+       fi
+],
+[
+       PERL_BINDINGS_OPTIONS=""
+       with_perl_bindings="yes"
+])
+if test "x$with_perl_bindings" = "xyes"
+then
+       PERL_BINDINGS="perl"
+else
+       PERL_BINDINGS=""
+fi
+AC_SUBST(PERL_BINDINGS)
+AC_SUBST(PERL_BINDINGS_OPTIONS)
+
+AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile bindings/Makefile)
 
 if test "x$with_liboping" = "xyes" -a "x$with_own_liboping" = "xyes"
 then
@@ -1826,11 +1851,16 @@ fi
 
 if test "x$with_libperl" = "xyes"
 then
-       with_libperl="yes (version `perl -MConfig -e 'print $Config{version};'`)"
+       with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
 else
        enable_perl="no (needs libperl)"
 fi
 
+if test "x$with_perl_bindings" = "xyes" -a "x$PERL_BINDINGS_OPTIONS" != "x"
+then
+       with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
+fi
+
 cat <<EOF;
 
 Configuration:
@@ -1858,6 +1888,9 @@ Configuration:
     daemon mode . . . . $enable_daemon
     debug . . . . . . . $enable_debug
 
+  Bindings:
+    perl  . . . . . . . $with_perl_bindings
+
   Modules:
     apache  . . . . . . $enable_apache
     apcups  . . . . . . $enable_apcups