diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:02:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:02:34 +0000 |
commit | fadeddfbb2aa38a980dd959b5ec1ffba7afd43cb (patch) | |
tree | a7bde6111c84ea64619656a38fba50909fa0bf60 /m4/progname.m4 | |
parent | Initial commit. (diff) | |
download | lldpd-fadeddfbb2aa38a980dd959b5ec1ffba7afd43cb.tar.xz lldpd-fadeddfbb2aa38a980dd959b5ec1ffba7afd43cb.zip |
Adding upstream version 1.0.18.upstream/1.0.18upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/progname.m4')
-rw-r--r-- | m4/progname.m4 | 15 |
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 +]) |