1894 |
15 Apr 09 |
peter |
## $Id$ |
1894 |
15 Apr 09 |
peter |
2 |
|
4359 |
23 Aug 23 |
peter |
# Copyright (C) 2009, 2011 Peter Johansson |
1894 |
15 Apr 09 |
peter |
4 |
# |
1894 |
15 Apr 09 |
peter |
# This file is part of the yat library, http://dev.thep.lu.se/yat |
1894 |
15 Apr 09 |
peter |
6 |
# |
1894 |
15 Apr 09 |
peter |
# The yat library is free software; you can redistribute it and/or |
1894 |
15 Apr 09 |
peter |
# modify it under the terms of the GNU General Public License as |
1894 |
15 Apr 09 |
peter |
# published by the Free Software Foundation; either version 3 of the |
1894 |
15 Apr 09 |
peter |
# License, or (at your option) any later version. |
1894 |
15 Apr 09 |
peter |
11 |
# |
1894 |
15 Apr 09 |
peter |
# The yat library is distributed in the hope that it will be useful, |
1894 |
15 Apr 09 |
peter |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1894 |
15 Apr 09 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1894 |
15 Apr 09 |
peter |
# General Public License for more details. |
1894 |
15 Apr 09 |
peter |
16 |
# |
1894 |
15 Apr 09 |
peter |
# You should have received a copy of the GNU General Public License |
1894 |
15 Apr 09 |
peter |
# along with yat. If not, see <http://www.gnu.org/licenses/>. |
1894 |
15 Apr 09 |
peter |
19 |
# |
1894 |
15 Apr 09 |
peter |
20 |
|
1894 |
15 Apr 09 |
peter |
21 |
# |
4166 |
15 Mar 22 |
peter |
# serial 2 |
1894 |
15 Apr 09 |
peter |
23 |
# |
1894 |
15 Apr 09 |
peter |
# see http://www.gnu.org/software/automake/manual/automake.html#Serials |
1894 |
15 Apr 09 |
peter |
25 |
|
1894 |
15 Apr 09 |
peter |
26 |
|
1894 |
15 Apr 09 |
peter |
27 |
# |
1894 |
15 Apr 09 |
peter |
28 |
# |
4166 |
15 Mar 22 |
peter |
29 |
# |
1894 |
15 Apr 09 |
peter |
30 |
AC_DEFUN([YAT_CHECK_GSL], |
1894 |
15 Apr 09 |
peter |
31 |
[ |
2093 |
24 Oct 09 |
peter |
32 |
AC_PREREQ([2.63]) dnl we use YAT_CHECK_GSL_HEADER |
4166 |
15 Mar 22 |
peter |
33 |
yat_gsl_status="ok" |
4166 |
15 Mar 22 |
peter |
34 |
AC_ARG_WITH([gsl], |
2129 |
23 Dec 09 |
peter |
35 |
[AS_HELP_STRING([--with-gsl=DIR], [prefix for gsl installation])]) |
1894 |
15 Apr 09 |
peter |
36 |
|
4166 |
15 Mar 22 |
peter |
37 |
AS_VAR_IF([with_gsl], [no], [yat_gsl_status=skip]) |
2129 |
23 Dec 09 |
peter |
38 |
|
2129 |
23 Dec 09 |
peter |
39 |
AS_IF([test "x$yat_gsl_status" = "xok"], [ |
2129 |
23 Dec 09 |
peter |
40 |
AX_PATH_GSL([$1],,[yat_gsl_status="no"]) |
2129 |
23 Dec 09 |
peter |
41 |
]) |
2129 |
23 Dec 09 |
peter |
42 |
|
1895 |
15 Apr 09 |
peter |
43 |
AS_IF([test "x$yat_gsl_status" = "xok"], |
1895 |
15 Apr 09 |
peter |
44 |
[YAT_CHECK_GSL_HEADER([gsl/gsl_version.h],, |
1895 |
15 Apr 09 |
peter |
45 |
[yat_gsl_status="no-header"]) |
1895 |
15 Apr 09 |
peter |
46 |
]) |
1895 |
15 Apr 09 |
peter |
47 |
|
1894 |
15 Apr 09 |
peter |
48 |
AS_IF([test "x$yat_gsl_status" = "xok"], |
2395 |
07 Jan 11 |
peter |
49 |
[# grep words starting with '-L' in other words LDFLAGS |
1894 |
15 Apr 09 |
peter |
50 |
for i in $GSL_LIBS; do |
2395 |
07 Jan 11 |
peter |
51 |
AS_IF([AS_ECHO([$i]) | grep '^-L' > /dev/null], |
1894 |
15 Apr 09 |
peter |
52 |
[YAT_LD_ADD_FLAG([LDFLAGS], [$i])]) |
4166 |
15 Mar 22 |
peter |
53 |
done |
1894 |
15 Apr 09 |
peter |
54 |
]) |
1894 |
15 Apr 09 |
peter |
55 |
|
4166 |
15 Mar 22 |
peter |
56 |
AS_CASE([$yat_gsl_status], |
2129 |
23 Dec 09 |
peter |
57 |
[ok], [m4_default([$2], [:])], |
2129 |
23 Dec 09 |
peter |
58 |
[skip], [:], |
2129 |
23 Dec 09 |
peter |
59 |
[m4_default([$3], [:])]) |
1914 |
24 Apr 09 |
peter |
60 |
|
1914 |
24 Apr 09 |
peter |
61 |
|
1894 |
15 Apr 09 |
peter |
62 |
]) # YAT_CHECK_GSL |
1895 |
15 Apr 09 |
peter |
63 |
|
1895 |
15 Apr 09 |
peter |
64 |
AC_DEFUN([YAT_CHECK_GSL_HEADER], |
1895 |
15 Apr 09 |
peter |
65 |
[ |
2093 |
24 Oct 09 |
peter |
66 |
AC_PREREQ([2.63]) dnl we use YAT_CPP_ADD_FLAG |
2016 |
02 Aug 09 |
peter |
67 |
YAT_CPP_ADD_FLAG([CPPFLAGS],[`$GSL_CONFIG --cflags`]) |
1895 |
15 Apr 09 |
peter |
68 |
AC_CHECK_HEADER([$1], [$2], [$3]) |
1895 |
15 Apr 09 |
peter |
69 |
]) # YAT_CHECK_GSL_HEADER |