File: program_invocation_name.m4

package info (click to toggle)
google-perftools 2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 7,284 kB
  • sloc: cpp: 27,869; ansic: 9,534; sh: 4,799; perl: 4,116; makefile: 1,101; asm: 128
file content (19 lines) | stat: -rw-r--r-- 657 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# We need to be careful to avoid having the reference to
# program_invocation_name optimized out.  We do that by
# returning the value.

AC_DEFUN([AC_PROGRAM_INVOCATION_NAME],
  [AC_CACHE_CHECK(
    for program_invocation_name,
    ac_cv_have_program_invocation_name,
    AC_TRY_LINK([extern char* program_invocation_name;],
	        [return *program_invocation_name;],
	        [ac_cv_have_program_invocation_name=yes],
		[ac_cv_have_program_invocation_name=no])
   )
   if test "$ac_cv_have_program_invocation_name" = "yes"; then
     AC_DEFINE(HAVE_PROGRAM_INVOCATION_NAME, 1,
               [define if libc has program_invocation_name])
   fi
   ])