Mercurial > octave-dspies
annotate m4/acinclude.m4 @ 15134:edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
* configure.ac: Remove unordered_map header tests
* m4/acinclude.m4: New OCTAVE_UNORDERED_MAP_HEADERS macro which checks
and caches results of undordered_map and tr1_namespace checks.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 09 Aug 2012 08:29:50 -0700 |
parents | f91eac1bc66d |
children | 4388f6518440 |
rev | line source |
---|---|
1232 | 1 dnl aclocal.m4 -- extra macros for configuring Octave |
2 dnl | |
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
14043
diff
changeset
|
3 dnl Copyright (C) 1995-2012 John W. Eaton |
1232 | 4 dnl |
5 dnl This file is part of Octave. | |
6 dnl | |
7 dnl Octave is free software; you can redistribute it and/or modify it | |
8 dnl under the terms of the GNU General Public License as published by the | |
7016 | 9 dnl Free Software Foundation; either version 3 of the License, or (at |
10 dnl your option) any later version. | |
1232 | 11 dnl |
12 dnl Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 dnl for more details. | |
16 dnl | |
17 dnl You should have received a copy of the GNU General Public License | |
7016 | 18 dnl along with Octave; see the file COPYING. If not, see |
19 dnl <http://www.gnu.org/licenses/>. | |
2548 | 20 dnl |
9525
691545147aca
compatibility for earlier autoconfs
Jaroslav Hajek <highegg@gmail.com>
parents:
9523
diff
changeset
|
21 dnl |
9577
b03062e16c6f
copyirght & FIXME in aclocal.m4
Jaroslav Hajek <highegg@gmail.com>
parents:
9568
diff
changeset
|
22 dnl Copyright (C) 2008 - 2009 Free Software Foundation, Inc. |
b03062e16c6f
copyirght & FIXME in aclocal.m4
Jaroslav Hajek <highegg@gmail.com>
parents:
9568
diff
changeset
|
23 dnl |
9525
691545147aca
compatibility for earlier autoconfs
Jaroslav Hajek <highegg@gmail.com>
parents:
9523
diff
changeset
|
24 dnl If needed, define the m4_ifblank and m4_ifnblank macros from autoconf 2.64 |
691545147aca
compatibility for earlier autoconfs
Jaroslav Hajek <highegg@gmail.com>
parents:
9523
diff
changeset
|
25 dnl This allows us to run with earlier Autoconfs as well. |
9577
b03062e16c6f
copyirght & FIXME in aclocal.m4
Jaroslav Hajek <highegg@gmail.com>
parents:
9568
diff
changeset
|
26 dnl FIXME: these should go away once Autoconf 2.64 is required or ubiquitous. |
b03062e16c6f
copyirght & FIXME in aclocal.m4
Jaroslav Hajek <highegg@gmail.com>
parents:
9568
diff
changeset
|
27 dnl |
9525
691545147aca
compatibility for earlier autoconfs
Jaroslav Hajek <highegg@gmail.com>
parents:
9523
diff
changeset
|
28 ifdef([m4_ifblank],[],[ |
691545147aca
compatibility for earlier autoconfs
Jaroslav Hajek <highegg@gmail.com>
parents:
9523
diff
changeset
|
29 m4_define([m4_ifblank], |
691545147aca
compatibility for earlier autoconfs
Jaroslav Hajek <highegg@gmail.com>
parents:
9523
diff
changeset
|
30 [m4_if(m4_translit([[$1]], [ ][ ][ |
691545147aca
compatibility for earlier autoconfs
Jaroslav Hajek <highegg@gmail.com>
parents:
9523
diff
changeset
|
31 ]), [], [$2], [$3])])]) |
691545147aca
compatibility for earlier autoconfs
Jaroslav Hajek <highegg@gmail.com>
parents:
9523
diff
changeset
|
32 dnl |
691545147aca
compatibility for earlier autoconfs
Jaroslav Hajek <highegg@gmail.com>
parents:
9523
diff
changeset
|
33 ifdef([m4_ifnblank],[],[ |
691545147aca
compatibility for earlier autoconfs
Jaroslav Hajek <highegg@gmail.com>
parents:
9523
diff
changeset
|
34 m4_define([m4_ifnblank], |
691545147aca
compatibility for earlier autoconfs
Jaroslav Hajek <highegg@gmail.com>
parents:
9523
diff
changeset
|
35 [m4_if(m4_translit([[$1]], [ ][ ][ |
691545147aca
compatibility for earlier autoconfs
Jaroslav Hajek <highegg@gmail.com>
parents:
9523
diff
changeset
|
36 ]), [], [$3], [$2])])]) |
691545147aca
compatibility for earlier autoconfs
Jaroslav Hajek <highegg@gmail.com>
parents:
9523
diff
changeset
|
37 dnl |
2813 | 38 dnl ---------------------------------------------------------------------- |
39 dnl | |
40 dnl Figure out the hardware-vendor-os info. | |
41 dnl | |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
42 AC_DEFUN([OCTAVE_HOST_TYPE], |
2813 | 43 [AC_CANONICAL_HOST |
44 if test -z "$host"; then | |
45 host=unknown | |
46 fi | |
47 canonical_host_type=$host | |
48 if test "$host" = unknown; then | |
49 AC_MSG_WARN([configuring Octave for unknown system type | |
50 ]) | |
51 fi | |
3130 | 52 AC_SUBST(canonical_host_type)]) |
2813 | 53 dnl |
54 dnl Set default value for a variable and substitute it. | |
55 dnl | |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
56 AC_DEFUN([OCTAVE_SET_DEFAULT], |
3176 | 57 [ifelse($#, 2, [: ${$1=$2} |
2813 | 58 ])dnl |
59 AC_MSG_RESULT([defining $1 to be $$1]) | |
60 AC_SUBST($1)]) | |
61 dnl | |
3130 | 62 dnl Check for ar. |
63 dnl | |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
64 AC_DEFUN([OCTAVE_PROG_AR], |
3130 | 65 [if test -z "$AR"; then |
66 AR=ar | |
67 fi | |
68 AC_SUBST(AR) | |
69 | |
70 if test -z "$ARFLAGS"; then | |
71 ARFLAGS="rc" | |
72 fi | |
73 AC_SUBST(ARFLAGS) | |
74 ]) | |
75 dnl | |
15134
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
76 dnl Check for unordered map headers and whether tr1 namespace is |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
77 dnl required. |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
78 dnl |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
79 AC_DEFUN([OCTAVE_UNORDERED_MAP_HEADERS], [ |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
80 AC_CHECK_HEADERS([unordered_map], [], [ |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
81 AC_CHECK_HEADERS([tr1/unordered_map])]) |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
82 AC_CACHE_CHECK([whether unordered_map requires tr1 namespace], |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
83 [octave_cv_header_require_tr1_namespace], |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
84 [AC_LANG_PUSH(C++) |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
85 octave_cv_header_require_tr1_namespace=no |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
86 if test "$ac_cv_header_unordered_map" = "yes"; then |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
87 ## Have <unordered_map>, but still have to check whether |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
88 ## tr1 namespace is required (like MSVC, for instance). |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
89 AC_COMPILE_IFELSE([ |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
90 AC_LANG_PROGRAM([ |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
91 #include <unordered_map> |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
92 ], [ |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
93 std::unordered_map<int,int> m; |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
94 ])], octave_cv_header_require_tr1_namespace=no, octave_cv_header_require_tr1_namespace=yes) |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
95 elif test "$ac_cv_header_tr1_unordered_map" = "yes"; then |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
96 octave_cv_header_require_tr1_namespace=yes |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
97 fi |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
98 AC_LANG_POP(C++)]) |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
99 if test "$octave_cv_header_require_tr1_namespace" = "yes"; then |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
100 AC_DEFINE(USE_UNORDERED_MAP_WITH_TR1, 1, [Define to 1 if unordered_map requires the use of tr1 namespace.]) |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
101 fi |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
102 ]) |
edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
Rik <rik@octave.org>
parents:
15133
diff
changeset
|
103 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
104 dnl Check if the compiler supports placement delete. |
4360 | 105 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
106 AC_DEFUN([OCTAVE_PLACEMENT_DELETE], |
4360 | 107 [AC_CACHE_CHECK([whether <new> defines placement delete operator], |
108 octave_cv_placement_delete, | |
109 [AC_LANG_PUSH(C++) | |
5844 | 110 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <new>]], |
111 [[operator delete((void *)0, (void *)0);]])], | |
4360 | 112 octave_cv_placement_delete=yes, octave_cv_placement_delete=no)]) |
113 if test $octave_cv_placement_delete = yes; then | |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
114 AC_DEFINE(HAVE_PLACEMENT_DELETE,1,[Define to 1 if C++ supports operator delete(void *, void *).]) |
4360 | 115 fi |
116 AC_LANG_POP(C++) | |
117 ]) | |
118 dnl | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
119 dnl Check if the compiler dynamic auto arrays. |
4366 | 120 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
121 AC_DEFUN([OCTAVE_DYNAMIC_AUTO_ARRAYS], |
4366 | 122 [AC_CACHE_CHECK([whether C++ supports dynamic auto arrays], |
123 octave_cv_dynamic_auto_arrays, | |
124 [AC_LANG_PUSH(C++) | |
5844 | 125 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], |
126 [[void test(char *); int length(); char x[length()]; test(x);]])], | |
4366 | 127 octave_cv_dynamic_auto_arrays=yes, octave_cv_dynamic_auto_arrays=no)]) |
128 if test $octave_cv_dynamic_auto_arrays = yes; then | |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
129 AC_DEFINE(HAVE_DYNAMIC_AUTO_ARRAYS,1,[Define to 1 if C++ supports dynamic auto arrays.]) |
4366 | 130 fi |
131 AC_LANG_POP(C++) | |
132 ]) | |
133 dnl | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
134 dnl Check if the C++ library has the bit_and, bit_or, and bit_xor |
14725
fa48fd0f160f
Add configure check for templated bitwise operators.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14657
diff
changeset
|
135 dnl templates defined. |
fa48fd0f160f
Add configure check for templated bitwise operators.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14657
diff
changeset
|
136 dnl |
fa48fd0f160f
Add configure check for templated bitwise operators.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14657
diff
changeset
|
137 AC_DEFUN([OCTAVE_CXX_BITWISE_OP_TEMPLATES], |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
138 [AC_CACHE_CHECK([whether bit_and, bit_or, bit_xor are defined in the C++ library], |
14725
fa48fd0f160f
Add configure check for templated bitwise operators.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14657
diff
changeset
|
139 octave_cv_cxx_bitwise_op_templates, |
fa48fd0f160f
Add configure check for templated bitwise operators.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14657
diff
changeset
|
140 [AC_LANG_PUSH(C++) |
fa48fd0f160f
Add configure check for templated bitwise operators.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14657
diff
changeset
|
141 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <functional>]], |
14735
295bd3efc065
fix configure test for bit functions
John W. Eaton <jwe@octave.org>
parents:
14725
diff
changeset
|
142 [[int x = 0; |
295bd3efc065
fix configure test for bit functions
John W. Eaton <jwe@octave.org>
parents:
14725
diff
changeset
|
143 int y = 1; |
295bd3efc065
fix configure test for bit functions
John W. Eaton <jwe@octave.org>
parents:
14725
diff
changeset
|
144 int z1 = std::bit_and<int>() (x, y); |
295bd3efc065
fix configure test for bit functions
John W. Eaton <jwe@octave.org>
parents:
14725
diff
changeset
|
145 int z2 = std::bit_or<int>() (x, y); |
295bd3efc065
fix configure test for bit functions
John W. Eaton <jwe@octave.org>
parents:
14725
diff
changeset
|
146 int z3 = std::bit_xor<int>() (x, y);]])], |
14725
fa48fd0f160f
Add configure check for templated bitwise operators.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14657
diff
changeset
|
147 octave_cv_cxx_bitwise_op_templates=yes, octave_cv_cxx_bitwise_op_templates=no)]) |
fa48fd0f160f
Add configure check for templated bitwise operators.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14657
diff
changeset
|
148 if test $octave_cv_cxx_bitwise_op_templates = yes; then |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
149 AC_DEFINE(HAVE_CXX_BITWISE_OP_TEMPLATES,1,[Define to 1 if C++ library has templated bitwise operators.]) |
14725
fa48fd0f160f
Add configure check for templated bitwise operators.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14657
diff
changeset
|
150 fi |
fa48fd0f160f
Add configure check for templated bitwise operators.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14657
diff
changeset
|
151 AC_LANG_POP(C++) |
fa48fd0f160f
Add configure check for templated bitwise operators.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14657
diff
changeset
|
152 ]) |
fa48fd0f160f
Add configure check for templated bitwise operators.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14657
diff
changeset
|
153 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
154 dnl Check if the C++ library has functions to set real and imaginary |
10380
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
155 dnl parts of complex numbers independently. |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
156 dnl |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
157 AC_DEFUN([OCTAVE_CXX_COMPLEX_SETTERS], |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
158 [AC_CACHE_CHECK([whether complex class can set components independently], |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
159 octave_cv_cxx_complex_setters, |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
160 [AC_LANG_PUSH(C++) |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
161 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <complex>]], |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
162 [[std::complex<double> x; x.real (1.0); x.imag (2.0);]])], |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
163 octave_cv_cxx_complex_setters=yes, octave_cv_cxx_complex_setters=no)]) |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
164 if test $octave_cv_cxx_complex_setters = yes; then |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
165 AC_DEFINE(HAVE_CXX_COMPLEX_SETTERS,1,[Define to 1 if C++ complex class has void real (T) and void imag (T) methods.]) |
10380
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
166 fi |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
167 AC_LANG_POP(C++) |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
168 ]) |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
169 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
170 dnl Check if the C++ library has functions to access real and imaginary |
10380
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
171 dnl parts of complex numbers independently via references. |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
172 dnl |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
173 AC_DEFUN([OCTAVE_CXX_COMPLEX_REFERENCE_ACCESSORS], |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
174 [AC_CACHE_CHECK([whether complex class can reference components independently], |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
175 octave_cv_cxx_complex_reference_accessors, |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
176 [AC_LANG_PUSH(C++) |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
177 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <complex>]], |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
178 [[std::complex<double> x; x.real () = 1.0; x.imag () = 1.0;]])], |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
179 octave_cv_cxx_complex_reference_accessors=yes, octave_cv_cxx_complex_reference_accessors=no)]) |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
180 if test $octave_cv_cxx_complex_reference_accessors = yes; then |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
181 AC_DEFINE(HAVE_CXX_COMPLEX_REFERENCE_ACCESSORS,1,[Define to 1 if C++ complex class has T& real (void) and T& imag (void) methods.]) |
10380
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
182 fi |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
183 AC_LANG_POP(C++) |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
184 ]) |
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
185 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
186 dnl Check if the Carbon Framework defines CGDisplayBitsPerPixel. |
14776
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
187 dnl |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
188 AC_DEFUN([OCTAVE_CARBON_CGDISPLAYBITSPERPIXEL], |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
189 [AC_CACHE_CHECK([whether CGDisplayBitsPerPixel is defined in the Carbon Framework], |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
190 octave_cv_carbon_cgdisplaybitsperpixel, |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
191 [AC_LANG_PUSH(C++) |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
192 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
193 #include <Carbon/Carbon.h> |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
194 ]], [[ |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
195 CGDirectDisplayID display = CGMainDisplayID (); |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
196 size_t depth = CGDisplayBitsPerPixel (display); |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
197 ]])], |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
198 octave_cv_carbon_cgdisplaybitsperpixel=yes, octave_cv_carbon_cgdisplaybitsperpixel=no)]) |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
199 if test $octave_cv_carbon_cgdisplaybitsperpixel = yes; then |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
200 AC_DEFINE(HAVE_CARBON_CGDISPLAYBITSPERPIXEL,1,[Define to 1 if Carbon Framework has CGDisplayBitsPerPixel.]) |
14776
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
201 fi |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
202 AC_LANG_POP(C++) |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
203 ]) |
0eb1b1eb2c76
Detect Carbon's CGDisplayBitsPerPixel during configure. Use it if present.
Ben Abbott <bpabbott@mac.com>
parents:
14735
diff
changeset
|
204 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
205 dnl The following test is from Karl Berry's Kpathsearch library. I'm |
1707 | 206 dnl including it here in case we someday want to make the use of |
207 dnl kpathsea optional. | |
1708 | 208 dnl |
209 dnl Some BSD putenv's, e.g., FreeBSD, do malloc/free's on the environment. | |
210 dnl This test program is due to Mike Hibler <mike@cs.utah.edu>. | |
211 dnl We don't actually need to run this if we don't have putenv, but it | |
212 dnl doesn't hurt. | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
213 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
214 AC_DEFUN([OCTAVE_SMART_PUTENV], |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
215 [AC_MSG_CHECKING([whether putenv uses malloc]) |
1707 | 216 AC_CACHE_VAL(octave_cv_func_putenv_malloc, |
5844 | 217 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
1707 | 218 #define VAR "YOW_VAR" |
219 #define STRING1 "GabbaGabbaHey" | |
220 #define STRING2 "Yow!!" /* should be shorter than STRING1 */ | |
221 extern char *getenv (); /* in case char* and int don't mix gracefully */ | |
222 main () | |
223 { | |
224 char *str1, *rstr1, *str2, *rstr2; | |
225 str1 = getenv (VAR); | |
226 if (str1) | |
227 exit (1); | |
228 str1 = malloc (strlen (VAR) + 1 + strlen (STRING1) + 1); | |
229 if (str1 == 0) | |
230 exit (2); | |
231 strcpy (str1, VAR); | |
232 strcat (str1, "="); | |
233 strcat (str1, STRING1); | |
234 if (putenv (str1) < 0) | |
235 exit (3); | |
236 rstr1 = getenv (VAR); | |
237 if (rstr1 == 0) | |
238 exit (4); | |
239 rstr1 -= strlen (VAR) + 1; | |
240 if (strncmp (rstr1, VAR, strlen (VAR))) | |
241 exit (5); | |
242 str2 = malloc (strlen (VAR) + 1 + strlen (STRING2) + 1); | |
243 if (str2 == 0 || str1 == str2) | |
244 exit (6); | |
245 strcpy (str2, VAR); | |
246 strcat (str2, "="); | |
247 strcat (str2, STRING2); | |
248 if (putenv (str2) < 0) | |
249 exit (7); | |
250 rstr2 = getenv (VAR); | |
251 if (rstr2 == 0) | |
252 exit (8); | |
253 rstr2 -= strlen (VAR) + 1; | |
254 #if 0 | |
255 printf ("rstr1=0x%x, rstr2=0x%x\n", rstr1, rstr2); | |
256 /* | |
257 * If string from first call was reused for the second call, | |
258 * you had better not do a free on the first string! | |
259 */ | |
260 if (rstr1 == rstr2) | |
261 printf ("#define SMART_PUTENV\n"); | |
262 else | |
263 printf ("#undef SMART_PUTENV\n"); | |
264 #endif | |
265 exit (rstr1 == rstr2 ? 0 : 1); | |
5844 | 266 }]])], octave_cv_func_putenv_malloc=yes, octave_cv_func_putenv_malloc=no, |
1707 | 267 octave_cv_func_putenv_malloc=no)])dnl |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
268 AC_MSG_RESULT([$octave_cv_func_putenv_malloc]) |
1707 | 269 if test $octave_cv_func_putenv_malloc = yes; then |
3887 | 270 AC_DEFINE(SMART_PUTENV,1,[To quiet autoheader.]) |
1708 | 271 fi]) |
1788 | 272 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
273 dnl Check if C++ compiler needs the new friend template declaration |
3107 | 274 dnl syntax. |
275 dnl | |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
276 AC_DEFUN([OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL], [ |
3107 | 277 AC_REQUIRE([AC_PROG_CXX]) |
278 AC_MSG_CHECKING([for C++ support for new friend template declaration]) | |
279 AC_CACHE_VAL(octave_cv_cxx_new_friend_template_decl, [ | |
3888 | 280 AC_LANG_PUSH(C++) |
3107 | 281 rm -f conftest.h |
282 cat > conftest.h <<EOB | |
283 struct A { | |
284 friend int operator== (const A&, const A&); | |
285 A (int) { } | |
286 }; | |
287 | |
288 template <class T> int | |
289 operator== (const T&, const T&) | |
290 { | |
291 return 0; | |
292 } | |
293 EOB | |
5842 | 294 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "conftest.h"]], |
295 [[A a (1); | |
296 return a == A(1);]])], | |
297 [octave_cv_cxx_new_friend_template_decl=no], | |
298 [octave_cv_cxx_new_friend_template_decl=yes]) | |
3888 | 299 AC_LANG_POP(C++) |
3107 | 300 ]) |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
301 AC_MSG_RESULT([$octave_cv_cxx_new_friend_template_decl]) |
3107 | 302 if test $octave_cv_cxx_new_friend_template_decl = yes; then |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
303 AC_DEFINE(CXX_NEW_FRIEND_TEMPLATE_DECL,1,[Define to 1 if your compiler supports `<>' stuff for template friends.]) |
3107 | 304 fi |
305 ]) | |
3126 | 306 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
307 dnl Check if C compiler handles FLAG command line option. If two |
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
308 dnl arguments are specified, execute the second arg as shell commands. |
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
309 dnl Otherwise, add FLAG to CFLAGS if the compiler accepts the flag. |
3126 | 310 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
311 AC_DEFUN([OCTAVE_CC_FLAG], [ |
14994
bbc825cb2ea0
Use -I instead of -isystem if -isystem is not avaiable
Max Brister <max@2bass.com>
parents:
14776
diff
changeset
|
312 ac_safe=`echo "$1" | sed 'y% ./+-:=%___p___%'` |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
313 AC_MSG_CHECKING([whether ${CC-cc} accepts $1]) |
3126 | 314 AC_CACHE_VAL(octave_cv_cc_flag_$ac_safe, [ |
3888 | 315 AC_LANG_PUSH(C) |
3126 | 316 XCFLAGS="$CFLAGS" |
317 CFLAGS="$CFLAGS $1" | |
5177 | 318 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
3126 | 319 eval "octave_cv_cc_flag_$ac_safe=yes", |
320 eval "octave_cv_cc_flag_$ac_safe=no") | |
321 CFLAGS="$XCFLAGS" | |
3888 | 322 AC_LANG_POP(C) |
3126 | 323 ]) |
324 if eval "test \"`echo '$octave_cv_cc_flag_'$ac_safe`\" = yes"; then | |
325 AC_MSG_RESULT(yes) | |
3131 | 326 ifelse([$2], , [ |
327 CFLAGS="$CFLAGS $1" | |
328 AC_MSG_RESULT([adding $1 to CFLAGS])], [$2]) | |
3126 | 329 else |
330 AC_MSG_RESULT(no) | |
331 ifelse([$3], , , [$3]) | |
332 fi | |
333 ]) | |
334 dnl | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
335 dnl Check if C++ compiler handles FLAG command line option. If two |
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
336 dnl arguments are specified, execute the second arg as shell commands. |
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
337 dnl Otherwise, add FLAG to CXXFLAGS if the compiler accepts the flag. |
3126 | 338 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
339 AC_DEFUN([OCTAVE_CXX_FLAG], [ |
3908 | 340 ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
341 AC_MSG_CHECKING([whether ${CXX-g++} accepts $1]) |
3126 | 342 AC_CACHE_VAL(octave_cv_cxx_flag_$ac_safe, [ |
3888 | 343 AC_LANG_PUSH(C++) |
3126 | 344 XCXXFLAGS="$CXXFLAGS" |
345 CXXFLAGS="$CXXFLAGS $1" | |
5177 | 346 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
3126 | 347 eval "octave_cv_cxx_flag_$ac_safe=yes", |
348 eval "octave_cv_cxx_flag_$ac_safe=no") | |
349 CXXFLAGS="$XCXXFLAGS" | |
3888 | 350 AC_LANG_POP(C++) |
3126 | 351 ]) |
352 if eval "test \"`echo '$octave_cv_cxx_flag_'$ac_safe`\" = yes"; then | |
353 AC_MSG_RESULT(yes) | |
3131 | 354 ifelse([$2], , [ |
355 CXXFLAGS="$CXXFLAGS $1" | |
356 AC_MSG_RESULT([adding $1 to CXXFLAGS])], [$2]) | |
3126 | 357 else |
358 AC_MSG_RESULT(no) | |
359 ifelse([$3], , , [$3]) | |
360 fi | |
361 ]) | |
3130 | 362 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
363 dnl Check if Fortran compiler handles FLAG command line option. If |
5076 | 364 dnl two arguments are specified, execute the second arg as shell |
365 dnl commands. Otherwise, add FLAG to FFLAGS if the compiler accepts | |
366 dnl the flag. | |
367 dnl | |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
368 AC_DEFUN([OCTAVE_F77_FLAG], [ |
5076 | 369 ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
370 AC_MSG_CHECKING([whether ${F77-g77} accepts $1]) |
5076 | 371 AC_CACHE_VAL(octave_cv_f77_flag_$ac_safe, [ |
372 AC_LANG_PUSH(Fortran 77) | |
373 XFFLAGS="$FFLAGS" | |
374 FFLAGS="$FFLAGS $1" | |
5177 | 375 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
5076 | 376 eval "octave_cv_f77_flag_$ac_safe=yes", |
377 eval "octave_cv_f77_flag_$ac_safe=no") | |
378 FFLAGS="$XFFLAGS" | |
379 AC_LANG_POP(Fortran 77) | |
380 ]) | |
381 if eval "test \"`echo '$octave_cv_f77_flag_'$ac_safe`\" = yes"; then | |
382 AC_MSG_RESULT(yes) | |
383 ifelse([$2], , [ | |
384 FFLAGS="$FFLAGS $1" | |
385 AC_MSG_RESULT([adding $1 to FFLAGS])], [$2]) | |
386 else | |
387 AC_MSG_RESULT(no) | |
388 ifelse([$3], , , [$3]) | |
389 fi | |
390 ]) | |
391 dnl | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
392 dnl Check if Fortran compiler has the intrinsic function ISNAN. |
14550
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
393 dnl |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
394 AC_DEFUN([OCTAVE_CHECK_FORTRAN_HAVE_ISNAN], [ |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
395 AC_LANG_PUSH(Fortran 77) |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
396 AC_CACHE_CHECK([whether $F77 has the intrinsic function ISNAN], |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
397 [octave_cv_fortran_have_isnan], |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
398 [AC_COMPILE_IFELSE( |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
399 [ program foo |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
400 implicit none |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
401 real x |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
402 double precision y |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
403 if (isnan(x)) then |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
404 print *, 'x is NaN' |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
405 end if |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
406 if (isnan(y)) then |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
407 print *, 'y is NaN' |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
408 end if |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
409 end program], [octave_cv_fortran_have_isnan=yes], [octave_cv_fortran_have_isnan=no] |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
410 )]) |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
411 AC_LANG_POP(Fortran 77) |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
412 ]) |
bc4c574ab3b6
Add configure check for isnan in fortran.
Carlo de Falco <cdf@users.sourceforge.net>
parents:
14419
diff
changeset
|
413 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
414 dnl Check if the default Fortran INTEGER is 64 bits wide. |
9596
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
415 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
416 AC_DEFUN([OCTAVE_CHECK_FORTRAN_INTEGER_SIZE], [ |
10331
6a50aa2cdf00
never compile ranlib with 8-byte integers
John W. Eaton <jwe@octave.org>
parents:
10257
diff
changeset
|
417 octave_fintsize_save_FFLAGS="$FFLAGS" |
6a50aa2cdf00
never compile ranlib with 8-byte integers
John W. Eaton <jwe@octave.org>
parents:
10257
diff
changeset
|
418 FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG" |
9596
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
419 AC_LANG_PUSH(Fortran 77) |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
420 AC_CACHE_CHECK([whether $F77 generates correct size integers], |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
421 [octave_cv_fortran_integer_size], |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
422 [AC_COMPILE_IFELSE( |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
423 [ subroutine foo(n, in, out) |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
424 integer n, in(n), out(n) |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
425 integer i |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
426 do 10 i = 1, n |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
427 out(i) = in(i) |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
428 10 continue |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
429 return |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
430 end], |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
431 [mv conftest.$ac_objext fintsize.$ac_objext |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
432 |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
433 octave_fintsize_save_LIBS="$LIBS" |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
434 LIBS="fintsize.$ac_objext $[]_AC_LANG_PREFIX[]LIBS" |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
435 AC_LANG_PUSH(C)dnl |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
436 AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <assert.h>]], [[ |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
437 #ifdef USE_64_BIT_IDX_T |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
438 #if IDX_TYPE_LONG |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
439 typedef long octave_idx_type; |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
440 #else |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
441 typedef int octave_idx_type; |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
442 #endif |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
443 #else |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
444 typedef int octave_idx_type; |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
445 #endif |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
446 octave_idx_type n = 2; |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
447 octave_idx_type in[2]; |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
448 octave_idx_type out[2]; |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
449 in[0] = 13; |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
450 in[0] = 42; |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
451 F77_FUNC(foo,FOO) (&n, &in, &out); |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
452 assert (in[0] == out[0] && in[1] == out[1]); |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
453 ]])], |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
454 [octave_cv_fortran_integer_size=yes], |
13957
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
455 [octave_cv_fortran_integer_size=no], |
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
456 [octave_cv_fortran_integer_size=yes]) |
9596
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
457 AC_LANG_POP(C)dnl |
10331
6a50aa2cdf00
never compile ranlib with 8-byte integers
John W. Eaton <jwe@octave.org>
parents:
10257
diff
changeset
|
458 LIBS="$octave_fintsize_save_LIBS" |
9596
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
459 rm -f conftest.$ac_objext fintsize.$ac_objext |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
460 ], [ |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
461 rm -f conftest.$ac_objext |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
462 AC_MSG_FAILURE([cannot compile a simple Fortran program]) |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
463 octave_cv_fortran_integer_size=no])]) |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
464 AC_LANG_POP(Fortran 77) |
10331
6a50aa2cdf00
never compile ranlib with 8-byte integers
John W. Eaton <jwe@octave.org>
parents:
10257
diff
changeset
|
465 FFLAGS="$octave_fintsize_save_FFLAGS" |
9596
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
466 ]) |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
467 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
468 dnl Add warning to final summary. |
14605
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
469 dnl |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
470 AC_DEFUN([OCTAVE_CONFIGURE_WARNING], [ |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
471 AC_MSG_WARN([$][$1]) |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
472 m4_set_add([summary_warning_list], [$1]) |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
473 ]) |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
474 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
475 dnl Print final summary. |
14605
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
476 dnl |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
477 AC_DEFUN([OCTAVE_CONFIGURE_WARNING_SUMMARY], [ |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
478 m4_set_foreach([summary_warning_list], [elt], [ |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
479 if test -n "[$]elt"; then |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
480 AC_MSG_WARN([$]elt) |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
481 warn_msg_printed=true |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
482 fi]) |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
483 ]) |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
484 dnl |
9523
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9520
diff
changeset
|
485 dnl OCTAVE_CHECK_LIBRARY(LIBRARY, DOC-NAME, WARN-MSG, HEADER, FUNC, |
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9520
diff
changeset
|
486 dnl LANG, DOC-STRING, EXTRA-CHECK) |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
487 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
488 AC_DEFUN([OCTAVE_CHECK_LIBRARY], [ |
9523
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9520
diff
changeset
|
489 AC_ARG_WITH([$1-includedir], |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
490 [AS_HELP_STRING([--with-$1-includedir=DIR], |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
491 [look for $2 include files in DIR])], |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
492 [m4_toupper([$1])_CPPFLAGS="-I$withval"]) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
493 AC_SUBST(m4_toupper([$1])_CPPFLAGS) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
494 |
9523
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9520
diff
changeset
|
495 AC_ARG_WITH([$1-libdir], |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
496 [AS_HELP_STRING([--with-$1-libdir=DIR], |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
497 [look for $2 libraries in DIR])], |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
498 [m4_toupper([$1])_LDFLAGS="-L$withval"]) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
499 AC_SUBST(m4_toupper([$1])_LDFLAGS) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
500 |
9523
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9520
diff
changeset
|
501 AC_ARG_WITH([$1], |
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9520
diff
changeset
|
502 [m4_ifblank([$7], |
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9520
diff
changeset
|
503 [AS_HELP_STRING([--without-$1], [don't use $2 library])], |
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9520
diff
changeset
|
504 [AS_HELP_STRING([--without-$1], [$7])])], |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
505 with_$1=$withval, with_$1=yes) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
506 |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
507 m4_toupper([$1])_LIBS= |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
508 case $with_$1 in |
9539
41a74dcd14df
Clear QHULL_LIBS etc on errors. Interpret --without-qhull etc correctly.
David Grundberg <individ@acc.umu.se>
parents:
9531
diff
changeset
|
509 no) |
41a74dcd14df
Clear QHULL_LIBS etc on errors. Interpret --without-qhull etc correctly.
David Grundberg <individ@acc.umu.se>
parents:
9531
diff
changeset
|
510 m4_toupper([$1])_LIBS= |
41a74dcd14df
Clear QHULL_LIBS etc on errors. Interpret --without-qhull etc correctly.
David Grundberg <individ@acc.umu.se>
parents:
9531
diff
changeset
|
511 ;; |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
512 yes | "") |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
513 m4_toupper([$1])_LIBS="-l$1" |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
514 ;; |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
515 -* | */* | *.a | *.so | *.so.* | *.o) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
516 m4_toupper([$1])_LIBS="$with_$1" |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
517 ;; |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
518 *) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
519 m4_toupper([$1])_LIBS="-l$with_$1" |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
520 ;; |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
521 esac |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
522 |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
523 [TEXINFO_]m4_toupper([$1])= |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
524 warn_$1="$3" |
14605
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
525 m4_set_add([summary_warning_list], [warn_$1]) |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
526 |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
527 if test -n "$m4_toupper([$1])_LIBS"; then |
9540
79b5fe2d5646
use Z_LIBS in checks for curl and glpk libraries
John W. Eaton <jwe@octave.org>
parents:
9539
diff
changeset
|
528 octave_check_library_save_CPPFLAGS="$CPPFLAGS" |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
529 CPPFLAGS="$m4_toupper([$1])_CPPFLAGS $CPPFLAGS" |
9523
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9520
diff
changeset
|
530 m4_ifnblank([$6], [AC_LANG_PUSH($6)]) |
9568
d3fccc4c4b9e
use OCTAVE_CHECK_LIBRARY to check for ARPACK
John W. Eaton <jwe@octave.org>
parents:
9543
diff
changeset
|
531 octave_$1_check_for_lib=false |
d3fccc4c4b9e
use OCTAVE_CHECK_LIBRARY to check for ARPACK
John W. Eaton <jwe@octave.org>
parents:
9543
diff
changeset
|
532 m4_ifblank([$4], [octave_$1_check_for_lib=true], |
d3fccc4c4b9e
use OCTAVE_CHECK_LIBRARY to check for ARPACK
John W. Eaton <jwe@octave.org>
parents:
9543
diff
changeset
|
533 [AC_CHECK_HEADERS($4, [octave_$1_check_for_lib=true; break])]) |
d3fccc4c4b9e
use OCTAVE_CHECK_LIBRARY to check for ARPACK
John W. Eaton <jwe@octave.org>
parents:
9543
diff
changeset
|
534 if $octave_$1_check_for_lib; then |
9540
79b5fe2d5646
use Z_LIBS in checks for curl and glpk libraries
John W. Eaton <jwe@octave.org>
parents:
9539
diff
changeset
|
535 octave_check_library_save_LDFLAGS="$LDFLAGS" |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
536 LDFLAGS="$m4_toupper([$1])_LDFLAGS $LDFLAGS" |
9540
79b5fe2d5646
use Z_LIBS in checks for curl and glpk libraries
John W. Eaton <jwe@octave.org>
parents:
9539
diff
changeset
|
537 octave_check_library_save_LIBS="$LIBS" |
9520
bd5909b89457
fix OCTAVE_CHECK_LIBRARY
Jaroslav Hajek <highegg@gmail.com>
parents:
9519
diff
changeset
|
538 LIBS="$m4_toupper([$1])_LIBS $LIBS" |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
539 octave_$1_ok=no |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
540 AC_MSG_CHECKING([for $5 in $m4_toupper([$1])_LIBS]) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
541 AC_LINK_IFELSE([AC_LANG_CALL([], [$5])], |
9539
41a74dcd14df
Clear QHULL_LIBS etc on errors. Interpret --without-qhull etc correctly.
David Grundberg <individ@acc.umu.se>
parents:
9531
diff
changeset
|
542 [octave_$1_ok=yes]) |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
543 AC_MSG_RESULT([$octave_$1_ok]) |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
544 if test $octave_$1_ok = yes; then |
9523
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9520
diff
changeset
|
545 m4_ifblank([$8], [ |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
546 warn_$1= |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
547 AC_DEFINE([HAVE_]m4_toupper([$1]), 1, |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
548 [Define to 1 if $2 is available.]) |
9523
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9520
diff
changeset
|
549 [TEXINFO_]m4_toupper([$1])="@set [HAVE_]m4_toupper([$1])"], [$8]) |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
550 fi |
9540
79b5fe2d5646
use Z_LIBS in checks for curl and glpk libraries
John W. Eaton <jwe@octave.org>
parents:
9539
diff
changeset
|
551 LIBS="$octave_check_library_save_LIBS" |
9568
d3fccc4c4b9e
use OCTAVE_CHECK_LIBRARY to check for ARPACK
John W. Eaton <jwe@octave.org>
parents:
9543
diff
changeset
|
552 LDFLAGS="$octave_check_library_save_LDFLAGS" |
d3fccc4c4b9e
use OCTAVE_CHECK_LIBRARY to check for ARPACK
John W. Eaton <jwe@octave.org>
parents:
9543
diff
changeset
|
553 fi |
9523
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9520
diff
changeset
|
554 m4_ifnblank([$6], [AC_LANG_POP($6)]) |
9540
79b5fe2d5646
use Z_LIBS in checks for curl and glpk libraries
John W. Eaton <jwe@octave.org>
parents:
9539
diff
changeset
|
555 CPPFLAGS="$octave_check_library_save_CPPFLAGS" |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
556 fi |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
557 AC_SUBST(m4_toupper([$1])_LIBS) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
558 AC_SUBST([TEXINFO_]m4_toupper([$1])) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
559 if test -n "$warn_$1"; then |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
560 AC_MSG_WARN([$warn_$1]) |
9539
41a74dcd14df
Clear QHULL_LIBS etc on errors. Interpret --without-qhull etc correctly.
David Grundberg <individ@acc.umu.se>
parents:
9531
diff
changeset
|
561 m4_toupper([$1])_LIBS= |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
562 fi |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
563 ]) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
564 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
565 dnl Check for flex. |
3729 | 566 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
567 AC_DEFUN([OCTAVE_PROG_FLEX], [ |
3729 | 568 ### For now, don't define LEXLIB to be -lfl -- we don't use anything in |
569 ### it, and it might not be installed. | |
570 ### | |
571 ### Also make sure that we generate an interactive scanner if we are | |
572 ### using flex. | |
573 AC_PROG_LEX | |
574 case "$LEX" in | |
575 flex*) | |
9794
0d4613a736e9
convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
9654
diff
changeset
|
576 LFLAGS="-I" |
3729 | 577 AC_MSG_RESULT([defining LFLAGS to be $LFLAGS]) |
578 LEXLIB= | |
579 ;; | |
580 *) | |
14419
2258a0b73eb8
Fix path to missing helper script
Mike Miller <mtmiller@ieee.org>
parents:
14315
diff
changeset
|
581 LEX='$(top_srcdir)/build-aux/missing flex' |
14657
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
582 warn_flex=" |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
583 |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
584 I didn't find flex, but it's only a problem if you need to reconstruct |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
585 lex.cc, which is the case if you're building from VCS sources. |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
586 " |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
587 OCTAVE_CONFIGURE_WARNING([warn_flex]) |
3729 | 588 ;; |
589 esac | |
590 AC_SUBST(LFLAGS) | |
591 ]) | |
592 dnl | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
593 dnl Check for bison. |
3729 | 594 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
595 AC_DEFUN([OCTAVE_PROG_BISON], [ |
3729 | 596 AC_PROG_YACC |
597 case "$YACC" in | |
598 bison*) | |
599 ;; | |
600 *) | |
14419
2258a0b73eb8
Fix path to missing helper script
Mike Miller <mtmiller@ieee.org>
parents:
14315
diff
changeset
|
601 YACC='$(top_srcdir)/build-aux/missing bison' |
14657
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
602 warn_bison=" |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
603 |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
604 I didn't find bison, but it's only a problem if you need to |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
605 reconstruct parse.cc, which is the case if you're building from VCS |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
606 sources. |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
607 |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
608 " |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
609 OCTAVE_CONFIGURE_WARNING([warn_bison]) |
3729 | 610 ;; |
611 esac | |
612 ]) | |
613 dnl | |
3130 | 614 dnl What pager should we use? |
615 dnl | |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
616 AC_DEFUN([OCTAVE_PROG_PAGER], |
3130 | 617 [if test "$cross_compiling" = yes; then |
618 DEFAULT_PAGER=less | |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
619 AC_MSG_RESULT([assuming $DEFAULT_PAGER exists on $canonical_host_type host]) |
3130 | 620 AC_SUBST(DEFAULT_PAGER) |
621 else | |
622 octave_possible_pagers="less more page pg" | |
623 case "$canonical_host_type" in | |
6103 | 624 *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc) |
3130 | 625 octave_possible_pagers="$octave_possible_pagers more.com" |
626 ;; | |
627 esac | |
628 | |
629 AC_CHECK_PROGS(DEFAULT_PAGER, $octave_possible_pagers, []) | |
630 if test -z "$DEFAULT_PAGER"; then | |
631 warn_less="I couldn't find \`less', \`more', \`page', or \`pg'" | |
14657
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
632 OCTAVE_CONFIGURE_WARNING([warn_less]) |
3130 | 633 fi |
634 fi | |
635 ]) | |
636 dnl | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
637 dnl Check for gnuplot. |
3130 | 638 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
639 AC_DEFUN([OCTAVE_PROG_GNUPLOT], [ |
9865
763906db555e
acinclude.m4: update gnuplot and ghostscript program checks for Windows
Tatsu@Inspiron6000
parents:
9805
diff
changeset
|
640 gp_names="gnuplot" |
763906db555e
acinclude.m4: update gnuplot and ghostscript program checks for Windows
Tatsu@Inspiron6000
parents:
9805
diff
changeset
|
641 gp_default="gnuplot" |
4098 | 642 if test "$cross_compiling" = yes; then |
7361 | 643 GNUPLOT="$gp_default" |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
644 AC_MSG_RESULT([assuming $GNUPLOT exists on $canonical_host_type host]) |
3130 | 645 else |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
646 AC_CHECK_PROGS(GNUPLOT, [$gp_names]) |
7361 | 647 if test -z "$GNUPLOT"; then |
648 GNUPLOT="$gp_default" | |
15013
c753ee228708
acinclude.m4: generate gnuplot warning message correctly (fixing bug from revision 8a84849ad986)
Carnë Draug <carandraug+dev@gmail.com>
parents:
14994
diff
changeset
|
649 warn_gnuplot=" |
5076 | 650 |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
651 gnuplot not found. It isn't necessary to have gnuplot installed, but |
14657
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
652 without native graphics or gnuplot you won't be able to use any of |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
653 Octave's plotting commands. |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
654 " |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
655 OCTAVE_CONFIGURE_WARNING([warn_gnuplot]) |
3130 | 656 fi |
657 fi | |
7361 | 658 AC_SUBST(GNUPLOT) |
3130 | 659 ]) |
660 dnl | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
661 dnl Check for gperf. |
3673 | 662 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
663 AC_DEFUN([OCTAVE_PROG_GPERF], [ |
6119 | 664 AC_CHECK_PROG(GPERF, gperf, gperf, []) |
8775
a2a9dc5e8565
octave.gperf: eliminate whitespace to allow gperf 2.7.2 to work
John W. Eaton <jwe@octave.org>
parents:
8724
diff
changeset
|
665 if test -z "$GPERF"; then |
14419
2258a0b73eb8
Fix path to missing helper script
Mike Miller <mtmiller@ieee.org>
parents:
14315
diff
changeset
|
666 GPERF='$(top_srcdir)/build-aux/missing gperf' |
14657
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
667 warn_gperf=" |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
668 |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
669 I didn't find gperf, but it's only a problem if you need to |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
670 reconstruct oct-gperf.h |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
671 " |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
672 OCTAVE_CONFIGURE_WARNING([warn_gperf]) |
3731 | 673 fi |
674 AC_SUBST(GPERF) | |
3673 | 675 ]) |
676 dnl | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
677 dnl Check for ghostscript. |
5934 | 678 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
679 AC_DEFUN([OCTAVE_PROG_GHOSTSCRIPT], [ |
6116 | 680 case "$canonical_host_type" in |
9865
763906db555e
acinclude.m4: update gnuplot and ghostscript program checks for Windows
Tatsu@Inspiron6000
parents:
9805
diff
changeset
|
681 *-*-mingw* | *-*-msdosmsvc) |
13728
47f803279384
Allow to use MiKTeX ghostscript.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
12733
diff
changeset
|
682 gs_names="gswin32c gs mgs" |
6116 | 683 ;; |
684 *) | |
9865
763906db555e
acinclude.m4: update gnuplot and ghostscript program checks for Windows
Tatsu@Inspiron6000
parents:
9805
diff
changeset
|
685 gs_names="gs" |
6116 | 686 ;; |
687 esac | |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
688 AC_CHECK_PROGS(GHOSTSCRIPT, [$gs_names]) |
5934 | 689 if test -z "$GHOSTSCRIPT"; then |
14419
2258a0b73eb8
Fix path to missing helper script
Mike Miller <mtmiller@ieee.org>
parents:
14315
diff
changeset
|
690 GHOSTSCRIPT='$(top_srcdir)/build-aux/missing gs' |
14657
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
691 warn_ghostscript=" |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
692 |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
693 I didn't find ghostscript, so reconstructing figures for the manual |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
694 will fail, and saving graphics in some output formats will fail when |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
695 using Octave |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
696 " |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
697 |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
698 OCTAVE_CONFIGURE_WARNING([warn_ghostscript]) |
5934 | 699 fi |
700 AC_SUBST(GHOSTSCRIPT) | |
701 ]) | |
702 dnl | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
703 dnl Check for makeinfo. |
15126
25200c04bc25
configure.ac: Require makeinfo to be present before building Octave.
Rik <rik@octave.org>
parents:
15063
diff
changeset
|
704 dnl |
25200c04bc25
configure.ac: Require makeinfo to be present before building Octave.
Rik <rik@octave.org>
parents:
15063
diff
changeset
|
705 AC_DEFUN([OCTAVE_PROG_MAKEINFO], |
25200c04bc25
configure.ac: Require makeinfo to be present before building Octave.
Rik <rik@octave.org>
parents:
15063
diff
changeset
|
706 dnl use MKINFO, not MAKEINFO, for variable name because Automake automatically |
25200c04bc25
configure.ac: Require makeinfo to be present before building Octave.
Rik <rik@octave.org>
parents:
15063
diff
changeset
|
707 dnl defines a value for MAKEINFO even when it does not exist which will then |
25200c04bc25
configure.ac: Require makeinfo to be present before building Octave.
Rik <rik@octave.org>
parents:
15063
diff
changeset
|
708 dnl fool the 'test -z' line. |
25200c04bc25
configure.ac: Require makeinfo to be present before building Octave.
Rik <rik@octave.org>
parents:
15063
diff
changeset
|
709 [AC_CHECK_PROG(MKINFO, makeinfo, makeinfo, []) |
25200c04bc25
configure.ac: Require makeinfo to be present before building Octave.
Rik <rik@octave.org>
parents:
15063
diff
changeset
|
710 if test -z "$MKINFO"; then |
25200c04bc25
configure.ac: Require makeinfo to be present before building Octave.
Rik <rik@octave.org>
parents:
15063
diff
changeset
|
711 AC_MSG_ERROR([makeinfo program required for reading documentation]) |
25200c04bc25
configure.ac: Require makeinfo to be present before building Octave.
Rik <rik@octave.org>
parents:
15063
diff
changeset
|
712 fi |
25200c04bc25
configure.ac: Require makeinfo to be present before building Octave.
Rik <rik@octave.org>
parents:
15063
diff
changeset
|
713 ]) |
25200c04bc25
configure.ac: Require makeinfo to be present before building Octave.
Rik <rik@octave.org>
parents:
15063
diff
changeset
|
714 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
715 dnl Check for texi2dvi. |
5934 | 716 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
717 AC_DEFUN([OCTAVE_PROG_TEXI2DVI], [ |
6119 | 718 AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, []) |
5934 | 719 if test -z "$TEXI2DVI"; then |
14419
2258a0b73eb8
Fix path to missing helper script
Mike Miller <mtmiller@ieee.org>
parents:
14315
diff
changeset
|
720 TEXI2DVI='$(top_srcdir)/build-aux/missing texi2dvi' |
14657
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
721 warn_texi2dvi=" |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
722 |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
723 I didn't find texi2dvi, but it's only a problem if you need to |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
724 reconstruct the DVI version of the manual |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
725 " |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
726 OCTAVE_CONFIGURE_WARNING([warn_texi2dvi]) |
5934 | 727 fi |
728 AC_SUBST(TEXI2DVI) | |
729 ]) | |
730 dnl | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
731 dnl Check for texi2pdf. |
5934 | 732 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
733 AC_DEFUN([OCTAVE_PROG_TEXI2PDF], [ |
6116 | 734 AC_REQUIRE([OCTAVE_PROG_TEXI2DVI]) |
6119 | 735 AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, []) |
5934 | 736 if test -z "$TEXI2PDF"; then |
6116 | 737 missing=true; |
738 if test -n "$TEXI2DVI"; then | |
739 TEXI2PDF="$TEXI2DVI --pdf" | |
740 missing=false; | |
741 fi | |
742 else | |
743 missing=false; | |
744 fi | |
745 if $missing; then | |
14419
2258a0b73eb8
Fix path to missing helper script
Mike Miller <mtmiller@ieee.org>
parents:
14315
diff
changeset
|
746 TEXI2PDF='$(top_srcdir)/build-aux/missing texi2pdf' |
14657
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
747 warn_texi2pdf=" |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
748 |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
749 I didn't find texi2pdf, but it's only a problem if you need to |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
750 reconstruct the PDF version of the manual |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
751 " |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
752 OCTAVE_CONFIGURE_WARNING([warn_texi2pdf]) |
5934 | 753 fi |
754 AC_SUBST(TEXI2PDF) | |
755 ]) | |
756 dnl | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
757 dnl Check if the C++ library is ISO compliant. |
3769 | 758 dnl FIXME: This is obviously very simplistic, and trivially fooled. |
759 dnl | |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
760 AC_DEFUN([OCTAVE_CXX_ISO_COMPLIANT_LIBRARY], [ |
3769 | 761 AC_REQUIRE([AC_PROG_CXX]) |
762 AC_MSG_CHECKING([if C++ library is ISO compliant]) | |
763 AC_CACHE_VAL(octave_cv_cxx_iso_compliant_library, [ | |
3888 | 764 AC_LANG_PUSH(C++) |
3769 | 765 rm -f conftest.h |
3943 | 766 ### Omitting cwctype for now, since it is broken with gcc-3.0.x and |
767 ### possibly other versions... | |
3769 | 768 for inc in algorithm bitset cassert cctype cerrno cfloat ciso646 \ |
769 climits clocale cmath complex csetjmp csignal cstdarg cstddef \ | |
3943 | 770 cstdio cstdlib cstring ctime cwchar deque exception \ |
3769 | 771 fstream functional iomanip ios iosfwd iostream istream iterator \ |
772 limits list locale map memory new numeric ostream queue set \ | |
773 sstream stack stdexcept streambuf string strstream typeinfo \ | |
774 utility valarray vector; do | |
775 echo "#include <$inc>" >> conftest.h | |
776 done | |
5842 | 777 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "conftest.h"]], |
778 [[std::bitset<50> flags; | |
3769 | 779 flags.set(); |
780 int digits = std::numeric_limits<unsigned long>::digits; | |
5842 | 781 digits = 0;]])], |
782 [octave_cv_cxx_iso_compliant_library=yes], | |
783 [octave_cv_cxx_iso_compliant_library=no]) | |
3888 | 784 AC_LANG_POP(C++) |
3769 | 785 ]) |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
786 AC_MSG_RESULT([$octave_cv_cxx_iso_compliant_library]) |
3769 | 787 if test $octave_cv_cxx_iso_compliant_library = yes; then |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
788 AC_DEFINE(CXX_ISO_COMPLIANT_LIBRARY, 1, [Define to 1 if your C++ runtime library is ISO compliant.]) |
3769 | 789 fi |
790 ]) | |
3822 | 791 dnl |
792 dnl Allow the user disable support for command line editing using GNU | |
793 dnl readline. | |
794 dnl | |
795 dnl OCTAVE_ENABLE_READLINE | |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
796 AC_DEFUN([OCTAVE_ENABLE_READLINE], [ |
3822 | 797 USE_READLINE=true |
9515 | 798 READLINE_LIBS= |
3822 | 799 AC_ARG_ENABLE(readline, |
800 [ --enable-readline use readline library (default is yes)], | |
801 [if test "$enableval" = no; then | |
3824 | 802 USE_READLINE=false |
3825 | 803 warn_readline="command editing and history features require GNU Readline" |
3824 | 804 fi]) |
3822 | 805 if $USE_READLINE; then |
9515 | 806 save_LIBS="$LIBS" |
807 LIBS="$TERM_LIBS" | |
3822 | 808 AC_CHECK_LIB(readline, rl_set_keyboard_input_timeout, [ |
9515 | 809 READLINE_LIBS="-lreadline" |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
810 AC_DEFINE(USE_READLINE, 1, [Define to 1 to use the readline library.]) |
3822 | 811 ], [ |
3824 | 812 AC_MSG_WARN([I need GNU Readline 4.2 or later]) |
813 AC_MSG_ERROR([this is fatal unless you specify --disable-readline]) | |
3822 | 814 ]) |
9515 | 815 LIBS="$save_LIBS" |
3822 | 816 fi |
9515 | 817 AC_SUBST(READLINE_LIBS) |
3822 | 818 ]) |
3842 | 819 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
820 dnl Check if C++ reinterpret cast works for function pointers. |
5854 | 821 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
822 AC_DEFUN([OCTAVE_CXX_BROKEN_REINTERPRET_CAST], [ |
5854 | 823 AC_REQUIRE([AC_PROG_CXX]) |
824 AC_LANG_PUSH(C++) | |
825 AC_CACHE_CHECK([for broken C++ reinterpret_cast], | |
826 octave_cv_cxx_broken_reinterpret_cast, [ | |
827 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cmath>]], [[ | |
828 typedef double (*fptr) (double); | |
829 fptr psin = sin; | |
830 void *vptr = reinterpret_cast<void *> (psin); | |
831 psin = reinterpret_cast<fptr> (vptr);]])], | |
832 octave_cv_cxx_broken_reinterpret_cast=no, | |
833 octave_cv_cxx_broken_reinterpret_cast=yes)]) | |
834 if test $octave_cv_cxx_broken_reinterpret_cast = yes ; then | |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
835 AC_DEFINE(CXX_BROKEN_REINTERPRET_CAST, 1, [Define to 1 if C++ reinterpret_cast fails for function pointers.]) |
5854 | 836 fi |
837 AC_LANG_POP(C++)]) | |
838 dnl | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
839 dnl Find find program. |
7244 | 840 dnl |
841 # Prefer GNU find if found. | |
842 AN_MAKEVAR([FIND], [OCTAVE_PROG_FIND]) | |
843 AN_PROGRAM([gfind], [OCTAVE_PROG_FIND]) | |
844 AN_PROGRAM([find], [OCTAVE_PROG_FIND]) | |
845 AC_DEFUN([OCTAVE_PROG_FIND], | |
846 [AC_CHECK_PROGS(FIND, gfind find, )]) | |
847 dnl | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
848 dnl Find sed program. |
7244 | 849 dnl |
4084 | 850 # Check for a fully-functional sed program, that truncates |
6955 | 851 # as few characters as possible and that supports "\(X\|Y\)" |
852 # style regular expression alternation. Prefer GNU sed if found. | |
4084 | 853 AC_DEFUN([OCTAVE_PROG_SED], |
6955 | 854 [AC_MSG_CHECKING([for a usable sed]) |
4084 | 855 if test -z "$SED"; then |
6822 | 856 AC_CACHE_VAL(ac_cv_path_sed, [ |
857 # Loop through the user's path and test for sed and gsed. | |
858 # Then use that list of sed's as ones to test for truncation. | |
859 _AS_PATH_WALK([$PATH], | |
860 [for ac_prog in sed gsed; do | |
861 for ac_exec_ext in '' $ac_executable_extensions; do | |
862 if AS_EXECUTABLE_P(["$as_dir/$ac_prog$ac_exec_ext"]); then | |
863 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" | |
864 fi | |
865 done | |
4084 | 866 done |
6822 | 867 ]) |
868 AS_TMPDIR(sed) | |
869 _max=0 | |
4084 | 870 _count=0 |
6822 | 871 # Add /usr/xpg4/bin/sed as it is typically found on Solaris |
872 # along with /bin/sed that truncates output. | |
873 for _sed in $_sed_list /usr/xpg4/bin/sed; do | |
874 test ! -f ${_sed} && break | |
875 cat /dev/null > "$tmp/sed.in" | |
876 _count=0 | |
877 echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in" | |
878 # Check for GNU sed and select it if it is found. | |
879 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then | |
880 octave_cv_path_sed=${_sed} | |
881 break; | |
4084 | 882 fi |
6955 | 883 # Reject if RE alternation is not handled. |
884 if test "`echo 'this and that' | ${_sed} -n 's/\(this\|that\).*$/\1/p'`" != "this"; then | |
885 continue; | |
886 fi | |
6822 | 887 while true; do |
888 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" | |
889 mv "$tmp/sed.tmp" "$tmp/sed.in" | |
890 cp "$tmp/sed.in" "$tmp/sed.nl" | |
891 echo >>"$tmp/sed.nl" | |
892 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break | |
893 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break | |
894 # 10000 chars as input seems more than enough | |
895 test $_count -gt 10 && break | |
896 _count=`expr $_count + 1` | |
897 if test $_count -gt $_max; then | |
898 _max=$_count | |
899 octave_cv_path_sed=$_sed | |
900 fi | |
901 done | |
4084 | 902 done |
6822 | 903 rm -rf "$tmp" |
904 ]) | |
905 SED=$octave_cv_path_sed | |
8004
4363bc94171a
aclocal.m4 (OCTAVE_PROG_SED): fail if no usable sed is found
John W. Eaton <jwe@octave.org>
parents:
7996
diff
changeset
|
906 if test -z "$SED"; then |
4363bc94171a
aclocal.m4 (OCTAVE_PROG_SED): fail if no usable sed is found
John W. Eaton <jwe@octave.org>
parents:
7996
diff
changeset
|
907 AC_MSG_ERROR([no usable version of sed found]) |
4363bc94171a
aclocal.m4 (OCTAVE_PROG_SED): fail if no usable sed is found
John W. Eaton <jwe@octave.org>
parents:
7996
diff
changeset
|
908 fi |
4084 | 909 fi |
6822 | 910 AC_SUBST(SED) |
4084 | 911 AC_MSG_RESULT([$SED]) |
912 ]) | |
5465 | 913 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
914 dnl Find Perl program. |
5465 | 915 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
916 AC_DEFUN([OCTAVE_PROG_PERL], |
6119 | 917 [AC_CHECK_PROG(PERL, perl, perl, []) |
5465 | 918 AC_SUBST(PERL) |
919 ]) | |
5468 | 920 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
921 dnl Find Python program. |
5495 | 922 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
923 AC_DEFUN([OCTAVE_PROG_PYTHON], |
6119 | 924 [AC_CHECK_PROG(PYTHON, python, python, []) |
5495 | 925 AC_SUBST(PYTHON) |
926 ]) | |
927 dnl | |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
928 dnl Find desktop-file-install program. |
5468 | 929 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
930 AC_DEFUN([OCTAVE_PROG_DESKTOP_FILE_INSTALL], |
6119 | 931 [AC_CHECK_PROG(DESKTOP_FILE_INSTALL, desktop-file-install, desktop-file-install, []) |
5468 | 932 AC_SUBST(DESKTOP_FILE_INSTALL) |
933 ]) | |
934 dnl | |
935 dnl Check for IEEE 754 data format. | |
936 dnl | |
4853 | 937 AC_DEFUN([OCTAVE_IEEE754_DATA_FORMAT], |
938 [AC_MSG_CHECKING([for IEEE 754 data format]) | |
939 AC_CACHE_VAL(octave_cv_ieee754_data_format, | |
5844 | 940 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
4853 | 941 int |
942 main (void) | |
943 { | |
944 typedef union { unsigned char c[8]; double d; } ieeebytes; | |
945 | |
946 ieeebytes l = {0x1c, 0xbc, 0x6e, 0xf2, 0x54, 0x8b, 0x11, 0x43}; | |
947 ieeebytes b = {0x43, 0x11, 0x8b, 0x54, 0xf2, 0x6e, 0xbc, 0x1c}; | |
948 | |
949 return l.d != 1234567891234567.0 && b.d != 1234567891234567.0; | |
5844 | 950 }]])], |
4853 | 951 octave_cv_ieee754_data_format=yes, |
952 octave_cv_ieee754_data_format=no, | |
13957
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
953 octave_cv_ieee754_data_format=yes)]) |
4853 | 954 if test "$cross_compiling" = yes; then |
955 AC_MSG_RESULT([$octave_cv_ieee754_data_format assumed for cross compilation]) | |
956 else | |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
957 AC_MSG_RESULT([$octave_cv_ieee754_data_format]) |
4853 | 958 fi |
959 if test "$octave_cv_ieee754_data_format" = yes; then | |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
960 AC_DEFINE(HAVE_IEEE754_DATA_FORMAT, 1, [Define to 1 if your system uses IEEE 754 data format.]) |
9805
bb70d16cca3b
fail at configure time if IEEE floating point format is not detected
John W. Eaton <jwe@octave.org>
parents:
9794
diff
changeset
|
961 else |
bb70d16cca3b
fail at configure time if IEEE floating point format is not detected
John W. Eaton <jwe@octave.org>
parents:
9794
diff
changeset
|
962 ## If the format is unknown, then you will probably not have a |
bb70d16cca3b
fail at configure time if IEEE floating point format is not detected
John W. Eaton <jwe@octave.org>
parents:
9794
diff
changeset
|
963 ## useful system, so we will abort here. Anyone wishing to |
bb70d16cca3b
fail at configure time if IEEE floating point format is not detected
John W. Eaton <jwe@octave.org>
parents:
9794
diff
changeset
|
964 ## experiment with building Octave on a system without IEEE |
bb70d16cca3b
fail at configure time if IEEE floating point format is not detected
John W. Eaton <jwe@octave.org>
parents:
9794
diff
changeset
|
965 ## floating point should be capable of removing this check and |
bb70d16cca3b
fail at configure time if IEEE floating point format is not detected
John W. Eaton <jwe@octave.org>
parents:
9794
diff
changeset
|
966 ## the one in the octave_ieee_init function in liboctave/lo-ieee.cc. |
bb70d16cca3b
fail at configure time if IEEE floating point format is not detected
John W. Eaton <jwe@octave.org>
parents:
9794
diff
changeset
|
967 AC_MSG_ERROR([IEEE 754 data format required for building Octave]) |
4853 | 968 fi |
969 ]) | |
5505 | 970 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
971 dnl Check for UMFPACK separately split complex matrix and RHS. Note |
5505 | 972 dnl that as umfpack.h can be in three different places, rather than |
973 dnl include it, just declare the functions needed. | |
974 dnl | |
5512 | 975 dnl Assumes that the check for umfpack has already been performed. |
5505 | 976 dnl |
977 AC_DEFUN([OCTAVE_UMFPACK_SEPERATE_SPLIT], | |
978 [AC_MSG_CHECKING([for UMFPACK seperate complex matrix and rhs split]) | |
979 AC_CACHE_VAL(octave_cv_umfpack_seperate_split, | |
5844 | 980 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
5505 | 981 #include <stdlib.h> |
5512 | 982 #if defined (HAVE_UFSPARSE_UMFPACK_h) |
983 #include <ufsparse/umfpack.h> | |
984 #elif defined (HAVE_UMFPACK_UMFPACK_H) | |
985 #include <umfpack/umfpack.h> | |
986 #elif defined (HAVE_UMFPACK_H) | |
987 #include <umfpack.h> | |
988 #endif | |
5505 | 989 int n = 5; |
990 int Ap[] = {0, 2, 5, 9, 10, 12}; | |
991 int Ai[] = {0, 1, 0, 2, 4, 1, 2, 3, 4, 2, 1, 4}; | |
992 double Ax[] = {2., 0., 3., 0., 3., 0., -1., 0., 4., 0., 4., 0., | |
993 -3., 0., 1., 0., 2., 0., 2., 0., 6., 0., 1., 0.}; | |
994 double br[] = {8., 45., -3., 3., 19.}; | |
995 double bi[] = {0., 0., 0., 0., 0.}; | |
996 int main (void) | |
997 { | |
998 double *null = (double *) NULL ; | |
999 double *x = (double *)malloc (2 * n * sizeof(double)); | |
1000 int i ; | |
1001 void *Symbolic, *Numeric ; | |
1002 (void) umfpack_zi_symbolic (n, n, Ap, Ai, Ax, null, &Symbolic, null, null) ; | |
1003 (void) umfpack_zi_numeric (Ap, Ai, Ax, null, Symbolic, &Numeric, null, null) ; | |
1004 umfpack_zi_free_symbolic (&Symbolic) ; | |
1005 (void) umfpack_zi_solve (0, Ap, Ai, Ax, null, x, null, br, bi, | |
1006 Numeric, null, null) ; | |
1007 umfpack_zi_free_numeric (&Numeric) ; | |
1008 for (i = 0; i < n; i++, x+=2) | |
1009 if (fabs(*x - i - 1.) > 1.e-13) | |
1010 return (1); | |
1011 return (0) ; | |
1012 } | |
5844 | 1013 ]])], |
5505 | 1014 octave_cv_umfpack_seperate_split=yes, |
1015 octave_cv_umfpack_seperate_split=no, | |
13957
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1016 octave_cv_umfpack_seperate_split=yes)]) |
5505 | 1017 if test "$cross_compiling" = yes; then |
1018 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split assumed for cross compilation]) | |
1019 else | |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
1020 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split]) |
5505 | 1021 fi |
1022 if test "$octave_cv_umfpack_seperate_split" = yes; then | |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1023 AC_DEFINE(UMFPACK_SEPARATE_SPLIT, 1, [Define to 1 if the UMFPACK Complex solver allow matrix and RHS to be split independently.]) |
5505 | 1024 fi |
1025 ]) | |
6276 | 1026 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1027 dnl Check whether using HDF5 DLL under Windows. This is done by |
6276 | 1028 dnl testing for a data symbol in the HDF5 library, which would |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1029 dnl require the definition of _HDF5USEDL_ under MSVC compiler. |
6276 | 1030 dnl |
1031 AC_DEFUN([OCTAVE_HDF5_DLL], [ | |
1032 AC_CACHE_CHECK([if _HDF5USEDLL_ needs to be defined],octave_cv_hdf5_dll, [ | |
6724 | 1033 AC_TRY_LINK([#include <hdf5.h>], [hid_t x = H5T_NATIVE_DOUBLE; return x], |
6276 | 1034 octave_cv_hdf5_dll=no, [ |
9531
b859079d1644
configure and Makefile fixes for Windows
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9525
diff
changeset
|
1035 save_CFLAGS="$CFLAGS" |
6276 | 1036 CFLAGS="$CFLAGS -DWIN32 -D_HDF5USEDLL_" |
9531
b859079d1644
configure and Makefile fixes for Windows
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9525
diff
changeset
|
1037 save_LIBS="$LIBS" |
b859079d1644
configure and Makefile fixes for Windows
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9525
diff
changeset
|
1038 LIBS="$HDF5_LIBS $LIBS" |
6724 | 1039 AC_TRY_LINK([#include <hdf5.h>], [hid_t x = H5T_NATIVE_DOUBLE; return x], |
6276 | 1040 octave_cv_hdf5_dll=yes, |
1041 octave_cv_hdf5_dll=no) | |
9531
b859079d1644
configure and Makefile fixes for Windows
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9525
diff
changeset
|
1042 CFLAGS="$save_CFLAGS" |
b859079d1644
configure and Makefile fixes for Windows
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9525
diff
changeset
|
1043 LIBS="$save_LIBS"])]) |
6276 | 1044 if test "$octave_cv_hdf5_dll" = yes; then |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1045 AC_DEFINE(_HDF5USEDLL_, 1, [Define to 1 if using HDF5 dll (Win32).]) |
6276 | 1046 fi]) |
6823 | 1047 dnl |
8676 | 1048 dnl Check whether HDF5 library has version 1.6 API functions. |
1049 dnl | |
9892
ac69e6f4b33d
Add HDF5-1.8 compatibility while maintaining compatibility with HDF5-1.6 versions
Kacper Kowalik <xarthisius.kk@gmail.com>
parents:
9865
diff
changeset
|
1050 AC_DEFUN([OCTAVE_HDF5_HAS_ENFORCED_16_API], [ |
ac69e6f4b33d
Add HDF5-1.8 compatibility while maintaining compatibility with HDF5-1.6 versions
Kacper Kowalik <xarthisius.kk@gmail.com>
parents:
9865
diff
changeset
|
1051 AC_CACHE_CHECK([whether HDF5 library has enforced version 1.6 API], |
ac69e6f4b33d
Add HDF5-1.8 compatibility while maintaining compatibility with HDF5-1.6 versions
Kacper Kowalik <xarthisius.kk@gmail.com>
parents:
9865
diff
changeset
|
1052 octave_cv_hdf5_has_enforced_16_api, [ |
8676 | 1053 AC_TRY_LINK([ |
1054 #include <hdf5.h> | |
1055 ], [ | |
1056 H5Eset_auto (0, 0);], [ | |
9892
ac69e6f4b33d
Add HDF5-1.8 compatibility while maintaining compatibility with HDF5-1.6 versions
Kacper Kowalik <xarthisius.kk@gmail.com>
parents:
9865
diff
changeset
|
1057 octave_cv_hdf5_has_enforced_16_api=yes], [ |
ac69e6f4b33d
Add HDF5-1.8 compatibility while maintaining compatibility with HDF5-1.6 versions
Kacper Kowalik <xarthisius.kk@gmail.com>
parents:
9865
diff
changeset
|
1058 octave_cv_hdf5_has_enforced_16_api=no])]) |
ac69e6f4b33d
Add HDF5-1.8 compatibility while maintaining compatibility with HDF5-1.6 versions
Kacper Kowalik <xarthisius.kk@gmail.com>
parents:
9865
diff
changeset
|
1059 if test "$octave_cv_hdf5_has_enforced_16_api" != "yes"; then |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1060 AC_DEFINE(HAVE_HDF5_18, 1, [Define to 1 if >=HDF5-1.8 is available.]) |
8676 | 1061 fi |
1062 ]) | |
1063 dnl | |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1064 dnl Check for the Qhull version. |
6823 | 1065 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
1066 AC_DEFUN([OCTAVE_CHECK_QHULL_VERSION], |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1067 [AC_CACHE_CHECK([for qh_version in $QHULL_LIBS], |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1068 octave_cv_lib_qhull_version, [ |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1069 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
14043
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1070 #include <stdio.h> |
14315
99428221b4e1
build: Add new location for Qhull2012 include files to build system.
Rik <octave@nomad.inbox5.com>
parents:
14147
diff
changeset
|
1071 #if defined (HAVE_LIBQHULL_LIBQHULL_H) |
99428221b4e1
build: Add new location for Qhull2012 include files to build system.
Rik <octave@nomad.inbox5.com>
parents:
14147
diff
changeset
|
1072 # include <libqhull/libqhull.h> |
99428221b4e1
build: Add new location for Qhull2012 include files to build system.
Rik <octave@nomad.inbox5.com>
parents:
14147
diff
changeset
|
1073 # include <libqhull/qset.h> |
99428221b4e1
build: Add new location for Qhull2012 include files to build system.
Rik <octave@nomad.inbox5.com>
parents:
14147
diff
changeset
|
1074 # include <libqhull/geom.h> |
99428221b4e1
build: Add new location for Qhull2012 include files to build system.
Rik <octave@nomad.inbox5.com>
parents:
14147
diff
changeset
|
1075 # include <libqhull/poly.h> |
99428221b4e1
build: Add new location for Qhull2012 include files to build system.
Rik <octave@nomad.inbox5.com>
parents:
14147
diff
changeset
|
1076 # include <libqhull/io.h> |
99428221b4e1
build: Add new location for Qhull2012 include files to build system.
Rik <octave@nomad.inbox5.com>
parents:
14147
diff
changeset
|
1077 #elif defined (HAVE_QHULL_LIBQHULL_H) || defined (HAVE_QHULL_QHULL_H) |
14043
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1078 # if defined (HAVE_QHULL_LIBQHULL_H) |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1079 # include <qhull/libqhull.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1080 # else |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1081 # include <qhull/qhull.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1082 # endif |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1083 # include <qhull/qset.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1084 # include <qhull/geom.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1085 # include <qhull/poly.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1086 # include <qhull/io.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1087 #elif defined (HAVE_LIBQHULL_H) || defined (HAVE_QHULL_H) |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1088 # if defined (HAVE_LIBQHULL_H) |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1089 # include <libqhull.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1090 # else |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1091 # include <qhull.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1092 # endif |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1093 # include <qset.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1094 # include <geom.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1095 # include <poly.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1096 # include <io.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1097 #endif |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1098 ]], [[ |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1099 const char *tmp = qh_version; |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1100 ]])], [octave_cv_lib_qhull_version=yes], [octave_cv_lib_qhull_version=no])]) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1101 if test "$octave_cv_lib_qhull_version" = no; then |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1102 AC_DEFINE(NEED_QHULL_VERSION, 1, |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1103 [Define to 1 if the Qhull library needs a qh_version variable defined.]) |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1104 fi |
6823 | 1105 ]) |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1106 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1107 dnl Check whether Qhull works (does not crash). |
8659
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1108 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
1109 AC_DEFUN([OCTAVE_CHECK_QHULL_OK], |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1110 [AC_CACHE_CHECK([whether the qhull library works], |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1111 octave_cv_lib_qhull_ok, [ |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1112 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
8659
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1113 #include <stdio.h> |
14315
99428221b4e1
build: Add new location for Qhull2012 include files to build system.
Rik <octave@nomad.inbox5.com>
parents:
14147
diff
changeset
|
1114 #if defined (HAVE_LIBQHULL_LIBQHULL_H) |
99428221b4e1
build: Add new location for Qhull2012 include files to build system.
Rik <octave@nomad.inbox5.com>
parents:
14147
diff
changeset
|
1115 # include <libqhull/libqhull.h> |
99428221b4e1
build: Add new location for Qhull2012 include files to build system.
Rik <octave@nomad.inbox5.com>
parents:
14147
diff
changeset
|
1116 # include <libqhull/qset.h> |
99428221b4e1
build: Add new location for Qhull2012 include files to build system.
Rik <octave@nomad.inbox5.com>
parents:
14147
diff
changeset
|
1117 # include <libqhull/geom.h> |
99428221b4e1
build: Add new location for Qhull2012 include files to build system.
Rik <octave@nomad.inbox5.com>
parents:
14147
diff
changeset
|
1118 # include <libqhull/poly.h> |
99428221b4e1
build: Add new location for Qhull2012 include files to build system.
Rik <octave@nomad.inbox5.com>
parents:
14147
diff
changeset
|
1119 # include <libqhull/io.h> |
99428221b4e1
build: Add new location for Qhull2012 include files to build system.
Rik <octave@nomad.inbox5.com>
parents:
14147
diff
changeset
|
1120 #elif defined (HAVE_QHULL_LIBQHULL_H) || defined (HAVE_QHULL_QHULL_H) |
14043
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1121 # if defined (HAVE_QHULL_LIBQHULL_H) |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1122 # include <qhull/libqhull.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1123 # else |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1124 # include <qhull/qhull.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1125 # endif |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1126 # include <qhull/qset.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1127 # include <qhull/geom.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1128 # include <qhull/poly.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1129 # include <qhull/io.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1130 #elif defined (HAVE_LIBQHULL_H) || defined (HAVE_QHULL_H) |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1131 # if defined (HAVE_LIBQHULL_H) |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1132 # include <libqhull.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1133 # else |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1134 # include <qhull.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1135 # endif |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1136 # include <qset.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1137 # include <geom.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1138 # include <poly.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1139 # include <io.h> |
f913363318e0
handle new names and locations of qhull include files (bug #33712)
John W. Eaton <jwe@octave.org>
parents:
13957
diff
changeset
|
1140 #endif |
8659
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1141 #ifdef NEED_QHULL_VERSION |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1142 char *qh_version = "version"; |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1143 #endif |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1144 ]], [[ |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1145 int dim = 2; |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1146 int n = 4; |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1147 coordT points[8] = { -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, 0.5 }; |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1148 boolT ismalloc = 0; |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1149 return qh_new_qhull (dim, n, points, ismalloc, "qhull ", 0, stderr); |
13957
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1150 ]])], |
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1151 [octave_cv_lib_qhull_ok=yes], |
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1152 [octave_cv_lib_qhull_ok=no], |
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1153 [octave_cv_lib_qhull_ok=yes])]) |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1154 if test "$octave_cv_lib_qhull_ok" = "yes"; then |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1155 $1 |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1156 else |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1157 $2 |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
1158 fi |
8659
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1159 ]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1160 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1161 dnl Check whether ARPACK works (does not crash). |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1162 dnl |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1163 dnl Using a pure Fortran program doesn't seem to crash when linked |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1164 dnl with the buggy ARPACK library but the C++ program does. Maybe it |
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1165 dnl is the memory allocation that exposes the bug and using statically |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1166 dnl allocated arrays in Fortran does not? |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1167 dnl |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1168 AC_DEFUN([OCTAVE_CHECK_ARPACK_OK], [ |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1169 AC_LANG_PUSH(C++) |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1170 AC_CACHE_CHECK([whether the arpack library works], |
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1171 [octave_cv_lib_arpack_ok], [ |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1172 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1173 // External functions from ARPACK library |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1174 extern "C" int |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1175 F77_FUNC (dnaupd, DNAUPD) (int&, const char *, const int&, const char *, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1176 int&, const double&, double*, const int&, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1177 double*, const int&, int*, int*, double*, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1178 double*, const int&, int&, long int, long int); |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1179 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1180 extern "C" int |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1181 F77_FUNC (dneupd, DNEUPD) (const int&, const char *, int*, double*, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1182 double*, double*, const int&, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1183 const double&, const double&, double*, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1184 const char*, const int&, const char *, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1185 int&, const double&, double*, const int&, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1186 double*, const int&, int*, int*, double*, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1187 double*, const int&, int&, long int, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1188 long int, long int); |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1189 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1190 extern "C" int |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1191 F77_FUNC (dgemv, DGEMV) (const char *, const int&, const int&, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1192 const double&, const double*, const int&, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1193 const double*, const int&, const double&, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1194 double*, const int&, long int); |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1195 |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1196 #include <cfloat> |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1197 |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1198 void |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1199 doit (void) |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1200 { |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1201 // Based on function EigsRealNonSymmetricMatrix from liboctave/eigs-base.cc. |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1202 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1203 // Problem matrix. See bug #31479 |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1204 int n = 4; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1205 double *m = new double [n * n]; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1206 m[0] = 1, m[4] = 0, m[8] = 0, m[12] = -1; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1207 m[1] = 0, m[5] = 1, m[9] = 0, m[13] = 0; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1208 m[2] = 0, m[6] = 0, m[10] = 1, m[14] = 0; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1209 m[3] = 0, m[7] = 0, m[11] = 2, m[15] = 1; |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1210 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1211 double *resid = new double [4]; |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1212 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1213 resid[0] = 0.960966; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1214 resid[1] = 0.741195; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1215 resid[2] = 0.150143; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1216 resid[3] = 0.868067; |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1217 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1218 int *ip = new int [11]; |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1219 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1220 ip[0] = 1; // ishift |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1221 ip[1] = 0; // ip[1] not referenced |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1222 ip[2] = 300; // mxiter, maximum number of iterations |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1223 ip[3] = 1; // NB blocksize in recurrence |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1224 ip[4] = 0; // nconv, number of Ritz values that satisfy convergence |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1225 ip[5] = 0; // ip[5] not referenced |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1226 ip[6] = 1; // mode |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1227 ip[7] = 0; // ip[7] to ip[10] are return values |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1228 ip[8] = 0; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1229 ip[9] = 0; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1230 ip[10] = 0; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1231 |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1232 int *ipntr = new int [14]; |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1233 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1234 int k = 1; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1235 int p = 3; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1236 int lwork = 3 * p * (p + 2); |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1237 |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1238 double *v = new double [n * (p + 1)]; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1239 double *workl = new double [lwork + 1]; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1240 double *workd = new double [3 * n + 1]; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1241 |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1242 int ido = 0; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1243 int info = 0; |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1244 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1245 double tol = DBL_EPSILON; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1246 |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1247 do |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1248 { |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1249 F77_FUNC (dnaupd, DNAUPD) (ido, "I", n, "LM", k, tol, resid, p, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1250 v, n, ip, ipntr, workd, workl, lwork, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1251 info, 1L, 2L); |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1252 |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1253 if (ido == -1 || ido == 1 || ido == 2) |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1254 { |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1255 double *x = workd + ipntr[0] - 1; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1256 double *y = workd + ipntr[1] - 1; |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1257 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1258 F77_FUNC (dgemv, DGEMV) ("N", n, n, 1.0, m, n, x, 1, 0.0, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1259 y, 1, 1L); |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1260 } |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1261 else |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1262 { |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1263 if (info < 0) |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1264 { |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1265 return; // Error |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1266 } |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1267 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1268 break; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1269 } |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1270 } |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1271 while (1); |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1272 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1273 int *sel = new int [p]; |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1274 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1275 // In Octave, the dimensions of dr and di are k+1, but k+2 avoids segfault |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1276 double *dr = new double [k + 1]; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1277 double *di = new double [k + 1]; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1278 double *workev = new double [3 * p]; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1279 |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1280 for (int i = 0; i < k + 1; i++) |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1281 dr[i] = di[i] = 0.; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1282 |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1283 int rvec = 1; |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1284 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1285 double sigmar = 0.0; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1286 double sigmai = 0.0; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1287 |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1288 // In Octave, this is n*(k+1), but k+2 avoids segfault |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1289 double *z = new double [n * (k + 1)]; |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1290 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1291 F77_FUNC (dneupd, DNEUPD) (rvec, "A", sel, dr, di, z, n, sigmar, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1292 sigmai, workev, "I", n, "LM", k, tol, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1293 resid, p, v, n, ip, ipntr, workd, |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1294 workl, lwork, info, 1L, 1L, 2L); |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1295 } |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1296 ]], [[ |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1297 for (int i = 0; i < 10; i++) |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1298 doit (); |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1299 ]])], |
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1300 [octave_cv_lib_arpack_ok=yes], |
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1301 [octave_cv_lib_arpack_ok=no], |
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1302 [octave_cv_lib_arpack_ok=yes])]) |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
1303 AC_LANG_POP(C++) |
14144
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1304 if test "$octave_cv_lib_arpack_ok" = "yes"; then |
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1305 $1 |
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1306 else |
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1307 $2 |
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1308 fi |
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1309 ]) |
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1310 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1311 dnl Check for OpenGL. If found, define OPENGL_LIBS. |
12166
eceacb78aa7f
don't add -L/usr/X11R6/lib to LDFLAGS in check for OpenGL libraries
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
1312 dnl |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1313 dnl FIXME: The following tests should probably check for the |
12166
eceacb78aa7f
don't add -L/usr/X11R6/lib to LDFLAGS in check for OpenGL libraries
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
1314 dnl libraries separately. |
eceacb78aa7f
don't add -L/usr/X11R6/lib to LDFLAGS in check for OpenGL libraries
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
1315 dnl |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1316 dnl FIXME: Should we allow a way to specify a directory for OpenGL |
12166
eceacb78aa7f
don't add -L/usr/X11R6/lib to LDFLAGS in check for OpenGL libraries
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
1317 dnl libraries and header files? |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1318 dnl |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1319 AC_DEFUN([OCTAVE_OPENGL], [ |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1320 OPENGL_LIBS= |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1321 |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1322 ### On MacOSX systems the OpenGL framework can be used |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1323 OCTAVE_HAVE_FRAMEWORK(OpenGL, [ |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1324 #include <OpenGL/gl.h> |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1325 #include <OpenGL/glu.h> ], [GLint par; glGetIntegerv (GL_VIEWPORT, &par);], |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1326 [have_framework_opengl="yes"], [have_framework_opengl="no"]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1327 |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1328 if test $have_framework_opengl = "yes"; then |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1329 AC_DEFINE(HAVE_FRAMEWORK_OPENGL, 1, [Define to 1 if framework OPENGL is available.]) |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1330 OPENGL_LIBS="-Wl,-framework -Wl,OpenGL" |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1331 AC_MSG_NOTICE([adding -Wl,-framework -Wl,OpenGL to OPENGL_LIBS]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1332 OCTAVE_GLUTESSCALLBACK_THREEDOTS |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1333 else |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1334 case $canonical_host_type in |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1335 *-*-mingw32* | *-*-msdosmsvc) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1336 AC_CHECK_HEADERS(windows.h) |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1337 ;; |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1338 esac |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1339 have_opengl_incs=no |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1340 AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h], [ |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1341 AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h], [ |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1342 have_opengl_incs=yes; break], [], [ |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1343 #ifdef HAVE_WINDOWS_H |
7954 | 1344 #include <windows.h> |
1345 #endif | |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1346 ]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1347 break |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1348 ], [], [ |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1349 #ifdef HAVE_WINDOWS_H |
7954 | 1350 #include <windows.h> |
1351 #endif | |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1352 ]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1353 |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1354 if test "$have_opengl_incs" = "yes"; then |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1355 case $canonical_host_type in |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1356 *-*-mingw32* | *-*-msdosmsvc) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1357 save_LIBS="$LIBS" |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1358 LIBS="$LIBS -lopengl32" |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1359 AC_MSG_CHECKING([for glEnable in -lopengl32]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1360 AC_TRY_LINK([ |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1361 #if HAVE_WINDOWS_H |
7954 | 1362 #include <windows.h> |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1363 #endif |
7954 | 1364 #if defined (HAVE_GL_GL_H) |
1365 #include <GL/gl.h> | |
1366 #elif defined (HAVE_OPENGL_GL_H) | |
1367 #include <OpenGL/gl.h> | |
1368 #endif | |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1369 ], [glEnable(GL_SMOOTH);], OPENGL_LIBS="-lopengl32 -lglu32") |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1370 LIBS="$save_LIBS" |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1371 if test "x$OPENGL_LIBS" != "x"; then |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1372 AC_MSG_RESULT(yes) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1373 else |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1374 AC_MSG_RESULT(no) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1375 fi |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1376 ;; |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1377 *) |
12166
eceacb78aa7f
don't add -L/usr/X11R6/lib to LDFLAGS in check for OpenGL libraries
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
1378 AC_CHECK_LIB(GL, glEnable, OPENGL_LIBS="-lGL -lGLU") |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1379 ;; |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1380 esac |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1381 fi |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1382 fi |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1383 AC_SUBST(OPENGL_LIBS) |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1384 ]) |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1385 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1386 dnl Check if function gluTessCallback is called with "(...)". |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1387 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
1388 AC_DEFUN([OCTAVE_GLUTESSCALLBACK_THREEDOTS], |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1389 [AC_CACHE_CHECK([whether gluTessCallback is called with "(...)"], |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1390 octave_cv_glutesscallback_threedots, |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1391 [AC_LANG_PUSH(C++) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1392 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1393 #ifdef HAVE_GL_GLU_H |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1394 #include <GL/glu.h> |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1395 #elif defined HAVE_OPENGL_GLU_H || defined HAVE_FRAMEWORK_OPENGL |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1396 #include <OpenGL/glu.h> |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1397 #endif]], |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1398 [[GLvoid (*func)(...); gluTessCallback(0, 0, func);]])], |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1399 octave_cv_glutesscallback_threedots="yes", octave_cv_glutesscallback_threedots="no")]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1400 AC_LANG_POP(C++) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1401 if test $octave_cv_glutesscallback_threedots = "yes"; then |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1402 AC_DEFINE(HAVE_GLUTESSCALLBACK_THREEDOTS, 1, |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1403 [Define to 1 if gluTessCallback is called with (...).]) |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1404 fi |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1405 ]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1406 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1407 dnl Check for support of OpenMP with a given compiler flag. |
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1408 dnl If found define HAVE_OPENMP and add the compile flag |
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1409 dnl to CFLAGS and CXXFLAGS. |
10471
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1410 dnl |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1411 AC_DEFUN([OCTAVE_CHECK_OPENMP], |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1412 [AC_MSG_CHECKING([for support of OpenMP]) |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1413 XCFLAGS="$CFLAGS" |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1414 CFLAGS="$CFLAGS $1" |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1415 AC_CACHE_VAL(octave_cv_check_openmp,[ |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1416 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1417 #include <omp.h> |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1418 #include <stdio.h> |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1419 ]], [[ |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1420 int main(int argc, char* argv[]) |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1421 { |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1422 _Pragma("omp parallel") |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1423 printf("Hello, world.\n"); |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1424 return 0; |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1425 } |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1426 ]])],octave_cv_openmp=yes, octave_cv_openmmp=no, octave_cv_openmp=no)]) |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1427 AC_MSG_RESULT($octave_cv_openmp) |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1428 if test "$octave_cv_openmp" = yes; then |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1429 AC_DEFINE(HAVE_OPENMP,1,[Define to 1 if compiler supports OpenMP.]) |
10471
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1430 CXXFLAGS="$CXXFLAGS $1" |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1431 else |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1432 CFLAGS="$XCFLAGS" |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1433 fi |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1434 ]) |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
1435 dnl |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1436 dnl Configure paths for FreeType2 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1437 dnl Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1438 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1439 dnl Copyright 2001, 2003 by |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1440 dnl David Turner, Robert Wilhelm, and Werner Lemberg. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1441 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1442 dnl This file is part of the FreeType project, and may only be used, modified, |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1443 dnl and distributed under the terms of the FreeType project license, |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1444 dnl LICENSE.TXT. By continuing to use, modify, or distribute this file you |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1445 dnl indicate that you have read the license and understand and accept it |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1446 dnl fully. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1447 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1448 dnl As a special exception to the FreeType project license, this file may be |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1449 dnl distributed as part of a program that contains a configuration script |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1450 dnl generated by Autoconf, under the same distribution terms as the rest of |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1451 dnl that program. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1452 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1453 dnl serial 2 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1454 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1455 dnl AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1456 dnl Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1457 dnl MINIMUM-VERSION is what libtool reports; the default is `7.0.1' (this is |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1458 dnl FreeType 2.0.4). |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1459 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1460 AC_DEFUN([AC_CHECK_FT2], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1461 [dnl Get the cflags and libraries from the freetype-config script |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1462 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1463 AC_ARG_WITH([ft-prefix], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1464 dnl don't quote AS_HELP_STRING! |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1465 AS_HELP_STRING([--with-ft-prefix=PREFIX], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1466 [Prefix where FreeType is installed (optional)]), |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1467 [ft_config_prefix="$withval"], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1468 [ft_config_prefix=""]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1469 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1470 AC_ARG_WITH([ft-exec-prefix], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1471 dnl don't quote AS_HELP_STRING! |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1472 AS_HELP_STRING([--with-ft-exec-prefix=PREFIX], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1473 [Exec prefix where FreeType is installed (optional)]), |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1474 [ft_config_exec_prefix="$withval"], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1475 [ft_config_exec_prefix=""]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1476 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1477 AC_ARG_ENABLE([freetypetest], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1478 dnl don't quote AS_HELP_STRING! |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1479 AS_HELP_STRING([--disable-freetypetest], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1480 [Do not try to compile and run a test FreeType program]), |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1481 [], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1482 [enable_fttest=yes]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1483 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1484 if test x$ft_config_exec_prefix != x ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1485 ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1486 if test x${FT2_CONFIG+set} != xset ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1487 FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1488 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1489 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1490 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1491 if test x$ft_config_prefix != x ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1492 ft_config_args="$ft_config_args --prefix=$ft_config_prefix" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1493 if test x${FT2_CONFIG+set} != xset ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1494 FT2_CONFIG=$ft_config_prefix/bin/freetype-config |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1495 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1496 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1497 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1498 AC_PATH_PROG([FT2_CONFIG], [freetype-config], [no]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1499 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1500 min_ft_version=m4_if([$1], [], [7.0.1], [$1]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1501 AC_MSG_CHECKING([for FreeType -- version >= $min_ft_version]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1502 no_ft="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1503 if test "$FT2_CONFIG" = "no" ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1504 no_ft=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1505 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1506 FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1507 FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1508 ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1509 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1510 ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1511 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1512 ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1513 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1514 ft_min_major_version=`echo $min_ft_version | \ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1515 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1516 ft_min_minor_version=`echo $min_ft_version | \ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1517 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1518 ft_min_micro_version=`echo $min_ft_version | \ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1519 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1520 if test x$enable_fttest = xyes ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1521 ft_config_is_lt="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1522 if test $ft_config_major_version -lt $ft_min_major_version ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1523 ft_config_is_lt=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1524 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1525 if test $ft_config_major_version -eq $ft_min_major_version ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1526 if test $ft_config_minor_version -lt $ft_min_minor_version ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1527 ft_config_is_lt=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1528 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1529 if test $ft_config_minor_version -eq $ft_min_minor_version ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1530 if test $ft_config_micro_version -lt $ft_min_micro_version ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1531 ft_config_is_lt=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1532 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1533 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1534 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1535 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1536 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1537 if test x$ft_config_is_lt = xyes ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1538 no_ft=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1539 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1540 ac_save_CFLAGS="$CFLAGS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1541 ac_save_LIBS="$LIBS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1542 CFLAGS="$CFLAGS $FT2_CFLAGS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1543 LIBS="$FT2_LIBS $LIBS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1544 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1545 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1546 dnl Sanity checks for the results of freetype-config to some extent. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1547 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1548 AC_RUN_IFELSE([ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1549 AC_LANG_SOURCE([[ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1550 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1551 #include <ft2build.h> |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1552 #include FT_FREETYPE_H |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1553 #include <stdio.h> |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1554 #include <stdlib.h> |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1555 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1556 int |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1557 main() |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1558 { |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1559 FT_Library library; |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1560 FT_Error error; |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1561 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1562 error = FT_Init_FreeType(&library); |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1563 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1564 if (error) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1565 return 1; |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1566 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1567 { |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1568 FT_Done_FreeType(library); |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1569 return 0; |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1570 } |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1571 } |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1572 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1573 ]]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1574 ], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1575 [], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1576 [no_ft=yes], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1577 [echo $ECHO_N "cross compiling; assuming OK... $ECHO_C"]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1578 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1579 CFLAGS="$ac_save_CFLAGS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1580 LIBS="$ac_save_LIBS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1581 fi dnl test $ft_config_version -lt $ft_min_version |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1582 fi dnl test x$enable_fttest = xyes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1583 fi dnl test "$FT2_CONFIG" = "no" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1584 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1585 if test x$no_ft = x ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1586 AC_MSG_RESULT([yes]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1587 m4_if([$2], [], [:], [$2]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1588 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1589 AC_MSG_RESULT([no]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1590 if test "$FT2_CONFIG" = "no" ; then |
14657
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1591 warn_ft2_config = " |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1592 |
14657
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1593 The freetype-config script installed by FreeType 2 could not be found. |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1594 If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in your |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1595 path, or set the FT2_CONFIG environment variable to the full path to |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1596 freetype-config. |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1597 " |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1598 OCTAVE_CONFIGURE_WARNING([warn_ft2_config]) |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1599 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1600 if test x$ft_config_is_lt = xyes ; then |
14657
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1601 warn_ft2_too_old=" |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1602 |
14657
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1603 Your installed version of the FreeType 2 library is too old. If you |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1604 have different versions of FreeType 2, make sure that correct values |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1605 for --with-ft-prefix or --with-ft-exec-prefix are used, or set the |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1606 FT2_CONFIG environment variable to the full path to freetype-config. |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1607 " |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1608 OCTAVE_CONFIGURE_WARNING([warn_ft2_too_old]) |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1609 else |
14657
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1610 warn_ft2_failed=" |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1611 |
14657
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1612 The FreeType test program failed to run. If your system uses shared |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1613 libraries and they are installed outside the normal system library |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1614 path, make sure the variable LD_LIBRARY_PATH (or whatever is |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1615 appropiate for your system) is correctly set. |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1616 " |
8a84849ad986
build: Restore printing some summary ./configure warnings at the end
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14605
diff
changeset
|
1617 OCTAVE_CONFIGURE_WARNING([warn_ft2_failed]) |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1618 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1619 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1620 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1621 FT2_CFLAGS="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1622 FT2_LIBS="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1623 m4_if([$3], [], [:], [$3]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1624 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1625 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1626 AC_SUBST([FT2_CFLAGS]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1627 AC_SUBST([FT2_LIBS])]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1628 dnl end of freetype2.m4 |
8169
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1629 |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1630 dnl |
8998
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1631 dnl Check whether a math mapper function is available in <cmath>. |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1632 dnl Will define HAVE_CMATH_FUNC if there is a double variant and |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1633 dnl HAVE_CMATH_FUNCF if there is a float variant. |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1634 dnl Currently capable of checking for functions with single |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1635 dnl argument and returning bool/int/real. |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1636 dnl |
8998
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1637 AC_DEFUN([OCTAVE_CMATH_FUNC],[ |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1638 AC_MSG_CHECKING([for std::$1 in <cmath>]) |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1639 AC_LANG_PUSH(C++) |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1640 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1641 #include <cmath> |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1642 void take_func (bool (*func) (double x)); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1643 void take_func (int (*func) (double x)); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1644 void take_func (double (*func) (double x)); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1645 ]], |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1646 [[ |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1647 take_func(std::$1); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1648 ]])], |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1649 [AC_MSG_RESULT([yes]) |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1650 AC_DEFINE(HAVE_CMATH_[]AS_TR_CPP($1),1,[Define to 1 if <cmath> provides $1.])], |
8998
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1651 [AC_MSG_RESULT([no])]) |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1652 AC_MSG_CHECKING([for std::$1 (float variant) in <cmath>]) |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1653 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1654 #include <cmath> |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1655 void take_func (bool (*func) (float x)); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1656 void take_func (int (*func) (float x)); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1657 void take_func (float (*func) (float x)); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1658 ]], |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1659 [[ |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1660 take_func(std::$1); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1661 ]])], |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1662 [AC_MSG_RESULT([yes]) |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1663 AC_DEFINE(HAVE_CMATH_[]AS_TR_CPP($1)F,1,[Define to 1 if <cmath> provides float variant of $1.])], |
8998
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1664 [AC_MSG_RESULT([no])]) |
9049 | 1665 AC_LANG_POP(C++) |
8998
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1666 ]) |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1667 |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1668 dnl |
8169
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1669 dnl Check whether fast signed integer arithmetics using bit tricks |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1670 dnl can be used in oct-inttypes.h. Defines HAVE_FAST_INT_OPS if |
8169
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1671 dnl the following conditions hold: |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1672 dnl 1. Signed numbers are represented by twos complement |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1673 dnl (see <http://en.wikipedia.org/wiki/Two%27s_complement>) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1674 dnl 2. static_cast to unsigned int counterpart works like interpreting |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1675 dnl the signed bit pattern as unsigned (and is thus zero-cost). |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1676 dnl 3. Signed addition and subtraction yield the same bit results as unsigned. |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1677 dnl (We use casts to prevent optimization interference, so there is no |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1678 dnl need for things like -ftrapv). |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1679 dnl 4. Bit operations on signed integers work like on unsigned integers, |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1680 dnl except for the shifts. Shifts are arithmetic. |
8169
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1681 dnl |
13957
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1682 AC_DEFUN([OCTAVE_FAST_INT_OPS], |
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1683 [AC_CACHE_CHECK([whether fast integer arithmetics is usable], |
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1684 octave_cv_fast_int_ops, |
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1685 [AC_LANG_PUSH(C++) |
8169
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1686 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1687 #include <limits> |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1688 template<class UT, class ST> |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1689 static bool |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1690 do_test (UT, ST) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1691 { |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1692 volatile ST s = std::numeric_limits<ST>::min () / 3; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1693 volatile UT u = static_cast<UT> (s); |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1694 if (*(reinterpret_cast<volatile ST *> (&u)) != s) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1695 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1696 u = 0; u = ~u; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1697 if (*(reinterpret_cast<volatile ST *> (&u)) != -1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1698 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1699 ST sx, sy; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1700 sx = std::numeric_limits<ST>::max () / 2 + 1; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1701 sy = std::numeric_limits<ST>::max () / 2 + 2; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1702 if (static_cast<ST> (static_cast<UT> (sx) + static_cast<UT> (sy)) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1703 != std::numeric_limits<ST>::min () + 1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1704 if (static_cast<ST> (static_cast<UT> (sx) - static_cast<UT> (sy)) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1705 != -1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1706 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1707 if ((sx & sy) != (static_cast<UT> (sx) & static_cast<UT> (sy))) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1708 return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1709 if ((sx | sy) != (static_cast<UT> (sx) | static_cast<UT> (sy))) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1710 return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1711 if ((sx ^ sy) != (static_cast<UT> (sx) ^ static_cast<UT> (sy))) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1712 return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1713 if ((-1 >> 1) != -1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1714 return false; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1715 } |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1716 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1717 #define DO_TEST(T) \ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1718 if (do_test (static_cast<unsigned T> (0), static_cast<signed T> (0))) \ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1719 return sizeof (T); |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1720 ]],[[ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1721 DO_TEST(char) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1722 DO_TEST(short) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1723 DO_TEST(int) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1724 DO_TEST(long) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1725 #if (defined(HAVE_LONG_LONG_INT) && defined(HAVE_UNSIGNED_LONG_LONG_INT)) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1726 DO_TEST(long long) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1727 #endif |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1728 ]])], |
13957
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1729 [octave_cv_fast_int_ops=yes], |
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1730 [octave_cv_fast_int_ops=no], |
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1731 [octave_cv_fast_int_ops=yes]) |
8169
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1732 AC_LANG_POP(C++)]) |
13957
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1733 if test $octave_cv_fast_int_ops = yes; then |
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1734 AC_DEFINE(HAVE_FAST_INT_OPS, 1, |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1735 [Define to 1 if signed integers use two's complement.]) |
13957
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1736 fi |
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
1737 ]) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1738 dnl |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1739 dnl Check to see if the compiler and the linker can handle the flags |
8635
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1740 dnl "-framework $1" for the given prologue $2 and the given body $3 of |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1741 dnl a source file. Arguments 2 and 3 optionally can also be empty. |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1742 dnl Add options (lower case letters $1) "--with-framework-$1" and |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1743 dnl "--without-framework-$1". If this test is successful then perform |
8635
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1744 dnl $4, otherwise do $5. |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1745 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
1746 AC_DEFUN([OCTAVE_HAVE_FRAMEWORK], [ |
10012
2441327485a3
use m4 quating in aclocal.m4 autoconf macros with variable expansion
Rik <rdrider0-list@yahoo.com>
parents:
10011
diff
changeset
|
1747 AC_MSG_CHECKING([whether ${LD-ld} accepts -framework $1]) |
8635
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1748 AC_CACHE_VAL(octave_cv_framework_$1, [ |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1749 XLDFLAGS="$LDFLAGS" |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1750 LDFLAGS="$LDFLAGS -framework $1" |
8635
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1751 AC_LANG_PUSH(C++) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1752 AC_LINK_IFELSE([AC_LANG_PROGRAM([$2], [$3])], |
8635
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1753 eval "octave_cv_framework_$1=yes", |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1754 eval "octave_cv_framework_$1=no") |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1755 AC_LANG_POP(C++) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1756 LDFLAGS="$XLDFLAGS" |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1757 ]) |
8635
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1758 if test "$octave_cv_framework_$1" = "yes"; then |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1759 AC_MSG_RESULT(yes) |
8635
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1760 AC_ARG_WITH(framework-m4_tolower($1), |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1761 [AS_HELP_STRING([--without-framework-m4_tolower($1)], |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1762 [don't use framework $1])], |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1763 with_have_framework=$withval, with_have_framework="yes") |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1764 if test "$with_have_framework" = "yes"; then |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1765 [$4] |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1766 else |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1767 AC_MSG_NOTICE([framework rejected by --without-framework-m4_tolower($1)]) |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1768 [$5] |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1769 fi |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1770 else |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1771 AC_MSG_RESULT(no) |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1772 [$5] |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1773 fi |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1774 ]) |
9403
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1775 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1776 ############################################################################## |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1777 ############################################################################## |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1778 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1779 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1780 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1781 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1782 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1783 # This program is free software; you can redistribute it and/or modify |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1784 # it under the terms of the GNU General Public License as published by |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1785 # the Free Software Foundation; either version 2 of the License, or |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1786 # (at your option) any later version. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1787 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1788 # This program is distributed in the hope that it will be useful, but |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1789 # WITHOUT ANY WARRANTY; without even the implied warranty of |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1790 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1791 # General Public License for more details. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1792 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1793 # You should have received a copy of the GNU General Public License |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1794 # along with this program; if not, write to the Free Software |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1795 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1796 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1797 # As a special exception to the GNU General Public License, if you |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1798 # distribute this file as part of a program that contains a |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1799 # configuration script generated by Autoconf, you may include it under |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1800 # the same distribution terms that you use for the rest of that program. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1801 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1802 # PKG_PROG_PKG_CONFIG([MIN-VERSION]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1803 # ---------------------------------- |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1804 AC_DEFUN([PKG_PROG_PKG_CONFIG], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1805 [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1806 m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1807 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1808 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1809 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1810 fi |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1811 if test -n "$PKG_CONFIG"; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1812 _pkg_min_version=m4_default([$1], [0.9.0]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1813 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1814 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1815 AC_MSG_RESULT([yes]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1816 else |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1817 AC_MSG_RESULT([no]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1818 PKG_CONFIG="" |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1819 fi |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1820 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1821 fi[]dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1822 ])# PKG_PROG_PKG_CONFIG |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1823 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1824 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1825 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1826 # Check to see whether a particular set of modules exists. Similar |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1827 # to PKG_CHECK_MODULES(), but does not set variables or print errors. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1828 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1829 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1830 # Similar to PKG_CHECK_MODULES, make sure that the first instance of |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1831 # this or PKG_CHECK_MODULES is called, or make sure to call |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1832 # PKG_CHECK_EXISTS manually |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1833 # -------------------------------------------------------------- |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1834 AC_DEFUN([PKG_CHECK_EXISTS], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1835 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1836 if test -n "$PKG_CONFIG" && \ |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1837 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1838 m4_ifval([$2], [$2], [:]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1839 m4_ifvaln([$3], [else |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1840 $3])dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1841 fi]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1842 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1843 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1844 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1845 # --------------------------------------------- |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1846 m4_define([_PKG_CONFIG], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1847 [if test -n "$PKG_CONFIG"; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1848 if test -n "$$1"; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1849 pkg_cv_[]$1="$$1" |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1850 else |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1851 PKG_CHECK_EXISTS([$3], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1852 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1853 [pkg_failed=yes]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1854 fi |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1855 else |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1856 pkg_failed=untried |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1857 fi[]dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1858 ])# _PKG_CONFIG |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1859 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1860 # _PKG_SHORT_ERRORS_SUPPORTED |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1861 # ----------------------------- |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1862 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1863 [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1864 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1865 _pkg_short_errors_supported=yes |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1866 else |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1867 _pkg_short_errors_supported=no |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1868 fi[]dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1869 ])# _PKG_SHORT_ERRORS_SUPPORTED |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1870 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1871 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1872 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1873 # [ACTION-IF-NOT-FOUND]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1874 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1875 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1876 # Note that if there is a possibility the first call to |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1877 # PKG_CHECK_MODULES might not happen, you should be sure to include an |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1878 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1879 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1880 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1881 # -------------------------------------------------------------- |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1882 AC_DEFUN([PKG_CHECK_MODULES], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1883 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1884 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1885 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1886 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1887 pkg_failed=no |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1888 AC_MSG_CHECKING([for $1]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1889 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1890 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1891 _PKG_CONFIG([$1][_LIBS], [libs], [$2]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1892 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1893 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1894 and $1[]_LIBS to avoid the need to call pkg-config. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1895 See the pkg-config man page for more details.]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1896 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1897 if test $pkg_failed = yes; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1898 _PKG_SHORT_ERRORS_SUPPORTED |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1899 if test $_pkg_short_errors_supported = yes; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1900 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1901 else |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1902 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1903 fi |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1904 # Put the nasty error message in config.log where it belongs |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1905 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1906 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1907 ifelse([$4], , [AC_MSG_ERROR(dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1908 [Package requirements ($2) were not met: |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1909 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1910 $$1_PKG_ERRORS |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1911 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1912 Consider adjusting the PKG_CONFIG_PATH environment variable if you |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1913 installed software in a non-standard prefix. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1914 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1915 _PKG_TEXT |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1916 ])], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1917 [AC_MSG_RESULT([no]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1918 $4]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1919 elif test $pkg_failed = untried; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1920 ifelse([$4], , [AC_MSG_FAILURE(dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1921 [The pkg-config script could not be found or is too old. Make sure it |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1922 is in your PATH or set the PKG_CONFIG environment variable to the full |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1923 path to pkg-config. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1924 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1925 _PKG_TEXT |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1926 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1927 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1928 [$4]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1929 else |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1930 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1931 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1932 AC_MSG_RESULT([yes]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1933 ifelse([$3], , :, [$3]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1934 fi[]dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1935 ])# PKG_CHECK_MODULES |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1936 |
9645 | 1937 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1938 dnl Include external macros. |
9645 | 1939 dnl |
1940 | |
10951 | 1941 m4_include([m4/ax_pthread.m4]) |
1942 m4_include([m4/ax_blas.m4]) | |
1943 m4_include([m4/ax_blas_f77_func.m4]) | |
1944 m4_include([m4/ax_lapack.m4]) |