summaryrefslogtreecommitdiffstats
path: root/m4/progname.m4
blob: b1a80f7f28c628a8a520e90b8036c8224aa86cbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
])