]> git.lyx.org Git - lyx.git/blob - config/lyxinclude25x.m4
fix crash
[lyx.git] / config / lyxinclude25x.m4
1 dnl this is used by the macro blow to general a proper config.h.in entry
2 m4_define([LYX_AH_CHECK_DECL],
3 [AH_TEMPLATE(AS_TR_CPP(HAVE_DECL_$1),
4   [Define if you have the prototype for function `$1'])])
5
6 dnl Check things are declared in headers to avoid errors or warnings.
7 dnl Called like LYX_CHECK_DECL(function, header1 header2...)
8 dnl Defines HAVE_DECL_{FUNCTION}
9 AC_DEFUN(LYX_CHECK_DECL,
10 [LYX_AH_CHECK_DECL($1)
11 for ac_header in $2 
12 do
13   AC_MSG_CHECKING([if $1 is declared by header $ac_header])
14   AC_EGREP_HEADER($1, $ac_header, 
15       [AC_MSG_RESULT(yes)
16        AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_DECL_$1))
17        break],
18       [AC_MSG_RESULT(no)])
19 done])