autoconf
[Top][All Lists]
Advanced

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

Re: CFLAGS default values


From: Kevin Ryde
Subject: Re: CFLAGS default values
Date: Sun, 30 Nov 2003 08:54:16 +1000
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Bob Friesenhahn <address@hidden> writes:
>
> Agreed.  However, shouldn't Autoconf provide a means for the package
> maintainer to semi-intelligently set a CFLAGS default?

In gmp we establish a CFLAGS before AC_PROG_CC, but with care not to
overwrite a user setting (including an empty setting),

        test_CFLAGS=${CFLAGS+set}
        if test "$test_CFLAGS" != set; then
          # mucho smart options defaulting
          ...
        fi

        AC_PROG_CC

> Unfortunately, the option flags vary across Unix compilers so once you
> go beyond simple '-g' and '-O', it becomes necessary to test if the
> compiler accepts a given option.

Yep, a test run on a sample main, anticipating more or less what
AC_PROG_CC will do.




reply via email to

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