diff options
author | cebka@cebka-laptop <cebka@cebka-laptop> | 2008-10-14 17:34:56 +0400 |
---|---|---|
committer | cebka@cebka-laptop <cebka@cebka-laptop> | 2008-10-14 17:34:56 +0400 |
commit | fee5af783ea49c1fd77e335bb9986fe58152af9a (patch) | |
tree | 6f3b5249b3815797d675a5910a61fc1bbc0b6843 /configure | |
parent | 3f8572f20960a02b334d09c809513d5ab25012a5 (diff) | |
download | rspamd-fee5af783ea49c1fd77e335bb9986fe58152af9a.tar.gz rspamd-fee5af783ea49c1fd77e335bb9986fe58152af9a.zip |
* Configure modules when worker starts for simplifying reconfig procedure
* Add two behaviour types of memory allocator: greedy and ungreedy
* Adopt surbl module for new configure style
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -458,8 +458,10 @@ write_modules() echo "module_t modules[] = {" >> modules.c; modules_num=0 for m in $MODULES ; do - echo "{\"${m}\", ${m}_module_init}," >> modules.c + echo "{\"${m}\", ${m}_module_init, ${m}_module_config, ${m}_module_reconfig}," >> modules.c echo "int ${m}_module_init(struct config_file *cfg, struct module_ctx **ctx);" >> modules.h + echo "int ${m}_module_config(struct config_file *cfg);" >> modules.h + echo "int ${m}_module_reconfig(struct config_file *cfg);" >> modules.h modules_num=`expr $modules_num + 1` done echo "};" >> modules.c @@ -658,6 +660,19 @@ do name=`echo $modline | sed 's/.*MODULE:\([^: ]*\).*/\1/'` MODULES="$MODULES $name" ;; + --disable-module) SOURCES=`echo $SOURCES | sed -e "s/${value}//g"` + if [ ! -f $value ] ; then + echo "Cannot find $value, please check path" + exit 1 + fi + modline=`grep '/***MODULE:' $value` + if [ F"$modline" = "F" ] ; then + echo "Cannot find /***MODULE line in $value, please check syntax" + exit 1 + fi + + name=`echo $modline | sed 's/.*MODULE:\([^: ]*\).*/\1/'` + MODULES=`echo $MODULES | sed -e "s/${name}//g"` ;; *) echo "$0: error: invalid option \"$option\"" exit 1 @@ -674,6 +689,7 @@ if [ "F$help" = "Fyes" ] ; then --enable-debug turn on extra debug messages --enable-opt turn on extra optimization --add-module add additional C module + --disable-module do not include C module --user=USER set user to use --group=GROUP set group to use END @@ -740,6 +756,11 @@ if [ $? -eq 0 ] ; then have_opt "SRANDOMDEV" fi +check_function "getpagesize" "unistd.h" +if [ $? -eq 0 ] ; then + have_opt "GETPAGESIZE" +fi + check_function "setproctitle" "unistd.h" if [ $? -eq 0 ] ; then have_opt "SETPROCTITLE" |