* configure.ac: Modernize checks for long long' and long double'

support.
* configure: Regenerated.
* acconfig.h (CC_HAS_LONG_LONG, PRINTF_HAS_LONG_LONG)
(PRINT_HAS_LONG_DOUBLE,	SCANF_HAS_LONG_DOUBLE): Remove undefs.
* config.in: Regenerated.
This commit is contained in:
Mark Kettenis 2005-01-20 23:57:27 +00:00
parent 210c61aa9b
commit bc8bcb4b1d
5 changed files with 689 additions and 596 deletions

View File

@ -1,8 +1,18 @@
2005-01-21 Mark Kettenis <kettenis@gnu.org>
* configure.ac: Modernize checks for `long long' and `long double'
support.
* configure: Regenerated.
* acconfig.h (CC_HAS_LONG_LONG, PRINTF_HAS_LONG_LONG)
(PRINT_HAS_LONG_DOUBLE, SCANF_HAS_LONG_DOUBLE): Remove undefs.
* config.in: Regenerated.
2005-01-20 Mark Kettenis <kettenis@gnu.org>
* acconfig.h (HAVE_STRUCT_SAVE_STATE_T)
(HAVE_STRUCT_MEMBER_SS_WIDE): Remove undefs.
* configure.ac: Remove checks for HP-UX save_state structure.
* configure: Regenerated.
2005-01-19 Andrew Cagney <cagney@gnu.org>

View File

@ -83,18 +83,6 @@
/* Define if ioctl argument PIOCSET is available. */
#undef HAVE_PROCFS_PIOCSET
/* Define if the `long long' type works. */
#undef CC_HAS_LONG_LONG
/* Define if the "ll" format works to print long long ints. */
#undef PRINTF_HAS_LONG_LONG
/* Define if the "%Lg" format works to print long doubles. */
#undef PRINTF_HAS_LONG_DOUBLE
/* Define if the "%Lg" format works to scan long doubles. */
#undef SCANF_HAS_LONG_DOUBLE
/* Define if using Solaris thread debugging. */
#undef HAVE_THREAD_DB_LIB

File diff suppressed because it is too large Load Diff

94
gdb/configure vendored
View File

