--- origsrc/sofia-sip-1.12.11/m4/sac-general.m4 2011-03-11 15:49:19.000000000 +0100 +++ src/sofia-sip-1.12.11/m4/sac-general.m4 2016-08-08 17:26:34.932381800 +0200 @@ -360,6 +360,12 @@ if test "$machine" = mingw32 ; then sac_cv_cc_environment=$machine fi +if test "$machine" = x86_64-w64-mingw32 ; then + sac_cv_cc_environment=$machine +fi +if test "$machine" = i686-w64-mingw32 ; then + sac_cv_cc_environment=$machine +fi ]) if test "$sac_cv_cc_environment" = mingw32 ; then @@ -375,6 +381,34 @@ AC_DEFINE([HAVE_MINGW], [1], [Define to 1 if you are compiling in MinGW environment]) AC_DEFINE([HAVE_WIN32], [1], [Define to 1 if you have WIN32]) fi +if test "$sac_cv_cc_environment" = x86_64-w64-mingw32 ; then +CFLAGS="$CFLAGS -DWINVER=0x0A00 \ + -D_WIN32_WINNT=0x0A00 -DIN_LIBSOFIA_SIP_UA -DIN_LIBSOFIA_SRES \ + -mms-bitfields \ + -pipe -mwindows -mconsole -Wall -g -O0" +LDFLAGS="$LDFLAGS -Wl,--enable-auto-image-base" +LIBS="-lws2_32 -liphlpapi \ + -lwsock32" +MINGW_ENVIRONMENT=1 +AC_SUBST(MINGW_ENVIRONMENT) +AC_DEFINE([HAVE_MINGW], [1], [Define to 1 if you are compiling in MinGW environment]) +AC_DEFINE([HAVE_WIN32], [1], [Define to 1 if you have WIN32]) +AC_DEFINE([HAVE_MINGW64], [1], [Define to 1 if you are compiling in MinGW64 environment]) +fi +if test "$sac_cv_cc_environment" = i686-w64-mingw32 ; then +CFLAGS="$CFLAGS -DWINVER=0x0A00 \ + -D_WIN32_WINNT=0x0A00 -DIN_LIBSOFIA_SIP_UA -DIN_LIBSOFIA_SRES \ + -mms-bitfields \ + -pipe -mwindows -mconsole -Wall -g -O0" +LDFLAGS="$LDFLAGS -Wl,--enable-auto-image-base" +LIBS="-lws2_32 -liphlpapi \ + -lwsock32" +MINGW_ENVIRONMENT=1 +AC_SUBST(MINGW_ENVIRONMENT) +AC_DEFINE([HAVE_MINGW], [1], [Define to 1 if you are compiling in MinGW environment]) +AC_DEFINE([HAVE_WIN32], [1], [Define to 1 if you have WIN32]) +AC_DEFINE([HAVE_MINGW32], [1], [Define to 1 if you are compiling in MinGW32 environment]) +fi AM_CONDITIONAL([HAVE_MINGW32], [test "x$sac_cv_cc_environment" != x]) ])dnl