diff options
-rw-r--r-- | configure.in | 19 | ||||
-rw-r--r-- | curses.m4 | 2 | ||||
-rw-r--r-- | src/perl/Makefile.am | 10 |
3 files changed, 27 insertions, 4 deletions
diff --git a/configure.in b/configure.in index 059245db..ed254911 100644 --- a/configure.in +++ b/configure.in @@ -12,6 +12,11 @@ AC_STDC_HEADERS AC_ARG_PROGRAM AM_PROG_LIBTOOL +dnl * ahem.. :) we don't want static libraries for modules +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ +$libtool_flags --disable-static --output=libtool-static --no-verify $ac_aux_dir/ltmain.sh $lt_target \ +|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; } + AC_CHECK_HEADERS(string.h stdlib.h unistd.h dirent.h sys/ioctl.h libintl.h) AC_ARG_WITH(socks, @@ -310,18 +315,28 @@ if test "$want_perl" != "no"; then fi if test "x$want_perl" = "xstatic"; then + dnl * building with static perl support + dnl * all PERL_LDFLAGS linking is done in fe-text PERL_LDFLAGS="../perl/libperl_static.la $PERL_LDFLAGS" PROG_LIBS="$PROG_LIBS $PERL_LDFLAGS" PERL_LDFLAGS= AC_DEFINE(HAVE_STATIC_PERL) + + dnl * build only static library of perl module module_lib= static_lib=libperl_static.la + PERL_LIBTOOL='$(SHELL) $(top_builddir)/libtool' else + dnl * build dynamic library of perl module, + dnl * use libtool-static to prevent creating of + dnl * libperl.a module_lib=libperl.la static_lib= + PERL_LIBTOOL='$(SHELL) $(top_builddir)/libtool-static' fi AC_SUBST(module_lib) AC_SUBST(static_lib) + AC_SUBST(PERL_LIBTOOL) AC_SUBST(PERL_LDFLAGS) AC_SUBST(PERL_CFLAGS) @@ -481,7 +496,9 @@ if test "x$want_perl" != "xno"; then if test "x$old_dir" != "x$whole_dir"; then for file in $whole_dir/src/perl/common/typemap $whole_dir/src/perl/common/module.h $whole_dir/src/perl/common/*.xs $whole_dir/src/perl/irc/typemap $whole_dir/src/perl/irc/module.h $whole_dir/src/perl/irc/*.xs; do - ln -sf $file `echo $file|sed "s?$whole_dir/??"` + link=`echo $file|sed "s?$whole_dir/??"` + rm -f $link + $LN_S $file $link done fi fi @@ -127,7 +127,7 @@ AC_DEFUN(AC_CHECK_CURSES,[ ) AC_ARG_WITH(ncurses, - [ --with-ncurses[=dir] Compile with ncurses/locate base dir], + [ --with-ncurses[=dir] Compile with ncurses/locate base dir], if test x$withval = xno ; then search_ncurses=false elif test x$withval != xyes ; then diff --git a/src/perl/Makefile.am b/src/perl/Makefile.am index 860732b8..8e2d2df4 100644 --- a/src/perl/Makefile.am +++ b/src/perl/Makefile.am @@ -1,3 +1,5 @@ +LIBTOOL = $(PERL_LIBTOOL) + moduledir = $(libdir)/irssi/modules module_LTLIBRARIES = $(module_lib) @@ -22,9 +24,13 @@ perl_sources = \ libperl_la_DEPENDENCIES = .libs/libperl_orig.a .libs/DynaLoader.a .libs/libperl_orig.a: - ln -sf $(LIBPERL_A) .libs/libperl_orig.a + if [ ! -d .libs ]; then mkdir .libs; fi + rm -f .libs/libperl_orig.a + $(LN_S) $(LIBPERL_A) .libs/libperl_orig.a .libs/DynaLoader.a: - ln -sf $(DYNALOADER_A) .libs/DynaLoader.a + if [ ! -d .libs ]; then mkdir .libs; fi + rm -f .libs/DynaLoader.a + $(LN_S) $(DYNALOADER_A) .libs/DynaLoader.a libperl_la_SOURCES = \ $(perl_sources) |