gdb: modernize configure.ac

Run autoupdate on configure.ac and adjust the indentation of the result
for better readability.  This removes a bunch of warnings when running
`autoreconf -vf -Wall`.  The changes are:

    * Replace AC_INIT with AC_INIT and no arguments plus
      AC_CONFIG_SRCDIR.
    * Replace AC_ERROR with AC_MSG_ERROR.
    * Replace AC_TRY_LINK with AC_LINK_IFELSE.
    * Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE.
    * Replace AC_HELP_STRING with AS_HELP_STRING.

autoupdate erroneously tries to replace AC_C_LONG_DOUBLE in a comment,
which I reverted manually.

All the changes in the generated configure file are insignificant
whitespaces changes.

gdb/ChangeLog:

	* configure.ac: Modernize.
	* configure: Re-generate.

Change-Id: Ie3a1409c8032a36a6383da964286a46ece9b546e
This commit is contained in:
Simon Marchi
2020-10-25 20:05:57 -04:00
parent 6e9f84bca3
commit bc698096c1
2 changed files with 309 additions and 171 deletions

76
gdb/configure vendored
View File

@@ -2986,6 +2986,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_headers="$ac_config_headers config.h:config.in" ac_config_headers="$ac_config_headers config.h:config.in"
@@ -7190,12 +7191,12 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <stdlib.h> #include <stdlib.h>
extern char _etext; extern char _etext;
int int
main () main ()
{ {
free (&_etext); free (&_etext);
; ;
return 0; return 0;
} }
@@ -7204,9 +7205,11 @@ if ac_fn_c_try_link "$LINENO"; then :
ac_cv_var__etext=yes ac_cv_var__etext=yes
else else
ac_cv_var__etext=no ac_cv_var__etext=no
fi fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
$as_echo "$ac_cv_var__etext" >&6; } $as_echo "$ac_cv_var__etext" >&6; }
@@ -7223,12 +7226,12 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <stdlib.h> #include <stdlib.h>
extern char etext; extern char etext;
int int
main () main ()
{ {
free (&etext); free (&etext);
; ;
return 0; return 0;
} }
@@ -7237,9 +7240,11 @@ if ac_fn_c_try_link "$LINENO"; then :
ac_cv_var_etext=yes ac_cv_var_etext=yes
else else
ac_cv_var_etext=no ac_cv_var_etext=no
fi fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
$as_echo "$ac_cv_var_etext" >&6; } $as_echo "$ac_cv_var_etext" >&6; }
@@ -7276,8 +7281,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_cc_supports_pg=yes ac_cv_cc_supports_pg=yes
else else
ac_cv_cc_supports_pg=no ac_cv_cc_supports_pg=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
$as_echo "$ac_cv_cc_supports_pg" >&6; } $as_echo "$ac_cv_cc_supports_pg" >&6; }
@@ -9190,13 +9197,14 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <stdio.h> #include <stdio.h>
#include <readline/readline.h> #include <readline/readline.h>
int int
main () main ()
{ {
#if RL_VERSION_MAJOR < 7 #if RL_VERSION_MAJOR < 7
# error "readline version 7 required" # error "readline version 7 required"
#endif #endif
; ;
return 0; return 0;
} }
@@ -9205,8 +9213,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
gdb_cv_readline_ok=yes gdb_cv_readline_ok=yes
else else
gdb_cv_readline_ok=no gdb_cv_readline_ok=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
$as_echo "$gdb_cv_readline_ok" >&6; } $as_echo "$gdb_cv_readline_ok" >&6; }
@@ -15351,14 +15361,11 @@ if ${ac_cv_func_setpgrp_void+:} false; then :
else else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <unistd.h> #include <unistd.h>
int int
main () main ()
{ {
if (setpgrp(1,1) == -1)
if (setpgrp(1,1) == -1)
exit (0); exit (0);
else else
exit (1); exit (1);
@@ -15371,8 +15378,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_func_setpgrp_void=no ac_cv_func_setpgrp_void=no
else else
ac_cv_func_setpgrp_void=yes ac_cv_func_setpgrp_void=yes
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
$as_echo "$ac_cv_func_setpgrp_void" >&6; } $as_echo "$ac_cv_func_setpgrp_void" >&6; }
@@ -15399,9 +15408,10 @@ int
main () main ()
{ {
#define REGEX_INTERFACE_VERSION 1 #define REGEX_INTERFACE_VERSION 1
#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
# error "Version mismatch" # error "Version mismatch"
#endif #endif
; ;
return 0; return 0;
} }
@@ -15410,8 +15420,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
gdb_cv_have_gnu_regex=yes gdb_cv_have_gnu_regex=yes
else else
gdb_cv_have_gnu_regex=no gdb_cv_have_gnu_regex=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
$as_echo "$gdb_cv_have_gnu_regex" >&6; } $as_echo "$gdb_cv_have_gnu_regex" >&6; }
@@ -15457,12 +15469,13 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <sys/param.h> #include <sys/param.h>
#define _KMEMUSER #define _KMEMUSER
#include <sys/lwp.h> #include <sys/lwp.h>
int int
main () main ()
{ {
struct lwp l; struct lwp l;
; ;
return 0; return 0;
} }
@@ -15471,8 +15484,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
gdb_cv_struct_lwp=yes gdb_cv_struct_lwp=yes
else else
gdb_cv_struct_lwp=no gdb_cv_struct_lwp=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
$as_echo "$gdb_cv_struct_lwp" >&6; } $as_echo "$gdb_cv_struct_lwp" >&6; }
@@ -15491,11 +15506,12 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <sys/types.h> #include <sys/types.h>
#include <machine/reg.h> #include <machine/reg.h>
int int
main () main ()
{ {
struct reg r; struct reg r;
; ;
return 0; return 0;
} }
@@ -15504,8 +15520,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
gdb_cv_struct_reg=yes gdb_cv_struct_reg=yes
else else
gdb_cv_struct_reg=no gdb_cv_struct_reg=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
$as_echo "$gdb_cv_struct_reg" >&6; } $as_echo "$gdb_cv_struct_reg" >&6; }
@@ -15562,8 +15580,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
gdb_cv_have_ptrace_getregs=yes gdb_cv_have_ptrace_getregs=yes
else else
gdb_cv_have_ptrace_getregs=no gdb_cv_have_ptrace_getregs=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
@@ -15595,8 +15615,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
gdb_cv_have_ptrace_getfpxregs=yes gdb_cv_have_ptrace_getfpxregs=yes
else else
gdb_cv_have_ptrace_getfpxregs=no gdb_cv_have_ptrace_getfpxregs=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
@@ -15616,11 +15638,12 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <sys/types.h> #include <sys/types.h>
#include <sys/ptrace.h> #include <sys/ptrace.h>
int int
main () main ()
{ {
PT_GETDBREGS; PT_GETDBREGS;
; ;
return 0; return 0;
} }
@@ -15629,8 +15652,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
gdb_cv_have_pt_getdbregs=yes gdb_cv_have_pt_getdbregs=yes
else else
gdb_cv_have_pt_getdbregs=no gdb_cv_have_pt_getdbregs=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
@@ -15650,11 +15675,12 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <sys/types.h> #include <sys/types.h>
#include <sys/ptrace.h> #include <sys/ptrace.h>
int int
main () main ()
{ {
PT_GETXMMREGS; PT_GETXMMREGS;
; ;
return 0; return 0;
} }
@@ -15663,8 +15689,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
gdb_cv_have_pt_getxmmregs=yes gdb_cv_have_pt_getxmmregs=yes
else else
gdb_cv_have_pt_getxmmregs=no gdb_cv_have_pt_getxmmregs=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
@@ -15947,7 +15975,6 @@ $as_echo_n "checking for -bbigtoc option... " >&6; }
if ${gdb_cv_bigtoc+:} false; then : if ${gdb_cv_bigtoc+:} false; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
SAVE_LDFLAGS=$LDFLAGS SAVE_LDFLAGS=$LDFLAGS
case $GCC in case $GCC in
@@ -15971,6 +15998,7 @@ if ac_fn_c_try_link "$LINENO"; then :
else else
gdb_cv_bigtoc= gdb_cv_bigtoc=
fi fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
@@ -16088,6 +16116,7 @@ main ()
#ifndef PTHDB_VERSION_3 #ifndef PTHDB_VERSION_3
#error #error
#endif #endif
; ;
return 0; return 0;
} }
@@ -16096,8 +16125,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
gdb_cv_have_aix_thread_debug=yes gdb_cv_have_aix_thread_debug=yes
else else
gdb_cv_have_aix_thread_debug=no gdb_cv_have_aix_thread_debug=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
@@ -16141,6 +16172,7 @@ int
main () main ()
{ {
int i = TD_NOTALLOC; int i = TD_NOTALLOC;
; ;
return 0; return 0;
} }
@@ -16156,6 +16188,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
if ${gdb_cv_thread_db_h_has_td_version+:} false; then : if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
@@ -16168,6 +16201,7 @@ int
main () main ()
{ {
int i = TD_VERSION; int i = TD_VERSION;
; ;
return 0; return 0;
} }
@@ -16183,6 +16217,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
if ${gdb_cv_thread_db_h_has_td_notls+:} false; then : if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
@@ -16195,6 +16230,7 @@ int
main () main ()
{ {
int i = TD_NOTLS; int i = TD_NOTLS;
; ;
return 0; return 0;
} }

