From: Jeff Trawick Date: Sun, 10 Apr 2011 13:18:23 +0000 (+0000) Subject: configure: add basic support to build with MinGW/MSYS, from trunk r422182 by pquerna X-Git-Tag: 2.2.18~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=182665c6030ec3c52c656ef14329110ec11ecd5d;p=thirdparty%2Fapache%2Fhttpd.git configure: add basic support to build with MinGW/MSYS, from trunk r422182 by pquerna 2.2.x patch submitted by: fuankg Reviewed by: wrowe, trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1090795 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index 9397978a284..27a5e0eca14 100644 --- a/STATUS +++ b/STATUS @@ -90,11 +90,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * configure: add basic support to build with MinGW/MSYS (backport of r422182) - Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=422182 - 2.2.x patch: http://people.apache.org/~fuankg/diffs/r422182-2.2.x.diff - +1 fuankg, wrowe, trawick - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/configure.in b/configure.in index 0ccf85911ec..d37b11dc529 100644 --- a/configure.in +++ b/configure.in @@ -302,6 +302,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/server/mpm/config.m4 b/server/mpm/config.m4 index 6ea447d1e5d..b0907769437 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}),[ + MPM={beos|event|worker|prefork|mpmt_os2|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" ; then + if test "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm" = "event" -o "$apache_cv_mpm" = "winnt" ; then return 0 else return 1 diff --git a/server/mpm/winnt/child.c b/server/mpm/winnt/child.c index d918e47aa73..5ad9e728a0f 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;