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 # ------------------------- #