aboutsummaryrefslogtreecommitdiff
path: root/sim/rl78
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-04-18 23:44:36 -0400
committerMike Frysinger <vapier@gentoo.org>2021-04-18 23:53:01 -0400
commit2c2645d7a8b0498d7b581eae709e0f2ba51dcfe6 (patch)
treecb26bf3fc746efd5a11e313ef9e5285cb7388e52 /sim/rl78
parent41e166b43b16db5980a5fe011c0165642ee1708a (diff)
downloadgdb-2c2645d7a8b0498d7b581eae709e0f2ba51dcfe6.zip
gdb-2c2645d7a8b0498d7b581eae709e0f2ba51dcfe6.tar.gz
gdb-2c2645d7a8b0498d7b581eae709e0f2ba51dcfe6.tar.bz2
sim: switch to AC_CHECK_HEADERS_ONCE
This avoids duplicate tests for headers between common m4, arches, and any other sources that would trigger header tests.
Diffstat (limited to 'sim/rl78')
-rw-r--r--sim/rl78/ChangeLog5
-rwxr-xr-xsim/rl78/configure109
-rw-r--r--sim/rl78/configure.ac2
3 files changed, 54 insertions, 62 deletions
diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog
index 4aa6b1f..32cd435 100644
--- a/sim/rl78/ChangeLog
+++ b/sim/rl78/ChangeLog
@@ -1,5 +1,10 @@
2021-04-18 Mike Frysinger <vapier@gentoo.org>
+ * configure.ac: Change AC_CHECK_HEADERS to AC_CHECK_HEADERS_ONCE.
+ * configure: Regenerate.
+
+2021-04-18 Mike Frysinger <vapier@gentoo.org>
+
* configure: Regenerate.
2021-04-02 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/rl78/configure b/sim/rl78/configure
index a164b13..8ba5fd0 100755
--- a/sim/rl78/configure
+++ b/sim/rl78/configure
@@ -629,6 +629,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
+ac_header_list=
ac_func_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
@@ -2282,6 +2283,15 @@ $as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
+as_fn_append ac_header_list " dlfcn.h"
+as_fn_append ac_header_list " fcntl.h"
+as_fn_append ac_header_list " fpu_control.h"
+as_fn_append ac_header_list " unistd.h"
+as_fn_append ac_header_list " sys/mman.h"
+as_fn_append ac_header_list " sys/resource.h"
+as_fn_append ac_header_list " sys/time.h"
+as_fn_append ac_header_list " sys/times.h"
+as_fn_append ac_header_list " sys/stat.h"
as_fn_append ac_func_list " __setfpucw"
as_fn_append ac_func_list " ftruncate"
as_fn_append ac_func_list " getrusage"
@@ -2292,6 +2302,7 @@ as_fn_append ac_func_list " posix_fallocate"
as_fn_append ac_func_list " sigaction"
as_fn_append ac_func_list " time"
as_fn_append ac_func_list " truncate"
+as_fn_append ac_header_list " getopt.h"
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
@@ -3869,6 +3880,41 @@ DEPDIR="${am__leading_dot}deps"
+ for ac_header in $ac_header_list
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
for ac_func in $ac_func_list
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -7296,56 +7342,6 @@ fi
# Check for common headers.
# NB: You can assume C11 headers exist.
-for ac_header in unistd.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
-if test "x$ac_cv_header_unistd_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_UNISTD_H 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in sys/time.h sys/times.h sys/resource.h sys/mman.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in fcntl.h fpu_control.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in dlfcn.h sys/stat.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
ac_fn_c_check_member "$LINENO" "struct stat" "st_dev" "ac_cv_member_struct_stat_st_dev" "#ifdef HAVE_SYS_TYPES_H
@@ -11248,7 +11244,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11251 "configure"
+#line 11247 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11354,7 +11350,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11357 "configure"
+#line 11353 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11999,17 +11995,8 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
fi
-for ac_header in getopt.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
-if test "x$ac_cv_header_getopt_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETOPT_H 1
-_ACEOF
-fi
-done
diff --git a/sim/rl78/configure.ac b/sim/rl78/configure.ac
index 1314b98..fad367c 100644
--- a/sim/rl78/configure.ac
+++ b/sim/rl78/configure.ac
@@ -24,6 +24,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
SIM_AC_COMMON
SIM_AC_OPTION_WARNINGS(no)
-AC_CHECK_HEADERS(getopt.h)
+AC_CHECK_HEADERS_ONCE(getopt.h)
SIM_AC_OUTPUT