On Mon, 18 Dec 2006, Tom Russo wrote: > Have a block early on that adds those non-standard locations to LDFLAGS > and CPPFLAGS, e.g. (fudging on syntax here): > > switch ($target) > > > *darwin*) > LDFLAGS="-L/sw/lib $LDFLAGS" > CPPFLAGS="-I/sw/include $CPPFLAGS" > > ... etc. > > AC_CHECK_HEADERS and AC_CHECK_LIB use LDFLAGS and CPPFLAGS in the compile > and link lines they create, and setting them at the beginning like this takes > care of all the idiosyncrasies once and for all. We do stuff like this in > the configure script of our project at work. It makes for a fairly ugly > block of system-dependent crud at the top of the configure.ac file, but really > saves you a ton of system-dependent crud scattered all over the configure.ac > file. > > Autotools are good for picking up most system details like "does the compiler > support left-handed ternary operators on user-defined bogons?" but are not > meant for searching the entire system for matching libraries --- which leads > to a real pain when systems come up with their own arbitrary choices for > where to put things (/opt, /sw/, /whatevertheheck/). Fortunately, the > macros make consistent use of things like LDFLAGS and CPPFLAGS, so there's > a clean way to force it for specific systems.
Since we only use the "darwin" flag in two places, and since things like /sw, /opt, and /opt/local wouldn't normally hurt to search on non-OSX systems, how about adding those search paths at the beginning of configure.ac and/or acinclude.m4 in all cases? I don't see a reason to make it system-specific in this case. -- Curt, WE7U. APRS Client Comparisons: http://www.eskimo.com/~archer "Lotto: A tax on people who are bad at math." -- unknown "Windows: Microsoft's tax on computer illiterates." -- WE7U "The world DOES revolve around me: I picked the coordinate system!" _______________________________________________ Xastir mailing list [email protected] http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir
