autoconf
[Top][All Lists]
Advanced

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

AC_SUBST(CCLD)


From: Too, Justin A.
Subject: AC_SUBST(CCLD)
Date: Wed, 9 Feb 2011 10:57:31 -0800
User-agent: Microsoft-MacOutlook/14.0.0.100825

Hi,
I am using Autotools (Autoconf, Automake, Libtools):

Currently, I have CCLD set to $(CC). Using AC_SUBST, all Makefile's will 
contain this variable.

Config:
CC=gcc
CCLD="$(CC)"
AC_SUBST(CCLD)

Generated Makefiles:
CCLD = gcc

The problem, however, is that I use different compilers for certain 
directories. So, for example:

$ cd dir1/
$ gcc-4.1.2 –c –o helloworld.o helloworld.c
$ libtool --tag=CC —mode=link $(CCLD) -o helloworld.out helloworld.o

$ cd dir2/
$ gcc-3.3.6 –c –o helloworld.o helloworld.c
$ libtool —tag=CC —mode=link $(CCLD) -o helloworld.out helloworld.o

Then, the same $(CCLD) linker is being used for both directories, but I need to 
use the appropriate linkers
for each directory, i.e. gcc-4.1.2 and gcc-3.3.6.

Then, my question is: how can I set CCLD appropriately for different Makefiles 
so autoconf will generate the
appropriate Libtool link rules for my Makefiles? Or any other suggestions?

Thanks,
Justin


reply via email to

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