public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/egallager/heads/autotools-tinkering)] autotools changes for c++tools and fixincludes
@ 2022-05-25  4:59 Eric Gallager
  0 siblings, 0 replies; only message in thread
From: Eric Gallager @ 2022-05-25  4:59 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b19de1a0bc6b0be1e32990b408e04e3168b62e2c

commit b19de1a0bc6b0be1e32990b408e04e3168b62e2c
Author: Eric Gallager <egallager@gcc.gnu.org>
Date:   Wed May 25 00:59:32 2022 -0400

    autotools changes for c++tools and fixincludes

Diff:
---
 c++tools/configure         |   2 +-
 c++tools/configure.ac      |   5 +-
 c++tools/configure.scan    |  30 +++++++
 fixincludes/config.h.in    | 204 ---------------------------------------------
 fixincludes/configure      |   7 +-
 fixincludes/configure.ac   |   8 +-
 fixincludes/configure.scan |  37 ++++++++
 7 files changed, 78 insertions(+), 215 deletions(-)

diff --git a/c++tools/configure b/c++tools/configure
index 742816e4253..e9d6d317dec 100755
--- a/c++tools/configure
+++ b/c++tools/configure
@@ -2065,6 +2065,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
 # Determine the noncanonical names used for directories.
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2223,7 +2224,6 @@ test -n "$target_alias" &&
   test "$program_prefix$program_suffix$program_transform_name" = \
     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
-
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
 # incompatible versions:
diff --git a/c++tools/configure.ac b/c++tools/configure.ac
index 6662b5ad7c9..4c114f18712 100644
--- a/c++tools/configure.ac
+++ b/c++tools/configure.ac
@@ -24,14 +24,15 @@
 sinclude(../config/acx.m4)
 sinclude(../config/ax_lib_socket_nsl.m4)
 
-AC_INIT(c++tools)
+AC_INIT
+AC_CONFIG_SRCDIR([c++tools])
 
 AC_CONFIG_SRCDIR([server.cc])
 
 # Determine the noncanonical names used for directories.
 ACX_NONCANONICAL_TARGET
 
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
 AC_PROG_INSTALL
 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 AC_SUBST(INSTALL_PROGRAM)
diff --git a/c++tools/configure.scan b/c++tools/configure.scan
new file mode 100644
index 00000000000..1ee03b6c9eb
--- /dev/null
+++ b/c++tools/configure.scan
@@ -0,0 +1,30 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
+AC_CONFIG_SRCDIR([config.h.in])
+AC_CONFIG_HEADERS([config.h])
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_INSTALL
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/socket.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_CHECK_HEADER_STDBOOL
+AC_C_INLINE
+AC_TYPE_SIZE_T
+
+# Checks for library functions.
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_MMAP
+AC_CHECK_FUNCS([munmap select strrchr strtoul])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/fixincludes/config.h.in b/fixincludes/config.h.in
index 3f6cf1e574e..69a67f5f116 100644
--- a/fixincludes/config.h.in
+++ b/fixincludes/config.h.in
@@ -1,397 +1,211 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
 /* Defined to the executable file extension on the host system */
-#ifndef USED_FOR_TARGET
 #undef EXE_EXT
-#endif
-
 
 /* Define to 1 if you have the `clearerr_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_CLEARERR_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `abort', and to 0 if you don't.
    */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_ABORT
-#endif
-
 
 /* Define to 1 if you have the declaration of `asprintf', and to 0 if you
    don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_ASPRINTF
-#endif
-
 
 /* Define to 1 if you have the declaration of `basename(char *)', and to 0 if
    you don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_BASENAME
-#endif
-
 
 /* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
    you don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_CLEARERR_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `errno', and to 0 if you don't.
    */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_ERRNO
