+
ac_config_headers="$ac_config_headers config.h:config.in"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
-extern char _etext;
-
+ extern char _etext;
int
main ()
{
free (&_etext);
+
;
return 0;
}
ac_cv_var__etext=yes
else
ac_cv_var__etext=no
+
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
$as_echo "$ac_cv_var__etext" >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
-extern char etext;
-
+ extern char etext;
int
main ()
{
free (&etext);
+
;
return 0;
}
ac_cv_var_etext=yes
else
ac_cv_var_etext=no
+
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
$as_echo "$ac_cv_var_etext" >&6; }
ac_cv_cc_supports_pg=yes
else
ac_cv_cc_supports_pg=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
$as_echo "$ac_cv_cc_supports_pg" >&6; }
if test "$with_system_readline" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
$as_echo_n "checking whether system readline is new enough... " >&6; }
if ${gdb_cv_readline_ok+:} false; then :
$as_echo_n "(cached) " >&6
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
-#include <readline/readline.h>
+ #include <readline/readline.h>
int
main ()
{
#if RL_VERSION_MAJOR < 7
-# error "readline version 7 required"
-#endif
+ # error "readline version 7 required"
+ #endif
+
;
return 0;
}
gdb_cv_readline_ok=yes
else
gdb_cv_readline_ok=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
$as_echo "$gdb_cv_readline_ok" >&6; }
if test "${python_prog_path}" = missing; then
- as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
+ as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
fi
;;
esac
if test $? != 0; then
have_python_config=failed
if test "${with_python}" != auto; then
- as_fn_error $? "failure running python-config --includes" "$LINENO" 5
+ as_fn_error $? "failure running python-config --includes" "$LINENO" 5
fi
fi
python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
if test $? != 0; then
have_python_config=failed
if test "${with_python}" != auto; then
- as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
+ as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
fi
fi
python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
if test $? != 0; then
have_python_config=failed
if test "${with_python}" != auto; then
- as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
+ as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
fi
fi
else
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
#include <unistd.h>
-
int
main ()
{
-
- if (setpgrp(1,1) == -1)
- exit (0);
- else
- exit (1);
+if (setpgrp(1,1) == -1)
+ exit (0);
+ else
+ exit (1);
;
return 0;
ac_cv_func_setpgrp_void=no
else
ac_cv_func_setpgrp_void=yes
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
$as_echo "$ac_cv_func_setpgrp_void" >&6; }
main ()
{
#define REGEX_INTERFACE_VERSION 1
-#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
-# error "Version mismatch"
-#endif
+ #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
+ # error "Version mismatch"
+ #endif
+
;
return 0;
}
gdb_cv_have_gnu_regex=yes
else
gdb_cv_have_gnu_regex=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
$as_echo "$gdb_cv_have_gnu_regex" >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/param.h>
-#define _KMEMUSER
-#include <sys/lwp.h>
+ #define _KMEMUSER
+ #include <sys/lwp.h>
int
main ()
{
struct lwp l;
+
;
return 0;
}
gdb_cv_struct_lwp=yes
else
gdb_cv_struct_lwp=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
$as_echo "$gdb_cv_struct_lwp" >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
-#include <machine/reg.h>
+ #include <machine/reg.h>
int
main ()
{
struct reg r;
+
;
return 0;
}
gdb_cv_struct_reg=yes
else
gdb_cv_struct_reg=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
$as_echo "$gdb_cv_struct_reg" >&6; }
gdb_cv_have_ptrace_getregs=yes
else
gdb_cv_have_ptrace_getregs=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
gdb_cv_have_ptrace_getfpxregs=yes
else
gdb_cv_have_ptrace_getfpxregs=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
-#include <sys/ptrace.h>
+ #include <sys/ptrace.h>
int
main ()
{
PT_GETDBREGS;
+
;
return 0;
}
gdb_cv_have_pt_getdbregs=yes
else
gdb_cv_have_pt_getdbregs=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
-#include <sys/ptrace.h>
+ #include <sys/ptrace.h>
int
main ()
{
PT_GETXMMREGS;
+
;
return 0;
}
gdb_cv_have_pt_getxmmregs=yes
else
gdb_cv_have_pt_getxmmregs=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
if ${gdb_cv_bigtoc+:} false; then :
$as_echo_n "(cached) " >&6
else
+ SAVE_LDFLAGS=$LDFLAGS
- SAVE_LDFLAGS=$LDFLAGS
-
- case $GCC in
- yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
- *) gdb_cv_bigtoc=-bbigtoc ;;
- esac
+ case $GCC in
+ yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
+ *) gdb_cv_bigtoc=-bbigtoc ;;
+ esac
- LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
else
gdb_cv_bigtoc=
+
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="${SAVE_LDFLAGS}"
+ LDFLAGS="${SAVE_LDFLAGS}"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
main ()
{
#ifndef PTHDB_VERSION_3
- #error
- #endif
+ #error
+ #endif
+
;
return 0;
}
gdb_cv_have_aix_thread_debug=yes
else
gdb_cv_have_aix_thread_debug=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
fi
if test "x$ac_cv_header_thread_db_h" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
$as_echo_n "(cached) " >&6
main ()
{
int i = TD_NOTALLOC;
+
;
return 0;
}
fi
{ $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 "$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; }
if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
$as_echo_n "(cached) " >&6
main ()
{
int i = TD_VERSION;
+
;
return 0;
}
fi
{ $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 "$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; }
if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
$as_echo_n "(cached) " >&6
main ()
{
int i = TD_NOTLS;
+
;
return 0;
}
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])
AM_MAINTAINER_MODE
AC_ARG_ENABLE(targets,
AS_HELP_STRING([--enable-targets=TARGETS], [alternative target configurations]),
[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= ;;
*) enable_targets=$enableval ;;
[enable_profiling=no])
AC_CHECK_FUNCS(monstartup _mcleanup)
-AC_CACHE_CHECK([for _etext], ac_cv_var__etext,
-[AC_TRY_LINK(
-[#include <stdlib.h>
-extern char _etext;
-],
-[free (&_etext);], ac_cv_var__etext=yes, ac_cv_var__etext=no)])
+AC_CACHE_CHECK(
+ [for _etext],
+ [ac_cv_var__etext],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#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
AC_DEFINE(HAVE__ETEXT, 1,
[Define to 1 if your system has the _etext variable. ])
fi
-AC_CACHE_CHECK([for etext], ac_cv_var_etext,
-[AC_TRY_LINK(
-[#include <stdlib.h>
-extern char etext;
-],
-[free (&etext);], ac_cv_var_etext=yes, ac_cv_var_etext=no)])
+AC_CACHE_CHECK(
+ [for etext],
+ [ac_cv_var_etext],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#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
AC_DEFINE(HAVE_ETEXT, 1,
[Define to 1 if your system has the etext variable. ])
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PROFILE_CFLAGS"
- AC_CACHE_CHECK([whether $CC supports -pg], ac_cv_cc_supports_pg,
- [AC_TRY_COMPILE([], [int x;], ac_cv_cc_supports_pg=yes,
- ac_cv_cc_supports_pg=no)])
+ AC_CACHE_CHECK(
+ [whether $CC supports -pg],
+ [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
AC_MSG_ERROR(--enable-profiling requires a compiler which supports -pg)
[use installed readline library])])
if test "$with_system_readline" = yes; then
- AC_CACHE_CHECK([whether system readline is new enough],
- [gdb_cv_readline_ok],
- [AC_TRY_COMPILE(
- [#include <stdio.h>
-#include <readline/readline.h>],
- [#if RL_VERSION_MAJOR < 7
-# error "readline version 7 required"
-#endif],
- gdb_cv_readline_ok=yes,
- gdb_cv_readline_ok=no)])
+ AC_CACHE_CHECK(
+ [whether system readline is new enough],
+ [gdb_cv_readline_ok],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <stdio.h>
+ #include <readline/readline.h>],
+ [#if RL_VERSION_MAJOR < 7
+ # error "readline version 7 required"
+ #endif]
+ )],
+ [gdb_cv_readline_ok=yes],
+ [gdb_cv_readline_ok=no]
+ )]
+ )
if test "$gdb_cv_readline_ok" != yes; then
AC_MSG_ERROR([system readline is not new enough])
fi
python_prog=${with_python}
python_prefix=
else
- AC_ERROR(invalid value for --with-python)
+ AC_MSG_ERROR(invalid value for --with-python)
fi
;;
*/*)
# 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
python_prog="${with_python}"
AC_PATH_PROG(python_prog_path, ${python_prog}, missing)
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
;;
esac
if test $? != 0; then
have_python_config=failed
if test "${with_python}" != auto; then
- AC_ERROR(failure running python-config --includes)
+ AC_MSG_ERROR(failure running python-config --includes)
fi
fi
python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
if test $? != 0; then
have_python_config=failed
if test "${with_python}" != auto; then
- AC_ERROR(failure running python-config --ldflags)
+ AC_MSG_ERROR(failure running python-config --ldflags)
fi
fi
python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
if test $? != 0; then
have_python_config=failed
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
else
# Check that the compiler accepts it
saved_CFLAGS="$CFLAGS"
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"
done
AC_MSG_RESULT(${PYTHON_CFLAGS})
if test "$cross_compiling" = no; then
AC_FUNC_SETPGRP
else
- AC_CACHE_CHECK([whether setpgrp takes no argument], ac_cv_func_setpgrp_void,
- [AC_TRY_COMPILE([
-#include <unistd.h>
-], [
- if (setpgrp(1,1) == -1)
- exit (0);
- else
- exit (1);
-], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes)])
+ AC_CACHE_CHECK(
+ [whether setpgrp takes no argument],
+ [ac_cv_func_setpgrp_void],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <unistd.h>],
+ [if (setpgrp(1,1) == -1)
+ exit (0);
+ else
+ exit (1);]
+ )],
+ [ac_cv_func_setpgrp_void=no],
+ [ac_cv_func_setpgrp_void=yes]
+ )]
+ )
if test "$ac_cv_func_setpgrp_void" = yes; then
AC_DEFINE(SETPGRP_VOID, 1)
fi
AC_CACHE_CHECK(
[for GNU regex],
[gdb_cv_have_gnu_regex],
- [AC_TRY_COMPILE(
- [#include <gnu-versions.h>],
- [#define REGEX_INTERFACE_VERSION 1
-#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
-# error "Version mismatch"
-#endif],
- gdb_cv_have_gnu_regex=yes,
- gdb_cv_have_gnu_regex=no)])
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <gnu-versions.h>],
+ [#define REGEX_INTERFACE_VERSION 1
+ #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
+ # error "Version mismatch"
+ #endif]
+ )],
+ [gdb_cv_have_gnu_regex=yes],
+ [gdb_cv_have_gnu_regex=no]
+ )]
+)
if test "$gdb_cv_have_gnu_regex" = yes; then
gdb_use_included_regex=no
fi
])
# See if <sys/lwp.h> defines `struct lwp`.
-AC_CACHE_CHECK([for struct lwp], gdb_cv_struct_lwp,
-[AC_TRY_COMPILE([#include <sys/param.h>
-#define _KMEMUSER
-#include <sys/lwp.h>], [struct lwp l;],
-gdb_cv_struct_lwp=yes, gdb_cv_struct_lwp=no)])
+AC_CACHE_CHECK(
+ [for struct lwp],
+ [gdb_cv_struct_lwp],
+ [AC_COMPILE_IFELSE(
+ [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
AC_DEFINE(HAVE_STRUCT_LWP, 1,
[Define to 1 if your system has struct lwp.])
fi
# See if <machine/reg.h> degines `struct reg'.
-AC_CACHE_CHECK([for struct reg in machine/reg.h], gdb_cv_struct_reg,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <machine/reg.h>], [struct reg r;],
-gdb_cv_struct_reg=yes, gdb_cv_struct_reg=no)])
+AC_CACHE_CHECK(
+ [for struct reg in machine/reg.h],
+ [gdb_cv_struct_reg],
+ [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
AC_DEFINE(HAVE_STRUCT_REG, 1,
[Define to 1 if your system has struct reg in <machine/reg.h>.])
# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
AC_MSG_CHECKING(for PTRACE_GETREGS)
-AC_CACHE_VAL(gdb_cv_have_ptrace_getregs,
-[AC_TRY_COMPILE([#include <sys/ptrace.h>],
- [PTRACE_GETREGS;],
- [gdb_cv_have_ptrace_getregs=yes],
- [gdb_cv_have_ptrace_getregs=no])])
+AC_CACHE_VAL(
+ [gdb_cv_have_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=no]
+ )]
+)
AC_MSG_RESULT($gdb_cv_have_ptrace_getregs)
if test "$gdb_cv_have_ptrace_getregs" = yes; then
AC_DEFINE(HAVE_PTRACE_GETREGS, 1,
# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
AC_MSG_CHECKING(for PTRACE_GETFPXREGS)
-AC_CACHE_VAL(gdb_cv_have_ptrace_getfpxregs,
-[AC_TRY_COMPILE([#include <sys/ptrace.h>],
- [PTRACE_GETFPXREGS;],
- [gdb_cv_have_ptrace_getfpxregs=yes],
- [gdb_cv_have_ptrace_getfpxregs=no])])
+AC_CACHE_VAL(
+ [gdb_cv_have_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=no]
+ )]
+)
AC_MSG_RESULT($gdb_cv_have_ptrace_getfpxregs)
if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
AC_DEFINE(HAVE_PTRACE_GETFPXREGS, 1,
# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
AC_MSG_CHECKING(for PT_GETDBREGS)
-AC_CACHE_VAL(gdb_cv_have_pt_getdbregs,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/ptrace.h>],
- [PT_GETDBREGS;],
- [gdb_cv_have_pt_getdbregs=yes],
- [gdb_cv_have_pt_getdbregs=no])])
+AC_CACHE_VAL(
+ [gdb_cv_have_pt_getdbregs],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <sys/types.h>
+ #include <sys/ptrace.h>],
+ [PT_GETDBREGS;]
+ )],
+ [gdb_cv_have_pt_getdbregs=yes],
+ [gdb_cv_have_pt_getdbregs=no]
+ )]
+)
AC_MSG_RESULT($gdb_cv_have_pt_getdbregs)
if test "$gdb_cv_have_pt_getdbregs" = yes; then
AC_DEFINE(HAVE_PT_GETDBREGS, 1,
# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
AC_MSG_CHECKING(for PT_GETXMMREGS)
-AC_CACHE_VAL(gdb_cv_have_pt_getxmmregs,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/ptrace.h>],
- [PT_GETXMMREGS;],
- [gdb_cv_have_pt_getxmmregs=yes],
- [gdb_cv_have_pt_getxmmregs=no])])
+AC_CACHE_VAL(
+ [gdb_cv_have_pt_getxmmregs],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <sys/types.h>
+ #include <sys/ptrace.h>],
+ [PT_GETXMMREGS;]
+ )],
+ [gdb_cv_have_pt_getxmmregs=yes],
+ [gdb_cv_have_pt_getxmmregs=no]
+ )]
+)
AC_MSG_RESULT($gdb_cv_have_pt_getxmmregs)
if test "$gdb_cv_have_pt_getxmmregs" = yes; then
AC_DEFINE(HAVE_PT_GETXMMREGS, 1,
case ${host_os} in
aix*)
- AC_CACHE_CHECK([for -bbigtoc option], [gdb_cv_bigtoc], [
- SAVE_LDFLAGS=$LDFLAGS
-
- case $GCC in
- yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
- *) gdb_cv_bigtoc=-bbigtoc ;;
- esac
-
- LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
- AC_TRY_LINK([], [int i;], [], [gdb_cv_bigtoc=])
- LDFLAGS="${SAVE_LDFLAGS}"
- ])
+ AC_CACHE_CHECK(
+ [for -bbigtoc option], [gdb_cv_bigtoc],
+ [SAVE_LDFLAGS=$LDFLAGS
+
+ case $GCC in
+ yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
+ *) gdb_cv_bigtoc=-bbigtoc ;;
+ esac
+
+ LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([], [int i;])],
+ [],
+ [gdb_cv_bigtoc=]
+ )
+ LDFLAGS="${SAVE_LDFLAGS}"]
+ )
CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
;;
esac
RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
LDFLAGS="$LDFLAGS $RDYNAMIC"
if test "${have_libpython}" = no; then
- AC_TRY_LINK([], [], [dynamic_list=true])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([], [])],
+ [dynamic_list=true],
+ []
+ )
else
# Workaround http://bugs.python.org/issue4434 where static
# libpythonX.Y.a would get its symbols required for
case ${host_os} in
aix*)
AC_MSG_CHECKING(for AiX thread debugging library)
- AC_CACHE_VAL(gdb_cv_have_aix_thread_debug,
- [AC_TRY_COMPILE([#include <sys/pthdebug.h>],
- [#ifndef PTHDB_VERSION_3
- #error
- #endif],
- gdb_cv_have_aix_thread_debug=yes,
- gdb_cv_have_aix_thread_debug=no)])
+ AC_CACHE_VAL(
+ [gdb_cv_have_aix_thread_debug],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <sys/pthdebug.h>],
+ [#ifndef PTHDB_VERSION_3
+ #error
+ #endif]
+ )],
+ [gdb_cv_have_aix_thread_debug=yes],
+ [gdb_cv_have_aix_thread_debug=no]
+ )]
+ )
AC_MSG_RESULT($gdb_cv_have_aix_thread_debug)
if test "$gdb_cv_have_aix_thread_debug" = yes; then
CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
dnl See if we have a thread_db header file that has TD_NOTALLOC and
dnl other error codes.
if test "x$ac_cv_header_thread_db_h" = "xyes"; then
- AC_CACHE_CHECK([whether <thread_db.h> has TD_NOTALLOC],
- gdb_cv_thread_db_h_has_td_notalloc,
- AC_TRY_COMPILE(
- [#include <thread_db.h>],
- [int i = TD_NOTALLOC;],
- 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],
- gdb_cv_thread_db_h_has_td_version,
- AC_TRY_COMPILE(
- [#include <thread_db.h>],
- [int i = TD_VERSION;],
- 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],
- gdb_cv_thread_db_h_has_td_notls,
- AC_TRY_COMPILE(
- [#include <thread_db.h>],
- [int i = TD_NOTLS;],
- gdb_cv_thread_db_h_has_td_notls=yes,
- gdb_cv_thread_db_h_has_td_notls=no
- )
- )
+ AC_CACHE_CHECK(
+ [whether <thread_db.h> has TD_NOTALLOC],
+ [gdb_cv_thread_db_h_has_td_notalloc],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <thread_db.h>],
+ [int i = TD_NOTALLOC;]
+ )],
+ [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],
+ [gdb_cv_thread_db_h_has_td_version],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <thread_db.h>],
+ [int i = TD_VERSION;]
+ )],
+ [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],
+ [gdb_cv_thread_db_h_has_td_notls],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <thread_db.h>],
+ [int i = TD_NOTLS;]
+ )],
+ [gdb_cv_thread_db_h_has_td_notls=yes],
+ [gdb_cv_thread_db_h_has_td_notls=no]
+ )]
+ )
fi
if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
AC_DEFINE(THREAD_DB_HAS_TD_NOTALLOC, 1,
# Check for babeltrace and babeltrace-ctf
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])
AC_MSG_CHECKING([whether to use babeltrace])
AC_MSG_RESULT([$with_babeltrace])
# Check for 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])
GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections])
AC_PATH_PROGS(XSLTPROC, xsltproc, missing)
if test "x$USE_MAINTAINER_MODE" = xyes; 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
AC_SUBST(XSLTPROC)