Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* include path
@ 2009-02-02 11:55 Richard Stuckey
  2009-02-02 15:03 ` Daniel Jacobowitz
  2009-02-02 18:02 ` Tom Tromey
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Stuckey @ 2009-02-02 11:55 UTC (permalink / raw)
  To: gdb

Hello,

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

I am trying to change the gdb configure.ac 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 configure.ac which handles expat
to give me 

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

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

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?

      Thanks,

            Richard




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-02-03 12:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-02 11:55 include path Richard Stuckey
2009-02-02 15:03 ` Daniel Jacobowitz
2009-02-02 16:20   ` Richard Stuckey
2009-02-02 18:02 ` Tom Tromey
2009-02-03 12:43   ` Richard Stuckey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox