* [patch] add --with-expat configure option
@ 2007-04-14 8:15 Thiago Jung Bauermann
2007-09-03 20:47 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Thiago Jung Bauermann @ 2007-04-14 8:15 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 440 bytes --]
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
[-- Attachment #2: with-expat-cvs-head.diff --]
[-- Type: text/plain, Size: 1481 bytes --]
2007-04-13 Thiago Jung Bauermann <bauerman@br.ibm.com>
* 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
# ------------------------- #
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] add --with-expat configure option
2007-04-14 8:15 [patch] add --with-expat configure option Thiago Jung Bauermann
@ 2007-09-03 20:47 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2007-09-03 20:47 UTC (permalink / raw)
To: Thiago Jung Bauermann; +Cc: gdb-patches, Baurzhan Ismagulov
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 <dan@codesourcery.com>
* 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
# ------------------------- #
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-03 20:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-14 8:15 [patch] add --with-expat configure option Thiago Jung Bauermann
2007-09-03 20:47 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox