]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: ppc: move termios probes to top-level
authorMike Frysinger <vapier@gentoo.org>
Tue, 2 Jan 2024 04:57:12 +0000 (23:57 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 2 Jan 2024 05:34:15 +0000 (00:34 -0500)
This is the last compile-time logic in the ppc subdir.

sim/config.h.in
sim/configure
sim/m4/sim_ac_platform.m4
sim/ppc/config.in
sim/ppc/configure
sim/ppc/configure.ac

index 78fa632f25bfe848406dfa3052aea45a03ea3546..4e2724603e7ca5a8d5b087ad391166b388315991 100644 (file)
 /* Define to 1 if you have the `tcsetpgrp' function. */
 #undef HAVE_TCSETPGRP
 
+/* Define if struct termios has c_line. */
+#undef HAVE_TERMIOS_CLINE
+
 /* Define to 1 if you have the <termios.h> header file. */
 #undef HAVE_TERMIOS_H
 
+/* Define if struct termios exists. */
+#undef HAVE_TERMIOS_STRUCTURE
+
+/* Define if struct termio has c_line. */
+#undef HAVE_TERMIO_CLINE
+
+/* Define if struct termio exists. */
+#undef HAVE_TERMIO_STRUCTURE
+
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
index b68c6195b28d6078d27aad5c562b5e36a89c2ebf..fcf6e81ba3afe84cd4ce19ad9b323f8ba26322a0 100755 (executable)
@@ -8810,6 +8810,140 @@ $as_echo "#define HAVE_SYSV_SHM 1" >>confdefs.h
 
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct termios" >&5
+$as_echo_n "checking for struct termios... " >&6; }
+if ${sim_cv_termios_struct+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <sys/termios.h>
+int
+main ()
+{
+
+  static struct termios x;
+  x.c_iflag = 0;
+  x.c_oflag = 0;
+  x.c_cflag = 0;
+  x.c_lflag = 0;
+  x.c_cc[NCCS] = 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  sim_cv_termios_struct="yes"
+else
+  sim_cv_termios_struct="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_termios_struct" >&5
+$as_echo "$sim_cv_termios_struct" >&6; }
+if test $sim_cv_termios_struct = yes; then
+
+$as_echo "#define HAVE_TERMIOS_STRUCTURE 1" >>confdefs.h
+
+fi
+
+if test "$sim_cv_termios_struct" = "yes"; then
+  if ${sim_cv_termios_cline+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+
+  ac_fn_c_check_member "$LINENO" "struct termios" "c_line" "ac_cv_member_struct_termios_c_line" "
+#include <sys/types.h>
+#include <sys/termios.h>
+
+"
+if test "x$ac_cv_member_struct_termios_c_line" = xyes; then :
+  sim_cv_termios_cline="yes"
+else
+  sim_cv_termios_cline="no"
+fi
+
+  if test $sim_cv_termios_cline = yes; then
+
+$as_echo "#define HAVE_TERMIOS_CLINE 1" >>confdefs.h
+
+  fi
+else
+  sim_cv_termios_cline=no
+fi
+
+if test "$sim_cv_termios_struct" != "yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct termio" >&5
+$as_echo_n "checking for struct termio... " >&6; }
+if ${sim_cv_termio_struct+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <sys/termio.h>
+int
+main ()
+{
+
+  static struct termio x;
+  x.c_iflag = 0;
+  x.c_oflag = 0;
+  x.c_cflag = 0;
+  x.c_lflag = 0;
+  x.c_cc[NCC] = 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  sim_cv_termio_struct="yes"
+else
+  sim_cv_termio_struct="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_termio_struct" >&5
+$as_echo "$sim_cv_termio_struct" >&6; }
+  if test $sim_cv_termio_struct = yes; then
+
+$as_echo "#define HAVE_TERMIO_STRUCTURE 1" >>confdefs.h
+
+  fi
+else
+  sim_cv_termio_struct=no
+fi
+
+if test "$sim_cv_termio_struct" = "yes"; then
+  if ${sim_cv_termio_cline+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+
+  ac_fn_c_check_member "$LINENO" "struct termio" "c_line" "ac_cv_member_struct_termio_c_line" "
+#include <sys/types.h>
+#include <sys/termio.h>
+
+"
+if test "x$ac_cv_member_struct_termio_c_line" = xyes; then :
+  sim_cv_termio_cline="yes"
+else
+  sim_cv_termio_cline="no"
+fi
+
+  if test $sim_cv_termio_cline = yes; then
+
+$as_echo "#define HAVE_TERMIO_CLINE 1" >>confdefs.h
+
+  fi
+else
+  sim_cv_termio_cline=no
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
 $as_echo_n "checking type of array argument to getgroups... " >&6; }
 if ${ac_cv_type_getgroups+:} false; then :
@@ -12477,7 +12611,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12480 "configure"
+#line 12614 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12583,7 +12717,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12586 "configure"
+#line 12720 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 6f3e48f63dd23994224cba33bee468662308dbcc..f523f03518bbaae07d3cd3f9ef44f2268d27c1a9 100644 (file)
@@ -213,6 +213,75 @@ AS_IF([test x"$sim_cv_sysv_shm" = x"yes"], [dnl
   AC_DEFINE(HAVE_SYSV_SHM, 1, [Define if System V shared memory is supported])
 ])
 
+dnl Figure out what type of termio/termios support there is
+AC_CACHE_CHECK([for struct termios],
+  [sim_cv_termios_struct],
+  [AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/termios.h>], [
+  static struct termios x;
+  x.c_iflag = 0;
+  x.c_oflag = 0;
+  x.c_cflag = 0;
+  x.c_lflag = 0;
+  x.c_cc[NCCS] = 0;
+], [sim_cv_termios_struct="yes"], [sim_cv_termios_struct="no"])])
+if test $sim_cv_termios_struct = yes; then
+  AC_DEFINE([HAVE_TERMIOS_STRUCTURE], 1, [Define if struct termios exists.])
+fi
+
+if test "$sim_cv_termios_struct" = "yes"; then
+  AC_CACHE_VAL([sim_cv_termios_cline])
+  AC_CHECK_MEMBER(
+    [struct termios.c_line],
+    [sim_cv_termios_cline="yes"],
+    [sim_cv_termios_cline="no"], [
+#include <sys/types.h>
+#include <sys/termios.h>
+])
+  if test $sim_cv_termios_cline = yes; then
+    AC_DEFINE([HAVE_TERMIOS_CLINE], 1, [Define if struct termios has c_line.])
+  fi
+else
+  sim_cv_termios_cline=no
+fi
+
+if test "$sim_cv_termios_struct" != "yes"; then
+  AC_CACHE_CHECK([for struct termio],
+    [sim_cv_termio_struct],
+    [AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/termio.h>], [
+  static struct termio x;
+  x.c_iflag = 0;
+  x.c_oflag = 0;
+  x.c_cflag = 0;
+  x.c_lflag = 0;
+  x.c_cc[NCC] = 0;
+], [sim_cv_termio_struct="yes"], [sim_cv_termio_struct="no"])])
+  if test $sim_cv_termio_struct = yes; then
+    AC_DEFINE([HAVE_TERMIO_STRUCTURE], 1, [Define if struct termio exists.])
+  fi
+else
+  sim_cv_termio_struct=no
+fi
+
+if test "$sim_cv_termio_struct" = "yes"; then
+  AC_CACHE_VAL([sim_cv_termio_cline])
+  AC_CHECK_MEMBER(
+    [struct termio.c_line],
+    [sim_cv_termio_cline="yes"],
+    [sim_cv_termio_cline="no"], [
+#include <sys/types.h>
+#include <sys/termio.h>
+])
+  if test $sim_cv_termio_cline = yes; then
+    AC_DEFINE([HAVE_TERMIO_CLINE], 1, [Define if struct termio has c_line.])
+  fi
+else
+  sim_cv_termio_cline=no
+fi
+
 dnl Types used by common code
 AC_TYPE_GETGROUPS
 AC_TYPE_MODE_T
