summaryrefslogtreecommitdiffstats
path: root/m4/progname.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/progname.m4')
-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
+])