You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by makl <ab...@gmx.net> on 2004/05/01 17:36:14 UTC

Re: [PATCH] Compile APR with MinGW : configure.in whithout whitespace changes

Index: configure.in
===================================================================
RCS file: /home/cvspublic/apr/configure.in,v
retrieving revision 1.579
diff -u -3 -r1.579 configure.in
--- configure.in	16 Apr 2004 16:32:25 -0000	1.579
+++ configure.in	1 May 2004 14:16:08 -0000
@@ -179,7 +179,15 @@

  if test "x$use_libtool" = "xyes"; then
        lt_compile='$(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -o $@ -c $< && touch $@'
+      dnl Ensure that the name of the MingW DLL is compatible to the MSVC build.
+      case $host in
+         *mingw32*)
+            LT_VERSION="-avoid-version"
+            ;;
+         *)
        LT_VERSION="-version-info `$get_version libtool $version_hdr APR`"
+            ;;
+      esac
        link="\$(LIBTOOL) \$(LTFLAGS) --mode=link \$(LT_LDFLAGS) \$(COMPILE) ${LT_VERSION} \$(ALL_LDFLAGS) -o \$@"
        so_ext='lo'
        lib_target='-rpath $(libdir) $(OBJECTS)'
@@ -414,6 +422,17 @@
         OSDIR="unix"
         eolstr="\\n"
         ;;
+   *mingw32*)
+       OSDIR="win32"
+       OBJECTS_PLATFORM='$(OBJECTS_win32)'
+       APR_ADDTO(CFLAGS,-mthreads)
+       APR_ADDTO(LDFLAGS,-no-undefined)
+       APR_ADDTO(LIBS, -lwsock32)
+       APR_ADDTO(LIBS, -lws2_32)
+       APR_ADDTO(LIBS, -lrpcrt4)
+       enable_threads="system_threads"
+       eolstr="\\r\\n"
+       ;;
     *)
         OSDIR="unix"
         eolstr="\\n"
@@ -696,6 +715,11 @@
  haveshmgetanon="0"
  havemmapzero="0"
  havemmapanon="0"
+
+case $host in
+   *mingw32*)
+       ;;
+   *)
  APR_BEGIN_DECISION([anonymous shared memory allocation method])
  APR_IFALLYES(header:sys/ipc.h header:sys/shm.h header:sys/file.h dnl
               func:shmget func:shmat func:shmdt func:shmctl,
@@ -732,6 +756,8 @@
  esac
  APR_END_DECISION
  AC_DEFINE_UNQUOTED($ac_decision)
+;;
+esac

  useshmgetanon="0"
  usemmapzero="0"
@@ -762,6 +788,10 @@
  haveshmget="0"
  havebeosarea="0"
  haveos2shm="0"
+case $host in
+   *mingw32*)
+       ;;
+   *)
  APR_BEGIN_DECISION([namebased memory allocation method])
  APR_IFALLYES(header:sys/mman.h func:mmap func:munmap,
               [havemmaptmp="1"
@@ -796,6 +826,8 @@
  esac
  APR_END_DECISION
  AC_DEFINE_UNQUOTED($ac_decision)
+;;
+esac

  usemmaptmp="0"
  usemmapshm="0"
@@ -1387,7 +1419,7 @@
      # Everything else:
      if test "$dsotype" = "any"; then
          case $host in
-        *os390|*-os2*|*os400|*-aix*) dsotype=other ;;
+        *os390|*-os2*|*os400|*-aix*|*mingw32*) dsotype=other ;;
          esac
      fi
  fi
@@ -1585,6 +1617,10 @@
  # At this stage, we match the ordering in Apache 1.3
  # which is (highest to lowest): pthread -> posixsem -> sysvsem -> fcntl -> flock
  #
+case $host in
+   *mingw32*)
+       ;;
+   *)
  APR_BEGIN_DECISION([apr_lock implementation method])
  APR_IFALLYES(func:flock define:LOCK_EX,
              APR_DECIDE(USE_FLOCK_SERIALIZE, [4.2BSD-style flock()]))
@@ -1605,6 +1641,8 @@
  fi
  APR_END_DECISION
  AC_DEFINE_UNQUOTED($ac_decision)
+;;
+esac

  flockser="0"
  sysvser="0"
@@ -1973,6 +2011,7 @@
  esac
  AC_SUBST(INCLUDE_RULES)
  AC_SUBST(INCLUDE_OUTPUTS)
+AC_SUBST(enable_shared)

  SAVE_FILES="include/apr.h include/arch/unix/apr_private.h"