From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9084 invoked by alias); 3 Sep 2007 20:47:33 -0000 Received: (qmail 9076 invoked by uid 22791); 3 Sep 2007 20:47:32 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 03 Sep 2007 20:47:27 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 32026982A2; Mon, 3 Sep 2007 20:47:28 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id B209298109; Mon, 3 Sep 2007 20:47:27 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1ISIpQ-0002Aj-A6; Mon, 03 Sep 2007 16:47:24 -0400 Date: Mon, 03 Sep 2007 20:47:00 -0000 From: Daniel Jacobowitz To: Thiago Jung Bauermann Cc: gdb-patches , Baurzhan Ismagulov Subject: Re: [patch] add --with-expat configure option Message-ID: <20070903204724.GB26767@caradoc.them.org> Mail-Followup-To: Thiago Jung Bauermann , gdb-patches , Baurzhan Ismagulov References: <1176510719.13824.25.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1176510719.13824.25.camel@localhost.localdomain> User-Agent: Mutt/1.5.15 (2007-04-09) 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-09/txt/msg00037.txt.bz2 On Fri, Apr 13, 2007 at 09:31:59PM -0300, Thiago Jung Bauermann wrote: > 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... Thanks. I decided to check in this version instead; it makes missing expat a fatal error if --with-expat is given. This is useful for people who do automated builds and expect them to have consistent features. -- Daniel Jacobowitz CodeSourcery 2007-09-03 Daniel Jacobowitz * configure.ac: Add --with-expat. * configure: Regenerated. Index: configure.ac =================================================================== RCS file: /cvs/src/src/gdb/configure.ac,v retrieving revision 1.50 diff -u -p -r1.50 configure.ac --- configure.ac 3 Sep 2007 19:00:16 -0000 1.50 +++ configure.ac 3 Sep 2007 20:44:18 -0000 @@ -352,15 +352,30 @@ AC_SUBST(READLINE) AC_SUBST(READLINE_DEPS) AC_SUBST(READLINE_CFLAGS) -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.]) +AC_ARG_WITH(expat, + AS_HELP_STRING([--with-expat], [include expat support (auto/yes/no)]), + [], [with_expat=auto]) +AC_MSG_CHECKING([whether to use expat]) +AC_MSG_RESULT([$with_expat]) + +if test "${with_expat}" = no; then + AC_MSG_WARN([expat support disabled; some features may be unavailable.]) + HAVE_LIBEXPAT=no else - save_LIBS=$LIBS - LIBS="$LIBS $LIBEXPAT" - AC_CHECK_FUNCS(XML_StopParser) - LIBS=$save_LIBS + AC_LIB_HAVE_LINKFLAGS([expat], [], [#include "expat.h"], + [XML_Parser p = XML_ParserCreate (0);]) + if test "$HAVE_LIBEXPAT" != yes; then + if test "$with_expat" = yes; then + AC_MSG_ERROR([expat is missing or unusable]) + else + AC_MSG_WARN([expat is missing or unusable; some features may be unavailable.]) + fi + else + save_LIBS=$LIBS + LIBS="$LIBS $LIBEXPAT" + AC_CHECK_FUNCS(XML_StopParser) + LIBS=$save_LIBS + fi fi # ------------------------- #