---
configure.ac | 48 +++++++++++++++++++++++++++++-
extras/wip/filters/filter-perl/Makefile.am | 5 ++--
2 files changed, 49 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index edb6a78..a1755c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1962,6 +1962,7 @@ AC_ARG_WITH([filter-perl],
AC_DEFINE([HAVE_FILTER_PERL], [1],
[Define if you have filter perl])
HAVE_FILTER_PERL=yes
+ need_perl=yes
fi
]
)
@@ -2281,7 +2282,7 @@ AM_CONDITIONAL([HAVE_SCHEDULER_PYTHON], [test
$HAVE_SCHEDULER_PYTHON = yes])
AC_ARG_WITH([python],
- [ --with-python=PATH Specify prefix of python installation ],
+ [ --with-python=PATH Specify prefix of python installation ],
[
if test "x$withval" != "xno" ; then
python_prefix="${withval}"
@@ -2289,6 +2290,15 @@ AC_ARG_WITH([python],
]
)
+AC_ARG_WITH([perl],
+ [ --with-perl=PATH Specify prefix of perl installation ],
+ [
+ if test "x$withval" != "xno" ; then
+ perl_prefix="${withval}"
+ fi
+ ]
+)
+
#
# check for python
#
@@ -2318,6 +2328,35 @@ fi
AC_SUBST([PYTHON_CPPFLAGS])
AC_SUBST([PYTHON_LDFLAGS])
+#
+# check for perl
+#
+PERL_CPPFLAGS=
+PERL_LDFLAGS=
+if test x"${need_perl}" = x"yes"; then
+ PERL_CONFIG=
+ for path in /usr/local/bin /usr/bin; do
+ if test -f ${path}/perl; then
+ PERL_CONFIG=${path}/perl
+ break
+ fi
+ done
+
+ # if perl provided --with-perl, override
+ if test x"${with_perl}" != x""; then
+ PERL_CONFIG="${perl_prefix}/bin/perl"
+ fi
+
+ if ! test -f $PERL_CONFIG; then
+ AC_MSG_ERROR([*** $PERL_CONFIG could not be found, please install or use
--with-perl ***])
+ fi
+
+ PERL_CPPFLAGS="`perl -MExtUtils::Embed -e ccopts`"
+ PERL_LDFLAGS="`perl -MExtUtils::Embed -e ldopts`"
+fi
+AC_SUBST([PERL_CPPFLAGS])
+AC_SUBST([PERL_LDFLAGS])
+
##chl (based on OpenSSL checks, see above)
# Search for libevent
saved_CPPFLAGS="$CPPFLAGS"
@@ -2478,6 +2517,13 @@ if test x"${need_python}" = x"yes"; then
echo "Built with Python support:"
echo " CPPFLAGS: ${PYTHON_CPPFLAGS}"
echo " LDFLAGS: ${PYTHON_LDFLAGS}"
+echo ""
fi
+if test x"${need_perl}" = x"yes"; then
+echo "Built with Perl support:"
+echo " CPPFLAGS: ${PERL_CPPFLAGS}"
+echo " LDFLAGS: ${PERL_LDFLAGS}"
echo ""
+fi
+
diff --git a/extras/wip/filters/filter-perl/Makefile.am
b/extras/wip/filters/filter-perl/Makefile.am
index 464f759..4d58740 100644
--- a/extras/wip/filters/filter-perl/Makefile.am
+++ b/extras/wip/filters/filter-perl/Makefile.am
@@ -6,6 +6,5 @@ pkglibexec_PROGRAMS = filter-perl
filter_perl_SOURCES = $(SRCS)
filter_perl_SOURCES += $(filters_srcdir)/filter-perl/filter_perl.c
-AM_CFLAGS= `perl -MExtUtils::Embed -e ccopts`
-AM_LDFLAGS= `perl -MExtUtils::Embed -e ldopts`
-
+CFLAGS += ${PERL_CPPFLAGS}
+LDFLAGS += ${PERL_LDFLAGS}
--
2.4.2
--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]