Re: [Gpsbabel-code] r4125 "Add configure-time check for Windows DDK for delbin. Improve expat guess
Brought to you by:
robertl
From: Fabrizio G. <fab...@ti...> - 2011-11-26 12:01:10
|
With the attached patch, AC_DEFINE(HAVE_LIBEXPAT) is also called in case --with-libexpat is passed. Regards, Fabrizio Il 26/11/2011 01:03, tsteven4 ha scritto: > I think the problem in the new configure script is the new if at line > 4567. I think this pairs with the new else at 4641 and fi at line 4644. > Basically I think we now skip the autodetection if ${EXPAT_LIB} is > non-blank, and the autodetection was what was setting HAVE_LIBEXPAT. > I didn't verify this with shell debugging, but it seems like a good > hypothesis to me, and is supported by the bits of the log below. >> 4567 if test "x${EXPAT_LIB}" = x; then >> 4568 { echo "$as_me:$LINENO: result: try to autodetect" >&5 >> 4569 echo "${ECHO_T}try to autodetect" >&6; } >> 4570 { echo "$as_me:$LINENO: checking for XML_ParserCreate in >> -lexpat" >&5 >> 4571 echo $ECHO_N "checking for XML_ParserCreate in -lexpat... >> $ECHO_C" >&6; } > ... >> 4633 cat >>confdefs.h <<\_ACEOF >> 4634 #define HAVE_LIBEXPAT 1 >> 4635 _ACEOF >> 4636 >> 4637 EXPAT_LIB=-lexpat >> 4638 >> 4639 fi >> 4640 >> 4641 else >> 4642 { echo "$as_me:$LINENO: result: $EXPAT_LIB" >&5 >> 4643 echo "${ECHO_T}$EXPAT_LIB" >&6; } >> 4644 fi > > > Here is a few bits from config.log > r4125 >> configure:4458: checking for random stuff to make you feel better >> configure:4460: result: failed >> configure:4495: checking for libexpat >> configure:4642: result: -L./mingw/lib -lexpat >> configure:4647: checking for efence >> configure:4661: result: > > r4124: >> configure:4397: checking for random stuff to make you feel better >> configure:4399: result: failed >> configure:4434: checking for libexpat >> configure:4512: result: -L./mingw/lib -lexpat >> configure:4515: checking for XML_ParserCreate in -lexpat >> configure:4550: i686-pc-mingw32-gcc -o conftest.exe >> -I./mingw/include/ddk -Wall -I./mingw/include -L./mingw/lib >> conftest.c -lexpat -lm >&5 >> configure:4556: $? = 0 >> configure:4574: result: yes >> configure:4587: checking for efence >> configure:4601: result: > > Here is a bit of configure from r4124 that lines up with the line > numbers in the r4124 config.log snippet above. You can see that > HAVE_LIBEXPAT would have been defined on line 4579 after line 4574 > echo'd "result: yes". >> 4569 >> 4570 rm -f core conftest.err conftest.$ac_objext >> conftest_ipa8_conftest.oo \ >> 4571 conftest$ac_exeext conftest.$ac_ext >> 4572 LIBS=$ac_check_lib_save_LIBS >> 4573 fi >> 4574 { echo "$as_me:$LINENO: result: >> $ac_cv_lib_expat_XML_ParserCreate" >&5 >> 4575 echo "${ECHO_T}$ac_cv_lib_expat_XML_ParserCreate" >&6; } >> 4576 if test $ac_cv_lib_expat_XML_ParserCreate = yes; then >> 4577 >> 4578 cat >>confdefs.h <<\_ACEOF >> 4579 #define HAVE_LIBEXPAT 1 >> 4580 _ACEOF >> 4581 >> 4582 >> 4583 >> 4584 fi > > Best wishes for a speedy recovery for your wife, > Steve > > > On 11/25/2011 4:35 PM, Robert Lipe wrote: >> >> >> On Fri, Nov 25, 2011 at 4:55 PM, tsteven4 <tst...@gm... >> <mailto:tst...@gm...>> wrote: >> >> I can cross compile on centos 5.7 with r4124. The resulting >> gpsbabel.exe has expat and the kml format works. >> >> >> Thanx for the good detective work. tools/win-cross-config is indeed >> what I use to build the Windows executables on my Mac. (Before I went >> Mac, I cross built them on Linux.) You should see something like >> >> checking for libexpat... -L./mingw/lib -lexpat >> >> >> during the configure phase. If Fabrizio doesn't recognize this, >> please edit configure (yes, I know it's a rather unpleasant generated >> file) and throw a "set -x" before about line 4464 and a "set +x" >> after 4645 or so and re-run that configure. The idea is to turn >> shell debugging on before doing the interesting part and then back >> off before it runs the remaining 2,000 lines of shell in that script. >> >> I'd considered cutting 1.4.3 this weekend, but between an unscheduled >> surgical procedure and my wife being in an accident which probably >> totaled her car (she's fine - just another thing to be thankful for >> this holiday weekend) I can't say I'm feeling the love for it. >> >> Defending our download site against the stupid sites in China and >> India that are cranking off 10,000+ downloads a day and thousands of >> page fetches a minute (of the same page...often with script kiddy >> attempts to hax0r Microsoft BackOffice and other silly things ) is >> not helping my mood. >> >> RJL >> >> >> If I try the same cross compile with r4125 the resulting >> gpsbabel.exe does not have expat and thus the kml format is dead. >> I get a message "kml: This build excluded KML support because >> expat was not installed." >> >> The resulting Makefile for the two builds is identical. However >> there is a one line difference in config.h >> >> ~/work/gpsbabel-r4124% diff config.h ../gpsbabel-r4125 >> 14c14 >> < #define HAVE_LIBEXPAT 1 >> --- >> > /* #undef HAVE_LIBEXPAT */ >> >> >> In both cases I configure with the following command, inspired by >> tools/win-cross-config: >> >> CFLAGS="-I./mingw/include/ddk" \ >> ./configure --host=i686-pc-mingw32 \ >> --with-expathdr=./mingw/include \ >> --with-libexpat=./mingw/lib >> >> In both cases I attempt to dynamically link to libexpat.dll from >> msvc/Expat. >> >> I can investigate a further but I wanted to alert you to a >> potential problem with the beta (depending on where the final cut >> for the beta is). >> >> |