# Enable MI.
# Check whether --enable-gdbmi was given.
if test "${enable_gdbmi+set}" = set; then :
- enableval=$enable_gdbmi; case $enableval in
- yes | no)
- ;;
- *)
- as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
- esac
+ enableval=$enable_gdbmi;
+ case $enableval in
+ yes | no)
+ ;;
+ *)
+ as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5
+ ;;
+ esac
+
else
enable_gdbmi=yes
fi
# Enable TUI.
# Check whether --enable-tui was given.
if test "${enable_tui+set}" = set; then :
- enableval=$enable_tui; case $enableval in
- yes | no | auto)
- ;;
- *)
- as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
- esac
+ enableval=$enable_tui;
+ case $enableval in
+ yes | no | auto)
+ ;;
+ *)
+ as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5
+ ;;
+ esac
+
else
enable_tui=auto
fi
# Enable gdbtk.
# Check whether --enable-gdbtk was given.
if test "${enable_gdbtk+set}" = set; then :
- enableval=$enable_gdbtk; case $enableval in
- yes | no)
- ;;
- *)
- as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
- esac
+ enableval=$enable_gdbtk;
+ case $enableval in
+ yes | no)
+ ;;
+ *)
+ as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5
+ ;;
+ esac
+
else
if test -d "$srcdir/gdbtk"; then
- enable_gdbtk=yes
- else
- enable_gdbtk=no
- fi
+ enable_gdbtk=yes
+ else
+ enable_gdbtk=no
+ fi
fi
# We unconditionally disable gdbtk tests on selected platforms.
# Profiling support.
# Check whether --enable-profiling was given.
if test "${enable_profiling+set}" = set; then :
- enableval=$enable_profiling; case $enableval in
- yes | no)
- ;;
- *)
- as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
- esac
+ enableval=$enable_profiling;
+ case $enableval in
+ yes | no)
+ ;;
+ *)
+ as_fn_error $? "bad value $enableval for --enable-profiling" "$LINENO" 5
+ ;;
+ esac
+
else
enable_profiling=no
fi
# Check whether --enable-source-highlight was given.
if test "${enable_source_highlight+set}" = set; then :
- enableval=$enable_source_highlight; case "${enableval}" in
- yes) enable_source_highlight=yes ;;
- no) enable_source_highlight=no ;;
- *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
-esac
+ enableval=$enable_source_highlight;
+ case $enableval in
+ yes | no | auto)
+ ;;
+ *)
+ as_fn_error $? "bad value $enableval for --enable-source-highlight" "$LINENO" 5
+ ;;
+ esac
+
else
enable_source_highlight=auto
fi
# Setup possible use of libbacktrace.
# Check whether --enable-libbacktrace was given.
if test "${enable_libbacktrace+set}" = set; then :
- enableval=$enable_libbacktrace; case "${enableval}" in
- yes) enable_libbacktrace=yes ;;
- no) enable_libbacktrace=no ;;
- *) as_fn_error $? "bad value ${enableval} for --enable-libbacktrace option" "$LINENO" 5 ;;
-esac
+ enableval=$enable_libbacktrace;
+ case $enableval in
+ yes | no)
+ ;;
+ *)
+ as_fn_error $? "bad value $enableval for --enable-libbacktrace" "$LINENO" 5
+ ;;
+ esac
+
else
enable_libbacktrace=yes
fi
fi
# Enable MI.
-AC_ARG_ENABLE(gdbmi,
-AS_HELP_STRING([--disable-gdbmi], [disable machine-interface (MI)]),
- [case $enableval in
- yes | no)
- ;;
- *)
- AC_MSG_ERROR([bad value $enableval for --enable-gdbmi]) ;;
- esac],
- [enable_gdbmi=yes])
+AC_ARG_ENABLE([gdbmi],
+ [AS_HELP_STRING([--disable-gdbmi], [disable machine-interface (MI)])],
+ [GDB_CHECK_YES_NO_VAL([$enableval], [--enable-gdbmi])],
+ [enable_gdbmi=yes])
if test x"$enable_gdbmi" = xyes; then
if test -d "$srcdir/mi"; then
CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
# Enable TUI.
AC_ARG_ENABLE(tui,
-AS_HELP_STRING([--enable-tui], [enable full-screen terminal user interface (TUI)]),
- [case $enableval in
- yes | no | auto)
- ;;
- *)
- AC_MSG_ERROR([bad value $enableval for --enable-tui]) ;;
- esac],enable_tui=auto)
+AS_HELP_STRING([--enable-tui],
+ [enable full-screen terminal user interface (TUI)]),
+ [GDB_CHECK_YES_NO_AUTO_VAL([$enableval], [--enable-tui])],
+ [enable_tui=auto])
# Enable gdbtk.
-AC_ARG_ENABLE(gdbtk,
-AS_HELP_STRING([--enable-gdbtk], [enable gdbtk graphical user interface (GUI)]),
- [case $enableval in
- yes | no)
- ;;
- *)
- AC_MSG_ERROR([bad value $enableval for --enable-gdbtk]) ;;
- esac],
- [if test -d "$srcdir/gdbtk"; then
- enable_gdbtk=yes
- else
- enable_gdbtk=no
- fi])
+AC_ARG_ENABLE([gdbtk],
+ [AS_HELP_STRING([--enable-gdbtk], [enable gdbtk graphical user interface (GUI)])],
+ [GDB_CHECK_YES_NO_VAL([$enableval], [--enable-gdbtk])],
+ [if test -d "$srcdir/gdbtk"; then
+ enable_gdbtk=yes
+ else
+ enable_gdbtk=no
+ fi])
# We unconditionally disable gdbtk tests on selected platforms.
case $host_os in
go32* | windows*)
fi
# Profiling support.
-AC_ARG_ENABLE(profiling,
-AS_HELP_STRING([--enable-profiling], [enable profiling of GDB]),
- [case $enableval in
- yes | no)
- ;;
- *)
- AC_MSG_ERROR([bad value $enableval for --enable-profile]) ;;
- esac],
- [enable_profiling=no])
+AC_ARG_ENABLE([profiling],
+ [AS_HELP_STRING([--enable-profiling], [enable profiling of GDB])],
+ [GDB_CHECK_YES_NO_VAL([$enableval], [--enable-profiling])],
+ [enable_profiling=no])
AC_CHECK_FUNCS(monstartup _mcleanup)
AC_CACHE_CHECK(
SRCHIGH_LIBS=
SRCHIGH_CFLAGS=
-AC_ARG_ENABLE(source-highlight,
- AS_HELP_STRING([--enable-source-highlight],
- [enable source-highlight for source listings]),
- [case "${enableval}" in
- yes) enable_source_highlight=yes ;;
- no) enable_source_highlight=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for source-highlight option) ;;
-esac],
-[enable_source_highlight=auto])
+AC_ARG_ENABLE([source-highlight],
+ [AS_HELP_STRING([--enable-source-highlight],
+ [enable source-highlight for source listings])],
+ [GDB_CHECK_YES_NO_AUTO_VAL([$enableval], [--enable-source-highlight])],
+ [enable_source_highlight=auto])
if test "${enable_source_highlight}" != "no"; then
AC_MSG_CHECKING([for the source-highlight library])
# Setup possible use of libbacktrace.
AC_ARG_ENABLE([libbacktrace],
-[AS_HELP_STRING([--enable-libbacktrace],
- [use libbacktrace to write a backtrace after a fatal signal.])],
-[case "${enableval}" in
- yes) enable_libbacktrace=yes ;;
- no) enable_libbacktrace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-libbacktrace option) ;;
-esac],
-enable_libbacktrace=yes)
+ [AS_HELP_STRING([--enable-libbacktrace],
+ [use libbacktrace to write a backtrace after a fatal signal.])],
+ [GDB_CHECK_YES_NO_VAL([$enableval], [--enable-libbacktrace])],
+ [enable_libbacktrace=yes])
if test "${enable_libbacktrace}" = "yes"; then
LIBBACKTRACE_INC="-I$srcdir/../libbacktrace/ -I../libbacktrace/"