-#endif
-
 
 /* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
    don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_FEOF_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
    you don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_FERROR_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
    you don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_FFLUSH_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `fgetc_unlocked', and to 0 if
    you don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_FGETC_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
    you don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_FGETS_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `fileno_unlocked', and to 0 if
    you don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_FILENO_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `fprintf_unlocked', and to 0 if
    you don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_FPRINTF_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
    you don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_FPUTC_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
    you don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_FPUTS_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
    you don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_FREAD_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
    you don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_FWRITE_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
    you don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_GETCHAR_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
    don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_GETC_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
    you don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_PUTCHAR_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
    don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_PUTC_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the declaration of `vasprintf', and to 0 if you
    don't. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_DECL_VASPRINTF
-#endif
-
 
 /* Define to 1 if you have the <fcntl.h> header file. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_FCNTL_H
-#endif
-
 
 /* Define to 1 if you have the `feof_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_FEOF_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the `ferror_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_FERROR_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the `fflush_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_FFLUSH_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the `fgetc_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_FGETC_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the `fgets_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_FGETS_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the `fileno_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_FILENO_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the `fprintf_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_FPRINTF_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the `fputc_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_FPUTC_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the `fputs_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_FPUTS_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the `fread_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_FREAD_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the `fwrite_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_FWRITE_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the `getchar_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_GETCHAR_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the `getc_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_GETC_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the <inttypes.h> header file. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_INTTYPES_H
-#endif
-
 
 /* Define to 1 if you have the <memory.h> header file. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_MEMORY_H
-#endif
-
 
 /* Define if mmap with MAP_ANON(YMOUS) works. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_MMAP_ANON
-#endif
-
 
 /* Define if mmap of /dev/zero works. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_MMAP_DEV_ZERO
-#endif
-
 
 /* Define if read-only mmap of a plain file works. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_MMAP_FILE
-#endif
-
 
 /* Define to 1 if you have the `putchar_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_PUTCHAR_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the `putc_unlocked' function. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_PUTC_UNLOCKED
-#endif
-
 
 /* Define to 1 if you have the <stddef.h> header file. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_STDDEF_H
-#endif
-
 
 /* Define to 1 if you have the <stdint.h> header file. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_STDINT_H
-#endif
-
 
 /* Define to 1 if you have the <stdlib.h> header file. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_STDLIB_H
-#endif
-
 
 /* Define to 1 if you have the <strings.h> header file. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_STRINGS_H
-#endif
-
 
 /* Define to 1 if you have the <string.h> header file. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_STRING_H
-#endif
-
 
 /* Define to 1 if you have the <sys/file.h> header file. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_SYS_FILE_H
-#endif
-
 
 /* Define to 1 if you have the <sys/stat.h> header file. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_SYS_STAT_H
-#endif
-
 
 /* Define to 1 if you have the <sys/types.h> header file. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_SYS_TYPES_H
-#endif
-
 
 /* Define to 1 if you have the <unistd.h> header file. */
-#ifndef USED_FOR_TARGET
 #undef HAVE_UNISTD_H
-#endif
-
 
 /* Define to the address where bug reports for this package should be sent. */
-#ifndef USED_FOR_TARGET
 #undef PACKAGE_BUGREPORT
-#endif
-
 
 /* Define to the full name of this package. */
-#ifndef USED_FOR_TARGET
 #undef PACKAGE_NAME
-#endif
-
 
 /* Define to the full name and version of this package. */
-#ifndef USED_FOR_TARGET
 #undef PACKAGE_STRING
-#endif
-
 
 /* Define to the one symbol short name of this package. */
-#ifndef USED_FOR_TARGET
 #undef PACKAGE_TARNAME
-#endif
-
 
 /* Define to the home page for this package. */
-#ifndef USED_FOR_TARGET
 #undef PACKAGE_URL
-#endif
-
 
 /* Define to the version of this package. */
-#ifndef USED_FOR_TARGET
 #undef PACKAGE_VERSION
-#endif
-
 
 /* Defined to the best working sed program on the host system */
-#ifndef USED_FOR_TARGET
 #undef SED_PROGRAM
-#endif
-
 
 /* Define if testing and fixing are done by separate process */
-#ifndef USED_FOR_TARGET
 #undef SEPARATE_FIX_PROC
-#endif
-
 
 /* Define to 1 if you have the ANSI C header files. */
-#ifndef USED_FOR_TARGET
 #undef STDC_HEADERS
-#endif
-
 
 /* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
@@ -416,38 +230,20 @@
 
 
 /* Define to 1 if on MINIX. */
-#ifndef USED_FOR_TARGET
 #undef _MINIX
-#endif
-
 
 /* Define to 2 if the system does not provide POSIX.1 features except with
    this defined. */
-#ifndef USED_FOR_TARGET
 #undef _POSIX_1_SOURCE
