m4_include(ax_cxx_compile_stdcxx.m4)
-dnl written by Guido Draheim <guidod@gmx.de>, original by Alexandre Oliva
+dnl written by Guido Draheim <guidod@gmx.de>, original by Alexandre Oliva
dnl Version 1.3 (2001/03/02)
dnl source http://www.gnu.org/software/ac-archive/Miscellaneous/ac_define_dir.html
AC_DEFUN([GDB_AC_DEFINE_RELOCATABLE], [
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
+ test_prefix=/usr/local
else
test_prefix=$prefix
fi
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
- [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
- [$1], [17], [ax_cxx_compile_alternatives="17 1z"],
- [$1], [20], [ax_cxx_compile_alternatives="20"],
- [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
+ [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
+ [$1], [17], [ax_cxx_compile_alternatives="17 1z"],
+ [$1], [20], [ax_cxx_compile_alternatives="20"],
+ [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$2], [], [],
- [$2], [ext], [],
- [$2], [noext], [],
- [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
+ [$2], [ext], [],
+ [$2], [noext], [],
+ [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
- [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
- [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
- [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
+ [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
+ [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
+ [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
AC_LANG_PUSH([C++])dnl
CXX_DIALECT=""
ac_success=no
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
ax_cv_cxx_compile_cxx$1,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
- [ax_cv_cxx_compile_cxx$1=yes],
- [ax_cv_cxx_compile_cxx$1=no])])
+ [ax_cv_cxx_compile_cxx$1=yes],
+ [ax_cv_cxx_compile_cxx$1=no])])
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
ac_success=yes
fi])
switch="-std=gnu++${alternative}"
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
- $cachevar,
- [ac_save_CXX="$CXX"
- CXX="$CXX $switch"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
- [eval $cachevar=yes],
- [eval $cachevar=no])
- CXX="$ac_save_CXX"])
+ $cachevar,
+ [ac_save_CXX="$CXX"
+ CXX="$CXX $switch"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+ [eval $cachevar=yes],
+ [eval $cachevar=no])
+ CXX="$ac_save_CXX"])
if eval test x\$$cachevar = xyes; then
- CXX_DIALECT="$switch"
- CXX="$CXX $switch"
- if test -n "$CXXCPP" ; then
- CXXCPP="$CXXCPP $switch"
- fi
- ac_success=yes
- break
+ CXX_DIALECT="$switch"
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
fi
done
fi])
dnl MSVC needs -std:c++NN for C++17 and later (default is C++14)
for alternative in ${ax_cxx_compile_alternatives}; do
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do
- if test x"$switch" = xMSVC; then
- dnl AS_TR_SH maps both `:` and `=` to `_` so -std:c++17 would collide
- dnl with -std=c++17. We suffix the cache variable name with _MSVC to
- dnl avoid this.
- switch=-std:c++${alternative}
- cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_${switch}_MSVC])
- else
- cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
- fi
- AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
- $cachevar,
- [ac_save_CXX="$CXX"
- CXX="$CXX $switch"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
- [eval $cachevar=yes],
- [eval $cachevar=no])
- CXX="$ac_save_CXX"])
- if eval test x\$$cachevar = xyes; then
- CXX_DIALECT="$switch"
- CXX="$CXX $switch"
- if test -n "$CXXCPP" ; then
- CXXCPP="$CXXCPP $switch"
- fi
- ac_success=yes
- break
- fi
+ if test x"$switch" = xMSVC; then
+ dnl AS_TR_SH maps both `:` and `=` to `_` so -std:c++17 would collide
+ dnl with -std=c++17. We suffix the cache variable name with _MSVC to
+ dnl avoid this.
+ switch=-std:c++${alternative}
+ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_${switch}_MSVC])
+ else
+ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+ fi
+ AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
+ $cachevar,
+ [ac_save_CXX="$CXX"
+ CXX="$CXX $switch"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+ [eval $cachevar=yes],
+ [eval $cachevar=no])
+ CXX="$ac_save_CXX"])
+ if eval test x\$$cachevar = xyes; then
+ CXX_DIALECT="$switch"
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
+ fi
done
if test x$ac_success = xyes; then
- break
+ break
fi
done
fi])
else
HAVE_CXX$1=1
AC_DEFINE(HAVE_CXX$1,1,
- [define if the compiler supports basic C++$1 syntax])
+ [define if the compiler supports basic C++$1 syntax])
fi
AC_SUBST(HAVE_CXX$1)
AC_SUBST(CXX_DIALECT)
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
- const auto identity = [](int y){ return y; };
- for (auto i = 0; i < a; ++i)
- a += b--;
- return x + identity(a + b);
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
- return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
test()
{
const auto lambda = [](auto&&... args){
- const auto istiny = [](auto x){
- return (sizeof(x) == 1UL) ? 1 : 0;
- };
- const int aretiny[] = { istiny(args)... };
- return aretiny[0];
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
{
auto length = 0UL;
for (auto p = s; *p; ++p)
- ++length;
+ ++length;
return length;
}
switch (f1())
{
case 17:
- f1();
- [[fallthrough]];
+ f1();
+ [[fallthrough]];
case 42:
- f1();
+ f1();
}
return f1();
}
struct base2
{
base2() {
- b3 = 42;
+ b3 = 42;
}
int b3;
};
struct derived : base1, base2
{
- int d;
+ int d;
};
derived d1 {{1, 2}, {}, 4}; // full initialization
int& operator* ()
{
- return i;
+ return i;
}
const int& operator* () const
{
- return i;
+ return i;
}
iter& operator++()
{
- ++i;
- return *this;
+ ++i;
+ return *this;
}
};
{
iter begin() const
{
- return {0};
+ return {0};
}
sentinel end() const
{
- return {5};
+ return {5};
}
};
for (auto i : r)
{
- [[maybe_unused]] auto v = i;
+ [[maybe_unused]] auto v = i;
}
}
int i;
int foo()
{
- return [*this]()
- {
- return i;
- }();
+ return [*this]()
+ {
+ return i;
+ }();
}
};
{
if constexpr(cond)
{
- return 13;
+ return 13;
}
else
{
- return 42;
+ return 42;
}
}
{
if (auto i = f(); i > 0)
{
- return 3;
+ return 3;
}
switch (auto i = f(); i + 4)
{
case 17:
- return 2;
+ return 2;
default:
- return 1;
+ return 1;
}
}
struct pair
{
pair (T1 p1, T2 p2)
- : m1 {p1},
- m2 {p2}
+ : m1 {p1},
+ m2 {p2}
{}
T1 m1;
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
- const auto identity = [](int y){ return y; };
- for (auto i = 0; i < a; ++i)
- a += b--;
- return x + identity(a + b);
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
- return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
test()
{
const auto lambda = [](auto&&... args){
- const auto istiny = [](auto x){
- return (sizeof(x) == 1UL) ? 1 : 0;
- };
- const int aretiny[] = { istiny(args)... };
- return aretiny[0];
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
{
auto length = 0UL;
for (auto p = s; *p; ++p)
- ++length;
+ ++length;
return length;
}
switch (f1())
{
case 17:
- f1();
- [[fallthrough]];
+ f1();
+ [[fallthrough]];
case 42:
- f1();
+ f1();
}
return f1();
}
struct base2
{
base2() {
- b3 = 42;
+ b3 = 42;
}
int b3;
};
struct derived : base1, base2
{
- int d;
+ int d;
};
derived d1 {{1, 2}, {}, 4}; // full initialization
int& operator* ()
{
- return i;
+ return i;
}
const int& operator* () const
{
- return i;
+ return i;
}
iter& operator++()
{
- ++i;
- return *this;
+ ++i;
+ return *this;
}
};
{
iter begin() const
{
- return {0};
+ return {0};
}
sentinel end() const
{
- return {5};
+ return {5};
}
};
for (auto i : r)
{
- [[maybe_unused]] auto v = i;
+ [[maybe_unused]] auto v = i;
}
}
int i;
int foo()
{
- return [*this]()
- {
- return i;
- }();
+ return [*this]()
+ {
+ return i;
+ }();
}
};
{
if constexpr(cond)
{
- return 13;
+ return 13;
}
else
{
- return 42;
+ return 42;
}
}
{
if (auto i = f(); i > 0)
{
- return 3;
+ return 3;
}
switch (auto i = f(); i + 4)
{
case 17:
- return 2;
+ return 2;
default:
- return 1;
+ return 1;
}
}
struct pair
{
pair (T1 p1, T2 p2)
- : m1 {p1},
- m2 {p2}
+ : m1 {p1},
+ m2 {p2}
{}
T1 m1;
$as_echo_n "(cached) " >&6
else
ac_save_CXX="$CXX"
- CXX="$CXX $switch"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ CXX="$CXX $switch"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
- const auto identity = [](int y){ return y; };
- for (auto i = 0; i < a; ++i)
- a += b--;
- return x + identity(a + b);
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
- return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
test()
{
const auto lambda = [](auto&&... args){
- const auto istiny = [](auto x){
- return (sizeof(x) == 1UL) ? 1 : 0;
- };
- const int aretiny[] = { istiny(args)... };
- return aretiny[0];
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
{
auto length = 0UL;
for (auto p = s; *p; ++p)
- ++length;
+ ++length;
return length;
}
switch (f1())
{
case 17:
- f1();
- [[fallthrough]];
+ f1();
+ [[fallthrough]];
case 42:
- f1();
+ f1();
}
return f1();
}
struct base2
{
base2() {
- b3 = 42;
+ b3 = 42;
}
int b3;
};
struct derived : base1, base2
{
- int d;
+ int d;
};
derived d1 {{1, 2}, {}, 4}; // full initialization
int& operator* ()
{
- return i;
+ return i;
}
const int& operator* () const
{
- return i;
+ return i;
}
iter& operator++()
{
- ++i;
- return *this;
+ ++i;
+ return *this;
}
};
{
iter begin() const
{
- return {0};
+ return {0};
}
sentinel end() const
{
- return {5};
+ return {5};
}
};
for (auto i : r)
{
- [[maybe_unused]] auto v = i;
+ [[maybe_unused]] auto v = i;
}
}
int i;
int foo()
{
- return [*this]()
- {
- return i;
- }();
+ return [*this]()
+ {
+ return i;
+ }();
}
};
{
if constexpr(cond)
{
- return 13;
+ return 13;
}
else
{
- return 42;
+ return 42;
}
}
{
if (auto i = f(); i > 0)
{
- return 3;
+ return 3;
}
switch (auto i = f(); i + 4)
{
case 17:
- return 2;
+ return 2;
default:
- return 1;
+ return 1;
}
}
struct pair
{
pair (T1 p1, T2 p2)
- : m1 {p1},
- m2 {p2}
+ : m1 {p1},
+ m2 {p2}
{}
T1 m1;
eval $cachevar=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CXX="$ac_save_CXX"
+ CXX="$ac_save_CXX"
fi
eval ac_res=\$$cachevar
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test x\$$cachevar = xyes; then
- CXX_DIALECT="$switch"
- CXX="$CXX $switch"
- if test -n "$CXXCPP" ; then
- CXXCPP="$CXXCPP $switch"
- fi
- ac_success=yes
- break
+ CXX_DIALECT="$switch"
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
fi
done
fi
if test x$ac_success = xno; then
for alternative in ${ax_cxx_compile_alternatives}; do
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do
- if test x"$switch" = xMSVC; then
- switch=-std:c++${alternative}
- cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_${switch}_MSVC" | $as_tr_sh`
- else
- cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
+ if test x"$switch" = xMSVC; then
+ switch=-std:c++${alternative}
+ cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_${switch}_MSVC" | $as_tr_sh`
+ else
+ cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
$as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; }
if eval \${$cachevar+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_CXX="$CXX"
- CXX="$CXX $switch"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ CXX="$CXX $switch"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
- const auto identity = [](int y){ return y; };
- for (auto i = 0; i < a; ++i)
- a += b--;
- return x + identity(a + b);
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
- return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
test()
{
const auto lambda = [](auto&&... args){
- const auto istiny = [](auto x){
- return (sizeof(x) == 1UL) ? 1 : 0;
- };
- const int aretiny[] = { istiny(args)... };
- return aretiny[0];
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
{
auto length = 0UL;
for (auto p = s; *p; ++p)
- ++length;
+ ++length;
return length;
}
switch (f1())
{
case 17:
- f1();
- [[fallthrough]];
+ f1();
+ [[fallthrough]];
case 42:
- f1();
+ f1();
}
return f1();
}
struct base2
{
base2() {
- b3 = 42;
+ b3 = 42;
}
int b3;
};
struct derived : base1, base2
{
- int d;
+ int d;
};
derived d1 {{1, 2}, {}, 4}; // full initialization
int& operator* ()
{
- return i;
+ return i;
}
const int& operator* () const
{
- return i;
+ return i;
}
iter& operator++()
{
- ++i;
- return *this;
+ ++i;
+ return *this;
}
};
{
iter begin() const
{
- return {0};
+ return {0};
}
sentinel end() const
{
- return {5};
+ return {5};
}
};
for (auto i : r)
{
- [[maybe_unused]] auto v = i;
+ [[maybe_unused]] auto v = i;
}
}
int i;
int foo()
{
- return [*this]()
- {
- return i;
- }();
+ return [*this]()
+ {
+ return i;
+ }();
}
};
{
if constexpr(cond)
{
- return 13;
+ return 13;
}
else
{
- return 42;
+ return 42;
}
}
{
if (auto i = f(); i > 0)
{
- return 3;
+ return 3;
}
switch (auto i = f(); i + 4)
{
case 17:
- return 2;
+ return 2;
default:
- return 1;
+ return 1;
}
}
struct pair
{
pair (T1 p1, T2 p2)
- : m1 {p1},
- m2 {p2}
+ : m1 {p1},
+ m2 {p2}
{}
T1 m1;
eval $cachevar=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CXX="$ac_save_CXX"
+ CXX="$ac_save_CXX"
fi
eval ac_res=\$$cachevar
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- if eval test x\$$cachevar = xyes; then
- CXX_DIALECT="$switch"
- CXX="$CXX $switch"
- if test -n "$CXXCPP" ; then
- CXXCPP="$CXXCPP $switch"
- fi
- ac_success=yes
- break
- fi
+ if eval test x\$$cachevar = xyes; then
+ CXX_DIALECT="$switch"
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
+ fi
done
if test x$ac_success = xyes; then
- break
+ break
fi
done
fi
main ()
{
sigjmp_buf env;
- while (! sigsetjmp (env, 1))
- siglongjmp (env, 1);
+ while (! sigsetjmp (env, 1))
+ siglongjmp (env, 1);
;
return 0;
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
+ test_prefix=/usr/local
else
test_prefix=$prefix
fi
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
+ test_prefix=/usr/local
else
test_prefix=$prefix
fi
if test "${enable_targets+set}" = set; then :
enableval=$enable_targets; case "${enableval}" in
yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
- ;;
+ ;;
no) enable_targets= ;;
*)
enable_targets=$enableval
if test "${enable_binary_file_formats+set}" = set; then :
enableval=$enable_binary_file_formats; case "${enableval}" in
yes | "") as_fn_error $? "enable-binary-file-formats option must specify file formats or 'all'" "$LINENO" 5
- ;;
+ ;;
no) enable_binary_file_formats= ;;
*) enable_binary_file_formats=$enableval ;;
esac
# Canonicalize the secondary target names.
result=`$ac_config_sub $targ_alias 2>/dev/null`
if test -n "$result"; then
- targ=$result
+ targ=$result
else
- targ=$targ_alias
+ targ=$targ_alias
fi
. ${srcdir}/configure.tgt
# Target-specific object files
for i in ${gdb_target_obs}; do
- case " $TARGET_OBS " in
- *" ${i} "*) ;;
- *)
- TARGET_OBS="$TARGET_OBS ${i}"
- ;;
- esac
+ case " $TARGET_OBS " in
+ *" ${i} "*) ;;
+ *)
+ TARGET_OBS="$TARGET_OBS ${i}"
+ ;;
+ esac
done
# Check whether this target needs 64-bit CORE_ADDR
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
+ test_prefix=/usr/local
else
test_prefix=$prefix
fi
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
+ test_prefix=/usr/local
else
test_prefix=$prefix
fi
# ${with_python}. On Windows/MinGW, this is where the Python
# executable is.
if test ! -x "${python_prog}"; then
- python_prog="${with_python}/python"
- python_prefix=
+ python_prog="${with_python}/python"
+ python_prefix=
fi
if test ! -x "${python_prog}"; then
- # Fall back to gdb 7.0/7.1 behavior.
- python_prog=missing
- python_prefix=${with_python}
+ # Fall back to gdb 7.0/7.1 behavior.
+ python_prog=missing
+ python_prefix=${with_python}
fi
elif test -x "${with_python}"; then
# While we can't run python compiled for $host (unless host == build),
case "${with_python}" in
yes | auto)
if test "${build}" = "${host}"; then
- # Look first for 'python', then 'python3'.
- for ac_prog in python python3
+ # Look first for 'python', then 'python3'.
+ for ac_prog in python python3
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
done
test -n "$python_prog_path" || python_prog_path="missing"
- if test "${python_prog_path}" = missing; then
- python_prog=missing
- else
- python_prog=${python_prog_path}
- fi
+ if test "${python_prog_path}" = missing; then
+ python_prog=missing
+ else
+ python_prog=${python_prog_path}
+ fi
else
- # Not much we can do except assume the cross-compiler will find the
- # right files.
- python_prog=missing
+ # Not much we can do except assume the cross-compiler will find the
+ # right files.
+ python_prog=missing
fi
;;
*)
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
have_libpython=yes
- found_usable_python=yes
- PYTHON_CPPFLAGS=$new_CPPFLAGS
- PYTHON_LIBS=$new_LIBS
+ found_usable_python=yes
+ PYTHON_CPPFLAGS=$new_CPPFLAGS
+ PYTHON_LIBS=$new_LIBS
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
+ test_prefix=/usr/local
else
test_prefix=$prefix
fi
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
+ test_prefix=/usr/local
else
test_prefix=$prefix
fi
case "$gdb_host" in
mingw64)
- if test "${GCC}" = yes; then
- CPPFLAGS="$CPPFLAGS -DMS_WIN64"
- fi
- ;;
+ if test "${GCC}" = yes; then
+ CPPFLAGS="$CPPFLAGS -DMS_WIN64"
+ fi
+ ;;
esac
else
# Even if Python support is not compiled in, we need to have this file
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
have_libguile=yes
- GUILE_CPPFLAGS=$new_CPPFLAGS
- GUILE_LIBS=$new_LIBS
+ GUILE_CPPFLAGS=$new_CPPFLAGS
+ GUILE_LIBS=$new_LIBS
else
found_usable_guile=no
fi
LIBS=$save_LIBS
if test "${found_usable_guile}" = no; then
if test "${flag_errors}" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "linking guile version ${guile_version} test program failed
See \`config.log' for more details" "$LINENO" 5; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
have_libguile=yes
- GUILE_CPPFLAGS=$new_CPPFLAGS
- GUILE_LIBS=$new_LIBS
+ GUILE_CPPFLAGS=$new_CPPFLAGS
+ GUILE_LIBS=$new_LIBS
else
found_usable_guile=no
fi
LIBS=$save_LIBS
if test "${found_usable_guile}" = no; then
if test "${flag_errors}" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "linking guile version ${guile_version} test program failed
See \`config.log' for more details" "$LINENO" 5; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
have_libguile=yes
- GUILE_CPPFLAGS=$new_CPPFLAGS
- GUILE_LIBS=$new_LIBS
+ GUILE_CPPFLAGS=$new_CPPFLAGS
+ GUILE_LIBS=$new_LIBS
else
found_usable_guile=no
fi
LIBS=$save_LIBS
if test "${found_usable_guile}" = no; then
if test "${flag_errors}" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "linking guile version ${guile_version} test program failed
See \`config.log' for more details" "$LINENO" 5; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
have_libguile=yes
- GUILE_CPPFLAGS=$new_CPPFLAGS
- GUILE_LIBS=$new_LIBS
+ GUILE_CPPFLAGS=$new_CPPFLAGS
+ GUILE_LIBS=$new_LIBS
else
found_usable_guile=no
fi
LIBS=$save_LIBS
if test "${found_usable_guile}" = no; then
if test "${flag_errors}" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "linking guile version ${guile_version} test program failed
See \`config.log' for more details" "$LINENO" 5; }
else
if ${pkg_config_prog_path} --exists source-highlight; then
case "$LDFLAGS" in
- *static-libstdc*)
- as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
- ;;
+ *static-libstdc*)
+ as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
+ ;;
esac
srchigh_pkg_cflags=`${pkg_config_prog_path} --cflags source-highlight`
main ()
{
std::string outlang = "esc.outlang";
- new srchilite::SourceHighlight (outlang);
+ new srchilite::SourceHighlight (outlang);
;
return 0;
$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- SRCHIGH_CFLAGS="$srchigh_pkg_cflags"
- SRCHIGH_LIBS="$srchigh_pkg_libs"
+ SRCHIGH_CFLAGS="$srchigh_pkg_cflags"
+ SRCHIGH_LIBS="$srchigh_pkg_libs"
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- if test "${enable_source_highlight}" = "yes"; then
- as_fn_error $? "source-highlight in your system could not be used" "$LINENO" 5
- fi
+ if test "${enable_source_highlight}" = "yes"; then
+ as_fn_error $? "source-highlight in your system could not be used" "$LINENO" 5
+ fi
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if test "${enable_source_highlight}" = "yes"; then
- as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
+ as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
fi
fi
fi
main ()
{
- const char *code = "import ctypes\n";
- Py_Initialize ();
- PyObject *main_module = PyImport_AddModule ("__main__");
- PyObject *global_dict = PyModule_GetDict (main_module);
- PyObject *local_dict = PyDict_New ();
- PyObject *py_code = Py_CompileString (code, "test", Py_single_input);
- if (py_code == NULL)
- return 1;
- PyObject *res = PyEval_EvalCode (py_code, global_dict, local_dict);
- Py_Finalize ();
- return res ? 0 : 1;
+ const char *code = "import ctypes\n";
+ Py_Initialize ();
+ PyObject *main_module = PyImport_AddModule ("__main__");
+ PyObject *global_dict = PyModule_GetDict (main_module);
+ PyObject *local_dict = PyDict_New ();
+ PyObject *py_code = Py_CompileString (code, "test", Py_single_input);
+ if (py_code == NULL)
+ return 1;
+ PyObject *res = PyEval_EvalCode (py_code, global_dict, local_dict);
+ Py_Finalize ();
+ return res ? 0 : 1;
;
return 0;
}
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <execinfo.h>
+ #include <execinfo.h>
int
main ()
{
- int f;
- void *b[2];
- f = backtrace (b, 2);
- backtrace_symbols_fd (b, f, 2);
+ int f;
+ void *b[2];
+ f = backtrace (b, 2);
+ backtrace_symbols_fd (b, f, 2);
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
if test "$gdb_cv_have_aix_thread_debug" = yes; then
- CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
- CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
- LIBS="$LIBS -lpthdebug"
-
- # Older versions of AIX do not provide the declaration for
- # the getthrds function (it appears that it was introduced
- # with AIX 6.x).
- ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
+ CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
+ CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
+ LIBS="$LIBS -lpthdebug"
+
+ # Older versions of AIX do not provide the declaration for
+ # the getthrds function (it appears that it was introduced
+ # with AIX 6.x).
+ ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
"
if test "x$ac_cv_have_decl_getthrds" = xyes; then :
ac_have_decl=1
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
+ test_prefix=/usr/local
else
test_prefix=$prefix
fi
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
+ test_prefix=/usr/local
else
test_prefix=$prefix
fi
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
+ test_prefix=/usr/local
else
test_prefix=$prefix
fi
main ()
{
- #if !defined __GNUC__ || defined __clang__
- #error not gcc
- #endif
+ #if !defined __GNUC__ || defined __clang__
+ #error not gcc
+ #endif
;
return 0;
main ()
{
- #ifndef __clang__
- #error not clang
- #endif
+ #ifndef __clang__
+ #error not clang
+ #endif
;
return 0;
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
+ build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
+ build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
case $w in
-Wno-*)
wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
- -Wformat-nonliteral)
+ -Wformat-nonliteral)
# gcc requires -Wformat before -Wformat-nonliteral
# will work, so stick them together.
w="-Wformat $w"
if test "$HAVE_LIBLZMA" != yes; then
if test "$with_lzma" = yes; then
- as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
+ as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
fi
fi
fi
- # Check for in-tree tcl
- here=`pwd`
- cd ${srcdir}/..
- topdir=`pwd`
- cd ${here}
+ # Check for in-tree tcl
+ here=`pwd`
+ cd ${srcdir}/..
+ topdir=`pwd`
+ cd ${here}
- intree="no"
- if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
- intree="yes"
- fi
+ intree="no"
+ if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
+ intree="yes"
+ fi
- # Find Tcl private headers
- if test x"${intree}" = xno; then
+ # Find Tcl private headers
+ if test x"${intree}" = xno; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
$as_echo_n "checking for Tcl private headers... " >&6; }
fi
TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
- TCL_LIBRARY="${TCL_LIB_SPEC}"
- TCL_DEPS=""
- else
- # If building tcl in the same src tree, private headers
- # are not needed, but we need to be sure to use the right
- # headers library
+ TCL_LIBRARY="${TCL_LIB_SPEC}"
+ TCL_DEPS=""
+ else
+ # If building tcl in the same src tree, private headers
+ # are not needed, but we need to be sure to use the right
+ # headers library
TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
- TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
- TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
- fi
+ TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
+ TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
+ fi
- # Check for in-tree Tk
- intree="no"
- if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
- intree="yes"
- fi
+ # Check for in-tree Tk
+ intree="no"
+ if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
+ intree="yes"
+ fi
- # Find Tk private headers
- if test x"${intree}" = xno; then
+ # Find Tk private headers
+ if test x"${intree}" = xno; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
$as_echo_n "checking for Tk private headers... " >&6; }
TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
TK_LIBRARY=${TK_LIB_SPEC}
- TK_DEPS=""
- else
- TK_INCLUDE="-I${TK_SRC_DIR}/generic"
- TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
- TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
- fi
+ TK_DEPS=""
+ else
+ TK_INCLUDE="-I${TK_SRC_DIR}/generic"
+ TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
+ TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
+ fi
- ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
+ ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
# Include some libraries that Tcl and Tk want.
TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
# try to include things like `$(LIBGUI)', which wouldn't work.
GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
- CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
- CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
- CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
+ CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
+ CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
+ CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
CONFIG_OBS="${CONFIG_OBS} gdbres.o"
fi
- subdirs="$subdirs gdbtk"
+ subdirs="$subdirs gdbtk"
fi
fi
pos->type = BT_SEEK_BEGIN;
bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
scope = bt_ctf_get_top_level_scope (event,
- BT_STREAM_EVENT_HEADER);
- bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
+ BT_STREAM_EVENT_HEADER);
+ bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
;
return 0;
AS_HELP_STRING([--with-relocated-sources=PATH], [automatically relocate this path for source files]),
[reloc_srcdir="${withval}"
AC_DEFINE_DIR(RELOC_SRCDIR, reloc_srcdir,
- [Relocated directory for source files. ])
+ [Relocated directory for source files. ])
])
AC_MSG_CHECKING([for default auto-load directory])
AS_HELP_STRING([--with-auto-load-safe-path=PATH],
[directories safe to hold auto-loaded files @<:@--with-auto-load-dir@:>@])
AS_HELP_STRING([--without-auto-load-safe-path],
- [do not restrict auto-loaded files locations]),
+ [do not restrict auto-loaded files locations]),
[if test "$with_auto_load_safe_path" = "no"; then
with_auto_load_safe_path="/"
fi],
AS_HELP_STRING([--enable-targets=TARGETS], [alternative target configurations]),
[case "${enableval}" in
yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all')
- ;;
+ ;;
no) enable_targets= ;;
*)
enable_targets=$enableval
available formats: coff, elf, macho, mips, xcoff, all]),
[case "${enableval}" in
yes | "") AC_MSG_ERROR(enable-binary-file-formats option must specify file formats or 'all')
- ;;
+ ;;
no) enable_binary_file_formats= ;;
*) enable_binary_file_formats=$enableval ;;
esac], [enable_binary_file_formats=all])
# Canonicalize the secondary target names.
result=`$ac_config_sub $targ_alias 2>/dev/null`
if test -n "$result"; then
- targ=$result
+ targ=$result
else
- targ=$targ_alias
+ targ=$targ_alias
fi
. ${srcdir}/configure.tgt
# Target-specific object files
for i in ${gdb_target_obs}; do
- case " $TARGET_OBS " in
- *" ${i} "*) ;;
- *)
- TARGET_OBS="$TARGET_OBS ${i}"
- ;;
- esac
+ case " $TARGET_OBS " in
+ *" ${i} "*) ;;
+ *)
+ TARGET_OBS="$TARGET_OBS ${i}"
+ ;;
+ esac
done
# Check whether this target needs 64-bit CORE_ADDR
)
if test "$ac_cv_var__etext" = yes; then
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
AC_CACHE_CHECK(
[for etext],
)
if test "$ac_cv_var_etext" = yes; then
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
if test "$enable_profiling" = yes ; then
if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
CODESIGN_CERT=
AC_ARG_ENABLE([codesign],
AS_HELP_STRING([--enable-codesign=CERT],
- [sign gdb with 'codesign -s CERT']),
+ [sign gdb with 'codesign -s CERT']),
[CODESIGN_CERT=$enableval])
AC_SUBST([CODESIGN_CERT])
AS_HELP_STRING([--with-iconv-bin=PATH], [specify where to find the iconv program]),
[iconv_bin="${withval}"
AC_DEFINE_UNQUOTED([ICONV_BIN], ["${iconv_bin}"],
- [Path of directory of iconv program.])
+ [Path of directory of iconv program.])
GDB_AC_DEFINE_RELOCATABLE(ICONV_BIN, iconv, ${iconv_bin})
])
# default installation of ncurses on alpha*-dec-osf* will lead to such
# a situation.
AC_SEARCH_LIBS(waddstr, [ncursesw ncurses cursesX curses],
- [curses_found=yes
- AC_DEFINE([HAVE_LIBCURSES], [1],
- [Define to 1 if curses is enabled.])
- ])
+ [curses_found=yes
+ AC_DEFINE([HAVE_LIBCURSES], [1],
+ [Define to 1 if curses is enabled.])
+ ])
fi
# Check whether we should enable the TUI, but only do so if we really
AC_ARG_WITH([system-readline],
[AS_HELP_STRING([--with-system-readline],
- [use installed readline library])])
+ [use installed readline library])])
if test "$with_system_readline" = yes; then
AC_CHECK_HEADERS(readline/readline.h, [readline_h=yes], [readline_h=no])
AC_SEARCH_LIBS(dlopen, dl)
GDB_AC_WITH_DIR([JIT_READER_DIR], [jit-reader-dir],
- [directory to load the JIT readers from],
- [${libdir}/gdb])
+ [directory to load the JIT readers from],
+ [${libdir}/gdb])
AC_ARG_WITH(expat,
AS_HELP_STRING([--with-expat], [include expat support (auto/yes/no)]),
LIBS="$new_LIBS $LIBS"
found_usable_python=no
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "Python.h"]],
- [[
+ [[
#if PY_VERSION_HEX < 0x03040000
# error "Minimum supported Python version is 3.4"
#endif
Py_Initialize ();
]])],
- [have_libpython_var=yes
- found_usable_python=yes
- PYTHON_CPPFLAGS=$new_CPPFLAGS
- PYTHON_LIBS=$new_LIBS])
+ [have_libpython_var=yes
+ found_usable_python=yes
+ PYTHON_CPPFLAGS=$new_CPPFLAGS
+ PYTHON_LIBS=$new_LIBS])
CPPFLAGS=$save_CPPFLAGS
LIBS=$save_LIBS
AC_MSG_RESULT([${found_usable_python}])
# ${with_python}. On Windows/MinGW, this is where the Python
# executable is.
if test ! -x "${python_prog}"; then
- python_prog="${with_python}/python"
- python_prefix=
+ python_prog="${with_python}/python"
+ python_prefix=
fi
if test ! -x "${python_prog}"; then
- # Fall back to gdb 7.0/7.1 behavior.
- python_prog=missing
- python_prefix=${with_python}
+ # Fall back to gdb 7.0/7.1 behavior.
+ python_prog=missing
+ python_prefix=${with_python}
fi
elif test -x "${with_python}"; then
# While we can't run python compiled for $host (unless host == build),
case "${with_python}" in
yes | auto)
if test "${build}" = "${host}"; then
- # Look first for 'python', then 'python3'.
- AC_PATH_PROGS(python_prog_path, [python python3], missing)
- if test "${python_prog_path}" = missing; then
- python_prog=missing
- else
- python_prog=${python_prog_path}
- fi
+ # Look first for 'python', then 'python3'.
+ AC_PATH_PROGS(python_prog_path, [python python3], missing)
+ if test "${python_prog_path}" = missing; then
+ python_prog=missing
+ else
+ python_prog=${python_prog_path}
+ fi
else
- # Not much we can do except assume the cross-compiler will find the
- # right files.
- python_prog=missing
+ # Not much we can do except assume the cross-compiler will find the
+ # right files.
+ python_prog=missing
fi
;;
*)
have_libpython=no
if test "${have_python_config}" = yes; then
AC_TRY_LIBPYTHON(have_libpython,
- ${python_includes}, ${python_libs})
+ ${python_includes}, ${python_libs})
fi
if test "${have_libpython}" = no; then
else
if test -n "${python_prefix}"; then
AC_DEFINE_UNQUOTED(WITH_PYTHON_PATH, "${python_prefix}",
- [Define if --with-python provides a path, either directly or via python-config.py --exec-prefix.])
+ [Define if --with-python provides a path, either directly or via python-config.py --exec-prefix.])
GDB_AC_DEFINE_RELOCATABLE(PYTHON_PATH, python, ${python_prefix})
fi
fi
case "$gdb_host" in
mingw64)
- if test "${GCC}" = yes; then
- CPPFLAGS="$CPPFLAGS -DMS_WIN64"
- fi
- ;;
+ if test "${GCC}" = yes; then
+ CPPFLAGS="$CPPFLAGS -DMS_WIN64"
+ fi
+ ;;
esac
else
# Even if Python support is not compiled in, we need to have this file
CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
LIBS="$LIBS $new_LIBS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "libguile.h"]],
- [[scm_init_guile ();]])],
- [have_libguile_var=yes
- GUILE_CPPFLAGS=$new_CPPFLAGS
- GUILE_LIBS=$new_LIBS],
- [found_usable_guile=no])
+ [[scm_init_guile ();]])],
+ [have_libguile_var=yes
+ GUILE_CPPFLAGS=$new_CPPFLAGS
+ GUILE_LIBS=$new_LIBS],
+ [found_usable_guile=no])
dnl scm_set_automatic_finalization_enabled added in Guile 2.2.
AC_CHECK_FUNC(scm_set_automatic_finalization_enabled,
AC_DEFINE(HAVE_GUILE_MANUAL_FINALIZATION, 1,
- [Define if Guile supports manual finalization.])
+ [Define if Guile supports manual finalization.])
)
CPPFLAGS=$save_CPPFLAGS
LIBS=$save_LIBS
if test "${found_usable_guile}" = no; then
if test "${flag_errors}" = yes; then
- AC_MSG_FAILURE([linking guile version ${guile_version} test program failed])
+ AC_MSG_FAILURE([linking guile version ${guile_version} test program failed])
fi
fi
fi
else
if ${pkg_config_prog_path} --exists source-highlight; then
case "$LDFLAGS" in
- *static-libstdc*)
- AC_MSG_ERROR([source highlight is incompatible with -static-libstdc++; dnl
+ *static-libstdc*)
+ AC_MSG_ERROR([source highlight is incompatible with -static-libstdc++; dnl
either use --disable-source-highlight or dnl
--without-static-standard-libraries])
- ;;
+ ;;
esac
srchigh_pkg_cflags=`${pkg_config_prog_path} --cflags source-highlight`
CXXFLAGS="$CXXFLAGS $srchigh_pkg_cflags"
LIBS="$LIBS $srchigh_pkg_libs"
AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [#include <srchilite/sourcehighlight.h>],
- [std::string outlang = "esc.outlang";
- new srchilite::SourceHighlight (outlang);]
- )],
- [have_usable_source_highlight=yes],
- [have_usable_source_highlight=no]
+ [AC_LANG_PROGRAM(
+ [#include <srchilite/sourcehighlight.h>],
+ [std::string outlang = "esc.outlang";
+ new srchilite::SourceHighlight (outlang);]
+ )],
+ [have_usable_source_highlight=yes],
+ [have_usable_source_highlight=no]
)
CXXFLAGS="$save_CXXFLAGS"
LIBS="$save_LIBS"
AC_LANG_POP(C++)
if test "${have_usable_source_highlight}" = "yes"; then
- AC_DEFINE([HAVE_SOURCE_HIGHLIGHT], 1,
- [Define to 1 if the source-highlight library is available])
- AC_MSG_RESULT([yes])
- SRCHIGH_CFLAGS="$srchigh_pkg_cflags"
- SRCHIGH_LIBS="$srchigh_pkg_libs"
+ AC_DEFINE([HAVE_SOURCE_HIGHLIGHT], 1,
+ [Define to 1 if the source-highlight library is available])
+ AC_MSG_RESULT([yes])
+ SRCHIGH_CFLAGS="$srchigh_pkg_cflags"
+ SRCHIGH_LIBS="$srchigh_pkg_libs"
else
- AC_MSG_RESULT([no])
- if test "${enable_source_highlight}" = "yes"; then
- AC_MSG_ERROR([source-highlight in your system could not be used])
- fi
+ AC_MSG_RESULT([no])
+ if test "${enable_source_highlight}" = "yes"; then
+ AC_MSG_ERROR([source-highlight in your system could not be used])
+ fi
fi
else
AC_MSG_RESULT([no])
if test "${enable_source_highlight}" = "yes"; then
- AC_MSG_ERROR([source-highlight was not found in your system])
+ AC_MSG_ERROR([source-highlight was not found in your system])
fi
fi
fi
)
if test "$gdb_cv_struct_lwp" = yes; then
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
# See if <machine/reg.h> degines `struct reg'.
)
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>.])
+ [Define to 1 if your system has struct reg in <machine/reg.h>.])
fi
# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
AC_CHECK_MEMBERS([struct reg.r_fs, struct reg.r_gs], [], [],
- [#include <sys/types.h>
+ [#include <sys/types.h>
#include <machine/reg.h>])
# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
# Older FreeBSD versions don't have the pl_tdname member of
# `struct ptrace_lwpinfo'.
AC_CHECK_MEMBERS([struct ptrace_lwpinfo.pl_tdname], [], [],
- [#include <sys/ptrace.h>])
+ [#include <sys/ptrace.h>])
# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
# FreeBSD 10.3.
AC_CHECK_MEMBERS([struct ptrace_lwpinfo.pl_syscall_code], [], [],
- [#include <sys/ptrace.h>])
+ [#include <sys/ptrace.h>])
# Check if the compiler supports the `long long' type.
AC_CACHE_CHECK([for long long support in compiler], gdb_cv_c_long_long,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[extern long long foo;]],
[[switch (foo & 2) { case 0: return 1; }]])],
- gdb_cv_c_long_long=yes,
- gdb_cv_c_long_long=no)])
+ gdb_cv_c_long_long=yes,
+ gdb_cv_c_long_long=no)])
if test "$gdb_cv_c_long_long" != yes; then
# libdecnumber requires long long.
AC_MSG_ERROR([Compiler must support long long for GDB.])
# Check if the compiler and runtime support printing decfloats.
AC_CACHE_CHECK([for decfloat support in printf],
- gdb_cv_printf_has_decfloat,
- [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+ gdb_cv_printf_has_decfloat,
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[[char buf[64];
_Decimal32 d32 = 1.2345df;
_Decimal64 d64 = 1.2345dd;
_Decimal128 d128 = 1.2345dl;
sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));]])],
- gdb_cv_printf_has_decfloat=yes,
- gdb_cv_printf_has_decfloat=no,
- gdb_cv_printf_has_decfloat=no)])
+ gdb_cv_printf_has_decfloat=yes,
+ gdb_cv_printf_has_decfloat=no,
+ gdb_cv_printf_has_decfloat=no)])
if test "$gdb_cv_printf_has_decfloat" = yes; then
AC_DEFINE(PRINTF_HAS_DECFLOAT, 1,
- [Define to 1 if the "%H, %D and %DD" formats work to print decfloats.])
+ [Define to 1 if the "%H, %D and %DD" formats work to print decfloats.])
fi
# Check if the compiler supports the `long double' type. We can't use
# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
AC_CACHE_CHECK([for long double support in compiler], gdb_cv_c_long_double,
- [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[long double foo;]])],
- gdb_cv_c_long_double=yes,
- gdb_cv_c_long_double=no)])
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[long double foo;]])],
+ gdb_cv_c_long_double=yes,
+ gdb_cv_c_long_double=no)])
if test "$gdb_cv_c_long_double" = yes; then
AC_DEFINE(HAVE_LONG_DOUBLE, 1,
- [Define to 1 if the compiler supports long double.])
+ [Define to 1 if the compiler supports long double.])
fi
# Check if the compiler and runtime support printing long doubles.
AC_CACHE_CHECK([for long double support in printf],
- gdb_cv_printf_has_long_double,
- [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+ gdb_cv_printf_has_long_double,
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[[char buf[16];
long double f = 3.141592653;
sprintf (buf, "%Lg", f);
return (strncmp ("3.14159", buf, 7));]])],
- gdb_cv_printf_has_long_double=yes,
- gdb_cv_printf_has_long_double=no,
- gdb_cv_printf_has_long_double=no)])
+ gdb_cv_printf_has_long_double=yes,
+ gdb_cv_printf_has_long_double=no,
+ gdb_cv_printf_has_long_double=no)])
if test "$gdb_cv_printf_has_long_double" = yes; then
AC_DEFINE(PRINTF_HAS_LONG_DOUBLE, 1,
- [Define to 1 if the "%Lg" format works to print long doubles.])
+ [Define to 1 if the "%Lg" format works to print long doubles.])
fi
# Check if the compiler and runtime support scanning long doubles.
AC_CACHE_CHECK([for long double support in scanf],
- gdb_cv_scanf_has_long_double,
- [AC_RUN_IFELSE([AC_LANG_PROGRAM(
+ gdb_cv_scanf_has_long_double,
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM(
[[#include <stdio.h>]],
[[char *buf = "3.141592653";
long double f = 0;
sscanf (buf, "%Lg", &f);
return !(f > 3.14159 && f < 3.14160);]])],
- gdb_cv_scanf_has_long_double=yes,
- gdb_cv_scanf_has_long_double=no,
- gdb_cv_scanf_has_long_double=no)])
+ gdb_cv_scanf_has_long_double=yes,
+ gdb_cv_scanf_has_long_double=no,
+ gdb_cv_scanf_has_long_double=no)])
if test "$gdb_cv_scanf_has_long_double" = yes; then
AC_DEFINE(SCANF_HAS_LONG_DOUBLE, 1,
- [Define to 1 if the "%Lg" format works to scan long doubles.])
+ [Define to 1 if the "%Lg" format works to scan long doubles.])
fi
case ${host_os} in
CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
- [#include "Python.h"],
- [
- const char *code = "import ctypes\n";
- Py_Initialize ();
- PyObject *main_module = PyImport_AddModule ("__main__");
- PyObject *global_dict = PyModule_GetDict (main_module);
- PyObject *local_dict = PyDict_New ();
- PyObject *py_code = Py_CompileString (code, "test", Py_single_input);
- if (py_code == NULL)
- return 1;
- PyObject *res = PyEval_EvalCode (py_code, global_dict, local_dict);
- Py_Finalize ();
- return res ? 0 : 1;])],
+ [#include "Python.h"],
+ [
+ const char *code = "import ctypes\n";
+ Py_Initialize ();
+ PyObject *main_module = PyImport_AddModule ("__main__");
+ PyObject *global_dict = PyModule_GetDict (main_module);
+ PyObject *local_dict = PyDict_New ();
+ PyObject *py_code = Py_CompileString (code, "test", Py_single_input);
+ if (py_code == NULL)
+ return 1;
+ PyObject *res = PyEval_EvalCode (py_code, global_dict, local_dict);
+ Py_Finalize ();
+ return res ? 0 : 1;])],
[dynamic_list=true], [], [true])
LIBS="$old_LIBS"
CFLAGS="$old_CFLAGS"
gdb_cv_execinfo_backtrace,
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
- [
- #include <execinfo.h>
- ],
- [
- int f;
- void *b[[2]];
- f = backtrace (b, 2);
- backtrace_symbols_fd (b, f, 2);
- ])],
+ [
+ #include <execinfo.h>
+ ],
+ [
+ int f;
+ void *b[[2]];
+ f = backtrace (b, 2);
+ backtrace_symbols_fd (b, f, 2);
+ ])],
[gdb_cv_execinfo_backtrace=yes],
[gdb_cv_execinfo_backtrace=no])])
if test "$gdb_cv_execinfo_backtrace" = yes; then
AC_DEFINE(HAVE_EXECINFO_BACKTRACE, 1,
- [Define to 1 if execinfo.h backtrace functions are available.])
+ [Define to 1 if execinfo.h backtrace functions are available.])
fi
dnl For certain native configurations, we need to check whether thread
)
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"
- CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
- LIBS="$LIBS -lpthdebug"
-
- # Older versions of AIX do not provide the declaration for
- # the getthrds function (it appears that it was introduced
- # with AIX 6.x).
- AC_CHECK_DECLS(getthrds, [], [], [[#include <procinfo.h>]])
+ CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
+ CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
+ LIBS="$LIBS -lpthdebug"
+
+ # Older versions of AIX do not provide the declaration for
+ # the getthrds function (it appears that it was introduced
+ # with AIX 6.x).
+ AC_CHECK_DECLS(getthrds, [], [], [[#include <procinfo.h>]])
fi
;;
esac
fi
if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
AC_DEFINE(THREAD_DB_HAS_TD_NOTALLOC, 1,
- [Define if <thread_db.h> has the TD_NOTALLOC error code.])
+ [Define if <thread_db.h> has the TD_NOTALLOC error code.])
fi
if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
AC_DEFINE(THREAD_DB_HAS_TD_VERSION, 1,
- [Define if <thread_db.h> has the TD_VERSION error code.])
+ [Define if <thread_db.h> has the TD_VERSION error code.])
fi
if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
AC_DEFINE(THREAD_DB_HAS_TD_NOTLS, 1,
- [Define if <thread_db.h> has the TD_NOTLS error code.])
+ [Define if <thread_db.h> has the TD_NOTLS error code.])
fi
dnl Set the host's .gdbinit filename.
fi
AC_ARG_WITH(sysroot,
AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
- [search for usr/lib et al within DIR]),
+ [search for usr/lib et al within DIR]),
[TARGET_SYSTEM_ROOT=$withval], [TARGET_SYSTEM_ROOT=])
AC_DEFINE_DIR(TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT,
- [search for usr/lib et al within DIR])
+ [search for usr/lib et al within DIR])
AC_SUBST(TARGET_SYSTEM_ROOT)
GDB_AC_DEFINE_RELOCATABLE(TARGET_SYSTEM_ROOT, sysroot, ${ac_define_dir})
bfd_supports_elf=no
# Add ELF support to GDB, but only if BFD includes ELF support.
GDB_AC_CHECK_BFD([for ELF support in BFD], gdb_cv_var_bfd_elf,
- [bfd_get_elf_phdr_upper_bound (NULL)], elf-bfd.h)
+ [bfd_get_elf_phdr_upper_bound (NULL)], elf-bfd.h)
if test "$gdb_cv_var_bfd_elf" = yes; then
CONFIG_OBS="$CONFIG_OBS gcore-elf.o elf-none-tdep.o"
AC_DEFINE(HAVE_ELF, 1,
# Add macho support to GDB, but only if BFD includes it.
bfd_supports_macho=no
GDB_AC_CHECK_BFD([for Mach-O support in BFD], gdb_cv_var_bfd_macho,
- [bfd_mach_o_lookup_command (NULL, 0, NULL)], mach-o.h)
+ [bfd_mach_o_lookup_command (NULL, 0, NULL)], mach-o.h)
if test "$gdb_cv_var_bfd_macho" = yes; then
bfd_supports_macho=yes
all_binary_file_srcs="$all_binary_file_srcs \$(macho_SRCS)"
lzma_mf_is_supported (LZMA_MF_HC3);])
if test "$HAVE_LIBLZMA" != yes; then
if test "$with_lzma" = yes; then
- AC_MSG_ERROR([missing liblzma for --with-lzma])
+ AC_MSG_ERROR([missing liblzma for --with-lzma])
fi
fi
fi
if test -z "${no_tcl}" -a -z "${no_tk}"; then
SC_LOAD_TCLCONFIG
- # Check for in-tree tcl
- here=`pwd`
- cd ${srcdir}/..
- topdir=`pwd`
- cd ${here}
+ # Check for in-tree tcl
+ here=`pwd`
+ cd ${srcdir}/..
+ topdir=`pwd`
+ cd ${here}
- intree="no"
- if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
- intree="yes"
- fi
+ intree="no"
+ if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
+ intree="yes"
+ fi
- # Find Tcl private headers
- if test x"${intree}" = xno; then
- CY_AC_TCL_PRIVATE_HEADERS
+ # Find Tcl private headers
+ if test x"${intree}" = xno; then
+ CY_AC_TCL_PRIVATE_HEADERS
TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
- TCL_LIBRARY="${TCL_LIB_SPEC}"
- TCL_DEPS=""
- else
- # If building tcl in the same src tree, private headers
- # are not needed, but we need to be sure to use the right
- # headers library
+ TCL_LIBRARY="${TCL_LIB_SPEC}"
+ TCL_DEPS=""
+ else
+ # If building tcl in the same src tree, private headers
+ # are not needed, but we need to be sure to use the right
+ # headers library
TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
- TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
- TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
- fi
+ TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
+ TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
+ fi
AC_SUBST(TCL_INCLUDE)
AC_SUBST(TCL_LIBRARY)
- AC_SUBST(TCL_DEPS)
+ AC_SUBST(TCL_DEPS)
SC_LOAD_TKCONFIG
- # Check for in-tree Tk
- intree="no"
- if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
- intree="yes"
- fi
+ # Check for in-tree Tk
+ intree="no"
+ if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
+ intree="yes"
+ fi
- # Find Tk private headers
- if test x"${intree}" = xno; then
- CY_AC_TK_PRIVATE_HEADERS
+ # Find Tk private headers
+ if test x"${intree}" = xno; then
+ CY_AC_TK_PRIVATE_HEADERS
TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
TK_LIBRARY=${TK_LIB_SPEC}
- TK_DEPS=""
- else
- TK_INCLUDE="-I${TK_SRC_DIR}/generic"
- TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
- TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
- fi
+ TK_DEPS=""
+ else
+ TK_INCLUDE="-I${TK_SRC_DIR}/generic"
+ TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
+ TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
+ fi
AC_SUBST(TK_INCLUDE)
AC_SUBST(TK_LIBRARY)
AC_SUBST(TK_DEPS)
AC_SUBST(TK_XINCLUDES)
- ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
+ ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
# Include some libraries that Tcl and Tk want.
TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
# try to include things like `$(LIBGUI)', which wouldn't work.
GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
- CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
- CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
- CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
+ CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
+ CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
+ CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
CONFIG_OBS="${CONFIG_OBS} gdbres.o"
fi
- AC_CONFIG_SUBDIRS(gdbtk)
+ AC_CONFIG_SUBDIRS(gdbtk)
fi
fi
pos->type = BT_SEEK_BEGIN;
bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
scope = bt_ctf_get_top_level_scope (event,
- BT_STREAM_EVENT_HEADER);
- bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
+ BT_STREAM_EVENT_HEADER);
+ bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
])
CFLAGS=$saved_CFLAGS
* ) GDB_NM_FILE="${nativefile}"
esac
AC_CONFIG_LINKS([nm.h:$GDB_NM_FILE], [echo > stamp-nmh],
- [GDB_NM_FILE=$GDB_NM_FILE])
+ [GDB_NM_FILE=$GDB_NM_FILE])
AC_DEFINE_UNQUOTED(GDB_NM_FILE, "${GDB_NM_FILE}", [nativefile])
NM_H=nm.h
fi
dnl Detect the character set used by this host.
dnl At the moment, we just assume it's UTF-8.
AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "UTF-8",
- [Define to be a string naming the default host character set.])
+ [Define to be a string naming the default host character set.])
GDB_AC_SELFTEST([
CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
AC_DEFUN([AM_GDB_UBSAN],[
AC_ARG_ENABLE(ubsan,
AS_HELP_STRING([--enable-ubsan],
- [enable undefined behavior sanitizer (auto/yes/no)]),
+ [enable undefined behavior sanitizer (auto/yes/no)]),
[],enable_ubsan=no)
if test "x$enable_ubsan" = xauto; then
if $development; then
case $host_os in
aix*)
if test $host_cpu != ia64; then
- RPATH_ENVVAR=LIBPATH
+ RPATH_ENVVAR=LIBPATH
fi ;;
darwin* | rhapsody*)
RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
case $host_os in
aix*)
if test $host_cpu != ia64; then
- RPATH_ENVVAR=LIBPATH
+ RPATH_ENVVAR=LIBPATH
fi ;;
darwin* | rhapsody*)
RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
AC_CACHE_VAL(
[gdbserver_cv_have_thread_db_type_$1],
[AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([#include <thread_db.h>], [$1 avar])],
+ [AC_LANG_PROGRAM([#include <thread_db.h>], [$1 avar])],
[gdbserver_cv_have_thread_db_type_$1=yes],
[gdbserver_cv_have_thread_db_type_$1=no]
)]
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
- const auto identity = [](int y){ return y; };
- for (auto i = 0; i < a; ++i)
- a += b--;
- return x + identity(a + b);
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
- return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
test()
{
const auto lambda = [](auto&&... args){
- const auto istiny = [](auto x){
- return (sizeof(x) == 1UL) ? 1 : 0;
- };
- const int aretiny[] = { istiny(args)... };
- return aretiny[0];
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
{
auto length = 0UL;
for (auto p = s; *p; ++p)
- ++length;
+ ++length;
return length;
}
switch (f1())
{
case 17:
- f1();
- [[fallthrough]];
+ f1();
+ [[fallthrough]];
case 42:
- f1();
+ f1();
}
return f1();
}
struct base2
{
base2() {
- b3 = 42;
+ b3 = 42;
}
int b3;
};
struct derived : base1, base2
{
- int d;
+ int d;
};
derived d1 {{1, 2}, {}, 4}; // full initialization
int& operator* ()
{
- return i;
+ return i;
}
const int& operator* () const
{
- return i;
+ return i;
}
iter& operator++()
{
- ++i;
- return *this;
+ ++i;
+ return *this;
}
};
{
iter begin() const
{
- return {0};
+ return {0};
}
sentinel end() const
{
- return {5};
+ return {5};
}
};
for (auto i : r)
{
- [[maybe_unused]] auto v = i;
+ [[maybe_unused]] auto v = i;
}
}
int i;
int foo()
{
- return [*this]()
- {
- return i;
- }();
+ return [*this]()
+ {
+ return i;
+ }();
}
};
{
if constexpr(cond)
{
- return 13;
+ return 13;
}
else
{
- return 42;
+ return 42;
}
}
{
if (auto i = f(); i > 0)
{
- return 3;
+ return 3;
}
switch (auto i = f(); i + 4)
{
case 17:
- return 2;
+ return 2;
default:
- return 1;
+ return 1;
}
}
struct pair
{
pair (T1 p1, T2 p2)
- : m1 {p1},
- m2 {p2}
+ : m1 {p1},
+ m2 {p2}
{}
T1 m1;
$as_echo_n "(cached) " >&6
else
ac_save_CXX="$CXX"
- CXX="$CXX $switch"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ CXX="$CXX $switch"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
- const auto identity = [](int y){ return y; };
- for (auto i = 0; i < a; ++i)
- a += b--;
- return x + identity(a + b);
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
- return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
test()
{
const auto lambda = [](auto&&... args){
- const auto istiny = [](auto x){
- return (sizeof(x) == 1UL) ? 1 : 0;
- };
- const int aretiny[] = { istiny(args)... };
- return aretiny[0];
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
{
auto length = 0UL;
for (auto p = s; *p; ++p)
- ++length;
+ ++length;
return length;
}
switch (f1())
{
case 17:
- f1();
- [[fallthrough]];
+ f1();
+ [[fallthrough]];
case 42:
- f1();
+ f1();
}
return f1();
}
struct base2
{
base2() {
- b3 = 42;
+ b3 = 42;
}
int b3;
};
struct derived : base1, base2
{
- int d;
+ int d;
};
derived d1 {{1, 2}, {}, 4}; // full initialization
int& operator* ()
{
- return i;
+ return i;
}
const int& operator* () const
{
- return i;
+ return i;
}
iter& operator++()
{
- ++i;
- return *this;
+ ++i;
+ return *this;
}
};
{
iter begin() const
{
- return {0};
+ return {0};
}
sentinel end() const
{
- return {5};
+ return {5};
}
};
for (auto i : r)
{
- [[maybe_unused]] auto v = i;
+ [[maybe_unused]] auto v = i;
}
}
int i;
int foo()
{
- return [*this]()
- {
- return i;
- }();
+ return [*this]()
+ {
+ return i;
+ }();
}
};
{
if constexpr(cond)
{
- return 13;
+ return 13;
}
else
{
- return 42;
+ return 42;
}
}
{
if (auto i = f(); i > 0)
{
- return 3;
+ return 3;
}
switch (auto i = f(); i + 4)
{
case 17:
- return 2;
+ return 2;
default:
- return 1;
+ return 1;
}
}
struct pair
{
pair (T1 p1, T2 p2)
- : m1 {p1},
- m2 {p2}
+ : m1 {p1},
+ m2 {p2}
{}
T1 m1;
eval $cachevar=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CXX="$ac_save_CXX"
+ CXX="$ac_save_CXX"
fi
eval ac_res=\$$cachevar
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test x\$$cachevar = xyes; then
- CXX_DIALECT="$switch"
- CXX="$CXX $switch"
- if test -n "$CXXCPP" ; then
- CXXCPP="$CXXCPP $switch"
- fi
- ac_success=yes
- break
+ CXX_DIALECT="$switch"
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
fi
done
fi
if test x$ac_success = xno; then
for alternative in ${ax_cxx_compile_alternatives}; do
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do
- if test x"$switch" = xMSVC; then
- switch=-std:c++${alternative}
- cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_${switch}_MSVC" | $as_tr_sh`
- else
- cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
+ if test x"$switch" = xMSVC; then
+ switch=-std:c++${alternative}
+ cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_${switch}_MSVC" | $as_tr_sh`
+ else
+ cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
$as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; }
if eval \${$cachevar+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_CXX="$CXX"
- CXX="$CXX $switch"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ CXX="$CXX $switch"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
- const auto identity = [](int y){ return y; };
- for (auto i = 0; i < a; ++i)
- a += b--;
- return x + identity(a + b);
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
- return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
test()
{
const auto lambda = [](auto&&... args){
- const auto istiny = [](auto x){
- return (sizeof(x) == 1UL) ? 1 : 0;
- };
- const int aretiny[] = { istiny(args)... };
- return aretiny[0];
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
{
auto length = 0UL;
for (auto p = s; *p; ++p)
- ++length;
+ ++length;
return length;
}
switch (f1())
{
case 17:
- f1();
- [[fallthrough]];
+ f1();
+ [[fallthrough]];
case 42:
- f1();
+ f1();
}
return f1();
}
struct base2
{
base2() {
- b3 = 42;
+ b3 = 42;
}
int b3;
};
struct derived : base1, base2
{
- int d;
+ int d;
};
derived d1 {{1, 2}, {}, 4}; // full initialization
int& operator* ()
{
- return i;
+ return i;
}
const int& operator* () const
{
- return i;
+ return i;
}
iter& operator++()
{
- ++i;
- return *this;
+ ++i;
+ return *this;
}
};
{
iter begin() const
{
- return {0};
+ return {0};
}
sentinel end() const
{
- return {5};
+ return {5};
}
};
for (auto i : r)
{
- [[maybe_unused]] auto v = i;
+ [[maybe_unused]] auto v = i;
}
}
int i;
int foo()
{
- return [*this]()
- {
- return i;
- }();
+ return [*this]()
+ {
+ return i;
+ }();
}
};
{
if constexpr(cond)
{
- return 13;
+ return 13;
}
else
{
- return 42;
+ return 42;
}
}
{
if (auto i = f(); i > 0)
{
- return 3;
+ return 3;
}
switch (auto i = f(); i + 4)
{
case 17:
- return 2;
+ return 2;
default:
- return 1;
+ return 1;
}
}
struct pair
{
pair (T1 p1, T2 p2)
- : m1 {p1},
- m2 {p2}
+ : m1 {p1},
+ m2 {p2}
{}
T1 m1;
eval $cachevar=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CXX="$ac_save_CXX"
+ CXX="$ac_save_CXX"
fi
eval ac_res=\$$cachevar
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- if eval test x\$$cachevar = xyes; then
- CXX_DIALECT="$switch"
- CXX="$CXX $switch"
- if test -n "$CXXCPP" ; then
- CXXCPP="$CXXCPP $switch"
- fi
- ac_success=yes
- break
- fi
+ if eval test x\$$cachevar = xyes; then
+ CXX_DIALECT="$switch"
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
+ fi
done
if test x$ac_success = xyes; then
- break
+ break
fi
done
fi
main ()
{
sigjmp_buf env;
- while (! sigsetjmp (env, 1))
- siglongjmp (env, 1);
+ while (! sigsetjmp (env, 1))
+ siglongjmp (env, 1);
;
return 0;
main ()
{
- #if !defined __GNUC__ || defined __clang__
- #error not gcc
- #endif
+ #if !defined __GNUC__ || defined __clang__
+ #error not gcc
+ #endif
;
return 0;
main ()
{
- #ifndef __clang__
- #error not clang
- #endif
+ #ifndef __clang__
+ #error not clang
+ #endif
;
return 0;
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
+ build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
+ build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
case $w in
-Wno-*)
wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
- -Wformat-nonliteral)
+ -Wformat-nonliteral)
# gcc requires -Wformat before -Wformat-nonliteral
# will work, so stick them together.
w="-Wformat $w"
$as_echo_n "(cached) " >&6
else
save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $CFLAGS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ CPPFLAGS="$CPPFLAGS $CFLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if __x86_64__
fi
rm -f conftest*
- CPPFLAGS="$save_CPPFLAGS"
+ CPPFLAGS="$save_CPPFLAGS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5
$as_echo "$gdb_cv_i386_is_x86_64" >&6; }
$as_echo_n "(cached) " >&6
else
save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $CFLAGS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ CPPFLAGS="$CPPFLAGS $CFLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __mcoldfire__
fi
rm -f conftest*
- CPPFLAGS="$save_CPPFLAGS"
+ CPPFLAGS="$save_CPPFLAGS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5
$as_echo "$gdb_cv_m68k_is_coldfire" >&6; }
i[34567]86-*-linux*)
changequote([,])dnl
AC_CACHE_CHECK([if building for x86-64], [gdb_cv_i386_is_x86_64],
- [save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $CFLAGS"
- AC_EGREP_CPP([got it], [
+ [save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $CFLAGS"
+ AC_EGREP_CPP([got it], [
#if __x86_64__
got it
#endif
- ], [gdb_cv_i386_is_x86_64=yes],
- [gdb_cv_i386_is_x86_64=no])
- CPPFLAGS="$save_CPPFLAGS"])
+ ], [gdb_cv_i386_is_x86_64=yes],
+ [gdb_cv_i386_is_x86_64=no])
+ CPPFLAGS="$save_CPPFLAGS"])
;;
x86_64-*-linux*)
m68k-*-*)
AC_CACHE_CHECK([if building for Coldfire], [gdb_cv_m68k_is_coldfire],
- [save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $CFLAGS"
- AC_EGREP_CPP([got it], [
+ [save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $CFLAGS"
+ AC_EGREP_CPP([got it], [
#ifdef __mcoldfire__
got it
#endif
- ], [gdb_cv_m68k_is_coldfire=yes],
- [gdb_cv_m68k_is_coldfire=no])
- CPPFLAGS="$save_CPPFLAGS"])
+ ], [gdb_cv_m68k_is_coldfire=yes],
+ [gdb_cv_m68k_is_coldfire=no])
+ CPPFLAGS="$save_CPPFLAGS"])
;;
esac
saved_cflags="$CFLAGS"
CFLAGS="$CFLAGS -fvisibility=hidden"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
- [gdbsrv_cv_have_visibility_hidden=yes],
- [gdbsrv_cv_have_visibility_hidden=no])
+ [gdbsrv_cv_have_visibility_hidden=yes],
+ [gdbsrv_cv_have_visibility_hidden=no])
CFLAGS="$saved_cflags"
IPA_DEPFILES=""
dnl Copyright (C) 1995-2025 Free Software Foundation, Inc.
dnl
dnl This file is part of GDB.
-dnl
+dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 3 of the License, or
[gdb_cv_func_sigsetjmp],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
- [#include <setjmp.h>],
- [sigjmp_buf env;
- while (! sigsetjmp (env, 1))
- siglongjmp (env, 1);]
- )],
+ [#include <setjmp.h>],
+ [sigjmp_buf env;
+ while (! sigsetjmp (env, 1))
+ siglongjmp (env, 1);]
+ )],
[gdb_cv_func_sigsetjmp=yes],
[gdb_cv_func_sigsetjmp=no]
)]
AC_DEFUN([AM_GDB_COMPILER_TYPE],[
AC_CACHE_CHECK([the compiler type],
- [gdb_cv_compiler_type],
+ [gdb_cv_compiler_type],
[gdb_cv_compiler_type=unknown
if test "$gdb_cv_compiler_type" = unknown; then
AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([],
- [
- #if !defined __GNUC__ || defined __clang__
- #error not gcc
- #endif
- ])],
- [gdb_cv_compiler_type=gcc], [])
+ [AC_LANG_PROGRAM([],
+ [
+ #if !defined __GNUC__ || defined __clang__
+ #error not gcc
+ #endif
+ ])],
+ [gdb_cv_compiler_type=gcc], [])
fi
if test "$gdb_cv_compiler_type" = unknown; then
AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([],
- [
- #ifndef __clang__
- #error not clang
- #endif
- ])],
- [gdb_cv_compiler_type=clang], [])
+ [AC_LANG_PROGRAM([],
+ [
+ #ifndef __clang__
+ #error not clang
+ #endif
+ ])],
+ [gdb_cv_compiler_type=clang], [])
fi
])
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
- const auto identity = [](int y){ return y; };
- for (auto i = 0; i < a; ++i)
- a += b--;
- return x + identity(a + b);
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
- return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
test()
{
const auto lambda = [](auto&&... args){
- const auto istiny = [](auto x){
- return (sizeof(x) == 1UL) ? 1 : 0;
- };
- const int aretiny[] = { istiny(args)... };
- return aretiny[0];
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
{
auto length = 0UL;
for (auto p = s; *p; ++p)
- ++length;
+ ++length;
return length;
}
switch (f1())
{
case 17:
- f1();
- [[fallthrough]];
+ f1();
+ [[fallthrough]];
case 42:
- f1();
+ f1();
}
return f1();
}
struct base2
{
base2() {
- b3 = 42;
+ b3 = 42;
}
int b3;
};
struct derived : base1, base2
{
- int d;
+ int d;
};
derived d1 {{1, 2}, {}, 4}; // full initialization
int& operator* ()
{
- return i;
+ return i;
}
const int& operator* () const
{
- return i;
+ return i;
}
iter& operator++()
{
- ++i;
- return *this;
+ ++i;
+ return *this;
}
};
{
iter begin() const
{
- return {0};
+ return {0};
}
sentinel end() const
{
- return {5};
+ return {5};
}
};
for (auto i : r)
{
- [[maybe_unused]] auto v = i;
+ [[maybe_unused]] auto v = i;
}
}
int i;
int foo()
{
- return [*this]()
- {
- return i;
- }();
+ return [*this]()
+ {
+ return i;
+ }();
}
};
{
if constexpr(cond)
{
- return 13;
+ return 13;
}
else
{
- return 42;
+ return 42;
}
}
{
if (auto i = f(); i > 0)
{
- return 3;
+ return 3;
}
switch (auto i = f(); i + 4)
{
case 17:
- return 2;
+ return 2;
default:
- return 1;
+ return 1;
}
}
struct pair
{
pair (T1 p1, T2 p2)
- : m1 {p1},
- m2 {p2}
+ : m1 {p1},
+ m2 {p2}
{}
T1 m1;
$as_echo_n "(cached) " >&6
else
ac_save_CXX="$CXX"
- CXX="$CXX $switch"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ CXX="$CXX $switch"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
- const auto identity = [](int y){ return y; };
- for (auto i = 0; i < a; ++i)
- a += b--;
- return x + identity(a + b);
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
- return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
test()
{
const auto lambda = [](auto&&... args){
- const auto istiny = [](auto x){
- return (sizeof(x) == 1UL) ? 1 : 0;
- };
- const int aretiny[] = { istiny(args)... };
- return aretiny[0];
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
{
auto length = 0UL;
for (auto p = s; *p; ++p)
- ++length;
+ ++length;
return length;
}
switch (f1())
{
case 17:
- f1();
- [[fallthrough]];
+ f1();
+ [[fallthrough]];
case 42:
- f1();
+ f1();
}
return f1();
}
struct base2
{
base2() {
- b3 = 42;
+ b3 = 42;
}
int b3;
};
struct derived : base1, base2
{
- int d;
+ int d;
};
derived d1 {{1, 2}, {}, 4}; // full initialization
int& operator* ()
{
- return i;
+ return i;
}
const int& operator* () const
{
- return i;
+ return i;
}
iter& operator++()
{
- ++i;
- return *this;
+ ++i;
+ return *this;
}
};
{
iter begin() const
{
- return {0};
+ return {0};
}
sentinel end() const
{
- return {5};
+ return {5};
}
};
for (auto i : r)
{
- [[maybe_unused]] auto v = i;
+ [[maybe_unused]] auto v = i;
}
}
int i;
int foo()
{
- return [*this]()
- {
- return i;
- }();
+ return [*this]()
+ {
+ return i;
+ }();
}
};
{
if constexpr(cond)
{
- return 13;
+ return 13;
}
else
{
- return 42;
+ return 42;
}
}
{
if (auto i = f(); i > 0)
{
- return 3;
+ return 3;
}
switch (auto i = f(); i + 4)
{
case 17:
- return 2;
+ return 2;
default:
- return 1;
+ return 1;
}
}
struct pair
{
pair (T1 p1, T2 p2)
- : m1 {p1},
- m2 {p2}
+ : m1 {p1},
+ m2 {p2}
{}
T1 m1;
eval $cachevar=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CXX="$ac_save_CXX"
+ CXX="$ac_save_CXX"
fi
eval ac_res=\$$cachevar
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test x\$$cachevar = xyes; then
- CXX_DIALECT="$switch"
- CXX="$CXX $switch"
- if test -n "$CXXCPP" ; then
- CXXCPP="$CXXCPP $switch"
- fi
- ac_success=yes
- break
+ CXX_DIALECT="$switch"
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
fi
done
fi
if test x$ac_success = xno; then
for alternative in ${ax_cxx_compile_alternatives}; do
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do
- if test x"$switch" = xMSVC; then
- switch=-std:c++${alternative}
- cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_${switch}_MSVC" | $as_tr_sh`
- else
- cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
+ if test x"$switch" = xMSVC; then
+ switch=-std:c++${alternative}
+ cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_${switch}_MSVC" | $as_tr_sh`
+ else
+ cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
$as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; }
if eval \${$cachevar+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_CXX="$CXX"
- CXX="$CXX $switch"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ CXX="$CXX $switch"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
- const auto identity = [](int y){ return y; };
- for (auto i = 0; i < a; ++i)
- a += b--;
- return x + identity(a + b);
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
- return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
test()
{
const auto lambda = [](auto&&... args){
- const auto istiny = [](auto x){
- return (sizeof(x) == 1UL) ? 1 : 0;
- };
- const int aretiny[] = { istiny(args)... };
- return aretiny[0];
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
{
auto length = 0UL;
for (auto p = s; *p; ++p)
- ++length;
+ ++length;
return length;
}
switch (f1())
{
case 17:
- f1();
- [[fallthrough]];
+ f1();
+ [[fallthrough]];
case 42:
- f1();
+ f1();
}
return f1();
}
struct base2
{
base2() {
- b3 = 42;
+ b3 = 42;
}
int b3;
};
struct derived : base1, base2
{
- int d;
+ int d;
};
derived d1 {{1, 2}, {}, 4}; // full initialization
int& operator* ()
{
- return i;
+ return i;
}
const int& operator* () const
{
- return i;
+ return i;
}
iter& operator++()
{
- ++i;
- return *this;
+ ++i;
+ return *this;
}
};
{
iter begin() const
{
- return {0};
+ return {0};
}
sentinel end() const
{
- return {5};
+ return {5};
}
};
for (auto i : r)
{
- [[maybe_unused]] auto v = i;
+ [[maybe_unused]] auto v = i;
}
}
int i;
int foo()
{
- return [*this]()
- {
- return i;
- }();
+ return [*this]()
+ {
+ return i;
+ }();
}
};
{
if constexpr(cond)
{
- return 13;
+ return 13;
}
else
{
- return 42;
+ return 42;
}
}
{
if (auto i = f(); i > 0)
{
- return 3;
+ return 3;
}
switch (auto i = f(); i + 4)
{
case 17:
- return 2;
+ return 2;
default:
- return 1;
+ return 1;
}
}
struct pair
{
pair (T1 p1, T2 p2)
- : m1 {p1},
- m2 {p2}
+ : m1 {p1},
+ m2 {p2}
{}
T1 m1;
eval $cachevar=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CXX="$ac_save_CXX"
+ CXX="$ac_save_CXX"
fi
eval ac_res=\$$cachevar
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- if eval test x\$$cachevar = xyes; then
- CXX_DIALECT="$switch"
- CXX="$CXX $switch"
- if test -n "$CXXCPP" ; then
- CXXCPP="$CXXCPP $switch"
- fi
- ac_success=yes
- break
- fi
+ if eval test x\$$cachevar = xyes; then
+ CXX_DIALECT="$switch"
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
+ fi
done
if test x$ac_success = xyes; then
- break
+ break
fi
done
fi
main ()
{
sigjmp_buf env;
- while (! sigsetjmp (env, 1))
- siglongjmp (env, 1);
+ while (! sigsetjmp (env, 1))
+ siglongjmp (env, 1);
;
return 0;
main ()
{
- #if !defined __GNUC__ || defined __clang__
- #error not gcc
- #endif
+ #if !defined __GNUC__ || defined __clang__
+ #error not gcc
+ #endif
;
return 0;
main ()
{
- #ifndef __clang__
- #error not clang
- #endif
+ #ifndef __clang__
+ #error not clang
+ #endif
;
return 0;
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
+ build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
+ build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
case $w in
-Wno-*)
wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
- -Wformat-nonliteral)
+ -Wformat-nonliteral)
# gcc requires -Wformat before -Wformat-nonliteral
# will work, so stick them together.
w="-Wformat $w"
case ${host} in
*mingw32*)
AC_DEFINE(USE_WIN32API, 1,
- [Define if we should use the Windows API, instead of the
+ [Define if we should use the Windows API, instead of the
POSIX API. On Windows, we use the Windows API when
building for MinGW, but the POSIX API when building
for Cygwin.])
if $enable_unittests; then
AC_DEFINE(GDB_SELF_TEST, 1,
- [Define if self-testing features should be enabled])
+ [Define if self-testing features should be enabled])
$1
fi
])
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
+ build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
+ build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
case $w in
-Wno-*)
wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
- -Wformat-nonliteral)
+ -Wformat-nonliteral)
# gcc requires -Wformat before -Wformat-nonliteral
# will work, so stick them together.
w="-Wformat $w"