index 78786dfad609b140b16ea910c55488b4566f97ba..2a60b8d8ad16795410e4a6722ac445ae08d6ffb6 100644 (file)
@@ -1,17 +1,5 @@
 /* config.in.  Generated from configure.ac by autoheader.  */
 
-/* Define if struct termios has c_line. */
-#undef HAVE_TERMIOS_CLINE
-
-/* Define if struct termios exists. */
-#undef HAVE_TERMIOS_STRUCTURE
-
-/* Define if struct termio has c_line. */
-#undef HAVE_TERMIO_CLINE
-
-/* Define if struct termio exists. */
-#undef HAVE_TERMIO_STRUCTURE
-
 /* Define to the address where bug reports for this package should be sent. */
 #undef PACKAGE_BUGREPORT
 
index b64e4c4ade4fac73ec803dd293c53e15b73d07b5..46444390687b0d661bb7c5b2b2b8fa4eddf01516 100755 (executable)
@@ -1451,63 +1451,6 @@ fi
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
-
-# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
-# ----------------------------------------------------
-# Tries to find if the field MEMBER exists in type AGGR, after including
-# INCLUDES, setting cache variable VAR accordingly.
-ac_fn_c_check_member ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
-$as_echo_n "checking for $2.$3... " >&6; }
-if eval \${$4+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$5
-int
-main ()
-{
-static $2 ac_aggr;
-if (ac_aggr.$3)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$4=yes"
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$5
-int
-main ()
-{
-static $2 ac_aggr;
-if (sizeof ac_aggr.$3)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$4=yes"
-else
-  eval "$4=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$4
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_member
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -3221,141 +3164,6 @@ ac_config_headers="$ac_config_headers config.h:config.in"
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct termios" >&5
-$as_echo_n "checking for struct termios... " >&6; }
-if ${sim_cv_termios_struct+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <sys/termios.h>
-int
-main ()
-{
-
-  static struct termios x;
-  x.c_iflag = 0;
-  x.c_oflag = 0;
-  x.c_cflag = 0;
-  x.c_lflag = 0;
-  x.c_cc[NCCS] = 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  sim_cv_termios_struct="yes"
-else
-  sim_cv_termios_struct="no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_termios_struct" >&5
-$as_echo "$sim_cv_termios_struct" >&6; }
-if test $sim_cv_termios_struct = yes; then
-
-$as_echo "#define HAVE_TERMIOS_STRUCTURE 1" >>confdefs.h
-
-fi
-
-if test "$sim_cv_termios_struct" = "yes"; then
-  if ${sim_cv_termios_cline+:} false; then :
-  $as_echo_n "(cached) " >&6
-fi
-
-  ac_fn_c_check_member "$LINENO" "struct termios" "c_line" "ac_cv_member_struct_termios_c_line" "
-#include <sys/types.h>
-#include <sys/termios.h>
-
-"
-if test "x$ac_cv_member_struct_termios_c_line" = xyes; then :
-  sim_cv_termios_cline="yes"
-else
-  sim_cv_termios_cline="no"
-fi
-
-  if test $sim_cv_termios_cline = yes; then
-
-$as_echo "#define HAVE_TERMIOS_CLINE 1" >>confdefs.h
-
-  fi
-else
-  sim_cv_termios_cline=no
-fi
-
-if test "$sim_cv_termios_struct" != "yes"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct termio" >&5
-$as_echo_n "checking for struct termio... " >&6; }
-if ${sim_cv_termio_struct+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <sys/termio.h>
-int
-main ()
-{
-
-  static struct termio x;
-  x.c_iflag = 0;
-  x.c_oflag = 0;
-  x.c_cflag = 0;
-  x.c_lflag = 0;
-  x.c_cc[NCC] = 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  sim_cv_termio_struct="yes"
-else
-  sim_cv_termio_struct="no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_termio_struct" >&5
-$as_echo "$sim_cv_termio_struct" >&6; }
-  if test $sim_cv_termio_struct = yes; then
-
-$as_echo "#define HAVE_TERMIO_STRUCTURE 1" >>confdefs.h
-
-  fi
-else
-  sim_cv_termio_struct=no
-fi
-
-if test "$sim_cv_termio_struct" = "yes"; then
-  if ${sim_cv_termio_cline+:} false; then :
-  $as_echo_n "(cached) " >&6
-fi
-
-  ac_fn_c_check_member "$LINENO" "struct termio" "c_line" "ac_cv_member_struct_termio_c_line" "
-#include <sys/types.h>
-#include <sys/termio.h>
-
-"
-if test "x$ac_cv_member_struct_termio_c_line" = xyes; then :
-  sim_cv_termio_cline="yes"
-else
-  sim_cv_termio_cline="no"
-fi
-
-  if test $sim_cv_termio_cline = yes; then
-
-$as_echo "#define HAVE_TERMIO_CLINE 1" >>confdefs.h
-
-  fi
-else
-  sim_cv_termio_cline=no
-fi
-
-
 
 
 
index 7b4b998e94873bf558719152aa85eb0668286eb7..b19be90ec33b6f02fc16bc1d4ddc5e7dc692d483 100644 (file)
@@ -288,75 +288,6 @@ fi],[sim_xor_endian=""])dnl
 AC_CONFIG_HEADER(config.h:config.in)
 
 
-dnl Figure out what type of termio/termios support there is
-AC_CACHE_CHECK([for struct termios],
-  [sim_cv_termios_struct],
-  [AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/termios.h>], [
-  static struct termios x;
-  x.c_iflag = 0;
-  x.c_oflag = 0;
-  x.c_cflag = 0;
-  x.c_lflag = 0;
-  x.c_cc[NCCS] = 0;
-], [sim_cv_termios_struct="yes"], [sim_cv_termios_struct="no"])])
-if test $sim_cv_termios_struct = yes; then
-  AC_DEFINE([HAVE_TERMIOS_STRUCTURE], 1, [Define if struct termios exists.])
-fi
-
-if test "$sim_cv_termios_struct" = "yes"; then
-  AC_CACHE_VAL([sim_cv_termios_cline])
-  AC_CHECK_MEMBER(
-    [struct termios.c_line],
-    [sim_cv_termios_cline="yes"],
-    [sim_cv_termios_cline="no"], [
-#include <sys/types.h>
-#include <sys/termios.h>
-])
-  if test $sim_cv_termios_cline = yes; then
-    AC_DEFINE([HAVE_TERMIOS_CLINE], 1, [Define if struct termios has c_line.])
-  fi
-else
-  sim_cv_termios_cline=no
-fi
-
-if test "$sim_cv_termios_struct" != "yes"; then
-  AC_CACHE_CHECK([for struct termio],
-    [sim_cv_termio_struct],
-    [AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/termio.h>], [
-  static struct termio x;
-  x.c_iflag = 0;
-  x.c_oflag = 0;
-  x.c_cflag = 0;
-  x.c_lflag = 0;
-  x.c_cc[NCC] = 0;
-], [sim_cv_termio_struct="yes"], [sim_cv_termio_struct="no"])])
-  if test $sim_cv_termio_struct = yes; then
-    AC_DEFINE([HAVE_TERMIO_STRUCTURE], 1, [Define if struct termio exists.])
-  fi
-else
-  sim_cv_termio_struct=no
-fi
-
-if test "$sim_cv_termio_struct" = "yes"; then
-  AC_CACHE_VAL([sim_cv_termio_cline])
-  AC_CHECK_MEMBER(
-    [struct termio.c_line],
-    [sim_cv_termio_cline="yes"],
-    [sim_cv_termio_cline="no"], [
-#include <sys/types.h>
-#include <sys/termio.h>
-])
-  if test $sim_cv_termio_cline = yes; then
-    AC_DEFINE([HAVE_TERMIO_CLINE], 1, [Define if struct termio has c_line.])
-  fi
-else
-  sim_cv_termio_cline=no
-fi
-
 AC_SUBST(sim_line_nr)
 AC_SUBST(sim_opcode)
 AC_SUBST(sim_switch)