On Jul  7, 2000, Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote:

> If I understand correctly a naive (and untested) implementation of
> this would be to add after AC_PATH_XTRA something like:

> if test -d /usr/include/X11 ; then
>   X_CFLAGS=`echo ${X_CFLAGS} | sed -e 's,-I/usr/openwin/include,,'`
> else
>   X_CFLAGS=`echo ${X_CFLAGS} | sed -e 's,-I\(/usr/openwin/include\),-isystem \1,'`
> fi

Yup.  But you can only use -isystem if your compile is gcc.  It's
probably a good idea to test whether the compiler supports the flag
before using it.

> However, before, implementing that, I wonder whether this has already
> been done (right) for some other C++ programs, using autoconf 2.13.

I believe DDD already does it.

> A particular question that I have is whether this -isystem flag is a
> GNU extension, and in which gcc versions it can be found.

I'm not sure whether there are GCC versions that don't support it.  In
any case, it's best to check whether it's supported before using it.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Reply via email to