aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-01-02 22:33:48 +0800
committerJia Tan <jiat0218@gmail.com>2023-01-05 00:29:39 +0800
commit507648ad114c2ae0cd6d181063e1ac07e8106718 (patch)
treeb6202aa26010bdb7936bb485b286d67312d92d44 /m4
parentTests: test_check: Test corner cases of CLMUL CRC64. (diff)
downloadxz-507648ad114c2ae0cd6d181063e1ac07e8106718.tar.xz
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.
Diffstat (limited to 'm4')
-rw-r--r--m4/tuklib_progname.m45
1 files changed, 4 insertions, 1 deletions
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 <errno.h>])
+AC_CHECK_DECL([program_invocation_name], [AC_DEFINE(
+ [HAVE_PROGRAM_INVOCATION_NAME], [1],
+ [Define to 1 if PROGRAM_INVOCATION_NAME is declared in <errno.h>])],
+ [], [#include <errno.h>])
])dnl