* configure.ac: Add --with-expat.
authorDaniel Jacobowitz <drow@false.org>
Mon, 3 Sep 2007 20:47:37 +0000 (20:47 +0000)
committerDaniel Jacobowitz <drow@false.org>
Mon, 3 Sep 2007 20:47:37 +0000 (20:47 +0000)
* configure: Regenerated.

gdb/ChangeLog
gdb/configure
gdb/configure.ac

index c54a93277834cfef2735aa5333b2210d6a4d196f..185649e9cf5d83dcec52c89046688c953f4ed0ac 100644 (file)
@@ -1,3 +1,8 @@
+2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * configure.ac: Add --with-expat.
+       * configure: Regenerated.
+
 2007-09-03  Andreas Schwab  <schwab@suse.de>
 
        * configure.ac: Accept --with-system-readline.
index 185f19c250d38070b9db80919820cd186cb1bf7a..7b90943a15fd6b60b35812d6d1eb7258be29491c 100755 (executable)
@@ -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
 
 # ------------------------- #
index 4fdf4165b28844724860bdb89ffd0b061043560a..6a150aa534af299de6d1d23a71e72c45c037a76f 100644 (file)
@@ -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
 
 # ------------------------- #