From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1114 invoked by alias); 14 Apr 2007 00:32:21 -0000 Received: (qmail 1106 invoked by uid 22791); 14 Apr 2007 00:32:20 -0000 X-Spam-Check-By: sourceware.org Received: from igw3.br.ibm.com (HELO igw3.br.ibm.com) (32.104.18.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 14 Apr 2007 01:32:18 +0100 Received: from mailhub1.br.ibm.com (unknown [9.18.232.109]) by igw3.br.ibm.com (Postfix) with ESMTP id BDB04390046 for ; Fri, 13 Apr 2007 21:25:18 -0300 (BRT) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.18.232.47]) by mailhub1.br.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l3E0W0fE577790 for ; Fri, 13 Apr 2007 21:32:00 -0300 Received: from d24av02.br.ibm.com (loopback [127.0.0.1]) by d24av02.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l3E0UtPq024781 for ; Fri, 13 Apr 2007 21:30:55 -0300 Received: from dyn532128.br.ibm.com (dyn532128.br.ibm.com [9.18.238.251]) by d24av02.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l3E0UtEn024778 for ; Fri, 13 Apr 2007 21:30:55 -0300 Subject: [patch] add --with-expat configure option From: Thiago Jung Bauermann To: gdb-patches Content-Type: multipart/mixed; boundary="=-+CpA7gXrxol300tabE4o" Date: Sat, 14 Apr 2007 08:15:00 -0000 Message-Id: <1176510719.13824.25.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00214.txt.bz2 --=-+CpA7gXrxol300tabE4o Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 440 Hi, I needed to disable compiling with the expat library even if present in the build system, so I created a --with-expat configure option to control that. Configuring with --with-expat=no or --without-expat will disable the expat test. The default is to use the library if available. I'm posting here in case you are interested in incorporating the change... -- []'s Thiago Jung Bauermann Software Engineer IBM Linux Technology Center --=-+CpA7gXrxol300tabE4o Content-Disposition: attachment; filename=with-expat-cvs-head.diff Content-Type: text/plain; name=with-expat-cvs-head.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 1481 2007-04-13 Thiago Jung Bauermann * configure.ac: Add --with-expat option. Index: configure.ac =================================================================== RCS file: /cvs/src/src/gdb/configure.ac,v retrieving revision 1.44 diff -u -r1.44 configure.ac --- configure.ac 11 Apr 2007 18:36:50 -0000 1.44 +++ configure.ac 13 Apr 2007 23:47:02 -0000 @@ -337,15 +337,26 @@ AC_MSG_ERROR([no termcap library found]) fi -AC_LIB_HAVE_LINKFLAGS([expat], [], [#include "expat.h"], - [XML_Parser p = XML_ParserCreate (0);]) -if test "$HAVE_LIBEXPAT" != yes; then - AC_MSG_WARN([expat is missing or unusable; some features may be disabled.]) -else - save_LIBS=$LIBS - LIBS="$LIBS $LIBEXPAT" - AC_CHECK_FUNCS(XML_StopParser) - LIBS=$save_LIBS +AC_ARG_WITH(expat, +[ --with-expat Use expat XML library (default=yes)], +[case "${withval}" in + yes) enable_expat=yes ;; + no) enable_expat=no ;; + *) AC_MSG_ERROR(bad value ${withval} for GDB with-expat option) ;; +esac],[ enable_expat=yes ]) + +if test x"$enable_expat" = xyes; then + AC_LIB_HAVE_LINKFLAGS([expat], [], [#include "expat.h"], + [XML_Parser p = XML_ParserCreate (0);]) + + if test "$HAVE_LIBEXPAT" != yes; then + AC_MSG_WARN([expat is missing or unusable; some features may be disabled.]) + else + save_LIBS=$LIBS + LIBS="$LIBS $LIBEXPAT" + AC_CHECK_FUNCS(XML_StopParser) + LIBS=$save_LIBS + fi fi # ------------------------- # --=-+CpA7gXrxol300tabE4o--