Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Richard Stuckey" <Richard.Stuckey@arc.com>
To: <gdb@sourceware.org>
Subject: include path
Date: Mon, 02 Feb 2009 11:55:00 -0000	[thread overview]
Message-ID: <5569E67A2E319949992066CE19C44BF608B2F5@savm-exch03.arc.com> (raw)

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




             reply	other threads:[~2009-02-02 11:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-02 11:55 Richard Stuckey [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5569E67A2E319949992066CE19C44BF608B2F5@savm-exch03.arc.com \
    --to=richard.stuckey@arc.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox