|
From: Allin C. <cot...@wf...> - 2009-05-09 01:10:27
|
On Fri, 8 May 2009, Ethan Merritt wrote: > On Friday 08 May 2009 15:00:15 Allin Cottrell wrote: > > plotter does have a point. I just checked the configure script > > for my program, gretl, and part of the boiler-plate output from > > ./configure --help is: > > > > System types: > > --build=BUILD configure for building on BUILD [guessed] > > --host=HOST cross-compile to build programs to run on HOST [BUILD] > > > > I certainly didn't add that explicitly; it's the output from some > > standard autoconf macro (not sure which; maybe AC_PROG_CC?). > > It's a bit surprising that it's not present in gnuplot's > > "configure --help" output. > > I have not done cross-compilation, so take this with a grain of salt, > but as I read the autoconf man pages, the idea is that if you use one of > the cross-compilation macros like AC_PROG_CC in the ./configure script > two things happen. First, it tests for successful use of the CC=foo > compiler flags. Second, if the test succeeds it allows you to define > conditional code options based on the knowledge that this is a > cross-compiled build. > > So far as I know, the gnuplot source has no conditional code that would > be triggered by AC_PROG_CC. So I would have expected that setting > CC to "--host=arm-linux" explicitly was sufficient; i.e. you wouldn't > have to do it via the AC_PROG_CC macro. I think one benefit of using AC_PROG_CC is simply that it displays help for such compiler-related options in response to configure --help. Also -- though I'm on less firm ground here -- it's possible that autoconf is in some ways cleverer than we think (although sometimes it can seem inordinately stupid). That is, using AC_PROG_CC _may_ cause some things to work out correctly for cross-compilation without requiring any intervention by the writer of configure.in or Makefile.* But, as with your comment, apply a grain of salt. Allin Cottrell |