autoconf
[Top][All Lists]
Advanced

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

Re: Setting compiler flags via AC_ARG_WITH in configure.in


From: Steve M. Robbins
Subject: Re: Setting compiler flags via AC_ARG_WITH in configure.in
Date: Thu, 19 Dec 2002 13:18:13 -0500
User-agent: Mutt/1.4i

On Thu, Dec 19, 2002 at 10:22:40AM +0100, Markus Werle wrote:

> I want to set include paths
> during configure run, e.g. --with-loki=/path/to/loki
> The following code works fine, but I feel unhappy about the
> use of an external environment variable.
> 
> Now I am tired reading the docs (20 hours at least).
> Please enlighten me and improve on this snippet
> 
> AC_ARG_WITH(loki,
>     [  --with-loki=LOKI_PREFIX
>                           place where loki headers reside ],
>     [ export CXXFLAGS="-I$withval $CXXFLAGS"])

One comment is that you really want to use CPPFLAGS rather than
CXXFLAGS.

Second, this idea has been generalized and wrapped up in
an autoconf macro that you can find at

  http://ac-archive.sourceforge.net/Installed_Packages/smr_with_build_path.html

-S



reply via email to

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