]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: ppc: move termio defines to config.h
authorMike Frysinger <vapier@gentoo.org>
Tue, 2 Jan 2024 04:37:11 +0000 (23:37 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 2 Jan 2024 05:31:55 +0000 (00:31 -0500)
Move the defines from explicit -D options to config.h defines to simplify
the build and make it easier to move to the top-level configure.

sim/ppc/Makefile.in
sim/ppc/config.in
sim/ppc/configure
sim/ppc/configure.ac

index 26a1e7cfd28e541a4caf32acdd2b07a6cb45ae24..8eaad7424c44118be0cf7cd261ffade83b1fae80 100644 (file)
@@ -68,7 +68,6 @@ TIMEBASE_CFLAGS = @sim_timebase@
 FLOAT_CFLAGS = @sim_float@
 MONITOR_CFLAGS = @sim_monitor@
 MODEL_CFLAGS = @sim_model@ @sim_default_model@ @sim_model_issue@
-TERMIO_CFLAGS = @sim_termio@
 SWITCH_CFLAGS = @sim_switch@
 CONFIG_CFLAGS = \
   $(SMP_CFLAGS) \
@@ -78,7 +77,6 @@ CONFIG_CFLAGS = \
   $(FLOAT_CFLAGS) \
   $(MONITOR_CFLAGS) \
   $(MODEL_CFLAGS) \
-  $(TERMIO_CFLAGS) \
   $(SWITCH_CFLAGS)
 SIM_FPU_CFLAGS = -DHAVE_COMMON_FPU -I../common -I${srcdir}/../common
 
index 2a60b8d8ad16795410e4a6722ac445ae08d6ffb6..78786dfad609b140b16ea910c55488b4566f97ba 100644 (file)
@@ -1,5 +1,17 @@
 /* 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 14d0e91ad04d92bdb6a4a536f986d8372899920b..ce591d642229ac010d98fa45d3d3fabea58ff360 100755 (executable)
@@ -584,7 +584,6 @@ PACKAGE_URL=
 ac_unique_file="Makefile.in"
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
-sim_termio
 sim_model_issue
 sim_default_model
 sim_model
@@ -3164,7 +3163,6 @@ ac_config_headers="$ac_config_headers config.h:config.in"
 
 
 
-sim_termio=""
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct termios" >&5
 $as_echo_n "checking for struct termios... " >&6; }
 
@@ -3199,7 +3197,9 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_termios_struct" >&5
 $as_echo "$ac_cv_termios_struct" >&6; }
 if test $ac_cv_termios_struct = yes; then
-  sim_termio="$sim_termio -DHAVE_TERMIOS_STRUCTURE"
+
+$as_echo "#define HAVE_TERMIOS_STRUCTURE 1" >>confdefs.h
+
 fi
 
 if test "$ac_cv_termios_struct" = "yes"; then
@@ -3232,7 +3232,9 @@ fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_termios_cline" >&5
 $as_echo "$ac_cv_termios_cline" >&6; }
   if test $ac_cv_termios_cline = yes; then
-    sim_termio="$sim_termio -DHAVE_TERMIOS_CLINE"
+
+$as_echo "#define HAVE_TERMIOS_CLINE 1" >>confdefs.h
+
   fi
 else
   ac_cv_termios_cline=no
@@ -3272,7 +3274,9 @@ fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_termio_struct" >&5
 $as_echo "$ac_cv_termio_struct" >&6; }
   if test $ac_cv_termio_struct = yes; then
-    sim_termio="$sim_termio -DHAVE_TERMIO_STRUCTURE"
+
+$as_echo "#define HAVE_TERMIO_STRUCTURE 1" >>confdefs.h
+
   fi
 else
   ac_cv_termio_struct=no
@@ -3308,7 +3312,9 @@ fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_termio_cline" >&5
 $as_echo "$ac_cv_termio_cline" >&6; }
   if test $ac_cv_termio_cline = yes; then
-    sim_termio="$sim_termio -DHAVE_TERMIO_CLINE"
+
+$as_echo "#define HAVE_TERMIO_CLINE 1" >>confdefs.h
+
   fi
 else
   ac_cv_termio_cline=no
@@ -3333,7 +3339,6 @@ fi
 
 
 
-
 
 
 ac_config_files="$ac_config_files Makefile"
index 13db9fc4791e47eb66ca4746e75697eb1e6eebba..e8354791a711068657b59ec2633d755a31fab3a7 100644 (file)
@@ -289,7 +289,6 @@ AC_CONFIG_HEADER(config.h:config.in)
 
 
 dnl Figure out what type of termio/termios support there is
-sim_termio=""
 AC_MSG_CHECKING(for struct termios)
 AC_CACHE_VAL(ac_cv_termios_struct,
 [AC_TRY_COMPILE([#include <sys/types.h>
@@ -303,7 +302,7 @@ AC_CACHE_VAL(ac_cv_termios_struct,
 ac_cv_termios_struct=yes, ac_cv_termios_struct=no)])
 AC_MSG_RESULT($ac_cv_termios_struct)
 if test $ac_cv_termios_struct = yes; then
-  sim_termio="$sim_termio -DHAVE_TERMIOS_STRUCTURE"
+  AC_DEFINE([HAVE_TERMIOS_STRUCTURE], 1, [Define if struct termios exists.])
 fi
 
 if test "$ac_cv_termios_struct" = "yes"; then
@@ -316,7 +315,7 @@ if test "$ac_cv_termios_struct" = "yes"; then
 
   AC_MSG_RESULT($ac_cv_termios_cline)
   if test $ac_cv_termios_cline = yes; then
-    sim_termio="$sim_termio -DHAVE_TERMIOS_CLINE"
+    AC_DEFINE([HAVE_TERMIOS_CLINE], 1, [Define if struct termios has c_line.])
   fi
 else
   ac_cv_termios_cline=no
@@ -336,7 +335,7 @@ if test "$ac_cv_termios_struct" != "yes"; then
 ac_cv_termio_struct=yes, ac_cv_termio_struct=no)])
   AC_MSG_RESULT($ac_cv_termio_struct)
   if test $ac_cv_termio_struct = yes; then
-    sim_termio="$sim_termio -DHAVE_TERMIO_STRUCTURE"
+    AC_DEFINE([HAVE_TERMIO_STRUCTURE], 1, [Define if struct termio exists.])
   fi
 else
   ac_cv_termio_struct=no
@@ -352,7 +351,7 @@ if test "$ac_cv_termio_struct" = "yes"; then
 
   AC_MSG_RESULT($ac_cv_termio_cline)
   if test $ac_cv_termio_cline = yes; then
-    sim_termio="$sim_termio -DHAVE_TERMIO_CLINE"
+    AC_DEFINE([HAVE_TERMIO_CLINE], 1, [Define if struct termio has c_line.])
   fi
 else
   ac_cv_termio_cline=no
@@ -378,7 +377,6 @@ AC_SUBST(sim_monitor)
 AC_SUBST(sim_model)
 AC_SUBST(sim_default_model)
 AC_SUBST(sim_model_issue)
-AC_SUBST(sim_termio)
 
 AC_OUTPUT(Makefile,
 [case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])