2868 |
12 Nov 12 |
peter |
## $Id$ |
2868 |
12 Nov 12 |
peter |
2 |
# |
3885 |
25 Mar 20 |
peter |
# serial 11 (yat 0.18) |
2868 |
12 Nov 12 |
peter |
4 |
# |
2868 |
12 Nov 12 |
peter |
5 |
# |
3870 |
24 Feb 20 |
peter |
# Copyright (C) 2012, 2013, 2014, 2015, 2018, 2020 Peter Johansson |
2868 |
12 Nov 12 |
peter |
7 |
# |
2868 |
12 Nov 12 |
peter |
# This file is part of the yat library, http://dev.thep.lu.se/yat |
2868 |
12 Nov 12 |
peter |
9 |
# |
2868 |
12 Nov 12 |
peter |
# The yat library is free software; you can redistribute it and/or |
2868 |
12 Nov 12 |
peter |
# modify it under the terms of the GNU General Public License as |
2868 |
12 Nov 12 |
peter |
# published by the Free Software Foundation; either version 3 of the |
2868 |
12 Nov 12 |
peter |
# License, or (at your option) any later version. |
2868 |
12 Nov 12 |
peter |
14 |
# |
2868 |
12 Nov 12 |
peter |
# The yat library is distributed in the hope that it will be useful, |
2868 |
12 Nov 12 |
peter |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2868 |
12 Nov 12 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2868 |
12 Nov 12 |
peter |
# General Public License for more details. |
2868 |
12 Nov 12 |
peter |
19 |
# |
2868 |
12 Nov 12 |
peter |
# You should have received a copy of the GNU General Public License |
2868 |
12 Nov 12 |
peter |
# along with yat. If not, see <http://www.gnu.org/licenses/>. |
2868 |
12 Nov 12 |
peter |
22 |
|
3415 |
30 Apr 15 |
peter |
23 |
|
3415 |
30 Apr 15 |
peter |
# YAT_CHECK_HEADERS(headers, [action-if-found], [action-if-not-found]) |
3415 |
30 Apr 15 |
peter |
25 |
# ==================================================================== |
3415 |
30 Apr 15 |
peter |
# Loop over headers (space-separated), check if header exist. If |
3415 |
30 Apr 15 |
peter |
# header exists, AC_DEFINE(YAT_HAVE_header) and execute shell command |
3415 |
30 Apr 15 |
peter |
# action-if-found. If none of headers is available, execute |
3415 |
30 Apr 15 |
peter |
# action-if-not-found. |
3415 |
30 Apr 15 |
peter |
30 |
AC_DEFUN([YAT_CHECK_HEADERS], |
3415 |
30 Apr 15 |
peter |
31 |
[ |
3415 |
30 Apr 15 |
peter |
32 |
yat_check_headers_result=no |
3415 |
30 Apr 15 |
peter |
33 |
m4_foreach_w([myheader], [$1], [_YAT_CHECK_HEADERS(myheader)]) |
3415 |
30 Apr 15 |
peter |
34 |
AS_IF([test x$yat_check_headers_result = xyes], [$2], [$3]) |
3415 |
30 Apr 15 |
peter |
35 |
]) # YAT_CHECK_HEADERS |
3415 |
30 Apr 15 |
peter |
36 |
|
3415 |
30 Apr 15 |
peter |
37 |
|
3415 |
30 Apr 15 |
peter |
# _YAT_CHECK_HEADERS |
3415 |
30 Apr 15 |
peter |
39 |
# ===================== |
3415 |
30 Apr 15 |
peter |
# Private macro used in YAT_CHECK_HEADERS |
3415 |
30 Apr 15 |
peter |
41 |
AC_DEFUN([_YAT_CHECK_HEADERS], |
3415 |
30 Apr 15 |
peter |
42 |
[ |
3415 |
30 Apr 15 |
peter |
43 |
AS_IF([test x$yat_check_headers_result = xno], [dnl |
3068 |
01 Aug 13 |
peter |
44 |
AC_CHECK_HEADER([$1], [ |
3068 |
01 Aug 13 |
peter |
45 |
AC_DEFINE_UNQUOTED(AS_TR_CPP([YAT_HAVE_$1]), [1], |
3068 |
01 Aug 13 |
peter |
46 |
[Define to 1 if you have <$1> header file]) |
3415 |
30 Apr 15 |
peter |
47 |
yat_check_headers_result=yes; |
3068 |
01 Aug 13 |
peter |
48 |
]) |
3068 |
01 Aug 13 |
peter |
49 |
]) |
3885 |
25 Mar 20 |
peter |
50 |
]) # _YAT_CHECK_HEADERS |