* configure.ac: Add --enable-inprocess-agent option.
authorNathan Sidwell <nathan@codesourcery.com>
Thu, 9 Sep 2010 13:16:38 +0000 (13:16 +0000)
committerNathan Sidwell <nathan@codesourcery.com>
Thu, 9 Sep 2010 13:16:38 +0000 (13:16 +0000)
* configure: Rebuilt.

gdb/gdbserver/ChangeLog
gdb/gdbserver/configure
gdb/gdbserver/configure.ac

index f2db7c60aa4a35cb1da23a17b8a7ab61530c2dfc..b8c8bd7111efef39074db8b76a25bf0ebcfb7442 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * configure.ac: Add --enable-inprocess-agent option.
+       * configure: Rebuilt.
+
 2010-09-06  Yao Qi  <yao@codesourcery.com>
 
        * linux-low.c (linux_kill): Remove unused variable.
index 556cbb349d0f6a8481f161791f74ffb28f1d1987..aaa73fced50d62b2206835c4acb9f34d2e854a15 100755 (executable)
@@ -680,6 +680,7 @@ enable_werror
 with_pkgversion
 with_bugurl
 with_libthread_db
+enable_inprocess_agent
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1309,6 +1310,8 @@ Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-werror         treat compile warnings as errors
+  --enable-inprocess-agent
+                          inprocess agent
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -4904,15 +4907,38 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 CFLAGS="$saved_cflags"
 
+
 IPA_DEPFILES=""
+extra_libraries=""
 
-# Rather than allowing to build a broken IPA, we simply disable it if
-# we don't find a compiler supporting all the features we need.
+# check whether to enable the inprocess agent
 if test "$ipa_obj" != "" \
    -a "$gdbsrv_cv_have_sync_builtins" = yes \
    -a "$gdbsrv_cv_have_visibility_hidden" = yes; then
-   IPA_DEPFILES="$ipa_obj"
-   extra_libraries="libinproctrace.so"
+   have_ipa=true
+else
+   have_ipa=false
+fi
+
+# Check whether --enable-inprocess-agent was given.
+if test "${enable_inprocess_agent+set}" = set; then :
+  enableval=$enable_inprocess_agent; case "$enableval" in
+  yes) want_ipa=true ;;
+  no) want_ipa=false ;;
+  *) as_fn_error "bad value $enableval for inprocess-agent" "$LINENO" 5 ;;
+esac
+else
+  want_ipa=$have_ipa
+fi
+
+
+if $want_ipa ; then
+   if $have_ipa ; then
+     IPA_DEPFILES="$ipa_obj"
+     extra_libraries="$extra_libraries libinproctrace.so"
+   else
+     as_fn_error "inprocess agent not supported for this target" "$LINENO" 5
+   fi
 fi
 
 
index 85b1a7b05dd419677a89159a84083d2f83533683..b2fb0a09ad65c536c19ae69152d4649fcd8cbe16 100644 (file)
@@ -357,15 +357,35 @@ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),
                        [gdbsrv_cv_have_visibility_hidden=no])
 CFLAGS="$saved_cflags"
 
+
 IPA_DEPFILES=""
+extra_libraries=""
 
-# Rather than allowing to build a broken IPA, we simply disable it if
-# we don't find a compiler supporting all the features we need.
+# check whether to enable the inprocess agent
 if test "$ipa_obj" != "" \
    -a "$gdbsrv_cv_have_sync_builtins" = yes \
    -a "$gdbsrv_cv_have_visibility_hidden" = yes; then
-   IPA_DEPFILES="$ipa_obj"
-   extra_libraries="libinproctrace.so"
+   have_ipa=true
+else
+   have_ipa=false
+fi
+
+AC_ARG_ENABLE(inprocess-agent,
+AS_HELP_STRING([--enable-inprocess-agent], [inprocess agent]),
+[case "$enableval" in
+  yes) want_ipa=true ;;
+  no) want_ipa=false ;;
+  *) AC_MSG_ERROR([bad value $enableval for inprocess-agent]) ;;
+esac],
+[want_ipa=$have_ipa])
+
+if $want_ipa ; then
+   if $have_ipa ; then
+     IPA_DEPFILES="$ipa_obj"
+     extra_libraries="$extra_libraries libinproctrace.so"
+   else
+     AC_MSG_ERROR([inprocess agent not supported for this target])
+   fi
 fi
 
 AC_SUBST(GDBSERVER_DEPFILES)