summaryrefslogtreecommitdiffstats
path: root/gl/m4/getprogname.m4
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2024-10-31 15:27:12 (GMT)
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2024-10-31 15:27:12 (GMT)
commit5be04ec2ceb1df77afbca4fcbf9e92a712612d6f (patch)
tree2b2e1c71dffae827c8e45cd4cccc375093d03486 /gl/m4/getprogname.m4
parent6d1d1dac32841d5ca6ee51bb09b30a6c604b17e2 (diff)
downloadmonitoring-plugins-5be04ec2ceb1df77afbca4fcbf9e92a712612d6f.tar.gz
Sync with the latest Gnulib code (d4ec02b3cc)refs/pull/2037/head
Diffstat (limited to 'gl/m4/getprogname.m4')
-rw-r--r--gl/m4/getprogname.m433
1 files changed, 25 insertions, 8 deletions
diff --git a/gl/m4/getprogname.m4 b/gl/m4/getprogname.m4
index b67c527..b24f448 100644
--- a/gl/m4/getprogname.m4
+++ b/gl/m4/getprogname.m4
@@ -1,16 +1,33 @@
1# getprogname.m4 - check for getprogname or replacements for it 1# getprogname.m4
2# serial 8
3dnl Copyright (C) 2016-2024 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
2 7
3# Copyright (C) 2016-2023 Free Software Foundation, Inc. 8# Check for getprogname or replacements for it
4# This file is free software; the Free Software Foundation
5# gives unlimited permission to copy and/or distribute it,
6# with or without modifications, as long as this notice is preserved.
7
8# serial 4
9 9
10AC_DEFUN([gl_FUNC_GETPROGNAME], 10AC_DEFUN([gl_FUNC_GETPROGNAME],
11[ 11[
12 AC_CHECK_FUNCS_ONCE([getprogname getexecname]) 12 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
13 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
14 gl_CHECK_FUNCS_ANDROID([getprogname], [[#include <stdlib.h>]])
15 if test $ac_cv_func_getprogname = no; then
16 HAVE_GETPROGNAME=0
17 case "$gl_cv_onwards_func_getprogname" in
18 future*) REPLACE_GETPROGNAME=1 ;;
19 esac
20 fi
21 AC_CHECK_DECLS([program_invocation_name],
22 [],
23 [HAVE_DECL_PROGRAM_INVOCATION_NAME=0],
24 [[#include <errno.h>]])
25])
26
27AC_DEFUN([gl_PREREQ_GETPROGNAME],
28[
13 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 29 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
30 AC_CHECK_FUNCS_ONCE([getexecname])
14 ac_found=0 31 ac_found=0
15 AC_CHECK_DECLS([program_invocation_name], [ac_found=1], [], 32 AC_CHECK_DECLS([program_invocation_name], [ac_found=1], [],
16 [#include <errno.h>]) 33 [#include <errno.h>])