1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00

Perl compiling updates

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@718 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-10-03 23:54:56 +00:00 committed by cras
parent dcc8d306ac
commit f6a284af37
2 changed files with 36 additions and 18 deletions

View File

@ -262,7 +262,7 @@ if test "$want_perl" != "no"; then
if test "$want_perl" != "static"; then if test "$want_perl" != "static"; then
dnl * find libperl.a so we could dnl * find libperl.a so we could
libperl_a=`echo $PERL_LDFLAGS|$perlpath -e 'foreach (split(/ /, <STDIN>)) { if (/^-L(.*)/ && -f $1."/libperl.a") { print $1."/libperl.a" } };'` LIBPERL_A=`echo $PERL_LDFLAGS|$perlpath -e 'foreach (split(/ /, <STDIN>)) { if (/^-L(.*)/ && -f $1."/libperl.a") { print $1."/libperl.a" } };'`
fi fi
dnl * Perl 5.004 and older use perl_xxx variables while dnl * Perl 5.004 and older use perl_xxx variables while
@ -273,9 +273,9 @@ if test "$want_perl" != "no"; then
fi fi
dnl * don't check dynaloader if libperl.a wasn't found.. dnl * don't check dynaloader if libperl.a wasn't found..
if test "x$libperl_a" != "x"; then if test "x$LIBPERL_A" != "x"; then
dnl * dynaloader.a -> libperl_dynaloader.la dnl * dynaloader.a -> libperl_dynaloader.la
dynaloader=`echo $PERL_LDFLAGS | $sedpath 's/.* \([[^ ]]*\.a\).*/\1/'` DYNALOADER_A=`echo $PERL_LDFLAGS | $sedpath 's/.* \([[^ ]]*\.a\).*/\1/'`
fi fi
dnl * remove all database stuffs dnl * remove all database stuffs
@ -298,21 +298,31 @@ if test "$want_perl" != "no"; then
if test "x$want_perl" = "xstatic"; then if test "x$want_perl" = "xstatic"; then
AC_MSG_RESULT(ok) AC_MSG_RESULT(ok)
elif test "x$dynaloader" = "x"; then elif test "x$DYNALOADER_A" = "x"; then
AC_MSG_RESULT([error parsing ldopts, building Perl into irssi binary instead of as module]) AC_MSG_RESULT([error parsing ldopts, building Perl into irssi binary instead of as module])
want_perl=static want_perl=static
else else
AC_MSG_RESULT(ok) AC_MSG_RESULT(ok)
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/ [[^ ]]*\.a/ libperl_dynaloader.la/'` PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/ [[^ ]]*\.a/ libperl_dynaloader.la/'`
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/ -lperl/ libperl_orig.la/'` PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath 's/ -lperl/ libperl_orig.la/'`
AC_SUBST(LIBPERL_A)
AC_SUBST(DYNALOADER_A)
fi fi
if test "x$want_perl" = "xstatic"; then if test "x$want_perl" = "xstatic"; then
PERL_LDFLAGS="../perl/.libs/libperl.a $PERL_LDFLAGS" PERL_LDFLAGS="../perl/libperl_static.la $PERL_LDFLAGS"
PROG_LIBS="$PROG_LIBS $PERL_LDFLAGS" PROG_LIBS="$PROG_LIBS $PERL_LDFLAGS"
PERL_LDFLAGS= PERL_LDFLAGS=
AC_DEFINE(HAVE_STATIC_PERL) AC_DEFINE(HAVE_STATIC_PERL)
module_lib=
static_lib=libperl_static.la
else
module_lib=libperl.la
static_lib=
fi fi
AC_SUBST(module_lib)
AC_SUBST(static_lib)
AC_SUBST(PERL_LDFLAGS) AC_SUBST(PERL_LDFLAGS)
AC_SUBST(PERL_CFLAGS) AC_SUBST(PERL_CFLAGS)
AC_SUBST(PERL_LIB_DIR) AC_SUBST(PERL_LIB_DIR)
@ -326,6 +336,7 @@ AM_CONDITIONAL(BUILD_IRSSIPROXY, test "$want_irssiproxy" = "yes")
AM_CONDITIONAL(BUILD_PLUGINS, test "$want_plugins" = "yes") AM_CONDITIONAL(BUILD_PLUGINS, test "$want_plugins" = "yes")
AM_CONDITIONAL(BUILD_SERVERTEST, test "$want_servertest" = "yes") AM_CONDITIONAL(BUILD_SERVERTEST, test "$want_servertest" = "yes")
AM_CONDITIONAL(HAVE_PERL, test "$want_perl" != "no") AM_CONDITIONAL(HAVE_PERL, test "$want_perl" != "no")
AM_CONDITIONAL(HAVE_STATIC_PERL, test "$want_perl" = "static")
AC_SUBST(PROG_LIBS) AC_SUBST(PROG_LIBS)
@ -464,7 +475,7 @@ irssi.spec
irssi-version.h irssi-version.h
irssi-config) irssi-config)
dnl ** for building from objdir + linking perl libraries so libtool finds them dnl ** for building from objdir
if test "x$want_perl" != "xno"; then if test "x$want_perl" != "xno"; then
old_dir=`pwd` && cd $srcdir && whole_dir=`pwd` && cd $old_dir old_dir=`pwd` && cd $srcdir && whole_dir=`pwd` && cd $old_dir
@ -473,15 +484,6 @@ if test "x$want_perl" != "xno"; then
ln -sf $file `echo $file|sed "s?$whole_dir/??"` ln -sf $file `echo $file|sed "s?$whole_dir/??"`
done done
fi fi
dnl * building as module
if test "x$want_perl" = "xyes"; then
if test ! -d src/perl/.libs; then
mkdir -p src/perl/.libs
fi
ln -sf $dynaloader src/perl/.libs/DynaLoader.a
ln -sf $libperl_a src/perl/.libs/libperl_orig.a
fi
fi fi
echo echo

View File

@ -1,7 +1,10 @@
moduledir = $(libdir)/irssi/modules moduledir = $(libdir)/irssi/modules
module_LTLIBRARIES = libperl.la
libperl_la_LDFLAGS = -avoid-version module_LTLIBRARIES = $(module_lib)
noinst_LTLIBRARIES = $(static_lib)
EXTRA_LTLIBRARIES = libperl.la libperl_static.la
libperl_la_LDFLAGS = -avoid-version -rpath $(moduledir)
perl.c: perl-signals.h perl.c: perl-signals.h
@ -11,11 +14,24 @@ INCLUDES = $(GLIB_CFLAGS) \
-I$(top_srcdir)/src \ -I$(top_srcdir)/src \
-I$(top_srcdir)/src/core -I$(top_srcdir)/src/core
libperl_la_SOURCES = \ perl_sources = \
perl.c \ perl.c \
perl-common.c \ perl-common.c \
xsinit.c xsinit.c
libperl_la_DEPENDENCIES = .libs/libperl_orig.a .libs/DynaLoader.a
.libs/libperl_orig.a:
ln -sf $(LIBPERL_A) .libs/libperl_orig.a
.libs/DynaLoader.a:
ln -sf $(DYNALOADER_A) .libs/DynaLoader.a
libperl_la_SOURCES = \
$(perl_sources)
libperl_static_la_SOURCES = \
$(perl_sources)
perl-signals.h: $(top_srcdir)/docs/signals.txt $(srcdir)/get-signals.pl 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