with_x
enable_sim
enable_multi_ice
+enable_gdbserver
'
ac_precious_vars='build_alias
host_alias
gcc is used
--enable-sim link gdb with simulator
--enable-multi-ice build the multi-ice-gdb-server
+ --enable-gdbserver automatically build gdbserver (yes/no/auto, default
+ is auto)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
getgid pipe poll pread64 resize_term sbrk setpgid setpgrp setsid \
sigaction sigprocmask sigsetmask socketpair syscall \
ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
- setrlimit getrlimit posix_madvise
+ setrlimit getrlimit posix_madvise waitpid
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
fi
-# We only build gdbserver automatically in a native configuration.
-if test "$gdb_native" = "yes"; then
+# Check whether --enable-gdbserver was given.
+if test "${enable_gdbserver+set}" = set; then :
+ enableval=$enable_gdbserver; case "${enableval}" in
+ yes| no|auto) ;;
+ *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
+esac
+else
+ enable_gdbserver=auto
+fi
+
+
+# We only build gdbserver automatically in a native configuration, and
+# only if the user did not explicitly disable its build.
+if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
if test "x$build_gdbserver" = xyes; then
$as_echo "yes" >&6; }
subdirs="$subdirs gdbserver"
+ gdbserver_build_enabled=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
+# If the user explicitly request the gdbserver to be built, verify that
+# we were in fact able to enable it.
+if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
+ as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
+fi
+
# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
# to an empty version.