This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
include path
- From: "Richard Stuckey" <Richard dot Stuckey at arc dot com>
- To: <gdb at sourceware dot org>
- Date: Mon, 2 Feb 2009 11:55:39 -0000
- Subject: include path
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