summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-02-20 23:28:50 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-02-20 23:28:50 +0000
commita95cb0aa60de9afad5129b7fd76a4eb79a8e65f5 (patch)
treecca8d1c8d3c44b4f36d1a370dab995941a76cde9
parent141b4490b250f9634a8d3b42c2cf4738bc3a2924 (diff)
downloadirssi-a95cb0aa60de9afad5129b7fd76a4eb79a8e65f5.zip
Initial Perl support.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@126 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--acconfig.h1
-rw-r--r--configure.in51
2 files changed, 50 insertions, 2 deletions
diff --git a/acconfig.h b/acconfig.h
index e69d99c1..6ee62c3f 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -19,6 +19,7 @@
#undef HAVE_IPV6
#undef HAVE_POPT_H
#undef HAVE_SOCKS_H
+#undef HAVE_PERL
/* macros/curses checks */
#undef HAS_CURSES
diff --git a/configure.in b/configure.in
index 3ff146ff..b368be16 100644
--- a/configure.in
+++ b/configure.in
@@ -116,6 +116,19 @@ AC_ARG_WITH(plugins,
fi,
want_plugins=yes)
+AC_ARG_ENABLE(perl,
+[ --enable-perl Enable Perl scripting],
+ if test x$withval = xyes; then
+ want_perl=yes
+ else
+ if test "x$withval" = xno; then
+ want_perl=no
+ else
+ want_perl=yes
+ fi
+ fi,
+ want_perl=yes)
+
AC_ARG_WITH(servertest,
[ --with-servertest Build servertest],
if test x$withval = xyes; then
@@ -330,6 +343,30 @@ else
has_curses=false
fi
+AC_PATH_PROG(sedpath, sed)
+if test "$want_perl" = yes; then
+ AC_PATH_PROG(perlpath, perl)
+ AC_MSG_CHECKING(for Perl compile flags)
+ PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
+ if test "_$PERL_CFLAGS" = _ ; then
+ AC_MSG_RESULT([not found, building without perl.])
+ want_perl=no
+ else
+ PERL_LDFLAGS=`$perlpath -MExtUtils::Embed -e ldopts |$sedpath 's/-lgdbm //'`
+ PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-ldb //'`
+ PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lndbm //'`
+ if test "$system" = "Linux"; then
+ PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lnsl //'`
+ PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lposix //'`
+ fi
+ PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lc //'`
+ AC_MSG_RESULT(ok)
+ AC_SUBST(PERL_CFLAGS)
+ AC_SUBST(PERL_LDFLAGS)
+ AC_DEFINE(HAVE_PERL)
+ fi
+fi
+
dnl ** check what we want to build
AM_CONDITIONAL(BUILD_GNOMEUI, test "x$GUI_LIBS" != "x")
AM_CONDITIONAL(BUILD_TEXTUI, test "$want_textui" = "yes")
@@ -339,6 +376,7 @@ AM_CONDITIONAL(BUILD_SERVERTEST, test "$want_servertest" = "yes")
AM_CONDITIONAL(HAVE_GNOME, test "$want_gnome" = "yes")
AM_CONDITIONAL(HAVE_GNOME_PANEL, test "$want_gnome_panel" = "yes")
AM_CONDITIONAL(HAVE_MYSQL, test "$want_mysql" = "yes")
+AM_CONDITIONAL(HAVE_PERL, test "$want_perl" = "yes")
AC_SUBST(MYSQL_LIBS)
@@ -396,15 +434,23 @@ plugins/proxy/Makefile
plugins/external/Makefile
plugins/bot/Makefile
plugins/sql/Makefile
+plugins/perl/Makefile.PL
stamp.h
irssi.spec)
+dnl ** build actual the Makefile for Perl plugin
+if test "x$want_perl" = "xyes"; then
+ cd plugins/perl
+ $perlpath Makefile.PL
+ cd ../..
+fi
+
echo
if test "x$GUI_LIBS" != "x"; then
- echo Building GTK frontend ...... : yes
+ echo Building GTK frontend ...... : yes
else
- echo Building GTK frontend ...... : no
+ echo Building GTK frontend ...... : no
fi
echo Building with GNOME ........ : $want_gnome
echo Building with GNOME panel .. : $want_gnome_panel
@@ -412,5 +458,6 @@ echo Building with GNOME panel .. : $want_gnome_panel
echo Building text frontend ..... : $want_textui
echo Building irssi-bot ......... : $want_irssibot
echo Building with IPv6 support . : $want_ipv6
+echo Building with Perl support . : $want_perl
echo Install prefix ............. : $prefix