source: trunk/m4/yat_gsl.m4 @ 2093

Last change on this file since 2093 was 2093, checked in by Peter, 12 years ago

adding AC_PREREQs in autoconf macros

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Date
File size: 1.7 KB
Line 
1## $Id: yat_gsl.m4 2093 2009-10-24 00:56:17Z peter $
2
3#   Copyright (C) 2009 Peter Johansson
4#
5#   This file is part of the yat library, http://dev.thep.lu.se/yat
6#
7#   The yat library is free software; you can redistribute it and/or
8#   modify it under the terms of the GNU General Public License as
9#   published by the Free Software Foundation; either version 3 of the
10#   License, or (at your option) any later version.
11#
12#   The yat library is distributed in the hope that it will be useful,
13#   but WITHOUT ANY WARRANTY; without even the implied warranty of
14#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15#   General Public License for more details.
16#
17#   You should have received a copy of the GNU General Public License
18#   along with yat. If not, see <http://www.gnu.org/licenses/>.
19#
20
21#
22# serial 1 
23#
24# see http://www.gnu.org/software/automake/manual/automake.html#Serials
25
26
27#
28#
29#
30AC_DEFUN([YAT_CHECK_GSL],
31[
32  AC_PREREQ([2.63]) dnl we use YAT_CHECK_GSL_HEADER
33  yat_gsl_status="ok"
34  AX_PATH_GSL([$1],,[yat_gsl_status="no"])
35
36  AS_IF([test "x$yat_gsl_status" = "xok"],
37        [YAT_CHECK_GSL_HEADER([gsl/gsl_version.h],,
38                              [yat_gsl_status="no-header"])
39        ])
40
41  AS_IF([test "x$yat_gsl_status" = "xok"],
42        [# grep words startinging with '-L' in other words LDFLAGS
43         for i in $GSL_LIBS; do
44           AS_IF([test ${i:0:2} = "-L"],
45                 [YAT_LD_ADD_FLAG([LDFLAGS], [$i])])
46         done         
47        ])
48
49  AS_IF([test "x$yat_gsl_status" = "xok"],
50        [m4_default([$2], [:])],
51        [m4_default([$3], [:])])
52
53
54]) # YAT_CHECK_GSL
55
56AC_DEFUN([YAT_CHECK_GSL_HEADER],
57[
58  AC_PREREQ([2.63]) dnl we use YAT_CPP_ADD_FLAG
59  YAT_CPP_ADD_FLAG([CPPFLAGS],[`$GSL_CONFIG --cflags`])
60  AC_CHECK_HEADER([$1], [$2], [$3])
61]) # YAT_CHECK_GSL_HEADER
Note: See TracBrowser for help on using the repository browser.