From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15306 invoked by alias); 2 Feb 2009 11:55:50 -0000 Received: (qmail 15298 invoked by uid 22791); 2 Feb 2009 11:55:50 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_92,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service2-us.mimecast.com (HELO service2-us.mimecast.com) (209.59.2.2) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Mon, 02 Feb 2009 11:55:44 +0000 Received: from savm-exch03.arc.com (mailgate-sa02.arc.com [83.244.211.73]) by service2-us.mimecast.com; Mon, 02 Feb 2009 06:55:40 -0500 content-class: urn:content-classes:message MIME-Version: 1.0 Subject: include path Date: Mon, 02 Feb 2009 11:55:00 -0000 Message-ID: <5569E67A2E319949992066CE19C44BF608B2F5@savm-exch03.arc.com> From: "Richard Stuckey" To: X-MC-Unique: 109020206554000202 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-02/txt/msg00011.txt.bz2 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=3D/ i.e. much like the existing options -with-expat --with-libexpat-prefix=3D/ 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 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=20 AC_ARG_WITH(xiss, AS_HELP_STRING([--with-xiss], [include xiss support (auto/yes/no)]), [], [with_xiss=3Dauto]) AC_MSG_CHECKING([whether to use xiss]) AC_MSG_RESULT([$with_xiss]) =20 if test "${with_xiss}" =3D no; then AC_MSG_WARN([xiss support disabled; target arcxiss will be unavailable.]) HAVE_LIBXISS=3Dno else HAVE_LIBXISS=3Dyes 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