summaryrefslogtreecommitdiffstats
path: root/m4/progname.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:02:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:02:34 +0000
commitfadeddfbb2aa38a980dd959b5ec1ffba7afd43cb (patch)
treea7bde6111c84ea64619656a38fba50909fa0bf60 /m4/progname.m4
parentInitial commit. (diff)
downloadlldpd-upstream.tar.xz
lldpd-upstream.zip
Adding upstream version 1.0.18.upstream/1.0.18upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--m4/progname.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/progname.m4 b/m4/progname.m4
new file mode 100644
index 0000000..b1a80f7
--- /dev/null
+++ b/m4/progname.m4
@@ -0,0 +1,15 @@
+#
+# lldp_CHECK___PROGNAME
+#
+AC_DEFUN([lldp_CHECK___PROGNAME],[
+ AC_CACHE_CHECK([whether libc defines __progname], lldp_cv_check___progname, [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[#include<stdio.h>]],
+ [[ extern char *__progname; printf("%s", __progname); ]])],
+ [ lldp_cv_check___progname="yes" ],
+ [ lldp_cv_check___progname="no" ])
+ ])
+ if test x"$lldp_cv_check___progname" = x"yes"; then
+ AC_DEFINE([HAVE___PROGNAME], [1], [Define if libc defines __progname])
+ fi
+])