Skip to content

Commit

Permalink
collector: Integrate Perl MakeMaker system with configure script.
Browse files Browse the repository at this point in the history
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
  • Loading branch information
Jesper Dangaard Brouer committed May 6, 2011
1 parent 8ecf712 commit 559b81e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Expand Up @@ -8,7 +8,7 @@ ACLOCAL_AMFLAGS = -I m4

# Adding to SUBDIRS will automatically call/invoke the Makefile in
# these dirs
SUBDIRS = iptables-module
SUBDIRS = iptables-module collector

#man_MANS := xtables-addons.8

Expand Down
27 changes: 24 additions & 3 deletions configure.ac
Expand Up @@ -156,6 +156,12 @@ elif test \( "$kmajor" -lt 2 -o "$kminor" -lt 6 -o "$kmicro" -lt 28 \); then
exit 1;
fi;

# Need perl for the iptv-collector daemon
AC_PATH_PROG([PERL], [perl], [no])
if [[ "$PERL" = "no" ]]; then
AC_MSG_ERROR([Cannot find perl - You need to install perl to run collector])
fi

AC_SUBST([regular_CFLAGS])
AC_SUBST([kbuilddir])
AC_SUBST([xtlibdir])
Expand All @@ -167,11 +173,26 @@ AC_CONFIG_FILES([
collector/lib/IPTV/Analyzer/Version.pm
])

#
# $prefix expand for perl collector
PERL_PREFIX="";
if [[ "${prefix}" != "NONE" ]]; then
PERL_PREFIX="PREFIX=$prefix"
fi

AC_OUTPUT

# TODO: Should we call collectors 'perl Makefile.PL' from here?
# This ways it would look like its part of the ./configure call
# (remember to pass $prefix parameter along)
# Configure the iptv-collector
#
# Which is based upon Perl MakeMaker system. To integrate, call the
# MakeMaker system, from the configure script.
#
# Remember to pass $prefix parameter along
echo " Processing Collector Daemon"
echo " -- Calling Perl MakeMaker system"
cd collector
${PERL} Makefile.PL $PERL_PREFIX
cd ..

echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-"
echo " Visit the project homepage at:"
Expand Down

0 comments on commit 559b81e

Please sign in to comment.