diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/dpkg-arch.m4 | 4 | ||||
-rw-r--r-- | m4/dpkg-compiler.m4 | 25 | ||||
-rw-r--r-- | m4/dpkg-funcs.m4 | 2 | ||||
-rw-r--r-- | m4/dpkg-libs.m4 | 4 | ||||
-rw-r--r-- | m4/dpkg-progs.m4 | 2 |
5 files changed, 20 insertions, 17 deletions
diff --git a/m4/dpkg-arch.m4 b/m4/dpkg-arch.m4 index 1b240a4..8859289 100644 --- a/m4/dpkg-arch.m4 +++ b/m4/dpkg-arch.m4 @@ -3,7 +3,7 @@ # Copyright © 2006-2023 Guillem Jover <guillem@debian.org> # _DPKG_ARCHITECTURE([DEB_VAR], [sh_var]) -# --------------------------------------- +# ------------------ # Use dpkg-architecture from the source tree to set sh_var using DEB_VAR for # the target architecture, to avoid duplicating its logic. AC_DEFUN([_DPKG_ARCHITECTURE], [ @@ -49,7 +49,7 @@ AC_DEFUN([DPKG_OS_TYPE], [ ])# DPKG_OS_TYPE # DPKG_ARCHITECTURE -# ------------------------ +# ----------------- # Determine the Debian name for the host operating system, # sets ARCHITECTURE. AC_DEFUN([DPKG_ARCHITECTURE], [ diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4 index 756af26..cb1063d 100644 --- a/m4/dpkg-compiler.m4 +++ b/m4/dpkg-compiler.m4 @@ -211,7 +211,7 @@ AC_DEFUN([DPKG_COMPILER_OPTIMIZATIONS], [ ]) # DPKG_TRY_C99([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# ------------------------------------------------------ +# ------------ # Try compiling some C99 code to see whether it works AC_DEFUN([DPKG_TRY_C99], [ AC_COMPILE_IFELSE([ @@ -253,6 +253,10 @@ AC_DEFUN([DPKG_TRY_C99], [ /* Magic __func__ variable. */ printf("%s", __func__); + +#if __STDC_VERSION__ < 199901L +#error "Requires C99" +#endif ]]) ], [$1], [$2])dnl ])# DPKG_TRY_C99 @@ -261,11 +265,11 @@ AC_DEFUN([DPKG_TRY_C99], [ # ---------- # Check whether the compiler can do C99 AC_DEFUN([DPKG_C_C99], [ - AC_CACHE_CHECK([whether $CC supports C99 features], [dpkg_cv_c99], [ + AC_CACHE_CHECK([whether $CC supports C99], [dpkg_cv_c99], [ DPKG_TRY_C99([dpkg_cv_c99=yes], [dpkg_cv_c99=no]) ]) AS_IF([test "x$dpkg_cv_c99" != "xyes"], [ - AC_CACHE_CHECK([for $CC option to accept C99 features], [dpkg_cv_c99_arg], [ + AC_CACHE_CHECK([for $CC option to accept C99], [dpkg_cv_c99_arg], [ dpkg_cv_c99_arg=none dpkg_save_CC="$CC" for arg in "-std=gnu99" "-std=c99" "-c99" "-AC99" "-xc99=all" \ @@ -282,13 +286,11 @@ AC_DEFUN([DPKG_C_C99], [ ]) AS_IF([test "x$dpkg_cv_c99_arg" != "xnone"], [ CC="$CC $dpkg_cv_c99_arg" - dpkg_cv_c99=1 + dpkg_cv_c99=yes ]) ]) - AS_IF([test "x$dpkg_cv_c99" = "xyes"], [ - AC_DEFINE([HAVE_C99], 1, [Define to 1 if the compiler supports C99.]) - ], [ - AC_MSG_ERROR([unsupported required C99 extensions]) + AS_IF([test "x$dpkg_cv_c99" != "xyes"], [ + AC_MSG_ERROR([unsupported required C99]) ]) ])# DPKG_C_C99 @@ -302,6 +304,10 @@ AC_DEFUN([DPKG_TRY_CXX11], [ ]], [[ // Null pointer keyword. void *ptr = nullptr; + +#if __cplusplus < 201103L +#error "Requires C++11" +#endif ]]) ], [$1], [$2]) AC_LANG_POP([C++])dnl @@ -333,7 +339,4 @@ AC_DEFUN([DPKG_CXX_CXX11], [ dpkg_cv_cxx11=yes ]) ]) - AS_IF([test "x$dpkg_cv_cxx11" = "xyes"], [ - AC_DEFINE([HAVE_CXX11], 1, [Define to 1 if the compiler supports C++11.]) - ])[]dnl ])# DPKG_CXX_CXX11 diff --git a/m4/dpkg-funcs.m4 b/m4/dpkg-funcs.m4 index c480c10..22002b5 100644 --- a/m4/dpkg-funcs.m4 +++ b/m4/dpkg-funcs.m4 @@ -77,7 +77,7 @@ AC_DEFUN([DPKG_FUNC_FSYNC_DIR], [ ]) # DPKG_FUNC_C99_SNPRINTF -# ----------------------- +# ---------------------- # Define HAVE_C99_SNPRINTF if we have C99 snprintf family semantics AC_DEFUN([DPKG_FUNC_C99_SNPRINTF], [ AC_CACHE_CHECK([for C99 snprintf functions], [dpkg_cv_c99_snprintf], [ diff --git a/m4/dpkg-libs.m4 b/m4/dpkg-libs.m4 index 9ef5263..21858a8 100644 --- a/m4/dpkg-libs.m4 +++ b/m4/dpkg-libs.m4 @@ -26,7 +26,7 @@ AC_DEFUN([DPKG_LIB_MD], [ ])# DPKG_LIB_MD # DPKG_WITH_COMPRESS_LIB(NAME, HEADER, FUNC) -# ------------------------------------------------- +# ---------------------- # Check for availability of a compression library. AC_DEFUN([DPKG_WITH_COMPRESS_LIB], [ AC_ARG_VAR(AS_TR_CPP([$1_LIBS]), [linker flags for $1 library]) @@ -109,7 +109,7 @@ AC_DEFUN([DPKG_LIB_LZMA], [ ])# DPKG_LIB_LZMA # DPKG_LIB_ZSTD -# ------------ +# ------------- # Check for zstd library. AC_DEFUN([DPKG_LIB_ZSTD], [ DPKG_WITH_COMPRESS_LIB([zstd], [zstd.h], [ZSTD_compressStream2]) diff --git a/m4/dpkg-progs.m4 b/m4/dpkg-progs.m4 index cd18ba1..b00f1aa 100644 --- a/m4/dpkg-progs.m4 +++ b/m4/dpkg-progs.m4 @@ -114,7 +114,7 @@ AC_DEFUN([DPKG_PROG_PO4A], [ ])# DPKG_PROG_PO4A # DPKG_PROG_POD2MAN -# -------------- +# ----------------- AC_DEFUN([DPKG_PROG_POD2MAN], [ AC_ARG_VAR([POD2MAN], [pod2man program]) AC_CHECK_PROGS([POD2MAN], [pod2man]) |