diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2008-05-11 14:17:21 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2008-05-11 14:17:21 +0300 |
commit | b09464bf9ae694afc2d1dc26188ac4e2e8af0a63 (patch) | |
tree | 470a82b25ee3515f1d3b98af99424c0fecfc3422 /configure.ac | |
parent | Bunch of grammar fixes from meyering. (diff) | |
download | xz-b09464bf9ae694afc2d1dc26188ac4e2e8af0a63.tar.xz |
Improved C99 compiler detection in configure.ac. It will
pass -std=gnu99 instead of -std=c99 to GCC now, but -pedantic
should still give warnings about GNU extensions like before
except with some special keywords like asm().
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 8e531d67..3d2abfa6 100644 --- a/configure.ac +++ b/configure.ac @@ -350,12 +350,14 @@ AM_CONDITIONAL(COND_SMALL, test "x$enable_small" = xyes) echo echo "Initializing Automake:" -# There's no C++ or Fortran in LZMA Utils: -CXX=no -F77=no - AM_INIT_AUTOMAKE([1.10 foreign tar-v7 filename-length-max=99]) AC_PROG_LN_S + +AC_PROG_CC_C99 +if test x$ac_cv_prog_cc_c99 = xno ; then + AC_MSG_ERROR([No C99 compiler was found.]) +fi + AM_PROG_CC_C_O AM_PROG_AS AC_USE_SYSTEM_EXTENSIONS @@ -367,6 +369,8 @@ CC="$PTHREAD_CC" echo echo "Initializing Libtool:" +CXX=no +F77=no AC_PROG_LIBTOOL @@ -405,8 +409,9 @@ AC_CHECK_HEADERS([assert.h errno.h byteswap.h sys/param.h sys/sysctl.h], # Checks for typedefs, structures, and compiler characteristics. ############################################################################### -AC_C_INLINE -AC_C_RESTRICT +dnl We don't need these as long as we need a C99 compiler anyway. +dnl AC_C_INLINE +dnl AC_C_RESTRICT AC_HEADER_STDBOOL @@ -426,11 +431,7 @@ AC_CHECK_SIZEOF([size_t]) AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec, struct stat.st_mtim.tv_nsec, struct stat.st_atimespec.tv_nsec, struct stat.st_mtimespec.tv_nsec]) -# It is very unlikely that you want to build liblzma without -# large file support. AC_SYS_LARGEFILE - -# At the moment, the only endian-dependent part should be the integrity checks. AC_C_BIGENDIAN @@ -590,8 +591,7 @@ if test "x$GCC" = xyes ; then -Wformat=2 \ -Wextra \ -Wall \ - -pedantic \ - -std=c99 + -pedantic do AC_MSG_CHECKING([if $CC accepts $NEW_FLAG]) OLD_CFLAGS="$CFLAGS" |