From d3dbd863ae4bed6cd83aa56c5e894592e40e5d94 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 16 Jul 2000 14:30:29 +0000 Subject: [PATCH] If --prefix is used, add the default perl library directory to same prefix. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@470 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- configure.in | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/configure.in b/configure.in index 46912a16..62698580 100644 --- a/configure.in +++ b/configure.in @@ -72,7 +72,12 @@ AC_ARG_WITH(modules, [ --with-modules Specify what modules to build in binary], build_modules="$withval") -PERL_LIB_DIR= +if [ "x$prefix" = "xNONE" ]; then + PERL_LIB_DIR= +else + PERL_LIB_DIR=$prefix +fi + AC_ARG_ENABLE(perl, [ --enable-perl[=dir] Enable Perl scripting, you can specify the Perl libraries installation path], if test x$enableval = xyes; then @@ -270,7 +275,7 @@ dnl ** keep track of them all dnl ** dnl ** (these could be made configurable) -CHAT_MODULES="irc" +CHAT_MODULES="irc silc" irc_MODULES="dcc flood notifylist" if test "x$build_modules" != "x"; then irc_MODULES="$irc_MODULES $build_modules" @@ -291,8 +296,14 @@ FE_COMMON_LIBS="../fe-common/core/libfe_common_core.la" CHAT_LIBS="" for c in $CHAT_MODULES; do + module_inits="" + module_deinits="" + fe_module_inits="" + fe_module_deinits="" CHAT_LIBS="$CHAT_LIBS ../$c/lib$c.la ../$c/core/lib${c}_core.la" - FE_COMMON_LIBS="$FE_COMMON_LIBS ../fe-common/$c/libfe_common_$c.la" + if test -d $srcdir/src/fe-common/$c; then + FE_COMMON_LIBS="$FE_COMMON_LIBS ../fe-common/$c/libfe_common_$c.la" + fi for s in `eval echo \\$${c}_MODULES`; do CHAT_LIBS="$CHAT_LIBS ../$c/$s/.libs/lib${c}_$s.a" module_inits="$module_inits ${c}_${s}_init();" @@ -307,17 +318,21 @@ for c in $CHAT_MODULES; do file="$srcdir/src/$c/$c.c" echo "/* this file is automatically generated by configure - don't change */" > $file echo "void ${c}_core_init(void); void ${c}_core_deinit(void);" >> $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 + if test "x$module_inits" != "x"; then + 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 + fi echo "void ${c}_init(void) { ${c}_core_init(); $module_inits }" >> $file echo "void ${c}_deinit(void) { $module_deinits ${c}_core_deinit(); }" >> $file - file="$srcdir/src/fe-common/$c/${c}-modules.c" - echo "/* this file is automatically generated by configure - don't change */" > $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 "void fe_${c}_modules_init(void) { $fe_module_inits }" >> $file - echo "void fe_${c}_modules_deinit(void) { $fe_module_deinits }" >> $file + if test -d $srcdir/src/fe-common/$c; then + file="$srcdir/src/fe-common/$c/${c}-modules.c" + echo "/* this file is automatically generated by configure - don't change */" > $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 "void fe_${c}_modules_init(void) { $fe_module_inits }" >> $file + echo "void fe_${c}_modules_deinit(void) { $fe_module_deinits }" >> $file + fi done dnl ** @@ -362,6 +377,8 @@ src/irc/bot/Makefile src/irc/dcc/Makefile src/irc/notifylist/Makefile src/irc/flood/Makefile +src/silc/Makefile +src/silc/core/Makefile src/fe-common/Makefile src/fe-common/core/Makefile src/fe-common/irc/Makefile