From 1851f87325268a070d31f6de0ee6df999ebd2946 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 27 Nov 2000 11:26:14 +0000 Subject: Fix a few problems with config.modules stuff --- configure.in | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index b14a15fbb..651d13ca4 100644 --- a/configure.in +++ b/configure.in @@ -1710,13 +1710,15 @@ CONFIG_MODULES=./config.modules echo "creating ${CONFIG_MODULES}" userlist=" " if test -f config.modules; then - userlist=`sed -e '/^#/d' -e '/auto=y/d' -e 's/ .*/ /' -e 's/^name=/ /' \ - ${CONFIG_MODULES}` + userlist="`sed -e '/^#/d' -e '/auto=y/d' -e 's/ .*/ /' -e 's/^name=/ /' \ + ${CONFIG_MODULES}`" mv ${CONFIG_MODULES} ${CONFIG_MODULES}.old fi -(cd ${srcdir} -echo "# Edit this file to change the way modules are loaded." +(echo "# Edit this file to change the way modules are loaded." echo "# The format is strict; do not break lines or add extra spaces." +echo "# Run \`make prep' if you change anything here after compiling" +echo "# (there is no need if you change this just after the first time" +echo "# you run \`configure')." echo "#" echo "# Values of \`link' are \`static', \`dynamic' or \`no' to compile the" echo "# module into the shell, link it in at run time, or not use it at all." @@ -1736,17 +1738,17 @@ echo "# module." echo "#" echo "# You should not change the values for the pseudo-module zsh/main," echo "# which is the main shell." -for modfile in */*.mdd */*/*.mdd; do +for modfile in `cd ${srcdir}; echo */*.mdd */*/*.mdd`; do name= link= load= - . $modfile - if test x$name != x -a x$link != x; then - case $userlist in + . ${srcdir}/$modfile + if test x$name != x -a x"$link" != x; then + case "$userlist" in *" $name "*) # not autogenerated, keep original grep "^name=$name " ${CONFIG_MODULES}.old ;; - *) case $link in + *) case "$link" in *\ *) eval 'link=`'$link'`' ;; esac @@ -1756,7 +1758,7 @@ for modfile in */*.mdd */*/*.mdd; do *) load=" load=no" ;; esac - case $link in + case "$link" in static) echo "name=$name modfile=$modfile link=static auto=yes${load}" ;; dynamic) if test $dynamic != no; then @@ -1764,7 +1766,7 @@ for modfile in */*.mdd */*/*.mdd; do auto=yes${load}" else echo "name=$name modfile=$modfile link=no\ - auto=no load=no" + auto=yes load=no" fi ;; either) if test $dynamic != no; then -- cgit 1.4.1