[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Automake/Libtool: Compiling the same source as C and C++

From: Hugh Dickinson
Subject: Automake/Libtool: Compiling the same source as C and C++
Date: Wed, 22 Sep 2010 16:50:33 +0200

I am trying to convert an existing software package to build using the GNU 
autotools. The source code contains several files with .c and .cc which are 
designed to be compiled both as C and C++ regardless of their suffix (i.e. they 
contain conditionally compiled code #ifdef _cplusplus preprocessor directives). 
Unfortunately it seems like automake hard-codes the libtool "--tag" value 
directly into the based on the file suffix. Moreover, it appears 
that none of the target specific variables like "target_LIBTOOLFLAGS" can 
override this behaviour (they only add extra options after the first --tag 
flag). Is there any way to override this behaviour so that the --tag flag is 
not specified automatically, or will I need to make copies of all the source 
with new file suffixes so that automake instructs libtool to compile them with 
the appropriate compiler.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]