From bb740e3b117f1a3c65152d01e5755523a908ecb1 Mon Sep 17 00:00:00 2001 From: Jia Tan Date: Mon, 2 Jan 2023 22:33:48 +0800 Subject: Build: Only define HAVE_PROGRAM_INVOCATION_NAME if it is set to 1. HAVE_DECL_PROGRAM_INVOCATION_NAME is renamed to HAVE_PROGRAM_INVOCATION_NAME. Previously, HAVE_DECL_PROGRAM_INVOCATION_NAME was always set when building with autotools. CMake would only set this when it was 1, and the dos/config.h did not define it. The new macro definition is consistent across build systems. --- m4/tuklib_progname.m4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'm4') diff --git a/m4/tuklib_progname.m4 b/m4/tuklib_progname.m4 index f3e158bd..2133e327 100644 --- a/m4/tuklib_progname.m4 +++ b/m4/tuklib_progname.m4 @@ -21,5 +21,8 @@ AC_DEFUN_ONCE([TUKLIB_PROGNAME], [ AC_REQUIRE([TUKLIB_COMMON]) -AC_CHECK_DECLS([program_invocation_name], [], [], [#include ]) +AC_CHECK_DECL([program_invocation_name], [AC_DEFINE( + [HAVE_PROGRAM_INVOCATION_NAME], [1], + [Define to 1 if PROGRAM_INVOCATION_NAME is declared in ])], + [], [#include ]) ])dnl -- cgit v1.2.3