include path

Richard Stuckey
Mon Feb 2 11:55:00 GMT 2009


Does anyone know how to add a filepath to the gcc compilation command
used in building gdb?

I am trying to change the gdb script to handle the
configuration options

       --with-xiss  --with-xiss-prefix=/<somepath>

i.e. much like the existing options

       -with-expat --with-libexpat-prefix=/<somepath>

If the user does specify these options, I want the script simply to
define a macro, e.g. HAVE_LIBXISS (actual name not too important!) and
add the given path as a -I<path> option to the gcc command line used
when building gdb (this additional path is necessary for compiling only
one target-specific module).

I have copied and altered the code in which handles expat
to give me 

  AS_HELP_STRING([--with-xiss], [include xiss support (auto/yes/no)]),
  [], [with_xiss=auto])
AC_MSG_CHECKING([whether to use xiss])

if test "${with_xiss}" = no; then
    AC_MSG_WARN([xiss support disabled; target arcxiss will be
    AC_DEFINE(HAVE_LIBXISS, 1, [Define if you have the xISS library.])

so that the AC_DEFINE macro defines HAVE_LIBXISS as needed.  However, I
can not find a way of adding the include path.

I do not want to use the AC_LIB_HAVE_LINKFLAGS macro as that performs a
stronger check than is required here: it checks that the library
specified really does exist, and is loadable, whereas I simply want to
get a path to the header file which defines the interface to that
library, as the target-specific module checks for the existence of the
library at runtime and loads it dynamically if required.

I have tried using the AC_LIB_APPENDTOVAR macro to add the path to the
CPPFLAGS macro, but that has no effect.

Anyone know how to do this?



More information about the Gdb mailing list