program_invocation_name.m4 657 B

1234567891011121314151617181920
  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.
  4. AC_DEFUN([AC_PROGRAM_INVOCATION_NAME],
  5. [AC_CACHE_CHECK(
  6. for program_invocation_name,
  7. ac_cv_have_program_invocation_name,
  8. AC_TRY_LINK([extern char* program_invocation_name;],
  9. [return *program_invocation_name;],
  10. [ac_cv_have_program_invocation_name=yes],
  11. [ac_cv_have_program_invocation_name=no])
  12. )
  13. if test "$ac_cv_have_program_invocation_name" = "yes"; then
  14. AC_DEFINE(HAVE_PROGRAM_INVOCATION_NAME, 1,
  15. [define if libc has program_invocation_name])
  16. fi
  17. ])