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
