***************
*** 51,63 ****
  
  # Check for syntax errors...
  
- if egrep -v '^%?Module[ 	]+[A-Za-z0-9_]+[ 	]+[^ 	]+$' $tmpfile \
     | grep -v = > /dev/null
  then
     echo "Syntax error --- The configuration file is used only to"
     echo "define the list of included modules or to set Makefile"
     echo "options or Configure rules, and I don't see that at all:"
-    egrep -v '^Module[ 	]+[A-Za-z0-9_]+[ 	]+[^ 	]+$' $tmpfile | \
       grep -v =
     exit 1
  fi
--- 51,63 ----
  
  # Check for syntax errors...
  
+ if egrep -v '^(Dynamic|%)?Module[ 	]+[A-Za-z0-9_]+[ 	]+[^ 	]+$' $tmpfile \
     | grep -v = > /dev/null
  then
     echo "Syntax error --- The configuration file is used only to"
     echo "define the list of included modules or to set Makefile"
     echo "options or Configure rules, and I don't see that at all:"
+    egrep -v '^(Dynamic|%)Module[ 	]+[A-Za-z0-9_]+[ 	]+[^ 	]+$' $tmpfile | \
       grep -v =
     exit 1
  fi
***************
*** 116,121 ****
  	 } \
  	 print "" \
         }'
  #
  # Now add Makefile additions and Rules
  #
--- 116,135 ----
  	 } \
  	 print "" \
         }'
+ 
+ if [ `grep -c DynamicModule $tmpfile` -gt 0 ]; then
+ echo "DYNAMODS=\\" >> Makefile
+ awk < $tmpfile >> Makefile \
+ '/^DynamicModule/ { gsub("\\.o",".so",$3); dmodules[dn++] = $3 } \
+    END { \
+ 	if(dn > 0) { \
+          for (i = 0; i < dn; ++i) { \
+ 	     if (i < dn-1) printf ("  %s \\\n", dmodules[i]); \
+ 	     else printf("  %s\n", dmodules[i]); \
+          }\
+ 	} \
+    }'
+ fi
  #
  # Now add Makefile additions and Rules
  #
