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