-#endif
-
 
 /* Define to 1 if you need to in order for `stat' and other things to work. */
-#ifndef USED_FOR_TARGET
 #undef _POSIX_SOURCE
-#endif
-
 
 /* Define to xatexit if the host system does not support atexit */
-#ifndef USED_FOR_TARGET
 #undef atexit
-#endif
-
 
 /* Define to empty if `const' does not conform to ANSI C. */
-#ifndef USED_FOR_TARGET
 #undef const
-#endif
-
 
 /* Define to xexit if the host system does not support atexit */
-#ifndef USED_FOR_TARGET
 #undef exit
-#endif
-
diff --git a/fixincludes/configure b/fixincludes/configure
index 6e2d67b655b..02acc7292d1 100755
--- a/fixincludes/configure
+++ b/fixincludes/configure
@@ -2644,7 +2644,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 # _LT_DARWIN_LINKER_FEATURES
 # --------------------------
-# Checks for linker and compiler features on darwin
+# Checks for linker and compiler features on Darwin / macOS / iOS
 
 
 # _LT_SYS_MODULE_PATH_AIX
@@ -3304,7 +3304,6 @@ test -n "$target_alias" &&
   test "$program_prefix$program_suffix$program_transform_name" = \
     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4634,9 +4633,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 WARN_CFLAGS=
 save_CFLAGS="$CFLAGS"
-for real_option in -W -Wall -Wwrite-strings -Wstrict-prototypes \
+for real_option in -Wall -Wextra -Wwrite-strings -Wstrict-prototypes \
 			  -Wmissing-prototypes -Wold-style-definition \
-			  -Wmissing-format-attribute -Wno-overlength-strings; do
+			  -Wmissing-format-attribute; do
   # Do the check with the no- prefix removed since gcc silently
   # accepts any -Wno-* option on purpose
   case $real_option in
diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac
index 14813b910f1..94b1327e4fd 100644
--- a/fixincludes/configure.ac
+++ b/fixincludes/configure.ac
@@ -1,9 +1,9 @@
 
-AC_INIT(fixincludes, [ ])
+AC_INIT([fixincludes],[ ])
 AC_CONFIG_SRCDIR(inclhack.def)
 AC_CONFIG_AUX_DIR(..)
 m4_sinclude(../libtool.m4)
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
 AC_PROG_CC
 AC_USE_SYSTEM_EXTENSIONS
 AC_PROG_SED
@@ -11,9 +11,9 @@ AC_PROG_SED
 # Figure out what compiler warnings we can enable.
 # See config/warnings.m4 for details.
 
-ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
+ACX_PROG_CC_WARNING_OPTS([-Wall -Wextra -Wwrite-strings -Wstrict-prototypes \
 			  -Wmissing-prototypes -Wold-style-definition \
-			  -Wmissing-format-attribute -Wno-overlength-strings])
+			  -Wmissing-format-attribute])
 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long])
 
 # Only enable with --enable-werror-always until existing warnings are
diff --git a/fixincludes/configure.scan b/fixincludes/configure.scan
new file mode 100644
index 00000000000..7ab783f0420
--- /dev/null
+++ b/fixincludes/configure.scan
@@ -0,0 +1,37 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
+AC_CONFIG_SRCDIR([fixlib.h])
+AC_CONFIG_HEADERS([config.h])
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_CHECK_HEADERS([fcntl.h stddef.h stdlib.h string.h strings.h sys/file.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_CHECK_HEADER_STDBOOL
+AC_C_INLINE
+AC_TYPE_INT8_T
+AC_TYPE_MODE_T
+AC_TYPE_OFF_T
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_UINT8_T
+AC_CHECK_TYPES([ptrdiff_t])
+
+# Checks for library functions.
+AC_FUNC_FORK
+AC_FUNC_MALLOC
+AC_FUNC_MMAP
+AC_FUNC_REALLOC
+AC_CHECK_FUNCS([alarm atexit dup2 getcwd getpagesize memchr memset mkdir munmap pathconf pow putenv strchr strerror strrchr strspn strtol strtoul])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-25  4:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25  4:59 [gcc(refs/users/egallager/heads/autotools-tinkering)] autotools changes for c++tools and fixincludes Eric Gallager

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).