From 5fbb1f8fccd7226d7cd83442570856fcc9a7bf8e Mon Sep 17 00:00:00 2001 From: John Criswell Date: Fri, 24 Sep 2004 13:28:51 +0000 Subject: [PATCH] Configure Datatypes.h.in with AC_CONFIG_HEADERS. This should prevent it from being re-generated if the new version is identical to the old version. Hence, it should save us some recompiling after re-configures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16506 91177308-0d34-0410-b5e6-96231b3b80d8 --- autoconf/configure.ac | 18 ++---- configure | 86 +++++++++++------------------ include/llvm/Support/DataTypes.h.in | 18 +++++- 3 files changed, 52 insertions(+), 70 deletions(-) diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 0645baadaa5..f9772ad27a9 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -43,11 +43,11 @@ AC_CONFIG_HEADERS(include/llvm/Config/config.h) dnl Configure other output file AC_CONFIG_FILES(Makefile.config - include/llvm/Support/DataTypes.h include/llvm/Support/ThreadSupport.h include/llvm/ADT/hash_map include/llvm/ADT/hash_set include/llvm/ADT/iterator) +AC_CONFIG_HEADERS([include/llvm/Support/DataTypes.h]) dnl Do special configuration of Makefiles AC_CONFIG_MAKEFILE(Makefile) @@ -270,19 +270,9 @@ AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h malloc.h sys/mman.h sys/re dnl Check for things that need to be included in public headers, and so dnl for which we may not have access to a HAVE_* preprocessor #define. dnl (primarily used in DataTypes.h) -AC_CHECK_HEADER([sys/types.h], - [INCLUDE_SYS_TYPES_H='#include '], - [INCLUDE_SYS_TYPES_H='']) -AC_SUBST(INCLUDE_SYS_TYPES_H) -AC_CHECK_HEADER([inttypes.h], - [INCLUDE_INTTYPES_H='#include '], - [INCLUDE_INTTYPES_H='']) -AC_SUBST(INCLUDE_INTTYPES_H) -AC_CHECK_HEADER([stdint.h], - [INCLUDE_STDINT_H='#include '], - [INCLUDE_STDINT_H='']) -AC_SUBST(INCLUDE_STDINT_H) - +AC_CHECK_HEADER([sys/types.h]) +AC_CHECK_HEADER([inttypes.h]) +AC_CHECK_HEADER([stdint.h]) dnl Check for types AC_TYPE_PID_T diff --git a/configure b/configure index 384cc52d222..ad2af4f8073 100755 --- a/configure +++ b/configure @@ -473,7 +473,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS subdirs INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVMGCCDIR ARCH CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC CPP ifGNUmake LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL DOT ETAGS ETAGSFLAGS PYTHON QMTEST HAVE_PTHREAD_MUTEX_LOCK INCLUDE_SYS_TYPES_H INCLUDE_INTTYPES_H INCLUDE_STDINT_H ENDIAN HAVE_STD_EXT_HASH_MAP HAVE_GNU_EXT_HASH_MAP HAVE_GLOBAL_HASH_MAP HAVE_STD_EXT_HASH_SET HAVE_GNU_EXT_HASH_SET HAVE_GLOBAL_HASH_SET HAVE_STD_ITERATOR HAVE_BI_ITERATOR HAVE_FWD_ITERATOR ALLOCA MMAP_FILE ENABLE_OPTIMIZED JIT LLVMCC1 LLVMCC1PLUS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS subdirs INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVMGCCDIR ARCH CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC CPP ifGNUmake LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL DOT ETAGS ETAGSFLAGS PYTHON QMTEST HAVE_PTHREAD_MUTEX_LOCK ENDIAN HAVE_STD_EXT_HASH_MAP HAVE_GNU_EXT_HASH_MAP HAVE_GLOBAL_HASH_MAP HAVE_STD_EXT_HASH_SET HAVE_GNU_EXT_HASH_SET HAVE_GLOBAL_HASH_SET HAVE_STD_ITERATOR HAVE_BI_ITERATOR HAVE_FWD_ITERATOR ALLOCA MMAP_FILE ENABLE_OPTIMIZED JIT LLVMCC1 LLVMCC1PLUS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1598,7 +1598,9 @@ done ac_config_headers="$ac_config_headers include/llvm/Config/config.h" - ac_config_files="$ac_config_files Makefile.config include/llvm/Support/DataTypes.h include/llvm/Support/ThreadSupport.h include/llvm/ADT/hash_map include/llvm/ADT/hash_set include/llvm/ADT/iterator" + ac_config_files="$ac_config_files Makefile.config include/llvm/Support/ThreadSupport.h include/llvm/ADT/hash_map include/llvm/ADT/hash_set include/llvm/ADT/iterator" + + ac_config_headers="$ac_config_headers include/llvm/Support/DataTypes.h" ac_config_commands="$ac_config_commands Makefile" @@ -4170,7 +4172,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4173 "configure"' > conftest.$ac_ext + echo '#line 4175 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5051,7 +5053,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5054:" \ +echo "$as_me:5056:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6108,11 +6110,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6111: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6113: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6115: \$? = $ac_status" >&5 + echo "$as_me:6117: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6351,11 +6353,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6354: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6356: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6358: \$? = $ac_status" >&5 + echo "$as_me:6360: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6411,11 +6413,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6414: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6416: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6418: \$? = $ac_status" >&5 + echo "$as_me:6420: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8588,7 +8590,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:10877: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10879: \$? = $ac_status" >&5 + echo "$as_me:10881: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10932,11 +10934,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10935: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10937: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10939: \$? = $ac_status" >&5 + echo "$as_me:10941: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12293,7 +12295,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13233: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13235: \$? = $ac_status" >&5 + echo "$as_me:13237: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13288,11 +13290,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13291: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13293: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13295: \$? = $ac_status" >&5 + echo "$as_me:13297: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15319,11 +15321,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15322: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15324: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15326: \$? = $ac_status" >&5 + echo "$as_me:15328: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15562,11 +15564,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15565: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15567: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15569: \$? = $ac_status" >&5 + echo "$as_me:15571: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15622,11 +15624,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15625: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15627: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15629: \$? = $ac_status" >&5 + echo "$as_me:15631: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17799,7 +17801,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 echo "${ECHO_T}$ac_cv_header_sys_types_h" >&6 fi -if test $ac_cv_header_sys_types_h = yes; then - INCLUDE_SYS_TYPES_H='#include ' -else - INCLUDE_SYS_TYPES_H='' -fi - if test "${ac_cv_header_inttypes_h+set}" = set; then @@ -20265,12 +20261,6 @@ echo "$as_me:$LINENO: result: $ac_cv_header_inttypes_h" >&5 echo "${ECHO_T}$ac_cv_header_inttypes_h" >&6 fi -if test $ac_cv_header_inttypes_h = yes; then - INCLUDE_INTTYPES_H='#include ' -else - INCLUDE_INTTYPES_H='' -fi - if test "${ac_cv_header_stdint_h+set}" = set; then @@ -20410,13 +20400,6 @@ echo "$as_me:$LINENO: result: $ac_cv_header_stdint_h" >&5 echo "${ECHO_T}$ac_cv_header_stdint_h" >&6 fi -if test $ac_cv_header_stdint_h = yes; then - INCLUDE_STDINT_H='#include ' -else - INCLUDE_STDINT_H='' -fi - - @@ -24455,7 +24438,6 @@ do case "$ac_config_target" in # Handling of arguments. "Makefile.config" ) CONFIG_FILES="$CONFIG_FILES Makefile.config" ;; - "include/llvm/Support/DataTypes.h" ) CONFIG_FILES="$CONFIG_FILES include/llvm/Support/DataTypes.h" ;; "include/llvm/Support/ThreadSupport.h" ) CONFIG_FILES="$CONFIG_FILES include/llvm/Support/ThreadSupport.h" ;; "include/llvm/ADT/hash_map" ) CONFIG_FILES="$CONFIG_FILES include/llvm/ADT/hash_map" ;; "include/llvm/ADT/hash_set" ) CONFIG_FILES="$CONFIG_FILES include/llvm/ADT/hash_set" ;; @@ -24474,6 +24456,7 @@ do "utils/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS utils/Makefile" ;; "projects/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS projects/Makefile" ;; "include/llvm/Config/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Config/config.h" ;; + "include/llvm/Support/DataTypes.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Support/DataTypes.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; @@ -24617,9 +24600,6 @@ s,@ETAGSFLAGS@,$ETAGSFLAGS,;t t s,@PYTHON@,$PYTHON,;t t s,@QMTEST@,$QMTEST,;t t s,@HAVE_PTHREAD_MUTEX_LOCK@,$HAVE_PTHREAD_MUTEX_LOCK,;t t -s,@INCLUDE_SYS_TYPES_H@,$INCLUDE_SYS_TYPES_H,;t t -s,@INCLUDE_INTTYPES_H@,$INCLUDE_INTTYPES_H,;t t -s,@INCLUDE_STDINT_H@,$INCLUDE_STDINT_H,;t t s,@ENDIAN@,$ENDIAN,;t t s,@HAVE_STD_EXT_HASH_MAP@,$HAVE_STD_EXT_HASH_MAP,;t t s,@HAVE_GNU_EXT_HASH_MAP@,$HAVE_GNU_EXT_HASH_MAP,;t t diff --git a/include/llvm/Support/DataTypes.h.in b/include/llvm/Support/DataTypes.h.in index 6b3aee8ce62..ca02a01571c 100644 --- a/include/llvm/Support/DataTypes.h.in +++ b/include/llvm/Support/DataTypes.h.in @@ -31,11 +31,23 @@ # error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h" #endif +#undef HAVE_SYS_TYPES_H +#undef HAVE_INTTYPES_H +#undef HAVE_STDINT_H + #ifndef _MSC_VER // Note that includes , if this is a C99 system. -@INCLUDE_INTTYPES_H@ -@INCLUDE_SYS_TYPES_H@ -@INCLUDE_STDINT_H@ +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +#ifdef HAVE_INTTYPES_H +#include +#endif + +#ifdef HAVE_STDINT_H +#include +#endif // Handle incorrect definition of uint64_t as u_int64_t #ifndef HAVE_UINT64_T -- 2.34.1