mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Perl works now only as a runtime loadable module
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@656 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
ab2accdb41
commit
17bb7faf2f
@ -8,7 +8,6 @@
|
|||||||
#undef HAVE_IPV6
|
#undef HAVE_IPV6
|
||||||
#undef HAVE_POPT_H
|
#undef HAVE_POPT_H
|
||||||
#undef HAVE_SOCKS_H
|
#undef HAVE_SOCKS_H
|
||||||
#undef HAVE_PERL
|
|
||||||
|
|
||||||
/* macros/curses checks */
|
/* macros/curses checks */
|
||||||
#undef HAS_CURSES
|
#undef HAS_CURSES
|
||||||
|
43
configure.in
43
configure.in
@ -223,34 +223,49 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_PATH_PROG(sedpath, sed)
|
AC_PATH_PROG(sedpath, sed)
|
||||||
if test "$want_perl" = yes; then
|
if test "$want_perl" = "yes"; then
|
||||||
AC_PATH_PROG(perlpath, perl)
|
AC_PATH_PROG(perlpath, perl)
|
||||||
AC_MSG_CHECKING(for Perl compile flags)
|
AC_MSG_CHECKING(for Perl compile flags)
|
||||||
|
|
||||||
PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
|
PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
|
||||||
if test "x$PERL_CFLAGS" = "x"; then
|
if test "x$PERL_CFLAGS" = "x"; then
|
||||||
AC_MSG_RESULT([not found, building without perl.])
|
AC_MSG_RESULT([not found, building without Perl.])
|
||||||
want_perl=no
|
want_perl=no
|
||||||
else
|
else
|
||||||
PERL_LDFLAGS=`$perlpath -MExtUtils::Embed -e ldopts |$sedpath 's/-lgdbm //'`
|
PERL_LDFLAGS="`$perlpath -MExtUtils::Embed -e ldopts` "
|
||||||
|
|
||||||
|
dnl * dynaloader.a -> libperl_dynaloader.la
|
||||||
|
dynaloader=`echo $PERL_LDFLAGS | $sedpath 's/.* \([[^ ]]*\.a\).*/\1/'`
|
||||||
|
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/ [[^ ]]*\.a/ libperl_dynaloader.la/'`
|
||||||
|
|
||||||
|
dnl * remove all database stuffs
|
||||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/-ldb //'`
|
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/-ldb //'`
|
||||||
|
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/-ldbm //'`
|
||||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/-lndbm //'`
|
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/-lndbm //'`
|
||||||
if test "$system" = "Linux"; then
|
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/-lgdbm //'`
|
||||||
|
dnl * nsl is already in ldflags
|
||||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/-lnsl //'`
|
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/-lnsl //'`
|
||||||
|
|
||||||
|
dnl * linux specific ..
|
||||||
|
if echo $host_os | grep -q linux; then
|
||||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/-lposix //'`
|
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/-lposix //'`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl * libc is of course in list already
|
||||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/-lc //'`
|
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/-lc //'`
|
||||||
|
dnl * must not be in LIBADD line
|
||||||
|
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/-rdynamic //'`
|
||||||
|
|
||||||
|
if test "x$dynaloader" = "x"; then
|
||||||
|
AC_MSG_RESULT([error parsing ldopts, building without Perl.])
|
||||||
|
want_perl=no
|
||||||
|
else
|
||||||
AC_MSG_RESULT(ok)
|
AC_MSG_RESULT(ok)
|
||||||
|
|
||||||
AC_SUBST(PERL_CFLAGS)
|
AC_SUBST(PERL_CFLAGS)
|
||||||
AC_SUBST(PERL_LDFLAGS)
|
AC_SUBST(PERL_LDFLAGS)
|
||||||
AC_SUBST(PERL_LIB_DIR)
|
AC_SUBST(PERL_LIB_DIR)
|
||||||
AC_DEFINE(HAVE_PERL)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl ** building from objdir..
|
|
||||||
if test ! -d plugins/perl/xs; then
|
|
||||||
mkdir -p plugins/perl/xs
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -312,7 +327,7 @@ for c in $CHAT_MODULES; do
|
|||||||
echo "void ${c}_core_init(void); void ${c}_core_deinit(void);" >> $file
|
echo "void ${c}_core_init(void); void ${c}_core_deinit(void);" >> $file
|
||||||
if test "x$module_inits" != "x"; then
|
if test "x$module_inits" != "x"; then
|
||||||
echo "$module_inits" | $sedpath -e 's/()/(void)/g' -e 's/ /void /g' >> $file
|
echo "$module_inits" | $sedpath -e 's/()/(void)/g' -e 's/ /void /g' >> $file
|
||||||
echo "$module_deinits" | $sedpath -e 's/[ ]*$//' -e 's/()/(void)/g' -e 's/ /void /g' -e 's/^/void /' >> $file
|
echo "$module_deinits" | $sedpath -e 's/ *$//' -e 's/()/(void)/g' -e 's/ /void /g' -e 's/^/void /' >> $file
|
||||||
fi
|
fi
|
||||||
echo "void ${c}_init(void) { ${c}_core_init(); $module_inits }" >> $file
|
echo "void ${c}_init(void) { ${c}_core_init(); $module_inits }" >> $file
|
||||||
echo "void ${c}_deinit(void) { $module_deinits ${c}_core_deinit(); }" >> $file
|
echo "void ${c}_deinit(void) { $module_deinits ${c}_core_deinit(); }" >> $file
|
||||||
@ -322,7 +337,7 @@ for c in $CHAT_MODULES; do
|
|||||||
echo "/* this file is automatically generated by configure - don't change */" > $file
|
echo "/* this file is automatically generated by configure - don't change */" > $file
|
||||||
if test "x$fe_module_inits" != "x"; then
|
if test "x$fe_module_inits" != "x"; then
|
||||||
echo "$fe_module_inits" | $sedpath -e 's/()/(void)/g' -e 's/ /void /g' >> $file
|
echo "$fe_module_inits" | $sedpath -e 's/()/(void)/g' -e 's/ /void /g' >> $file
|
||||||
echo "$fe_module_deinits" | $sedpath -e 's/[ ]*$//' -e 's/()/(void)/g' -e 's/ /void /g' -e 's/^/void /' >> $file
|
echo "$fe_module_deinits" | $sedpath -e 's/ *$//' -e 's/()/(void)/g' -e 's/ /void /g' -e 's/^/void /' >> $file
|
||||||
fi
|
fi
|
||||||
echo "void fe_${c}_modules_init(void) { $fe_module_inits }" >> $file
|
echo "void fe_${c}_modules_init(void) { $fe_module_inits }" >> $file
|
||||||
echo "void fe_${c}_modules_deinit(void) { $fe_module_deinits }" >> $file
|
echo "void fe_${c}_modules_deinit(void) { $fe_module_deinits }" >> $file
|
||||||
@ -408,6 +423,12 @@ if test "x$want_perl" = "xyes"; then
|
|||||||
ln -sf $file `echo $file|sed "s?$whole_dir/??"`
|
ln -sf $file `echo $file|sed "s?$whole_dir/??"`
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
if test ! -d src/perl/.libs; then
|
||||||
|
mkdir -p src/perl/.libs
|
||||||
|
fi
|
||||||
|
if test ! -L src/perl/.libs/DynaLoader.a; then
|
||||||
|
ln -s $dynaloader src/perl/.libs/DynaLoader.a
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -15,7 +15,6 @@ irssi_DEPENDENCIES = @COMMON_LIBS@
|
|||||||
irssi_LDADD = \
|
irssi_LDADD = \
|
||||||
@COMMON_LIBS@ \
|
@COMMON_LIBS@ \
|
||||||
$(PROG_LIBS) \
|
$(PROG_LIBS) \
|
||||||
$(PERL_LDFLAGS) \
|
|
||||||
$(CURSES_LIBS)
|
$(CURSES_LIBS)
|
||||||
|
|
||||||
irssi_SOURCES = \
|
irssi_SOURCES = \
|
||||||
|
@ -46,11 +46,6 @@ void irc_deinit(void);
|
|||||||
void mainwindow_activity_init(void);
|
void mainwindow_activity_init(void);
|
||||||
void mainwindow_activity_deinit(void);
|
void mainwindow_activity_deinit(void);
|
||||||
|
|
||||||
#ifdef HAVE_PERL
|
|
||||||
void irssi_perl_init(void);
|
|
||||||
void irssi_perl_deinit(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static GMainLoop *main_loop;
|
static GMainLoop *main_loop;
|
||||||
int quitting;
|
int quitting;
|
||||||
|
|
||||||
@ -110,9 +105,6 @@ static void textui_finish_init(void)
|
|||||||
fe_common_core_finish_init();
|
fe_common_core_finish_init();
|
||||||
fe_common_irc_finish_init();
|
fe_common_irc_finish_init();
|
||||||
|
|
||||||
#ifdef HAVE_PERL
|
|
||||||
irssi_perl_init();
|
|
||||||
#endif
|
|
||||||
signal_emit("irssi init finished", 0);
|
signal_emit("irssi init finished", 0);
|
||||||
|
|
||||||
screen_refresh_thaw();
|
screen_refresh_thaw();
|
||||||
@ -124,9 +116,6 @@ static void textui_deinit(void)
|
|||||||
signal(SIGINT, SIG_DFL);
|
signal(SIGINT, SIG_DFL);
|
||||||
|
|
||||||
signal_remove("gui exit", (SIGNAL_FUNC) sig_exit);
|
signal_remove("gui exit", (SIGNAL_FUNC) sig_exit);
|
||||||
#ifdef HAVE_PERL
|
|
||||||
irssi_perl_deinit();
|
|
||||||
#endif
|
|
||||||
gui_textwidget_deinit();
|
gui_textwidget_deinit();
|
||||||
gui_special_vars_deinit();
|
gui_special_vars_deinit();
|
||||||
statusbar_deinit();
|
statusbar_deinit();
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
noinst_LIBRARIES = libperl.a
|
moduledir = $(libdir)/irssi/modules
|
||||||
|
module_LTLIBRARIES = libirssi_perl.la
|
||||||
|
|
||||||
irssi-perl.c: perl-signals.h
|
irssi-perl.c: perl-signals.h
|
||||||
|
|
||||||
@ -8,7 +9,7 @@ INCLUDES = $(GLIB_CFLAGS) \
|
|||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/src/core
|
-I$(top_srcdir)/src/core
|
||||||
|
|
||||||
libperl_a_SOURCES = \
|
libirssi_perl_la_SOURCES = \
|
||||||
irssi-perl.c \
|
irssi-perl.c \
|
||||||
xsinit.c
|
xsinit.c
|
||||||
|
|
||||||
@ -16,6 +17,7 @@ perl-signals.h: $(top_srcdir)/docs/signals.txt $(srcdir)/get-signals.pl
|
|||||||
cat $(top_srcdir)/docs/signals.txt | $(perlpath) $(srcdir)/get-signals.pl > perl-signals.h
|
cat $(top_srcdir)/docs/signals.txt | $(perlpath) $(srcdir)/get-signals.pl > perl-signals.h
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
|
libperl_dynaloader.la \
|
||||||
get-signals.pl \
|
get-signals.pl \
|
||||||
xs/Irssi-bans.xs \
|
xs/Irssi-bans.xs \
|
||||||
xs/Irssi-channel.xs \
|
xs/Irssi-channel.xs \
|
||||||
@ -47,3 +49,5 @@ all-local:
|
|||||||
|
|
||||||
install-exec-local:
|
install-exec-local:
|
||||||
cd xs && make install && cd ..
|
cd xs && make install && cd ..
|
||||||
|
|
||||||
|
libirssi_perl_la_LIBADD = $(PERL_LDFLAGS)
|
||||||
|
25
src/perl/libperl_dynaloader.la
Normal file
25
src/perl/libperl_dynaloader.la
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# libsilc.la - a libtool library file
|
||||||
|
# Generated by ltmain.sh - GNU libtool 1.3.5 (1.385.2.206 2000/05/27 11:12:27)
|
||||||
|
|
||||||
|
# The name that we can dlopen(3).
|
||||||
|
dlname=''
|
||||||
|
|
||||||
|
# Names of this library.
|
||||||
|
library_names=''
|
||||||
|
|
||||||
|
# The name of the static archive.
|
||||||
|
old_library='DynaLoader.a'
|
||||||
|
|
||||||
|
# Libraries that this one depends upon.
|
||||||
|
dependency_libs=''
|
||||||
|
|
||||||
|
# Version information for libsilc.
|
||||||
|
current=0
|
||||||
|
age=0
|
||||||
|
revision=0
|
||||||
|
|
||||||
|
# Is this an already installed library?
|
||||||
|
installed=no
|
||||||
|
|
||||||
|
# Directory that this library needs to be installed in:
|
||||||
|
libdir=''
|
Loading…
Reference in New Issue
Block a user