As an addendum to this topic, it used to be easy to override how Automake uses libtool, but this is no longer the case. For example, I could insert this in Makefile.am to override the default:
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) unfortunately, current Automake inserts oodles of target-specific rules that hard-code how libtool is executed on a per-target basis so that its operation can not be overridden in the Makefile.am on a per-language basis. Only the simple pattern rules use LTCOMPILE and friends. The libtool --tag option must appear before $(CC). I do not see a trivial way to add the --tag option to Makefile.in. Bob On Tue, 25 Nov 2003, Bob Friesenhahn wrote: > In a build environment I am creating using Automake 1.7.9 & CVS > libtool, GCC (gcc & g++) are used as the normal compiler. However, > sometimes developers want to substitute 'insure' as the compiler in > order to do memory leak checking. My understanding is that 'insure' > runs the tested gcc or g++ under the covers so from libtool's > perspective, there should be no change. > > Unfortunately, it is not possible to simply substitute one compiler > name for another since libtool uses the compiler name to determine the > tag. It turns out that adding --tag=CC for C, and --tag=CXX for C++, > is sufficient to cause libtool to accept the new compiler name using > an existing tagged configuration. > > Does anyone have some experience they can share with accomplishing > this in an Automake-based environment? It would be useful if Automake > would detect libtool 1.5 or greater and automatically supply the > correct --tag option at the correct points. > > Bob > ====================================== > Bob Friesenhahn > [EMAIL PROTECTED] > http://www.simplesystems.org/users/bfriesen > > > ====================================== Bob Friesenhahn [EMAIL PROTECTED] http://www.simplesystems.org/users/bfriesen