Blame m4/func.m4

Packit aea12f
# func.m4 serial 2
Packit aea12f
dnl Copyright (C) 2008-2019 Free Software Foundation, Inc.
Packit aea12f
dnl This file is free software; the Free Software Foundation
Packit aea12f
dnl gives unlimited permission to copy and/or distribute it,
Packit aea12f
dnl with or without modifications, as long as this notice is preserved.
Packit aea12f
Packit aea12f
# Written by Simon Josefsson
Packit aea12f
Packit aea12f
AC_DEFUN([gl_FUNC],
Packit aea12f
[
Packit aea12f
  AC_CACHE_CHECK([whether __func__ is available], [gl_cv_var_func],
Packit aea12f
     AC_COMPILE_IFELSE(
Packit aea12f
       [AC_LANG_PROGRAM([[]], [[const char *str = __func__;]])],
Packit aea12f
       [gl_cv_var_func=yes],
Packit aea12f
       [gl_cv_var_func=no]))
Packit aea12f
  if test "$gl_cv_var_func" != yes; then
Packit aea12f
    AC_DEFINE([__func__], ["<unknown function>"],
Packit aea12f
              [Define as a replacement for the ISO C99 __func__ variable.])
Packit aea12f
  fi
Packit aea12f
])