@ -18859,6 +18859,7 @@ _ACEOF
fi
fi
# Check if the compiler supports the `long long' type.
echo "$as_me:$LINENO: checking for long long support in compiler" >&5
echo $ECHO_N "checking for long long support in compiler... $ECHO_C" >&6
@ -18871,14 +18872,11 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
extern long long foo;
int
main ()
{
extern long long foo;
switch (foo & 2) { case 0: return 1; }
switch (foo & 2) { case 0: return 1; }
;
return 0;
}
@ -18914,16 +18912,17 @@ gdb_cv_c_long_long=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $gdb_cv_c_long_long" >&5
echo "${ECHO_T}$gdb_cv_c_long_long" >&6
if test $gdb_cv_c_long_long = yes; then
cat >>confdefs.h <<\_ACEOF
cat >>confdefs.h <<\_ACEOF
#define CC_HAS_LONG_LONG 1
_ACEOF
fi
# Check if the compiler and runtime support printing long longs.
echo "$as_me:$LINENO: checking for long long support in printf" >&5
echo $ECHO_N "checking for long long support in printf... $ECHO_C" >&6
@ -18939,9 +18938,11 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int main () {
char buf[32];
$ac_includes_default
int
main ()
{
char buf[32];
long long l = 0;
l = (l << 16) + 0x0123;
l = (l << 16) + 0x4567;
@ -18949,6 +18950,8 @@ int main () {
l = (l << 16) + 0xcdef;
sprintf (buf, "0x%016llx", l);
return (strcmp ("0x0123456789abcdef", buf));
;
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
@ -18974,20 +18977,24 @@ fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_long" >&5
echo "${ECHO_T}$gdb_cv_printf_has_long_long" >&6
if test $gdb_cv_printf_has_long_long = yes; then
cat >>confdefs.h <<\_ACEOF
cat >>confdefs.h <<\_ACEOF
#define PRINTF_HAS_LONG_LONG 1
_ACEOF
fi
echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_long" >&5
echo "${ECHO_T}$gdb_cv_printf_has_long_long" >&6
# Check if the compiler supports the `long double' type. We can't use
# AC_C_LONG_DOUBLE because that one does additional checks on the
# constants defined in <float.h> that fail on some systems,
# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
echo "$as_me:$LINENO: checking for long double support in compiler" >&5
echo $ECHO_N "checking for long double support in compiler... $ECHO_C" >&6
if test "${ac_cv_c_long_double+set}" = set; then
if test "${gdb_cv_c_long_double+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@ -18996,14 +19003,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
long double foo;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@ -19027,25 +19027,26 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_long_double=yes
gdb_cv_c_long_double=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_c_long_double=no
gdb_cv_c_long_double=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $gdb_cv_c_long_double" >&5
echo "${ECHO_T}$gdb_cv_c_long_double" >&6
if test $gdb_cv_c_long_double = yes; then
echo "$as_me:$LINENO: result: $ac_cv_c_long_double" >&5
echo "${ECHO_T}$ac_cv_c_long_double" >&6
if test $ac_cv_c_long_double = yes; then
cat >>confdefs.h <<\_ACEOF
cat >>confdefs.h <<\_ACEOF
#define HAVE_LONG_DOUBLE 1
_ACEOF
fi
# Check if the compiler and runtime support printing long doubles.
echo "$as_me:$LINENO: checking for long double support in printf" >&5
echo $ECHO_N "checking for long double support in printf... $ECHO_C" >&6
@ -19061,12 +19062,16 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int main () {
char buf[16];
$ac_includes_default
int
main ()
{
char buf[16];
long double f = 3.141592653;
sprintf (buf, "%Lg", f);
return (strncmp ("3.14159", buf, 7));
;
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
@ -19092,16 +19097,17 @@ fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_double" >&5
echo "${ECHO_T}$gdb_cv_printf_has_long_double" >&6
if test $gdb_cv_printf_has_long_double = yes; then
cat >>confdefs.h <<\_ACEOF
cat >>confdefs.h <<\_ACEOF
#define PRINTF_HAS_LONG_DOUBLE 1
_ACEOF
fi
echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_double" >&5
echo "${ECHO_T}$gdb_cv_printf_has_long_double" >&6
# Check if the compiler and runtime support scanning long doubles.
echo "$as_me:$LINENO: checking for long double support in scanf" >&5
echo $ECHO_N "checking for long double support in scanf... $ECHO_C" >&6
@ -19117,12 +19123,16 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int main () {
char *buf = "3.141592653";
#include <stdio.h>
int
main ()
{
char *buf = "3.141592653";
long double f = 0;
sscanf (buf, "%Lg", &f);
return !(f > 3.14159 && f < 3.14160);
;
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
@ -19148,15 +19158,15 @@ fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $gdb_cv_scanf_has_long_double" >&5
echo "${ECHO_T}$gdb_cv_scanf_has_long_double" >&6
if test $gdb_cv_scanf_has_long_double = yes; then
cat >>confdefs.h <<\_ACEOF
cat >>confdefs.h <<\_ACEOF
#define SCANF_HAS_LONG_DOUBLE 1
_ACEOF
fi
echo "$as_me:$LINENO: result: $gdb_cv_scanf_has_long_double" >&5
echo "${ECHO_T}$gdb_cv_scanf_has_long_double" >&6
case ${host_os} in
aix*)

View File

@ -862,93 +862,88 @@ if test ${host} = ${target} ; then
fi
fi
dnl See if compiler supports "long long" type.
# Check if the compiler supports the `long long' type.
AC_MSG_CHECKING(for long long support in compiler)
AC_CACHE_VAL(gdb_cv_c_long_long,
[AC_TRY_COMPILE(, [
extern long long foo;
switch (foo & 2) { case 0: return 1; }
],
gdb_cv_c_long_long=yes, gdb_cv_c_long_long=no)])
AC_MSG_RESULT($gdb_cv_c_long_long)
AC_CACHE_CHECK([for long long support in compiler], gdb_cv_c_long_long,
[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)])
if test $gdb_cv_c_long_long = yes; then
AC_DEFINE(CC_HAS_LONG_LONG)
AC_DEFINE(CC_HAS_LONG_LONG, 1,
[Define to 1 if the compiler supports long long.])
fi
dnl See if the compiler and runtime support printing long long
# Check if the compiler and runtime support printing long longs.
AC_MSG_CHECKING(for long long support in printf)
AC_CACHE_VAL(gdb_cv_printf_has_long_long,
[AC_TRY_RUN([
int main () {
char buf[32];
AC_CACHE_CHECK([for long long support in printf],
gdb_cv_printf_has_long_long,
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[[char buf[32];
long long l = 0;
l = (l << 16) + 0x0123;
l = (l << 16) + 0x4567;
l = (l << 16) + 0x89ab;
l = (l << 16) + 0xcdef;
sprintf (buf, "0x%016llx", l);
return (strcmp ("0x0123456789abcdef", buf));
}],
gdb_cv_printf_has_long_long=yes,
gdb_cv_printf_has_long_long=no,
gdb_cv_printf_has_long_long=no)])
return (strcmp ("0x0123456789abcdef", buf));]])],
gdb_cv_printf_has_long_long=yes,
gdb_cv_printf_has_long_long=no,
gdb_cv_printf_has_long_long=no)])
if test $gdb_cv_printf_has_long_long = yes; then
AC_DEFINE(PRINTF_HAS_LONG_LONG)
fi
AC_MSG_RESULT($gdb_cv_printf_has_long_long)
dnl See if compiler supports "long double" type. Can't use AC_C_LONG_DOUBLE
dnl because autoconf complains about cross-compilation issues. However, this
dnl code uses the same variables as the macro for compatibility.
AC_MSG_CHECKING(for long double support in compiler)
AC_CACHE_VAL(ac_cv_c_long_double,
[AC_TRY_COMPILE(, [long double foo;],
ac_cv_c_long_double=yes, ac_cv_c_long_double=no)])
AC_MSG_RESULT($ac_cv_c_long_double)
if test $ac_cv_c_long_double = yes; then
AC_DEFINE(HAVE_LONG_DOUBLE)
AC_DEFINE(PRINTF_HAS_LONG_LONG, 1,
[Define to 1 if the "%ll" format works to print long longs.])
fi
dnl See if the compiler and runtime support printing long doubles
# Check if the compiler supports the `long double' type. We can't use
# AC_C_LONG_DOUBLE because that one does additional checks on the
# constants defined in <float.h> that fail on some systems,
# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
AC_MSG_CHECKING(for long double support in printf)
AC_CACHE_VAL(gdb_cv_printf_has_long_double,
[AC_TRY_RUN([
int main () {
char buf[16];
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)])
if test $gdb_cv_c_long_double = yes; then
AC_DEFINE(HAVE_LONG_DOUBLE, 1,
[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],
[[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)])
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)])
if test $gdb_cv_printf_has_long_double = yes; then
AC_DEFINE(PRINTF_HAS_LONG_DOUBLE)
AC_DEFINE(PRINTF_HAS_LONG_DOUBLE, 1,
[Define to 1 if the "%Lg" format works to print long doubles.])
fi
AC_MSG_RESULT($gdb_cv_printf_has_long_double)
dnl See if the compiler and runtime support scanning long doubles
# Check if the compiler and runtime support scanning long doubles.
AC_MSG_CHECKING(for long double support in scanf)
AC_CACHE_VAL(gdb_cv_scanf_has_long_double,
[AC_TRY_RUN([
int main () {
char *buf = "3.141592653";
AC_CACHE_CHECK([for long double support in scanf],
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)])
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)])
if test $gdb_cv_scanf_has_long_double = yes; then
AC_DEFINE(SCANF_HAS_LONG_DOUBLE)
AC_DEFINE(SCANF_HAS_LONG_DOUBLE, 1,
[Define to 1 if the "%Lg" format works to scan long doubles.])
fi
AC_MSG_RESULT($gdb_cv_scanf_has_long_double)
case ${host_os} in
aix*)