Index: apr-svn/test/Makefile.in =================================================================== --- apr-svn/test/Makefile.in (revision 1087388) +++ apr-svn/test/Makefile.in (working copy) @@ -74,7 +74,7 @@ # link programs using -no-install to get real executables not # libtool wrapper scripts which link an executable when first run. -LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) \ +LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LT_LDFLAGS) \ @LT_NO_INSTALL@ $(ALL_LDFLAGS) -o $@ # STDTEST_PORTABLE; @@ -126,10 +126,10 @@ -c $(srcdir)/mod_test.c OBJECTS_mod_test = mod_test.lo -mod_test.la: $(OBJECTS_mod_test) +mod_test.la: $(OBJECTS_mod_test) $(LOCAL_LIBS) $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -rpath `pwd` -module \ -avoid-version $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ \ - $(OBJECTS_mod_test) + $(OBJECTS_mod_test) $(LOCAL_LIBS) OBJECTS_libmod_test = mod_test.lo $(LOCAL_LIBS) libmod_test.la: $(OBJECTS_libmod_test) Index: apr-svn/include/apr.h.in =================================================================== --- apr-svn/include/apr.h.in (revision 1087388) +++ apr-svn/include/apr.h.in (working copy) @@ -472,6 +472,8 @@ */ #define APR_THREAD_FUNC @apr_thread_func@ +#if defined(DOXYGEN) || !defined(WIN32) + /** * The public APR functions are declared with APR_DECLARE(), so they may * use the most appropriate calling convention. Public APR functions with @@ -524,6 +526,20 @@ */ #define APR_DECLARE_DATA +#elif defined(APR_DECLARE_STATIC) +#define APR_DECLARE(type) type __stdcall +#define APR_DECLARE_NONSTD(type) type __cdecl +#define APR_DECLARE_DATA +#elif defined(APR_DECLARE_EXPORT) +#define APR_DECLARE(type) __declspec(dllexport) type __stdcall +#define APR_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl +#define APR_DECLARE_DATA __declspec(dllexport) +#else +#define APR_DECLARE(type) __declspec(dllimport) type __stdcall +#define APR_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl +#define APR_DECLARE_DATA __declspec(dllimport) +#endif + #if !defined(WIN32) || defined(APU_MODULE_DECLARE_STATIC) /** * Declare a dso module's exported module structure as APR_MODULE_DECLARE_DATA. Index: apr-svn/configure.in =================================================================== --- apr-svn/configure.in (revision 1087388) +++ apr-svn/configure.in (working copy) @@ -293,7 +293,7 @@ if test "x$use_libtool" = "xyes"; then lt_compile='$(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -o $@ -c $< && touch $@' LT_VERSION="-version-info `$get_version libtool $version_hdr APR`" - link="\$(LIBTOOL) \$(LTFLAGS) --mode=link \$(LT_LDFLAGS) \$(COMPILE) \$(LT_VERSION) \$(ALL_LDFLAGS) -o \$@" + link="\$(LIBTOOL) \$(LTFLAGS) --mode=link \$(COMPILE) \$(LT_LDFLAGS) \$(LT_VERSION) \$(ALL_LDFLAGS) -o \$@" so_ext='lo' lib_target='-rpath $(libdir) $(OBJECTS)' export_lib_target='-rpath \$(libdir) \$(OBJECTS)' @@ -309,6 +309,9 @@ *-solaris2*) apr_platform_runtime_link_flag="-R" ;; + *-mingw* | *-cygwin*) + LT_LDFLAGS="$LT_LDFLAGS -no-undefined" + ;; *) ;; esac @@ -443,6 +446,14 @@ APR_SETVAR(CC,mwcc) APR_SETVAR(AR,ar) ;; + + *-mingw* | *-cygwin*) + if test "$enable_shared" = yes; then + APR_ADDTO(CPPFLAGS, -DAPR_DECLARE_EXPORT) + else + APR_ADDTO(CPPFLAGS, -DAPR_DECLARE_STATIC) + fi + ;; esac AC_CACHE_CHECK([whether the compiler provides atomic builtins], [ap_cv_atomic_builtins], @@ -679,14 +690,8 @@ dnl end up LIBS="-lm -lcrypt -lnsl -ldl" which is an annoyance. case $host in *-mingw*) - AC_CHECK_LIB(msvcrt, getpid) - APR_CHECK_DLL_FUNC(kernel32, SetErrorMode@4) - APR_CHECK_DLL_FUNC(advapi32, GetSecurityInfo@32) - APR_CHECK_DLL_FUNC(ws2_32, gethostbyname@4) - APR_CHECK_DLL_FUNC(shell32, CommandLineToArgvW@8) - APR_CHECK_DLL_FUNC(kernel32,[CreateFileMappingA@24], - [ac_cv_func_CreateFileMapping=$ac_cv_lib_kernel32_CreateFileMappingA]) - APR_CHECK_DLL_FUNC(rpcrt4,[UuidCreate@4]) + APR_ADDTO(LIBS,[-lshell32 -ladvapi32 -lws2_32 -lrpcrt4 -lmswsock]) + ac_cv_func_CreateFileMapping=yes ;; *) AC_SEARCH_LIBS(gethostbyname, nsl)