View File

@@ -20,7 +20,8 @@ dnl Process this file with autoconf to produce a configure script.
m4_include(../config/debuginfod.m4) m4_include(../config/debuginfod.m4)
AC_INIT(main.c) AC_INIT
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h]) AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
@@ -157,7 +158,7 @@ AC_CONFIG_SUBDIRS(testsuite)
AC_ARG_ENABLE(targets, AC_ARG_ENABLE(targets,
AS_HELP_STRING([--enable-targets=TARGETS], [alternative target configurations]), AS_HELP_STRING([--enable-targets=TARGETS], [alternative target configurations]),
[case "${enableval}" in [case "${enableval}" in
yes | "") AC_ERROR(enable-targets option must specify target names or 'all') yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all')
;; ;;
no) enable_targets= ;; no) enable_targets= ;;
*) enable_targets=$enableval ;; *) enable_targets=$enableval ;;
@@ -391,22 +392,36 @@ AS_HELP_STRING([--enable-profiling], [enable profiling of GDB]),
[enable_profiling=no]) [enable_profiling=no])
AC_CHECK_FUNCS(monstartup _mcleanup) AC_CHECK_FUNCS(monstartup _mcleanup)
AC_CACHE_CHECK([for _etext], ac_cv_var__etext, AC_CACHE_CHECK(
[AC_TRY_LINK( [for _etext],
[#include <stdlib.h> [ac_cv_var__etext],
extern char _etext; [AC_LINK_IFELSE(
], [AC_LANG_PROGRAM(
[free (&_etext);], ac_cv_var__etext=yes, ac_cv_var__etext=no)]) [#include <stdlib.h>
extern char _etext;],
[free (&_etext);]
)],
[ac_cv_var__etext=yes],
[ac_cv_var__etext=no]
)]
)
if test "$ac_cv_var__etext" = yes; then if test "$ac_cv_var__etext" = yes; then
AC_DEFINE(HAVE__ETEXT, 1, AC_DEFINE(HAVE__ETEXT, 1,
[Define to 1 if your system has the _etext variable. ]) [Define to 1 if your system has the _etext variable. ])
fi fi
AC_CACHE_CHECK([for etext], ac_cv_var_etext, AC_CACHE_CHECK(
[AC_TRY_LINK( [for etext],
[#include <stdlib.h> [ac_cv_var_etext],
extern char etext; [AC_LINK_IFELSE(
], [AC_LANG_PROGRAM(
[free (&etext);], ac_cv_var_etext=yes, ac_cv_var_etext=no)]) [#include <stdlib.h>
extern char etext;],
[free (&etext);]
)],
[ac_cv_var_etext=yes],
[ac_cv_var_etext=no]
)]
)
if test "$ac_cv_var_etext" = yes; then if test "$ac_cv_var_etext" = yes; then
AC_DEFINE(HAVE_ETEXT, 1, AC_DEFINE(HAVE_ETEXT, 1,
[Define to 1 if your system has the etext variable. ]) [Define to 1 if your system has the etext variable. ])
@@ -419,9 +434,15 @@ if test "$enable_profiling" = yes ; then
OLD_CFLAGS="$CFLAGS" OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PROFILE_CFLAGS" CFLAGS="$CFLAGS $PROFILE_CFLAGS"
AC_CACHE_CHECK([whether $CC supports -pg], ac_cv_cc_supports_pg, AC_CACHE_CHECK(
[AC_TRY_COMPILE([], [int x;], ac_cv_cc_supports_pg=yes, [whether $CC supports -pg],
ac_cv_cc_supports_pg=no)]) [ac_cv_cc_supports_pg],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([], [int x;])],
[ac_cv_cc_supports_pg=yes],
[ac_cv_cc_supports_pg=no]
)]
)
if test "$ac_cv_cc_supports_pg" = no; then if test "$ac_cv_cc_supports_pg" = no; then
AC_MSG_ERROR(--enable-profiling requires a compiler which supports -pg) AC_MSG_ERROR(--enable-profiling requires a compiler which supports -pg)
@@ -574,16 +595,21 @@ AC_ARG_WITH([system-readline],
[use installed readline library])]) [use installed readline library])])
if test "$with_system_readline" = yes; then if test "$with_system_readline" = yes; then
AC_CACHE_CHECK([whether system readline is new enough], AC_CACHE_CHECK(
[whether system readline is new enough],
[gdb_cv_readline_ok], [gdb_cv_readline_ok],
[AC_TRY_COMPILE( [AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[#include <stdio.h> [#include <stdio.h>
#include <readline/readline.h>], #include <readline/readline.h>],
[#if RL_VERSION_MAJOR < 7 [#if RL_VERSION_MAJOR < 7
# error "readline version 7 required" # error "readline version 7 required"
#endif], #endif]
gdb_cv_readline_ok=yes, )],
gdb_cv_readline_ok=no)]) [gdb_cv_readline_ok=yes],
[gdb_cv_readline_ok=no]
)]
)
if test "$gdb_cv_readline_ok" != yes; then if test "$gdb_cv_readline_ok" != yes; then
AC_MSG_ERROR([system readline is not new enough]) AC_MSG_ERROR([system readline is not new enough])
fi fi
@@ -778,12 +804,12 @@ else
python_prog=${with_python} python_prog=${with_python}
python_prefix= python_prefix=
else else
AC_ERROR(invalid value for --with-python) AC_MSG_ERROR(invalid value for --with-python)
fi fi
;; ;;
*/*) */*)
# Disallow --with-python=foo/bar. # Disallow --with-python=foo/bar.
AC_ERROR(invalid value for --with-python) AC_MSG_ERROR(invalid value for --with-python)
;; ;;
*) *)
# The user has either specified auto, yes, or the name of the python # The user has either specified auto, yes, or the name of the python
@@ -811,7 +837,7 @@ else
python_prog="${with_python}" python_prog="${with_python}"
AC_PATH_PROG(python_prog_path, ${python_prog}, missing) AC_PATH_PROG(python_prog_path, ${python_prog}, missing)
if test "${python_prog_path}" = missing; then if test "${python_prog_path}" = missing; then
AC_ERROR(unable to find python program ${python_prog}) AC_MSG_ERROR(unable to find python program ${python_prog})
fi fi
;; ;;
esac esac
@@ -825,21 +851,21 @@ else
if test $? != 0; then if test $? != 0; then
have_python_config=failed have_python_config=failed
if test "${with_python}" != auto; then if test "${with_python}" != auto; then
AC_ERROR(failure running python-config --includes) AC_MSG_ERROR(failure running python-config --includes)
fi fi
fi fi
python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
if test $? != 0; then if test $? != 0; then
have_python_config=failed have_python_config=failed
if test "${with_python}" != auto; then if test "${with_python}" != auto; then
AC_ERROR(failure running python-config --ldflags) AC_MSG_ERROR(failure running python-config --ldflags)
fi fi
fi fi
python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
if test $? != 0; then if test $? != 0; then
have_python_config=failed have_python_config=failed
if test "${with_python}" != auto; then if test "${with_python}" != auto; then
AC_ERROR(failure running python-config --exec-prefix) AC_MSG_ERROR(failure running python-config --exec-prefix)
fi fi
fi fi
else else
@@ -944,7 +970,11 @@ if test "${have_libpython}" != no; then
# Check that the compiler accepts it # Check that the compiler accepts it
saved_CFLAGS="$CFLAGS" saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $flag" CFLAGS="$CFLAGS $flag"
AC_TRY_COMPILE([],[],PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag",) AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([], [])],
[PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"],
[]
)
CFLAGS="$saved_CFLAGS" CFLAGS="$saved_CFLAGS"
done done
AC_MSG_RESULT(${PYTHON_CFLAGS}) AC_MSG_RESULT(${PYTHON_CFLAGS})
@@ -1305,15 +1335,21 @@ dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
if test "$cross_compiling" = no; then if test "$cross_compiling" = no; then
AC_FUNC_SETPGRP AC_FUNC_SETPGRP
else else
AC_CACHE_CHECK([whether setpgrp takes no argument], ac_cv_func_setpgrp_void, AC_CACHE_CHECK(
[AC_TRY_COMPILE([ [whether setpgrp takes no argument],
#include <unistd.h> [ac_cv_func_setpgrp_void],
], [ [AC_COMPILE_IFELSE(
if (setpgrp(1,1) == -1) [AC_LANG_PROGRAM(
[#include <unistd.h>],
[if (setpgrp(1,1) == -1)
exit (0); exit (0);
else else
exit (1); exit (1);]
], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes)]) )],
[ac_cv_func_setpgrp_void=no],
[ac_cv_func_setpgrp_void=yes]
)]
)
if test "$ac_cv_func_setpgrp_void" = yes; then if test "$ac_cv_func_setpgrp_void" = yes; then
AC_DEFINE(SETPGRP_VOID, 1) AC_DEFINE(SETPGRP_VOID, 1)
fi fi
@@ -1327,14 +1363,18 @@ gdb_use_included_regex=yes
AC_CACHE_CHECK( AC_CACHE_CHECK(
[for GNU regex], [for GNU regex],
[gdb_cv_have_gnu_regex], [gdb_cv_have_gnu_regex],
[AC_TRY_COMPILE( [AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[#include <gnu-versions.h>], [#include <gnu-versions.h>],
[#define REGEX_INTERFACE_VERSION 1 [#define REGEX_INTERFACE_VERSION 1
#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
# error "Version mismatch" # error "Version mismatch"
#endif], #endif]
gdb_cv_have_gnu_regex=yes, )],
gdb_cv_have_gnu_regex=no)]) [gdb_cv_have_gnu_regex=yes],
[gdb_cv_have_gnu_regex=no]
)]
)
if test "$gdb_cv_have_gnu_regex" = yes; then if test "$gdb_cv_have_gnu_regex" = yes; then
gdb_use_included_regex=no gdb_use_included_regex=no
fi fi
@@ -1355,21 +1395,39 @@ AC_CHECK_MEMBERS([struct thread.td_pcb], [], [],
]) ])
# See if <sys/lwp.h> defines `struct lwp`. # See if <sys/lwp.h> defines `struct lwp`.
AC_CACHE_CHECK([for struct lwp], gdb_cv_struct_lwp, AC_CACHE_CHECK(
[AC_TRY_COMPILE([#include <sys/param.h> [for struct lwp],
#define _KMEMUSER [gdb_cv_struct_lwp],
#include <sys/lwp.h>], [struct lwp l;], [AC_COMPILE_IFELSE(
gdb_cv_struct_lwp=yes, gdb_cv_struct_lwp=no)]) [AC_LANG_PROGRAM(
[#include <sys/param.h>
#define _KMEMUSER
#include <sys/lwp.h>],
[struct lwp l;]
)],
[gdb_cv_struct_lwp=yes],
[gdb_cv_struct_lwp=no]
)]
)
if test "$gdb_cv_struct_lwp" = yes; then if test "$gdb_cv_struct_lwp" = yes; then
AC_DEFINE(HAVE_STRUCT_LWP, 1, AC_DEFINE(HAVE_STRUCT_LWP, 1,
[Define to 1 if your system has struct lwp.]) [Define to 1 if your system has struct lwp.])
fi fi
# See if <machine/reg.h> degines `struct reg'. # See if <machine/reg.h> degines `struct reg'.
AC_CACHE_CHECK([for struct reg in machine/reg.h], gdb_cv_struct_reg, AC_CACHE_CHECK(
[AC_TRY_COMPILE([#include <sys/types.h> [for struct reg in machine/reg.h],
#include <machine/reg.h>], [struct reg r;], [gdb_cv_struct_reg],
gdb_cv_struct_reg=yes, gdb_cv_struct_reg=no)]) [AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[#include <sys/types.h>
#include <machine/reg.h>],
[struct reg r;]
)],
[gdb_cv_struct_reg=yes],
[gdb_cv_struct_reg=no]
)]
)
if test "$gdb_cv_struct_reg" = yes; then if test "$gdb_cv_struct_reg" = yes; then
AC_DEFINE(HAVE_STRUCT_REG, 1, AC_DEFINE(HAVE_STRUCT_REG, 1,
[Define to 1 if your system has struct reg in <machine/reg.h>.]) [Define to 1 if your system has struct reg in <machine/reg.h>.])
@@ -1383,11 +1441,14 @@ AC_CHECK_MEMBERS([struct reg.r_fs, struct reg.r_gs], [], [],
# See if <sys/ptrace.h> provides the PTRACE_GETREGS request. # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
AC_MSG_CHECKING(for PTRACE_GETREGS) AC_MSG_CHECKING(for PTRACE_GETREGS)
AC_CACHE_VAL(gdb_cv_have_ptrace_getregs, AC_CACHE_VAL(
[AC_TRY_COMPILE([#include <sys/ptrace.h>], [gdb_cv_have_ptrace_getregs],
[PTRACE_GETREGS;], [AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([#include <sys/ptrace.h>], [PTRACE_GETREGS;])],
[gdb_cv_have_ptrace_getregs=yes], [gdb_cv_have_ptrace_getregs=yes],
[gdb_cv_have_ptrace_getregs=no])]) [gdb_cv_have_ptrace_getregs=no]
)]
)
AC_MSG_RESULT($gdb_cv_have_ptrace_getregs) AC_MSG_RESULT($gdb_cv_have_ptrace_getregs)
if test "$gdb_cv_have_ptrace_getregs" = yes; then if test "$gdb_cv_have_ptrace_getregs" = yes; then
AC_DEFINE(HAVE_PTRACE_GETREGS, 1, AC_DEFINE(HAVE_PTRACE_GETREGS, 1,
@@ -1396,11 +1457,14 @@ fi
# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
AC_MSG_CHECKING(for PTRACE_GETFPXREGS) AC_MSG_CHECKING(for PTRACE_GETFPXREGS)
AC_CACHE_VAL(gdb_cv_have_ptrace_getfpxregs, AC_CACHE_VAL(
[AC_TRY_COMPILE([#include <sys/ptrace.h>], [gdb_cv_have_ptrace_getfpxregs],
[PTRACE_GETFPXREGS;], [AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([#include <sys/ptrace.h>], [PTRACE_GETFPXREGS;])],
[gdb_cv_have_ptrace_getfpxregs=yes], [gdb_cv_have_ptrace_getfpxregs=yes],
[gdb_cv_have_ptrace_getfpxregs=no])]) [gdb_cv_have_ptrace_getfpxregs=no]
)]
)
AC_MSG_RESULT($gdb_cv_have_ptrace_getfpxregs) AC_MSG_RESULT($gdb_cv_have_ptrace_getfpxregs)
if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
AC_DEFINE(HAVE_PTRACE_GETFPXREGS, 1, AC_DEFINE(HAVE_PTRACE_GETFPXREGS, 1,
@@ -1409,12 +1473,18 @@ fi
# See if <sys/ptrace.h> provides the PT_GETDBREGS request. # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
AC_MSG_CHECKING(for PT_GETDBREGS) AC_MSG_CHECKING(for PT_GETDBREGS)
AC_CACHE_VAL(gdb_cv_have_pt_getdbregs, AC_CACHE_VAL(
[AC_TRY_COMPILE([#include <sys/types.h> [gdb_cv_have_pt_getdbregs],
#include <sys/ptrace.h>], [AC_COMPILE_IFELSE(
[PT_GETDBREGS;], [AC_LANG_PROGRAM(
[#include <sys/types.h>
#include <sys/ptrace.h>],
[PT_GETDBREGS;]
)],
[gdb_cv_have_pt_getdbregs=yes], [gdb_cv_have_pt_getdbregs=yes],
[gdb_cv_have_pt_getdbregs=no])]) [gdb_cv_have_pt_getdbregs=no]
)]
)
AC_MSG_RESULT($gdb_cv_have_pt_getdbregs) AC_MSG_RESULT($gdb_cv_have_pt_getdbregs)
if test "$gdb_cv_have_pt_getdbregs" = yes; then if test "$gdb_cv_have_pt_getdbregs" = yes; then
AC_DEFINE(HAVE_PT_GETDBREGS, 1, AC_DEFINE(HAVE_PT_GETDBREGS, 1,
@@ -1423,12 +1493,18 @@ fi
# See if <sys/ptrace.h> provides the PT_GETXMMREGS request. # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
AC_MSG_CHECKING(for PT_GETXMMREGS) AC_MSG_CHECKING(for PT_GETXMMREGS)
AC_CACHE_VAL(gdb_cv_have_pt_getxmmregs, AC_CACHE_VAL(
[AC_TRY_COMPILE([#include <sys/types.h> [gdb_cv_have_pt_getxmmregs],
#include <sys/ptrace.h>], [AC_COMPILE_IFELSE(
[PT_GETXMMREGS;], [AC_LANG_PROGRAM(
[#include <sys/types.h>
#include <sys/ptrace.h>],
[PT_GETXMMREGS;]
)],
[gdb_cv_have_pt_getxmmregs=yes], [gdb_cv_have_pt_getxmmregs=yes],
[gdb_cv_have_pt_getxmmregs=no])]) [gdb_cv_have_pt_getxmmregs=no]
)]
)
AC_MSG_RESULT($gdb_cv_have_pt_getxmmregs) AC_MSG_RESULT($gdb_cv_have_pt_getxmmregs)
if test "$gdb_cv_have_pt_getxmmregs" = yes; then if test "$gdb_cv_have_pt_getxmmregs" = yes; then
AC_DEFINE(HAVE_PT_GETXMMREGS, 1, AC_DEFINE(HAVE_PT_GETXMMREGS, 1,
@@ -1551,8 +1627,9 @@ fi
case ${host_os} in case ${host_os} in
aix*) aix*)
AC_CACHE_CHECK([for -bbigtoc option], [gdb_cv_bigtoc], [ AC_CACHE_CHECK(
SAVE_LDFLAGS=$LDFLAGS [for -bbigtoc option], [gdb_cv_bigtoc],
[SAVE_LDFLAGS=$LDFLAGS
case $GCC in case $GCC in
yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
@@ -1560,9 +1637,13 @@ aix*)
esac esac
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
AC_TRY_LINK([], [int i;], [], [gdb_cv_bigtoc=]) AC_LINK_IFELSE(
LDFLAGS="${SAVE_LDFLAGS}" [AC_LANG_PROGRAM([], [int i;])],
]) [],
[gdb_cv_bigtoc=]
)
LDFLAGS="${SAVE_LDFLAGS}"]
)
CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
;; ;;
esac esac
@@ -1578,7 +1659,11 @@ if test "${gdb_native}" = yes; then
RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
LDFLAGS="$LDFLAGS $RDYNAMIC" LDFLAGS="$LDFLAGS $RDYNAMIC"
if test "${have_libpython}" = no; then if test "${have_libpython}" = no; then
AC_TRY_LINK([], [], [dynamic_list=true]) AC_LINK_IFELSE(
[AC_LANG_PROGRAM([], [])],
[dynamic_list=true],
[]
)
else else
# Workaround http://bugs.python.org/issue4434 where static # Workaround http://bugs.python.org/issue4434 where static
# libpythonX.Y.a would get its symbols required for # libpythonX.Y.a would get its symbols required for
@@ -1631,13 +1716,19 @@ if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
case ${host_os} in case ${host_os} in
aix*) aix*)
AC_MSG_CHECKING(for AiX thread debugging library) AC_MSG_CHECKING(for AiX thread debugging library)
AC_CACHE_VAL(gdb_cv_have_aix_thread_debug, AC_CACHE_VAL(
[AC_TRY_COMPILE([#include <sys/pthdebug.h>], [gdb_cv_have_aix_thread_debug],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[#include <sys/pthdebug.h>],
[#ifndef PTHDB_VERSION_3 [#ifndef PTHDB_VERSION_3
#error #error
#endif], #endif]
gdb_cv_have_aix_thread_debug=yes, )],
gdb_cv_have_aix_thread_debug=no)]) [gdb_cv_have_aix_thread_debug=yes],
[gdb_cv_have_aix_thread_debug=no]
)]
)
AC_MSG_RESULT($gdb_cv_have_aix_thread_debug) AC_MSG_RESULT($gdb_cv_have_aix_thread_debug)
if test "$gdb_cv_have_aix_thread_debug" = yes; then if test "$gdb_cv_have_aix_thread_debug" = yes; then
CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
@@ -1657,32 +1748,43 @@ fi
dnl See if we have a thread_db header file that has TD_NOTALLOC and dnl See if we have a thread_db header file that has TD_NOTALLOC and
dnl other error codes. dnl other error codes.
if test "x$ac_cv_header_thread_db_h" = "xyes"; then if test "x$ac_cv_header_thread_db_h" = "xyes"; then
AC_CACHE_CHECK([whether <thread_db.h> has TD_NOTALLOC], AC_CACHE_CHECK(
gdb_cv_thread_db_h_has_td_notalloc, [whether <thread_db.h> has TD_NOTALLOC],
AC_TRY_COMPILE( [gdb_cv_thread_db_h_has_td_notalloc],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[#include <thread_db.h>], [#include <thread_db.h>],
[int i = TD_NOTALLOC;], [int i = TD_NOTALLOC;]
gdb_cv_thread_db_h_has_td_notalloc=yes, )],
gdb_cv_thread_db_h_has_td_notalloc=no [gdb_cv_thread_db_h_has_td_notalloc=yes],
[gdb_cv_thread_db_h_has_td_notalloc=no]
)]
) )
)
AC_CACHE_CHECK([whether <thread_db.h> has TD_VERSION], AC_CACHE_CHECK(
gdb_cv_thread_db_h_has_td_version, [whether <thread_db.h> has TD_VERSION],
AC_TRY_COMPILE( [gdb_cv_thread_db_h_has_td_version],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[#include <thread_db.h>], [#include <thread_db.h>],
[int i = TD_VERSION;], [int i = TD_VERSION;]
gdb_cv_thread_db_h_has_td_version=yes, )],
gdb_cv_thread_db_h_has_td_version=no [gdb_cv_thread_db_h_has_td_version=yes],
[gdb_cv_thread_db_h_has_td_version=no]
)]
) )
)
AC_CACHE_CHECK([whether <thread_db.h> has TD_NOTLS], AC_CACHE_CHECK(
gdb_cv_thread_db_h_has_td_notls, [whether <thread_db.h> has TD_NOTLS],
AC_TRY_COMPILE( [gdb_cv_thread_db_h_has_td_notls],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[#include <thread_db.h>], [#include <thread_db.h>],
[int i = TD_NOTLS;], [int i = TD_NOTLS;]
gdb_cv_thread_db_h_has_td_notls=yes, )],
gdb_cv_thread_db_h_has_td_notls=no [gdb_cv_thread_db_h_has_td_notls=yes],
) [gdb_cv_thread_db_h_has_td_notls=no]
)]
) )
fi fi
if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
@@ -2029,7 +2131,7 @@ fi
# Check for babeltrace and babeltrace-ctf # Check for babeltrace and babeltrace-ctf
AC_ARG_WITH(babeltrace, AC_ARG_WITH(babeltrace,
AC_HELP_STRING([--with-babeltrace], [include babeltrace support (auto/yes/no)]), AS_HELP_STRING([--with-babeltrace], [include babeltrace support (auto/yes/no)]),
[], [with_babeltrace=auto]) [], [with_babeltrace=auto])
AC_MSG_CHECKING([whether to use babeltrace]) AC_MSG_CHECKING([whether to use babeltrace])
AC_MSG_RESULT([$with_babeltrace]) AC_MSG_RESULT([$with_babeltrace])
@@ -2072,7 +2174,7 @@ fi
# Check for xxhash # Check for xxhash
AC_ARG_WITH(xxhash, AC_ARG_WITH(xxhash,
AC_HELP_STRING([--with-xxhash], [use libxxhash for hashing (faster) (auto/yes/no)]), AS_HELP_STRING([--with-xxhash], [use libxxhash for hashing (faster) (auto/yes/no)]),
[], [with_xxhash=auto]) [], [with_xxhash=auto])
GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections]) GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections])
@@ -2133,7 +2235,7 @@ dnl Add dependency for xsltproc if building with maintainer-mode enabled.
AC_PATH_PROGS(XSLTPROC, xsltproc, missing) AC_PATH_PROGS(XSLTPROC, xsltproc, missing)
if test "x$USE_MAINTAINER_MODE" = xyes; then if test "x$USE_MAINTAINER_MODE" = xyes; then
if test "${XSLTPROC}" = missing; then if test "${XSLTPROC}" = missing; then
AC_ERROR(unable to find xsltproc. maintainer-mode requires xsltproc.) AC_MSG_ERROR(unable to find xsltproc. maintainer-mode requires xsltproc.)
fi fi
fi fi
AC_SUBST(XSLTPROC) AC_SUBST(XSLTPROC)