summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-05-25 11:30:47 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-05-25 11:30:47 +0000
commit76605ad0aed7e53c4a9dab686474235f547a5837 (patch)
tree078c0ebf5f7099daaa2dcf9ff252f418dedcce34 /configure.in
parent487da4174504f797171f12a01636c54272ec6a62 (diff)
downloadirssi-76605ad0aed7e53c4a9dab686474235f547a5837.zip
Added bot plugin, it also has almost-functional botnet.
Changed configure.in's functionality so that you could tell what modules you want to build in main irssi binary and it will create automatically the .c files that need to call the module_init()/deinit() functions. Fixed several minor things.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@230 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in24
1 files changed, 23 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 42a022ef..baf20e95 100644
--- a/configure.in
+++ b/configure.in
@@ -296,8 +296,29 @@ for c in $CHAT_MODULES; do
FE_COMMON_LIBS="$FE_COMMON_LIBS ../fe-common/$c/libfe_common_$c.la"
for s in `eval echo \\$${c}_MODULES`; do
CHAT_LIBS="$CHAT_LIBS ../$c/$s/lib${c}_$s.la"
- FE_COMMON_LIBS="$FE_COMMON_LIBS ../fe-common/$c/$s/libfe_common_${c}_$s.la"
+ module_inits="$module_inits ${c}_${s}_init();"
+ module_deinits="${c}_${s}_deinit(); $module_deinits"
+ if test -d $srcdir/src/fe-common/$c/$s; then
+ FE_COMMON_LIBS="$FE_COMMON_LIBS ../fe-common/$c/$s/libfe_common_${c}_$s.la"
+ fe_module_inits="$fe_module_inits fe_${c}_${s}_init();"
+ fe_module_deinits="fe_${c}_${s}_deinit(); $fe_module_deinits"
+ fi
done
+
+ 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
+ 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
done
dnl ** common libraries needed by frontends
@@ -338,6 +359,7 @@ src/Makefile
src/core/Makefile
src/irc/Makefile
src/irc/core/Makefile
+src/irc/bot/Makefile
src/irc/dcc/Makefile
src/irc/notifylist/Makefile
src/irc/flood/Makefile