aboutsummaryrefslogtreecommitdiffhomepage
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/ax_ptrdiff_aliases_int.m418
-rw-r--r--m4/ax_with_ncurses.m46
2 files changed, 21 insertions, 3 deletions
diff --git a/m4/ax_ptrdiff_aliases_int.m4 b/m4/ax_ptrdiff_aliases_int.m4
new file mode 100644
index 0000000..32e1712
--- /dev/null
+++ b/m4/ax_ptrdiff_aliases_int.m4
@@ -0,0 +1,18 @@
+
+AC_DEFUN([AX_PTRDIFF_ALIASES_INT], [
+ AC_CACHE_CHECK([whether ptrdiff_t* aliases int*], [ax_cv_ptrdiff_aliases_int], [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ @%:@include <stddef.h>
+ @%:@include <assert.h>
+ ]], [[
+ ptrdiff_t x = 23;
+ _Static_assert(_Generic(&x, int* : 1, default : 0),
+ "ptrdiff_t* does not alias int*");
+ ]])],
+ [ax_cv_ptrdiff_aliases_int=yes],
+ [ax_cv_ptrdiff_aliases_int=no])
+ ])
+ AS_IF([test "x$ax_cv_ptrdiff_aliases_int" = "xyes"], [
+ AC_DEFINE([PTRDIFF_ALIASES_INT], [1], [Whether ptrdiff_t* aliases int*])
+ ])
+])dnl
diff --git a/m4/ax_with_ncurses.m4 b/m4/ax_with_ncurses.m4
index 9e8076f..cdcfd04 100644
--- a/m4/ax_with_ncurses.m4
+++ b/m4/ax_with_ncurses.m4
@@ -5,8 +5,8 @@
# DESCRIPTION
#
# This macro checks for an ncurses library with enhanced definitions
-# providing a curses.h either in the default search path or as
-# established by pkg-config.
+# (including wide-char support) providing a curses.h either in the default
+# search path or as established by pkg-config.
#
# It is based on the AX_WITH_CURSES macro but does not attempt
# to find any non-standard header, which would require #ifdefing
@@ -75,7 +75,7 @@
# Copyright (c) 2009 Damian Pietras <daper@daper.net>
# Copyright (c) 2012 Reuben Thomas <rrt@sc3d.org>
# Copyright (c) 2011 John Zaitseff <J.Zaitseff@zap.org.au>
-# Copyright (c) 2025 Robin Haberkorn <rhaberkorn@fmsbw.de>
+# Copyright (c) 2025-2026 Robin Haberkorn <rhaberkorn@fmsbw.de>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the