httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r808146 - in /httpd/mod_fcgid/trunk: build/Makefile.apxs configure.apxs modules/fcgid/config.m4 modules/fcgid/fcgid_global.h
Date Wed, 26 Aug 2009 18:16:58 GMT
Author: trawick
Date: Wed Aug 26 18:16:58 2009
New Revision: 808146

URL: http://svn.apache.org/viewvc?rev=808146&view=rev
Log:
Detect availability of certain header files required
for the apr_shm_remove work-around required with
apr 0.9.x (httpd 2.0.x).

Reviewed by: wrowe

Modified:
    httpd/mod_fcgid/trunk/build/Makefile.apxs
    httpd/mod_fcgid/trunk/configure.apxs
    httpd/mod_fcgid/trunk/modules/fcgid/config.m4
    httpd/mod_fcgid/trunk/modules/fcgid/fcgid_global.h

Modified: httpd/mod_fcgid/trunk/build/Makefile.apxs
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/build/Makefile.apxs?rev=808146&r1=808145&r2=808146&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/build/Makefile.apxs (original)
+++ httpd/mod_fcgid/trunk/build/Makefile.apxs Wed Aug 26 18:16:58 2009
@@ -16,9 +16,17 @@
 builddir=.
 srcdir=.
 
-CLEAN_TARGETS = conftest_fchmod.c \
+CLEAN_TARGETS = conftest_foofn.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 \
+TARGETS       = conftest_foofn \
+                conftest_sys_file_h \
+                conftest_sys_mman_h \
+                conftest_sys_mutex_h \
+                conftest_sys_shm_h
 
 PROGRAM_LDADD        = 
 PROGRAM_DEPENDENCIES = 
@@ -26,12 +34,38 @@
 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.
+# TODO When the first function test is added, hijack conftest_foofn
 
-conftest_fchmod: conftest_fchmod.lo
-	$(LINK) conftest_fchmod.lo
+conftest_foofn: conftest_foofn.lo
+	$(LINK) conftest_foofn.lo
 
-conftest_fchmod.c:
+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_foofn.c:
 	@echo "#include <sys/types.h>" > $@
 	@echo "#include <sys/stat.h>" >> $@
-	@echo "int main() { return fchmod(2, 0644); }" >> $@
+	@echo "int main() { return foofn(2, 0644); }" >> $@
+
+conftest_sys_file_h.c:
+	@echo "#include <sys/file.h>" >> $@
+
+conftest_sys_mman_h.c:
+	@echo "#include <sys/mman.h>" >> $@
+
+conftest_sys_mutex_h.c:
+	@echo "#include <sys/mutex.h>" >> $@
+
+conftest_sys_shm_h.c:
+	@echo "#include <sys/shm.h>" >> $@
 

Modified: httpd/mod_fcgid/trunk/configure.apxs
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/configure.apxs?rev=808146&r1=808145&r2=808146&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/configure.apxs (original)
+++ httpd/mod_fcgid/trunk/configure.apxs Wed Aug 26 18:16:58 2009
@@ -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 ""

Modified: httpd/mod_fcgid/trunk/modules/fcgid/config.m4
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/config.m4?rev=808146&r1=808145&r2=808146&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/config.m4 (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/config.m4 Wed Aug 26 18:16:58 2009
@@ -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

Modified: httpd/mod_fcgid/trunk/modules/fcgid/fcgid_global.h
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/fcgid_global.h?rev=808146&r1=808145&r2=808146&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_global.h (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_global.h Wed Aug 26 18:16:58 2009
@@ -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



Mime
View raw message