autoconf
[Top][All Lists]
Advanced

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

How to let autoconf NOT include ($CFLAGS) in LINK?


From: autoconf-list
Subject: How to let autoconf NOT include ($CFLAGS) in LINK?
Date: Thu, 21 Jul 2005 07:29:51 +0000
User-agent: Internet Messaging Program (IMP) H3 (4.0.2) / FreeBSD-5.3

Sorry if this is a question already answered, but I couldn't find this on
google, this list and the manual, searching for "LINK (without) ($CFLAGS)"

The fact is that after running autoconf and automake, the makefile tries to link
while also putting $CFLAGS on the command line. I checked that the ($CFLAGS)
directive was also present in Makefile.in, so I guess that rules out an
automake issue then. I, however, do not know whether this is a libtool or
autoconf issue.

Now, gcc handles compiler flags on the command line well when linking, but 'ld'
on a Tru64 machine doesn't :-)

So my question is, is there a simple way to only include ($CFLAGS) when
compiling, and only ($LDFLAGS) when linking, NOT ($CFLAGS)?

For the record, the (I hope) relevant lines in configure.in are:

Oh, and by the way, I tried setting LDFLAGS to "" using AC_SUBST, but that
didn't help either :-)

[ QUOTE configure.in ]

AM_DISABLE_SHARED

# Checks for programs
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_AWK
AC_PROG_LIBTOOL

# Checks for header files.
{ SNIP }

# Checks for typedefs, structures, and compiler characteristics.
{ SNIP }

# Checks for library functions.
{ SNIP }

#create include variable

#create compiler options
AC_SUBST(CFLAGS, "-g -O -Wall -ansi")

[ /QUOTE ]

and my Makefile.am:

[ QUOTE Makefile.am ]

bin_PROGRAMS = synop_zzz

synop_zzz_SOURCES = synop_zzz.c
synop_zzz_LDADD = @top_srcdir@/generic/libgeneric.la
@top_srcdir@/bufr_parser/libbufr_parser.la
@top_srcdir@/conversions/libconversions.la

INCLUDES = address@hidden@/generic address@hidden@/bufr_parser
address@hidden@/conversions

[ /QUOTE ]




reply via email to

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