Mercurial > octave
annotate m4/acinclude.m4 @ 24873:486bc22482ca
Improve Doxygen generation.
* configure.ac: Display the output of detected qhelpgenerator
* m4/acinclude.m4: Detect qhelpgenerator alongside with other QT tools.
* doc/doxyhtml/Doxyfile.in: Enable build of Qt Compressed Help (.qch) files.
Pushed by Kai T. Ohlhus <k.ohlhus@gmail.com>
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Wed, 14 Mar 2018 12:27:19 +0100 |
parents | ae6679369a80 |
children | 7c7b60dd4d4c |
rev | line source |
---|---|
1232 | 1 dnl aclocal.m4 -- extra macros for configuring Octave |
2 dnl | |
23219
3ac9f9ecfae5
maint: Update copyright dates.
John W. Eaton <jwe@octave.org>
parents:
23174
diff
changeset
|
3 dnl Copyright (C) 1995-2017 John W. Eaton |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
4 dnl |
1232 | 5 dnl This file is part of Octave. |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
6 dnl |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24446
diff
changeset
|
7 dnl Octave is free software: you can redistribute it and/or modify it |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22509
diff
changeset
|
8 dnl under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24446
diff
changeset
|
9 dnl the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22509
diff
changeset
|
10 dnl (at your option) any later version. |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
11 dnl |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22509
diff
changeset
|
12 dnl Octave is distributed in the hope that it will be useful, but |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22509
diff
changeset
|
13 dnl WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22509
diff
changeset
|
14 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22509
diff
changeset
|
15 dnl GNU General Public License for more details. |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
16 dnl |
1232 | 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 |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24446
diff
changeset
|
19 dnl <https://www.gnu.org/licenses/>. |
3130 | 20 |
2813 | 21 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
22 dnl Alphabetical list of macros in the OCTAVE_ namespace |
4360 | 23 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
24 |
4366 | 25 dnl |
23510
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
26 dnl Figure out the hardware-vendor-os info. |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
27 dnl |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
28 AC_DEFUN([OCTAVE_CANONICAL_HOST], [ |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
29 AC_CANONICAL_HOST |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
30 if test -z "$host"; then |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
31 host=unknown-unknown-unknown |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
32 AC_MSG_WARN([configuring Octave for unknown system type]) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
33 fi |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
34 canonical_host_type=$host |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
35 AC_SUBST(canonical_host_type) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
36 if test -z "$host_cpu"; then |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
37 host_cpu=unknown |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
38 fi |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
39 if test -z "$host_vendor"; then |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
40 host_vendor=unknown |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
41 fi |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
42 if test -z "$host_os"; then |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
43 host_os=unknown |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
44 fi |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
45 ]) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
46 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
47 dnl Check if the Carbon Framework defines CGDisplayBitsPerPixel. |
10380
60acc47c203f
configure checks for complex element setter/reference accessor methods
John W. Eaton <jwe@octave.org>
parents:
10331
diff
changeset
|
48 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
49 AC_DEFUN([OCTAVE_CARBON_CGDISPLAYBITSPERPIXEL], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
50 AC_CACHE_CHECK([whether CGDisplayBitsPerPixel is defined in the Carbon Framework], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
51 [octave_cv_func_carbon_cgdisplaybitsperpixel], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
52 [AC_LANG_PUSH(C++) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
53 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
54 #include <Carbon/Carbon.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
55 ]], [[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
56 CGDirectDisplayID display = CGMainDisplayID (); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
57 size_t depth = CGDisplayBitsPerPixel (display); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
58 ]])], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
59 octave_cv_func_carbon_cgdisplaybitsperpixel=yes, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
60 octave_cv_func_carbon_cgdisplaybitsperpixel=no) |
3888 | 61 AC_LANG_POP(C++) |
3107 | 62 ]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
63 if test $octave_cv_func_carbon_cgdisplaybitsperpixel = yes; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
64 AC_DEFINE(HAVE_CARBON_CGDISPLAYBITSPERPIXEL, 1, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
65 [Define to 1 if Carbon Framework has CGDisplayBitsPerPixel.]) |
3107 | 66 fi |
67 ]) | |
3126 | 68 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
69 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
|
70 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
|
71 dnl Otherwise, add FLAG to CFLAGS if the compiler accepts the flag. |
3126 | 72 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
73 AC_DEFUN([OCTAVE_CC_FLAG], [ |
17661
1978a6c76aa9
Use user-specified SED during build process (bug #40273).
Rik <rik@octave.org>
parents:
17615
diff
changeset
|
74 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
|
75 AC_MSG_CHECKING([whether ${CC-cc} accepts $1]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
76 AC_CACHE_VAL([octave_cv_cc_flag_$ac_safe], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
77 [AC_LANG_PUSH(C) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
78 ac_octave_save_CFLAGS="$CFLAGS" |
3126 | 79 CFLAGS="$CFLAGS $1" |
5177 | 80 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
81 [eval "octave_cv_cc_flag_$ac_safe=yes"], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
82 [eval "octave_cv_cc_flag_$ac_safe=no"]) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
83 CFLAGS="$ac_octave_save_CFLAGS" |
3888 | 84 AC_LANG_POP(C) |
3126 | 85 ]) |
86 if eval "test \"`echo '$octave_cv_cc_flag_'$ac_safe`\" = yes"; then | |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
87 AC_MSG_RESULT([yes]) |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
88 ifelse([$2], , |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
89 [CFLAGS="$CFLAGS $1" |
3131 | 90 AC_MSG_RESULT([adding $1 to CFLAGS])], [$2]) |
3126 | 91 else |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
92 AC_MSG_RESULT([no]) |
3126 | 93 ifelse([$3], , , [$3]) |
94 fi | |
95 ]) | |
96 dnl | |
17965
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
97 dnl Check for broken stl_algo.h header file in gcc versions 4.8.0, 4.8.1, 4.8.2 |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
98 dnl which leads to failures in nth_element. |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
99 dnl |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
100 AC_DEFUN([OCTAVE_CHECK_BROKEN_STL_ALGO_H], [ |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
101 AC_CACHE_CHECK([whether stl_algo.h is broken], |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
102 [octave_cv_broken_stl_algo_h], |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
103 [AC_LANG_PUSH(C++) |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
104 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
105 // Based on code from a GCC test program. |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
106 |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
107 // Copyright (C) 2013 Free Software Foundation, Inc. |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
108 // |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
109 // This file is part of the GNU ISO C++ Library. This library is free |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
110 // software; you can redistribute it and/or modify it under the |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
111 // terms of the GNU General Public License as published by the |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
112 // Free Software Foundation; either version 3, or (at your option) |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
113 // any later version. |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
114 |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
115 // This library is distributed in the hope that it will be useful, |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
116 // but WITHOUT ANY WARRANTY; without even the implied warranty of |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
117 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
118 // GNU General Public License for more details. |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
119 |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
120 // You should have received a copy of the GNU General Public License along |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
121 // with this library; see the file COPYING3. If not see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24446
diff
changeset
|
122 // <https://www.gnu.org/licenses/>. |
17965
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
123 |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
124 // 25.3.2 [lib.alg.nth.element] |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
125 |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
126 // { dg-options "-std=gnu++11" } |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
127 |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
128 #include <algorithm> |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
129 #include <vector> |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
130 ]], [[ |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
131 std::vector<int> v (7); |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
132 |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
133 v[0] = 207089; |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
134 v[1] = 202585; |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
135 v[2] = 180067; |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
136 v[3] = 157549; |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
137 v[4] = 211592; |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
138 v[5] = 216096; |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
139 v[6] = 207089; |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
140 |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
141 std::nth_element (v.begin (), v.begin () + 3, v.end ()); |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
142 |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
143 return v[3] == 207089 ? 0 : 1; |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
144 ]])], |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
145 octave_cv_broken_stl_algo_h=no, |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
146 octave_cv_broken_stl_algo_h=yes, |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
147 [case "$GXX_VERSION" in |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
148 *4.8.2*) |
17967
303157af491f
acinclude.m4: Fix undefined value in macro CHECK_BROKEN_STL_ALGO_H when cross-compiling.
Rik <rik@octave.org>
parents:
17965
diff
changeset
|
149 octave_cv_broken_stl_algo_h=yes |
303157af491f
acinclude.m4: Fix undefined value in macro CHECK_BROKEN_STL_ALGO_H when cross-compiling.
Rik <rik@octave.org>
parents:
17965
diff
changeset
|
150 ;; |
303157af491f
acinclude.m4: Fix undefined value in macro CHECK_BROKEN_STL_ALGO_H when cross-compiling.
Rik <rik@octave.org>
parents:
17965
diff
changeset
|
151 *) |
303157af491f
acinclude.m4: Fix undefined value in macro CHECK_BROKEN_STL_ALGO_H when cross-compiling.
Rik <rik@octave.org>
parents:
17965
diff
changeset
|
152 octave_cv_broken_stl_algo_h=no |
17965
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
153 ;; |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
154 esac |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
155 ]) |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
156 AC_LANG_POP(C++) |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
157 ]) |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
158 if test "$GXX" = yes; then |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
159 if test $octave_cv_broken_stl_algo_h = yes; then |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
160 case "$GXX_VERSION" in |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
161 4.8.[[012]]) |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
162 ;; |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
163 *) |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
164 octave_cv_broken_stl_algo_h=no |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
165 warn_stl_algo_h="UNEXPECTED: found nth_element broken in g++ $GXX_VERSION. Refusing to fix except for g++ 4.8.0, 4.8.1, or 4.8.2. You appear to have g++ $GXX_VERSION." |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
166 OCTAVE_CONFIGURE_WARNING([warn_stl_algo_h]) |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
167 ;; |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
168 esac |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
169 else |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
170 case "$GXX_VERSION" in |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
171 4.8.2) |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
172 warn_stl_algo_h="UNEXPECTED: found nth_element working in g++ 4.8.2. Has it been patched on your system?" |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
173 OCTAVE_CONFIGURE_WARNING([warn_stl_algo_h]) |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
174 ;; |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
175 esac |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
176 fi |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
177 else |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
178 octave_cv_broken_stl_algo_h=no |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
179 warn_stl_algo_h="UNEXPECTED: nth_element test failed. Refusing to fix except for g++ 4.8.2." |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
180 OCTAVE_CONFIGURE_WARNING([warn_stl_algo_h]) |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
181 fi |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
182 ]) |
1d58abc740c0
acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents:
17888
diff
changeset
|
183 dnl |
21160
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
184 dnl Check whether CXSparse is version 2.2 or later |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
185 dnl FIXME: This test uses a version number. It potentially could |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
186 dnl be re-written to actually call a function, but is it worth it? |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
187 dnl |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
188 AC_DEFUN([OCTAVE_CHECK_CXSPARSE_VERSION_OK], [ |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
189 AC_CACHE_CHECK([whether CXSparse is version 2.2 or later], |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
190 [octave_cv_cxsparse_version_ok], |
23172
6e7f8a92a852
configure: use the correct flags when testing for the CXSparse library version
Mike Miller <mtmiller@octave.org>
parents:
23083
diff
changeset
|
191 [ac_octave_save_CPPFLAGS="$CPPFLAGS" |
6e7f8a92a852
configure: use the correct flags when testing for the CXSparse library version
Mike Miller <mtmiller@octave.org>
parents:
23083
diff
changeset
|
192 CPPFLAGS="$CXSPARSE_CPPFLAGS $CPPFLAGS" |
21160
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
193 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
194 #if defined (HAVE_SUITESPARSE_CS_H) |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
195 #include <suitesparse/cs.h> |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
196 #elif defined (HAVE_UFSPARSE_CS_H) |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
197 #include <ufsparse/cs.h> |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
198 #elif defined (HAVE_CXSPARSE_CS_H) |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
199 #include <cxsparse/cs.h> |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
200 #elif defined (HAVE_CS_H) |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
201 #include <cs.h> |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
202 #endif |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
203 ]], [[ |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
204 #if (defined (HAVE_CXSPARSE) \ |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
205 && (! defined (CS_VER) \ |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
206 || CS_VER < 2 \ |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
207 || (CS_VER == 2 && CS_SUBVER < 2))) |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
208 #error "Octave requires CXSparse version 2.2 or later" |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
209 #endif |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
210 ]])], |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
211 octave_cv_cxsparse_version_ok=yes, |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
212 octave_cv_cxsparse_version_ok=no) |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
213 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
214 ]) |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
215 if test $octave_cv_cxsparse_version_ok = yes; then |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
216 AC_DEFINE(HAVE_CXSPARSE_VERSION_OK, 1, |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
217 [Define to 1 if CXSparse is version 2.2 or later.]) |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
218 fi |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
219 ]) |
b5b531ba93ce
build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents:
21150
diff
changeset
|
220 dnl |
15969
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
221 dnl Check whether the FFTW library supports multi-threading. This macro |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
222 dnl should be called once per FFTW precision passing in the library |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
223 dnl variant (e.g. "fftw3") and a function in the thread support API |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
224 dnl (e.g. "fftw_plan_with_nthreads"). Depending on how FFTW was built, |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
225 dnl the thread functions could be compiled into the main FFTW library or |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
226 dnl could be a separate add-on library that is passed to the linker |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
227 dnl ahead of the main FFTW library. |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
228 dnl |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
229 AC_DEFUN([OCTAVE_CHECK_FFTW_THREADS], [ |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
230 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
231 ac_octave_save_LDFLAGS="$LDFLAGS" |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
232 ac_octave_save_LIBS="$LIBS" |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
233 CPPFLAGS="$m4_toupper([$1])_CPPFLAGS $CPPFLAGS" |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
234 LDFLAGS="$m4_toupper([$1])_LDFLAGS $LDFLAGS" |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
235 LIBS="$m4_toupper([$1])_LIBS $LIBS" |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
236 AC_CACHE_CHECK([for $1 multi-threading support], |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
237 [octave_cv_[$1]_threads_lib], |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
238 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
239 #include <fftw3.h> |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
240 ]], [[ |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
241 $2 (2); |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
242 ]])], |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
243 [octave_cv_[$1]_threads_lib=yes], |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
244 [LIBS="-l[$1]_threads $LIBS" |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
245 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
246 #include <fftw3.h> |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
247 ]], [[ |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
248 $2 (2); |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
249 ]])], |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
250 [octave_cv_[$1]_threads_lib="-l[$1]_threads"], |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
251 [octave_cv_[$1]_threads_lib=no]) |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
252 ]) |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
253 ]) |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
254 case $octave_cv_[$1]_threads_lib in |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
255 -l*) |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
256 m4_toupper([$1])_LIBS="$octave_cv_[$1]_threads_lib $m4_toupper([$1])_LIBS" |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
257 ;; |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
258 no) |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
259 AC_MSG_WARN([No $1 multi-threading support found.]) |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
260 AC_MSG_WARN([The single-threaded library will be used instead.]) |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
261 ;; |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
262 esac |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
263 if test $octave_cv_[$1]_threads_lib != no; then |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
264 AC_DEFINE([HAVE_]m4_toupper([$1])[_THREADS], 1, |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
265 [Define to 1 if ]m4_toupper([$1])[ has multi-threading support.]) |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
266 fi |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
267 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
268 LDFLAGS="$ac_octave_save_LDFLAGS" |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
269 LIBS="$ac_octave_save_LIBS" |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
270 ]) |
139f4b19a3ac
build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents:
15863
diff
changeset
|
271 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
272 dnl Check if function gluTessCallback is called with "(...)". |
9596
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
273 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
274 AC_DEFUN([OCTAVE_CHECK_FUNC_GLUTESSCALLBACK_THREEDOTS], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
275 AC_CACHE_CHECK([whether gluTessCallback is called with "(...)"], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
276 [octave_cv_func_glutesscallback_threedots], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
277 [AC_LANG_PUSH(C++) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
278 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21604
diff
changeset
|
279 #if defined (HAVE_GL_GLU_H) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
280 # include <GL/glu.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
281 #elif defined HAVE_OPENGL_GLU_H || defined HAVE_FRAMEWORK_OPENGL |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
282 # include <OpenGL/glu.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
283 #endif |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
284 ]], [[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
285 GLvoid (*func)(...); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
286 gluTessCallback(0, 0, func); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
287 ]])], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
288 octave_cv_func_glutesscallback_threedots=yes, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
289 octave_cv_func_glutesscallback_threedots=no) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
290 AC_LANG_POP(C++) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
291 ]) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
292 if test $octave_cv_func_glutesscallback_threedots = yes; then |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
293 AC_DEFINE(HAVE_GLUTESSCALLBACK_THREEDOTS, 1, |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
294 [Define to 1 if gluTessCallback is called with (...).]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
295 fi |
9596
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
296 ]) |
f26229391ea1
configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents:
9577
diff
changeset
|
297 dnl |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
298 dnl Check whether the Qt class QAbstractItemModel exists and has the |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
299 dnl beginResetModel and endResetModel member functions. These member |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
300 dnl functions were introduced in Qt 4.6. |
18973
625e3bb65885
don't require Qt 4.7 (bug #42657)
John W. Eaton <jwe@octave.org>
parents:
18141
diff
changeset
|
301 dnl |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
302 dnl FIXME: Delete this entirely when we can safely assume that Qt 4.6 or later |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
303 dnl is in use everywhere, or when we drop support for Qt 4. |
17111
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
304 dnl |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
305 AC_DEFUN([OCTAVE_CHECK_FUNC_QABSTRACTITEMMODEL_BEGINRESETMODEL], [ |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
306 AC_CACHE_CHECK([for QAbstractItemModel::beginResetModel in <QAbstractItemModel>], |
17111
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
307 [octave_cv_func_qabstractitemmodel_beginresetmodel], |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
308 [AC_LANG_PUSH(C++) |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
309 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
310 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
311 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
312 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" |
17111
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
313 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
314 #include <QAbstractItemModel> |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
315 class item_model : public QAbstractItemModel |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
316 { |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
317 public: |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
318 item_model (QObject *parent = 0) : QAbstractItemModel (parent) {} |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
319 ~item_model () {} |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
320 QModelIndex index (int, int, const QModelIndex& m) const { return m; } |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
321 QModelIndex parent (const QModelIndex& m) const { return m; } |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
322 int columnCount (const QModelIndex&) const { return 0; } |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
323 int rowCount (const QModelIndex&) const { return 0; } |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
324 QVariant data (const QModelIndex&, int) const { return QVariant(); } |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
325 void update_model () |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
326 { |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
327 this->beginResetModel (); |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
328 this->endResetModel (); |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
329 } |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
330 }; |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
331 ]], [[ |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
332 item_model model; |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
333 model.update_model (); |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
334 ]])], |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
335 octave_cv_func_qabstractitemmodel_beginresetmodel=yes, |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
336 octave_cv_func_qabstractitemmodel_beginresetmodel=no) |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
337 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
338 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
17111
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
339 AC_LANG_POP(C++) |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
340 ]) |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
341 if test $octave_cv_func_qabstractitemmodel_beginresetmodel = yes; then |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
342 AC_DEFINE(HAVE_QABSTRACTITEMMODEL_BEGINRESETMODEL, 1, |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
343 [Define to 1 if you have the `QAbstractItemModel::beginResetModel' member function.]) |
17111
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
344 fi |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
345 ]) |
bb713af2e1d9
build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents:
17034
diff
changeset
|
346 dnl |
24827
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
347 dnl Check whether the Qt QHeaderView class has the setSectionResizeMode |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
348 dnl function. This function was introduced in Qt 5. |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
349 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
350 dnl FIXME: Delete this entirely when we drop support for Qt 4. |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
351 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
352 AC_DEFUN([OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONRESIZEMODE], [ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
353 AC_CACHE_CHECK([for QHeaderView::setSectionResizeMode], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
354 [octave_cv_func_qheaderview_setsectionresizemode], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
355 [AC_LANG_PUSH(C++) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
356 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
357 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
358 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
359 CXXFLAGS="$CXXPICFLAG $CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
360 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
361 #include <QHeaderView> |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
362 ]], [[ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
363 QHeaderView header_view (Qt::Horizontal); |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
364 header_view.setSectionResizeMode (QHeaderView::Interactive); |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
365 ]])], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
366 octave_cv_func_qheaderview_setsectionresizemode=yes, |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
367 octave_cv_func_qheaderview_setsectionresizemode=no) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
368 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
369 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
370 AC_LANG_POP(C++) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
371 ]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
372 if test $octave_cv_func_qheaderview_setsectionresizemode = yes; then |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
373 AC_DEFINE(HAVE_QHEADERVIEW_SETSECTIONRESIZEMODE, 1, |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
374 [Define to 1 if you have the `QHeaderView::setSectionResizeMode' member function.]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
375 fi |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
376 ]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
377 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
378 dnl Check whether the Qt QHeaderView class has the setSectionsClickable |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
379 dnl function. This function was introduced in Qt 5. |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
380 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
381 dnl FIXME: Delete this entirely when we drop support for Qt 4. |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
382 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
383 AC_DEFUN([OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONSCLICKABLE], [ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
384 AC_CACHE_CHECK([for QHeaderView::setSectionsClickable], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
385 [octave_cv_func_qheaderview_setsectionsclickable], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
386 [AC_LANG_PUSH(C++) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
387 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
388 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
389 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
390 CXXFLAGS="$CXXPICFLAG $CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
391 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
392 #include <QHeaderView> |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
393 ]], [[ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
394 QHeaderView header_view (Qt::Horizontal); |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
395 header_view.setSectionsClickable (true); |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
396 ]])], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
397 octave_cv_func_qheaderview_setsectionsclickable=yes, |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
398 octave_cv_func_qheaderview_setsectionsclickable=no) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
399 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
400 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
401 AC_LANG_POP(C++) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
402 ]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
403 if test $octave_cv_func_qheaderview_setsectionsclickable = yes; then |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
404 AC_DEFINE(HAVE_QHEADERVIEW_SETSECTIONSCLICKABLE, 1, |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
405 [Define to 1 if you have the `QHeaderView::setSectionsClickable' member function.]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
406 fi |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
407 ]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
408 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
409 dnl Check whether the Qt QHeaderView class has the setSectionsMovable |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
410 dnl function. This function was introduced in Qt 5. |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
411 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
412 dnl FIXME: Delete this entirely when we drop support for Qt 4. |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
413 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
414 AC_DEFUN([OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONSMOVABLE], [ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
415 AC_CACHE_CHECK([for QHeaderView::setSectionsMovable], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
416 [octave_cv_func_qheaderview_setsectionsmovable], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
417 [AC_LANG_PUSH(C++) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
418 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
419 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
420 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
421 CXXFLAGS="$CXXPICFLAG $CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
422 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
423 #include <QHeaderView> |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
424 ]], [[ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
425 QHeaderView header_view (Qt::Horizontal); |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
426 header_view.setSectionsMovable (true); |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
427 ]])], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
428 octave_cv_func_qheaderview_setsectionsmovable=yes, |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
429 octave_cv_func_qheaderview_setsectionsmovable=no) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
430 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
431 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
432 AC_LANG_POP(C++) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
433 ]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
434 if test $octave_cv_func_qheaderview_setsectionsmovable = yes; then |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
435 AC_DEFINE(HAVE_QHEADERVIEW_SETSECTIONSMOVABLE, 1, |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
436 [Define to 1 if you have the `QHeaderView::setSectionsMovable' member function.]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
437 fi |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
438 ]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
439 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
440 dnl Check whether the Qt function qInstallMessageHandler is available. |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
441 dnl This function was introduced in Qt 5. |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
442 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
443 dnl FIXME: Delete this entirely when we drop support for Qt 4. |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
444 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
445 AC_DEFUN([OCTAVE_CHECK_FUNC_QINSTALLMESSAGEHANDLER], [ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
446 AC_CACHE_CHECK([for qInstallMessageHandler], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
447 [octave_cv_func_qinstallmessagehandler], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
448 [AC_LANG_PUSH(C++) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
449 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
450 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
451 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
452 CXXFLAGS="$CXXPICFLAG $CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
453 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
454 #include <QtGlobal> |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
455 ]], [[ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
456 qInstallMessageHandler (nullptr); |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
457 ]])], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
458 octave_cv_func_qinstallmessagehandler=yes, |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
459 octave_cv_func_qinstallmessagehandler=no) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
460 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
461 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
462 AC_LANG_POP(C++) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
463 ]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
464 if test $octave_cv_func_qinstallmessagehandler = yes; then |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
465 AC_DEFINE(HAVE_QINSTALLMESSAGEHANDLER, 1, |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
466 [Define to 1 if you have the `qInstallMessageHandler' function.]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
467 fi |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
468 ]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
469 dnl |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
470 dnl Check whether the Qt class QLineEdit has the setPlaceholderText member |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
471 dnl function. This member function was introduced in Qt 4.7. |
18216
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
472 dnl |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
473 dnl FIXME: Delete this entirely when we can safely assume that Qt 4.7 or later |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
474 dnl is in use everywhere, or when we drop support for Qt 4. |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
475 dnl |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
476 AC_DEFUN([OCTAVE_CHECK_FUNC_QLINEEDIT_SETPLACEHOLDERTEXT], [ |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
477 AC_CACHE_CHECK([for QLineEdit::setPlaceholderText in <QLinedEdit>], |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
478 [octave_cv_func_qlineedit_setplaceholdertext], |
18216
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
479 [AC_LANG_PUSH(C++) |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
480 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
481 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
482 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
483 CXXFLAGS="$CXXPICFLAG $CPPFLAGS" |
18216
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
484 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
485 #include <QLineEdit> |
18216
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
486 ]], [[ |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
487 QLineEdit line_edit; |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
488 line_edit.setPlaceholderText ("placeholder text"); |
18216
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
489 ]])], |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
490 octave_cv_func_qlineedit_setplaceholdertext=yes, |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
491 octave_cv_func_qlineedit_setplaceholdertext=no) |
18216
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
492 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
493 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
18216
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
494 AC_LANG_POP(C++) |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
495 ]) |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
496 if test $octave_cv_func_qlineedit_setplaceholdertext = yes; then |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
497 AC_DEFINE(HAVE_QLINEEDIT_SETPLACEHOLDERTEXT, 1, |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
498 [Define to 1 if you have the `QLineEdit::setPlaceholderText' member function.]) |
18216
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
499 fi |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
500 ]) |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
501 dnl |
24827
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
502 dnl Check whether the Qt QMouseEvent class has the localPos function. |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
503 dnl This function was introduced in Qt 5. |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
504 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
505 dnl FIXME: Delete this entirely when we drop support for Qt 4. |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
506 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
507 AC_DEFUN([OCTAVE_CHECK_FUNC_QMOUSEEVENT_LOCALPOS], [ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
508 AC_CACHE_CHECK([for QMouseEvent::localPos], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
509 [octave_cv_func_qmouseevent_localpos], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
510 [AC_LANG_PUSH(C++) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
511 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
512 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
513 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
514 CXXFLAGS="$CXXPICFLAG $CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
515 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
516 #include <QMouseEvent> |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
517 ]], [[ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
518 QMouseEvent *event; |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
519 event->localPos (); |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
520 ]])], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
521 octave_cv_func_qmouseevent_localpos=yes, |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
522 octave_cv_func_qmouseevent_localpos=no) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
523 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
524 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
525 AC_LANG_POP(C++) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
526 ]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
527 if test $octave_cv_func_qmouseevent_localpos = yes; then |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
528 AC_DEFINE(HAVE_QMOUSEEVENT_LOCALPOS, 1, |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
529 [Define to 1 if you have the `QMouseEvent::localPos' member function.]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
530 fi |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
531 ]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
532 dnl |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
533 dnl Check whether the QScintilla class QsciScintilla has the |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
534 dnl findFirstInSelection member function. This member function was introduced |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
535 dnl in QScintilla 2.7. |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
536 dnl |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
537 dnl FIXME: Delete this entirely when we can safely assume that QScintilla 2.7 |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
538 dnl or later is in use everywhere, or when we drop support for Qt 4 (Qt 5 only |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
539 dnl works with QScintilla 2.7.1 or later). |
18854
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
540 dnl |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
541 AC_DEFUN([OCTAVE_CHECK_FUNC_QSCI_FINDSELECTION], [ |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
542 AC_CACHE_CHECK([for QsciScintilla::findFirstInSelection in <Qsci/qsciscintilla.h>], |
18854
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
543 [octave_cv_func_qsci_findfirstinselection], |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
544 [AC_LANG_PUSH(C++) |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
545 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
546 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
547 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
548 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" |
18854
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
549 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
550 #include <Qsci/qsciscintilla.h> |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
551 class qsci : public QsciScintilla |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
552 { |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
553 public: |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
554 qsci (QWidget *parent = 0) : QsciScintilla (parent) |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
555 { this->findFirstInSelection (QString ("x"),true,true,true,true,true); } |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
556 ~qsci () {} |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
557 }; |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
558 ]], [[ |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
559 qsci edit; |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
560 ]])], |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
561 octave_cv_func_qsci_findfirstinselection=yes, |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
562 octave_cv_func_qsci_findfirstinselection=no) |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
563 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
564 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
18854
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
565 AC_LANG_POP(C++) |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
566 ]) |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
567 if test $octave_cv_func_qsci_findfirstinselection = yes; then |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
568 AC_DEFINE(HAVE_QSCI_FINDSELECTION, 1, |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
569 [Define to 1 if you have the `QsciScintilla::findFirstInSelection' member function.]) |
18854
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
570 fi |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
571 ]) |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
572 dnl |
24823
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
573 dnl Check whether QObject::findChildren accepts Qt::FindChildOptions |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
574 dnl argument. |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
575 dnl |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
576 dnl FIXME: Delete this entirely when we drop support for Qt 4. |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
577 dnl |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
578 AC_DEFUN([OCTAVE_CHECK_FUNC_QOBJECT_FINDCHILDREN_ACCEPTS_FINDCHILDOPTIONS], [ |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
579 AC_CACHE_CHECK([whether QObject::findChildren accepts Qt::FindChildOptions], |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
580 [octave_cv_func_qobject_findchildren_accepts_findchildoptions], |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
581 [AC_LANG_PUSH(C++) |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
582 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
583 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
584 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
585 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
586 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
587 #include <QList> |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
588 #include <QObject> |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
589 #include <QWidget> |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
590 ]], [[ |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
591 QObject obj; |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
592 QList<QWidget *> widgets |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
593 = obj.findChildren<QWidget *> ("name", Qt::FindDirectChildrenOnly); |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
594 ]])], |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
595 octave_cv_func_qobject_findchildren_accepts_findchildoptions=yes, |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
596 octave_cv_func_qobject_findchildren_accepts_findchildoptions=no) |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
597 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
598 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
599 AC_LANG_POP(C++) |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
600 ]) |
24825
e08c1fea96c5
acinclude.m4: Fix another typo in cset 53f68d0fb122.
Rik <rik@octave.org>
parents:
24824
diff
changeset
|
601 if test $octave_cv_func_qobject_findchildren_accepts_findchildoptions = yes; then |
24824
cce5d2ea39ff
acinclude.m4: Fix typo in previous cset (53f68d0fb122).
Rik <rik@octave.org>
parents:
24823
diff
changeset
|
602 AC_DEFINE(QOBJECT_FINDCHILDREN_ACCEPTS_FINDCHILDOPTIONS, 1, |
24823
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
603 [Define to 1 if 'QObject::findChildren' accepts 'Qt::FindChildOptions' argument.]) |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
604 fi |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
605 ]) |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
606 dnl |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
607 dnl Check whether the Qt class QTabWidget has the setMovable member function. |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
608 dnl This member function was introduced in Qt 4.5. |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
609 dnl |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
610 dnl FIXME: Delete this entirely when we can safely assume that Qt 4.5 or later |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
611 dnl is in use everywhere, or when we drop support for Qt 4. |
18216
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
612 dnl |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
613 AC_DEFUN([OCTAVE_CHECK_FUNC_QTABWIDGET_SETMOVABLE], [ |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
614 AC_CACHE_CHECK([for QTabWidget::setMovable in <QTabWidget>], |
18216
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
615 [octave_cv_func_qtabwidget_setmovable], |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
616 [AC_LANG_PUSH(C++) |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
617 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
618 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
619 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
620 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" |
18216
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
621 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
622 #include <QTabWidget> |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
623 class tab_widget : public QTabWidget |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
624 { |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
625 public: |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
626 tab_widget (QWidget *parent = 0) : QTabWidget (parent) { this->setMovable (true); } |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
627 ~tab_widget () {} |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
628 }; |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
629 ]], [[ |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
630 tab_widget tw; |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
631 ]])], |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
632 octave_cv_func_qtabwidget_setmovable=yes, |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
633 octave_cv_func_qtabwidget_setmovable=no) |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
634 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
635 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
18216
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
636 AC_LANG_POP(C++) |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
637 ]) |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
638 if test $octave_cv_func_qtabwidget_setmovable = yes; then |
e54cfaae830b
Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents:
18141
diff
changeset
|
639 AC_DEFINE(HAVE_QTABWIDGET_SETMOVABLE, 1, |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
640 [Define to 1 if you have the `QTabWidget::setMovable' member function.]) |
18854
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
641 fi |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
642 ]) |
0a66861d8069
implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents:
18216
diff
changeset
|
643 dnl |
24827
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
644 dnl Check whether Qt message handler function accepts QMessageLogContext |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
645 dnl argument. This change was introduced in Qt 5. |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
646 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
647 dnl FIXME: Delete this entirely when we drop support for Qt 4. |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
648 dnl |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
649 AC_DEFUN([OCTAVE_CHECK_FUNC_QTMESSAGEHANDLER_ACCEPTS_QMESSAGELOGCONTEXT], [ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
650 AC_CACHE_CHECK([whether Qt message handler accepts QMessageLogContext], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
651 [octave_cv_func_qtmessagehandler_accepts_qmessagelogcontext], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
652 [AC_LANG_PUSH(C++) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
653 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
654 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
655 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
656 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
657 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
658 #include <QtGlobal> |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
659 static void |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
660 msg_handler (QtMsgType, const QMessageLogContext &, const QString &) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
661 { } |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
662 ]], [[ |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
663 QtMessageHandler fptr = msg_handler; |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
664 ]])], |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
665 octave_cv_func_qtmessagehandler_accepts_qmessagelogcontext=yes, |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
666 octave_cv_func_qtmessagehandler_accepts_qmessagelogcontext=no) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
667 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
668 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
669 AC_LANG_POP(C++) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
670 ]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
671 if test $octave_cv_func_qtmessagehandler_accepts_qmessagelogcontext = yes; then |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
672 AC_DEFINE(QTMESSAGEHANDLER_ACCEPTS_QMESSAGELOGCONTEXT, 1, |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
673 [Define to 1 if Qt message handler accepts 'QMessageLogContext' argument.]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
674 fi |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
675 ]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
676 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
677 dnl Check whether HDF5 library has version 1.6 API functions. |
14605
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
678 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
679 AC_DEFUN([OCTAVE_CHECK_HDF5_HAS_VER_16_API], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
680 AC_CACHE_CHECK([whether HDF5 library has enforced version 1.6 API], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
681 [octave_cv_hdf5_has_ver_16_api], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
682 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
683 #include <hdf5.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
684 ]], [[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
685 H5Eset_auto (0, 0); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
686 ]])], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
687 octave_cv_hdf5_has_ver_16_api=yes, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
688 octave_cv_hdf5_has_ver_16_api=no) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
689 ]) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
690 if test $octave_cv_hdf5_has_ver_16_api != yes; then |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
691 AC_DEFINE(HAVE_HDF5_18, 1, [Define to 1 if >=HDF5-1.8 is available.]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
692 fi |
14605
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
693 ]) |
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
694 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
695 dnl Usage: |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
696 dnl OCTAVE_CHECK_LIB(LIBRARY, DOC-NAME, WARN-MSG, HEADER, FUNC, |
23006
06c248729e6f
allow OCTAVE_CHECK_LIB to stop with an error if a library is required
John W. Eaton <jwe@octave.org>
parents:
22986
diff
changeset
|
697 dnl LANG, DOC-STRING, EXTRA-CHECK, PKG-CONFIG-NAME, |
06c248729e6f
allow OCTAVE_CHECK_LIB to stop with an error if a library is required
John W. Eaton <jwe@octave.org>
parents:
22986
diff
changeset
|
698 dnl REQUIRED) |
14605
28e53daab1f8
Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14550
diff
changeset
|
699 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
700 AC_DEFUN([OCTAVE_CHECK_LIB], [ |
23017
0f22914be30e
* acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents:
23008
diff
changeset
|
701 AC_ARG_WITH([m4_tolower($1)-includedir], |
0f22914be30e
* acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents:
23008
diff
changeset
|
702 [AS_HELP_STRING([--with-m4_tolower($1)-includedir=DIR], |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
703 [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
|
704 [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
|
705 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
|
706 |
23017
0f22914be30e
* acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents:
23008
diff
changeset
|
707 AC_ARG_WITH([m4_tolower($1)-libdir], |
0f22914be30e
* acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents:
23008
diff
changeset
|
708 [AS_HELP_STRING([--with-m4_tolower($1)-libdir=DIR], |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
709 [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
|
710 [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
|
711 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
|
712 |
23017
0f22914be30e
* acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents:
23008
diff
changeset
|
713 AC_ARG_WITH([m4_tolower($1)], |
23006
06c248729e6f
allow OCTAVE_CHECK_LIB to stop with an error if a library is required
John W. Eaton <jwe@octave.org>
parents:
22986
diff
changeset
|
714 [ifelse([$#], 10, |
06c248729e6f
allow OCTAVE_CHECK_LIB to stop with an error if a library is required
John W. Eaton <jwe@octave.org>
parents:
22986
diff
changeset
|
715 [m4_ifblank([$7], |
23017
0f22914be30e
* acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents:
23008
diff
changeset
|
716 [AS_HELP_STRING([--with-m4_tolower($1)=<lib>], [use $2 library <lib>])], |
0f22914be30e
* acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents:
23008
diff
changeset
|
717 [AS_HELP_STRING([--with-m4_tolower($1)], [$7])])], |
23006
06c248729e6f
allow OCTAVE_CHECK_LIB to stop with an error if a library is required
John W. Eaton <jwe@octave.org>
parents:
22986
diff
changeset
|
718 [m4_ifblank([$7], |
23017
0f22914be30e
* acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents:
23008
diff
changeset
|
719 [AS_HELP_STRING([--without-m4_tolower($1)], [don't use $2 library])], |
0f22914be30e
* acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents:
23008
diff
changeset
|
720 [AS_HELP_STRING([--without-m4_tolower($1)], [$7])])])], |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
721 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
|
722 |
22039
0a528a6dac95
build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents:
22036
diff
changeset
|
723 ac_octave_$1_pkg_check=no |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
724 m4_toupper([$1])_LIBS= |
21381 | 725 warn_$1="$3" |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
726 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
|
727 no) |
23006
06c248729e6f
allow OCTAVE_CHECK_LIB to stop with an error if a library is required
John W. Eaton <jwe@octave.org>
parents:
22986
diff
changeset
|
728 ifelse([$#], 10, |
23017
0f22914be30e
* acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents:
23008
diff
changeset
|
729 [AC_MSG_ERROR([--without-m4_tolower($1) specified but $2 is required.])], |
0f22914be30e
* acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents:
23008
diff
changeset
|
730 [warn_$1="--without-m4_tolower($1) specified. Functions or features that depend on $2 will be disabled." |
23006
06c248729e6f
allow OCTAVE_CHECK_LIB to stop with an error if a library is required
John W. Eaton <jwe@octave.org>
parents:
22986
diff
changeset
|
731 m4_toupper([$1])_LIBS=]) |
9539
41a74dcd14df
Clear QHULL_LIBS etc on errors. Interpret --without-qhull etc correctly.
David Grundberg <individ@acc.umu.se>
parents:
9531
diff
changeset
|
732 ;; |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
733 yes | "") |
22039
0a528a6dac95
build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents:
22036
diff
changeset
|
734 ac_octave_$1_pkg_check=yes |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
735 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
|
736 ;; |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
737 -* | */* | *.a | *.so | *.so.* | *.o) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
738 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
|
739 ;; |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
740 *) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
741 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
|
742 ;; |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
743 esac |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
744 |
22039
0a528a6dac95
build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents:
22036
diff
changeset
|
745 if test $ac_octave_$1_pkg_check = yes; then |
22103
9811e7875d52
build: allow pkg-config name to differ from library name
Mike Miller <mtmiller@octave.org>
parents:
22039
diff
changeset
|
746 PKG_CHECK_EXISTS(m4_default([$9], [$1]), [ |
22039
0a528a6dac95
build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents:
22036
diff
changeset
|
747 if test -z "$m4_toupper([$1])_CPPFLAGS"; then |
23835
6ae0292aaa5c
configure: ensure empty pkg-config results are actually empty (bug #51680)
Mike Miller <mtmiller@octave.org>
parents:
23414
diff
changeset
|
748 m4_toupper([$1])_CPPFLAGS="$($PKG_CONFIG --cflags-only-I m4_default([$9], [$1]) | $SED -e 's/^ *$//')" |
22039
0a528a6dac95
build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents:
22036
diff
changeset
|
749 fi |
0a528a6dac95
build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents:
22036
diff
changeset
|
750 if test -z "$m4_toupper([$1])_LDFLAGS"; then |
23835
6ae0292aaa5c
configure: ensure empty pkg-config results are actually empty (bug #51680)
Mike Miller <mtmiller@octave.org>
parents:
23414
diff
changeset
|
751 m4_toupper([$1])_LDFLAGS="$($PKG_CONFIG --libs-only-L m4_default([$9], [$1]) | $SED -e 's/^ *$//')" |
22039
0a528a6dac95
build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents:
22036
diff
changeset
|
752 fi |
23835
6ae0292aaa5c
configure: ensure empty pkg-config results are actually empty (bug #51680)
Mike Miller <mtmiller@octave.org>
parents:
23414
diff
changeset
|
753 m4_toupper([$1])_LIBS="$($PKG_CONFIG --libs-only-l m4_default([$9], [$1]) | $SED -e 's/^ *$//')" |
22039
0a528a6dac95
build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents:
22036
diff
changeset
|
754 ]) |
0a528a6dac95
build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents:
22036
diff
changeset
|
755 fi |
22036
a2c29df93df7
acinclude.m4: Use pkg-config from OCTAVE_CHECK_LIB whenever possible
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
21945
diff
changeset
|
756 |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
757 if test -n "$m4_toupper([$1])_LIBS"; then |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
758 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
15350
6a0c0d3d60b6
build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents:
15338
diff
changeset
|
759 ac_octave_save_LDFLAGS="$LDFLAGS" |
6a0c0d3d60b6
build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents:
15338
diff
changeset
|
760 ac_octave_save_LIBS="$LIBS" |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
761 CPPFLAGS="$m4_toupper([$1])_CPPFLAGS $CPPFLAGS" |
15350
6a0c0d3d60b6
build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents:
15338
diff
changeset
|
762 LDFLAGS="$m4_toupper([$1])_LDFLAGS $LDFLAGS" |
6a0c0d3d60b6
build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents:
15338
diff
changeset
|
763 LIBS="$m4_toupper([$1])_LIBS $LIBS" |
9523
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9520
diff
changeset
|
764 m4_ifnblank([$6], [AC_LANG_PUSH($6)]) |
16068
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
16012
diff
changeset
|
765 ac_octave_$1_check_for_lib=no |
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
16012
diff
changeset
|
766 m4_ifblank([$4], [ac_octave_$1_check_for_lib=yes], |
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
16012
diff
changeset
|
767 [AC_CHECK_HEADERS([$4], [ac_octave_$1_check_for_lib=yes; break])]) |
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
16012
diff
changeset
|
768 if test $ac_octave_$1_check_for_lib = yes; then |
15350
6a0c0d3d60b6
build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents:
15338
diff
changeset
|
769 AC_CACHE_CHECK([for $5 in $m4_toupper([$1])_LIBS], |
6a0c0d3d60b6
build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents:
15338
diff
changeset
|
770 [octave_cv_lib_$1], |
6a0c0d3d60b6
build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents:
15338
diff
changeset
|
771 [AC_LINK_IFELSE([AC_LANG_CALL([], [$5])], |
6a0c0d3d60b6
build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents:
15338
diff
changeset
|
772 [octave_cv_lib_$1=yes], [octave_cv_lib_$1=no]) |
6a0c0d3d60b6
build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents:
15338
diff
changeset
|
773 ]) |
6a0c0d3d60b6
build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents:
15338
diff
changeset
|
774 if test "$octave_cv_lib_$1" = yes; then |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
775 m4_ifblank([$8], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
776 warn_$1= |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
777 AC_DEFINE([HAVE_]m4_toupper([$1]), 1, |
19355
22289e6e316e
build: Remove unused TEXINFO_LIBNAME definitions from Makefiles.
Rik <rik@octave.org>
parents:
19108
diff
changeset
|
778 [Define to 1 if $2 is available.])], [$8]) |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
779 fi |
9568
d3fccc4c4b9e
use OCTAVE_CHECK_LIBRARY to check for ARPACK
John W. Eaton <jwe@octave.org>
parents:
9543
diff
changeset
|
780 fi |
9523
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9520
diff
changeset
|
781 m4_ifnblank([$6], [AC_LANG_POP($6)]) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
782 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
15350
6a0c0d3d60b6
build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents:
15338
diff
changeset
|
783 LDFLAGS="$ac_octave_save_LDFLAGS" |
6a0c0d3d60b6
build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents:
15338
diff
changeset
|
784 LIBS="$ac_octave_save_LIBS" |
21381 | 785 else |
786 octave_cv_lib_$1=no | |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
787 fi |
15350
6a0c0d3d60b6
build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents:
15338
diff
changeset
|
788 |
23006
06c248729e6f
allow OCTAVE_CHECK_LIB to stop with an error if a library is required
John W. Eaton <jwe@octave.org>
parents:
22986
diff
changeset
|
789 ifelse([$#], 10, [ |
06c248729e6f
allow OCTAVE_CHECK_LIB to stop with an error if a library is required
John W. Eaton <jwe@octave.org>
parents:
22986
diff
changeset
|
790 if test $octave_cv_lib_$1 = no; then |
06c248729e6f
allow OCTAVE_CHECK_LIB to stop with an error if a library is required
John W. Eaton <jwe@octave.org>
parents:
22986
diff
changeset
|
791 AC_MSG_ERROR([to build Octave, you must have the $2 library and header files installed]) |
06c248729e6f
allow OCTAVE_CHECK_LIB to stop with an error if a library is required
John W. Eaton <jwe@octave.org>
parents:
22986
diff
changeset
|
792 fi]) |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
793 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
|
794 if test -n "$warn_$1"; then |
21381 | 795 OCTAVE_CONFIGURE_WARNING([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
|
796 m4_toupper([$1])_LIBS= |
9519
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
797 fi |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
798 ]) |
ee99f9f37505
improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents:
9515
diff
changeset
|
799 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
800 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
|
801 dnl |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
802 dnl Using a pure Fortran program doesn't seem to crash when linked |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
803 dnl with the buggy ARPACK library, but the C++ program does. Maybe it |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
804 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
|
805 dnl allocated arrays in Fortran does not? |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
806 dnl |
18058
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
807 dnl FIXME: it would be nice to avoid the duplication of F77 macros |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
808 dnl and typedefs here and in the f77-fcn.h header file. |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
809 dnl |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
810 AC_DEFUN([OCTAVE_CHECK_LIB_ARPACK_OK_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
|
811 AC_CACHE_CHECK([whether the arpack library works], |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
812 [octave_cv_lib_arpack_ok_1], |
15294
d1751eee9a42
acinclude.m4: Use AC_LANG_PUSH macro with AC_CACHE_CHECK for greater efficiency.
Rik <rik@octave.org>
parents:
15293
diff
changeset
|
813 [AC_LANG_PUSH(C++) |
d1751eee9a42
acinclude.m4: Use AC_LANG_PUSH macro with AC_CACHE_CHECK for greater efficiency.
Rik <rik@octave.org>
parents:
15293
diff
changeset
|
814 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
815 |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
816 #include <cfloat> |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
817 |
18058
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
818 #include <stdint.h> |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
819 |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
820 typedef OCTAVE_IDX_TYPE octave_idx_type; |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
821 typedef int F77_RET_T; |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
822 |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
823 #define F77_CHAR_ARG2(x, l) x |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
824 #define F77_CONST_CHAR_ARG2(x, l) F77_CHAR_ARG2 (x, l) |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
825 |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
826 #define F77_CHAR_ARG_LEN(l) , l |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
827 |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
828 #define F77_CONST_CHAR_ARG_DECL const char * |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
829 #define F77_CHAR_ARG_LEN_DECL , long |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
830 |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
831 extern "C" |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
832 { |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
833 F77_RET_T |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
834 F77_FUNC (dnaupd, DNAUPD) (octave_idx_type&, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
835 F77_CONST_CHAR_ARG_DECL, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
836 const octave_idx_type&, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
837 F77_CONST_CHAR_ARG_DECL, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
838 octave_idx_type&, const double&, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
839 double*, const octave_idx_type&, double*, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
840 const octave_idx_type&, octave_idx_type*, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
841 octave_idx_type*, double*, double*, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
842 const octave_idx_type&, octave_idx_type& |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
843 F77_CHAR_ARG_LEN_DECL |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
844 F77_CHAR_ARG_LEN_DECL); |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
845 |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
846 F77_RET_T |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
847 F77_FUNC (dneupd, DNEUPD) (const octave_idx_type&, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
848 F77_CONST_CHAR_ARG_DECL, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
849 octave_idx_type*, double*, double*, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
850 double*, const octave_idx_type&, const double&, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
851 const double&, double*, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
852 F77_CONST_CHAR_ARG_DECL, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
853 const octave_idx_type&, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
854 F77_CONST_CHAR_ARG_DECL, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
855 octave_idx_type&, const double&, double*, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
856 const octave_idx_type&, double*, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
857 const octave_idx_type&, octave_idx_type*, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
858 octave_idx_type*, double*, double*, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
859 const octave_idx_type&, octave_idx_type& |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
860 F77_CHAR_ARG_LEN_DECL |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
861 F77_CHAR_ARG_LEN_DECL |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
862 F77_CHAR_ARG_LEN_DECL); |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
863 |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
864 F77_RET_T |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
865 F77_FUNC (dgemv, DGEMV) (F77_CONST_CHAR_ARG_DECL, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
866 const octave_idx_type&, const octave_idx_type&, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
867 const double&, const double*, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
868 const octave_idx_type&, const double*, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
869 const octave_idx_type&, const double&, double*, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
870 const octave_idx_type& |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
871 F77_CHAR_ARG_LEN_DECL); |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
872 } |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
873 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
874 void |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
875 doit (void) |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
876 { |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
877 // 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
|
878 |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
879 // Problem matrix. See bug #31479. |
18058
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
880 octave_idx_type n = 4; |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
881 double *m = new double [n * n]; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
882 m[0] = 1, m[4] = 0, m[8] = 0, m[12] = -1; |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
883 m[1] = 0, m[5] = 1, m[9] = 0, m[13] = 0; |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
884 m[2] = 0, m[6] = 0, m[10] = 1, m[14] = 0; |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
885 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
|
886 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
887 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
|
888 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
889 resid[0] = 0.960966; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
890 resid[1] = 0.741195; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
891 resid[2] = 0.150143; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
892 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
|
893 |
18058
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
894 octave_idx_type *ip = new octave_idx_type [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
|
895 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
896 ip[0] = 1; // ishift |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
897 ip[1] = 0; // ip[1] not referenced |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
898 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
|
899 ip[3] = 1; // NB blocksize in recurrence |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
900 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
|
901 ip[5] = 0; // ip[5] not referenced |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
902 ip[6] = 1; // mode |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
903 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
|
904 ip[8] = 0; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
905 ip[9] = 0; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
906 ip[10] = 0; |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
907 |
18058
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
908 octave_idx_type *ipntr = new octave_idx_type [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
|
909 |
18058
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
910 octave_idx_type k = 1; |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
911 octave_idx_type p = 3; |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
912 octave_idx_type lwork = 3 * p * (p + 2); |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
913 |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
914 double *v = new double [n * (p + 1)]; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
915 double *workl = new double [lwork + 1]; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
916 double *workd = new double [3 * n + 1]; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
917 |
18058
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
918 octave_idx_type ido = 0; |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
919 octave_idx_type 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
|
920 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
921 double tol = DBL_EPSILON; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
922 |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
923 do |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
924 { |
18058
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
925 F77_FUNC (dnaupd, DNAUPD) (ido, F77_CONST_CHAR_ARG2 ("I", 1), |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
926 n, F77_CONST_CHAR_ARG2 ("LM", 2), |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
927 k, tol, resid, p, v, n, ip, ipntr, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
928 workd, workl, lwork, info |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
929 F77_CHAR_ARG_LEN (1) |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
930 F77_CHAR_ARG_LEN (2)); |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
931 |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
932 if (ido == -1 || ido == 1 || ido == 2) |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
933 { |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
934 double *x = workd + ipntr[0] - 1; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
935 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
|
936 |
18058
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
937 F77_FUNC (dgemv, DGEMV) (F77_CONST_CHAR_ARG2 ("N", 1), |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
938 n, n, 1.0, m, n, x, 1, 0.0, y, 1 |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
939 F77_CHAR_ARG_LEN (1)); |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
940 } |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
941 else |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
942 { |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
943 if (info < 0) |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
944 return; // Error |
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
|
945 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
946 break; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
947 } |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
948 } |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
949 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
|
950 |
18058
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
951 octave_idx_type *sel = new octave_idx_type [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
|
952 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
953 // 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
|
954 double *dr = new double [k + 1]; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
955 double *di = new double [k + 1]; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
956 double *workev = new double [3 * p]; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
957 |
18058
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
958 for (octave_idx_type i = 0; i < k + 1; i++) |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
959 dr[i] = di[i] = 0.0; |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
960 |
18058
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
961 octave_idx_type 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
|
962 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
963 double sigmar = 0.0; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
964 double sigmai = 0.0; |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
965 |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
966 // In Octave, this is n*(k+1), but n*(k+2) avoids segfault |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
967 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
|
968 |
18058
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
969 F77_FUNC (dneupd, DNEUPD) (rvec, F77_CONST_CHAR_ARG2 ("A", 1), |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
970 sel, dr, di, z, n, sigmar, sigmai, workev, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
971 F77_CONST_CHAR_ARG2 ("I", 1), n, |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
972 F77_CONST_CHAR_ARG2 ("LM", 2), k, tol, |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
973 resid, p, v, n, ip, ipntr, workd, |
18058
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
974 workl, lwork, info |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
975 F77_CHAR_ARG_LEN (1) |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
976 F77_CHAR_ARG_LEN (1) |
46ca76f194cb
make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents:
18036
diff
changeset
|
977 F77_CHAR_ARG_LEN (2)); |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
978 } |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
979 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
980 ]], [[ |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
981 |
14147
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
982 for (int i = 0; i < 10; i++) |
71e28fda7be9
use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents:
14144
diff
changeset
|
983 doit (); |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
984 |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
985 ]])], |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
986 octave_cv_lib_arpack_ok_1=yes, |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
987 octave_cv_lib_arpack_ok_1=no, |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
988 octave_cv_lib_arpack_ok_1=yes) |
15294
d1751eee9a42
acinclude.m4: Use AC_LANG_PUSH macro with AC_CACHE_CHECK for greater efficiency.
Rik <rik@octave.org>
parents:
15293
diff
changeset
|
989 AC_LANG_POP(C++) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
990 ]) |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
991 if test $octave_cv_lib_arpack_ok_1 = yes; then |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
992 $1 |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
993 : |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
994 else |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
995 $2 |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
996 : |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
997 fi |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
998 ]) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
999 dnl |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1000 dnl Check whether ARPACK is buggy (it doesn't crash, but gets wrong answers). |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1001 dnl |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1002 dnl ARPACK versions < 3.3.0 have a bug which results in different eigenvalues |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1003 dnl being calculated depending on whether eigenvectors are also requested. |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1004 dnl See bug #52425. |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1005 dnl |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1006 AC_DEFUN([OCTAVE_CHECK_LIB_ARPACK_OK_2], [ |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1007 AC_CACHE_CHECK([whether the arpack library is free of bugs], |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1008 [octave_cv_lib_arpack_ok_2], |
24336
0771ce2d30ef
build: Fix compiling OCTAVE_ARPACK_OK_2 Fortran code (bug #52425).
Rik <rik@octave.org>
parents:
24289
diff
changeset
|
1009 [save_FFLAGS="$FFLAGS" |
0771ce2d30ef
build: Fix compiling OCTAVE_ARPACK_OK_2 Fortran code (bug #52425).
Rik <rik@octave.org>
parents:
24289
diff
changeset
|
1010 FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG" |
0771ce2d30ef
build: Fix compiling OCTAVE_ARPACK_OK_2 Fortran code (bug #52425).
Rik <rik@octave.org>
parents:
24289
diff
changeset
|
1011 AC_LANG_PUSH(Fortran 77) |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1012 AC_RUN_IFELSE([[ |
24446
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1013 program bug_52425 |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1014 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1015 integer maxn, maxnev, maxncv, ldv |
24446
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1016 parameter (maxn=256, maxnev=10, maxncv=25, |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1017 $ ldv=maxn ) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1018 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1019 Double precision |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1020 & v(ldv,maxncv), workl(maxncv*(maxncv+8)), |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1021 & workd(3*maxn), d(maxncv,2), resid(maxn), |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1022 & ax(maxn) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1023 logical select(maxncv) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1024 integer iparam(11), ipntr(11) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1025 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1026 character bmat*1, which*2 |
24446
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1027 integer ido, n, nev, ncv, lworkl, info, ierr, j, |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1028 & nx, nconv, maxitr, mode, ishfts |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1029 logical rvec |
24446
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1030 Double precision |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1031 & tol, sigma |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1032 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1033 Double precision |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1034 & zero |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1035 parameter (zero = 0.0D+0) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1036 c |
24446
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1037 Double precision |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1038 & dnrm2 |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1039 external dnrm2, daxpy |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1040 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1041 intrinsic abs |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1042 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1043 n = 20 |
24446
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1044 nev = 4 |
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1045 ncv = 20 |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1046 bmat = 'I' |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1047 which = 'BE' |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1048 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1049 lworkl = ncv*(ncv+8) |
24446
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1050 tol = zero |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1051 info = 1 |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1052 do j = 1,n |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1053 resid (j) = 1.0d0 |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1054 end do |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1055 ido = 0 |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1056 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1057 ishfts = 1 |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1058 maxitr = 300 |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1059 mode = 1 |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1060 c |
24446
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1061 iparam(1) = ishfts |
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1062 iparam(3) = maxitr |
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1063 iparam(7) = mode |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1064 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1065 10 continue |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1066 c |
24446
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1067 call dsaupd ( ido, bmat, n, which, nev, tol, resid, |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1068 & ncv, v, ldv, iparam, ipntr, workd, workl, |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1069 & lworkl, info ) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1070 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1071 if (ido .eq. -1 .or. ido .eq. 1) then |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1072 call av (n, workd(ipntr(1)), workd(ipntr(2))) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1073 go to 10 |
24446
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1074 end if |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1075 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1076 if ( info .lt. 0 ) then |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1077 stop 1 |
24446
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1078 else |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1079 rvec = .false. |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1080 c |
24446
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1081 call dseupd ( rvec, 'All', select, d, v, ldv, sigma, |
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1082 & bmat, n, which, nev, tol, resid, ncv, v, ldv, |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1083 & iparam, ipntr, workd, workl, lworkl, ierr ) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1084 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1085 if ( ierr .ne. 0) then |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1086 stop 1 |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1087 else |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1088 nconv = iparam(5) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1089 do 20 j=1, nconv |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1090 call av(n, v(1,j), ax) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1091 call daxpy(n, -d(j,1), v(1,j), 1, ax, 1) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1092 d(j,2) = dnrm2(n, ax, 1) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1093 d(j,2) = d(j,2) / abs(d(j,1)) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1094 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1095 20 continue |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1096 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1097 c | Litmus test: return 1 or 0 based on returned eigenvalue |
24446
4ca5c9f899d3
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24337
diff
changeset
|
1098 c |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1099 if (abs(d(1,1) - 2.0810) > 1.0d-4) then |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1100 stop 1 |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1101 else |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1102 stop 0 |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1103 end if |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1104 end if |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1105 end if |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1106 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1107 end |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1108 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1109 subroutine av (n, v, w) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1110 integer n, j |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1111 Double precision v(n), w(n) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1112 c |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1113 w(1) = 4*v(1) + v(3) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1114 w(2) = 4*v(2) + v(4) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1115 do 10 j = 3, n - 2 |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1116 w(j) = v(j-2) + 4*v(j) + v(j+2) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1117 10 continue |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1118 w(n-1) = v(n-3) + 4 * v(n-1) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1119 w(n) = v(n-2) + 4 * v(n) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1120 return |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1121 end |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1122 ]], |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1123 octave_cv_lib_arpack_ok_2=yes, |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1124 octave_cv_lib_arpack_ok_2=no, |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1125 octave_cv_lib_arpack_ok_2=yes) |
24336
0771ce2d30ef
build: Fix compiling OCTAVE_ARPACK_OK_2 Fortran code (bug #52425).
Rik <rik@octave.org>
parents:
24289
diff
changeset
|
1126 ## Restore FFLAGS. |
0771ce2d30ef
build: Fix compiling OCTAVE_ARPACK_OK_2 Fortran code (bug #52425).
Rik <rik@octave.org>
parents:
24289
diff
changeset
|
1127 FFLAGS="$save_FFLAGS" |
24289
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1128 AC_LANG_POP(Fortran 77) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1129 ]) |
f52d91f6ef80
Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents:
23835
diff
changeset
|
1130 if test $octave_cv_lib_arpack_ok_2 = yes; then |
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
|
1131 $1 |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
1132 : |
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
|
1133 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
|
1134 $2 |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
1135 : |
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
|
1136 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
|
1137 ]) |
834df9f10963
remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
1138 dnl |
17241
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1139 dnl Check whether GLPK provides the latest API functions required |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1140 dnl for the glpk function. The glp_iptcp structure was introduced |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1141 dnl in GLPK version 4.38. |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1142 dnl |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1143 AC_DEFUN([OCTAVE_CHECK_LIB_GLPK_OK], [ |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1144 AC_CACHE_CHECK([whether the glpk library has glp_interior(glp_prob*, glp_iptcp*)], |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1145 [octave_cv_lib_glpk_ok], |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1146 [AC_LANG_PUSH(C++) |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1147 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1148 extern "C" |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1149 { |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1150 #if defined (HAVE_GLPK_GLPK_H) |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1151 #include <glpk/glpk.h> |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1152 #else |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1153 #include <glpk.h> |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1154 #endif |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1155 } |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1156 ]], [[ |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1157 glp_prob *lp = glp_create_prob (); |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1158 glp_iptcp iptcp; |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1159 glp_init_iptcp (&iptcp); |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1160 int retval = glp_interior (lp, &iptcp); |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1161 ]])], |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1162 octave_cv_lib_glpk_ok=yes, |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1163 octave_cv_lib_glpk_ok=no) |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1164 AC_LANG_POP(C++) |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1165 ]) |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1166 if test $octave_cv_lib_glpk_ok = yes; then |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1167 $1 |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1168 : |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1169 else |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1170 $2 |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1171 : |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1172 fi |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1173 ]) |
03a666018e0f
build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents:
17197
diff
changeset
|
1174 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1175 dnl Check whether using HDF5 DLL under Windows. This is done by |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1176 dnl testing for a data symbol in the HDF5 library, which would |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1177 dnl require the definition of _HDF5USEDL_ under MSVC compiler. |
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
|
1178 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1179 AC_DEFUN([OCTAVE_CHECK_LIB_HDF5_DLL], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1180 AC_CACHE_CHECK([if _HDF5USEDLL_ needs to be defined], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1181 [octave_cv_lib_hdf5_dll], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1182 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1183 #include <hdf5.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1184 ]], [[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1185 hid_t x = H5T_NATIVE_DOUBLE; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1186 return x |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1187 ]])], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1188 [octave_cv_lib_hdf5_dll=no], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1189 [save_CFLAGS="$CFLAGS" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1190 CFLAGS="$CFLAGS -DWIN32 -D_HDF5USEDLL_" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1191 save_LIBS="$LIBS" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1192 LIBS="$HDF5_LIBS $LIBS" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1193 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1194 #include <hdf5.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1195 ]], [[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1196 hid_t x = H5T_NATIVE_DOUBLE; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1197 return x |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1198 ]])], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1199 octave_cv_lib_hdf5_dll=yes, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1200 octave_cv_lib_hdf5_dll=no) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1201 CFLAGS="$save_CFLAGS" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1202 LIBS="$save_LIBS" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1203 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1204 ]) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
1205 if test $octave_cv_lib_hdf5_dll = yes; then |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1206 AC_DEFINE(_HDF5USEDLL_, 1, [Define to 1 if using HDF5 dll (Win32).]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1207 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1208 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1209 dnl |
15133
f91eac1bc66d
m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents:
15126
diff
changeset
|
1210 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
|
1211 dnl |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1212 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
|
1213 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
|
1214 dnl |
15063
36cbcc37fdb8
Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents:
15013
diff
changeset
|
1215 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
|
1216 dnl libraries and header files? |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1217 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1218 AC_DEFUN([OCTAVE_CHECK_LIB_OPENGL], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1219 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
|
1220 |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1221 ## On MacOSX systems the OpenGL framework can be used |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1222 OCTAVE_HAVE_FRAMEWORK(OpenGL, [[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1223 #include <OpenGL/gl.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1224 #include <OpenGL/glu.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1225 ]], [[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1226 GLint par; glGetIntegerv (GL_VIEWPORT, &par); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1227 ]], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1228 have_framework_opengl=yes, have_framework_opengl=no) |
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
|
1229 |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
1230 if test $have_framework_opengl = yes; then |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1231 AC_DEFINE(HAVE_FRAMEWORK_OPENGL, 1, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1232 [Define to 1 if framework OPENGL is available.]) |
22208
83963bad5e7d
improvements to Qt & OpenGL linking on the Mac (bug #41574)
Michael C. Grant <mcg@cvxr.com>
parents:
22150
diff
changeset
|
1233 OPENGL_LIBS="-framework OpenGL" |
83963bad5e7d
improvements to Qt & OpenGL linking on the Mac (bug #41574)
Michael C. Grant <mcg@cvxr.com>
parents:
22150
diff
changeset
|
1234 AC_MSG_NOTICE([adding -framework OpenGL to OPENGL_LIBS]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1235 OCTAVE_CHECK_FUNC_GLUTESSCALLBACK_THREEDOTS |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1236 else |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1237 case $canonical_host_type in |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1238 *-*-mingw32* | *-*-msdosmsvc) |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
1239 AC_CHECK_HEADERS([windows.h]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1240 ;; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1241 esac |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1242 have_opengl_incs=no |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1243 AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1244 [AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1245 [have_opengl_incs=yes; break], [], [ |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21604
diff
changeset
|
1246 #if defined (HAVE_WINDOWS_H) |
7954 | 1247 #include <windows.h> |
1248 #endif | |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1249 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1250 break |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1251 ], [], [ |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21604
diff
changeset
|
1252 #if defined (HAVE_WINDOWS_H) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1253 # include <windows.h> |
7954 | 1254 #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
|
1255 ]) |
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
|
1256 |
17197
fbee0d312af5
acinclude.m4: Remove some unnecessary double quotes around variables.
Rik <rik@octave.org>
parents:
17196
diff
changeset
|
1257 if test $have_opengl_incs = yes; then |
18866 | 1258 AC_CHECK_HEADERS([GL/glext.h OpenGL/glext.h], [], [], [ |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21604
diff
changeset
|
1259 #if defined (HAVE_WINDOWS_H) |
18866 | 1260 # include <windows.h> |
1261 #endif | |
1262 #if defined (HAVE_GL_GL_H) | |
1263 # include <GL/gl.h> | |
1264 #elif defined (HAVE_OPENGL_GL_H) | |
1265 # include <OpenGL/gl.h> | |
1266 #endif | |
1267 ]) | |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1268 case $canonical_host_type in |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1269 *-*-mingw32* | *-*-msdosmsvc) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1270 save_LIBS="$LIBS" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1271 LIBS="$LIBS -lopengl32" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1272 AC_MSG_CHECKING([for glEnable in -lopengl32]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1273 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1274 #if HAVE_WINDOWS_H |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1275 # include <windows.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1276 #endif |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1277 #if defined (HAVE_GL_GL_H) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1278 # include <GL/gl.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1279 #elif defined (HAVE_OPENGL_GL_H) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1280 # include <OpenGL/gl.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1281 #endif |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
1282 ]], [[ |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1283 glEnable(GL_SMOOTH); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1284 ]])], [OPENGL_LIBS="-lopengl32 -lglu32"]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1285 |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1286 LIBS="$save_LIBS" |
21374
1487a68a496a
untangle configuration of OpenGL, FLTK, and Qt (bug #47263)
John W. Eaton <jwe@octave.org>
parents:
21354
diff
changeset
|
1287 if test -n "$OPENGL_LIBS"; then |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
1288 AC_MSG_RESULT([yes]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1289 else |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
1290 AC_MSG_RESULT([no]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1291 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1292 ;; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1293 *) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1294 ## Non-Mac, Non-Windows systems use this check |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
1295 AC_CHECK_LIB([GL], [glEnable], [OPENGL_LIBS="-lGL -lGLU"]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1296 ;; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1297 esac |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1298 fi |
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
|
1299 fi |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1300 AC_SUBST(OPENGL_LIBS) |
21374
1487a68a496a
untangle configuration of OpenGL, FLTK, and Qt (bug #47263)
John W. Eaton <jwe@octave.org>
parents:
21354
diff
changeset
|
1301 if test -n "$OPENGL_LIBS"; then |
1487a68a496a
untangle configuration of OpenGL, FLTK, and Qt (bug #47263)
John W. Eaton <jwe@octave.org>
parents:
21354
diff
changeset
|
1302 AC_DEFINE(HAVE_OPENGL, 1, [Define to 1 if OpenGL is available.]) |
1487a68a496a
untangle configuration of OpenGL, FLTK, and Qt (bug #47263)
John W. Eaton <jwe@octave.org>
parents:
21354
diff
changeset
|
1303 fi |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1304 ]) |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1305 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1306 dnl Check whether Qhull works (does not crash). |
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
|
1307 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1308 AC_DEFUN([OCTAVE_CHECK_LIB_QHULL_OK], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1309 AC_CACHE_CHECK([whether the qhull library works], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1310 [octave_cv_lib_qhull_ok], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1311 [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1312 #include <stdio.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1313 #if defined (HAVE_LIBQHULL_LIBQHULL_H) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1314 # include <libqhull/libqhull.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1315 # include <libqhull/qset.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1316 # include <libqhull/geom.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1317 # include <libqhull/poly.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1318 # include <libqhull/io.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1319 #elif defined (HAVE_QHULL_LIBQHULL_H) || defined (HAVE_QHULL_QHULL_H) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1320 # if defined (HAVE_QHULL_LIBQHULL_H) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1321 # include <qhull/libqhull.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1322 # else |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1323 # include <qhull/qhull.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1324 # endif |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1325 # include <qhull/qset.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1326 # include <qhull/geom.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1327 # include <qhull/poly.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1328 # include <qhull/io.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1329 #elif defined (HAVE_LIBQHULL_H) || defined (HAVE_QHULL_H) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1330 # if defined (HAVE_LIBQHULL_H) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1331 # include <libqhull.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1332 # else |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1333 # include <qhull.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1334 # endif |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1335 # include <qset.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1336 # include <geom.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1337 # include <poly.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1338 # include <io.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1339 #endif |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21604
diff
changeset
|
1340 #if defined (NEED_QHULL_VERSION) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1341 char *qh_version = "version"; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1342 #endif |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1343 ]], [[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1344 int dim = 2; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1345 int n = 4; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1346 coordT points[8] = { -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, 0.5 }; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1347 boolT ismalloc = 0; |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
1348 return qh_new_qhull (dim, n, points, ismalloc, "qhull ", 0, stderr); |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1349 ]])], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1350 octave_cv_lib_qhull_ok=yes, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1351 octave_cv_lib_qhull_ok=no, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1352 octave_cv_lib_qhull_ok=yes) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1353 ]) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
1354 if test $octave_cv_lib_qhull_ok = yes; then |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1355 $1 |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
1356 : |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1357 else |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1358 $2 |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
1359 : |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1360 fi |
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
|
1361 ]) |
20715
5b7643257978
Remove trailing whitespace at end of lines.
Rik <rik@octave.org>
parents:
20420
diff
changeset
|
1362 dnl |
20153
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1363 dnl Check whether sndfile library is modern enough to include things like Ogg |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1364 dnl |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1365 AC_DEFUN([OCTAVE_CHECK_LIB_SNDFILE_OK], [ |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1366 AC_CACHE_CHECK([whether sndfile library is modern enough], |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1367 [octave_cv_lib_sndfile_ok], |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1368 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1369 #include <sndfile.h> |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1370 ]], [[ |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1371 int x = SF_FORMAT_OGG; |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1372 ]])], |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1373 octave_cv_lib_sndfile_ok=yes, |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1374 octave_cv_lib_sndfile_ok=no) |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1375 ]) |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1376 if test $octave_cv_lib_sndfile_ok = yes; then |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1377 $1 |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1378 : |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1379 else |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1380 $2 |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1381 : |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1382 fi |
3b3579ad7e46
Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents:
19816
diff
changeset
|
1383 ]) |
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
|
1384 dnl |
15302
a8cfbc1911e4
build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents:
15295
diff
changeset
|
1385 dnl Find a suitable termlib to use. |
a8cfbc1911e4
build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents:
15295
diff
changeset
|
1386 dnl |
a8cfbc1911e4
build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents:
15295
diff
changeset
|
1387 AC_DEFUN([OCTAVE_CHECK_LIB_TERMLIB], [ |
a8cfbc1911e4
build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents:
15295
diff
changeset
|
1388 TERM_LIBS= |
15338
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1389 ac_octave_save_LIBS="$LIBS" |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1390 AC_SEARCH_LIBS([tputs], |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1391 [ncurses curses termcap terminfo termlib], |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1392 [], []) |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1393 LIBS="$ac_octave_save_LIBS" |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1394 case "$ac_cv_search_tputs" in |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
1395 -l*) |
15338
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1396 TERM_LIBS="$ac_cv_search_tputs" |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1397 ;; |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1398 no) |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1399 warn_termlibs="I couldn't find -ltermcap, -lterminfo, -lncurses, -lcurses, or -ltermlib!" |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1400 AC_MSG_WARN([$warn_termlibs]) |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1401 ;; |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1402 esac |
15302
a8cfbc1911e4
build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents:
15295
diff
changeset
|
1403 |
15338
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1404 dnl Old code (9/9/2012). Delete when new code is definitely proven. |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1405 dnl |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1406 dnl for _termlib in ncurses curses termcap terminfo termlib; do |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1407 dnl AC_CHECK_LIB([${_termlib}], [tputs], [ |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1408 dnl TERM_LIBS="-l${termlib}" |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1409 dnl octave_cv_lib_found_termlib=yes |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1410 dnl break]) |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1411 dnl done |
dc39c1d84c5b
build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents:
15336
diff
changeset
|
1412 |
15302
a8cfbc1911e4
build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents:
15295
diff
changeset
|
1413 AC_SUBST(TERM_LIBS) |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1414 ]) |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1415 dnl |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1416 dnl Check whether the Qt class QFont has the ForceIntegerMetrics enumerated |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1417 dnl type member. This property was introduced in Qt 4.7. |
23510
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1418 dnl |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1419 dnl FIXME: Delete this entirely when we can safely assume that Qt 4.7 or later |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1420 dnl is in use everywhere, or when we drop support for Qt 4. |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1421 dnl |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1422 AC_DEFUN([OCTAVE_CHECK_MEMBER_QFONT_FORCE_INTEGER_METRICS], [ |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1423 AC_CACHE_CHECK([for QFont::ForceIntegerMetrics in <QFont>], |
23510
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1424 [octave_cv_decl_qfont_force_integer_metrics], |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1425 [AC_LANG_PUSH(C++) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1426 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1427 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1428 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1429 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1430 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1431 #include <QFont> |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1432 ]], [[ |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1433 QFont::StyleStrategy strategy = QFont::ForceIntegerMetrics; |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1434 ]])], |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1435 octave_cv_decl_qfont_force_integer_metrics=yes, |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1436 octave_cv_decl_qfont_force_integer_metrics=no) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1437 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1438 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1439 AC_LANG_POP(C++) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1440 ]) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1441 if test $octave_cv_decl_qfont_force_integer_metrics = yes; then |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1442 AC_DEFINE(HAVE_QFONT_FORCE_INTEGER_METRICS, 1, |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1443 [Define to 1 if `ForceIntegerMetrics' is a member of `QFont'.]) |
23510
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1444 fi |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1445 ]) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1446 dnl |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1447 dnl Check whether the Qt class QFont has the Monospace enumerated type member. |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1448 dnl This property was introduced in Qt 4.7. |
23510
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1449 dnl |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1450 dnl FIXME: Delete this entirely when we can safely assume that Qt 4.7 or later |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1451 dnl is in use everywhere, or when we drop support for Qt 4. |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1452 dnl |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1453 AC_DEFUN([OCTAVE_CHECK_MEMBER_QFONT_MONOSPACE], [ |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1454 AC_CACHE_CHECK([for QFont::Monospace in <QFont>], |
23510
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1455 [octave_cv_decl_qfont_monospace], |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1456 [AC_LANG_PUSH(C++) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1457 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1458 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1459 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1460 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1461 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1462 #include <QFont> |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1463 ]], [[ |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1464 QFont::StyleHint hint = QFont::Monospace; |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1465 ]])], |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1466 octave_cv_decl_qfont_monospace=yes, |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1467 octave_cv_decl_qfont_monospace=no) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1468 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1469 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1470 AC_LANG_POP(C++) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1471 ]) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1472 if test $octave_cv_decl_qfont_monospace = yes; then |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1473 AC_DEFINE(HAVE_QFONT_MONOSPACE, 1, |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
1474 [Define to 1 if `Monospace' is a member of `QFont'.]) |
23510
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1475 fi |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1476 ]) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1477 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1478 dnl Check for the Qhull version. |
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
|
1479 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1480 AC_DEFUN([OCTAVE_CHECK_QHULL_VERSION], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1481 AC_CACHE_CHECK([for qh_version in $QHULL_LIBS], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1482 [octave_cv_lib_qhull_version], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1483 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1484 #include <stdio.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1485 #if defined (HAVE_LIBQHULL_LIBQHULL_H) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1486 # include <libqhull/libqhull.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1487 # include <libqhull/qset.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1488 # include <libqhull/geom.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1489 # include <libqhull/poly.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1490 # include <libqhull/io.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1491 #elif defined (HAVE_QHULL_LIBQHULL_H) || defined (HAVE_QHULL_QHULL_H) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1492 # if defined (HAVE_QHULL_LIBQHULL_H) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1493 # include <qhull/libqhull.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1494 # else |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1495 # include <qhull/qhull.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1496 # endif |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1497 # include <qhull/qset.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1498 # include <qhull/geom.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1499 # include <qhull/poly.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1500 # include <qhull/io.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1501 #elif defined (HAVE_LIBQHULL_H) || defined (HAVE_QHULL_H) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1502 # if defined (HAVE_LIBQHULL_H) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1503 # include <libqhull.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1504 # else |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1505 # include <qhull.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1506 # endif |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1507 # include <qset.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1508 # include <geom.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1509 # include <poly.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1510 # include <io.h> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1511 #endif |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1512 ]], [[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1513 const char *tmp = qh_version; |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
1514 ]])], |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1515 octave_cv_lib_qhull_version=yes, octave_cv_lib_qhull_version=no) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1516 ]) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
1517 if test $octave_cv_lib_qhull_version = no; then |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1518 AC_DEFINE(NEED_QHULL_VERSION, 1, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1519 [Define to 1 if the Qhull library needs a qh_version variable defined.]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1520 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1521 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
1522 dnl |
22823
e2afee0041bf
new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
1523 dnl Check whether we have QScintilla for the given Qt VERSION. |
20420
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1524 dnl |
22823
e2afee0041bf
new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
1525 AC_DEFUN([OCTAVE_CHECK_QSCINTILLA], [ |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1526 qt_version="$1"; |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1527 use_qscintilla=no |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1528 warn_qscintilla="" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1529 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1530 ## Check for Qt libraries |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1531 case "$qt_version" in |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1532 4) |
24125
ed746cbfce24
* acinclude.m4: Search for version-specific qscintilla libs first.
John W. Eaton <jwe@octave.org>
parents:
24124
diff
changeset
|
1533 octave_qscintilla_libnames="qscintilla2-qt4 qscintilla2_qt4 qt4scintilla2 qscintilla2" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1534 ;; |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1535 5) |
23414
a759896c2b53
acinclude.m4: Look for "qscintilla_qt5" as another name for Qt5 scintilla library.
Rik <rik@octave.org>
parents:
23219
diff
changeset
|
1536 octave_qscintilla_libnames="qscintilla2-qt5 qscintilla2_qt5 qt5scintilla2" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1537 ;; |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1538 *) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1539 AC_MSG_ERROR([Unrecognized Qt version $qt_version]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1540 ;; |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1541 esac |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1542 |
22823
e2afee0041bf
new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
1543 if test $build_qt_gui = yes && test $check_qscintilla = yes; then |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1544 |
22286
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1545 ## Check for QScintilla library which is used in the Qt GUI editor. |
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1546 AC_CACHE_CHECK([for the QScintilla library for Qt $qt_version], |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1547 [octave_cv_lib_qscintilla], |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1548 [save_CPPFLAGS="$CPPFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1549 save_CXXFLAGS="$CXXFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1550 save_LDFLAGS="$LDFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1551 save_LIBS="$LIBS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1552 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1553 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1554 LDFLAGS="$QT_LDFLAGS $LDFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1555 AC_LANG_PUSH(C++) |
22286
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1556 for octave_qscintilla_try in $octave_qscintilla_libnames; do |
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1557 LIBS="$QT_LIBS -l$octave_qscintilla_try" |
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1558 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
22456
8924139b4f21
fix test for qscintilla (bug #49018)
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
1559 #include <Qsci/qsciapis.h> |
8924139b4f21
fix test for qscintilla (bug #49018)
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
1560 #include <Qsci/qscilexercpp.h> |
22286
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1561 ]], [[ |
22456
8924139b4f21
fix test for qscintilla (bug #49018)
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
1562 QsciLexer *lexer = new QsciLexerCPP (); |
8924139b4f21
fix test for qscintilla (bug #49018)
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
1563 QsciAPIs *lexer_apis = new QsciAPIs (lexer); |
22286
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1564 ]])], |
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1565 octave_cv_lib_qscintilla="-l$octave_qscintilla_try", |
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1566 octave_cv_lib_qscintilla=no) |
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1567 if test $octave_cv_lib_qscintilla != no; then |
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1568 break |
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1569 fi |
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1570 done |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1571 CPPFLAGS="$save_CPPFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1572 CXXFLAGS="$save_CXXFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1573 LDFLAGS="$save_LDFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1574 LIBS="$save_LIBS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1575 AC_LANG_POP([C++]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1576 ]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1577 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1578 if test $octave_cv_lib_qscintilla = no; then |
22286
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1579 warn_qscintilla="QScintilla library not found; disabling built-in Qt GUI editor" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1580 else |
22286
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1581 ## Let's assume QScintilla library is at the same location as |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1582 ## other regular Qt libraries. |
22286
f394436a4025
build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents:
22257
diff
changeset
|
1583 QT_LIBS="$QT_LIBS $octave_cv_lib_qscintilla" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1584 OCTAVE_CHECK_QSCINTILLA_VERSION |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1585 AC_DEFINE(HAVE_QSCINTILLA, 1, |
22250
2fd4f1a3f4a8
allow building with Qt5 (bug #40252)
John W. Eaton <jwe@octave.org>
parents:
22234
diff
changeset
|
1586 [Define to 1 if the QScintilla library and header files are available.]) |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1587 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1588 save_CPPFLAGS="$CPPFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1589 save_CXXFLAGS="$CXXFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1590 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1591 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1592 AC_LANG_PUSH(C++) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1593 AC_CHECK_HEADERS([Qsci/qscilexeroctave.h Qsci/qscilexermatlab.h]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1594 AC_LANG_POP(C++) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1595 CPPFLAGS="$save_CPPFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1596 CXXFLAGS="$save_CXXFLAGS" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1597 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1598 OCTAVE_CHECK_FUNC_QSCI_FINDSELECTION |
22823
e2afee0041bf
new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
1599 |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1600 use_qscintilla=yes |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1601 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1602 fi |
22823
e2afee0041bf
new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
1603 ]) |
e2afee0041bf
new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
1604 dnl |
23510
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1605 dnl Check whether QScintilla has version 2.6.0 or later |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1606 dnl FIXME: This test uses a version number. It potentially could |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1607 dnl be re-written to actually call the function, but is it worth it? |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1608 dnl |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1609 AC_DEFUN([OCTAVE_CHECK_QSCINTILLA_VERSION], [ |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1610 AC_CACHE_CHECK([whether QScintilla has version 2.6.0 or later], |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1611 [octave_cv_version_2_6_0], |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1612 [AC_LANG_PUSH(C++) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1613 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1614 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1615 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1616 #include <Qsci/qsciglobal.h> |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1617 ]], [[ |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1618 #if QSCINTILLA_VERSION < 0x020600 |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1619 #error Old FindFirst function found. |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1620 #endif |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1621 ]])], |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1622 octave_cv_version_2_6_0=yes, |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1623 octave_cv_version_2_6_0=no) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1624 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1625 AC_LANG_POP(C++) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1626 ]) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1627 if test $octave_cv_version_2_6_0 = yes; then |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1628 AC_DEFINE(HAVE_QSCI_VERSION_2_6_0, 1, |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1629 [Define to 1 if QScintilla is of Version 2.6.0 or later.]) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
1630 fi |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1631 ]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1632 dnl |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1633 dnl OCTAVE_CHECK_QT |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1634 dnl |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1635 AC_DEFUN([OCTAVE_CHECK_QT], [ |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1636 octave_qt_versions="$1" |
22257
945e7f9c11ff
build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents:
22255
diff
changeset
|
1637 |
945e7f9c11ff
build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents:
22255
diff
changeset
|
1638 build_qt_gui=no |
945e7f9c11ff
build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents:
22255
diff
changeset
|
1639 build_qt_graphics=no |
945e7f9c11ff
build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents:
22255
diff
changeset
|
1640 use_qscintilla=no |
945e7f9c11ff
build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents:
22255
diff
changeset
|
1641 win32_terminal=no |
945e7f9c11ff
build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents:
22255
diff
changeset
|
1642 |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1643 for ver in $octave_qt_versions; do |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1644 OCTAVE_CHECK_QT_VERSION([$ver]) |
22250
2fd4f1a3f4a8
allow building with Qt5 (bug #40252)
John W. Eaton <jwe@octave.org>
parents:
22234
diff
changeset
|
1645 if test $build_qt_gui = yes; then |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1646 have_qt_version=$ver |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1647 break |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1648 fi |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1649 done |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1650 |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1651 if test $build_qt_gui = yes; then |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1652 if test x"$have_qt_version" = x4; then |
24810
8a92f442c4a2
configure.ac: Overhaul file (bug #53186).
Rik <rik@octave.org>
parents:
24798
diff
changeset
|
1653 AC_DEFINE(HAVE_QT4, 1, [Define to 1 if using Qt version 4.]) |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1654 fi |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1655 if test x"$have_qt_version" = x5; then |
24810
8a92f442c4a2
configure.ac: Overhaul file (bug #53186).
Rik <rik@octave.org>
parents:
24798
diff
changeset
|
1656 AC_DEFINE(HAVE_QT5, 1, [Define to 1 if using Qt version 5.]) |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1657 fi |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1658 else |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1659 if test -n "$warn_qt_libraries"; then |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1660 OCTAVE_CONFIGURE_WARNING([warn_qt_libraries]) |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1661 fi |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1662 if test -n "$warn_qt_version"; then |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1663 OCTAVE_CONFIGURE_WARNING([warn_qt_version]) |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1664 fi |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1665 if test -n "$warn_qt_tools"; then |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1666 OCTAVE_CONFIGURE_WARNING([warn_qt_tools]) |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1667 fi |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1668 if test -n "$warn_qt_setlocale"; then |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1669 OCTAVE_CONFIGURE_WARNING([warn_qt_setlocale]) |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1670 fi |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1671 if test -n "$warn_qt_setvbuf"; then |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1672 OCTAVE_CONFIGURE_WARNING([warn_qt_setvbuf]) |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1673 fi |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1674 if test -n "$warn_qt_lib_fcns"; then |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1675 OCTAVE_CONFIGURE_WARNING([warn_qt_lib_fcns]) |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1676 fi |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1677 if test -n "$warn_qt_abstract_item_model"; then |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1678 OCTAVE_CONFIGURE_WARNING([warn_qt_abstract_item_model]) |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1679 fi |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1680 if test -n "$warn_qt_opengl"; then |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1681 OCTAVE_CONFIGURE_WARNING([warn_qt_opengl]) |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1682 fi |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1683 if test -n "$warn_qscintilla"; then |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1684 OCTAVE_CONFIGURE_WARNING([warn_qscintilla]) |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1685 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1686 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1687 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1688 AM_CONDITIONAL([AMCOND_BUILD_QT_GUI], [test $build_qt_gui = yes]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1689 AM_CONDITIONAL([AMCOND_BUILD_QT_GRAPHICS], [test $build_qt_graphics = yes]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1690 AM_CONDITIONAL([AMCOND_HAVE_QSCINTILLA], [test $use_qscintilla = yes]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1691 AM_CONDITIONAL([WIN32_TERMINAL], [test $win32_terminal = yes]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1692 ]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1693 dnl |
24798
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1694 dnl Check whether QOffscreenSurface is present. |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1695 dnl |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1696 AC_DEFUN([OCTAVE_CHECK_QT_OPENGL_OFFSCREEN_OK], [ |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1697 dnl Normally the language and compiler flags would be set and restored |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1698 dnl inside of the AC_CACHE_CHECK body. Because we also need to check for |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1699 dnl Qt header files associated with the compilation test, set and restore |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1700 dnl these values outside of the AC_CACHE_CHECK for this macro only. |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1701 AC_LANG_PUSH(C++) |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1702 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1703 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1704 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1705 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1706 AC_CHECK_HEADERS([QOffscreenSurface]) |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1707 AC_CACHE_CHECK([whether Qt supports full offscreen OpenGL rendering], |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1708 [octave_cv_qt_opengl_os_ok], |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1709 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1710 #if HAVE_WINDOWS_H |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1711 # include <windows.h> |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1712 #endif |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1713 #if defined (HAVE_GL_GL_H) |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1714 # include <GL/gl.h> |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1715 #elif defined (HAVE_OPENGL_GL_H) |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1716 # include <OpenGL/gl.h> |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1717 #endif |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1718 #if defined (HAVE_GL_GLU_H) |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1719 # include <GL/glu.h> |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1720 #elif defined HAVE_OPENGL_GLU_H || defined HAVE_FRAMEWORK_OPENGL |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1721 # include <OpenGL/glu.h> |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1722 #endif |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1723 #if defined (HAVE_QOPENGLWIDGET) |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1724 # include <QOpenGLWidget> |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1725 # include <QOpenGLContext> |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1726 #endif |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1727 #if defined (HAVE_QOFFSCREENSURFACE) |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1728 # include <QOffscreenSurface> |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1729 #endif |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1730 QOpenGLContext ctx; |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1731 QOffscreenSurface surf; |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1732 ]])], |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1733 octave_cv_qt_opengl_os_ok=yes, |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1734 octave_cv_qt_opengl_os_ok=no) |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1735 ]) |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1736 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1737 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1738 AC_LANG_POP(C++) |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1739 if test $octave_cv_qt_opengl_os_ok = yes; then |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1740 $1 |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1741 : |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1742 else |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1743 $2 |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1744 : |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1745 fi |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1746 ]) |
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1747 dnl |
20420
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1748 dnl Check whether Qt works with full OpenGL support |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1749 dnl |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1750 AC_DEFUN([OCTAVE_CHECK_QT_OPENGL_OK], [ |
24144
8e034cb195f1
configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents:
24143
diff
changeset
|
1751 dnl Normally the language and compiler flags would be set and restored |
8e034cb195f1
configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents:
24143
diff
changeset
|
1752 dnl inside of the AC_CACHE_CHECK body. Because we also need to check for |
8e034cb195f1
configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents:
24143
diff
changeset
|
1753 dnl Qt header files associated with the compilation test, set and restore |
8e034cb195f1
configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents:
24143
diff
changeset
|
1754 dnl these values outside of the AC_CACHE_CHECK for this macro only. |
8e034cb195f1
configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents:
24143
diff
changeset
|
1755 AC_LANG_PUSH(C++) |
8e034cb195f1
configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents:
24143
diff
changeset
|
1756 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
8e034cb195f1
configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents:
24143
diff
changeset
|
1757 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
8e034cb195f1
configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents:
24143
diff
changeset
|
1758 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
8e034cb195f1
configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents:
24143
diff
changeset
|
1759 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" |
24143
25ccc1f8092d
configure: fix test for QOpenGLWidget headers when tests are cached
Mike Miller <mtmiller@octave.org>
parents:
24142
diff
changeset
|
1760 AC_CHECK_HEADERS([QOpenGLWidget QGLWidget]) |
20420
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1761 AC_CACHE_CHECK([whether Qt works with OpenGL and GLU], |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1762 [octave_cv_qt_opengl_ok], |
24144
8e034cb195f1
configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents:
24143
diff
changeset
|
1763 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
20420
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1764 #if HAVE_WINDOWS_H |
24142
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1765 # include <windows.h> |
20420
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1766 #endif |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1767 #if defined (HAVE_GL_GL_H) |
24142
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1768 # include <GL/gl.h> |
20420
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1769 #elif defined (HAVE_OPENGL_GL_H) |
24142
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1770 # include <OpenGL/gl.h> |
20420
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1771 #endif |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21604
diff
changeset
|
1772 #if defined (HAVE_GL_GLU_H) |
24142
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1773 # include <GL/glu.h> |
20420
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1774 #elif defined HAVE_OPENGL_GLU_H || defined HAVE_FRAMEWORK_OPENGL |
24142
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1775 # include <OpenGL/glu.h> |
20420
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1776 #endif |
24142
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1777 #if defined (HAVE_QOPENGLWIDGET) |
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1778 # include <QOpenGLWidget> |
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1779 # define OCTAVE_QT_OPENGL_WIDGET QOpenGLWidget |
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1780 #elif defined (HAVE_QGLWIDGET) |
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1781 # include <QGLWidget> |
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1782 # define OCTAVE_QT_OPENGL_WIDGET QGLWidget |
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1783 #endif |
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1784 class gl_widget : public OCTAVE_QT_OPENGL_WIDGET |
20420
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1785 { |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1786 public: |
24142
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1787 gl_widget (QWidget *parent = 0) |
59cdf06c940e
use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents:
24125
diff
changeset
|
1788 : OCTAVE_QT_OPENGL_WIDGET (parent) { } |
20420
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1789 ~gl_widget () {} |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1790 }; |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1791 ]], [[ |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1792 gl_widget widget; |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1793 ]])], |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1794 octave_cv_qt_opengl_ok=yes, |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1795 octave_cv_qt_opengl_ok=no) |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1796 ]) |
24144
8e034cb195f1
configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents:
24143
diff
changeset
|
1797 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
8e034cb195f1
configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents:
24143
diff
changeset
|
1798 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
8e034cb195f1
configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents:
24143
diff
changeset
|
1799 AC_LANG_POP(C++) |
20420
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1800 if test $octave_cv_qt_opengl_ok = yes; then |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1801 $1 |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1802 : |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1803 else |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1804 $2 |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1805 : |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1806 fi |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1807 ]) |
6cfbf412a2c3
configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents:
20416
diff
changeset
|
1808 dnl |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1809 dnl Check whether Qt VERSION is present, supports QtOpenGL and |
24798
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1810 dnl QScintilla, and will work for Octave. |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1811 dnl |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1812 dnl OCTAVE_CHECK_QT_VERSION(VERSION) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1813 dnl |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1814 AC_DEFUN([OCTAVE_CHECK_QT_VERSION], [AC_MSG_CHECKING([Qt version $1]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1815 QT_CPPFLAGS= |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1816 QT_LDFLAGS= |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1817 QT_LIBS= |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1818 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1819 qt_version="$1"; |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1820 |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1821 build_qt_gui=yes |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1822 build_qt_graphics=no |
24798
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
1823 have_qt_opengl_offscreen=no |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1824 win32_terminal=no |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1825 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1826 warn_qt_libraries="" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1827 warn_qt_version="" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1828 warn_qt_tools="" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1829 warn_qt_setlocale="" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1830 warn_qt_setvbuf="" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1831 warn_qt_lib_fcns="" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1832 warn_qt_abstract_item_model="" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1833 warn_qt_opengl="" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1834 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1835 ## Check for Qt libraries |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1836 case "$qt_version" in |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1837 4) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1838 QT_MODULES="QtCore QtGui QtNetwork QtOpenGL" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1839 ;; |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1840 5) |
22250
2fd4f1a3f4a8
allow building with Qt5 (bug #40252)
John W. Eaton <jwe@octave.org>
parents:
22234
diff
changeset
|
1841 QT_MODULES="Qt5Core Qt5Gui Qt5Network Qt5OpenGL Qt5PrintSupport" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1842 ;; |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1843 *) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1844 AC_MSG_ERROR([Unrecognized Qt version $qt_version]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1845 ;; |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1846 esac |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1847 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1848 PKG_CHECK_MODULES(QT, [$QT_MODULES], |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1849 [], |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1850 [build_qt_gui=no |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1851 warn_qt_libraries="Qt libraries not found; disabling Qt GUI"]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1852 |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1853 if test $build_qt_gui = yes; then |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1854 ## Retrieve Qt compilation and linker flags |
23835
6ae0292aaa5c
configure: ensure empty pkg-config results are actually empty (bug #51680)
Mike Miller <mtmiller@octave.org>
parents:
23414
diff
changeset
|
1855 QT_CPPFLAGS="$($PKG_CONFIG --cflags-only-I $QT_MODULES | $SED -e 's/^ *$//')" |
6ae0292aaa5c
configure: ensure empty pkg-config results are actually empty (bug #51680)
Mike Miller <mtmiller@octave.org>
parents:
23414
diff
changeset
|
1856 QT_LDFLAGS="$($PKG_CONFIG --libs-only-L $QT_MODULES | $SED -e 's/^ *$//')" |
6ae0292aaa5c
configure: ensure empty pkg-config results are actually empty (bug #51680)
Mike Miller <mtmiller@octave.org>
parents:
23414
diff
changeset
|
1857 QT_LIBS="$($PKG_CONFIG --libs-only-l $QT_MODULES | $SED -e 's/^ *$//')" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1858 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1859 case $host_os in |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1860 *darwin*) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1861 ## Qt might be installed in framework |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1862 if test -z "$QT_LIBS"; then |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1863 QT_LDFLAGS="`$PKG_CONFIG --libs-only-other $QT_MODULES | tr ' ' '\n' | $GREP -e '-F' | uniq | tr '\n' ' '`" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1864 QT_LIBS="`$PKG_CONFIG --libs-only-other $QT_MODULES | tr ' ' '\n' | $GREP -v -e '-F' | uniq | tr '\n' ' '`" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1865 ## Enabling link_all_deps works around libtool's imperfect handling |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1866 ## of the -F flag |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1867 AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS], |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1868 [test $link_all_deps = yes || test -n "$QT_LDFLAGS"]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1869 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1870 ;; |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1871 esac |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1872 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1873 if test $qt_version = 4; then |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1874 ## Check for Qt4 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1875 if ! `$PKG_CONFIG --atleast-version=4.0.0 QtCore`; then |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1876 build_qt_gui=no |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1877 warn_qt_version="Qt >= 4.0.0 not found; disabling Qt GUI" |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1878 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1879 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1880 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1881 |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1882 if test $build_qt_gui = yes; then |
23154
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1883 AC_CHECK_TOOLS(QTCHOOSER, [qtchooser]) |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1884 |
23154
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1885 AC_CHECK_TOOLS(MOC_QTVER, [moc-qt$qt_version]) |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1886 if test -z "$MOC_QTVER"; then |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1887 AC_CHECK_TOOLS(MOC, [moc]) |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1888 if test -n "$MOC" && test -n "$QTCHOOSER"; then |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1889 MOCFLAGS="-qt$qt_version" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1890 fi |
23088
e2b1f3546978
fix caching error with Qt tool configuration (bug #50129)
John W. Eaton <jwe@octave.org>
parents:
23084
diff
changeset
|
1891 else |
e2b1f3546978
fix caching error with Qt tool configuration (bug #50129)
John W. Eaton <jwe@octave.org>
parents:
23084
diff
changeset
|
1892 MOC="$MOC_QTVER" |
23154
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1893 fi |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1894 |
23154
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1895 AC_CHECK_TOOLS(UIC_QTVER, [uic-qt$qt_version]) |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1896 if test -z "$UIC_QTVER"; then |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1897 AC_CHECK_TOOLS(UIC, [uic]) |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1898 if test -n "$UIC" && test -n "$QTCHOOSER"; then |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1899 UICFLAGS="-qt$qt_version" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1900 fi |
23154
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1901 else |
23088
e2b1f3546978
fix caching error with Qt tool configuration (bug #50129)
John W. Eaton <jwe@octave.org>
parents:
23084
diff
changeset
|
1902 UIC="$UIC_QTVER" |
23154
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1903 fi |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1904 |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1905 AC_CHECK_TOOLS(RCC_QTVER, [rcc-qt$qt_version]) |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1906 if test -z "$RCC_QTVER"; then |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1907 AC_CHECK_TOOLS(RCC, [rcc]) |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1908 if test -n "$RCC" && test -n "$QTCHOOSER"; then |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1909 RCCFLAGS="-qt$qt_version" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1910 fi |
23154
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1911 else |
23088
e2b1f3546978
fix caching error with Qt tool configuration (bug #50129)
John W. Eaton <jwe@octave.org>
parents:
23084
diff
changeset
|
1912 RCC="$RCC_QTVER" |
23154
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1913 fi |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1914 |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1915 AC_CHECK_TOOLS(LRELEASE_QTVER, [lrelease-qt$qt_version]) |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1916 if test -z "$LRELEASE_QTVER"; then |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1917 AC_CHECK_TOOLS(LRELEASE, [lrelease]) |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1918 if test -n "$LRELEASE" && test -n "$QTCHOOSER"; then |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1919 LRELEASEFLAGS="-qt$qt_version" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1920 fi |
23154
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1921 else |
23088
e2b1f3546978
fix caching error with Qt tool configuration (bug #50129)
John W. Eaton <jwe@octave.org>
parents:
23084
diff
changeset
|
1922 LRELEASE="$LRELEASE_QTVER" |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1923 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1924 |
24873
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1925 AC_CHECK_TOOLS(QHELPGENERATOR_QTVER, [qhelpgenerator-qt$qt_version]) |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1926 if test -z "$QHELPGENERATOR_QTVER"; then |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1927 AC_CHECK_TOOLS(QHELPGENERATOR, [qhelpgenerator]) |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1928 if test -n "$QHELPGENERATOR" && test -n "$QTCHOOSER"; then |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1929 QHELPGENERATORFLAGS="-qt$qt_version" |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1930 fi |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1931 else |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1932 QHELPGENERATOR="$QHELPGENERATOR_QTVER" |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1933 fi |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1934 |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1935 if test -z "$MOC" || test -z "$UIC" || test -z "$RCC" || test -z "$LRELEASE" || test -z "$QHELPGENERATOR"; then |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1936 warn_qt_tools="one or more of the Qt utility programs moc, uic, rcc, and lrelease not found; disabling Qt GUI" |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1937 build_qt_gui=no |
23154
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1938 MOC_QTVER= |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1939 UIC_QTVER= |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1940 RCC_QTVER= |
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1941 LRELEASE_QTVER= |
24873
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1942 QHELPGENERATOR_QTVER= |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1943 MOCFLAGS= |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1944 UICFLAGS= |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1945 RCCFLAGS= |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1946 LRELEASEFLAGS= |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1947 QHELPGENERATORFLAGS= |
23154
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1948 $as_unset ac_cv_prog_MOC_QTVER |
23198
8db35b1a4f63
build: Clear ac_cv_prog_ac_ct_XXXX qt variables if correct qt was not found (Bug #50214)
John D
parents:
23175
diff
changeset
|
1949 $as_unset ac_cv_prog_ac_ct_MOC_QTVER |
23154
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1950 $as_unset ac_cv_prog_UIC_QTVER |
23198
8db35b1a4f63
build: Clear ac_cv_prog_ac_ct_XXXX qt variables if correct qt was not found (Bug #50214)
John D
parents:
23175
diff
changeset
|
1951 $as_unset ac_cv_prog_ac_ct_UIC_QTVER |
23154
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1952 $as_unset ac_cv_prog_RCC_QTVER |
23198
8db35b1a4f63
build: Clear ac_cv_prog_ac_ct_XXXX qt variables if correct qt was not found (Bug #50214)
John D
parents:
23175
diff
changeset
|
1953 $as_unset ac_cv_prog_ac_ct_RCC_QTVER |
23154
80a2434ba83c
refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents:
23088
diff
changeset
|
1954 $as_unset ac_cv_prog_LRELEASE_QTVER |
23198
8db35b1a4f63
build: Clear ac_cv_prog_ac_ct_XXXX qt variables if correct qt was not found (Bug #50214)
John D
parents:
23175
diff
changeset
|
1955 $as_unset ac_cv_prog_ac_ct_LRELEASE_QTVER |
24873
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1956 $as_unset ac_cv_prog_QHELPGENERATOR_QTVER |
486bc22482ca
Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24837
diff
changeset
|
1957 $as_unset ac_cv_prog_ac_ct_QHELPGENERATOR_QTVER |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1958 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1959 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1960 |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1961 if test $build_qt_gui = yes; then |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1962 AC_CHECK_FUNCS([setlocale], [], |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1963 [build_qt_gui=no |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1964 warn_qt_setlocale="setlocale not found; disabling Qt GUI"]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1965 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1966 |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1967 if test $build_qt_gui = yes; then |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1968 case $host_os in |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1969 mingw* | msdosmsvc*) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1970 AC_CHECK_FUNCS([setvbuf], [win32_terminal=yes], |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1971 [build_qt_gui=no |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1972 warn_qt_setvbuf="setvbuf not found; disabling Qt GUI"]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1973 ;; |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1974 *) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1975 AC_CHECK_HEADERS([pty.h libutil.h util.h]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1976 AC_SEARCH_LIBS([openpty], [util], |
24810
8a92f442c4a2
configure.ac: Overhaul file (bug #53186).
Rik <rik@octave.org>
parents:
24798
diff
changeset
|
1977 [AC_DEFINE(HAVE_OPENPTY, 1, [Define to 1 if openpty exists])]) |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1978 AC_CHECK_FUNCS([chmod chown ftruncate mmap munmap], [], |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1979 [build_qt_gui=no |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1980 warn_qt_lib_fcns="At least one of chmod, chown, ftruncate, mmap, and munmap not found; disabling Qt GUI"]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1981 ;; |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1982 esac |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1983 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1984 |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1985 if test $build_qt_gui = yes; then |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1986 OCTAVE_CHECK_FUNC_QABSTRACTITEMMODEL_BEGINRESETMODEL |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1987 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1988 if test $octave_cv_func_qabstractitemmodel_beginresetmodel = no; then |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1989 build_qt_gui=no |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1990 warn_qt_abstract_item_model="QAbstractItemModel::beginResetModel not found; disabling Qt GUI" |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1991 ## Invalidate cache so that this test will be done again if we |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1992 ## perform the test with a different Qt version. |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1993 $as_unset octave_cv_func_qabstractitemmodel_beginresetmodel |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1994 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1995 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1996 |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
1997 if test $build_qt_gui = yes; then |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1998 ## We have what we need to build the Qt GUI. The remaining |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
1999 ## checks below are for optional features related to the Qt GUI. |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
2000 |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
2001 AC_DEFINE(HAVE_QT, 1, |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
2002 [Define to 1 if Qt is available, with all required functions, libraries, developer header files, and utility programs (moc, uic, rcc, and lrelease).]) |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2003 |
24827
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
2004 AC_LANG_PUSH(C++) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
2005 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
2006 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
2007 AC_CHECK_HEADERS([QStandardPaths]) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
2008 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
2009 AC_LANG_POP(C++) |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
2010 |
22255
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
2011 ## We don't need to unset cache variables for any of the remaining |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
2012 ## tests if they fail because we have already decided that the Qt |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
2013 ## version that we are testing now will be the one used. |
8e18e364a686
improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents:
22250
diff
changeset
|
2014 |
24827
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
2015 OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONRESIZEMODE |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
2016 OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONSCLICKABLE |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
2017 OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONSMOVABLE |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
2018 OCTAVE_CHECK_FUNC_QINSTALLMESSAGEHANDLER |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
2019 OCTAVE_CHECK_FUNC_QLINEEDIT_SETPLACEHOLDERTEXT |
24827
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
2020 OCTAVE_CHECK_FUNC_QMOUSEEVENT_LOCALPOS |
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
2021 OCTAVE_CHECK_FUNC_QOBJECT_FINDCHILDREN_ACCEPTS_FINDCHILDOPTIONS |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2022 OCTAVE_CHECK_FUNC_QTABWIDGET_SETMOVABLE |
24827
1e0718c1867c
eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents:
24825
diff
changeset
|
2023 OCTAVE_CHECK_FUNC_QTMESSAGEHANDLER_ACCEPTS_QMESSAGELOGCONTEXT |
24093
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
2024 OCTAVE_CHECK_MEMBER_QFONT_FORCE_INTEGER_METRICS |
7d9ba57201b4
configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents:
24077
diff
changeset
|
2025 OCTAVE_CHECK_MEMBER_QFONT_MONOSPACE |
24821
88665923596c
Make variable editor code compile under Qt4 (bug #53259)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
24810
diff
changeset
|
2026 OCTAVE_HAVE_QGUIAPPLICATION |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2027 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2028 if test -n "$OPENGL_LIBS"; then |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2029 OCTAVE_CHECK_QT_OPENGL_OK([build_qt_graphics=yes], |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2030 [warn_qt_opengl="Qt does not work with the OpenGL libs (GL and GLU); disabling OpenGL graphics with Qt GUI"]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2031 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2032 if test $build_qt_graphics = yes; then |
24837
ae6679369a80
Rely on QOffscreenSurface functionality rather than its presence (bug #53278)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24827
diff
changeset
|
2033 AC_DEFINE(HAVE_QT_GRAPHICS, 1, [Define to 1 if Qt works with OpenGL libs (GL and GLU)]) |
24798
45470049a43f
Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24623
diff
changeset
|
2034 OCTAVE_CHECK_QT_OPENGL_OFFSCREEN_OK([have_qt_opengl_offscreen=yes]) |
24837
ae6679369a80
Rely on QOffscreenSurface functionality rather than its presence (bug #53278)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24827
diff
changeset
|
2035 if test $have_qt_opengl_offscreen = yes; then |
ae6679369a80
Rely on QOffscreenSurface functionality rather than its presence (bug #53278)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24827
diff
changeset
|
2036 AC_DEFINE(HAVE_QT_OFFSCREEN, 1, [Define to 1 if Qt handles offscreen OpenGL rendering]) |
ae6679369a80
Rely on QOffscreenSurface functionality rather than its presence (bug #53278)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24827
diff
changeset
|
2037 fi |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2038 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2039 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2040 |
22823
e2afee0041bf
new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
2041 OCTAVE_CHECK_QSCINTILLA([$qt_version]) |
22234
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2042 |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2043 fi |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2044 AC_SUBST(MOCFLAGS) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2045 AC_SUBST(UICFLAGS) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2046 AC_SUBST(RCCFLAGS) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2047 AC_SUBST(LRELEASEFLAGS) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2048 AC_SUBST(QT_CPPFLAGS) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2049 AC_SUBST(QT_LDFLAGS) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2050 AC_SUBST(QT_LIBS) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2051 ]) |
66dd260512a4
allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents:
22208
diff
changeset
|
2052 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2053 dnl Check if the default Fortran INTEGER is 64 bits wide. |
22986
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2054 dnl If cross-compiling, assume 4 bytes unless the cache value |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2055 dnl is already set. |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2056 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2057 AC_DEFUN([OCTAVE_CHECK_SIZEOF_FORTRAN_INTEGER], [ |
22986
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2058 AC_CACHE_CHECK([default size of Fortran INTEGER], |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2059 [octave_cv_sizeof_fortran_integer], |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2060 [ac_octave_save_FFLAGS="$FFLAGS" |
22986
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2061 FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG" |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2062 AC_LANG_PUSH(Fortran 77) |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2063 AC_RUN_IFELSE([AC_LANG_PROGRAM(,[[ |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2064 integer*8 n8 |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2065 integer n |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2066 c Generate -2**33 + 1. |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2067 n8 = 2 |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2068 n8 = -4 * (n8 ** 30) |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2069 n8 = n8 + 1 |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2070 c Convert to default integer type. If the values are no longer equal, |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2071 c assume the default integer size is 32-bits. |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2072 n = n8 |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2073 if (n .ne. n8) stop 1 |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2074 ]])], |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2075 octave_cv_sizeof_fortran_integer=8, |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2076 octave_cv_sizeof_fortran_integer=4, |
21707d6a02c7
make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents:
22899
diff
changeset
|
2077 octave_cv_sizeof_fortran_integer=4) |
24022
84a52be0cf53
configure: fix restoring of FFLAGS when checking Fortran integer size
Mike Miller <mtmiller@octave.org>
parents:
23981
diff
changeset
|
2078 AC_LANG_POP(Fortran 77) |
84a52be0cf53
configure: fix restoring of FFLAGS when checking Fortran integer size
Mike Miller <mtmiller@octave.org>
parents:
23981
diff
changeset
|
2079 FFLAGS="$ac_octave_save_FFLAGS" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2080 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2081 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2082 dnl |
23981
6420142ff32c
configure: fix capitalization of SUNDIALS, reword related terms
Mike Miller <mtmiller@octave.org>
parents:
23980
diff
changeset
|
2083 dnl Check whether SUNDIALS IDA library is configured with double |
23021
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2084 dnl precision realtype. |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2085 dnl |
23980
eb6602171d59
configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents:
23836
diff
changeset
|
2086 AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SIZEOF_REALTYPE], [ |
eb6602171d59
configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents:
23836
diff
changeset
|
2087 AC_CHECK_HEADERS([ida/ida.h ida.h]) |
23981
6420142ff32c
configure: fix capitalization of SUNDIALS, reword related terms
Mike Miller <mtmiller@octave.org>
parents:
23980
diff
changeset
|
2088 AC_CACHE_CHECK([whether SUNDIALS IDA is configured with double precision realtype], |
23980
eb6602171d59
configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents:
23836
diff
changeset
|
2089 [octave_cv_sundials_realtype_is_double], |
eb6602171d59
configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents:
23836
diff
changeset
|
2090 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
22899
31bd8a50d44c
Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents:
22890
diff
changeset
|
2091 #if defined (HAVE_IDA_IDA_H) |
31bd8a50d44c
Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents:
22890
diff
changeset
|
2092 #include <ida/ida.h> |
31bd8a50d44c
Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents:
22890
diff
changeset
|
2093 #else |
31bd8a50d44c
Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents:
22890
diff
changeset
|
2094 #include <ida.h> |
31bd8a50d44c
Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents:
22890
diff
changeset
|
2095 #endif |
31bd8a50d44c
Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents:
22890
diff
changeset
|
2096 #include <assert.h> |
31bd8a50d44c
Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents:
22890
diff
changeset
|
2097 ]], [[ |
23980
eb6602171d59
configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents:
23836
diff
changeset
|
2098 static_assert (sizeof (realtype) == sizeof (double), |
eb6602171d59
configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents:
23836
diff
changeset
|
2099 "SUNDIALS is not configured for double precision"); |
22899
31bd8a50d44c
Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents:
22890
diff
changeset
|
2100 ]])], |
23980
eb6602171d59
configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents:
23836
diff
changeset
|
2101 octave_cv_sundials_realtype_is_double=yes, |
eb6602171d59
configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents:
23836
diff
changeset
|
2102 octave_cv_sundials_realtype_is_double=no) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2103 ]) |
23980
eb6602171d59
configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents:
23836
diff
changeset
|
2104 if test $octave_cv_sundials_realtype_is_double = no; then |
23981
6420142ff32c
configure: fix capitalization of SUNDIALS, reword related terms
Mike Miller <mtmiller@octave.org>
parents:
23980
diff
changeset
|
2105 warn_sundials_realtype="SUNDIALS IDA library not configured with double precision realtype, ode15i and ode15s will be disabled" |
23980
eb6602171d59
configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents:
23836
diff
changeset
|
2106 OCTAVE_CONFIGURE_WARNING([warn_sundials_realtype]) |
23021
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2107 fi |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2108 ]) |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2109 dnl |
23981
6420142ff32c
configure: fix capitalization of SUNDIALS, reword related terms
Mike Miller <mtmiller@octave.org>
parents:
23980
diff
changeset
|
2110 dnl Check whether SUNDIALS IDA library is configured with IDAKLU |
23021
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2111 dnl enabled. |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2112 dnl |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2113 AC_DEFUN([OCTAVE_CHECK_SUNDIALS_IDAKLU], [ |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2114 AC_CHECK_HEADERS([ida/ida_klu.h ida_klu.h]) |
23981
6420142ff32c
configure: fix capitalization of SUNDIALS, reword related terms
Mike Miller <mtmiller@octave.org>
parents:
23980
diff
changeset
|
2115 AC_CACHE_CHECK([whether SUNDIALS IDA is configured with IDAKLU enabled], |
23021
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2116 [octave_cv_sundials_idaklu], |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2117 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2118 #if defined (HAVE_IDA_IDA_KLU_H) |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2119 #include <ida/ida_klu.h> |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2120 #else |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2121 #include <ida_klu.h> |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2122 #endif |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2123 ]], [[ |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2124 IDAKLU (0, 0, 0, 0); |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2125 ]])], |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2126 octave_cv_sundials_idaklu=yes, |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2127 octave_cv_sundials_idaklu=no) |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2128 ]) |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2129 if test $octave_cv_sundials_idaklu = yes; then |
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2130 AC_DEFINE(HAVE_SUNDIALS_IDAKLU, 1, |
23981
6420142ff32c
configure: fix capitalization of SUNDIALS, reword related terms
Mike Miller <mtmiller@octave.org>
parents:
23980
diff
changeset
|
2131 [Define to 1 if SUNDIALS IDA is configured with IDAKLU enabled.]) |
23021
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2132 else |
23981
6420142ff32c
configure: fix capitalization of SUNDIALS, reword related terms
Mike Miller <mtmiller@octave.org>
parents:
23980
diff
changeset
|
2133 warn_sundials_idaklu="SUNDIALS IDA library not configured with IDAKLU, ode15i and ode15s will not support the sparse Jacobian feature" |
23021
6094018f5e72
refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents:
23017
diff
changeset
|
2134 OCTAVE_CONFIGURE_WARNING([warn_sundials_idaklu]) |
22899
31bd8a50d44c
Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents:
22890
diff
changeset
|
2135 fi |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2136 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2137 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2138 dnl Add warning to final summary. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2139 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2140 AC_DEFUN([OCTAVE_CONFIGURE_WARNING], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2141 AC_MSG_WARN([$][$1]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2142 m4_set_add([summary_warning_list], [$1]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2143 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2144 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2145 dnl Print final summary. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2146 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2147 AC_DEFUN([OCTAVE_CONFIGURE_WARNING_SUMMARY], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2148 m4_set_foreach([summary_warning_list], [elt], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2149 if test -n "[$]elt"; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2150 AC_MSG_WARN([$]elt) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2151 warn_msg_printed=true |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2152 fi]) |
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
|
2153 ]) |
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
|
2154 dnl |
21397
df859661e31e
generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents:
21381
diff
changeset
|
2155 dnl Like AC_CONFIG_FILES, but don't touch the output file if it already |
df859661e31e
generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents:
21381
diff
changeset
|
2156 dnl exists and hasn't changed. |
df859661e31e
generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents:
21381
diff
changeset
|
2157 dnl |
df859661e31e
generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents:
21381
diff
changeset
|
2158 AC_DEFUN([OCTAVE_CONFIG_MOVE_IF_CHANGE_FILES], [ |
df859661e31e
generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents:
21381
diff
changeset
|
2159 m4_foreach_w([elt], [$1], [ |
21398
7e8a410e6124
break generated file dependence on Makefile (bug #46063)
John W. Eaton <jwe@octave.org>
parents:
21397
diff
changeset
|
2160 AC_CONFIG_FILES(elt[-tmp:]patsubst(elt, [.sh$], [.in.sh])) |
21397
df859661e31e
generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents:
21381
diff
changeset
|
2161 AC_CONFIG_COMMANDS(elt, |
df859661e31e
generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents:
21381
diff
changeset
|
2162 [$SHELL $srcdir/build-aux/move-if-change ]elt[-tmp ]elt)])]) |
df859661e31e
generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents:
21381
diff
changeset
|
2163 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2164 dnl Check if the C++ library has the bit_and, bit_or, and bit_xor |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2165 dnl templates defined. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2166 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2167 AC_DEFUN([OCTAVE_CXX_BITWISE_OP_TEMPLATES], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2168 AC_CACHE_CHECK([whether bit_and, bit_or, bit_xor are defined in the C++ library], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2169 [octave_cv_cxx_bitwise_op_templates], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2170 [AC_LANG_PUSH(C++) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2171 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2172 #include <functional> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2173 ]], [[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2174 int x = 0; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2175 int y = 1; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2176 int z1 = std::bit_and<int>() (x, y); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2177 int z2 = std::bit_or<int>() (x, y); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2178 int z3 = std::bit_xor<int>() (x, y); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2179 ]])], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2180 octave_cv_cxx_bitwise_op_templates=yes, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2181 octave_cv_cxx_bitwise_op_templates=no) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2182 AC_LANG_POP(C++) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2183 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2184 if test $octave_cv_cxx_bitwise_op_templates = yes; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2185 AC_DEFINE(HAVE_CXX_BITWISE_OP_TEMPLATES, 1, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2186 [Define to 1 if C++ library has templated bitwise operators.]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2187 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2188 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2189 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2190 dnl Check if the C++ library has functions to access real and imaginary |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2191 dnl parts of complex numbers independently via references. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2192 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2193 AC_DEFUN([OCTAVE_CXX_COMPLEX_REFERENCE_ACCESSORS], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2194 AC_CACHE_CHECK([whether complex class can reference components independently], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2195 [octave_cv_cxx_complex_reference_accessors], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2196 [AC_LANG_PUSH(C++) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2197 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2198 #include <complex> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2199 ]], [[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2200 std::complex<double> x; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2201 x.real () = 1.0; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2202 x.imag () = 1.0; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2203 ]])], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2204 octave_cv_cxx_complex_reference_accessors=yes, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2205 octave_cv_cxx_complex_reference_accessors=no) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2206 AC_LANG_POP(C++) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2207 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2208 if test $octave_cv_cxx_complex_reference_accessors = yes; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2209 AC_DEFINE(HAVE_CXX_COMPLEX_REFERENCE_ACCESSORS, 1, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2210 [Define to 1 if C++ complex class has T& real (void) and T& imag (void) methods.]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2211 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2212 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2213 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2214 dnl Check if the C++ library has functions to set real and imaginary |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2215 dnl parts of complex numbers independently. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2216 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2217 AC_DEFUN([OCTAVE_CXX_COMPLEX_SETTERS], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2218 AC_CACHE_CHECK([whether complex class can set components independently], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2219 [octave_cv_cxx_complex_setters], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2220 [AC_LANG_PUSH(C++) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2221 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2222 #include <complex> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2223 ]], [[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2224 std::complex<double> x; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2225 x.real (1.0); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2226 x.imag (2.0); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2227 ]])], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2228 octave_cv_cxx_complex_setters=yes, octave_cv_cxx_complex_setters=no) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2229 AC_LANG_POP(C++) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2230 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2231 if test $octave_cv_cxx_complex_setters = yes; then |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2232 AC_DEFINE(HAVE_CXX_COMPLEX_SETTERS, 1, |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2233 [Define to 1 if C++ complex class has void real (T) and void imag (T) methods.]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2234 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2235 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2236 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2237 dnl Check if the compiler supports dynamic auto arrays. |
10471
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
2238 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2239 AC_DEFUN([OCTAVE_CXX_DYNAMIC_AUTO_ARRAYS], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2240 AC_CACHE_CHECK([whether C++ supports dynamic auto arrays], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2241 [octave_cv_cxx_dynamic_auto_arrays], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2242 [AC_LANG_PUSH(C++) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2243 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2244 void test(char *); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2245 int length(); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2246 char x[length()]; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2247 test(x); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2248 ]])], |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2249 octave_cv_cxx_dynamic_auto_arrays=yes, |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2250 octave_cv_cxx_dynamic_auto_arrays=no) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2251 AC_LANG_POP(C++) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2252 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2253 if test $octave_cv_cxx_dynamic_auto_arrays = yes; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2254 AC_DEFINE(HAVE_DYNAMIC_AUTO_ARRAYS, 1, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2255 [Define to 1 if C++ supports dynamic auto arrays.]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2256 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2257 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2258 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2259 dnl Check if C++ compiler handles FLAG command line option. If two |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2260 dnl arguments are specified, execute the second arg as shell commands. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2261 dnl Otherwise, add FLAG to CXXFLAGS if the compiler accepts the flag. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2262 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2263 AC_DEFUN([OCTAVE_CXX_FLAG], [ |
17661
1978a6c76aa9
Use user-specified SED during build process (bug #40273).
Rik <rik@octave.org>
parents:
17615
diff
changeset
|
2264 ac_safe=`echo "$1" | $SED 'y%./+-:=%__p___%'` |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2265 AC_MSG_CHECKING([whether ${CXX-g++} accepts $1]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2266 AC_CACHE_VAL([octave_cv_cxx_flag_$ac_safe], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2267 [AC_LANG_PUSH(C++) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2268 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2269 CXXFLAGS="$CXXFLAGS $1" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2270 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2271 eval "octave_cv_cxx_flag_$ac_safe=yes", |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2272 eval "octave_cv_cxx_flag_$ac_safe=no") |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2273 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2274 AC_LANG_POP(C++) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2275 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2276 if eval "test \"`echo '$octave_cv_cxx_flag_'$ac_safe`\" = yes"; then |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
2277 AC_MSG_RESULT([yes]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2278 ifelse([$2], , |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2279 [CXXFLAGS="$CXXFLAGS $1" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2280 AC_MSG_RESULT([adding $1 to CXXFLAGS])], [$2]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2281 else |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
2282 AC_MSG_RESULT([no]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2283 ifelse([$3], , , [$3]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2284 fi |
10471
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
2285 ]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2286 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2287 dnl Allow the user disable support for command line editing using GNU |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2288 dnl readline. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2289 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2290 AC_DEFUN([OCTAVE_ENABLE_READLINE], [ |
16068
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
16012
diff
changeset
|
2291 USE_READLINE=yes |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2292 READLINE_LIBS= |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
2293 AC_ARG_ENABLE([readline], |
15238
c4779a180134
avoid confusing --disable-foo (default is yes) configure help messages
John W. Eaton <jwe@octave.org>
parents:
15166
diff
changeset
|
2294 [AS_HELP_STRING([--disable-readline], |
18141
5e72998000fb
acinclude.m4 (OCTAVE_ENABLE_READLINE): correct the help for --disable-readline
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
18058
diff
changeset
|
2295 [do not use readline library])], |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2296 [if test "$enableval" = no; then |
16068
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
16012
diff
changeset
|
2297 USE_READLINE=no |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2298 warn_readline="command editing and history features require GNU Readline" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2299 fi]) |
16068
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
16012
diff
changeset
|
2300 if test $USE_READLINE = yes; then |
15302
a8cfbc1911e4
build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents:
15295
diff
changeset
|
2301 dnl RHEL 5 and older systems require termlib set before enabling readline |
a8cfbc1911e4
build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents:
15295
diff
changeset
|
2302 AC_REQUIRE([OCTAVE_CHECK_LIB_TERMLIB]) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2303 ac_octave_save_LIBS="$LIBS" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2304 LIBS="$TERM_LIBS" |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
2305 AC_CHECK_LIB([readline], [rl_set_keyboard_input_timeout], |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2306 [READLINE_LIBS="-lreadline" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2307 AC_DEFINE(USE_READLINE, 1, [Define to 1 to use the readline library.]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2308 ], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2309 [AC_MSG_WARN([I need GNU Readline 4.2 or later]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2310 AC_MSG_ERROR([this is fatal unless you specify --disable-readline]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2311 ]) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2312 LIBS="$ac_octave_save_LIBS" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2313 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2314 AC_SUBST(READLINE_LIBS) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2315 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2316 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2317 dnl Check if Fortran compiler handles FLAG command line option. If |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2318 dnl two arguments are specified, execute the second arg as shell |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2319 dnl commands. Otherwise, add FLAG to FFLAGS if the compiler accepts |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2320 dnl the flag. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2321 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2322 AC_DEFUN([OCTAVE_F77_FLAG], [ |
17661
1978a6c76aa9
Use user-specified SED during build process (bug #40273).
Rik <rik@octave.org>
parents:
17615
diff
changeset
|
2323 ac_safe=`echo "$1" | $SED 'y%./+-:=%__p___%'` |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2324 AC_MSG_CHECKING([whether ${F77-g77} accepts $1]) |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
2325 AC_CACHE_VAL([octave_cv_f77_flag_$ac_safe], [ |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2326 AC_LANG_PUSH(Fortran 77) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2327 ac_octave_save_FFLAGS="$FFLAGS" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2328 FFLAGS="$FFLAGS $1" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2329 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2330 eval "octave_cv_f77_flag_$ac_safe=yes", |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2331 eval "octave_cv_f77_flag_$ac_safe=no") |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2332 FFLAGS="$ac_octave_save_FFLAGS" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2333 AC_LANG_POP(Fortran 77) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2334 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2335 if eval "test \"`echo '$octave_cv_f77_flag_'$ac_safe`\" = yes"; then |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
2336 AC_MSG_RESULT([yes]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2337 ifelse([$2], , |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2338 [FFLAGS="$FFLAGS $1" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2339 AC_MSG_RESULT([adding $1 to FFLAGS])], [$2]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2340 else |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
2341 AC_MSG_RESULT([no]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2342 ifelse([$3], , , [$3]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2343 fi |
10471
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
2344 ]) |
bcabc1c4f20c
Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents:
10380
diff
changeset
|
2345 dnl |
21302
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2346 dnl Check whether fast signed integer arithmetic using bit tricks |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2347 dnl can be used in oct-inttypes.h. |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2348 dnl |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2349 dnl Defines OCTAVE_HAVE_FAST_INT_OPS if the following conditions hold: |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2350 dnl |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2351 dnl 1. Signed numbers are represented by twos complement (see |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2352 dnl <http://en.wikipedia.org/wiki/Two%27s_complement>) |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2353 dnl |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2354 dnl 2. static_cast to unsigned int counterpart works like |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2355 dnl interpreting the signed bit pattern as unsigned (and is thus |
21604
d7a268e68e69
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
21398
diff
changeset
|
2356 dnl zero-cost). |
21302
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2357 dnl |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2358 dnl 3. Signed addition and subtraction yield the same bit results |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2359 dnl as unsigned. (We use casts to prevent optimization |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2360 dnl interference, so there is no need for things like -ftrapv). |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2361 dnl |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2362 dnl 4. Bit operations on signed integers work like on unsigned |
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2363 dnl integers, except for the shifts. Shifts are arithmetic. |
8169
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
2364 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2365 AC_DEFUN([OCTAVE_FAST_INT_OPS], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2366 AC_CACHE_CHECK([whether fast integer arithmetics is usable], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2367 [octave_cv_fast_int_ops], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2368 [AC_LANG_PUSH(C++) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2369 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2370 #include <limits> |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2371 template<class UT, class ST> |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2372 static bool |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2373 do_test (UT, ST) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2374 { |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2375 volatile ST s = std::numeric_limits<ST>::min () / 3; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2376 volatile UT u = static_cast<UT> (s); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2377 if (*(reinterpret_cast<volatile ST *> (&u)) != s) return true; |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2378 |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2379 u = 0; u = ~u; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2380 if (*(reinterpret_cast<volatile ST *> (&u)) != -1) return true; |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2381 |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2382 ST sx, sy; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2383 sx = std::numeric_limits<ST>::max () / 2 + 1; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2384 sy = std::numeric_limits<ST>::max () / 2 + 2; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2385 if (static_cast<ST> (static_cast<UT> (sx) + static_cast<UT> (sy)) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2386 != std::numeric_limits<ST>::min () + 1) return true; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2387 if (static_cast<ST> (static_cast<UT> (sx) - static_cast<UT> (sy)) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2388 != -1) return true; |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2389 |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2390 if ((sx & sy) != (static_cast<UT> (sx) & static_cast<UT> (sy))) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2391 return true; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2392 if ((sx | sy) != (static_cast<UT> (sx) | static_cast<UT> (sy))) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2393 return true; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2394 if ((sx ^ sy) != (static_cast<UT> (sx) ^ static_cast<UT> (sy))) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2395 return true; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2396 if ((-1 >> 1) != -1) return true; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2397 return false; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2398 } |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2399 |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2400 #define DO_TEST(T) \ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2401 if (do_test (static_cast<unsigned T> (0), static_cast<signed T> (0)))\ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2402 return sizeof (T); |
8169
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
2403 |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2404 ]],[[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2405 |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2406 DO_TEST(char) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2407 DO_TEST(short) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2408 DO_TEST(int) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2409 DO_TEST(long) |
21354
06d15e4e611a
move public data type macros to octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21302
diff
changeset
|
2410 #if (defined(OCTAVE_HAVE_LONG_LONG_INT) && defined(OCTAVE_HAVE_UNSIGNED_LONG_LONG_INT)) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2411 DO_TEST(long long) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2412 #endif |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2413 ]])], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2414 octave_cv_fast_int_ops=yes, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2415 octave_cv_fast_int_ops=no, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2416 octave_cv_fast_int_ops=yes) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2417 AC_LANG_POP(C++) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2418 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2419 if test $octave_cv_fast_int_ops = yes; then |
21302
8376de2eaf00
define OCTAVE_HAVE_FAST_INT_OPS in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21250
diff
changeset
|
2420 AC_DEFINE(OCTAVE_HAVE_FAST_INT_OPS, 1, |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2421 [Define to 1 if signed integers use two's complement.]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2422 fi |
13957
c510048901cc
set cross compile defaults for AC_RUN_IFELSE
John W. Eaton <jwe@octave.org>
parents:
13728
diff
changeset
|
2423 ]) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
2424 dnl |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
2425 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
|
2426 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
|
2427 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
|
2428 dnl Add options (lower case letters $1) "--with-framework-$1" and |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2429 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
|
2430 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
|
2431 dnl |
9654
a307a6f77fb3
aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
2432 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
|
2433 AC_MSG_CHECKING([whether ${LD-ld} accepts -framework $1]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2434 AC_CACHE_VAL([octave_cv_framework_$1], |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2435 [ac_octave_save_LDFLAGS="$LDFLAGS" |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
2436 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
|
2437 AC_LANG_PUSH(C++) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
2438 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
|
2439 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
|
2440 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
|
2441 AC_LANG_POP(C++) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2442 LDFLAGS="$ac_octave_save_LDFLAGS" |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
2443 ]) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2444 if test "$octave_cv_framework_$1" = yes; then |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
2445 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
|
2446 AC_ARG_WITH(framework-m4_tolower($1), |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2447 [AS_HELP_STRING([--without-framework-m4_tolower($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
|
2448 [don't use framework $1])], |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2449 with_have_framework=$withval, with_have_framework=yes) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2450 if test "$with_have_framework" = yes; then |
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
|
2451 [$4] |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2452 : |
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
|
2453 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
|
2454 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
|
2455 [$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
|
2456 fi |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
2457 else |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
2458 AC_MSG_RESULT([no]) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
2459 [$5] |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
2460 fi |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
2461 ]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2462 dnl |
24823
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2463 dnl Check whether the Qt class QGuiApplication exists. |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2464 dnl This class was introduced in Qt 5.0. |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2465 dnl |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2466 dnl FIXME: Delete this entirely when we drop support for Qt 4. |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2467 dnl |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2468 AC_DEFUN([OCTAVE_HAVE_QGUIAPPLICATION], [ |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2469 AC_CACHE_CHECK([for QGuiApplication], |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2470 [octave_cv_decl_qguiapplication], |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2471 [AC_LANG_PUSH(C++) |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2472 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2473 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2474 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2475 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2476 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2477 #include <QGuiApplication> |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2478 ]], [[ |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2479 QScreen *pscreen = QGuiApplication::primaryScreen (); |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2480 ]])], |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2481 octave_cv_decl_qguiapplication=yes, |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2482 octave_cv_decl_qguiapplication=no) |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2483 CPPFLAGS="$ac_octave_save_CPPFLAGS" |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2484 CXXFLAGS="$ac_octave_save_CXXFLAGS" |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2485 AC_LANG_POP(C++) |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2486 ]) |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2487 if test $octave_cv_decl_qguiapplication = yes; then |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2488 AC_DEFINE(HAVE_QGUIAPPLICATION, 1, |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2489 [Define to 1 if `QGuiApplication' class is available.]) |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2490 fi |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2491 ]) |
53f68d0fb122
acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents:
24821
diff
changeset
|
2492 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2493 dnl Check for IEEE 754 data format. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2494 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2495 AC_DEFUN([OCTAVE_IEEE754_DATA_FORMAT], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2496 AC_MSG_CHECKING([for IEEE 754 data format]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2497 AC_CACHE_VAL([octave_cv_ieee754_data_format], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2498 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2499 int |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2500 main (void) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2501 { |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2502 typedef union { unsigned char c[8]; double d; } ieeebytes; |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2503 |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2504 ieeebytes l = {0x1c, 0xbc, 0x6e, 0xf2, 0x54, 0x8b, 0x11, 0x43}; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2505 ieeebytes b = {0x43, 0x11, 0x8b, 0x54, 0xf2, 0x6e, 0xbc, 0x1c}; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2506 |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2507 return l.d != 1234567891234567.0 && b.d != 1234567891234567.0; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2508 } |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2509 ]])], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2510 octave_cv_ieee754_data_format=yes, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2511 octave_cv_ieee754_data_format=no, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2512 octave_cv_ieee754_data_format=yes) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2513 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2514 if test "$cross_compiling" = yes; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2515 AC_MSG_RESULT([$octave_cv_ieee754_data_format assumed for cross compilation]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2516 else |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2517 AC_MSG_RESULT([$octave_cv_ieee754_data_format]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2518 fi |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2519 if test $octave_cv_ieee754_data_format = yes; then |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2520 AC_DEFINE(HAVE_IEEE754_DATA_FORMAT, 1, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2521 [Define to 1 if your system uses IEEE 754 data format.]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2522 else |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2523 ## If the format is unknown, then you will probably not have a |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2524 ## useful system, so we will abort here. Anyone wishing to |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2525 ## experiment with building Octave on a system without IEEE |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2526 ## floating point should be capable of removing this check and |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2527 ## the one in the octave_ieee_init function in liboctave/lo-ieee.cc. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2528 AC_MSG_ERROR([IEEE 754 data format required for building Octave]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2529 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2530 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2531 dnl |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2532 dnl Check for CallInst::addAttribute API |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2533 dnl |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2534 AC_DEFUN([OCTAVE_LLVM_CALLINST_ADDATTRIBUTE_API], [ |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2535 AC_CACHE_CHECK([check LLVM::CallInst::addAttribute arg type is llvm::Attributes], |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2536 [octave_cv_callinst_addattribute_arg_is_attributes], |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2537 [AC_LANG_PUSH(C++) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2538 AC_COMPILE_IFELSE( |
17615
3a7d5d655749
Fix typos in configure tests for LLVM methods (bug #39973)
Mike Miller <mtmiller@ieee.org>
parents:
17241
diff
changeset
|
2539 [AC_LANG_PROGRAM([[ |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21604
diff
changeset
|
2540 #if defined (HAVE_LLVM_IR_FUNCTION_H) |
17164 | 2541 #include <llvm/IR/Instructions.h> |
2542 #include <llvm/IR/Attributes.h> | |
2543 #else | |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2544 #include <llvm/Instructions.h> |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2545 #include <llvm/Attributes.h> |
17164 | 2546 #endif |
17615
3a7d5d655749
Fix typos in configure tests for LLVM methods (bug #39973)
Mike Miller <mtmiller@ieee.org>
parents:
17241
diff
changeset
|
2547 ]], [[ |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2548 llvm::CallInst *callinst; |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2549 llvm::AttrBuilder attr_builder; |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2550 attr_builder.addAttribute(llvm::Attributes::StructRet); |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2551 llvm::Attributes attrs = llvm::Attributes::get(llvm::getGlobalContext(), attr_builder); |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2552 callinst->addAttribute (1, attrs); |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2553 ]])], |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2554 octave_cv_callinst_addattribute_arg_is_attributes=yes, |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2555 octave_cv_callinst_addattribute_arg_is_attributes=no) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2556 AC_LANG_POP(C++) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2557 ]) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2558 if test $octave_cv_callinst_addattribute_arg_is_attributes = yes; then |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2559 AC_DEFINE(CALLINST_ADDATTRIBUTE_ARG_IS_ATTRIBUTES, 1, |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2560 [Define to 1 if llvm::CallInst:addAttribute arg type is llvm::Attributes.]) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2561 fi |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2562 ]) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2563 dnl |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2564 dnl Check for Function::addAttribute API |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2565 dnl |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2566 AC_DEFUN([OCTAVE_LLVM_FUNCTION_ADDATTRIBUTE_API], [ |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2567 AC_CACHE_CHECK([check llvm::Function::addAttribute arg type is llvm::Attributes], |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2568 [octave_cv_function_addattribute_arg_is_attributes], |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2569 [AC_LANG_PUSH(C++) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2570 AC_COMPILE_IFELSE( |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2571 [AC_LANG_PROGRAM([[ |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21604
diff
changeset
|
2572 #if defined (HAVE_LLVM_IR_FUNCTION_H) |
17164 | 2573 #include <llvm/IR/Function.h> |
2574 #include <llvm/IR/Attributes.h> | |
2575 #include <llvm/IR/LLVMContext.h> | |
2576 #else | |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2577 #include <llvm/Function.h> |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2578 #include <llvm/Attributes.h> |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2579 #include <llvm/LLVMContext.h> |
17164 | 2580 #endif |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2581 ]], [[ |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2582 llvm::Function *llvm_function; |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2583 llvm::AttrBuilder attr_builder; |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2584 attr_builder.addAttribute(llvm::Attributes::StructRet); |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2585 llvm::Attributes attrs = llvm::Attributes::get(llvm::getGlobalContext(), attr_builder); |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2586 llvm_function->addAttribute (1, attrs); |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2587 ]])], |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2588 octave_cv_function_addattribute_arg_is_attributes=yes, |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2589 octave_cv_function_addattribute_arg_is_attributes=no) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2590 AC_LANG_POP(C++) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2591 ]) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2592 if test $octave_cv_function_addattribute_arg_is_attributes = yes; then |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2593 AC_DEFINE(FUNCTION_ADDATTRIBUTE_ARG_IS_ATTRIBUTES, 1, |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2594 [Define to 1 if llvm::Function:addAttribute arg type is llvm::Attributes.]) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2595 fi |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2596 ]) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2597 dnl |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2598 dnl Check for Function::addFnAttr API |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2599 dnl |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2600 AC_DEFUN([OCTAVE_LLVM_FUNCTION_ADDFNATTR_API], [ |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2601 AC_CACHE_CHECK([check LLVM::Function::addFnAttr arg type is llvm::Attributes], |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2602 [octave_cv_function_addfnattr_arg_is_attributes], |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2603 [AC_LANG_PUSH(C++) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2604 AC_COMPILE_IFELSE( |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2605 [AC_LANG_PROGRAM([[ |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21604
diff
changeset
|
2606 #if defined (HAVE_LLVM_IR_FUNCTION_H) |
17615
3a7d5d655749
Fix typos in configure tests for LLVM methods (bug #39973)
Mike Miller <mtmiller@ieee.org>
parents:
17241
diff
changeset
|
2607 #include <llvm/IR/Function.h> |
3a7d5d655749
Fix typos in configure tests for LLVM methods (bug #39973)
Mike Miller <mtmiller@ieee.org>
parents:
17241
diff
changeset
|
2608 #include <llvm/IR/Attributes.h> |
17164 | 2609 #else |
2610 #include <llvm/Function.h> | |
2611 #include <llvm/Attributes.h> | |
2612 #endif | |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2613 ]], [[ |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2614 llvm::Function *llvm_function; |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2615 llvm_function->addFnAttr (llvm::Attributes::AlwaysInline); |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2616 ]])], |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2617 octave_cv_function_addfnattr_arg_is_attributes=yes, |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2618 octave_cv_function_addfnattr_arg_is_attributes=no) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2619 AC_LANG_POP(C++) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2620 ]) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2621 if test $octave_cv_function_addfnattr_arg_is_attributes = yes; then |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2622 AC_DEFINE(FUNCTION_ADDFNATTR_ARG_IS_ATTRIBUTES, 1, |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2623 [Define to 1 if llvm::Function:addFnAttr arg type is llvm::Attributes.]) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2624 fi |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2625 ]) |
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2626 dnl |
18831
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2627 dnl Check for legacy::PassManager API |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2628 dnl |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2629 AC_DEFUN([OCTAVE_LLVM_LEGACY_PASSMANAGER_API], [ |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2630 AC_CACHE_CHECK([check for LLVM::legacy::PassManager], |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2631 [octave_cv_legacy_passmanager], |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2632 [AC_LANG_PUSH(C++) |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2633 save_LIBS="$LIBS" |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2634 LIBS="$LLVM_LIBS $LIBS" |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2635 AC_LINK_IFELSE( |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2636 [AC_LANG_PROGRAM([[ |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2637 #include <llvm/IR/LegacyPassManager.h> |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2638 ]], [[ |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2639 llvm::Module *module; |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2640 llvm::legacy::PassManager *module_pass_manager; |
19597
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19355
diff
changeset
|
2641 llvm::legacy::FunctionPassManager *pass_manager; |
18831
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2642 module_pass_manager = new llvm::legacy::PassManager (); |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2643 pass_manager = new llvm::legacy::FunctionPassManager (module); |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2644 ]])], |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2645 octave_cv_legacy_passmanager=yes, |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2646 octave_cv_legacy_passmanager=no) |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2647 LIBS="$save_LIBS" |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2648 AC_LANG_POP(C++) |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2649 ]) |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2650 if test $octave_cv_legacy_passmanager = yes; then |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2651 AC_DEFINE(LEGACY_PASSMANAGER, 1, |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2652 [Define to 1 if LLVM::legacy::PassManager exists.]) |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2653 fi |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2654 ]) |
4a4edf0f2077
fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents:
18216
diff
changeset
|
2655 dnl |
23510
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2656 dnl Check for raw_fd_ostream API |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2657 dnl |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2658 AC_DEFUN([OCTAVE_LLVM_RAW_FD_OSTREAM_API], [ |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2659 AC_CACHE_CHECK([check LLVM::raw_fd_ostream arg type is llvm::sys:fs], |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2660 [octave_cv_raw_fd_ostream_arg_is_llvm_sys_fs], |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2661 [AC_LANG_PUSH(C++) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2662 AC_COMPILE_IFELSE( |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2663 [AC_LANG_PROGRAM([[ |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2664 #include <llvm/Support/raw_os_ostream.h> |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2665 ]], [[ |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2666 std::string str; |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2667 llvm::raw_fd_ostream fout ("", str, llvm::sys::fs::F_Binary); |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2668 ]])], |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2669 octave_cv_raw_fd_ostream_arg_is_llvm_sys_fs=yes, |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2670 octave_cv_raw_fd_ostream_arg_is_llvm_sys_fs=no) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2671 AC_LANG_POP(C++) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2672 ]) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2673 if test $octave_cv_raw_fd_ostream_arg_is_llvm_sys_fs = yes; then |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2674 AC_DEFINE(RAW_FD_OSTREAM_ARG_IS_LLVM_SYS_FS, 1, |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2675 [Define to 1 if LLVM::raw_fd_ostream arg type is llvm::sys:fs.]) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2676 fi |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2677 ]) |
b0e23bfa9966
maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents:
23509
diff
changeset
|
2678 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2679 dnl Check for ar. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2680 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2681 AC_DEFUN([OCTAVE_PROG_AR], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2682 if test -z "$AR"; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2683 AR=ar |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2684 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2685 AC_SUBST(AR) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2686 |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2687 if test -z "$ARFLAGS"; then |
23402
1fadf480a63b
maint: tweak ARFLAGS and AR_FLAGS defaults and comments
Mike Miller <mtmiller@octave.org>
parents:
23400
diff
changeset
|
2688 ARFLAGS="cr" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2689 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2690 AC_SUBST(ARFLAGS) |
23400
b5ee9b985a82
Silence compile warning about 'u' modifier to ar.
Rik <rik@octave.org>
parents:
23329
diff
changeset
|
2691 |
23402
1fadf480a63b
maint: tweak ARFLAGS and AR_FLAGS defaults and comments
Mike Miller <mtmiller@octave.org>
parents:
23400
diff
changeset
|
2692 dnl FIXME: Remove when libtool updated (placed 4/15/2017). |
23400
b5ee9b985a82
Silence compile warning about 'u' modifier to ar.
Rik <rik@octave.org>
parents:
23329
diff
changeset
|
2693 dnl This silences the following unnecessary warning during compile: |
b5ee9b985a82
Silence compile warning about 'u' modifier to ar.
Rik <rik@octave.org>
parents:
23329
diff
changeset
|
2694 dnl ar: `u' modifier ignored since `D' is the default (see `U') |
b5ee9b985a82
Silence compile warning about 'u' modifier to ar.
Rik <rik@octave.org>
parents:
23329
diff
changeset
|
2695 if test -z "$AR_FLAGS"; then |
23402
1fadf480a63b
maint: tweak ARFLAGS and AR_FLAGS defaults and comments
Mike Miller <mtmiller@octave.org>
parents:
23400
diff
changeset
|
2696 AR_FLAGS="$ARFLAGS" |
23400
b5ee9b985a82
Silence compile warning about 'u' modifier to ar.
Rik <rik@octave.org>
parents:
23329
diff
changeset
|
2697 fi |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2698 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2699 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2700 dnl Check for bison. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2701 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2702 AC_DEFUN([OCTAVE_PROG_BISON], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2703 AC_PROG_YACC |
16784
0fabe0f49f38
use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents:
16733
diff
changeset
|
2704 |
0fabe0f49f38
use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents:
16733
diff
changeset
|
2705 case "`$YACC --version`" in |
17197
fbee0d312af5
acinclude.m4: Remove some unnecessary double quotes around variables.
Rik <rik@octave.org>
parents:
17196
diff
changeset
|
2706 *bison*) tmp_have_bison=yes ;; |
16784
0fabe0f49f38
use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents:
16733
diff
changeset
|
2707 *) tmp_have_bison=no ;; |
0fabe0f49f38
use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents:
16733
diff
changeset
|
2708 esac |
0fabe0f49f38
use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents:
16733
diff
changeset
|
2709 |
17197
fbee0d312af5
acinclude.m4: Remove some unnecessary double quotes around variables.
Rik <rik@octave.org>
parents:
17196
diff
changeset
|
2710 if test $tmp_have_bison = yes; then |
18974
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2711 AC_CACHE_CHECK([syntax of bison api.prefix (or name-prefix) declaration], |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2712 [octave_cv_bison_api_prefix_decl_style], [ |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2713 style="api name" |
19105
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2714 quote="quote brace" |
18974
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2715 for s in $style; do |
19105
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2716 for q in $quote; do |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2717 if test $s = "api"; then |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2718 if test $q = "quote"; then |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2719 def='%define api.prefix "foo_"' |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2720 else |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2721 def='%define api.prefix {foo_}' |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2722 fi |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2723 else |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2724 if test $q = "quote"; then |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2725 def='%name-prefix="foo_"' |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2726 else |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2727 def='%name-prefix {foo_}' |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2728 fi |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2729 fi |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2730 cat << EOF > conftest.yy |
18974
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2731 $def |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2732 %start input |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2733 %% |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2734 input:; |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2735 %% |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2736 EOF |
19105
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2737 ## Older versions of bison only warn and exit with success. |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2738 octave_bison_output=`$YACC conftest.yy 2>&1` |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2739 ac_status=$? |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2740 if test $ac_status -eq 0 && test -z "$octave_bison_output"; then |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2741 octave_cv_bison_api_prefix_decl_style="$s $q" |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2742 break |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2743 fi |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2744 done |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2745 if test -n "$octave_cv_bison_api_prefix_decl_style"; then |
18974
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2746 break |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2747 fi |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2748 done |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2749 rm -f conftest.yy y.tab.h y.tab.c |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2750 ]) |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2751 fi |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2752 |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2753 AC_SUBST(BISON_API_PREFIX_DECL_STYLE, $octave_cv_bison_api_prefix_decl_style) |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2754 |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2755 if test -z "$octave_cv_bison_api_prefix_decl_style"; then |
19105
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2756 tmp_have_bison=no |
18974
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2757 warn_bison_api_prefix_decl_style=" |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2758 |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2759 I wasn't able to find a suitable style for declaring the api prefix |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2760 in a bison input file so I'm disabling bison. |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2761 " |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2762 OCTAVE_CONFIGURE_WARNING([warn_bison_api_prefix_decl_style]) |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2763 fi |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2764 |
d8abf813c69f
handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents:
18973
diff
changeset
|
2765 if test $tmp_have_bison = yes; then |
16174
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2766 AC_CACHE_CHECK([syntax of bison push/pull declaration], |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2767 [octave_cv_bison_push_pull_decl_style], [ |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2768 style="dash underscore" |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2769 quote="noquote quote" |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2770 for s in $style; do |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2771 for q in $quote; do |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2772 if test $s = "dash"; then |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2773 def="%define api.push-pull" |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2774 else |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2775 def="%define api.push_pull" |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2776 fi |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2777 if test $q = "quote"; then |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2778 def="$def \"both\"" |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2779 else |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2780 def="$def both" |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2781 fi |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2782 cat << EOF > conftest.yy |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2783 $def |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2784 %start input |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2785 %% |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2786 input:; |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2787 %% |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2788 EOF |
19105
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2789 octave_bison_output=`$YACC conftest.yy 2>&1` |
16174
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2790 ac_status=$? |
19105
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2791 if test $ac_status -eq 0 && test -z "$octave_bison_output"; then |
16174
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2792 if test $q = noquote; then |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2793 q= |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2794 fi |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2795 octave_cv_bison_push_pull_decl_style="$s $q" |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2796 break |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2797 fi |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2798 done |
19105
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2799 if test -n "$octave_cv_bison_push_pull_decl_style"; then |
16174
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2800 break |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2801 fi |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2802 done |
16202
7ce484126bb2
Remove temporary y.tab.c file used by configure script.
Rik <rik@octave.org>
parents:
16174
diff
changeset
|
2803 rm -f conftest.yy y.tab.h y.tab.c |
16174
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2804 ]) |
16784
0fabe0f49f38
use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents:
16733
diff
changeset
|
2805 fi |
16174
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2806 |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2807 AC_SUBST(BISON_PUSH_PULL_DECL_STYLE, $octave_cv_bison_push_pull_decl_style) |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2808 |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2809 if test -z "$octave_cv_bison_push_pull_decl_style"; then |
19105
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2810 tmp_have_bison=no |
16174
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2811 warn_bison_push_pull_decl_style=" |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2812 |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2813 I wasn't able to find a suitable style for declaring a push-pull |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2814 parser in a bison input file so I'm disabling bison. |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2815 " |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2816 OCTAVE_CONFIGURE_WARNING([warn_bison_push_pull_decl_style]) |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2817 fi |
39096b290a2f
check syntax used to enable bison push/pull parser
John W. Eaton <jwe@octave.org>
parents:
16068
diff
changeset
|
2818 |
17197
fbee0d312af5
acinclude.m4: Remove some unnecessary double quotes around variables.
Rik <rik@octave.org>
parents:
17196
diff
changeset
|
2819 if test $tmp_have_bison = no; then |
16784
0fabe0f49f38
use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents:
16733
diff
changeset
|
2820 YACC='$(top_srcdir)/build-aux/missing bison' |
0fabe0f49f38
use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents:
16733
diff
changeset
|
2821 warn_bison=" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2822 |
19105
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2823 I didn't find bison, or the version of bison that I found does not |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2824 support all the features that are required, but it's only a problem |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2825 if you need to reconstruct parse.cc, which is the case if you're |
6b4dfb1e5afb
allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents:
18974
diff
changeset
|
2826 building from VCS sources. |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2827 " |
16784
0fabe0f49f38
use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents:
16733
diff
changeset
|
2828 OCTAVE_CONFIGURE_WARNING([warn_bison]) |
0fabe0f49f38
use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents:
16733
diff
changeset
|
2829 fi |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2830 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2831 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2832 dnl Find desktop-file-install program. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2833 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2834 AC_DEFUN([OCTAVE_PROG_DESKTOP_FILE_INSTALL], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2835 AC_CHECK_PROG(DESKTOP_FILE_INSTALL, desktop-file-install, desktop-file-install, []) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2836 AC_SUBST(DESKTOP_FILE_INSTALL) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2837 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2838 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2839 dnl Find find program. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2840 dnl |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2841 ## Prefer GNU find if found. |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2842 AN_MAKEVAR([FIND], [OCTAVE_PROG_FIND]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2843 AN_PROGRAM([gfind], [OCTAVE_PROG_FIND]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2844 AN_PROGRAM([find], [OCTAVE_PROG_FIND]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2845 AC_DEFUN([OCTAVE_PROG_FIND], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2846 AC_CHECK_PROGS(FIND, [gfind find]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2847 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2848 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2849 dnl Check for flex. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2850 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2851 AC_DEFUN([OCTAVE_PROG_FLEX], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2852 ## For now, don't define LEXLIB to be -lfl -- we don't use anything in |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2853 ## it, and it might not be installed. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2854 ## |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2855 ## Also make sure that we generate an interactive scanner if we are |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2856 ## using flex. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2857 AC_PROG_LEX |
16784
0fabe0f49f38
use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents:
16733
diff
changeset
|
2858 case "`$LEX --version`" in |
0fabe0f49f38
use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents:
16733
diff
changeset
|
2859 *flex*) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2860 LFLAGS="-I" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2861 AC_MSG_RESULT([defining LFLAGS to be $LFLAGS]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2862 LEXLIB= |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2863 ;; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2864 *) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2865 LEX='$(top_srcdir)/build-aux/missing flex' |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2866 warn_flex=" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2867 |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2868 I didn't find flex, but it's only a problem if you need to reconstruct |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2869 lex.cc, which is the case if you're building from VCS sources. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2870 " |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2871 OCTAVE_CONFIGURE_WARNING([warn_flex]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2872 ;; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2873 esac |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2874 AC_SUBST(LFLAGS) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2875 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2876 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2877 dnl Check for ghostscript. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2878 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2879 AC_DEFUN([OCTAVE_PROG_GHOSTSCRIPT], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2880 case "$canonical_host_type" in |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2881 *-*-mingw* | *-*-msdosmsvc) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2882 ac_octave_gs_names="gswin32c gs mgs" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2883 ;; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2884 *) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2885 ac_octave_gs_names="gs" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2886 ;; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2887 esac |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2888 AC_CHECK_PROGS(GHOSTSCRIPT, [$ac_octave_gs_names]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2889 if test -z "$GHOSTSCRIPT"; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2890 GHOSTSCRIPT='$(top_srcdir)/build-aux/missing gs' |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2891 warn_ghostscript=" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2892 |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2893 I didn't find ghostscript, so reconstructing figures for the manual |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2894 will fail, and saving graphics in some output formats will fail when |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2895 using Octave |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2896 " |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2897 OCTAVE_CONFIGURE_WARNING([warn_ghostscript]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2898 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2899 AC_SUBST(GHOSTSCRIPT) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2900 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2901 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2902 dnl Check for gnuplot. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2903 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2904 AC_DEFUN([OCTAVE_PROG_GNUPLOT], [ |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2905 ac_octave_gp_names="gnuplot" |
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2906 ac_octave_gp_default="gnuplot" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2907 if test "$cross_compiling" = yes; then |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2908 GNUPLOT="$ac_octave_gp_default" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2909 AC_MSG_RESULT([assuming $GNUPLOT exists on $canonical_host_type host]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2910 else |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
2911 AC_CHECK_PROGS(GNUPLOT, [$ac_octave_gp_names]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2912 if test -z "$GNUPLOT"; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2913 GNUPLOT="$gp_default" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2914 warn_gnuplot=" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2915 |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2916 gnuplot not found. It isn't necessary to have gnuplot installed, but |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2917 without native graphics or gnuplot you won't be able to use any of |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2918 Octave's plotting commands. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2919 " |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2920 OCTAVE_CONFIGURE_WARNING([warn_gnuplot]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2921 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2922 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2923 AC_SUBST(GNUPLOT) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2924 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2925 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2926 dnl Check for gperf. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2927 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2928 AC_DEFUN([OCTAVE_PROG_GPERF], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2929 AC_CHECK_PROG(GPERF, gperf, gperf, []) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2930 if test -z "$GPERF"; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2931 GPERF='$(top_srcdir)/build-aux/missing gperf' |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2932 warn_gperf=" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2933 |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2934 I didn't find gperf, but it's only a problem if you need to |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
2935 reconstruct oct-gperf.h |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2936 " |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2937 OCTAVE_CONFIGURE_WARNING([warn_gperf]) |
16663
e380d1317c72
use missing script for gperf
John W. Eaton <jwe@octave.org>
parents:
16318
diff
changeset
|
2938 GPERF='$(top_srcdir)/build-aux/missing gperf' |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2939 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2940 AC_SUBST(GPERF) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2941 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2942 dnl |
19744
1687269e31e4
build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
2943 dnl Find icotool program. |
1687269e31e4
build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
2944 dnl |
1687269e31e4
build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
2945 AC_DEFUN([OCTAVE_PROG_ICOTOOL], [ |
1687269e31e4
build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
2946 AC_CHECK_PROG(ICOTOOL, icotool, icotool, []) |
19753
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
2947 if test -z "$ICOTOOL"; then |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
2948 ICOTOOL='$(top_srcdir)/build-aux/missing icotool' |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
2949 warn_icotool=" |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
2950 |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
2951 I didn't find icotool, but it's only a problem if you need to |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
2952 reconstruct octave-logo.ico, which is the case if you're building from |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
2953 VCS sources. |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
2954 " |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
2955 OCTAVE_CONFIGURE_WARNING([warn_icotool]) |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
2956 fi |
19744
1687269e31e4
build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
2957 AC_SUBST(ICOTOOL) |
1687269e31e4
build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
2958 ]) |
1687269e31e4
build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
2959 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2960 dnl Check for makeinfo. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2961 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2962 AC_DEFUN([OCTAVE_PROG_MAKEINFO], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2963 dnl use MKINFO, not MAKEINFO, for variable name because Automake |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2964 dnl automatically defines a value for MAKEINFO even when it does not |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2965 dnl exist which will then fool the 'test -z' line. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2966 AC_CHECK_PROG(MKINFO, makeinfo, makeinfo, []) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2967 if test -z "$MKINFO"; then |
16012
ca37c6023a79
don't abort configure if makeinfo is missing
John W. Eaton <jwe@octave.org>
parents:
15969
diff
changeset
|
2968 warn_makeinfo=" |
ca37c6023a79
don't abort configure if makeinfo is missing
John W. Eaton <jwe@octave.org>
parents:
15969
diff
changeset
|
2969 |
ca37c6023a79
don't abort configure if makeinfo is missing
John W. Eaton <jwe@octave.org>
parents:
15969
diff
changeset
|
2970 I didn't find makeinfo, which is required for reading documentation. |
ca37c6023a79
don't abort configure if makeinfo is missing
John W. Eaton <jwe@octave.org>
parents:
15969
diff
changeset
|
2971 You may install a copy later for Octave to use. |
ca37c6023a79
don't abort configure if makeinfo is missing
John W. Eaton <jwe@octave.org>
parents:
15969
diff
changeset
|
2972 " |
ca37c6023a79
don't abort configure if makeinfo is missing
John W. Eaton <jwe@octave.org>
parents:
15969
diff
changeset
|
2973 OCTAVE_CONFIGURE_WARNING([warn_makeinfo]) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
2974 fi |
24623
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2975 dnl If we have a GNU makeinfo program, see if it supports the @sortas command |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2976 dnl for defining a custom sort key for an index entry. |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2977 if test -n "$MKINFO"; then |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2978 AC_CACHE_CHECK([for makeinfo support for @sortas command], |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2979 [octave_cv_makeinfo_sortas_command], |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2980 [cat << EOF > conftest.texi |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2981 \input texinfo |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2982 @node Top |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2983 @top Document |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2984 @menu |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2985 * Chapter:: |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2986 * Index:: |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2987 @end menu |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2988 @node Chapter |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2989 @chapter Chapter |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2990 @cindex @sortas{a} foo |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2991 @node Index |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2992 @unnumbered Index |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2993 @printindex cp |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2994 @bye |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2995 EOF |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2996 if $MKINFO --no-warn conftest.texi 2>/dev/null; then |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2997 octave_cv_makeinfo_sortas_command=yes |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2998 else |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
2999 octave_cv_makeinfo_sortas_command=no |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
3000 fi |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
3001 rm -f conftest.info conftest.texi |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
3002 ]) |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
3003 if test $octave_cv_makeinfo_sortas_command = no; then |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
3004 warn_makeinfo=" |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
3005 |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
3006 I wasn't able to find a version of GNU makeinfo that supports the |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
3007 @sortas command, but it's only a problem if you need to build the |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
3008 manual, which is the case if you're building from VCS sources. |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
3009 " |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
3010 OCTAVE_CONFIGURE_WARNING([warn_makeinfo]) |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
3011 fi |
f39ae754a7d8
configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents:
24534
diff
changeset
|
3012 fi |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3013 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3014 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3015 dnl What pager should we use? |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3016 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3017 AC_DEFUN([OCTAVE_PROG_PAGER], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3018 if test "$cross_compiling" = yes; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3019 DEFAULT_PAGER=less |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3020 AC_MSG_RESULT([assuming $DEFAULT_PAGER exists on $canonical_host_type host]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3021 AC_SUBST(DEFAULT_PAGER) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3022 else |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
3023 ac_octave_possible_pagers="less more page pg" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3024 case "$canonical_host_type" in |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3025 *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc) |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
3026 ac_octave_possible_pagers="$ac_octave_possible_pagers more.com" |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3027 ;; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3028 esac |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3029 |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
3030 AC_CHECK_PROGS(DEFAULT_PAGER, [$ac_octave_possible_pagers], []) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3031 if test -z "$DEFAULT_PAGER"; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3032 warn_less="I couldn't find \`less', \`more', \`page', or \`pg'" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3033 OCTAVE_CONFIGURE_WARNING([warn_less]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3034 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3035 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3036 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3037 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3038 dnl Find Perl program. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3039 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3040 AC_DEFUN([OCTAVE_PROG_PERL], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3041 AC_CHECK_PROG(PERL, perl, perl, []) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3042 AC_SUBST(PERL) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3043 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3044 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3045 dnl Find Python program. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3046 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3047 AC_DEFUN([OCTAVE_PROG_PYTHON], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3048 AC_CHECK_PROG(PYTHON, python, python, []) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3049 AC_SUBST(PYTHON) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3050 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3051 dnl |
19744
1687269e31e4
build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
3052 dnl Find rsvg-convert program. |
1687269e31e4
build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
3053 dnl |
1687269e31e4
build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
3054 AC_DEFUN([OCTAVE_PROG_RSVG_CONVERT], [ |
1687269e31e4
build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
3055 AC_CHECK_PROG(RSVG_CONVERT, rsvg-convert, rsvg-convert, []) |
19753
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
3056 if test -z "$RSVG_CONVERT"; then |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
3057 RSVG_CONVERT='$(top_srcdir)/build-aux/missing rsvg-convert' |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
3058 warn_rsvg_convert=" |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
3059 |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
3060 I didn't find rsvg-convert, but it's only a problem if you need to |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
3061 reconstruct octave-logo-*.png, which is the case if you're building |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
3062 from VCS sources. |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
3063 " |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
3064 OCTAVE_CONFIGURE_WARNING([warn_rsvg_convert]) |
bc2a8db22831
build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents:
19744
diff
changeset
|
3065 fi |
19744
1687269e31e4
build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
3066 AC_SUBST(RSVG_CONVERT) |
1687269e31e4
build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
3067 ]) |
1687269e31e4
build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
3068 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3069 dnl Find sed program. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3070 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3071 # Check for a fully-functional sed program, that truncates |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3072 # as few characters as possible and that supports "\(X\|Y\)" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3073 # style regular expression alternation. Prefer GNU sed if found. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3074 AC_DEFUN([OCTAVE_PROG_SED], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3075 AC_MSG_CHECKING([for a usable sed]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3076 if test -z "$SED"; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3077 AC_CACHE_VAL([octave_cv_prog_sed], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3078 [# Loop through the user's path and search for sed and gsed. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3079 # Next, test potential sed programs in list for truncation. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3080 _AS_PATH_WALK([$PATH], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3081 [for ac_prog in sed gsed; do |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3082 for ac_exec_ext in '' $ac_executable_extensions; do |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3083 if AS_EXECUTABLE_P(["$as_dir/$ac_prog$ac_exec_ext"]); then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3084 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3085 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3086 done |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3087 done |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3088 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3089 AS_TMPDIR(sed) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3090 _max=0 |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3091 _count=0 |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3092 # Add /usr/xpg4/bin/sed as it is typically found on Solaris |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3093 # along with /bin/sed that truncates output. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3094 for _sed in $_sed_list /usr/xpg4/bin/sed; do |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3095 test ! -f ${_sed} && break |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3096 cat /dev/null > "$tmp/sed.in" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3097 _count=0 |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3098 echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3099 # Check for GNU sed and select it if it is found. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3100 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3101 octave_cv_prog_sed=${_sed} |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3102 break; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3103 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3104 # Reject if RE alternation is not handled. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3105 if test "`echo 'this and that' | ${_sed} -n 's/\(this\|that\).*$/\1/p'`" != "this"; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3106 continue; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3107 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3108 while true; do |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3109 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3110 mv "$tmp/sed.tmp" "$tmp/sed.in" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3111 cp "$tmp/sed.in" "$tmp/sed.nl" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3112 echo >>"$tmp/sed.nl" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3113 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3114 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3115 # 10000 chars as input seems more than enough |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3116 test $_count -gt 10 && break |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3117 _count=`expr $_count + 1` |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3118 if test $_count -gt $_max; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3119 _max=$_count |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3120 octave_cv_prog_sed=$_sed |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3121 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3122 done |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3123 done |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3124 rm -rf "$tmp" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3125 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3126 SED=$octave_cv_prog_sed |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3127 if test -z "$SED"; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3128 AC_MSG_ERROR([no usable version of sed found]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3129 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3130 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3131 AC_SUBST(SED) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3132 AC_MSG_RESULT([$SED]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3133 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3134 dnl |
24077
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3135 dnl Check for options that can be passed to tar to make archives reproducible. |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3136 dnl |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3137 AC_DEFUN([OCTAVE_PROG_TAR_REPRODUCIBLE], [ |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3138 AC_MSG_CHECKING([for options to make reproducible archives with GNU tar]) |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3139 dnl This uses Automake's logic for finding GNU tar under various names |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3140 for octave_tar in tar gnutar gtar :; do |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3141 $octave_tar --version >/dev/null 2>&1 && break |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3142 done |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3143 dnl If we have a valid GNU tar program, see if it supports sets of options |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3144 if test x"$octave_tar" != x:; then |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3145 octave_tar_flags= |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3146 echo > conftest.txt |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3147 for octave_tar_flag in --owner=0 --group=0 --numeric-owner --sort=name; do |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3148 $octave_tar -cf conftest.tar $octave_tar_flags $octave_tar_flag conftest.txt 2>/dev/null |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3149 if test $? -eq 0; then |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3150 octave_tar_flags="${octave_tar_flags:+$octave_tar_flags }$octave_tar_flag" |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3151 fi |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3152 done |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3153 rm -f conftest.tar conftest.txt |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3154 REPRODUCIBLE_TAR_FLAGS="$octave_tar_flags" |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3155 fi |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3156 AC_SUBST(REPRODUCIBLE_TAR_FLAGS) |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3157 AC_MSG_RESULT([$REPRODUCIBLE_TAR_FLAGS]) |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3158 ]) |
e483dcb5777d
build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents:
24022
diff
changeset
|
3159 dnl |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3160 dnl Check for texi2dvi. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3161 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3162 AC_DEFUN([OCTAVE_PROG_TEXI2DVI], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3163 AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, []) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3164 if test -z "$TEXI2DVI"; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3165 TEXI2DVI='$(top_srcdir)/build-aux/missing texi2dvi' |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3166 warn_texi2dvi=" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3167 |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3168 I didn't find texi2dvi, but it's only a problem if you need to |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3169 reconstruct the DVI version of the manual |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3170 " |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3171 OCTAVE_CONFIGURE_WARNING([warn_texi2dvi]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3172 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3173 AC_SUBST(TEXI2DVI) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3174 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3175 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3176 dnl Check for texi2pdf. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3177 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3178 AC_DEFUN([OCTAVE_PROG_TEXI2PDF], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3179 AC_REQUIRE([OCTAVE_PROG_TEXI2DVI]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3180 AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, []) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3181 if test -z "$TEXI2PDF"; then |
16068
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
16012
diff
changeset
|
3182 ac_octave_texi2pdf_missing=yes; |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3183 if test -n "$TEXI2DVI"; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3184 TEXI2PDF="$TEXI2DVI --pdf" |
16068
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
16012
diff
changeset
|
3185 ac_octave_texi2pdf_missing=no; |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3186 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3187 else |
16068
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
16012
diff
changeset
|
3188 ac_octave_texi2pdf_missing=no; |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3189 fi |
16068
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
16012
diff
changeset
|
3190 if test $ac_octave_texi2pdf_missing = yes; then |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3191 TEXI2PDF='$(top_srcdir)/build-aux/missing texi2pdf' |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3192 warn_texi2pdf=" |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3193 |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3194 I didn't find texi2pdf, but it's only a problem if you need to |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3195 reconstruct the PDF version of the manual |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3196 " |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3197 OCTAVE_CONFIGURE_WARNING([warn_texi2pdf]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3198 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3199 AC_SUBST(TEXI2PDF) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3200 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3201 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3202 dnl Set default value for a variable and substitute it. |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3203 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3204 AC_DEFUN([OCTAVE_SET_DEFAULT], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3205 ifelse($#, 2, [: ${$1=$2} |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3206 ])dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3207 AC_MSG_RESULT([defining $1 to be $$1]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3208 AC_SUBST($1) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3209 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3210 dnl |
15144
9cc337ced51a
build: Update OCTAVE_UMFPACK_SEPARATE_SPLIT macro to look for SuiteSparse header file.
Rik <rik@octave.org>
parents:
15141
diff
changeset
|
3211 dnl Check for UMFPACK separately split complex matrix and RHS. |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3212 dnl |
15144
9cc337ced51a
build: Update OCTAVE_UMFPACK_SEPARATE_SPLIT macro to look for SuiteSparse header file.
Rik <rik@octave.org>
parents:
15141
diff
changeset
|
3213 dnl Macro assumes that the check for umfpack has already been performed. |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3214 dnl |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3215 AC_DEFUN([OCTAVE_UMFPACK_SEPARATE_SPLIT], [ |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3216 AC_MSG_CHECKING([for UMFPACK separate complex matrix and rhs split]) |
15319
daf74ce2afdc
m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents:
15302
diff
changeset
|
3217 AC_CACHE_VAL([octave_cv_umfpack_separate_split], |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3218 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
16318
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3219 #include <stdint.h> |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3220 #include <stdlib.h> |
15330
81cc4e5733b1
build: Silence compiler warning in config.log for OCTAVE_UMFPACK_SEPARATE_SPLIT.
Rik <rik@octave.org>
parents:
15329
diff
changeset
|
3221 #include <math.h> |
15144
9cc337ced51a
build: Update OCTAVE_UMFPACK_SEPARATE_SPLIT macro to look for SuiteSparse header file.
Rik <rik@octave.org>
parents:
15141
diff
changeset
|
3222 #if defined (HAVE_SUITESPARSE_UMFPACK_H) |
9cc337ced51a
build: Update OCTAVE_UMFPACK_SEPARATE_SPLIT macro to look for SuiteSparse header file.
Rik <rik@octave.org>
parents:
15141
diff
changeset
|
3223 # include <suitesparse/umfpack.h> |
9cc337ced51a
build: Update OCTAVE_UMFPACK_SEPARATE_SPLIT macro to look for SuiteSparse header file.
Rik <rik@octave.org>
parents:
15141
diff
changeset
|
3224 #elif defined (HAVE_UFSPARSE_UMFPACK_H) |
9cc337ced51a
build: Update OCTAVE_UMFPACK_SEPARATE_SPLIT macro to look for SuiteSparse header file.
Rik <rik@octave.org>
parents:
15141
diff
changeset
|
3225 # include <ufsparse/umfpack.h> |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3226 #elif defined (HAVE_UMFPACK_UMFPACK_H) |
15144
9cc337ced51a
build: Update OCTAVE_UMFPACK_SEPARATE_SPLIT macro to look for SuiteSparse header file.
Rik <rik@octave.org>
parents:
15141
diff
changeset
|
3227 # include <umfpack/umfpack.h> |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3228 #elif defined (HAVE_UMFPACK_H) |
15144
9cc337ced51a
build: Update OCTAVE_UMFPACK_SEPARATE_SPLIT macro to look for SuiteSparse header file.
Rik <rik@octave.org>
parents:
15141
diff
changeset
|
3229 # include <umfpack.h> |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3230 #endif |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21604
diff
changeset
|
3231 #if defined (OCTAVE_ENABLE_64) |
16318
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3232 typedef uint64_t idx_type; |
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3233 #define UMFPACK_NAME(name) umfpack_zl_ ## name |
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3234 #else |
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3235 typedef int idx_type; |
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3236 #define UMFPACK_NAME(name) umfpack_zi_ ## name |
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3237 #endif |
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3238 idx_type n = 5; |
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3239 idx_type Ap[] = {0, 2, 5, 9, 10, 12}; |
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3240 idx_type Ai[] = {0, 1, 0, 2, 4, 1, 2, 3, 4, 2, 1, 4}; |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
3241 double Ax[] = {2., 0., 3., 0., 3., 0., -1., 0., 4., 0., 4., 0., |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3242 -3., 0., 1., 0., 2., 0., 2., 0., 6., 0., 1., 0.}; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3243 double br[] = {8., 45., -3., 3., 19.}; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3244 double bi[] = {0., 0., 0., 0., 0.}; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3245 int main (void) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3246 { |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3247 double *null = (double *) NULL ; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3248 double *x = (double *)malloc (2 * n * sizeof(double)); |
16318
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3249 idx_type i ; |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3250 void *Symbolic, *Numeric ; |
16318
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3251 (void) UMFPACK_NAME (symbolic) (n, n, Ap, Ai, Ax, null, &Symbolic, null, null) ; |
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3252 (void) UMFPACK_NAME (numeric) (Ap, Ai, Ax, null, Symbolic, &Numeric, null, null) ; |
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3253 UMFPACK_NAME (free_symbolic) (&Symbolic) ; |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
3254 (void) UMFPACK_NAME (solve) (0, Ap, Ai, Ax, null, x, null, br, bi, |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3255 Numeric, null, null) ; |
16318
eb572251b7c6
check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3256 UMFPACK_NAME (free_numeric) (&Numeric) ; |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
3257 for (i = 0; i < n; i++, x+=2) |
15330
81cc4e5733b1
build: Silence compiler warning in config.log for OCTAVE_UMFPACK_SEPARATE_SPLIT.
Rik <rik@octave.org>
parents:
15329
diff
changeset
|
3258 if (fabs (*x - i - 1.) > 1.e-13) |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3259 return (1); |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3260 return (0) ; |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3261 } |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3262 ]])], |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3263 octave_cv_umfpack_separate_split=yes, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3264 octave_cv_umfpack_separate_split=no, |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3265 octave_cv_umfpack_separate_split=yes) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3266 ]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3267 if test "$cross_compiling" = yes; then |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3268 AC_MSG_RESULT([$octave_cv_umfpack_separate_split assumed for cross compilation]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3269 else |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3270 AC_MSG_RESULT([$octave_cv_umfpack_separate_split]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3271 fi |
15336
5fff79162342
acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents:
15330
diff
changeset
|
3272 if test $octave_cv_umfpack_separate_split = yes; then |
17034
8d84dc5f5b5d
acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents:
17031
diff
changeset
|
3273 AC_DEFINE(UMFPACK_SEPARATE_SPLIT, 1, |
15141
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3274 [Define to 1 if the UMFPACK Complex solver allows matrix and RHS to be split independently.]) |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3275 fi |
4388f6518440
build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents:
15134
diff
changeset
|
3276 ]) |