diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2020-07-06 11:10:30 -0700 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2020-07-06 11:12:03 -0700 |
commit | e2040291ec7c07b7c7604440d725a8d5973f763f (patch) | |
tree | ffd0370fe2cff902f4a5de1d3aa3f955bdfae800 | |
parent | e8599c655ef06a63ca0a610b11ba4d14fd5c5c49 (diff) | |
download | nasm-e2040291ec7c07b7c7604440d725a8d5973f763f.tar.gz |
config/unconfig.h: generate by Makefile, not autogen.sh
config/unconfig.h really is no different than the other perlreq files,
so move it into the Makefile. This has the extra advantage that
config/unconfig.h no longer needs to be kept in the source repository.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
-rw-r--r-- | Makefile.in | 7 | ||||
-rw-r--r-- | Mkfiles/msvc.mak | 7 | ||||
-rw-r--r-- | Mkfiles/openwcom.mak | 7 | ||||
-rwxr-xr-x | autogen.sh | 9 | ||||
-rw-r--r-- | config/unconfig.h | 814 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rwxr-xr-x | tools/unconfig.pl | 35 |
7 files changed, 58 insertions, 826 deletions
diff --git a/Makefile.in b/Makefile.in index 8c8e1d54..bb023d02 100644 --- a/Makefile.in +++ b/Makefile.in @@ -178,7 +178,8 @@ ndisasm$(X): $(NDISASM) $(NASMLIB) # have Perl just to recompile NASM from the distribution. # Perl-generated source files -PERLREQ = x86/insnsb.c x86/insnsa.c x86/insnsd.c x86/insnsi.h x86/insnsn.c \ +PERLREQ = config/unconfig.h \ + x86/insnsb.c x86/insnsa.c x86/insnsd.c x86/insnsi.h x86/insnsn.c \ x86/regs.c x86/regs.h x86/regflags.c x86/regdis.c x86/regdis.h \ x86/regvals.c asm/tokhash.c asm/tokens.h asm/pptok.h asm/pptok.c \ x86/iflag.c x86/iflaggen.h \ @@ -189,6 +190,10 @@ PERLREQ = x86/insnsb.c x86/insnsa.c x86/insnsd.c x86/insnsi.h x86/insnsn.c \ INSDEP = x86/insns.dat x86/insns.pl x86/insns-iflags.ph x86/iflags.ph +config/unconfig.h: config/config.h.in + $(RUNPERL) $(srcdir)/tools/unconfig.pl \ + '$(srcdir)' config/config.h.in config/unconfig.h + x86/iflag.c: $(INSDEP) $(RUNPERL) $(srcdir)/x86/insns.pl -fc \ $(srcdir)/x86/insns.dat x86/iflag.c diff --git a/Mkfiles/msvc.mak b/Mkfiles/msvc.mak index a22b2cbe..9346c293 100644 --- a/Mkfiles/msvc.mak +++ b/Mkfiles/msvc.mak @@ -137,7 +137,8 @@ $(NASMLIB): $(LIBOBJ) # have Perl just to recompile NASM from the distribution. # Perl-generated source files -PERLREQ = x86\insnsb.c x86\insnsa.c x86\insnsd.c x86\insnsi.h x86\insnsn.c \ +PERLREQ = config\unconfig.h \ + x86\insnsb.c x86\insnsa.c x86\insnsd.c x86\insnsi.h x86\insnsn.c \ x86\regs.c x86\regs.h x86\regflags.c x86\regdis.c x86\regdis.h \ x86\regvals.c asm\tokhash.c asm\tokens.h asm\pptok.h asm\pptok.c \ x86\iflag.c x86\iflaggen.h \ @@ -148,6 +149,10 @@ PERLREQ = x86\insnsb.c x86\insnsa.c x86\insnsd.c x86\insnsi.h x86\insnsn.c \ INSDEP = x86\insns.dat x86\insns.pl x86\insns-iflags.ph x86\iflags.ph +config\unconfig.h: config\config.h.in + $(RUNPERL) $(srcdir)\tools\unconfig.pl \ + '$(srcdir)' config\config.h.in config\unconfig.h + x86\iflag.c: $(INSDEP) $(RUNPERL) $(srcdir)\x86\insns.pl -fc \ $(srcdir)\x86\insns.dat x86\iflag.c diff --git a/Mkfiles/openwcom.mak b/Mkfiles/openwcom.mak index 73e0d1bc..f5bdf085 100644 --- a/Mkfiles/openwcom.mak +++ b/Mkfiles/openwcom.mak @@ -150,7 +150,8 @@ nasm.lib: $(LIBOBJ) # have Perl just to recompile NASM from the distribution. # Perl-generated source files -PERLREQ = x86\insnsb.c x86\insnsa.c x86\insnsd.c x86\insnsi.h x86\insnsn.c & +PERLREQ = config\unconfig.h & + x86\insnsb.c x86\insnsa.c x86\insnsd.c x86\insnsi.h x86\insnsn.c & x86\regs.c x86\regs.h x86\regflags.c x86\regdis.c x86\regdis.h & x86\regvals.c asm\tokhash.c asm\tokens.h asm\pptok.h asm\pptok.c & x86\iflag.c x86\iflaggen.h & @@ -161,6 +162,10 @@ PERLREQ = x86\insnsb.c x86\insnsa.c x86\insnsd.c x86\insnsi.h x86\insnsn.c & INSDEP = x86\insns.dat x86\insns.pl x86\insns-iflags.ph x86\iflags.ph +config\unconfig.h: config\config.h.in + $(RUNPERL) $(srcdir)\tools\unconfig.pl & + '$(srcdir)' config\config.h.in config\unconfig.h + x86\iflag.c: $(INSDEP) $(RUNPERL) $(srcdir)\x86\insns.pl -fc & $(srcdir)\x86\insns.dat x86\iflag.c @@ -43,15 +43,6 @@ if test ! -f autoconf/aclocal.m4; then fi rm -rf autoconf/*m4.old "$AUTOHEADER" -B autoconf -if [ config/config.h.in -nt config/unconfig.h ]; then - # Create a file corresponding to a completely empty configure - # instance, commenting out the #undef directives from the template - # just like configure would do. - perl -np < config/config.h.in > config/unconfig.h \ - -e 's:^(\#\s*undef\s.*)$:/* $1 */:;' \ - -e 's:config/config.h.in:config/unconfig.h:;' \ - -e 's:autoheader:autogen.sh:;' -fi "$AUTOCONF" -B autoconf rm -rf autom4te.cache config.log config.status config/config.h Makefile diff --git a/config/unconfig.h b/config/unconfig.h deleted file mode 100644 index 5972a302..00000000 --- a/config/unconfig.h +++ /dev/null @@ -1,814 +0,0 @@ -/* config/unconfig.h. Generated from configure.ac by autogen.sh. */ - -/* Define to 1 to call abort() on panics (internal errors), for debugging. */ -/* #undef ABORT_ON_PANIC */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to 1 if compiled with the - `-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang' - compiler flag */ -/* #undef CFLAGS_ENABLE_TRIVIAL_AUTO_VAR_INIT_ZERO_KNOWING_IT_WILL_BE_REMOVED_FROM_CLANG */ - -/* Define to 1 if compiled with the `-fdata-sections' compiler flag */ -/* #undef CFLAGS_FDATA_SECTIONS */ - -/* Define to 1 if compiled with the `-ffunction-sections' compiler flag */ -/* #undef CFLAGS_FFUNCTION_SECTIONS */ - -/* Define to 1 if compiled with the `-fgnu89-inline' compiler flag */ -/* #undef CFLAGS_FGNU89_INLINE */ - -/* Define to 1 if compiled with the `-flto' compiler flag */ -/* #undef CFLAGS_FLTO */ - -/* Define to 1 if compiled with the `-fno-common' compiler flag */ -/* #undef CFLAGS_FNO_COMMON */ - -/* Define to 1 if compiled with the `-fno-omit-frame-pointer' compiler flag */ -/* #undef CFLAGS_FNO_OMIT_FRAME_POINTER */ - -/* Define to 1 if compiled with the `-fsanitize=address' compiler flag */ -/* #undef CFLAGS_FSANITIZE_ADDRESS */ - -/* Define to 1 if compiled with the `-fsanitize=undefined' compiler flag */ -/* #undef CFLAGS_FSANITIZE_UNDEFINED */ - -/* Define to 1 if compiled with the `-ftrivial-auto-var-init=zero' compiler - flag */ -/* #undef CFLAGS_FTRIVIAL_AUTO_VAR_INIT_ZERO */ - -/* Define to 1 if compiled with the `-fvisibility=hidden' compiler flag */ -/* #undef CFLAGS_FVISIBILITY_HIDDEN */ - -/* Define to 1 if compiled with the `-fwrapv' compiler flag */ -/* #undef CFLAGS_FWRAPV */ - -/* Define to 1 if compiled with the `-ggdb3' compiler flag */ -/* #undef CFLAGS_GGDB3 */ - -/* Define to 1 if compiled with the `-O0' compiler flag */ -/* #undef CFLAGS_O0 */ - -/* Define to 1 if compiled with the `-pedantic' compiler flag */ -/* #undef CFLAGS_PEDANTIC */ - -/* Define to 1 if compiled with the `-pg' compiler flag */ -/* #undef CFLAGS_PG */ - -/* Define to 1 if compiled with the `-U__STRICT_ANSI__' compiler flag */ -/* #undef CFLAGS_U_STRICT_ANSI */ - -/* Define to 1 if compiled with the `-W' compiler flag */ -/* #undef CFLAGS_W */ - -/* Define to 1 if compiled with the `-Wall' compiler flag */ -/* #undef CFLAGS_WALL */ - -/* Define to 1 if compiled with the `-Wc90-c99-compat' compiler flag */ -/* #undef CFLAGS_WC90_C99_COMPAT */ - -/* Define to 1 if compiled with the `-Wc99-compat' compiler flag */ -/* #undef CFLAGS_WC99_COMPAT */ - -/* Define to 1 if compiled with the `-Wc99-extensions' compiler flag */ -/* #undef CFLAGS_WC99_EXTENSIONS */ - -/* Define to 1 if compiled with the `-Werror' compiler flag */ -/* #undef CFLAGS_WERROR */ - -/* Define to 1 if compiled with the `-Werror=attributes' compiler flag */ -/* #undef CFLAGS_WERROR_ATTRIBUTES */ - -/* Define to 1 if compiled with the `-Werror=comment' compiler flag */ -/* #undef CFLAGS_WERROR_COMMENT */ - -/* Define to 1 if compiled with the `-Werror=implicit' compiler flag */ -/* #undef CFLAGS_WERROR_IMPLICIT */ - -/* Define to 1 if compiled with the `-Werror=missing-braces' compiler flag */ -/* #undef CFLAGS_WERROR_MISSING_BRACES */ - -/* Define to 1 if compiled with the `-Werror=missing-declarations' compiler - flag */ -/* #undef CFLAGS_WERROR_MISSING_DECLARATIONS */ - -/* Define to 1 if compiled with the `-Werror=missing-prototypes' compiler flag - */ -/* #undef CFLAGS_WERROR_MISSING_PROTOTYPES */ - -/* Define to 1 if compiled with the `-Werror=pointer-arith' compiler flag */ -/* #undef CFLAGS_WERROR_POINTER_ARITH */ - -/* Define to 1 if compiled with the `-Werror=return-type' compiler flag */ -/* #undef CFLAGS_WERROR_RETURN_TYPE */ - -/* Define to 1 if compiled with the `-Werror=strict-prototypes' compiler flag - */ -/* #undef CFLAGS_WERROR_STRICT_PROTOTYPES */ - -/* Define to 1 if compiled with the `-Werror=trigraphs' compiler flag */ -/* #undef CFLAGS_WERROR_TRIGRAPHS */ - -/* Define to 1 if compiled with the `-Werror=unknown-warning-option' compiler - flag */ -/* #undef CFLAGS_WERROR_UNKNOWN_WARNING_OPTION */ - -/* Define to 1 if compiled with the `-Werror=vla' compiler flag */ -/* #undef CFLAGS_WERROR_VLA */ - -/* Define to 1 if compiled with the `-Wlong-long' compiler flag */ -/* #undef CFLAGS_WLONG_LONG */ - -/* Define to 1 if compiled with the `-Wno-unused-command-line-argument' - compiler flag */ -/* #undef CFLAGS_WNO_UNUSED_COMMAND_LINE_ARGUMENT */ - -/* Define to 1 if compiled with the `-Wpedantic-ms-format' compiler flag */ -/* #undef CFLAGS_WPEDANTIC_MS_FORMAT */ - -/* Define to 1 if compiled with the `-Wshift-negative-value' compiler flag */ -/* #undef CFLAGS_WSHIFT_NEGATIVE_VALUE */ - -/* Define to 1 if compiled with the `-Wstringop-truncation' compiler flag */ -/* #undef CFLAGS_WSTRINGOP_TRUNCATION */ - -/* Define to 1 if you have the `access' function. */ -/* #undef HAVE_ACCESS */ - -/* Define to 1 if you have the `canonicalize_file_name' function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ - -/* Define to 1 if you have the `cpu_to_le16' intrinsic function. */ -/* #undef HAVE_CPU_TO_LE16 */ - -/* Define to 1 if you have the `cpu_to_le32' intrinsic function. */ -/* #undef HAVE_CPU_TO_LE32 */ - -/* Define to 1 if you have the `cpu_to_le64' intrinsic function. */ -/* #undef HAVE_CPU_TO_LE64 */ - -/* Define to 1 if you have the declaration of `strcasecmp', and to 0 if you - don't. */ -/* #undef HAVE_DECL_STRCASECMP */ - -/* Define to 1 if you have the declaration of `stricmp', and to 0 if you - don't. */ -/* #undef HAVE_DECL_STRICMP */ - -/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you - don't. */ -/* #undef HAVE_DECL_STRLCPY */ - -/* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you - don't. */ -/* #undef HAVE_DECL_STRNCASECMP */ - -/* Define to 1 if you have the declaration of `strnicmp', and to 0 if you - don't. */ -/* #undef HAVE_DECL_STRNICMP */ - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -/* #undef HAVE_DECL_STRNLEN */ - -/* Define to 1 if you have the declaration of `strrchrnul', and to 0 if you - don't. */ -/* #undef HAVE_DECL_STRRCHRNUL */ - -/* Define to 1 if you have the declaration of `strsep', and to 0 if you don't. - */ -/* #undef HAVE_DECL_STRSEP */ - -/* Define to 1 if you have the <endian.h> header file. */ -/* #undef HAVE_ENDIAN_H */ - -/* Define to 1 if you have the `faccessat' function. */ -/* #undef HAVE_FACCESSAT */ - -/* Define to 1 if you have the <fcntl.h> header file. */ -/* #undef HAVE_FCNTL_H */ - -/* Define to 1 if you have the `fileno' function. */ -/* #undef HAVE_FILENO */ - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -/* #undef HAVE_FSEEKO */ - -/* Define to 1 if you have the `fstat' function. */ -/* #undef HAVE_FSTAT */ - -/* Define to 1 if you have the `ftruncate' function. */ -/* #undef HAVE_FTRUNCATE */ - -/* Define to 1 if your compiler supports __attribute__((alloc_size)) on - functions */ -/* #undef HAVE_FUNC_ATTRIBUTE1_ALLOC_SIZE */ - -/* Define to 1 if your compiler supports __attribute__((alloc_size)) on - functions */ -/* #undef HAVE_FUNC_ATTRIBUTE2_ALLOC_SIZE */ - -/* Define to 1 if your compiler supports __attribute__((format)) on functions - */ -/* #undef HAVE_FUNC_ATTRIBUTE3_FORMAT */ - -/* Define to 1 if your compiler supports __attribute__((cold)) on functions */ -/* #undef HAVE_FUNC_ATTRIBUTE_COLD */ - -/* Define to 1 if your compiler supports __attribute__((const)) on functions - */ -/* #undef HAVE_FUNC_ATTRIBUTE_CONST */ - -/* Define to 1 if your compiler supports __attribute__((error)) on functions - */ -/* #undef HAVE_FUNC_ATTRIBUTE_ERROR */ - -/* Define to 1 if your compiler supports __attribute__((malloc)) on functions - */ -/* #undef HAVE_FUNC_ATTRIBUTE_MALLOC */ - -/* Define to 1 if your compiler supports __attribute__((noreturn)) on - functions */ -/* #undef HAVE_FUNC_ATTRIBUTE_NORETURN */ - -/* Define to 1 if your compiler supports __attribute__((pure)) on functions */ -/* #undef HAVE_FUNC_ATTRIBUTE_PURE */ - -/* Define to 1 if your compiler supports __attribute__((returns_nonnull)) on - functions */ -/* #undef HAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL */ - -/* Define to 1 if your compiler supports __attribute__((sentinel)) on - functions */ -/* #undef HAVE_FUNC_ATTRIBUTE_SENTINEL */ - -/* Define to 1 if your compiler supports __attribute__((unused)) on functions - */ -/* #undef HAVE_FUNC_ATTRIBUTE_UNUSED */ - -/* Define to 1 if your compiler supports __attribute__((alloc_size)) on - function pointers */ -/* #undef HAVE_FUNC_PTR_ATTRIBUTE1_ALLOC_SIZE */ - -/* Define to 1 if your compiler supports __attribute__((alloc_size)) on - function pointers */ -/* #undef HAVE_FUNC_PTR_ATTRIBUTE2_ALLOC_SIZE */ - -/* Define to 1 if your compiler supports __attribute__((format)) on function - pointers */ -/* #undef HAVE_FUNC_PTR_ATTRIBUTE3_FORMAT */ - -/* Define to 1 if your compiler supports __attribute__((cold)) on function - pointers */ -/* #undef HAVE_FUNC_PTR_ATTRIBUTE_COLD */ - -/* Define to 1 if your compiler supports __attribute__((const)) on function - pointers */ -/* #undef HAVE_FUNC_PTR_ATTRIBUTE_CONST */ - -/* Define to 1 if your compiler supports __attribute__((malloc)) on function - pointers */ -/* #undef HAVE_FUNC_PTR_ATTRIBUTE_MALLOC */ - -/* Define to 1 if your compiler supports __attribute__((noreturn)) on function - pointers */ -/* #undef HAVE_FUNC_PTR_ATTRIBUTE_NORETURN */ - -/* Define to 1 if your compiler supports __attribute__((pure)) on function - pointers */ -/* #undef HAVE_FUNC_PTR_ATTRIBUTE_PURE */ - -/* Define to 1 if your compiler supports __attribute__((returns_nonnull)) on - function pointers */ -/* #undef HAVE_FUNC_PTR_ATTRIBUTE_RETURNS_NONNULL */ - -/* Define to 1 if your compiler supports __attribute__((sentinel)) on function - pointers */ -/* #undef HAVE_FUNC_PTR_ATTRIBUTE_SENTINEL */ - -/* Define to 1 if your compiler supports __attribute__((unused)) on function - pointers */ -/* #undef HAVE_FUNC_PTR_ATTRIBUTE_UNUSED */ - -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - -/* Define to 1 if you have the `getrlimit' function. */ -/* #undef HAVE_GETRLIMIT */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define to 1 if you have the `htole16' intrinsic function. */ -/* #undef HAVE_HTOLE16 */ - -/* Define to 1 if you have the `htole32' intrinsic function. */ -/* #undef HAVE_HTOLE32 */ - -/* Define to 1 if you have the `htole64' intrinsic function. */ -/* #undef HAVE_HTOLE64 */ - -/* Define to 1 if you have the <intrin.h> header file. */ -/* #undef HAVE_INTRIN_H */ - -/* Define to 1 if you have the <inttypes.h> header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Define to 1 if you have the <io.h> header file. */ -/* #undef HAVE_IO_H */ - -/* Define to 1 if you have the `isascii' function. */ -/* #undef HAVE_ISASCII */ - -/* Define to 1 if you have the `iscntrl' function. */ -/* #undef HAVE_ISCNTRL */ - -/* Define to 1 if you have the <machine/endian.h> header file. */ -/* #undef HAVE_MACHINE_ENDIAN_H */ - -/* Define to 1 if you have the <memory.h> header file. */ -/* #undef HAVE_MEMORY_H */ - -/* Define to 1 if you have the `mempcpy' function. */ -/* #undef HAVE_MEMPCPY */ - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `pathconf' function. */ -/* #undef HAVE_PATHCONF */ - -/* Define to 1 if you have the `realpath' function. */ -/* #undef HAVE_REALPATH */ - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define to 1 if you have the `stat' function. */ -/* #undef HAVE_STAT */ - -/* Define to 1 if stdbool.h conforms to C99. */ -/* #undef HAVE_STDBOOL_H */ - -/* Define to 1 if your compiler supports C99 extern inline */ -/* #undef HAVE_STDC_INLINE */ - -/* Define to 1 if you have the <stdint.h> header file. */ -/* #undef HAVE_STDINT_H */ - -/* Define to 1 if you have the <stdlib.h> header file. */ -/* #undef HAVE_STDLIB_H */ - -/* Define to 1 if you have the <stdnoreturn.h> header file. */ -/* #undef HAVE_STDNORETURN_H */ - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `stricmp' function. */ -/* #undef HAVE_STRICMP */ - -/* Define to 1 if you have the <strings.h> header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the <string.h> header file. */ -/* #undef HAVE_STRING_H */ - -/* Define to 1 if you have the `strlcpy' function. */ -/* #undef HAVE_STRLCPY */ - -/* Define to 1 if you have the `strncasecmp' function. */ -/* #undef HAVE_STRNCASECMP */ - -/* Define to 1 if you have the `strnicmp' function. */ -/* #undef HAVE_STRNICMP */ - -/* Define to 1 if you have the `strnlen' function. */ -/* #undef HAVE_STRNLEN */ - -/* Define to 1 if you have the `strrchrnul' function. */ -/* #undef HAVE_STRRCHRNUL */ - -/* Define to 1 if you have the `strsep' function. */ -/* #undef HAVE_STRSEP */ - -/* Define to 1 if the system has the type `struct stat'. */ -/* #undef HAVE_STRUCT_STAT */ - -/* Define to 1 if the system has the type `struct _stati64'. */ -/* #undef HAVE_STRUCT__STATI64 */ - -/* Define to 1 if you have the `sysconf' function. */ -/* #undef HAVE_SYSCONF */ - -/* Define to 1 if you have the <sys/endian.h> header file. */ -/* #undef HAVE_SYS_ENDIAN_H */ - -/* Define to 1 if you have the <sys/mman.h> header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define to 1 if you have the <sys/param.h> header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the <sys/resource.h> header file. */ -/* #undef HAVE_SYS_RESOURCE_H */ - -/* Define to 1 if you have the <sys/stat.h> header file. */ -/* #undef HAVE_SYS_STAT_H */ - -/* Define to 1 if you have the <sys/types.h> header file. */ -/* #undef HAVE_SYS_TYPES_H */ - -/* Define to 1 if you have the `S_ISREG' function. */ -/* #undef HAVE_S_ISREG */ - -/* Define to 1 if the system has the type `uintptr_t'. */ -/* #undef HAVE_UINTPTR_T */ - -/* Define to 1 if you have the <unistd.h> header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if you have the `vsnprintf' function. */ -/* #undef HAVE_VSNPRINTF */ - -/* Define to 1 if you have the `_access' function. */ -/* #undef HAVE__ACCESS */ - -/* Define to 1 if you have the `_BitScanReverse' intrinsic function. */ -/* #undef HAVE__BITSCANREVERSE */ - -/* Define to 1 if you have the `_BitScanReverse64' intrinsic function. */ -/* #undef HAVE__BITSCANREVERSE64 */ - -/* Define to 1 if the system has the type `_Bool'. */ -/* #undef HAVE__BOOL */ - -/* Define to 1 if you have the `_byteswap_uint64' intrinsic function. */ -/* #undef HAVE__BYTESWAP_UINT64 */ - -/* Define to 1 if you have the `_byteswap_ulong' intrinsic function. */ -/* #undef HAVE__BYTESWAP_ULONG */ - -/* Define to 1 if you have the `_byteswap_ushort' intrinsic function. */ -/* #undef HAVE__BYTESWAP_USHORT */ - -/* Define to 1 if you have the `_chsize' function. */ -/* #undef HAVE__CHSIZE */ - -/* Define to 1 if you have the `_chsize_s' function. */ -/* #undef HAVE__CHSIZE_S */ - -/* Define to 1 if you have the `_fileno' function. */ -/* #undef HAVE__FILENO */ - -/* Define to 1 if you have the `_fseeki64' function. */ -/* #undef HAVE__FSEEKI64 */ - -/* Define to 1 if you have the `_fstati64' function. */ -/* #undef HAVE__FSTATI64 */ - -/* Define to 1 if you have the `_fullpath' function. */ -/* #undef HAVE__FULLPATH */ - -/* Define to 1 if you have the `_snprintf' function. */ -/* #undef HAVE__SNPRINTF */ - -/* Define to 1 if you have the `_stati64' function. */ -/* #undef HAVE__STATI64 */ - -/* Define to 1 if you have the `_vsnprintf' function. */ -/* #undef HAVE__VSNPRINTF */ - -/* Define to 1 if you have the `__bswap_16' intrinsic function. */ -/* #undef HAVE___BSWAP_16 */ - -/* Define to 1 if you have the `__bswap_32' intrinsic function. */ -/* #undef HAVE___BSWAP_32 */ - -/* Define to 1 if you have the `__bswap_64' intrinsic function. */ -/* #undef HAVE___BSWAP_64 */ - -/* Define to 1 if you have the `__builtin_bswap16' intrinsic function. */ -/* #undef HAVE___BUILTIN_BSWAP16 */ - -/* Define to 1 if you have the `__builtin_bswap32' intrinsic function. */ -/* #undef HAVE___BUILTIN_BSWAP32 */ - -/* Define to 1 if you have the `__builtin_bswap64' intrinsic function. */ -/* #undef HAVE___BUILTIN_BSWAP64 */ - -/* Define to 1 if you have the `__builtin_choose_expr' intrinsic function. */ -/* #undef HAVE___BUILTIN_CHOOSE_EXPR */ - -/* Define to 1 if you have the `__builtin_clz' intrinsic function. */ -/* #undef HAVE___BUILTIN_CLZ */ - -/* Define to 1 if you have the `__builtin_clzl' intrinsic function. */ -/* #undef HAVE___BUILTIN_CLZL */ - -/* Define to 1 if you have the `__builtin_clzll' intrinsic function. */ -/* #undef HAVE___BUILTIN_CLZLL */ - -/* Define to 1 if you have the `__builtin_constant_p' intrinsic function. */ -/* #undef HAVE___BUILTIN_CONSTANT_P */ - -/* Define to 1 if you have the `__builtin_expect' intrinsic function. */ -/* #undef HAVE___BUILTIN_EXPECT */ - -/* Define to 1 if you have the `__cpu_to_le16' intrinsic function. */ -/* #undef HAVE___CPU_TO_LE16 */ - -/* Define to 1 if you have the `__cpu_to_le32' intrinsic function. */ -/* #undef HAVE___CPU_TO_LE32 */ - -/* Define to 1 if you have the `__cpu_to_le64' intrinsic function. */ -/* #undef HAVE___CPU_TO_LE64 */ - -/* Define to 1 if compiled with the `-Wl,--gc-sections' compiler flag */ -/* #undef LDFLAGS_WL_GC_SECTIONS */ - -/* Define to the address where bug reports for this package should be sent. */ -/* #undef PACKAGE_BUGREPORT */ - -/* Define to the full name of this package. */ -/* #undef PACKAGE_NAME */ - -/* Define to the full name and version of this package. */ -/* #undef PACKAGE_STRING */ - -/* Define to the one symbol short name of this package. */ -/* #undef PACKAGE_TARNAME */ - -/* Define to the home page for this package. */ -/* #undef PACKAGE_URL */ - -/* Define to the version of this package. */ -/* #undef PACKAGE_VERSION */ - -/* Define to 1 if you have the ANSI C header files. */ -/* #undef STDC_HEADERS */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -/* # undef _ALL_SOURCE */ -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -/* # undef _GNU_SOURCE */ -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -/* # undef _POSIX_PTHREAD_SEMANTICS */ -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -/* # undef _TANDEM_SOURCE */ -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -/* # undef __EXTENSIONS__ */ -#endif - - -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* Define to 1 if your processor stores words with the least significant byte - first (like Intel and VAX, unlike Motorola and SPARC). */ -/* #undef WORDS_LITTLEENDIAN */ - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -/* #undef _LARGEFILE_SOURCE */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -/* #undef restrict */ -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to `unsigned int' if <sys/types.h> does not define. */ -/* #undef size_t */ - -/* Define to the type of an unsigned integer type wide enough to hold a - pointer, if such a type exists, and if the system does not define it. */ -/* #undef uintptr_t */ - -#ifndef noreturn_func -# ifdef HAVE_FUNC_ATTRIBUTE_NORETURN -# define noreturn_func __attribute__((noreturn)) -# else -# define noreturn_func -# endif -#endif - -#ifndef alloc_size_func2_ptr -# ifdef HAVE_FUNC_PTR_ATTRIBUTE2_ALLOC_SIZE -# define alloc_size_func2_ptr(x1,x2) __attribute__((alloc_size(x1,x2))) -# else -# define alloc_size_func2_ptr(x1,x2) -# endif -#endif - -#ifndef end_with_null -# ifdef HAVE_FUNC_ATTRIBUTE_SENTINEL -# define end_with_null __attribute__((sentinel)) -# else -# define end_with_null -# endif -#endif - -#ifndef end_with_null_ptr -# ifdef HAVE_FUNC_PTR_ATTRIBUTE_SENTINEL -# define end_with_null_ptr __attribute__((sentinel)) -# else -# define end_with_null_ptr -# endif -#endif - -#ifndef format_func3 -# ifdef HAVE_FUNC_ATTRIBUTE3_FORMAT -# define format_func3(x1,x2,x3) __attribute__((format(x1,x2,x3))) -# else -# define format_func3(x1,x2,x3) -# endif -#endif - -#ifndef format_func3_ptr -# ifdef HAVE_FUNC_PTR_ATTRIBUTE3_FORMAT -# define format_func3_ptr(x1,x2,x3) __attribute__((format(x1,x2,x3))) -# else -# define format_func3_ptr(x1,x2,x3) -# endif -#endif - -#ifndef const_func -# ifdef HAVE_FUNC_ATTRIBUTE_CONST -# define const_func __attribute__((const)) -# else -# define const_func -# endif -#endif - -#ifndef const_func_ptr -# ifdef HAVE_FUNC_PTR_ATTRIBUTE_CONST -# define const_func_ptr __attribute__((const)) -# else -# define const_func_ptr -# endif -#endif - -#ifndef pure_func -# ifdef HAVE_FUNC_ATTRIBUTE_PURE -# define pure_func __attribute__((pure)) -# else -# define pure_func -# endif -#endif - -#ifndef pure_func_ptr -# ifdef HAVE_FUNC_PTR_ATTRIBUTE_PURE -# define pure_func_ptr __attribute__((pure)) -# else -# define pure_func_ptr -# endif -#endif - -#ifndef unlikely_func -# ifdef HAVE_FUNC_ATTRIBUTE_COLD -# define unlikely_func __attribute__((cold)) -# else -# define unlikely_func -# endif -#endif - -#ifndef noreturn_func_ptr -# ifdef HAVE_FUNC_PTR_ATTRIBUTE_NORETURN -# define noreturn_func_ptr __attribute__((noreturn)) -# else -# define noreturn_func_ptr -# endif -#endif - -#ifndef unlikely_func_ptr -# ifdef HAVE_FUNC_PTR_ATTRIBUTE_COLD -# define unlikely_func_ptr __attribute__((cold)) -# else -# define unlikely_func_ptr -# endif -#endif - -#ifndef unused_func -# ifdef HAVE_FUNC_ATTRIBUTE_UNUSED -# define unused_func __attribute__((unused)) -# else -# define unused_func -# endif -#endif - -#ifndef unused_func_ptr -# ifdef HAVE_FUNC_PTR_ATTRIBUTE_UNUSED -# define unused_func_ptr __attribute__((unused)) -# else -# define unused_func_ptr -# endif -#endif - -#ifndef never_null -# ifdef HAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -# define never_null __attribute__((returns_nonnull)) -# else -# define never_null -# endif -#endif - -#ifndef never_null_ptr -# ifdef HAVE_FUNC_PTR_ATTRIBUTE_RETURNS_NONNULL -# define never_null_ptr __attribute__((returns_nonnull)) -# else -# define never_null_ptr -# endif -#endif - -#ifndef malloc_func -# ifdef HAVE_FUNC_ATTRIBUTE_MALLOC -# define malloc_func __attribute__((malloc)) -# else -# define malloc_func -# endif -#endif - -#ifndef malloc_func_ptr -# ifdef HAVE_FUNC_PTR_ATTRIBUTE_MALLOC -# define malloc_func_ptr __attribute__((malloc)) -# else -# define malloc_func_ptr -# endif -#endif - -#ifndef alloc_size_func1 -# ifdef HAVE_FUNC_ATTRIBUTE1_ALLOC_SIZE -# define alloc_size_func1(x1) __attribute__((alloc_size(x1))) -# else -# define alloc_size_func1(x1) -# endif -#endif - -#ifndef alloc_size_func1_ptr -# ifdef HAVE_FUNC_PTR_ATTRIBUTE1_ALLOC_SIZE -# define alloc_size_func1_ptr(x1) __attribute__((alloc_size(x1))) -# else -# define alloc_size_func1_ptr(x1) -# endif -#endif - -#ifndef alloc_size_func2 -# ifdef HAVE_FUNC_ATTRIBUTE2_ALLOC_SIZE -# define alloc_size_func2(x1,x2) __attribute__((alloc_size(x1,x2))) -# else -# define alloc_size_func2(x1,x2) -# endif -#endif diff --git a/configure.ac b/configure.ac index 1e69c4d1..a6ee5d3f 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,11 @@ AC_CONFIG_HEADERS([config/config.h]) AC_PREFIX_PROGRAM(nasm) AC_CONFIG_AUX_DIR(autoconf/helpers) +dnl Mark where in config.h.in macros auto-generated by the configuration +dnl start; this is used to generate config/unconfig.h. +AH_BOTTOM([ +/* Begin unconfig.h */]) + dnl Save initial CFLAGS, to see if -g -O2 came from configure or not pa_init_cflags="$CFLAGS" diff --git a/tools/unconfig.pl b/tools/unconfig.pl new file mode 100755 index 00000000..352070a0 --- /dev/null +++ b/tools/unconfig.pl @@ -0,0 +1,35 @@ +#!/usr/bin/perl + +# +# Generate config/unconfig.h from config/config.h.in +# + +use strict; +use File::Spec; + +my($srcdir,$infile,$outfile) = @ARGV; + +my $in; +if (!open($in, '<', $infile)) { + open($in, '<', File::Spec->catfile($srcdir, $infile)) or + die "$0: $infile not found\n"; +} + +open(my $out, '>', $outfile) or + die "$0: $outfile: $!\n"; + +print $out "/* config/unconfig.h: autogenerated by tools/unconfig.pl */\n\n"; +print $out "#ifndef CONFIG_UNCONFIG_H\n"; +print $out "#define CONFIG_UNCONFIG_H\n"; + +my $o = 0; +while (defined(my $l = <$in>)) { + print $out $l if ($o); + $o |= ($l =~ m:/\*.*unconfig\.h.*\*/:); +} + +close($in); + +print $out "\n#endif /* CONFIG_UNCONFIG_H */\n"; + +close($out); |