Hi all,
this patch fixes the configuration problem as reported here:
http://thread.gmane.org/gmane.comp.telephony.sofia-sip.devel/3853
$LIBS and $CFLAGS need to be expanded at the configuration level,
otherwise when using them during configuration they will be wrong,
resulting in many failing tests and in a fatal error which happens
in the code from configure.ac:
if test $ac_cv_c_ll_format = yes; then
AC_DEFINE([LLU], ["%llu"], [Format (%llu) for unsigned long long])dnl
AC_DEFINE([LLI], ["%lli"], [Format (%lli) for long long])dnl
AC_DEFINE([LLX], ["%llx"], [Format (%llx) for long long hex])dnl
else
AC_MSG_ERROR("printf cannot handle 64-bit integers")
fi
This is what you can find in config.log:
configure:24311: gcc -o conftest.exe -g -O2 -I./win32/pthread -DWINVER=0x0501
-D_WIN32_WINNT=0x0501 -DIN_LIBSOFIA_SIP_UA -DIN_LIBSOFIA_SRES -mms-bitfields
-pipe -mno-cygwin -mwindows -mconsole -Wall -g -O0 -Wl,--enable-auto-image-bas
e conftest.c -L$(top_srcdir)/win32/pthread -lpthreadVC2 -lws2_32 -lwsock3
2 >&5
c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: cannot fin
d -lpthreadVC2
collect2: ld returned 1 exit status
configure:24311: $? = 1
configure: program exited with status 1
configure: failed program was:
Patch attached, regards.
>From 7d74c8b50b33469667006c50e902e690620ce5dd Mon Sep 17 00:00:00 2001
Message-Id: <7d74c8b50b33469667006c50e902e690620ce5dd.1278413394.git.stefano.sabatini-l...@poste.it>
From: Stefano Sabatini <stefano.sabatini-l...@poste.it>
Date: Tue, 6 Jul 2010 12:28:11 +0200
Subject: [fix-mingw-compilation PATCH] Fix configuration in MinGW.
CFLAGS and LIBS need to be expanded at configuration time, otherwise
many configure test will fail and the configure will abort with the
message:
configure: error: "printf cannot handle 64-bit integers"
---
m4/sac-general.m4 | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/m4/sac-general.m4 b/m4/sac-general.m4
index b494de1..de0ba9a 100644
--- a/m4/sac-general.m4
+++ b/m4/sac-general.m4
@@ -359,12 +359,12 @@ fi
])
if test "$ac_cc_environment" = mingw32 ; then
-CFLAGS="$CFLAGS -I\$(top_srcdir)/win32/pthread -DWINVER=0x0501 \
+CFLAGS="$CFLAGS -I${srcdir}/win32/pthread -DWINVER=0x0501 \
-D_WIN32_WINNT=0x0501 -DIN_LIBSOFIA_SIP_UA -DIN_LIBSOFIA_SRES \
-mms-bitfields \
-pipe -mno-cygwin -mwindows -mconsole -Wall -g -O0"
LDFLAGS="$LDFLAGS -Wl,--enable-auto-image-base"
-LIBS="-L\$(top_srcdir)/win32/pthread -lpthreadVC2 -lws2_32 \
+LIBS="-L${srcdir}/win32/pthread -lpthreadVC2 -lws2_32 \
-lwsock32"
MINGW_ENVIRONMENT=1
AC_SUBST(MINGW_ENVIRONMENT)
--
1.7.1
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel