Wed, 06 Nov 2019 20:34:54 +0100
fix: configure.ac
configure.ac | file | annotate | diff | comparison | revisions |
1.1 --- a/configure.ac Wed Nov 06 16:27:54 2019 +0100 1.2 +++ b/configure.ac Wed Nov 06 20:34:54 2019 +0100 1.3 @@ -28,6 +28,7 @@ 1.4 1.5 # the package version must match the macros in ucx.h 1.6 # the lib version must follow the libtool versioning convention 1.7 +AC_PREREQ([2.60]) 1.8 AC_INIT([ucx], [2.1.0], [olaf.wintermann@gmail.com]) 1.9 AC_SUBST([UCX_LIB_VERSION], [4:0:1]) 1.10 1.11 @@ -44,20 +45,17 @@ 1.12 # we are compiling a library 1.13 LT_INIT 1.14 1.15 -# we are dealing with C source code 1.16 -AC_PROG_CC 1.17 +# we want c11, and may fall back to c99 1.18 +AX_CHECK_COMPILE_FLAG([-std=c11], 1.19 + [AX_APPEND_FLAG([-std=c11])], 1.20 + AC_PROG_CC_C99 1.21 +) 1.22 1.23 # we want to support automake < 1.14, so we need this deprecated macro 1.24 # it tests, whether the compiler allows -c and -o simultaneously 1.25 # in modern versions of autoconf, this is done by AC_PROG_CC 1.26 AM_PROG_CC_C_O 1.27 1.28 -# we want c11, and may fall back to c99 1.29 -AX_CHECK_COMPILE_FLAG([-std=c11], 1.30 - [AX_APPEND_FLAG([-std=c11])], 1.31 - [AC_PROG_CC_C99] 1.32 -) 1.33 - 1.34 # where to place config macros 1.35 AC_CONFIG_HEADERS([config.h]) 1.36