From: Paul Querna Date: Sat, 15 Jul 2006 09:03:52 +0000 (+0000) Subject: Bring in basic support for building the winnt MPM under mingw32, using the autoconf... X-Git-Tag: 2.3.0~2251 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9d3d9f6a55c9f1a700c6295c7f37041c93297fd;p=thirdparty%2Fapache%2Fhttpd.git Bring in basic support for building the winnt MPM under mingw32, using the autoconf build system. Currently this will get you to the point of linking errors on gen_test_char. configure.in: Default to winnt MPM on mingw32 hosts. configure.in: Add AP_DECLARE_EXPORT for mingw32 hsots. os/config.m4: Use win32 dir under mingw32. os/win32/Makefile.in: Add in a new makefile to generate libos on win32. server/mpm/config.m4: Add winnt MPM to the help string. server/mpm/config.m4: winnt MPM is a threaded MPM. server/mpm/winnt/child.c: SO_UPDATE_ACCEPT_CONTEXT is defined under a different header in mingw32. server/mpm/winnt/{Makefile.in,config.m4}: Base build for winnt MPM. os/win32,server/mpm/winnt: Update svn:ignore for .deps/.libs git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@422182 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/configure.in b/configure.in index 29baee7c8fe..28f5f824792 100644 --- a/configure.in +++ b/configure.in @@ -293,6 +293,10 @@ case $host in APR_SETVAR(APACHE_MPM, [prefork]) APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1]) ;; + *mingw32*) + APR_SETVAR(APACHE_MPM, [winnt]) + APR_ADDTO(CPPFLAGS, [-DAP_DECLARE_EXPORT]) + ;; *aix*) aixver=`echo $host | sed 's/^[[^0-9]]*//' | sed 's/\.//g'` if test $aixver -ge 4320; then diff --git a/os/config.m4 b/os/config.m4 index 336f360d752..b5ab86bd5b9 100644 --- a/os/config.m4 +++ b/os/config.m4 @@ -17,6 +17,10 @@ bs2000*) OS="cygwin" OS_DIR="unix" ;; +*mingw32*) + OS="win32" + OS_DIR=$OS + ;; *) OS="unix" OS_DIR=$OS;; diff --git a/os/win32/Makefile.in b/os/win32/Makefile.in new file mode 100644 index 00000000000..d2437475e31 --- /dev/null +++ b/os/win32/Makefile.in @@ -0,0 +1,5 @@ + +LTLIBRARY_NAME = libos.la +LTLIBRARY_SOURCES = util_win32.c ap_regkey.c modules.c + +include $(top_srcdir)/build/ltlib.mk diff --git a/server/mpm/config.m4 b/server/mpm/config.m4 index 34018382e1c..f9012a415b8 100644 --- a/server/mpm/config.m4 +++ b/server/mpm/config.m4 @@ -1,7 +1,7 @@ AC_MSG_CHECKING(which MPM to use) AC_ARG_WITH(mpm, APACHE_HELP_STRING(--with-mpm=MPM,Choose the process model for Apache to use. - MPM={beos|event|worker|prefork|mpmt_os2|perchild|leader|threadpool}),[ + MPM={beos|event|worker|prefork|mpmt_os2|perchild|leader|threadpool|winnt}),[ APACHE_MPM=$withval ],[ if test "x$APACHE_MPM" = "x"; then @@ -14,7 +14,7 @@ apache_cv_mpm=$APACHE_MPM ap_mpm_is_threaded () { - if test "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm" = "event" -o "$apache_cv_mpm" = "perchild" -o "$apache_cv_mpm" = "leader" -o "$apache_cv_mpm" = "threadpool" ; then + if test "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm" = "event" -o "$apache_cv_mpm" = "perchild" -o "$apache_cv_mpm" = "leader" -o "$apache_cv_mpm" = "winnt" -o "$apache_cv_mpm" = "threadpool" ; then return 0 else return 1 diff --git a/server/mpm/winnt/Makefile.in b/server/mpm/winnt/Makefile.in new file mode 100644 index 00000000000..de0ff551daf --- /dev/null +++ b/server/mpm/winnt/Makefile.in @@ -0,0 +1,5 @@ + +LTLIBRARY_NAME = libwinnt.la +LTLIBRARY_SOURCES = child.c mpm_winnt.c nt_eventlog.c service.c + +include $(top_srcdir)/build/ltlib.mk diff --git a/server/mpm/winnt/child.c b/server/mpm/winnt/child.c index 8996bfd85fa..d950869806a 100644 --- a/server/mpm/winnt/child.c +++ b/server/mpm/winnt/child.c @@ -39,6 +39,10 @@ #include #include "apr_atomic.h" +#ifdef __MINGW32__ +#include +#endif + /* shared with mpm_winnt.c */ extern DWORD my_pid; diff --git a/server/mpm/winnt/config.m4 b/server/mpm/winnt/config.m4 new file mode 100644 index 00000000000..9320958824b --- /dev/null +++ b/server/mpm/winnt/config.m4 @@ -0,0 +1,3 @@ +if test "$MPM_NAME" = "winnt" ; then + APACHE_FAST_OUTPUT(server/mpm/$MPM_NAME/Makefile) +fi