Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / third_party / tcmalloc / vendor / m4 / program_invocation_name.m4
blob6161f66d2e6535694c17c5cc44905f599d2e321c
1 # We need to be careful to avoid having the reference to
2 # program_invocation_name optimized out.  We do that by
3 # returning the value.
5 AC_DEFUN([AC_PROGRAM_INVOCATION_NAME],
6   [AC_CACHE_CHECK(
7     for program_invocation_name,
8     ac_cv_have_program_invocation_name,
9     AC_TRY_LINK([extern char* program_invocation_name;],
10                 [return *program_invocation_name;],
11                 [ac_cv_have_program_invocation_name=yes],
12                 [ac_cv_have_program_invocation_name=no])
13    )
14    if test "$ac_cv_have_program_invocation_name" = "yes"; then
15      AC_DEFINE(HAVE_PROGRAM_INVOCATION_NAME, 1,
16                [define if libc has program_invocation_name])
17    fi
18    ])
19