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

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

 



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 = -I@top_srcdir@/generic -I@top_srcdir@/bufr_parser
-I@top_srcdir@/conversions

[ /QUOTE ]


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux