From: Daniel Jacobowitz Date: Mon, 3 Sep 2007 20:47:37 +0000 (+0000) Subject: * configure.ac: Add --with-expat. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5c39566fee184453112f884bfb4a2bcf8d93b6ae;p=binutils-gdb.git * configure.ac: Add --with-expat. * configure: Regenerated. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c54a9327783..185649e9cf5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2007-09-03 Daniel Jacobowitz + + * configure.ac: Add --with-expat. + * configure: Regenerated. + 2007-09-03 Andreas Schwab * configure.ac: Accept --with-system-readline. diff --git a/gdb/configure b/gdb/configure index 185f19c250d..7b90943a15f 100755 --- a/gdb/configure +++ b/gdb/configure @@ -878,6 +878,7 @@ Optional Packages: --with-separate-debug-dir=path Look for global separate debug info in this path LIBDIR/debug --with-libunwind Use libunwind frame unwinding support --with-system-readline use installed readline library + --with-expat include expat support (auto/yes/no) --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib --without-libexpat-prefix don't search for libexpat in includedir and libdir @@ -5739,6 +5740,24 @@ fi +# Check whether --with-expat or --without-expat was given. +if test "${with_expat+set}" = set; then + withval="$with_expat" + +else + with_expat=auto +fi; +echo "$as_me:$LINENO: checking whether to use expat" >&5 +echo $ECHO_N "checking whether to use expat... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $with_expat" >&5 +echo "${ECHO_T}$with_expat" >&6 + +if test "${with_expat}" = no; then + { echo "$as_me:$LINENO: WARNING: expat support disabled; some features may be unavailable." >&5 +echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} + HAVE_LIBEXPAT=no +else + if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else @@ -6390,12 +6409,18 @@ echo "${ECHO_T}$LIBEXPAT" >&6 -if test "$HAVE_LIBEXPAT" != yes; then - { echo "$as_me:$LINENO: WARNING: expat is missing or unusable; some features may be disabled." >&5 -echo "$as_me: WARNING: expat is missing or unusable; some features may be disabled." >&2;} -else - save_LIBS=$LIBS - LIBS="$LIBS $LIBEXPAT" + if test "$HAVE_LIBEXPAT" != yes; then + if test "$with_expat" = yes; then + { { echo "$as_me:$LINENO: error: expat is missing or unusable" >&5 +echo "$as_me: error: expat is missing or unusable" >&2;} + { (exit 1); exit 1; }; } + else + { echo "$as_me:$LINENO: WARNING: expat is missing or unusable; some features may be unavailable." >&5 +echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} + fi + else + save_LIBS=$LIBS + LIBS="$LIBS $LIBEXPAT" for ac_func in XML_StopParser do @@ -6498,7 +6523,8 @@ _ACEOF fi done - LIBS=$save_LIBS + LIBS=$save_LIBS + fi fi # ------------------------- # diff --git a/gdb/configure.ac b/gdb/configure.ac index 4fdf4165b28..6a150aa534a 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -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 # ------------------------- #