LTFLAGS="$LTFLAGS -export-dynamic"
+if test "$apache_cv_mpm" = "mpmt_pthread" -o "$apache_cv_mpm" = "dexter"; then
+# if we are using a threaded MPM, we will get better performance with
+# mod_cgid, so make it the default.
+ APACHE_CHECK_GENERATOR_MODULE(cgid, CGI scripts, , yes)
+ APACHE_CHECK_GENERATOR_MODULE(cgi, CGI scripts, , no)
+else
+# if we are using a non-threaded MPM, it makes little sense to use
+# mod_cgid, and it just opens up holes we don't need. Make mod_cgi the # default
+ APACHE_CHECK_GENERATOR_MODULE(cgi, CGI scripts, , yes)
+ APACHE_CHECK_GENERATOR_MODULE(cgid, CGI scripts, , no)
+fi
+
APACHE_MODPATH_FINISH
APACHE_SUBST(STANDARD_LIBS)