Index: build/Makefile.apxs =================================================================== --- build/Makefile.apxs (revision 807961) +++ build/Makefile.apxs (working copy) @@ -17,8 +17,16 @@ srcdir=. CLEAN_TARGETS = conftest_fchmod.c \ + conftest_sys_file_h.c \ + conftest_sys_mman_h.c \ + conftest_sys_mutex_h.c \ + conftest_sys_shm_h.c \ *.loT TARGETS = conftest_fchmod \ + conftest_sys_file_h \ + conftest_sys_mman_h \ + conftest_sys_mutex_h \ + conftest_sys_shm_h PROGRAM_LDADD = PROGRAM_DEPENDENCIES = @@ -26,12 +34,37 @@ include $(exp_installbuilddir)/rules.mk # Tests follow this pattern; one to execute, one to create source; +# Tests which check for a header file don't build an executable. conftest_fchmod: conftest_fchmod.lo $(LINK) conftest_fchmod.lo +conftest_sys_file_h: conftest_sys_mman_h.lo + @echo "success" > $@ + +conftest_sys_mman_h: conftest_sys_mman_h.lo + @echo "success" > $@ + +conftest_sys_mutex_h: conftest_sys_mman_h.lo + @echo "success" > $@ + +conftest_sys_shm_h: conftest_sys_shm_h.lo + @echo "success" > $@ + conftest_fchmod.c: @echo "#include " > $@ @echo "#include " >> $@ @echo "int main() { return fchmod(2, 0644); }" >> $@ +conftest_sys_file_h.c: + @echo "#include " >> $@ + +conftest_sys_mman_h.c: + @echo "#include " >> $@ + +conftest_sys_mutex_h.c: + @echo "#include " >> $@ + +conftest_sys_shm_h.c: + @echo "#include " >> $@ + Index: modules/fcgid/fcgid_global.h =================================================================== --- modules/fcgid/fcgid_global.h (revision 807961) +++ modules/fcgid/fcgid_global.h (working copy) @@ -22,6 +22,10 @@ #include "http_core.h" #include "http_log.h" +#ifdef FCGID_APXS_BUILD +#include "fcgid_config.h" +#endif + #ifndef _POSIX_PATH_MAX #define _POSIX_PATH_MAX 255 #endif Index: modules/fcgid/config.m4 =================================================================== --- modules/fcgid/config.m4 (revision 807961) +++ modules/fcgid/config.m4 (working copy) @@ -31,7 +31,12 @@ fcgid_filter.lo dnl " -APACHE_MODULE(fcgid, [FastCGI support (mod_fcgid)], $fcigd_objs, , no) +APACHE_MODULE(fcgid, [FastCGI support (mod_fcgid)], $fcigd_objs, , no, [) + AC_CHECK_HEADERS(sys/file.h) + AC_CHECK_HEADERS(sys/mman.h) + AC_CHECK_HEADERS(sys/mutex.h) + AC_CHECK_HEADERS(sys/shm.h) +]) dnl # end of module specific part APACHE_MODPATH_FINISH Index: configure.apxs =================================================================== --- configure.apxs (revision 807961) +++ configure.apxs (working copy) @@ -61,8 +61,6 @@ touch build/.deps touch modules/fcgid/.deps -if test -f modules/fcgid/fcgid_config.h.in; then - cd build found_features="" echo "Detecting features" @@ -75,6 +73,26 @@ # -e \"s/^#undef \(HAVE_FCHMOD\)[ \t]*/#define \1/;\"" #fi +if make local-clean conftest_sys_file_h >>../config.apxs.log 2>&1; then + found_features="$found_features \ + -e \"s/^#undef \(HAVE_SYS_FILE_H\)[ \t]*/#define \1/;\"" +fi + +if make local-clean conftest_sys_mman_h >>../config.apxs.log 2>&1; then + found_features="$found_features \ + -e \"s/^#undef \(HAVE_SYS_MMAN_H\)[ \t]*/#define \1/;\"" +fi + +if make local-clean conftest_sys_mutex_h >>../config.apxs.log 2>&1; then + found_features="$found_features \ + -e \"s/^#undef \(HAVE_SYS_MUTEX_H\)[ \t]*/#define \1/;\"" +fi + +if make local-clean conftest_sys_shm_h >>../config.apxs.log 2>&1; then + found_features="$found_features \ + -e \"s/^#undef \(HAVE_SYS_SHM_H\)[ \t]*/#define \1/;\"" +fi + make local-distclean >>../config.apxs.log 2>&1 cd .. @@ -86,8 +104,6 @@ > modules/fcgid/fcgid_config.h fi -fi - echo "" echo "Finished, run 'make' to compile mod_fcgid" echo ""