annotate m4/acinclude.m4 @ 32051:17a09d2bbe0f

gui: Remove usage of QTextCodec from some more places. * libgui/src/gui-preference.h: Remove unused header. * libgui/src/octave-qobject.cc: Include header only if function from it are used. * m4/acinclude.m4: Do not require Qt6Core5Compat on platforms that don't need it.
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 23 Apr 2023 11:08:16 +0200
parents 1c99c8f020f7
children 9cb43336c3b3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31133
1d61c36bb34a build: Uspdate Copyright notices for acinclude.m4, octave_blas.m4.
Rik <rik@octave.org>
parents: 31130
diff changeset
1 dnl acinclude.m4 -- extra macros for configuring Octave
1232
5f1bb459e99c [project @ 1995-04-10 05:20:52 by jwe]
jwe
parents:
diff changeset
2 dnl
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
3 dnl --------------------------------------------------------------------
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
4 dnl
31706
597f3ee61a48 update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 31491
diff changeset
5 dnl Copyright (C) 1995-2023 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 27842
diff changeset
6 dnl
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
7 dnl See the file COPYRIGHT.md in the top-level directory of this
31133
1d61c36bb34a build: Uspdate Copyright notices for acinclude.m4, octave_blas.m4.
Rik <rik@octave.org>
parents: 31130
diff changeset
8 dnl distribution or <https://octave.org/copyright/>.
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
9 dnl
1232
5f1bb459e99c [project @ 1995-04-10 05:20:52 by jwe]
jwe
parents:
diff changeset
10 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
11 dnl
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24446
diff changeset
12 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
13 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
14 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
15 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
16 dnl
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22509
diff changeset
17 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
18 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22509
diff changeset
19 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22509
diff changeset
20 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
21 dnl
1232
5f1bb459e99c [project @ 1995-04-10 05:20:52 by jwe]
jwe
parents:
diff changeset
22 dnl You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6955
diff changeset
23 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
24 dnl <https://www.gnu.org/licenses/>.
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
25 dnl
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
26 dnl --------------------------------------------------------------------
2813
d45d48b3dcde [project @ 1997-03-13 22:39:15 by jwe]
jwe
parents: 2641
diff changeset
27 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
28 dnl Alphabetical list of macros in the OCTAVE_ namespace
4360
1d7180ab9df1 [project @ 2003-02-24 02:57:24 by jwe]
jwe
parents: 4192
diff changeset
29 dnl
4366
ad851d04b396 [project @ 2003-03-05 09:49:18 by jwe]
jwe
parents: 4360
diff changeset
30 dnl
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
31 dnl Figure out the hardware-vendor-os info.
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
32 dnl
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
33 AC_DEFUN([OCTAVE_CANONICAL_HOST], [
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
34 AC_CANONICAL_HOST
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
35 if test -z "$host"; then
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
36 host=unknown-unknown-unknown
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
37 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
38 fi
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
39 canonical_host_type=$host
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
40 AC_SUBST(canonical_host_type)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
41 if test -z "$host_cpu"; then
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
42 host_cpu=unknown
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
43 fi
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
44 if test -z "$host_vendor"; then
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
45 host_vendor=unknown
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
46 fi
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
47 if test -z "$host_os"; then
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
48 host_os=unknown
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
49 fi
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
50 ])
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
51 dnl
15133
f91eac1bc66d m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents: 15126
diff changeset
52 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
53 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
54 AC_DEFUN([OCTAVE_CARBON_CGDISPLAYBITSPERPIXEL], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
55 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
56 [octave_cv_func_carbon_cgdisplaybitsperpixel],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
57 [AC_LANG_PUSH(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
58 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
59 #include <Carbon/Carbon.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
60 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
61 CGDirectDisplayID display = CGMainDisplayID ();
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
62 size_t depth = CGDisplayBitsPerPixel (display);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
63 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
64 octave_cv_func_carbon_cgdisplaybitsperpixel=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
65 octave_cv_func_carbon_cgdisplaybitsperpixel=no)
3888
70ebd3d672a1 [project @ 2002-04-04 01:05:53 by jwe]
jwe
parents: 3887
diff changeset
66 AC_LANG_POP(C++)
3107
a8dcfbf87ea3 [project @ 1997-11-19 22:34:59 by jwe]
jwe
parents: 3089
diff changeset
67 ])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
68 if test $octave_cv_func_carbon_cgdisplaybitsperpixel = yes; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
69 AC_DEFINE(HAVE_CARBON_CGDISPLAYBITSPERPIXEL, 1,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
70 [Define to 1 if Carbon Framework has CGDisplayBitsPerPixel.])
3107
a8dcfbf87ea3 [project @ 1997-11-19 22:34:59 by jwe]
jwe
parents: 3089
diff changeset
71 fi
a8dcfbf87ea3 [project @ 1997-11-19 22:34:59 by jwe]
jwe
parents: 3089
diff changeset
72 ])
3126
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
73 dnl
15133
f91eac1bc66d m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents: 15126
diff changeset
74 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
75 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
76 dnl Otherwise, add FLAG to CFLAGS if the compiler accepts the flag.
3126
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
77 dnl
9654
a307a6f77fb3 aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents: 9645
diff changeset
78 AC_DEFUN([OCTAVE_CC_FLAG], [
17661
1978a6c76aa9 Use user-specified SED during build process (bug #40273).
Rik <rik@octave.org>
parents: 17615
diff changeset
79 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
80 AC_MSG_CHECKING([whether ${CC-cc} accepts $1])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
81 AC_CACHE_VAL([octave_cv_cc_flag_$ac_safe],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
82 [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
83 ac_octave_save_CFLAGS="$CFLAGS"
3126
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
84 CFLAGS="$CFLAGS $1"
5177
86fa011d6404 [project @ 2005-03-03 00:32:34 by jwe]
jwe
parents: 5094
diff changeset
85 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
86 [eval "octave_cv_cc_flag_$ac_safe=yes"],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
87 [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
88 CFLAGS="$ac_octave_save_CFLAGS"
3888
70ebd3d672a1 [project @ 2002-04-04 01:05:53 by jwe]
jwe
parents: 3887
diff changeset
89 AC_LANG_POP(C)
3126
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
90 ])
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
91 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
92 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
93 ifelse([$2], ,
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
94 [CFLAGS="$CFLAGS $1"
3131
9c5160c83bd2 [project @ 1998-01-29 04:46:33 by jwe]
jwe
parents: 3130
diff changeset
95 AC_MSG_RESULT([adding $1 to CFLAGS])], [$2])
3126
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
96 else
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
97 AC_MSG_RESULT([no])
3126
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
98 ifelse([$3], , , [$3])
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
99 fi
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
100 ])
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
101 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
102 dnl Check if pthread stack size accounts for thread-local storage.
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
103 dnl
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
104 dnl This program should succeed if the pthread library allocates memory
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
105 dnl for thread-local (__thread) variables independently of the
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
106 dnl requested thread stack size.
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
107 dnl
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
108 dnl It will fail if (as in the current version of glibc) the storage
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
109 dnl for thread-local variables is subtracted from the memory allocated
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
110 dnl for the thread stack. (This can cause problems for Java and for
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
111 dnl other libraries.)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
112 dnl
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
113 dnl This bug is tracked in glibc at:
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
114 dnl https://sourceware.org/bugzilla/show_bug.cgi?id=11787
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
115 dnl
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
116 AC_DEFUN([OCTAVE_CHECK_BROKEN_PTHREAD_STACKSIZE], [
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
117 AC_CACHE_CHECK([whether pthread stack size does not account for thread-local storage],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
118 [octave_cv_broken_pthread_stacksize],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
119 [AC_LANG_PUSH(C)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
120 AC_RUN_IFELSE([AC_LANG_PROGRAM([[
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
121 #include <stdio.h>
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
122 #include <string.h>
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
123 #include <pthread.h>
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
124
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
125 static char __thread data[100 * 1024];
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
126
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
127 static void * threadfunc(void *arg)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
128 {
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
129 return data;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
130 }
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
131 ]], [[
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
132 pthread_attr_t attr;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
133 pthread_t thread;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
134 int errnum;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
135
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
136 pthread_attr_init (&attr);
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
137 errnum = pthread_attr_setstacksize (&attr, 64 * 1024);
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
138 if (errnum != 0)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
139 {
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
140 fprintf (stderr, "pthread_attr_setstacksize: %s\n", strerror(errnum));
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
141 return 1;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
142 }
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
143 errnum = pthread_create (&thread, &attr, &threadfunc, NULL);
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
144 if (errnum != 0)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
145 {
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
146 fprintf (stderr, "pthread_create: %s\n", strerror(errnum));
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
147 return 1;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
148 }
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
149 errnum = pthread_join (thread, NULL);
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
150 if (errnum != 0)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
151 {
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
152 fprintf (stderr, "pthread_join: %s\n", strerror(errnum));
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
153 return 1;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
154 }
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
155
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
156 pthread_attr_destroy (&attr);
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
157 return 0;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
158 ]])],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
159 octave_cv_broken_pthread_stacksize=no,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
160 octave_cv_broken_pthread_stacksize=yes,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
161 octave_cv_broken_pthread_stacksize=no)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
162 AC_LANG_POP(C)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
163 ])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
164 if test $octave_cv_broken_pthread_stacksize = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
165 AC_DEFINE(HAVE_BROKEN_PTHREAD_STACKSIZE, 1,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
166 [Define to 1 if pthread stack size does not account for thread-local storage.])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
167 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
168 ])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
169 dnl
31982
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
170 dnl Check for LLVM or Apple libc++ library.
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
171 dnl
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
172 AC_DEFUN([OCTAVE_LLVM_LIBCXX], [
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
173 AC_CACHE_CHECK([whether using STL from LLVM or Apple],
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
174 [octave_cv_llvm_libcxx],
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
175 [AC_LANG_PUSH(C++)
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
176 AC_RUN_IFELSE([AC_LANG_PROGRAM([[
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
177 // Include any header from the STL
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
178 #include <iostream>
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
179 ]], [[
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
180 #if defined (_LIBCPP_VERSION)
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
181 return (0);
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
182 #else
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
183 return (1);
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
184 #endif
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
185 ]])],
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
186 octave_cv_llvm_libcxx=yes,
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
187 octave_cv_llvm_libcxx=no,
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
188 octave_cv_llvm_libcxx=no)
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
189 AC_LANG_POP(C++)
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
190 ])
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
191 if test $octave_cv_llvm_libcxx = yes; then
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
192 AC_DEFINE(HAVE_LLVM_LIBCXX, 1,
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
193 [Define to 1 if linking to LLVM or Apple libc++.])
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
194 fi
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
195 ])
86eb373a6c64 build: Check whether using STL from LLVM or Apple (bug #63930).
Markus Mützel <markus.muetzel@gmx.de>
parents: 31933
diff changeset
196 dnl
30488
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
197 dnl Check whether std::pmr::polymorphic_allocator is available.
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
198 dnl
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
199 AC_DEFUN([OCTAVE_CHECK_STD_PMR_POLYMORPHIC_ALLOCATOR], [
30501
79a7f3e3cf54 Use consistent name for OCTAVE_HAVE_STD_PMR_POLYMORPHIC_ALLOCATOR (bug #61472).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30488
diff changeset
200 AC_CACHE_CHECK([whether std::pmr::polymorphic_allocator is available],
30488
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
201 [octave_cv_std_pmr_polymorphic_allocator],
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
202 [AC_LANG_PUSH(C++)
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
203 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
204 #include <cstdlib>
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
205 #include <memory_resource>
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
206 #include <vector>
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
207 class mx_memory_resource : public std::pmr::memory_resource
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
208 {
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
209 private:
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
210 void * do_allocate (std::size_t bytes, size_t /*alignment*/)
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
211 {
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
212 void *ptr = std::malloc (bytes);
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
213 if (! ptr)
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
214 throw std::bad_alloc ();
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
215 return ptr;
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
216 }
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
217 void do_deallocate (void* ptr, std::size_t /*bytes*/,
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
218 std::size_t /*alignment*/)
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
219 {
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
220 std::free (ptr);
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
221 }
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
222 bool do_is_equal (const std::pmr::memory_resource& other) const noexcept
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
223 {
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
224 return this == dynamic_cast<const mx_memory_resource *> (&other);
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
225 return true;
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
226 }
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
227 };
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
228 mx_memory_resource the_mx_memory_resource;
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
229 ]], [[
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
230 std::pmr::vector<int> my_int_vec { &the_mx_memory_resource };
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
231 ]])],
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
232 octave_cv_std_pmr_polymorphic_allocator=yes,
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
233 octave_cv_std_pmr_polymorphic_allocator=no)
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
234 AC_LANG_POP(C++)
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
235 ])
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
236 if test $octave_cv_std_pmr_polymorphic_allocator = yes; then
30501
79a7f3e3cf54 Use consistent name for OCTAVE_HAVE_STD_PMR_POLYMORPHIC_ALLOCATOR (bug #61472).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30488
diff changeset
237 AC_DEFINE(OCTAVE_HAVE_STD_PMR_POLYMORPHIC_ALLOCATOR, 1,
30488
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
238 [Define to 1 if std::pmr::polymorphic_allocator is available.])
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
239 fi
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
240 ])
abb4823df535 with C++17, match malloc/free for MEX memory (bug #61472)
John W. Eaton <jwe@octave.org>
parents: 30447
diff changeset
241 dnl
21160
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
242 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
243 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
244 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
245 dnl
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
246 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
247 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
248 [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
249 [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
250 CPPFLAGS="$CXSPARSE_CPPFLAGS $CPPFLAGS"
21160
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
251 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
252 #if defined (HAVE_SUITESPARSE_CS_H)
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
253 #include <suitesparse/cs.h>
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
254 #elif defined (HAVE_CXSPARSE_CS_H)
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
255 #include <cxsparse/cs.h>
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
256 #elif defined (HAVE_CS_H)
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
257 #include <cs.h>
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
258 #endif
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
259 ]], [[
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
260 #if (defined (HAVE_CXSPARSE) \
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
261 && (! defined (CS_VER) \
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
262 || CS_VER < 2 \
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
263 || (CS_VER == 2 && CS_SUBVER < 2)))
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
264 #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
265 #endif
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
266 ]])],
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
267 octave_cv_cxsparse_version_ok=yes,
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
268 octave_cv_cxsparse_version_ok=no)
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
269 CPPFLAGS="$ac_octave_save_CPPFLAGS"
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
270 ])
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
271 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
272 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
273 [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
274 fi
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
275 ])
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
276 dnl
15969
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
277 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
278 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
279 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
280 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
281 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
282 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
283 dnl ahead of the main FFTW library.
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
284 dnl
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
285 AC_DEFUN([OCTAVE_CHECK_FFTW_THREADS], [
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
286 ac_octave_save_CPPFLAGS="$CPPFLAGS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
287 ac_octave_save_LDFLAGS="$LDFLAGS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
288 ac_octave_save_LIBS="$LIBS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
289 CPPFLAGS="$m4_toupper([$1])_CPPFLAGS $CPPFLAGS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
290 LDFLAGS="$m4_toupper([$1])_LDFLAGS $LDFLAGS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
291 LIBS="$m4_toupper([$1])_LIBS $LIBS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
292 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
293 [octave_cv_[$1]_threads_lib],
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
294 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
295 #include <fftw3.h>
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
296 ]], [[
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
297 $2 (2);
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
298 ]])],
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
299 [octave_cv_[$1]_threads_lib=yes],
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
300 [LIBS="-l[$1]_threads $LIBS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
301 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
302 #include <fftw3.h>
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
303 ]], [[
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
304 $2 (2);
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
305 ]])],
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
306 [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
307 [octave_cv_[$1]_threads_lib=no])
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
308 ])
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
309 ])
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
310 case $octave_cv_[$1]_threads_lib in
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
311 -l*)
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
312 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
313 ;;
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
314 no)
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
315 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
316 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
317 ;;
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
318 esac
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
319 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
320 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
321 [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
322 fi
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
323 CPPFLAGS="$ac_octave_save_CPPFLAGS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
324 LDFLAGS="$ac_octave_save_LDFLAGS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
325 LIBS="$ac_octave_save_LIBS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
326 ])
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
327 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
328 dnl OCTAVE_CHECK_FORTRAN_SYMBOL_AND_CALLING_CONVENTIONS
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
329 dnl
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
330 dnl Set variables related to Fortran symbol names (append underscore,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
331 dnl use uppercase names, etc.) and calling convention (mostly used for
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
332 dnl determining how character strings are passed).
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
333 dnl
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
334 AC_DEFUN([OCTAVE_CHECK_FORTRAN_SYMBOL_AND_CALLING_CONVENTIONS], [
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
335 F77_TOLOWER=yes
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
336 F77_APPEND_UNDERSCORE=yes
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
337 F77_APPEND_EXTRA_UNDERSCORE=yes
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
338
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
339 case $ac_cv_f77_mangling in
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
340 "upper case") F77_TOLOWER=no ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
341 esac
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
342 case $ac_cv_f77_mangling in
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
343 "no underscore") F77_APPEND_UNDERSCORE=no ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
344 esac
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
345 case $ac_cv_f77_mangling in
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
346 "no extra underscore") F77_APPEND_EXTRA_UNDERSCORE=no ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
347 esac
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
348
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
349 case $canonical_host_type in
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
350 i[[3456789]]86-*-*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
351 if test $ac_cv_f77_compiler_gnu = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
352 OCTAVE_F77_FLAG([-mieee-fp])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
353 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
354 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
355 alpha*-*-*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
356 if test $ac_cv_f77_compiler_gnu = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
357 OCTAVE_F77_FLAG([-mieee])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
358 else
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
359 OCTAVE_F77_FLAG([-ieee])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
360 OCTAVE_F77_FLAG([-fpe1])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
361 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
362 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
363 powerpc-apple-machten*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
364 FFLAGS=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
365 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
366 esac
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
368 if test $ac_cv_f77_compiler_gnu = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
369 FORTRAN_CALLING_CONVENTION=gfortran
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
370 else
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
371 FORTRAN_CALLING_CONVENTION=unknown
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
372 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
373 AC_ARG_ENABLE([fortran-calling-convention],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
374 [AS_HELP_STRING([--enable-fortran-calling-convention=OPTION],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
375 [Select C++ to Fortran calling convention. "gfortran" should be detected automatically. Other options are "cray", "visual-fortran", or "f2c".])],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
376 [FORTRAN_CALLING_CONVENTION="$enableval"], [])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
377
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
378 case $FORTRAN_CALLING_CONVENTION in
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
379 gfortran)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
380 AC_DEFINE(F77_USES_GFORTRAN_CALLING_CONVENTION, 1, [Define to 1 if calling Fortran from C++ should use the gfortran calling convention.])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
381 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
382 cray)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
383 AC_DEFINE(F77_USES_CRAY_CALLING_CONVENTION, 1, [Define to 1 if calling Fortran from C++ should use the Cray Fortran calling convention.])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
384 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
385 visual-fortran)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
386 AC_DEFINE(F77_USES_VISUAL_FORTRAN_CALLING_CONVENTION, 1, [Define to 1 if calling Fortran from C++ should use the Visual Fortran calling convention.])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
387 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
388 f2c)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
389 AC_DEFINE(F77_USES_F2C_CALLING_CONVENTION, 1, [Define to 1 if calling Fortran from C++ should use the f2c calling convention.])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
390 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
391 *)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
392 AC_MSG_ERROR([to build Octave, the C++ to Fortran calling convention must be known.])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
393 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
394 esac
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
395
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
396 if test -n "$FFLAGS"; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
397 AC_MSG_NOTICE([defining FFLAGS to be $FFLAGS])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
398 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
399
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
400 AC_SUBST(F77_TOLOWER)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
401 AC_SUBST(F77_APPEND_UNDERSCORE)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
402 AC_SUBST(F77_APPEND_EXTRA_UNDERSCORE)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
403 ])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
404 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
405 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
406 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
407 AC_DEFUN([OCTAVE_CHECK_FUNC_GLUTESSCALLBACK_THREEDOTS], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
408 AC_CACHE_CHECK([whether gluTessCallback is called with "(...)"],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
409 [octave_cv_func_glutesscallback_threedots],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
410 [AC_LANG_PUSH(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
411 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
412 #if defined (HAVE_GL_GLU_H)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
413 # include <GL/glu.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
414 #elif defined HAVE_OPENGL_GLU_H || defined HAVE_FRAMEWORK_OPENGL
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
415 # include <OpenGL/glu.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
416 #endif
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
417 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
418 GLvoid (*func)(...);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
419 gluTessCallback(0, 0, func);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
420 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
421 octave_cv_func_glutesscallback_threedots=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
422 octave_cv_func_glutesscallback_threedots=no)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
423 AC_LANG_POP(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
424 ])
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
425 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
426 AC_DEFINE(HAVE_GLUTESSCALLBACK_THREEDOTS, 1,
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
427 [Define to 1 if gluTessCallback is called with (...).])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
428 fi
9596
f26229391ea1 configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents: 9577
diff changeset
429 ])
f26229391ea1 configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents: 9577
diff changeset
430 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
431 dnl Check whether the Qt class QList has a constructor that accepts
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
432 dnl a pair of iterators. This constructor was introduced in Qt 5.14.
18973
625e3bb65885 don't require Qt 4.7 (bug #42657)
John W. Eaton <jwe@octave.org>
parents: 18141
diff changeset
433 dnl
31749
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
434 dnl FIXME: Delete this entirely when we drop support for Qt 5.13 or older.
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
435 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
436 AC_DEFUN([OCTAVE_CHECK_FUNC_QFONTMETRICS_HORIZONTAL_ADVANCE], [
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
437 AC_CACHE_CHECK([for QFontMetrics::horizontalAdvance function],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
438 [octave_cv_func_qfontmetrics_horizontal_advance],
17111
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
439 [AC_LANG_PUSH(C++)
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
440 ac_octave_save_CPPFLAGS="$CPPFLAGS"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
441 ac_octave_save_CXXFLAGS="$CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
442 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
443 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
17111
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
444 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
445 #include <QFont>
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
446 #include <QFontMetrics>
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
447 #include <QString>
17111
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
448 ]], [[
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
449 QFont font;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
450 QFontMetrics fm (font);
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
451 fm.horizontalAdvance ('x');
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
452 fm.horizontalAdvance (QString ("string"));
17111
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
453 ]])],
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
454 octave_cv_func_qfontmetrics_horizontal_advance=yes,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
455 octave_cv_func_qfontmetrics_horizontal_advance=no)
17111
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
456 CPPFLAGS="$ac_octave_save_CPPFLAGS"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
457 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
458 AC_LANG_POP(C++)
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
459 ])
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
460 if test $octave_cv_func_qfontmetrics_horizontal_advance = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
461 AC_DEFINE(HAVE_QFONTMETRICS_HORIZONTAL_ADVANCE, 1,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
462 [Define to 1 if you have the `QFontMetrics::horizontalAdvance' function.])
27842
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
463 fi
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
464 ])
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
465 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
466 dnl Check whether the Qt class QHelpEngine has the documentsForIdentifier
32008
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
467 dnl function. This member function was introduced in Qt 5.15.
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
468 dnl
31749
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
469 dnl FIXME: Delete this entirely when we drop support for Qt 5.14 or older.
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
470 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
471 AC_DEFUN([OCTAVE_CHECK_FUNC_QHELPENGINE_DOCUMENTSFORIDENTIFIER], [
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
472 AC_CACHE_CHECK([for QHelpEngine::documentsForIdentifier in <QHelpEngine>],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
473 [octave_cv_func_qhelpengine_documentsforidentifier],
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
474 [AC_LANG_PUSH(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
475 ac_octave_save_CPPFLAGS="$CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
476 ac_octave_save_CXXFLAGS="$CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
477 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
478 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
479 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
480 #include <QHelpEngine>
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
481 #include <QHelpLink>
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
482 #include <QList>
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
483 #include <QString>
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
484 #include <QUrl>
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
485 ]], [[
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
486 QString collection_file;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
487 QHelpEngine eng (collection_file);
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
488 QString id;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
489 eng.documentsForIdentifier (id);
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
490 ]])],
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
491 octave_cv_func_qhelpengine_documentsforidentifier=yes,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
492 octave_cv_func_qhelpengine_documentsforidentifier=no)
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
493 CPPFLAGS="$ac_octave_save_CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
494 CXXFLAGS="$ac_octave_save_CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
495 AC_LANG_POP(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
496 ])
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
497 if test $octave_cv_func_qhelpengine_documentsforidentifier = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
498 AC_DEFINE(HAVE_QHELPENGINE_DOCUMENTSFORIDENTIFIER, 1,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
499 [Define to 1 if you have the `QHelpEngine::documentsForIdentifier' member function.])
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
500 fi
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
501 ])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
502 dnl
25061
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
503 dnl Check whether the Qt QHelpSearchQueryWidget class has the searchInput
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
504 dnl member function. This function was introduced in Qt 5.9.
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
505 dnl
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
506 dnl FIXME: Delete this entirely when we drop support for Qt 5.8 or older.
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
507 dnl
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
508 AC_DEFUN([OCTAVE_CHECK_FUNC_QHELPSEARCHQUERYWIDGET_SEARCHINPUT], [
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
509 AC_CACHE_CHECK([for QHelpSearchQueryWidget::searchInput],
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
510 [octave_cv_func_qhelpsearchquerywidget_searchinput],
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
511 [AC_LANG_PUSH(C++)
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
512 ac_octave_save_CPPFLAGS="$CPPFLAGS"
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
513 ac_octave_save_CXXFLAGS="$CXXFLAGS"
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
514 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
30447
8a341cf6773d build: Fix possible typo in configure tests.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30243
diff changeset
515 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
25061
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
516 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
517 #include <QHelpSearchQueryWidget>
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
518 #include <QString>
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
519 ]], [[
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
520 QHelpSearchQueryWidget *query_widget = new QHelpSearchQueryWidget ();
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
521 QString search_input = query_widget->searchInput ();
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
522 ]])],
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
523 octave_cv_func_qhelpsearchquerywidget_searchinput=yes,
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
524 octave_cv_func_qhelpsearchquerywidget_searchinput=no)
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
525 CPPFLAGS="$ac_octave_save_CPPFLAGS"
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
526 CXXFLAGS="$ac_octave_save_CXXFLAGS"
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
527 AC_LANG_POP(C++)
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
528 ])
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
529 if test $octave_cv_func_qhelpsearchquerywidget_searchinput = yes; then
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
530 AC_DEFINE(HAVE_QHELPSEARCHQUERYWIDGET_SEARCHINPUT, 1,
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
531 [Define to 1 if you have the `QHelpSearchQueryWidget::searchInput' member function.])
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
532 fi
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
533 ])
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
534 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
535 dnl Check whether the Qt class QList has a constructor that accepts
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
536 dnl a pair of iterators. This constructor was introduced in Qt 5.14.
18216
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
537 dnl
31749
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
538 dnl FIXME: Delete this entirely when we drop support for Qt 5.13 or older.
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
539 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
540 AC_DEFUN([OCTAVE_CHECK_FUNC_QLIST_ITERATOR_CONSTRUCTOR], [
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
541 AC_CACHE_CHECK([for QList<T>::QList (iterator, iterator) constructor],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
542 [octave_cv_func_qlist_iterator_constructor],
24823
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
543 [AC_LANG_PUSH(C++)
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
544 ac_octave_save_CPPFLAGS="$CPPFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
545 ac_octave_save_CXXFLAGS="$CXXFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
546 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
547 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
548 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
549 #include <QList>
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
550 ]], [[
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
551 QList<int> lst_one;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
552 QList<int> lst_two (lst_one.begin (), lst_one.end ());
24823
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
553 ]])],
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
554 octave_cv_func_qlist_iterator_constructor=yes,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
555 octave_cv_func_qlist_iterator_constructor=no)
24823
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
556 CPPFLAGS="$ac_octave_save_CPPFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
557 CXXFLAGS="$ac_octave_save_CXXFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
558 AC_LANG_POP(C++)
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
559 ])
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
560 if test $octave_cv_func_qlist_iterator_constructor = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
561 AC_DEFINE(HAVE_QLIST_ITERATOR_CONSTRUCTOR, 1,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
562 [Define to 1 if you have the `QList<T>::QList (iterator, iterator)' constructor.])
24823
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
563 fi
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
564 ])
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
565 dnl
29048
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
566 dnl Check whether the Qt class QWheelEvent has the position member function.
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
567 dnl This member function was introduced in Qt 5.14.
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
568 dnl
31749
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
569 dnl FIXME: Delete this entirely when we drop support for Qt 5.13 or older.
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
570 dnl
29048
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
571 AC_DEFUN([OCTAVE_CHECK_FUNC_QWHEELEVENT_POSITION], [
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
572 AC_CACHE_CHECK([for QWheelEvent::position in <QWheelEvent>],
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
573 [octave_cv_func_qwheelevent_position],
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
574 [AC_LANG_PUSH(C++)
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
575 ac_octave_save_CPPFLAGS="$CPPFLAGS"
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
576 ac_octave_save_CXXFLAGS="$CXXFLAGS"
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
577 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
578 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
579 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
580 #include <QWheelEvent>
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
581 void foo (const QWheelEvent& ev)
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
582 {
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
583 ev.position ();
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
584 };
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
585 ]])],
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
586 octave_cv_func_qwheelevent_position=yes,
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
587 octave_cv_func_qwheelevent_position=no)
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
588 CPPFLAGS="$ac_octave_save_CPPFLAGS"
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
589 CXXFLAGS="$ac_octave_save_CXXFLAGS"
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
590 AC_LANG_POP(C++)
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
591 ])
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
592 if test $octave_cv_func_qwheelevent_position = yes; then
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
593 AC_DEFINE(HAVE_QWHEELEVENT_POSITION, 1,
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
594 [Define to 1 if you have the `QWheelEvent::position' member function.])
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
595 fi
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
596 ])
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
597 dnl
31212
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
598 dnl Check whether the Qt method QPainter::setRenderHint accepts the
31749
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
599 dnl QPainter::LosslessImageRendering flag. This flag was introduced in
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
600 dnl Qt 5.13.
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
601 dnl
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
602 dnl FIXME: Delete this entirely when we drop support for Qt 5.12 or older.
31212
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
603 dnl
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
604 AC_DEFUN([OCTAVE_CHECK_FUNC_QPAINTER_SETRENDERHINT_LOSSLESS], [
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
605 AC_CACHE_CHECK([for QPainter::LosslessImageRendering flag],
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
606 [octave_cv_func_qpainter_setrenderhint_lossless],
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
607 [AC_LANG_PUSH(C++)
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
608 ac_octave_save_CPPFLAGS="$CPPFLAGS"
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
609 ac_octave_save_CXXFLAGS="$CXXFLAGS"
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
610 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
611 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
612 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
613 #include <QPainter>
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
614 ]], [[
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
615 QPainter painter;
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
616 painter.setRenderHint (QPainter::LosslessImageRendering);
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
617 ]])],
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
618 octave_cv_func_qpainter_setrenderhint_lossless=yes,
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
619 octave_cv_func_qpainter_setrenderhint_lossless=no)
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
620 CPPFLAGS="$ac_octave_save_CPPFLAGS"
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
621 CXXFLAGS="$ac_octave_save_CXXFLAGS"
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
622 AC_LANG_POP(C++)
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
623 ])
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
624 if test $octave_cv_func_qpainter_setrenderhint_lossless = yes; then
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
625 AC_DEFINE(HAVE_QPAINTER_RENDERHINT_LOSSLESS, 1,
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
626 [Define to 1 if you have the `QPainter::LosslessImageRendering' flag.])
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
627 fi
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
628 ])
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
629 dnl
32005
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
630 dnl Check whether the Qt methods QColor::getRgbF and QColor::getHslF
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
631 dnl use float types as their arguments. The type of the arguments
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
632 dnl changed from qreal to float in Qt6.
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
633 dnl
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
634 dnl FIXME: Delete this check when we drop support for any version of Qt5.
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
635 dnl
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
636 AC_DEFUN([OCTAVE_CHECK_FUNC_QCOLOR_FLOAT_TYPE], [
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
637 AC_CACHE_CHECK([for QColor::getRgbF and QColor::getHslF with float arguments],
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
638 [octave_cv_func_qcolor_float_type],
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
639 [AC_LANG_PUSH(C++)
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
640 ac_octave_save_CPPFLAGS="$CPPFLAGS"
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
641 ac_octave_save_CXXFLAGS="$CXXFLAGS"
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
642 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
643 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
644 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
645 #include <QColor>
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
646 ]], [[
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
647 QColor color;
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
648 float r, g, b, h, s, l, a;
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
649 color.getRgbF (&r, &g, &b);
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
650 color.getHslF (&h, &s, &l, &a);
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
651 ]])],
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
652 octave_cv_func_qcolor_float_type=yes,
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
653 octave_cv_func_qcolor_float_type=no)
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
654 CPPFLAGS="$ac_octave_save_CPPFLAGS"
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
655 CXXFLAGS="$ac_octave_save_CXXFLAGS"
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
656 AC_LANG_POP(C++)
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
657 ])
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
658 if test $octave_cv_func_qcolor_float_type = yes; then
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
659 AC_DEFINE(HAVE_QCOLOR_FLOAT_TYPE, 1,
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
660 [Define to 1 if QColor::getRgbF and QColor::getHslF use float type arguments.])
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
661 fi
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
662 ])
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
663 dnl
32006
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
664 dnl Check whether Qt provides a QStringView class. This class was first
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
665 dnl introduced in Qt 5.10 and finally replaced QStringRef in Qt6.
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
666 dnl
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
667 dnl FIXME: Delete this check when we drop support for Qt 5.9 or older.
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
668 dnl
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
669 AC_DEFUN([OCTAVE_CHECK_CLASS_QSTRINGVIEW], [
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
670 AC_CACHE_CHECK([for class QStringView],
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
671 [octave_cv_class_qstringview],
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
672 [AC_LANG_PUSH(C++)
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
673 ac_octave_save_CPPFLAGS="$CPPFLAGS"
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
674 ac_octave_save_CXXFLAGS="$CXXFLAGS"
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
675 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
676 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
677 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
678 #include <QStringView>
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
679 ]], [[
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
680 QStringView qstrv {};
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
681 ]])],
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
682 octave_cv_class_qstringview=yes,
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
683 octave_cv_class_qstringview=no)
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
684 CPPFLAGS="$ac_octave_save_CPPFLAGS"
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
685 CXXFLAGS="$ac_octave_save_CXXFLAGS"
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
686 AC_LANG_POP(C++)
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
687 ])
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
688 if test $octave_cv_class_qstringview = yes; then
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
689 AC_DEFINE(HAVE_QSTRINGVIEW, 1,
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
690 [Define to 1 if Qt provides the class QStringView.])
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
691 fi
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
692 ])
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
693 dnl
32008
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
694 dnl Check whether the Qt class QTextStream has the setEncoding function.
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
695 dnl This function was introduced replacing QTextStream::setCodec in Qt6.
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
696 dnl
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
697 dnl FIXME: Delete this check when we drop support for any version of Qt5.
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
698 dnl
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
699 AC_DEFUN([OCTAVE_CHECK_FUNC_QTEXTSTREAM_SETENCODING], [
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
700 AC_CACHE_CHECK([for QTextStream::setEncoding],
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
701 [octave_cv_func_qtextstream_setencoding],
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
702 [AC_LANG_PUSH(C++)
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
703 ac_octave_save_CPPFLAGS="$CPPFLAGS"
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
704 ac_octave_save_CXXFLAGS="$CXXFLAGS"
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
705 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
706 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
707 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
708 #include <QStringConverter>
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
709 #include <QTextStream>
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
710 ]], [[
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
711 QTextStream textstream;
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
712 textstream.setEncoding (QStringConverter::Utf8);
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
713 ]])],
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
714 octave_cv_func_qtextstream_setencoding=yes,
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
715 octave_cv_func_qtextstream_setencoding=no)
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
716 CPPFLAGS="$ac_octave_save_CPPFLAGS"
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
717 CXXFLAGS="$ac_octave_save_CXXFLAGS"
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
718 AC_LANG_POP(C++)
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
719 ])
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
720 if test $octave_cv_func_qtextstream_setencoding = yes; then
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
721 AC_DEFINE(HAVE_QTEXTSTREAM_SETENCODING, 1,
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
722 [Define to 1 if you have the `QTextStream::setEncoding' member function.])
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
723 fi
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
724 ])
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
725 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
726 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
727 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
728 AC_DEFUN([OCTAVE_CHECK_HDF5_HAS_VER_16_API], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
729 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
730 [octave_cv_hdf5_has_ver_16_api],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
731 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
732 #include <hdf5.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
733 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
734 H5Eset_auto (0, 0);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
735 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
736 octave_cv_hdf5_has_ver_16_api=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
737 octave_cv_hdf5_has_ver_16_api=no)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
738 ])
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
739 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
740 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
741 fi
14605
28e53daab1f8 Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14550
diff changeset
742 ])
28e53daab1f8 Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14550
diff changeset
743 dnl
30243
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
744 dnl Check whether HDF5 library has UTF-8 file API.
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
745 dnl
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
746 AC_DEFUN([OCTAVE_CHECK_HDF5_HAS_UTF8_API], [
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
747 AC_CACHE_CHECK([whether HDF5 library has UTF-8 file API],
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
748 [octave_cv_hdf5_has_utf8_api],
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
749 [case $host_os in
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
750 msdosmsvc | mingw*)
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
751 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
752 #include <stddef.h>
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
753 const wchar_t *H5_get_utf16_str(const char *s);
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
754 ]], [[
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
755 H5_get_utf16_str ("");
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
756 ]])],
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
757 octave_cv_hdf5_has_utf8_api=yes,
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
758 octave_cv_hdf5_has_utf8_api=no)
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
759 ;;
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
760 *)
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
761 ## Assume yes on all other platforms
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
762 octave_cv_hdf5_has_utf8_api=yes
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
763 ;;
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
764 esac
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
765 ])
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
766 if test $octave_cv_hdf5_has_utf8_api = yes; then
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
767 AC_DEFINE(HAVE_HDF5_UTF8, 1, [Define to 1 if HDF5 has UTF-8 file API.])
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
768 fi
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
769 ])
a4061ae5ff79 Use UTF-8 file API if supported by HDF5 library.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30170
diff changeset
770 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
771 dnl Usage:
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
772 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
773 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
774 dnl REQUIRED)
14605
28e53daab1f8 Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14550
diff changeset
775 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
776 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
777 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
778 [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
779 [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
780 [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
781 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
782
23017
0f22914be30e * acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents: 23008
diff changeset
783 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
784 [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
785 [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
786 [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
787 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
788
23017
0f22914be30e * acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents: 23008
diff changeset
789 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
790 [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
791 [m4_ifblank([$7],
23017
0f22914be30e * acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents: 23008
diff changeset
792 [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
793 [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
794 [m4_ifblank([$7],
23017
0f22914be30e * acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents: 23008
diff changeset
795 [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
796 [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
797 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
798
22039
0a528a6dac95 build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents: 22036
diff changeset
799 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
800 m4_toupper([$1])_LIBS=
21381
e5d96f39a37d configure script fixes
John W. Eaton <jwe@octave.org>
parents: 21374
diff changeset
801 warn_$1="$3"
9519
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
802 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
803 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
804 ifelse([$#], 10,
23017
0f22914be30e * acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents: 23008
diff changeset
805 [AC_MSG_ERROR([--without-m4_tolower($1) specified but $2 is required.])],
28299
a8f6a7083428 Don't issue configure warnings when --without-XXX used (bug #58330)
Rik <rik@octave.org>
parents: 27957
diff changeset
806 [warn_$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
807 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
808 ;;
9519
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
809 yes | "")
22039
0a528a6dac95 build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents: 22036
diff changeset
810 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
811 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
812 ;;
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
813 -* | */* | *.a | *.so | *.so.* | *.o)
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
814 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
815 ;;
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
816 *)
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
817 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
818 ;;
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
819 esac
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
820
22039
0a528a6dac95 build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents: 22036
diff changeset
821 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
822 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
823 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
824 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
825 fi
0a528a6dac95 build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents: 22036
diff changeset
826 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
827 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
828 fi
23835
6ae0292aaa5c configure: ensure empty pkg-config results are actually empty (bug #51680)
Mike Miller <mtmiller@octave.org>
parents: 23414
diff changeset
829 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
830 ])
0a528a6dac95 build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents: 22036
diff changeset
831 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
832
9519
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
833 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
834 ac_octave_save_CPPFLAGS="$CPPFLAGS"
15350
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
835 ac_octave_save_LDFLAGS="$LDFLAGS"
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
836 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
837 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
838 LDFLAGS="$m4_toupper([$1])_LDFLAGS $LDFLAGS"
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
839 LIBS="$m4_toupper([$1])_LIBS $LIBS"
9523
0ce82753dd72 more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents: 9520
diff changeset
840 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
841 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
842 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
843 [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
844 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
845 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
846 [octave_cv_lib_$1],
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
847 [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
848 [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
849 ])
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
850 if test "$octave_cv_lib_$1" = yes; then
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
851 m4_ifblank([$8], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
852 warn_$1=
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
853 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
854 [Define to 1 if $2 is available.])], [$8])
25299
537b732926fb fix logic error in OCTAVE_CONFIG_LIB (bug #53736)
John W. Eaton <jwe@octave.org>
parents: 25135
diff changeset
855 else
537b732926fb fix logic error in OCTAVE_CONFIG_LIB (bug #53736)
John W. Eaton <jwe@octave.org>
parents: 25135
diff changeset
856 m4_toupper([$1])_LIBS=
9519
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
857 fi
25299
537b732926fb fix logic error in OCTAVE_CONFIG_LIB (bug #53736)
John W. Eaton <jwe@octave.org>
parents: 25135
diff changeset
858 else
25666
b08864ae8506 OCTAVE_CHECK_LIB: avoid shell syntax error if not checking for lib
John W. Eaton <jwe@octave.org>
parents: 25559
diff changeset
859 octave_cv_lib_$1=no
25299
537b732926fb fix logic error in OCTAVE_CONFIG_LIB (bug #53736)
John W. Eaton <jwe@octave.org>
parents: 25135
diff changeset
860 m4_toupper([$1])_LIBS=
9568
d3fccc4c4b9e use OCTAVE_CHECK_LIBRARY to check for ARPACK
John W. Eaton <jwe@octave.org>
parents: 9543
diff changeset
861 fi
9523
0ce82753dd72 more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents: 9520
diff changeset
862 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
863 CPPFLAGS="$ac_octave_save_CPPFLAGS"
15350
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
864 LDFLAGS="$ac_octave_save_LDFLAGS"
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
865 LIBS="$ac_octave_save_LIBS"
21381
e5d96f39a37d configure script fixes
John W. Eaton <jwe@octave.org>
parents: 21374
diff changeset
866 else
e5d96f39a37d configure script fixes
John W. Eaton <jwe@octave.org>
parents: 21374
diff changeset
867 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
868 fi
15350
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
869
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
870 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
871 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
872 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
873 fi])
9519
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
874 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
875 if test -n "$warn_$1"; then
21381
e5d96f39a37d configure script fixes
John W. Eaton <jwe@octave.org>
parents: 21374
diff changeset
876 OCTAVE_CONFIGURE_WARNING([warn_$1])
9519
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
877 fi
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
878 ])
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
879 dnl
15133
f91eac1bc66d m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents: 15126
diff changeset
880 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
881 dnl
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
882 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
883 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
884 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
885 dnl allocated arrays in Fortran does not?
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
886 dnl
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
887 dnl FIXME: it would be nice to avoid the duplication of F77 macros
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
888 dnl and typedefs here and in the f77-fcn.h header file. Also, the
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
889 dnl definition of the character handling macros are not right for
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
890 dnl all systems (but should work on most modern systems in use today).
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
891 dnl
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
892 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
893 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
894 [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
895 [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
896 AC_RUN_IFELSE([AC_LANG_PROGRAM([[
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
897
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
898 #include <cfloat>
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
899
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
900 #include <stdint.h>
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
901
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
902 typedef int F77_RET_T;
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
903
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
904 #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
905 #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
906
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
907 #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
908
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
909 #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
910 #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
911
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
912 #define F77_INT $OCTAVE_F77_INT_TYPE
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
913 #define F77_DBLE double
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
914
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
915 extern "C"
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
916 {
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
917 F77_RET_T
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
918 F77_FUNC (dnaupd, DNAUPD) (F77_INT&,
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
919 F77_CONST_CHAR_ARG_DECL,
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
920 const F77_INT&,
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
921 F77_CONST_CHAR_ARG_DECL,
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
922 F77_INT&, const F77_DBLE&,
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
923 F77_DBLE*, const F77_INT&, F77_DBLE*,
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
924 const F77_INT&, F77_INT*,
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
925 F77_INT*, F77_DBLE*, F77_DBLE*,
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
926 const F77_INT&, F77_INT&
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
927 F77_CHAR_ARG_LEN_DECL
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
928 F77_CHAR_ARG_LEN_DECL);
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
929
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
930 F77_RET_T
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
931 F77_FUNC (dneupd, DNEUPD) (const F77_INT&,
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
932 F77_CONST_CHAR_ARG_DECL,
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
933 F77_INT*, F77_DBLE*, F77_DBLE*,
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
934 F77_DBLE*, const F77_INT&, const F77_DBLE&,
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
935 const F77_DBLE&, F77_DBLE*,
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
936 F77_CONST_CHAR_ARG_DECL,
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
937 const F77_INT&,
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
938 F77_CONST_CHAR_ARG_DECL,
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
939 F77_INT&, const F77_DBLE&, F77_DBLE*,
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
940 const F77_INT&, F77_DBLE*,
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
941 const F77_INT&, F77_INT*,
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
942 F77_INT*, F77_DBLE*, F77_DBLE*,
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
943 const F77_INT&, F77_INT&
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
944 F77_CHAR_ARG_LEN_DECL
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
945 F77_CHAR_ARG_LEN_DECL
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
946 F77_CHAR_ARG_LEN_DECL);
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
947
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
948 F77_RET_T
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
949 F77_FUNC (dgemv, DGEMV) (F77_CONST_CHAR_ARG_DECL,
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
950 const F77_INT&, const F77_INT&,
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
951 const F77_DBLE&, const F77_DBLE*,
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
952 const F77_INT&, const F77_DBLE*,
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
953 const F77_INT&, const F77_DBLE&,
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
954 F77_DBLE*, const F77_INT&
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
955 F77_CHAR_ARG_LEN_DECL);
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
956 }
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
957
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
958 void
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
959 doit (void)
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
960 {
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
961 // 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
962
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
963 // Problem matrix. See bug #31479.
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
964 F77_INT n = 4;
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
965 double *m = new double [n * n];
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
966 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
967 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
968 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
969 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
970
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
971 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
972
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
973 resid[0] = 0.960966;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
974 resid[1] = 0.741195;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
975 resid[2] = 0.150143;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
976 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
977
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
978 F77_INT *ip = new F77_INT [11];
14144
834df9f10963 remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
979
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
980 ip[0] = 1; // ishift
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
981 ip[1] = 0; // ip[1] not referenced
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
982 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
983 ip[3] = 1; // NB blocksize in recurrence
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
984 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
985 ip[5] = 0; // ip[5] not referenced
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
986 ip[6] = 1; // mode
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
987 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
988 ip[8] = 0;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
989 ip[9] = 0;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
990 ip[10] = 0;
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
991
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
992 F77_INT *ipntr = new F77_INT [14];
14144
834df9f10963 remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
993
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
994 F77_INT k = 1;
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
995 F77_INT p = 3;
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
996 F77_INT lwork = 3 * p * (p + 2);
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
997
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
998 double *v = new double [n * (p + 1)];
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
999 double *workl = new double [lwork + 1];
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1000 double *workd = new double [3 * n + 1];
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1001
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
1002 F77_INT ido = 0;
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
1003 F77_INT info = 0;
14144
834df9f10963 remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
1004
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1005 double tol = DBL_EPSILON;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1006
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
1007 do
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1008 {
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1009 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
1010 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
1011 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
1012 workd, workl, lwork, info
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1013 F77_CHAR_ARG_LEN (1)
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1014 F77_CHAR_ARG_LEN (2));
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1015
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1016 if (ido == -1 || ido == 1 || ido == 2)
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1017 {
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1018 double *x = workd + ipntr[0] - 1;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1019 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
1020
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1021 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
1022 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
1023 F77_CHAR_ARG_LEN (1));
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1024 }
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1025 else
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1026 {
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1027 if (info < 0)
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1028 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
1029
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1030 break;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1031 }
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
1032 }
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1033 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
1034
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
1035 F77_INT *sel = new F77_INT [p];
14144
834df9f10963 remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
1036
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1037 // 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
1038 double *dr = new double [k + 1];
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1039 double *di = new double [k + 1];
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1040 double *workev = new double [3 * p];
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1041
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
1042 for (F77_INT 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
1043 dr[i] = di[i] = 0.0;
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1044
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
1045 F77_INT rvec = 1;
14144
834df9f10963 remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
1046
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1047 double sigmar = 0.0;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1048 double sigmai = 0.0;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1049
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1050 // 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
1051 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
1052
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1053 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
1054 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
1055 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
1056 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
1057 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
1058 workl, lwork, info
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1059 F77_CHAR_ARG_LEN (1)
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1060 F77_CHAR_ARG_LEN (1)
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1061 F77_CHAR_ARG_LEN (2));
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1062 }
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1063
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1064 ]], [[
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1065
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1066 for (int i = 0; i < 10; i++)
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1067 doit ();
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1068
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1069 ]])],
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1070 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
1071 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
1072 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
1073 AC_LANG_POP(C++)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1074 ])
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1075 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
1076 $1
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1077 :
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1078 else
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1079 $2
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1080 :
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1081 fi
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1082 ])
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1083 dnl
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1084 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
1085 dnl
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1086 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
1087 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
1088 dnl See bug #52425.
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1089 dnl
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1090 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
1091 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
1092 [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
1093 [save_FFLAGS="$FFLAGS"
0771ce2d30ef build: Fix compiling OCTAVE_ARPACK_OK_2 Fortran code (bug #52425).
Rik <rik@octave.org>
parents: 24289
diff changeset
1094 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
1095 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
1096 AC_RUN_IFELSE([[
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1097 program bug_52425
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1098 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1099 integer maxn, maxnev, maxncv, ldv
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1100 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
1101 $ ldv=maxn )
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1102 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1103 Double precision
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1104 & 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
1105 & 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
1106 & ax(maxn)
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1107 logical select(maxncv)
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1108 integer iparam(11), ipntr(11)
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1109 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1110 character bmat*1, which*2
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1111 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
1112 & nx, nconv, maxitr, mode, ishfts
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1113 logical rvec
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1114 Double precision
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1115 & tol, sigma
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1116 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1117 Double precision
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1118 & zero
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1119 parameter (zero = 0.0D+0)
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1120 c
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1121 Double precision
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1122 & dnrm2
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1123 external dnrm2, daxpy
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1124 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1125 intrinsic abs
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1126 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1127 n = 20
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1128 nev = 4
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1129 ncv = 20
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1130 bmat = 'I'
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1131 which = 'BE'
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1132 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1133 lworkl = ncv*(ncv+8)
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1134 tol = zero
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1135 info = 1
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1136 do j = 1,n
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1137 resid (j) = 1.0d0
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1138 end do
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1139 ido = 0
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1140 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1141 ishfts = 1
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1142 maxitr = 300
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1143 mode = 1
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1144 c
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1145 iparam(1) = ishfts
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1146 iparam(3) = maxitr
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1147 iparam(7) = mode
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1148 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1149 10 continue
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1150 c
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1151 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
1152 & 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
1153 & lworkl, info )
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1154 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1155 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
1156 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
1157 go to 10
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1158 end if
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1159 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1160 if ( info .lt. 0 ) then
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1161 stop 1
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1162 else
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1163 rvec = .false.
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1164 c
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1165 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
1166 & 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
1167 & 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
1168 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1169 if ( ierr .ne. 0) then
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1170 stop 1
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1171 else
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1172 nconv = iparam(5)
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1173 do 20 j=1, nconv
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1174 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
1175 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
1176 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
1177 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
1178 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1179 20 continue
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1180 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1181 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
1182 c
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1183 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
1184 stop 1
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1185 else
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1186 stop 0
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1187 end if
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1188 end if
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1189 end if
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1190 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1191 end
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1192 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1193 subroutine av (n, v, w)
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1194 integer n, j
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1195 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
1196 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1197 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
1198 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
1199 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
1200 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
1201 10 continue
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1202 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
1203 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
1204 return
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1205 end
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1206 ]],
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1207 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
1208 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
1209 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
1210 ## Restore FFLAGS.
0771ce2d30ef build: Fix compiling OCTAVE_ARPACK_OK_2 Fortran code (bug #52425).
Rik <rik@octave.org>
parents: 24289
diff changeset
1211 FFLAGS="$save_FFLAGS"
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1212 AC_LANG_POP(Fortran 77)
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1213 ])
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1214 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
1215 $1
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1216 :
14144
834df9f10963 remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
1217 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
1218 $2
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1219 :
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
1220 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
1221 ])
834df9f10963 remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
1222 dnl
17241
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1223 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
1224 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
1225 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
1226 dnl
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1227 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
1228 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
1229 [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
1230 [AC_LANG_PUSH(C++)
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1231 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
1232 extern "C"
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1233 {
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1234 #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
1235 #include <glpk/glpk.h>
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1236 #else
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1237 #include <glpk.h>
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1238 #endif
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1239 }
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1240 ]], [[
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1241 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
1242 glp_iptcp iptcp;
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1243 glp_init_iptcp (&iptcp);
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1244 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
1245 ]])],
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1246 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
1247 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
1248 AC_LANG_POP(C++)
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1249 ])
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1250 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
1251 $1
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1252 :
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1253 else
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1254 $2
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1255 :
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1256 fi
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1257 ])
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1258 dnl
32049
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1259 dnl Check whether iconv provides the function iconvlist.
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1260 dnl
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1261 AC_DEFUN([OCTAVE_CHECK_ICONVLIST], [
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1262 AC_CACHE_CHECK([whether the function iconvlist is available],
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1263 [octave_cv_iconvlist],
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1264 [ac_octave_save_LIBS="$LIBS"
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1265 LIBS="$LIBICONV $LIBS"
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1266 AC_LANG_PUSH(C++)
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1267 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1268 #if HAVE_ICONV
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1269 extern "C"
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1270 {
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1271 # include <iconv.h>
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1272 }
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1273 #endif
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1274 ]], [[
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1275 iconvlist (
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1276 [] (unsigned int, const char * const *, void *) -> int
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1277 {
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1278 return 0;
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1279 },
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1280 nullptr);
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1281 ]])],
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1282 octave_cv_iconvlist=yes,
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1283 octave_cv_iconvlist=no)
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1284 AC_LANG_POP(C++)
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1285 LIBS="$ac_octave_save_LIBS"
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1286 ])
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1287 if test $octave_cv_iconvlist = yes; then
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1288 AC_DEFINE(HAVE_ICONVLIST, 1, [Define to 1 if iconvlist is available.])
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1289 fi
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1290 ])
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1291 dnl
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1292 dnl Check whether iconv provides the function iconv_canonicalize.
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1293 dnl
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1294 AC_DEFUN([OCTAVE_CHECK_ICONV_CANONICALIZE], [
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1295 AC_CACHE_CHECK([whether the function iconv_canonicalize is available],
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1296 [octave_cv_iconv_canonicalize],
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1297 [ac_octave_save_LIBS="$LIBS"
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1298 LIBS="$LIBICONV $LIBS"
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1299 AC_LANG_PUSH(C++)
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1300 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1301 #if HAVE_ICONV
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1302 extern "C"
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1303 {
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1304 # include <iconv.h>
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1305 }
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1306 #endif
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1307 ]], [[
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1308 iconv_canonicalize ("UTF-8");
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1309 ]])],
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1310 octave_cv_iconv_canonicalize=yes,
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1311 octave_cv_iconv_canonicalize=no)
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1312 AC_LANG_POP(C++)
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1313 LIBS="$ac_octave_save_LIBS"
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1314 ])
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1315 if test $octave_cv_iconv_canonicalize = yes; then
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1316 AC_DEFINE(HAVE_ICONV_CANONICALIZE, 1,
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1317 [Define to 1 if iconv_canonicalize is available.])
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1318 fi
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1319 ])
1c99c8f020f7 gui: Show encodings available with iconv in file editor preferences.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32008
diff changeset
1320 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1321 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
1322 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
1323 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
1324 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1325 AC_DEFUN([OCTAVE_CHECK_LIB_HDF5_DLL], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1326 AC_CACHE_CHECK([if _HDF5USEDLL_ needs to be defined],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1327 [octave_cv_lib_hdf5_dll],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1328 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1329 #include <hdf5.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1330 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1331 hid_t x = H5T_NATIVE_DOUBLE;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1332 return x
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1333 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1334 [octave_cv_lib_hdf5_dll=no],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1335 [save_CFLAGS="$CFLAGS"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1336 CFLAGS="$CFLAGS -DWIN32 -D_HDF5USEDLL_"
31134
b8d37c022e40 acinclude.m4: use same name for temporary LIBS variable throughout all macros.
Rik <rik@octave.org>
parents: 31133
diff changeset
1337 ac_octave_save_LIBS="$LIBS"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1338 LIBS="$HDF5_LIBS $LIBS"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1339 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1340 #include <hdf5.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1341 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1342 hid_t x = H5T_NATIVE_DOUBLE;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1343 return x
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1344 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1345 octave_cv_lib_hdf5_dll=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1346 octave_cv_lib_hdf5_dll=no)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1347 CFLAGS="$save_CFLAGS"
31134
b8d37c022e40 acinclude.m4: use same name for temporary LIBS variable throughout all macros.
Rik <rik@octave.org>
parents: 31133
diff changeset
1348 LIBS="$ac_octave_save_LIBS"
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 ])
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1351 if test $octave_cv_lib_hdf5_dll = yes; then
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1352 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
1353 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1354 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1355 dnl
15133
f91eac1bc66d m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents: 15126
diff changeset
1356 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
1357 dnl
15063
36cbcc37fdb8 Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents: 15013
diff changeset
1358 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
1359 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
1360 dnl
15063
36cbcc37fdb8 Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents: 15013
diff changeset
1361 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
1362 dnl libraries and header files?
7825
13871b7de124 Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 7361
diff changeset
1363 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1364 AC_DEFUN([OCTAVE_CHECK_LIB_OPENGL], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1365 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
1366
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1367 ## On MacOSX systems the OpenGL framework can be used
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1368 OCTAVE_HAVE_FRAMEWORK(OpenGL, [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1369 #include <OpenGL/gl.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1370 #include <OpenGL/glu.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1371 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1372 GLint par; glGetIntegerv (GL_VIEWPORT, &par);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1373 ]],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1374 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
1375
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1376 if test $have_framework_opengl = yes; then
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1377 AC_DEFINE(HAVE_FRAMEWORK_OPENGL, 1,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1378 [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
1379 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
1380 AC_MSG_NOTICE([adding -framework OpenGL to OPENGL_LIBS])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1381 OCTAVE_CHECK_FUNC_GLUTESSCALLBACK_THREEDOTS
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1382 else
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1383 case $canonical_host_type in
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1384 *-*-mingw32* | *-*-msdosmsvc)
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
1385 AC_CHECK_HEADERS([windows.h])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1386 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1387 esac
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1388 have_opengl_incs=no
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1389 AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1390 [AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1391 [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
1392 #if defined (HAVE_WINDOWS_H)
7954
3ffc34caec65 configure fixes
John W. Eaton <jwe@octave.org>
parents: 7945
diff changeset
1393 #include <windows.h>
3ffc34caec65 configure fixes
John W. Eaton <jwe@octave.org>
parents: 7945
diff changeset
1394 #endif
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1395 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1396 break
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1397 ], [], [
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21604
diff changeset
1398 #if defined (HAVE_WINDOWS_H)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1399 # include <windows.h>
7954
3ffc34caec65 configure fixes
John W. Eaton <jwe@octave.org>
parents: 7945
diff changeset
1400 #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
1401 ])
a50228129dba Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents: 8676
diff changeset
1402
17197
fbee0d312af5 acinclude.m4: Remove some unnecessary double quotes around variables.
Rik <rik@octave.org>
parents: 17196
diff changeset
1403 if test $have_opengl_incs = yes; then
18866
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1404 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
1405 #if defined (HAVE_WINDOWS_H)
18866
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1406 # include <windows.h>
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1407 #endif
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1408 #if defined (HAVE_GL_GL_H)
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1409 # include <GL/gl.h>
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1410 #elif defined (HAVE_OPENGL_GL_H)
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1411 # include <OpenGL/gl.h>
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1412 #endif
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1413 ])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1414 case $canonical_host_type in
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1415 *-*-mingw32* | *-*-msdosmsvc)
31134
b8d37c022e40 acinclude.m4: use same name for temporary LIBS variable throughout all macros.
Rik <rik@octave.org>
parents: 31133
diff changeset
1416 ac_octave_save_LIBS="$LIBS"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1417 LIBS="$LIBS -lopengl32"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1418 AC_MSG_CHECKING([for glEnable in -lopengl32])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1419 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1420 #if HAVE_WINDOWS_H
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1421 # include <windows.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1422 #endif
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1423 #if defined (HAVE_GL_GL_H)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1424 # include <GL/gl.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1425 #elif defined (HAVE_OPENGL_GL_H)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1426 # include <OpenGL/gl.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1427 #endif
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
1428 ]], [[
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1429 glEnable(GL_SMOOTH);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1430 ]])], [OPENGL_LIBS="-lopengl32 -lglu32"])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1431
31134
b8d37c022e40 acinclude.m4: use same name for temporary LIBS variable throughout all macros.
Rik <rik@octave.org>
parents: 31133
diff changeset
1432 LIBS="$ac_octave_save_LIBS"
21374
1487a68a496a untangle configuration of OpenGL, FLTK, and Qt (bug #47263)
John W. Eaton <jwe@octave.org>
parents: 21354
diff changeset
1433 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
1434 AC_MSG_RESULT([yes])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1435 else
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
1436 AC_MSG_RESULT([no])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1437 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1438 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1439 *)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1440 ## 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
1441 AC_CHECK_LIB([GL], [glEnable], [OPENGL_LIBS="-lGL -lGLU"])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1442 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1443 esac
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1444 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
1445 fi
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1446 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
1447 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
1448 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
1449 fi
7825
13871b7de124 Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 7361
diff changeset
1450 ])
7834
caab78e7e377 added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents: 7825
diff changeset
1451 dnl
27543
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1452 dnl Check whether PCRE is compiled with --enable-utf.
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1453 dnl
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1454 AC_DEFUN([OCTAVE_CHECK_LIB_PCRE_OK], [
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1455 AC_CACHE_CHECK([whether PCRE library was compiled with UTF support],
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1456 [octave_cv_lib_pcre_ok],
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1457 [AC_LANG_PUSH(C++)
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1458 AC_RUN_IFELSE([AC_LANG_PROGRAM([[
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1459 #include <stdio.h>
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1460 #if defined (HAVE_PCRE_H)
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1461 # include <pcre.h>
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1462 #elif defined (HAVE_PCRE_PCRE_H)
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1463 # include <pcre/pcre.h>
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1464 #endif
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1465 ]], [[
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1466 const char *pattern = "test";
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1467 const char *err;
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1468 int erroffset;
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1469 pcre *data = pcre_compile (pattern, PCRE_UTF8, &err, &erroffset, nullptr);
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1470 return (! data);
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1471 ]])],
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1472 octave_cv_lib_pcre_ok=yes,
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1473 octave_cv_lib_pcre_ok=no,
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1474 octave_cv_lib_pcre_ok=yes)
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1475 AC_LANG_POP(C++)
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1476 ])
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1477 if test $octave_cv_lib_pcre_ok = yes; then
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1478 $1
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1479 :
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1480 else
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1481 $2
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1482 :
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1483 fi
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1484 ])
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1485 dnl
31424
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1486 dnl Check whether PCRE2 is compiled with --enable-utf.
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1487 dnl
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1488 AC_DEFUN([OCTAVE_CHECK_LIB_PCRE2_OK], [
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1489 AC_CACHE_CHECK([whether PCRE2 library was compiled with UTF support],
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1490 [octave_cv_lib_pcre2_ok],
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1491 [AC_LANG_PUSH(C++)
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1492 AC_RUN_IFELSE([AC_LANG_PROGRAM([[
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1493 #include <stdio.h>
31933
c250c30c86a2 acinclude.m4: Correct typo in #define PCRE2_CODE_UNIT_WIDTH.
Rik <rik@octave.org>
parents: 31706
diff changeset
1494 #define PCRE2_CODE_UNIT_WIDTH 8
31424
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1495 #if defined (HAVE_PCRE2_H)
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1496 # include <pcre2.h>
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1497 #elif defined (HAVE_PCRE2_PCRE2_H)
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1498 # include <pcre2/pcre2.h>
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1499 #endif
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1500 ]], [[
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1501 const char *pattern = "test";
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1502 int err;
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1503 PCRE2_SIZE erroffset;
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1504 pcre2_code *data = pcre2_compile ((PCRE2_SPTR) pattern, PCRE2_ZERO_TERMINATED, PCRE2_UTF, &err, &erroffset, nullptr);
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1505 return (! data);
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1506 ]])],
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1507 octave_cv_lib_pcre2_ok=yes,
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1508 octave_cv_lib_pcre2_ok=no,
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1509 octave_cv_lib_pcre2_ok=yes)
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1510 AC_LANG_POP(C++)
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1511 ])
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1512 if test $octave_cv_lib_pcre2_ok = yes; then
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1513 $1
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1514 :
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1515 else
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1516 $2
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1517 :
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1518 fi
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1519 ])
d1165473e4b0 allow Octave to use PCRE2 (bug #61542)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 31415
diff changeset
1520 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1521 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
1522 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1523 AC_DEFUN([OCTAVE_CHECK_LIB_QHULL_OK], [
29629
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1524 AC_CACHE_CHECK([whether the qhull_r library works],
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1525 [octave_cv_lib_qhull_r_ok],
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1526 [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1527 #include <stdio.h>
29629
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1528 #if defined (HAVE_LIBQHULL_R_LIBQHULL_R_H)
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1529 # include <libqhull_r/libqhull_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1530 # include <libqhull_r/qset_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1531 # include <libqhull_r/geom_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1532 # include <libqhull_r/poly_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1533 # include <libqhull_r/io_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1534 #elif defined (HAVE_LIBQHULL_R_H)
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1535 # include <libqhull_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1536 # include <qset_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1537 # include <geom_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1538 # include <poly_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1539 # include <io_r.h>
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1540 #endif
29629
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1541 #if defined (NEED_QHULL_R_VERSION)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1542 char *qh_version = "version";
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1543 #endif
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1544 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1545 int dim = 2;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1546 int n = 4;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1547 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
1548 boolT ismalloc = 0;
29632
162abe58aaef build: Initialize QHull context structure in configure test (bug #60016).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29629
diff changeset
1549 qhT context = { };
29629
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1550 qhT* qh = &context;
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1551 return qh_new_qhull (qh, dim, n, points, ismalloc, "qhull ", 0, stderr);
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1552 ]])],
29629
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1553 octave_cv_lib_qhull_r_ok=yes,
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1554 octave_cv_lib_qhull_r_ok=no,
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1555 octave_cv_lib_qhull_r_ok=yes)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1556 ])
29629
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1557 if test $octave_cv_lib_qhull_r_ok = yes; then
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1558 $1
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1559 :
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1560 else
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1561 $2
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1562 :
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1563 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
1564 ])
20715
5b7643257978 Remove trailing whitespace at end of lines.
Rik <rik@octave.org>
parents: 20420
diff changeset
1565 dnl
20153
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1566 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
1567 dnl
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1568 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
1569 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
1570 [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
1571 [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
1572 #include <sndfile.h>
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1573 ]], [[
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1574 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
1575 ]])],
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1576 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
1577 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
1578 ])
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1579 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
1580 $1
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1581 :
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1582 else
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1583 $2
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1584 :
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1585 fi
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1586 ])
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
1587 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1588 dnl Check whether new API is used with QHelpIndexWidget.
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1589 dnl Under new API, QHelpIndexWidget emits documentActivates.
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1590 dnl Under old API, QHelpIndexWidget emits linkActivated.
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1591 dnl New structure/signal API was introduced in Qt 5.15.
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1592 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1593 dnl FIXME: Delete this entirely when we drop support for Qt 5.14 or older.
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1594 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1595 AC_DEFUN([OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API], [
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1596 AC_CACHE_CHECK([for new QHelpIndexWidget API],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1597 [octave_cv_new_qhelpindexwidget_api],
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1598 [AC_LANG_PUSH(C++)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1599 ac_octave_save_CPPFLAGS="$CPPFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1600 ac_octave_save_CXXFLAGS="$CXXFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1601 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
30447
8a341cf6773d build: Fix possible typo in configure tests.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30243
diff changeset
1602 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1603 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1604 #include <QHelpLink>
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1605 ]], [[
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1606 QHelpLink link;
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1607 ]])],
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1608 octave_cv_new_qhelpindexwidget_api=yes,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1609 octave_cv_new_qhelpindexwidget_api=no)
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1610 CPPFLAGS="$ac_octave_save_CPPFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1611 CXXFLAGS="$ac_octave_save_CXXFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1612 AC_LANG_POP(C++)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1613 ])
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1614 if test $octave_cv_new_qhelpindexwidget_api = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1615 AC_DEFINE(HAVE_NEW_QHELPINDEXWIDGET_API, 1,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1616 [Define to 1 if using new QHelpIndexWidget API.])
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1617 fi
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1618 ])
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1619 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1620 dnl Check for the Qhull version.
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1621 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1622 AC_DEFUN([OCTAVE_CHECK_QHULL_VERSION], [
29629
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1623 AC_CACHE_CHECK([for qh_version in $QHULL_R_LIBS],
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1624 [octave_cv_lib_qhull_r_version],
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1625 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1626 #include <stdio.h>
29629
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1627 #if defined (HAVE_LIBQHULL_R_LIBQHULL_R_H)
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1628 # include <libqhull_r/libqhull_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1629 # include <libqhull_r/qset_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1630 # include <libqhull_r/geom_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1631 # include <libqhull_r/poly_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1632 # include <libqhull_r/io_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1633 #elif defined (HAVE_LIBQHULL_R_H)
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1634 # include <libqhull_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1635 # include <qset_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1636 # include <geom_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1637 # include <poly_r.h>
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1638 # include <io_r.h>
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1639 #endif
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1640 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1641 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
1642 ]])],
29629
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1643 octave_cv_lib_qhull_r_version=yes, octave_cv_lib_qhull_r_version=no)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1644 ])
29629
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1645 if test $octave_cv_lib_qhull_r_version = no; then
93c8df989ea0 qhull: Use reentrant libqhull_r (bug #60016).
Stefan Brüns <stefan.bruens@rwth-aachen.de>
parents: 29588
diff changeset
1646 AC_DEFINE(NEED_QHULL_R_VERSION, 1,
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1647 [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
1648 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1649 ])
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1650 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1651 dnl Check whether the Qt class QRegion has the iterators and related
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1652 dnl functions introduced in Qt 5.8.
29271
0348f3f57e3c avoid build errors with Qt4 (bug #59813)
John W. Eaton <jwe@octave.org>
parents: 29147
diff changeset
1653 dnl
31749
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
1654 dnl FIXME: Delete this entirely when we drop support for Qt 5.7 or older.
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
1655 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1656 AC_DEFUN([OCTAVE_CHECK_QREGION_ITERATORS], [
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1657 AC_CACHE_CHECK([for QRegion iterators and related functions],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1658 [octave_cv_qregion_iterators],
29271
0348f3f57e3c avoid build errors with Qt4 (bug #59813)
John W. Eaton <jwe@octave.org>
parents: 29147
diff changeset
1659 [AC_LANG_PUSH(C++)
0348f3f57e3c avoid build errors with Qt4 (bug #59813)
John W. Eaton <jwe@octave.org>
parents: 29147
diff changeset
1660 ac_octave_save_CPPFLAGS="$CPPFLAGS"
0348f3f57e3c avoid build errors with Qt4 (bug #59813)
John W. Eaton <jwe@octave.org>
parents: 29147
diff changeset
1661 ac_octave_save_CXXFLAGS="$CXXFLAGS"
0348f3f57e3c avoid build errors with Qt4 (bug #59813)
John W. Eaton <jwe@octave.org>
parents: 29147
diff changeset
1662 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
0348f3f57e3c avoid build errors with Qt4 (bug #59813)
John W. Eaton <jwe@octave.org>
parents: 29147
diff changeset
1663 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
0348f3f57e3c avoid build errors with Qt4 (bug #59813)
John W. Eaton <jwe@octave.org>
parents: 29147
diff changeset
1664 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1665 #include <QRegion>
29271
0348f3f57e3c avoid build errors with Qt4 (bug #59813)
John W. Eaton <jwe@octave.org>
parents: 29147
diff changeset
1666 ]], [[
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1667 QRegion region;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1668 QRegion::const_iterator it;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1669 it = region.begin ();
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1670 it = region.end ();
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1671 it = region.cbegin ();
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1672 it = region.cend ();
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1673 QRegion::const_reverse_iterator rit;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1674 rit = region.rbegin ();
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1675 rit = region.rend ();
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1676 rit = region.crbegin ();
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1677 rit = region.crend ();
29271
0348f3f57e3c avoid build errors with Qt4 (bug #59813)
John W. Eaton <jwe@octave.org>
parents: 29147
diff changeset
1678 ]])],
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1679 octave_cv_qregion_iterators=yes,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1680 octave_cv_qregion_iterators=no)
29271
0348f3f57e3c avoid build errors with Qt4 (bug #59813)
John W. Eaton <jwe@octave.org>
parents: 29147
diff changeset
1681 CPPFLAGS="$ac_octave_save_CPPFLAGS"
0348f3f57e3c avoid build errors with Qt4 (bug #59813)
John W. Eaton <jwe@octave.org>
parents: 29147
diff changeset
1682 CXXFLAGS="$ac_octave_save_CXXFLAGS"
0348f3f57e3c avoid build errors with Qt4 (bug #59813)
John W. Eaton <jwe@octave.org>
parents: 29147
diff changeset
1683 AC_LANG_POP(C++)
0348f3f57e3c avoid build errors with Qt4 (bug #59813)
John W. Eaton <jwe@octave.org>
parents: 29147
diff changeset
1684 ])
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1685 if test $octave_cv_qregion_iterators = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1686 AC_DEFINE(HAVE_QREGION_ITERATORS, 1,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1687 [Define to 1 if you have the `QFontMetrics::horizontalAdvance' function.])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1688 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1689 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1690 dnl
22823
e2afee0041bf new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
1691 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
1692 dnl
22823
e2afee0041bf new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
1693 AC_DEFUN([OCTAVE_CHECK_QSCINTILLA], [
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1694 qt_version="$1";
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1695 use_qscintilla=no
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1696 warn_qscintilla=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1697
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1698 ## Check for Qt libraries
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1699 case "$qt_version" in
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1700 5)
23414
a759896c2b53 acinclude.m4: Look for "qscintilla_qt5" as another name for Qt5 scintilla library.
Rik <rik@octave.org>
parents: 23219
diff changeset
1701 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
1702 ;;
32004
c5b57a82a17c build: Initial changes to enable building with Qt6.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31984
diff changeset
1703 6)
c5b57a82a17c build: Initial changes to enable building with Qt6.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31984
diff changeset
1704 octave_qscintilla_libnames="qscintilla2-qt6 qscintilla2_qt6 qt6scintilla2"
c5b57a82a17c build: Initial changes to enable building with Qt6.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31984
diff changeset
1705 ;;
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1706 *)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1707 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
1708 ;;
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1709 esac
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1710
22823
e2afee0041bf new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
1711 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
1712
22286
f394436a4025 build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents: 22257
diff changeset
1713 ## 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
1714 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
1715 [octave_cv_lib_qscintilla],
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1716 [save_CPPFLAGS="$CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1717 save_CXXFLAGS="$CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1718 save_LDFLAGS="$LDFLAGS"
31134
b8d37c022e40 acinclude.m4: use same name for temporary LIBS variable throughout all macros.
Rik <rik@octave.org>
parents: 31133
diff changeset
1719 ac_octave_save_LIBS="$LIBS"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1720 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1721 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1722 LDFLAGS="$QT_LDFLAGS $LDFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1723 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
1724 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
1725 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
1726 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
22456
8924139b4f21 fix test for qscintilla (bug #49018)
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
1727 #include <Qsci/qsciapis.h>
8924139b4f21 fix test for qscintilla (bug #49018)
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
1728 #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
1729 ]], [[
22456
8924139b4f21 fix test for qscintilla (bug #49018)
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
1730 QsciLexer *lexer = new QsciLexerCPP ();
8924139b4f21 fix test for qscintilla (bug #49018)
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
1731 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
1732 ]])],
f394436a4025 build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents: 22257
diff changeset
1733 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
1734 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
1735 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
1736 break
f394436a4025 build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents: 22257
diff changeset
1737 fi
f394436a4025 build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents: 22257
diff changeset
1738 done
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1739 CPPFLAGS="$save_CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1740 CXXFLAGS="$save_CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1741 LDFLAGS="$save_LDFLAGS"
31134
b8d37c022e40 acinclude.m4: use same name for temporary LIBS variable throughout all macros.
Rik <rik@octave.org>
parents: 31133
diff changeset
1742 LIBS="$ac_octave_save_LIBS"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1743 AC_LANG_POP([C++])
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1744 ])
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1745
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1746 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
1747 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
1748 else
22286
f394436a4025 build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents: 22257
diff changeset
1749 ## 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
1750 ## 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
1751 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
1752 OCTAVE_CHECK_QSCINTILLA_VERSION
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1753 AC_DEFINE(HAVE_QSCINTILLA, 1,
22250
2fd4f1a3f4a8 allow building with Qt5 (bug #40252)
John W. Eaton <jwe@octave.org>
parents: 22234
diff changeset
1754 [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
1755
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1756 save_CPPFLAGS="$CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1757 save_CXXFLAGS="$CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1758 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1759 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1760 AC_LANG_PUSH(C++)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1761 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
1762 AC_LANG_POP(C++)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1763 CPPFLAGS="$save_CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1764 CXXFLAGS="$save_CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1765
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1766 use_qscintilla=yes
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1767 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1768 fi
22823
e2afee0041bf new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
1769 ])
e2afee0041bf new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
1770 dnl
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1771 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
1772 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
1773 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
1774 dnl
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1775 AC_DEFUN([OCTAVE_CHECK_QSCINTILLA_VERSION], [
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1776 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
1777 [octave_cv_version_2_6_0],
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1778 [AC_LANG_PUSH(C++)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1779 ac_octave_save_CPPFLAGS="$CPPFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1780 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1781 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1782 #include <Qsci/qsciglobal.h>
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1783 ]], [[
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1784 #if QSCINTILLA_VERSION < 0x020600
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1785 #error Old FindFirst function found.
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1786 #endif
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1787 ]])],
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1788 octave_cv_version_2_6_0=yes,
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1789 octave_cv_version_2_6_0=no)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1790 CPPFLAGS="$ac_octave_save_CPPFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1791 AC_LANG_POP(C++)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1792 ])
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1793 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
1794 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
1795 [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
1796 fi
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1797 ])
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1798 dnl
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1799 dnl OCTAVE_CHECK_QT
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1800 dnl
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1801 AC_DEFUN([OCTAVE_CHECK_QT], [
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1802 octave_qt_versions="$1"
22257
945e7f9c11ff build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents: 22255
diff changeset
1803
945e7f9c11ff build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents: 22255
diff changeset
1804 build_qt_gui=no
945e7f9c11ff build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents: 22255
diff changeset
1805 use_qscintilla=no
945e7f9c11ff build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents: 22255
diff changeset
1806 win32_terminal=no
945e7f9c11ff build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents: 22255
diff changeset
1807
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1808 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
1809 OCTAVE_CHECK_QT_VERSION([$ver])
22250
2fd4f1a3f4a8 allow building with Qt5 (bug #40252)
John W. Eaton <jwe@octave.org>
parents: 22234
diff changeset
1810 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
1811 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
1812 break
25134
5fccb7373bc4 allow configure to continue if some Qt tools are found (bug #53571)
John W. Eaton <jwe@octave.org>
parents: 25119
diff changeset
1813 elif test -n "$QT_MODULES_AVAILABLE"; then
32004
c5b57a82a17c build: Initial changes to enable building with Qt6.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31984
diff changeset
1814 ## If some modules were found for $ver, then warn about possible
c5b57a82a17c build: Initial changes to enable building with Qt6.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31984
diff changeset
1815 ## incomplete or broken Qt installation instead of checking for
c5b57a82a17c build: Initial changes to enable building with Qt6.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31984
diff changeset
1816 ## next version in the list. Don't attempt a similar check for
c5b57a82a17c build: Initial changes to enable building with Qt6.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31984
diff changeset
1817 ## tools here because Qt5 and Qt6 tools may be installed with
c5b57a82a17c build: Initial changes to enable building with Qt6.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31984
diff changeset
1818 ## the same name so determining whether there is a mix of versions
c5b57a82a17c build: Initial changes to enable building with Qt6.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31984
diff changeset
1819 ## will require more work than just looking which tools are installed.
25114
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
1820 warn_qt_modules="Your installation of Qt version $ver appears incomplete or broken in some way. Fix that or use --with-qt=VER to use another version."
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
1821 break
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1822 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1823 done
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1824
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1825 if test $build_qt_gui = yes; then
25097
cc21f66ecb1c display more info in configure summary about Qt version and missing features
John W. Eaton <jwe@octave.org>
parents: 25061
diff changeset
1826 BUILD_QT_SUMMARY_MSG="yes (version: $have_qt_version)"
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1827 if test x"$have_qt_version" = x5; then
24810
8a92f442c4a2 configure.ac: Overhaul file (bug #53186).
Rik <rik@octave.org>
parents: 24798
diff changeset
1828 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
1829 fi
32004
c5b57a82a17c build: Initial changes to enable building with Qt6.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31984
diff changeset
1830 if test x"$have_qt_version" = x6; then
c5b57a82a17c build: Initial changes to enable building with Qt6.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31984
diff changeset
1831 AC_DEFINE(HAVE_QT6, 1, [Define to 1 if using Qt version 6.])
c5b57a82a17c build: Initial changes to enable building with Qt6.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31984
diff changeset
1832 fi
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1833 else
25119
14b9e2a1f3e1 if some Qt tools are instaslled, don't check for another version
John W. Eaton <jwe@octave.org>
parents: 25114
diff changeset
1834 if test -n "$QT_MODULES_MISSING" || test -n "$QT_TOOLS_MISSING"; then
14b9e2a1f3e1 if some Qt tools are instaslled, don't check for another version
John W. Eaton <jwe@octave.org>
parents: 25114
diff changeset
1835 qt_missing=`echo $QT_MODULES_MISSING$QT_TOOLS_MISSING | sed 's/ *$//'`
14b9e2a1f3e1 if some Qt tools are instaslled, don't check for another version
John W. Eaton <jwe@octave.org>
parents: 25114
diff changeset
1836 BUILD_QT_SUMMARY_MSG="no (missing:$qt_missing)"
25097
cc21f66ecb1c display more info in configure summary about Qt version and missing features
John W. Eaton <jwe@octave.org>
parents: 25061
diff changeset
1837 else
cc21f66ecb1c display more info in configure summary about Qt version and missing features
John W. Eaton <jwe@octave.org>
parents: 25061
diff changeset
1838 BUILD_QT_SUMMARY_MSG="no"
cc21f66ecb1c display more info in configure summary about Qt version and missing features
John W. Eaton <jwe@octave.org>
parents: 25061
diff changeset
1839 fi
25114
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
1840 if test -n "$warn_qt_modules"; then
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
1841 OCTAVE_CONFIGURE_WARNING([warn_qt_modules])
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
1842 fi
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1843 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
1844 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
1845 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1846 if test -n "$warn_qt_version"; then
27839
a8c5255c34b1 Announce deprecation of Qt4 and removal in Octave version 7.
Rik <rik@octave.org>
parents: 27543
diff changeset
1847 OCTAVE_CONFIGURE_WARNING([warn_qt_version])
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1848 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1849 if test -n "$warn_qt_tools"; then
27839
a8c5255c34b1 Announce deprecation of Qt4 and removal in Octave version 7.
Rik <rik@octave.org>
parents: 27543
diff changeset
1850 OCTAVE_CONFIGURE_WARNING([warn_qt_tools])
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1851 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1852 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
1853 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
1854 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1855 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
1856 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
1857 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1858 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
1859 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
1860 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1861 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
1862 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
1863 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
1864 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
1865 OCTAVE_CONFIGURE_WARNING([warn_qscintilla])
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1866 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1867 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1868
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1869 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
1870 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
1871 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
1872 ])
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1873 dnl
30005
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1874 dnl Check whether the Qt::ImCursorRectangle enum value exists.
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1875 dnl It replaces the Qt::ImMicroFocus enum value that was deprecated
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1876 dnl in Qt 5.14.
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1877 dnl
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1878 AC_DEFUN([OCTAVE_CHECK_QT_IMCURSORRECTANGLE_ENUM_VALUE], [
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1879 AC_CACHE_CHECK([for Qt::ImCursorRectangle enum value],
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1880 [octave_cv_qt_imcursorrectangle_enum_value],
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1881 [AC_LANG_PUSH(C++)
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1882 ac_octave_save_CPPFLAGS="$CPPFLAGS"
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1883 ac_octave_save_CXXFLAGS="$CXXFLAGS"
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1884 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1885 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1886 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1887 #include <Qt>
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1888 ]], [[
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1889 Qt::InputMethodQuery method_query = Qt::ImCursorRectangle;
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1890 ]])],
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1891 octave_cv_qt_imcursorrectangle_enum_value=yes,
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1892 octave_cv_qt_imcursorrectangle_enum_value=no)
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1893 CPPFLAGS="$ac_octave_save_CPPFLAGS"
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1894 CXXFLAGS="$ac_octave_save_CXXFLAGS"
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1895 AC_LANG_POP(C++)
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1896 ])
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1897 if test $octave_cv_qt_imcursorrectangle_enum_value = yes; then
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1898 AC_DEFINE(HAVE_QT_IMCURSORRECTANGLE_ENUM_VALUE, 1,
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1899 [Define to 1 if you have the `Qt::ImCursorRectangle' enum value.])
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1900 fi
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1901 ])
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
1902 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1903 dnl Check whether the Qt::SplitBehavior enum exists and has
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1904 dnl Qt::KeepEmptyParts and Qt::SkipEmptyParts members. This enum
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1905 dnl was introduced or modified in Qt 5.14.
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1906 dnl
31749
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
1907 dnl FIXME: Delete this entirely when we drop support for Qt 5.13 or older.
0668557b8f30 * acinclude.m4: Update Qt version comments.
John W. Eaton <jwe@octave.org>
parents: 31748
diff changeset
1908 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1909 AC_DEFUN([OCTAVE_CHECK_QT_SPLITBEHAVIOR_ENUM], [
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1910 AC_CACHE_CHECK([for Qt::SplitBehavior enum],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1911 [octave_cv_qt_splitbehavior_enum],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1912 [AC_LANG_PUSH(C++)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1913 ac_octave_save_CPPFLAGS="$CPPFLAGS"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1914 ac_octave_save_CXXFLAGS="$CXXFLAGS"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1915 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1916 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1917 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1918 #include <Qt>
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1919 ]], [[
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1920 Qt::SplitBehavior sb_keep = Qt::KeepEmptyParts;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1921 Qt::SplitBehavior sb_skip = Qt::SkipEmptyParts;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1922 ]])],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1923 octave_cv_qt_splitbehavior_enum=yes,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1924 octave_cv_qt_splitbehavior_enum=no)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1925 CPPFLAGS="$ac_octave_save_CPPFLAGS"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1926 CXXFLAGS="$ac_octave_save_CXXFLAGS"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1927 AC_LANG_POP(C++)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1928 ])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1929 if test $octave_cv_qt_splitbehavior_enum = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1930 AC_DEFINE(HAVE_QT_SPLITBEHAVIOR_ENUM, 1,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1931 [Define to 1 if you have the `Qt::SplitBehavior' enum.])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1932 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1933 ])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
1934 dnl
25135
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1935 dnl OCTAVE_CHECK_QT_TOOL(TOOL)
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1936 dnl
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1937 AC_DEFUN([OCTAVE_CHECK_QT_TOOL], [
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1938 AC_CHECK_TOOLS(m4_toupper([$1])_QTVER, [$1-qt$qt_version])
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1939 if test -z "$m4_toupper([$1])_QTVER"; then
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1940 AC_CHECK_TOOLS(m4_toupper([$1]), [$1])
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1941 if test -n "$m4_toupper([$1])"; then
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1942 if test -n "$QTCHOOSER"; then
29069
c6796a1c35b2 Call Qt helper programs with flags "-qt=VERSION" (bug #59474).
Rik <rik@octave.org>
parents: 29053
diff changeset
1943 m4_toupper([$1])FLAGS="-qt=$qt_version"
25135
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1944 fi
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1945 QT_TOOLS_AVAILABLE="$QT_TOOLS_AVAILABLE $1"
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1946 else
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1947 QT_TOOLS_MISSING="$QT_TOOLS_MISSING $1"
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1948 fi
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1949 else
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1950 m4_toupper([$1])="$m4_toupper([$1])_QTVER"
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1951 QT_TOOLS_AVAILABLE="$QT_TOOLS_AVAILABLE $1"
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1952 fi
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1953 ])
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
1954 dnl
31752
345a3f5890e7 assume QOpenGLWidget is available
John W. Eaton <jwe@octave.org>
parents: 31751
diff changeset
1955 dnl Check whether Qt VERSION is present, supports QScintilla,
345a3f5890e7 assume QOpenGLWidget is available
John W. Eaton <jwe@octave.org>
parents: 31751
diff changeset
1956 dnl and will work for Octave.
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1957 dnl
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1958 dnl OCTAVE_CHECK_QT_VERSION(VERSION)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1959 dnl
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1960 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
1961 QT_CPPFLAGS=
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1962 QT_LDFLAGS=
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1963 QT_LIBS=
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1964
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1965 qt_version="$1";
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 build_qt_gui=yes
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1968 win32_terminal=no
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1969
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1970 warn_qt_libraries=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1971 warn_qt_version=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1972 warn_qt_tools=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1973 warn_qt_setvbuf=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1974 warn_qt_lib_fcns=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1975 warn_qt_abstract_item_model=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1976 warn_qt_opengl=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1977
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1978 ## Check for Qt libraries
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1979 case "$qt_version" in
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1980 5)
31752
345a3f5890e7 assume QOpenGLWidget is available
John W. Eaton <jwe@octave.org>
parents: 31751
diff changeset
1981 QT_MODULES="Qt5Core Qt5Gui Qt5Help Qt5Network Qt5OpenGL Qt5PrintSupport Qt5Xml"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1982 ;;
32004
c5b57a82a17c build: Initial changes to enable building with Qt6.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31984
diff changeset
1983 6)
32051
17a09d2bbe0f gui: Remove usage of QTextCodec from some more places.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32049
diff changeset
1984 QT_MODULES="Qt6Core Qt6Gui Qt6Help Qt6Network Qt6OpenGL Qt6OpenGLWidgets Qt6PrintSupport Qt6Xml"
17a09d2bbe0f gui: Remove usage of QTextCodec from some more places.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32049
diff changeset
1985 case $host_os in
17a09d2bbe0f gui: Remove usage of QTextCodec from some more places.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32049
diff changeset
1986 mingw* | msdosmsvc*)
17a09d2bbe0f gui: Remove usage of QTextCodec from some more places.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32049
diff changeset
1987 ;;
17a09d2bbe0f gui: Remove usage of QTextCodec from some more places.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32049
diff changeset
1988 *)
17a09d2bbe0f gui: Remove usage of QTextCodec from some more places.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32049
diff changeset
1989 # FIXME: Remove Qt6Core5Compat when we no longer rely on classes that
17a09d2bbe0f gui: Remove usage of QTextCodec from some more places.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32049
diff changeset
1990 # have been removed in Qt6:
17a09d2bbe0f gui: Remove usage of QTextCodec from some more places.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32049
diff changeset
1991 # https://www.qt.io/blog/porting-from-qt-5-to-qt-6-using-qt5compat-library
17a09d2bbe0f gui: Remove usage of QTextCodec from some more places.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32049
diff changeset
1992 # It is still needed for the terminal implementation in
17a09d2bbe0f gui: Remove usage of QTextCodec from some more places.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32049
diff changeset
1993 # libgui/qterminal/libqterminal/unix
17a09d2bbe0f gui: Remove usage of QTextCodec from some more places.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32049
diff changeset
1994 QT_MODULES="$QT_MODULES Qt6Core5Compat"
17a09d2bbe0f gui: Remove usage of QTextCodec from some more places.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32049
diff changeset
1995 ;;
17a09d2bbe0f gui: Remove usage of QTextCodec from some more places.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32049
diff changeset
1996 esac
32004
c5b57a82a17c build: Initial changes to enable building with Qt6.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31984
diff changeset
1997 ;;
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1998 *)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1999 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
2000 ;;
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2001 esac
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2002
25114
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2003 ## Use this check to get info in the log file.
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2004 PKG_CHECK_MODULES(QT, [$QT_MODULES],
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2005 [],
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2006 [build_qt_gui=no
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2007 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
2008
25114
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2009 ## Check the modules again individually to get lists of modules that
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2010 ## are available and/or missing
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2011 QT_MODULES_AVAILABLE=
25097
cc21f66ecb1c display more info in configure summary about Qt version and missing features
John W. Eaton <jwe@octave.org>
parents: 25061
diff changeset
2012 QT_MODULES_MISSING=
25114
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2013 for qt_mod in $QT_MODULES; do
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2014 if $PKG_CONFIG --exists $qt_mod; then
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2015 QT_MODULES_AVAILABLE="$QT_MODULES_AVAILABLE $qt_mod"
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2016 else
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2017 QT_MODULES_MISSING="$QT_MODULES_MISSING $qt_mod"
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2018 fi
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2019 done
25097
cc21f66ecb1c display more info in configure summary about Qt version and missing features
John W. Eaton <jwe@octave.org>
parents: 25061
diff changeset
2020
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2021 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
2022 ## 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
2023 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
2024 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
2025 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
2026
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2027 case $host_os in
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2028 *darwin*)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2029 ## Qt might be installed in framework
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2030 if test -z "$QT_LIBS"; then
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2031 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
2032 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
2033 ## 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
2034 ## of the -F flag
29663
5811df727e96 build: Don't try to expand Makefile variable in configure script.
Markus Mützel <markus.muetzel@gmx.de>
parents: 29661
diff changeset
2035 if test -n "$QT_LDFLAGS"; then
5811df727e96 build: Don't try to expand Makefile variable in configure script.
Markus Mützel <markus.muetzel@gmx.de>
parents: 29661
diff changeset
2036 link_all_deps=yes
5811df727e96 build: Don't try to expand Makefile variable in configure script.
Markus Mützel <markus.muetzel@gmx.de>
parents: 29661
diff changeset
2037 fi
5811df727e96 build: Don't try to expand Makefile variable in configure script.
Markus Mützel <markus.muetzel@gmx.de>
parents: 29661
diff changeset
2038 AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS], [test $link_all_deps = yes])
22234
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 ;;
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2041 esac
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2042 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2043
25119
14b9e2a1f3e1 if some Qt tools are instaslled, don't check for another version
John W. Eaton <jwe@octave.org>
parents: 25114
diff changeset
2044 QT_TOOLS_AVAILABLE=
14b9e2a1f3e1 if some Qt tools are instaslled, don't check for another version
John W. Eaton <jwe@octave.org>
parents: 25114
diff changeset
2045 QT_TOOLS_MISSING=
14b9e2a1f3e1 if some Qt tools are instaslled, don't check for another version
John W. Eaton <jwe@octave.org>
parents: 25114
diff changeset
2046
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2047 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
2048 AC_CHECK_TOOLS(QTCHOOSER, [qtchooser])
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2049
25135
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2050 OCTAVE_CHECK_QT_TOOL([moc])
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2051 OCTAVE_CHECK_QT_TOOL([uic])
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2052 OCTAVE_CHECK_QT_TOOL([rcc])
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2053 OCTAVE_CHECK_QT_TOOL([lrelease])
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2054 OCTAVE_CHECK_QT_TOOL([qcollectiongenerator])
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2055 OCTAVE_CHECK_QT_TOOL([qhelpgenerator])
24873
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2056
25119
14b9e2a1f3e1 if some Qt tools are instaslled, don't check for another version
John W. Eaton <jwe@octave.org>
parents: 25114
diff changeset
2057 if test -n "$QT_TOOLS_MISSING"; then
25029
91671d57817e configure: mention qcollectiongenerator and qhelpgenerator in diagnostics (bug #53474)
Mike Miller <mtmiller@octave.org>
parents: 24938
diff changeset
2058 warn_qt_tools="one or more of the Qt utilities moc, uic, rcc, lrelease, qcollectiongenerator, and qhelpgenerator 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
2059 build_qt_gui=no
23154
80a2434ba83c refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents: 23088
diff changeset
2060 MOC_QTVER=
80a2434ba83c refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents: 23088
diff changeset
2061 UIC_QTVER=
80a2434ba83c refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents: 23088
diff changeset
2062 RCC_QTVER=
80a2434ba83c refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents: 23088
diff changeset
2063 LRELEASE_QTVER=
24875
7c7b60dd4d4c Generate Qt compressed help and collection files for the manual (bug #53006)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24873
diff changeset
2064 QCOLLECTIONGENERATOR_QTVER=
24873
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2065 QHELPGENERATOR_QTVER=
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2066 MOCFLAGS=
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2067 UICFLAGS=
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2068 RCCFLAGS=
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2069 LRELEASEFLAGS=
24938
4f1da669b610 build: export and use qcollectiongenerator command line options correctly
Mike Miller <mtmiller@octave.org>
parents: 24890
diff changeset
2070 QCOLLECTIONGENERATORFLAGS=
24873
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2071 QHELPGENERATORFLAGS=
23154
80a2434ba83c refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents: 23088
diff changeset
2072 $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
2073 $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
2074 $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
2075 $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
2076 $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
2077 $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
2078 $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
2079 $as_unset ac_cv_prog_ac_ct_LRELEASE_QTVER
24938
4f1da669b610 build: export and use qcollectiongenerator command line options correctly
Mike Miller <mtmiller@octave.org>
parents: 24890
diff changeset
2080 $as_unset ac_cv_prog_QCOLLECTIONGENERATOR_QTVER
4f1da669b610 build: export and use qcollectiongenerator command line options correctly
Mike Miller <mtmiller@octave.org>
parents: 24890
diff changeset
2081 $as_unset ac_cv_prog_ac_ct_QCOLLECTIONGENERATOR_QTVER
24873
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2082 $as_unset ac_cv_prog_QHELPGENERATOR_QTVER
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2083 $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
2084 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2085 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2086
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2087 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
2088 case $host_os in
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2089 mingw* | msdosmsvc*)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2090 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
2091 [build_qt_gui=no
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2092 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
2093 ;;
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2094 *)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2095 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
2096 AC_SEARCH_LIBS([openpty], [util],
24810
8a92f442c4a2 configure.ac: Overhaul file (bug #53186).
Rik <rik@octave.org>
parents: 24798
diff changeset
2097 [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
2098 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
2099 [build_qt_gui=no
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2100 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
2101 ;;
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2102 esac
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2103 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2104
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2105 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
2106 ## 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
2107 ## 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
2108
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2109 AC_DEFINE(HAVE_QT, 1,
25029
91671d57817e configure: mention qcollectiongenerator and qhelpgenerator in diagnostics (bug #53474)
Mike Miller <mtmiller@octave.org>
parents: 24938
diff changeset
2110 [Define to 1 if Qt is available, with all required functions, libraries, developer header files, and utilities.])
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2111
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2112 AC_LANG_PUSH(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2113 ac_octave_save_CPPFLAGS="$CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2114 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2115 AC_CHECK_HEADERS([QStandardPaths])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2116 CPPFLAGS="$ac_octave_save_CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2117 AC_LANG_POP(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2118
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2119 ## 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
2120 ## 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
2121 ## 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
2122
28846
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
2123 OCTAVE_CHECK_FUNC_QFONTMETRICS_HORIZONTAL_ADVANCE
25061
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
2124 OCTAVE_CHECK_FUNC_QHELPSEARCHQUERYWIDGET_SEARCHINPUT
29034
e3bc897115ed Change feature test to OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API in cset a0ff81c8b8e8.
Rik <rik@octave.org>
parents: 29031
diff changeset
2125 OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API
28835
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
2126 OCTAVE_CHECK_FUNC_QLIST_ITERATOR_CONSTRUCTOR
29053
0678fdb81efc avoid deprecated QHelpEngine::linksForIdentifier function
John W. Eaton <jwe@octave.org>
parents: 29049
diff changeset
2127 OCTAVE_CHECK_FUNC_QHELPENGINE_DOCUMENTSFORIDENTIFIER
29048
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
2128 OCTAVE_CHECK_FUNC_QWHEELEVENT_POSITION
31212
55415fa6a20f svgconvert: Use Lossless encoding of images when available (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 31134
diff changeset
2129 OCTAVE_CHECK_FUNC_QPAINTER_SETRENDERHINT_LOSSLESS
32005
8f9de7cb4e02 Use appropriate type for arguments of Color::getRgbF and QColor::getHslF.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32004
diff changeset
2130 OCTAVE_CHECK_FUNC_QCOLOR_FLOAT_TYPE
32006
5724d89e9244 Use QStreamView if available.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32005
diff changeset
2131 OCTAVE_CHECK_CLASS_QSTRINGVIEW
32008
4d15e1304a48 build: Check for Qt function QTextStream::setEncoding.
Markus Mützel <markus.muetzel@gmx.de>
parents: 32006
diff changeset
2132 OCTAVE_CHECK_FUNC_QTEXTSTREAM_SETENCODING
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2133
28845
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
2134 OCTAVE_CHECK_QREGION_ITERATORS
30005
7677b6184c0b use new Qt::ImCursorRectangle enum value if available
John W. Eaton <jwe@octave.org>
parents: 29949
diff changeset
2135 OCTAVE_CHECK_QT_IMCURSORRECTANGLE_ENUM_VALUE
29049
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
2136 OCTAVE_CHECK_QT_SPLITBEHAVIOR_ENUM
28845
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
2137
22823
e2afee0041bf new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
2138 OCTAVE_CHECK_QSCINTILLA([$qt_version])
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2139
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2140 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2141 AC_SUBST(MOCFLAGS)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2142 AC_SUBST(UICFLAGS)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2143 AC_SUBST(RCCFLAGS)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2144 AC_SUBST(LRELEASEFLAGS)
24938
4f1da669b610 build: export and use qcollectiongenerator command line options correctly
Mike Miller <mtmiller@octave.org>
parents: 24890
diff changeset
2145 AC_SUBST(QCOLLECTIONGENERATORFLAGS)
4f1da669b610 build: export and use qcollectiongenerator command line options correctly
Mike Miller <mtmiller@octave.org>
parents: 24890
diff changeset
2146 AC_SUBST(QHELPGENERATORFLAGS)
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2147 AC_SUBST(QT_CPPFLAGS)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2148 AC_SUBST(QT_LDFLAGS)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2149 AC_SUBST(QT_LIBS)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2150 ])
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2151 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2152 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
2153 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
2154 dnl is already set.
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2155 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2156 AC_DEFUN([OCTAVE_CHECK_SIZEOF_FORTRAN_INTEGER], [
22986
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2157 AC_CACHE_CHECK([default size of Fortran INTEGER],
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2158 [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
2159 [ac_octave_save_FFLAGS="$FFLAGS"
22986
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2160 FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG"
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2161 AC_LANG_PUSH(Fortran 77)
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2162 AC_RUN_IFELSE([AC_LANG_PROGRAM(,[[
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2163 integer*8 n8
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2164 integer n
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2165 c Generate -2**33 + 1.
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2166 n8 = 2
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2167 n8 = -4 * (n8 ** 30)
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2168 n8 = n8 + 1
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2169 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
2170 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
2171 n = n8
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2172 if (n .ne. n8) stop 1
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2173 ]])],
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2174 octave_cv_sizeof_fortran_integer=8,
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2175 octave_cv_sizeof_fortran_integer=4,
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2176 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
2177 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
2178 FFLAGS="$ac_octave_save_FFLAGS"
15141
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 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2181 dnl
26991
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2182 dnl Check whether SUNDIALS libraries provide a compatible interface.
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2183 dnl The current recommended interface was introduced in SUNDIALS version 4.
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2184 dnl The deprecated interface that Octave currently works to be compatible with
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2185 dnl was introduced in SUNDIALS version 3.
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2186 dnl
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2187 AC_DEFUN([OCTAVE_CHECK_SUNDIALS_COMPATIBLE_API], [
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2188 ac_octave_save_LIBS=$LIBS
27013
b37c1656aa42 configure: test all SUNKLU functions after core SUNDIALS features (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26992
diff changeset
2189 LIBS="$SUNDIALS_IDA_LIBS $SUNDIALS_NVECSERIAL_LIBS $LIBS"
26991
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2190 dnl Current API functions present in SUNDIALS version 4
30543
653493339a8a Check for changed API in SUNDIALS version 6.0 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30501
diff changeset
2191 AC_CHECK_FUNCS([IDASetJacFn IDASetLinearSolver SUNLinSol_Dense SUNSparseMatrix_Reallocate SUNContext_Create])
26991
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2192 dnl FIXME: The purpose of the following tests is to detect the deprecated
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2193 dnl API from SUNDIALS version 3, which should only be used if the current
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2194 dnl API tests above failed. For now, always test for ida_direct.h.
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2195 AC_CHECK_HEADERS([ida/ida_direct.h ida_direct.h])
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2196 dnl Each of these is a deprecated analog to the functions listed above.
27013
b37c1656aa42 configure: test all SUNKLU functions after core SUNDIALS features (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26992
diff changeset
2197 AC_CHECK_FUNCS([IDADlsSetJacFn IDADlsSetLinearSolver SUNDenseLinearSolver])
26991
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2198 LIBS=$ac_octave_save_LIBS
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2199 AC_MSG_CHECKING([whether SUNDIALS API provides the necessary functions])
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2200 if test "x$ac_cv_func_IDASetJacFn" = xyes \
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2201 && test "x$ac_cv_func_IDASetLinearSolver" = xyes \
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2202 && test "x$ac_cv_func_SUNLinSol_Dense" = xyes; then
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2203 octave_have_sundials_compatible_api=yes
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2204 elif test "x$ac_cv_func_IDADlsSetJacFn" = xyes \
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2205 && test "x$ac_cv_func_IDADlsSetLinearSolver" = xyes \
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2206 && test "x$ac_cv_func_SUNDenseLinearSolver" = xyes; then
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2207 octave_have_sundials_compatible_api=yes
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2208 else
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2209 octave_have_sundials_compatible_api=no
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2210 fi
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2211 AC_MSG_RESULT([$octave_have_sundials_compatible_api])
30543
653493339a8a Check for changed API in SUNDIALS version 6.0 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30501
diff changeset
2212 if test "x$ac_cv_func_SUNContext_Create" = xyes; then
30547
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2213 AC_DEFINE(HAVE_SUNDIALS_SUNCONTEXT, 1,
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2214 [Define to 1 if SUNDIALS' API is using a SUNContext object.])
30543
653493339a8a Check for changed API in SUNDIALS version 6.0 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30501
diff changeset
2215 fi
26991
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2216 if test $octave_have_sundials_compatible_api = no; then
26992
05f389459461 configure: avoid excessive SUNDIALS warning messages when already disabled
Mike Miller <mtmiller@octave.org>
parents: 26991
diff changeset
2217 warn_sundials_disabled="SUNDIALS libraries do not provide an API that is compatible with Octave. The solvers ode15i and ode15s will be disabled."
05f389459461 configure: avoid excessive SUNDIALS warning messages when already disabled
Mike Miller <mtmiller@octave.org>
parents: 26991
diff changeset
2218 OCTAVE_CONFIGURE_WARNING([warn_sundials_disabled])
26991
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2219 fi
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2220 ])
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2221 dnl
23981
6420142ff32c configure: fix capitalization of SUNDIALS, reword related terms
Mike Miller <mtmiller@octave.org>
parents: 23980
diff changeset
2222 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
2223 dnl precision realtype.
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2224 dnl
23980
eb6602171d59 configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents: 23836
diff changeset
2225 AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SIZEOF_REALTYPE], [
23981
6420142ff32c configure: fix capitalization of SUNDIALS, reword related terms
Mike Miller <mtmiller@octave.org>
parents: 23980
diff changeset
2226 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
2227 [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
2228 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
22899
31bd8a50d44c Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents: 22890
diff changeset
2229 #if defined (HAVE_IDA_IDA_H)
26900
ebe7e12765ba fix sundials configure warnings (bug #55911)
John W. Eaton <jwe@octave.org>
parents: 26898
diff changeset
2230 # include <ida/ida.h>
22899
31bd8a50d44c Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents: 22890
diff changeset
2231 #endif
31bd8a50d44c Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents: 22890
diff changeset
2232 #include <assert.h>
31bd8a50d44c Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents: 22890
diff changeset
2233 ]], [[
23980
eb6602171d59 configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents: 23836
diff changeset
2234 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
2235 "SUNDIALS is not configured for double precision");
22899
31bd8a50d44c Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents: 22890
diff changeset
2236 ]])],
23980
eb6602171d59 configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents: 23836
diff changeset
2237 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
2238 octave_cv_sundials_realtype_is_double=no)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2239 ])
23980
eb6602171d59 configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents: 23836
diff changeset
2240 if test $octave_cv_sundials_realtype_is_double = no; then
26992
05f389459461 configure: avoid excessive SUNDIALS warning messages when already disabled
Mike Miller <mtmiller@octave.org>
parents: 26991
diff changeset
2241 warn_sundials_disabled="SUNDIALS IDA library not configured with double precision realtype. The solvers ode15i and ode15s will be disabled."
05f389459461 configure: avoid excessive SUNDIALS warning messages when already disabled
Mike Miller <mtmiller@octave.org>
parents: 26991
diff changeset
2242 OCTAVE_CONFIGURE_WARNING([warn_sundials_disabled])
23021
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2243 fi
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2244 ])
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2245 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2246 dnl Check whether SUNDIALS IDA library has the SUNLINSOL_DENSE linear solver.
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2247 dnl
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2248 AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SUNLINSOL_DENSE], [
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2249 AC_CHECK_HEADERS([sunlinsol/sunlinsol_dense.h],
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2250 octave_cv_sundials_sunlinsol_dense=yes,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2251 octave_cv_sundials_sunlinsol_dense=no)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2252 ])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2253 if test $octave_cv_sundials_sunlinsol_dense = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2254 AC_DEFINE(HAVE_SUNDIALS_SUNLINSOL_DENSE, 1,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2255 [Define to 1 if SUNDIALS IDA includes the SUNLINSOL_DENSE linear solver.])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2256 else
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2257 warn_sundials_disabled="SUNDIALS IDA library does not include the SUNLINSOL_DENSE linear solver. The solvers ode15i and ode15s will be disabled."
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2258 OCTAVE_CONFIGURE_WARNING([warn_sundials_disabled])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2259 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2260 ])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2261 dnl
26894
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2262 dnl Check whether SUNDIALS IDA library is configured with SUNLINSOL_KLU
23021
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2263 dnl enabled.
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2264 dnl
26894
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2265 AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU], [
26938
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2266 ## Including <sunlinsol/sunlinsol_klu.h> may depend on including klu.h
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2267 ## first. So perform the check as follows using several different
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2268 ## possible locations for klu.h instead of using OCTAVE_CHECK_LIB to
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2269 ## check for sunlinsol_klu.h.
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2270 AC_CHECK_HEADERS([klu.h klu/klu.h suitesparse/klu.h ufsparse/klu.h])
26937
cfa2a65c9fdc fix sunlinsol_klu.h detection with sundials 4.x (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26923
diff changeset
2271 AC_CHECK_HEADERS([sunlinsol/sunlinsol_klu.h], [], [],
26938
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2272 [#if defined (HAVE_KLU_H)
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2273 # include <klu.h>
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2274 #elif defined (HAVE_KLU_KLU_H)
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2275 # include <klu/klu.h>
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2276 #elif defined (HAVE_SUITESPARSE_KLU_H)
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2277 # include <suitesparse/klu.h>
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2278 #elif defined (HAVE_UFSPARSE_KLU_H)
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2279 # include <ufsparse/klu.h>
26937
cfa2a65c9fdc fix sunlinsol_klu.h detection with sundials 4.x (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26923
diff changeset
2280 #endif
cfa2a65c9fdc fix sunlinsol_klu.h detection with sundials 4.x (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26923
diff changeset
2281 ])
30547
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2282 ## Check for current KLU function name first.
26910
075c4d3bf1de use OCTAVE_CHECK_LIB to check for sundials_sunlinsolklu library
John W. Eaton <jwe@octave.org>
parents: 26909
diff changeset
2283 OCTAVE_CHECK_LIB(sundials_sunlinsolklu, SUNLINSOL_KLU, [],
30547
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2284 [], [SUNLinSol_KLU], [],
26992
05f389459461 configure: avoid excessive SUNDIALS warning messages when already disabled
Mike Miller <mtmiller@octave.org>
parents: 26991
diff changeset
2285 [don't use SUNDIALS SUNLINSOL_KLU library, disable ode15i and ode15s sparse Jacobian],
30547
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2286 [AC_CHECK_FUNCS([SUNLinSol_KLU])
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2287 AC_CACHE_CHECK([whether compiling a program that calls SUNLinSol_KLU works],
26910
075c4d3bf1de use OCTAVE_CHECK_LIB to check for sundials_sunlinsolklu library
John W. Eaton <jwe@octave.org>
parents: 26909
diff changeset
2288 [octave_cv_sundials_sunlinsol_klu],
075c4d3bf1de use OCTAVE_CHECK_LIB to check for sundials_sunlinsolklu library
John W. Eaton <jwe@octave.org>
parents: 26909
diff changeset
2289 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
26894
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2290 #if defined (HAVE_IDA_IDA_H)
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2291 #include <ida/ida.h>
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2292 #endif
26895
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2293 #if defined (HAVE_KLU_H)
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2294 #include <klu.h>
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2295 #endif
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2296 #if defined (HAVE_KLU_KLU_H)
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2297 #include <klu/klu.h>
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2298 #endif
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2299 #if defined (HAVE_SUITESPARSE_KLU_H)
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2300 #include <suitesparse/klu.h>
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2301 #endif
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2302 #if defined (HAVE_UFPARSE_KLU_H)
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2303 #include <ufsparse/klu.h>
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2304 #endif
26894
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2305 #if defined (HAVE_SUNLINSOL_SUNLINSOL_KLU_H)
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2306 #include <sunlinsol/sunlinsol_klu.h>
23021
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2307 #endif
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2308 ]], [[
30547
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2309 #if defined (HAVE_SUNCONTEXT_CREATE)
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2310 SUNContext *sunContext;
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2311 if (SUNContext_Create (NULL, sunContext) < 0)
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2312 1/0; // provoke an error
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2313 SUNLinSol_KLU (0, 0, *sunContext);
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2314 SUNContext_Free (sunContext);
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2315 #else
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2316 SUNLinSol_KLU (0, 0);
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2317 #endif
23021
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2318 ]])],
26894
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2319 octave_cv_sundials_sunlinsol_klu=yes,
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2320 octave_cv_sundials_sunlinsol_klu=no)
26910
075c4d3bf1de use OCTAVE_CHECK_LIB to check for sundials_sunlinsolklu library
John W. Eaton <jwe@octave.org>
parents: 26909
diff changeset
2321 ])])
30547
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2322 if test "x$octave_cv_sundials_sunlinsol_klu" = xno; then
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2323 ## Check for deprecated KLU function name second.
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2324 OCTAVE_CHECK_LIB(sundials_sunlinsolklu, SUNLINSOL_KLU, [],
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2325 [], [SUNKLU], [],
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2326 [don't use SUNDIALS SUNLINSOL_KLU library, disable ode15i and ode15s sparse Jacobian],
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2327 [AC_CHECK_FUNCS([SUNKLU])
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2328 AC_CACHE_CHECK([whether compiling a program that calls SUNLinSol_KLU works],
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2329 [octave_cv_sundials_sunlinsol_klu],
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2330 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2331 #if defined (HAVE_IDA_IDA_H)
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2332 #include <ida/ida.h>
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2333 #endif
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2334 #if defined (HAVE_KLU_H)
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2335 #include <klu.h>
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2336 #endif
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2337 #if defined (HAVE_KLU_KLU_H)
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2338 #include <klu/klu.h>
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2339 #endif
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2340 #if defined (HAVE_SUITESPARSE_KLU_H)
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2341 #include <suitesparse/klu.h>
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2342 #endif
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2343 #if defined (HAVE_UFPARSE_KLU_H)
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2344 #include <ufsparse/klu.h>
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2345 #endif
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2346 #if defined (HAVE_SUNLINSOL_SUNLINSOL_KLU_H)
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2347 #include <sunlinsol/sunlinsol_klu.h>
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2348 #endif
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2349 ]], [[
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2350 SUNKLU (0, 0);
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2351 ]])],
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2352 octave_cv_sundials_sunlinsol_klu=yes,
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2353 octave_cv_sundials_sunlinsol_klu=no)
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2354 ])])
b876de975edf __ode15__: Adapt for changed API of SUNDIALS version 6 (bug #61701).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30543
diff changeset
2355 fi
26923
c81b471cdb28 build: avoid test syntax error in sundials configuration (bug #55926)
Mike Miller <mtmiller@octave.org>
parents: 26910
diff changeset
2356 if test "x$ac_cv_header_sunlinsol_sunlinsol_klu_h" = xyes \
c81b471cdb28 build: avoid test syntax error in sundials configuration (bug #55926)
Mike Miller <mtmiller@octave.org>
parents: 26910
diff changeset
2357 && test "x$octave_cv_sundials_sunlinsol_klu" = xyes; then
26894
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2358 AC_DEFINE(HAVE_SUNDIALS_SUNLINSOL_KLU, 1,
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2359 [Define to 1 if SUNDIALS IDA is configured with SUNLINSOL_KLU enabled.])
23021
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2360 else
31324
1c4e017664fd build: Fix typo in warning message about missing SUNLinSol-KLU feature.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31212
diff changeset
2361 warn_sundials_sunlinsol_klu="SUNDIALS IDA library not configured with SUNLINSOL_KLU or sunlinsol_klu.h is not usable. The solvers ode15i and ode15s will not support the sparse Jacobian feature."
26894
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2362 OCTAVE_CONFIGURE_WARNING([warn_sundials_sunlinsol_klu])
22899
31bd8a50d44c Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents: 22890
diff changeset
2363 fi
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2364 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2365 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2366 dnl Like AC_CONFIG_FILES, but don't touch the output file if it already
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2367 dnl exists and hasn't changed.
28938
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2368 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2369 AC_DEFUN([OCTAVE_CONFIG_MOVE_IF_CHANGE_FILES], [
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2370 m4_foreach_w([elt], [$1], [
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2371 AC_CONFIG_FILES(elt[-tmp:]patsubst(elt, [.sh$], [.in.sh]))
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2372 AC_CONFIG_COMMANDS(elt,
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2373 [$SHELL $srcdir/build-aux/move-if-change ]elt[-tmp ]elt)])])
28938
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2374 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2375 dnl Add warning to final summary.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2376 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2377 AC_DEFUN([OCTAVE_CONFIGURE_WARNING], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2378 AC_MSG_WARN([$][$1])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2379 m4_set_add([summary_warning_list], [$1])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2380 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2381 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2382 dnl Print final summary.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2383 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2384 AC_DEFUN([OCTAVE_CONFIGURE_WARNING_SUMMARY], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2385 m4_set_foreach([summary_warning_list], [elt], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2386 if test -n "[$]elt"; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2387 AC_MSG_WARN([$]elt)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2388 warn_msg_printed=true
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2389 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
2390 ])
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
2391 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2392 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
2393 dnl templates defined.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2394 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2395 AC_DEFUN([OCTAVE_CXX_BITWISE_OP_TEMPLATES], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2396 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
2397 [octave_cv_cxx_bitwise_op_templates],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2398 [AC_LANG_PUSH(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2399 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2400 #include <functional>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2401 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2402 int x = 0;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2403 int y = 1;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2404 int z1 = std::bit_and<int>() (x, y);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2405 int z2 = std::bit_or<int>() (x, y);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2406 int z3 = std::bit_xor<int>() (x, y);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2407 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2408 octave_cv_cxx_bitwise_op_templates=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2409 octave_cv_cxx_bitwise_op_templates=no)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2410 AC_LANG_POP(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2411 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2412 if test $octave_cv_cxx_bitwise_op_templates = yes; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2413 AC_DEFINE(HAVE_CXX_BITWISE_OP_TEMPLATES, 1,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2414 [Define to 1 if C++ library has templated bitwise operators.])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2415 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2416 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2417 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2418 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
2419 dnl parts of complex numbers independently via references.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2420 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2421 AC_DEFUN([OCTAVE_CXX_COMPLEX_REFERENCE_ACCESSORS], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2422 AC_CACHE_CHECK([whether complex class can reference components independently],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2423 [octave_cv_cxx_complex_reference_accessors],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2424 [AC_LANG_PUSH(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2425 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2426 #include <complex>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2427 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2428 std::complex<double> x;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2429 x.real () = 1.0;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2430 x.imag () = 1.0;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2431 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2432 octave_cv_cxx_complex_reference_accessors=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2433 octave_cv_cxx_complex_reference_accessors=no)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2434 AC_LANG_POP(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2435 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2436 if test $octave_cv_cxx_complex_reference_accessors = yes; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2437 AC_DEFINE(HAVE_CXX_COMPLEX_REFERENCE_ACCESSORS, 1,
31771
21f9b34eb893 maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents: 31754
diff changeset
2438 [Define to 1 if C++ complex class has T& real () and T& imag () methods.])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2439 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2440 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2441 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2442 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
2443 dnl parts of complex numbers independently.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2444 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2445 AC_DEFUN([OCTAVE_CXX_COMPLEX_SETTERS], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2446 AC_CACHE_CHECK([whether complex class can set components independently],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2447 [octave_cv_cxx_complex_setters],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2448 [AC_LANG_PUSH(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2449 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2450 #include <complex>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2451 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2452 std::complex<double> x;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2453 x.real (1.0);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2454 x.imag (2.0);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2455 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2456 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
2457 AC_LANG_POP(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2458 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2459 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
2460 AC_DEFINE(HAVE_CXX_COMPLEX_SETTERS, 1,
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2461 [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
2462 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2463 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2464 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2465 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
2466 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2467 AC_DEFUN([OCTAVE_CXX_DYNAMIC_AUTO_ARRAYS], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2468 AC_CACHE_CHECK([whether C++ supports dynamic auto arrays],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2469 [octave_cv_cxx_dynamic_auto_arrays],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2470 [AC_LANG_PUSH(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2471 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2472 void test(char *);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2473 int length();
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2474 char x[length()];
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2475 test(x);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2476 ]])],
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
2477 octave_cv_cxx_dynamic_auto_arrays=yes,
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2478 octave_cv_cxx_dynamic_auto_arrays=no)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2479 AC_LANG_POP(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2480 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2481 if test $octave_cv_cxx_dynamic_auto_arrays = yes; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2482 AC_DEFINE(HAVE_DYNAMIC_AUTO_ARRAYS, 1,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2483 [Define to 1 if C++ supports dynamic auto arrays.])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2484 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2485 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2486 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2487 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
2488 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
2489 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
2490 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2491 AC_DEFUN([OCTAVE_CXX_FLAG], [
17661
1978a6c76aa9 Use user-specified SED during build process (bug #40273).
Rik <rik@octave.org>
parents: 17615
diff changeset
2492 ac_safe=`echo "$1" | $SED 'y%./+-:=%__p___%'`
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2493 AC_MSG_CHECKING([whether ${CXX-g++} accepts $1])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2494 AC_CACHE_VAL([octave_cv_cxx_flag_$ac_safe],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2495 [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
2496 ac_octave_save_CXXFLAGS="$CXXFLAGS"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2497 CXXFLAGS="$CXXFLAGS $1"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2498 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2499 eval "octave_cv_cxx_flag_$ac_safe=yes",
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2500 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
2501 CXXFLAGS="$ac_octave_save_CXXFLAGS"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2502 AC_LANG_POP(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2503 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2504 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
2505 AC_MSG_RESULT([yes])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2506 ifelse([$2], ,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2507 [CXXFLAGS="$CXXFLAGS $1"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2508 AC_MSG_RESULT([adding $1 to CXXFLAGS])], [$2])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2509 else
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
2510 AC_MSG_RESULT([no])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2511 ifelse([$3], , , [$3])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2512 fi
10471
bcabc1c4f20c Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents: 10380
diff changeset
2513 ])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2514 dnl
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2515 dnl OCTAVE_DEFINE_MKOCTFILE_DYNAMIC_LINK_OPTIONS
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2516 dnl
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2517 dnl Requires the following variables to already be set:
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2518 dnl
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2519 dnl AR
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2520 dnl CFLAGS
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2521 dnl CXX
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2522 dnl CXXFLAGS
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2523 dnl EXEEXT
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2524 dnl GCC
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2525 dnl GREP
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2526 dnl GXX
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2527 dnl LDFLAGS
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2528 dnl ac_cv_f77_compiler_gnu
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2529 dnl canonical_host_type
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2530 dnl have_msvc
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2531 dnl
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2532 AC_DEFUN_ONCE([OCTAVE_DEFINE_MKOCTFILE_DYNAMIC_LINK_OPTIONS], [
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2533 ### Set system-dependent options for building shared libraries.
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2534 ### These are used by mkoctfile to create dynamically loadable
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2535 ### .oct and .mex files. It would be great if we could somehow
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2536 ### use libtool to get this information.
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2537
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2538 CPICFLAG=-fPIC
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2539 CXXPICFLAG=-fPIC
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2540 FPICFLAG=-fPIC
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2541 SH_LDFLAGS=-shared
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2542 DL_LDFLAGS="${SH_LDFLAGS}"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2543 MKOCTFILE_DL_LDFLAGS="${DL_LDFLAGS}"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2544 NO_OCT_FILE_STRIP=false
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2545 TEMPLATE_AR="${AR}"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2546 TEMPLATE_ARFLAGS="${ARFLAGS}"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2547 library_path_var=LD_LIBRARY_PATH
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2548 ldpreloadsep=" "
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2549 case $canonical_host_type in
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2550 *-*-386bsd* | *-*-netbsd*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2551 SH_LDFLAGS=-Bshareable
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2552 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2553 *-*-openbsd*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2554 SH_LDFLAGS="-shared -fPIC"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2555 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2556 *-*-freebsd*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2557 SH_LDFLAGS="-shared -Wl,-x"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2558 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2559 alpha*-dec-osf*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2560 CPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2561 CXXPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2562 FPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2563 SH_LDFLAGS="-shared -Wl,-expect_unresolved -Wl,'*'"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2564 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2565 *-*-darwin*)
31491
212e9ad58f69 build: Fix building .mex files in build tree on macOS.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31424
diff changeset
2566 dnl Contains variables that are defined and undefined at this point,
212e9ad58f69 build: Fix building .mex files in build tree on macOS.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31424
diff changeset
2567 dnl so use appropriate quoting to defer expansion of
212e9ad58f69 build: Fix building .mex files in build tree on macOS.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31424
diff changeset
2568 dnl ${abs_top_builddir}, ${bindir}, and ${version}.
212e9ad58f69 build: Fix building .mex files in build tree on macOS.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31424
diff changeset
2569 DL_LDFLAGS='-bundle -undefined dynamic_lookup -bind_at_load -bundle_loader ${abs_top_builddir}/src/octave'"${EXEEXT} ${LDFLAGS}"
29588
b4cb9d04f3cf build: Use dynamic symbol lookup for functions in libraries on macOS (bug #53627).
Andrew Janke <andrew@apjanke.net>
parents: 29560
diff changeset
2570 MKOCTFILE_DL_LDFLAGS='-bundle -undefined dynamic_lookup -bind_at_load -bundle_loader ${bindir}/octave-${version}'"${EXEEXT}"
29367
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2571 SH_LDFLAGS="-dynamiclib -single_module ${LDFLAGS}"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2572 case $canonical_host_type in
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2573 powerpc-*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2574 CXXPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2575 CPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2576 FPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2577 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2578 esac
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2579 NO_OCT_FILE_STRIP=true
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2580 library_path_var=DYLD_LIBRARY_PATH
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2581 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2582 *-*-cygwin*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2583 CPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2584 CXXPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2585 FPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2586 DL_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2587 SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-auto-image-base"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2588 ldpreloadsep=":"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2589 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2590 *-*-mingw*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2591 if test $have_msvc = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2592 DL_LDFLAGS="-shared"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2593 CPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2594 CXXPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2595 FPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2596 SH_LDFLAGS="-shared"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2597 if test -n "`echo $CFLAGS | $GREP -e '-g'`" || test -n "`echo $CXXFLAGS | $GREP -e '-g'`"; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2598 DL_LDFLAGS="$DL_LDFLAGS -g"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2599 SH_LDFLAGS="$SH_LDFLAGS -g"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2600 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2601 NO_OCT_FILE_STRIP=true
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2602 library_path_var=PATH
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2603 else
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2604 CPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2605 CXXPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2606 FPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2607 DL_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2608 SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-auto-image-base"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2609 library_path_var=PATH
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2610 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2611 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2612 *-*-msdosmsvc)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2613 DL_LDFLAGS="-shared"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2614 CPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2615 CXXPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2616 FPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2617 SH_LDFLAGS="-shared"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2618 if test -n "`echo $CFLAGS | $GREP -e '-g'`" || test -n "`echo $CXXFLAGS | $GREP -e '-g'`"; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2619 DL_LDFLAGS="$DL_LDFLAGS -g"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2620 SH_LDFLAGS="$SH_LDFLAGS -g"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2621 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2622 NO_OCT_FILE_STRIP=true
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2623 library_path_var=PATH
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2624 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2625 *-*-linux* | *-*-gnu*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2626 MKOCTFILE_DL_LDFLAGS="-shared -Wl,-Bsymbolic"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2627 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2628 i[[3456]]86-*-sco3.2v5*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2629 SH_LDFLAGS=-G
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2630 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2631 rs6000-ibm-aix* | powerpc-ibm-aix*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2632 CPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2633 CXXPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2634 FPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2635 library_path_var=LIBPATH
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2636 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2637 hppa*-hp-hpux*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2638 if test $ac_cv_f77_compiler_gnu = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2639 FPICFLAG=-fPIC
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2640 else
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2641 FPICFLAG=+Z
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2642 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2643 SH_LDFLAGS="-shared -fPIC"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2644 library_path_var=SHLIB_PATH
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2645 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2646 ia64*-hp-hpux*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2647 if test $ac_cv_f77_compiler_gnu = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2648 FPICFLAG=-fPIC
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2649 else
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2650 FPICFLAG=+Z
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2651 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2652 SH_LDFLAGS="-shared -fPIC"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2653 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2654 *-sgi-*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2655 CPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2656 CXXPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2657 FPICFLAG=
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2658 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2659 sparc-sun-sunos4*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2660 if test $ac_cv_f77_compiler_gnu = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2661 FPICFLAG=-fPIC
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2662 else
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2663 FPICFLAG=-PIC
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2664 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2665 SH_LDFLAGS="-assert nodefinitions"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2666 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2667 sparc-sun-solaris2* | i386-pc-solaris2*)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2668 if test $ac_cv_f77_compiler_gnu = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2669 FPICFLAG=-fPIC
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2670 else
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2671 FPICFLAG=-KPIC
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2672 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2673 if test "$GCC" = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2674 CPICFLAG=-fPIC
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2675 else
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2676 CPICFLAG=-KPIC
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2677 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2678 if test "$GXX" = yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2679 CXXPICFLAG=-fPIC
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2680 SH_LDFLAGS=-shared
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2681 else
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2682 CXXPICFLAG=-KPIC
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2683 SH_LDFLAGS=-G
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2684 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2685 ## Template closures in archive libraries need a different mechanism.
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2686 if test "$GXX" != yes; then
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2687 TEMPLATE_AR="${CXX}"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2688 TEMPLATE_ARFLAGS="-xar -o"
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2689 fi
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2690 ;;
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2691 esac
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2692
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2693 AC_MSG_NOTICE([defining FPICFLAG to be $FPICFLAG])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2694 AC_MSG_NOTICE([defining CPICFLAG to be $CPICFLAG])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2695 AC_MSG_NOTICE([defining CXXPICFLAG to be $CXXPICFLAG])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2696 AC_MSG_NOTICE([defining SH_LDFLAGS to be $SH_LDFLAGS])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2697 AC_MSG_NOTICE([defining DL_LDFLAGS to be $DL_LDFLAGS])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2698 AC_MSG_NOTICE([defining MKOCTFILE_DL_LDFLAGS to be $MKOCTFILE_DL_LDFLAGS])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2699 AC_MSG_NOTICE([defining NO_OCT_FILE_STRIP to be $NO_OCT_FILE_STRIP])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2700 AC_MSG_NOTICE([defining TEMPLATE_AR to be $TEMPLATE_AR])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2701 AC_MSG_NOTICE([defining TEMPLATE_ARFLAGS to be $TEMPLATE_ARFLAGS])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2702 AC_MSG_NOTICE([defining library_path_var to be $library_path_var])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2703 AC_SUBST(FPICFLAG)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2704 AC_SUBST(CPICFLAG)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2705 AC_SUBST(CXXPICFLAG)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2706 AC_SUBST(SH_LDFLAGS)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2707 AC_SUBST(DL_LDFLAGS)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2708 AC_SUBST(MKOCTFILE_DL_LDFLAGS)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2709 AC_SUBST(NO_OCT_FILE_STRIP)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2710 AC_SUBST(TEMPLATE_AR)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2711 AC_SUBST(TEMPLATE_ARFLAGS)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2712 AC_SUBST(library_path_var)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2713 AC_SUBST(ldpreloadsep)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2714 AM_SUBST_NOTMAKE(ldpreloadsep)
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2715 ])
8608b7e50720 maint: sort m4 macros alphabetically in acinclude.m4.
Rik <rik@octave.org>
parents: 29366
diff changeset
2716 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2717 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
2718 dnl readline.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2719 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2720 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
2721 USE_READLINE=yes
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
2722 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
2723 [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
2724 [do not use readline library])],
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2725 [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
2726 USE_READLINE=no
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2727 warn_readline="command editing and history features require GNU Readline"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2728 fi])
16068
b309a5da17f5 use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents: 16012
diff changeset
2729 if test $USE_READLINE = yes; then
31415
00e2eafd1c0f build: Use gnulib module to get readline libraries.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31345
diff changeset
2730 gl_FUNC_READLINE
00e2eafd1c0f build: Use gnulib module to get readline libraries.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31345
diff changeset
2731 if test "$gl_cv_lib_readline" != no; then
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2732 AC_DEFINE(USE_READLINE, 1, [Define to 1 to use the readline library.])
31415
00e2eafd1c0f build: Use gnulib module to get readline libraries.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31345
diff changeset
2733 else
00e2eafd1c0f build: Use gnulib module to get readline libraries.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31345
diff changeset
2734 AC_MSG_WARN([I need GNU Readline 4.2 or later])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2735 AC_MSG_ERROR([this is fatal unless you specify --disable-readline])
31415
00e2eafd1c0f build: Use gnulib module to get readline libraries.
Markus Mützel <markus.muetzel@gmx.de>
parents: 31345
diff changeset
2736 fi
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2737 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2738 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2739 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2740 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
2741 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
2742 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
2743 dnl the flag.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2744 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2745 AC_DEFUN([OCTAVE_F77_FLAG], [
17661
1978a6c76aa9 Use user-specified SED during build process (bug #40273).
Rik <rik@octave.org>
parents: 17615
diff changeset
2746 ac_safe=`echo "$1" | $SED 'y%./+-:=%__p___%'`
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2747 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
2748 AC_CACHE_VAL([octave_cv_f77_flag_$ac_safe], [
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2749 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
2750 ac_octave_save_FFLAGS="$FFLAGS"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2751 FFLAGS="$FFLAGS $1"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2752 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2753 eval "octave_cv_f77_flag_$ac_safe=yes",
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2754 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
2755 FFLAGS="$ac_octave_save_FFLAGS"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2756 AC_LANG_POP(Fortran 77)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2757 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2758 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
2759 AC_MSG_RESULT([yes])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2760 ifelse([$2], ,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2761 [FFLAGS="$FFLAGS $1"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2762 AC_MSG_RESULT([adding $1 to FFLAGS])], [$2])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2763 else
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
2764 AC_MSG_RESULT([no])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2765 ifelse([$3], , , [$3])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2766 fi
10471
bcabc1c4f20c Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents: 10380
diff changeset
2767 ])
bcabc1c4f20c Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents: 10380
diff changeset
2768 dnl
8595
dee5d60257e4 Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents: 8169
diff changeset
2769 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
2770 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
2771 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
2772 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
2773 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
2774 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
2775 dnl
9654
a307a6f77fb3 aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents: 9645
diff changeset
2776 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
2777 AC_MSG_CHECKING([whether ${LD-ld} accepts -framework $1])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2778 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
2779 [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
2780 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
2781 AC_LANG_PUSH(C++)
8595
dee5d60257e4 Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents: 8169
diff changeset
2782 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
2783 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
2784 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
2785 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
2786 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
2787 ])
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
2788 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
2789 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
2790 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
2791 [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
2792 [don't use framework $1])],
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2793 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
2794 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
2795 [$4]
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
2796 :
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
2797 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
2798 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
2799 [$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
2800 fi
8595
dee5d60257e4 Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents: 8169
diff changeset
2801 else
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
2802 AC_MSG_RESULT([no])
8595
dee5d60257e4 Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents: 8169
diff changeset
2803 [$5]
dee5d60257e4 Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents: 8169
diff changeset
2804 fi
dee5d60257e4 Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents: 8169
diff changeset
2805 ])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2806 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2807 dnl Check for IEEE 754 data format.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2808 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2809 AC_DEFUN([OCTAVE_IEEE754_DATA_FORMAT], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2810 AC_MSG_CHECKING([for IEEE 754 data format])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2811 AC_CACHE_VAL([octave_cv_ieee754_data_format],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2812 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2813 int
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
2814 main (void)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2815 {
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2816 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
2817
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2818 ieeebytes l = {0x1c, 0xbc, 0x6e, 0xf2, 0x54, 0x8b, 0x11, 0x43};
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2819 ieeebytes b = {0x43, 0x11, 0x8b, 0x54, 0xf2, 0x6e, 0xbc, 0x1c};
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2820
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2821 return l.d != 1234567891234567.0 && b.d != 1234567891234567.0;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2822 }
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2823 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2824 octave_cv_ieee754_data_format=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2825 octave_cv_ieee754_data_format=no,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2826 octave_cv_ieee754_data_format=yes)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2827 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2828 if test "$cross_compiling" = yes; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2829 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
2830 else
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2831 AC_MSG_RESULT([$octave_cv_ieee754_data_format])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2832 fi
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
2833 if test $octave_cv_ieee754_data_format = yes; then
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2834 AC_DEFINE(HAVE_IEEE754_DATA_FORMAT, 1,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2835 [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
2836 else
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2837 ## 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
2838 ## useful system, so we will abort here. Anyone wishing to
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2839 ## experiment with building Octave on a system without IEEE
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2840 ## floating point should be capable of removing this check and
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2841 ## 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
2842 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
2843 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2844 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2845 dnl
29365
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2846 dnl Check if MIPS processor is target and quiet signalling NaN value is
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2847 dnl opposite of IEEE 754-2008 standard used by all other architectures.
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2848 dnl
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2849 AC_DEFUN([OCTAVE_MIPS_NAN], [
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2850 AC_CACHE_CHECK([whether MIPS processor is using non-standard NaN encoding],
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2851 [octave_cv_mips_nan],
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2852 [AC_LANG_PUSH(C++)
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2853 AC_RUN_IFELSE([AC_LANG_PROGRAM([[
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2854 #include <cmath>
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2855 #include <limits>
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2856 ]], [[
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2857 /* FIXME: Only test is that MIPS is the target architecture.
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2858 * This should be AND'ed with a test for whether the actual NaN
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2859 * value for the high word (LO_IEEE_NA_HW) has the value
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2860 * 0x7FF840F4 (normal) or 0x7FF040F4 (non-standard). Template code
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2861 * that could work is in liboctave/utils/lo-ieee.cc but it also
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2862 * depends on knowing whether the architecture is big-endian or
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2863 * little-endian. */
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2864 #if defined (__mips__)
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2865 return (0);
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2866 #else
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2867 return (1);
29366
8224cb664385 maint: merge stable to default.
Rik <rik@octave.org>
parents: 29359 29365
diff changeset
2868 #endif
29365
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2869 ]])],
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2870 octave_cv_mips_nan=yes,
29370
8e549734531e Add default value to OCTAVE_MIPS_NAN configure macro for cross-compiling (bug #59830)
Rik <rik@octave.org>
parents: 29365
diff changeset
2871 octave_cv_mips_nan=no,
29365
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2872 octave_cv_mips_nan=no)
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2873 AC_LANG_POP(C++)
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2874 ])
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2875 if test $octave_cv_mips_nan = yes; then
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2876 AC_DEFINE(HAVE_MIPS_NAN, 1,
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2877 [Define to 1 if MIPS processor is using non-standard NaN encoding.])
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2878 fi
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2879 ])
e9b7ac7031fb Compute with NA correctly on MIPS architecture (bug #59830).
Rik <rik@octave.org>
parents: 29358
diff changeset
2880 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2881 dnl Check for ar.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2882 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2883 AC_DEFUN([OCTAVE_PROG_AR], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2884 if test -z "$AR"; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2885 AR=ar
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2886 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2887 AC_SUBST(AR)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2888
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2889 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
2890 ARFLAGS="cr"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2891 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2892 AC_SUBST(ARFLAGS)
23400
b5ee9b985a82 Silence compile warning about 'u' modifier to ar.
Rik <rik@octave.org>
parents: 23329
diff changeset
2893
23402
1fadf480a63b maint: tweak ARFLAGS and AR_FLAGS defaults and comments
Mike Miller <mtmiller@octave.org>
parents: 23400
diff changeset
2894 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
2895 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
2896 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
2897 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
2898 AR_FLAGS="$ARFLAGS"
23400
b5ee9b985a82 Silence compile warning about 'u' modifier to ar.
Rik <rik@octave.org>
parents: 23329
diff changeset
2899 fi
15141
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 bison.
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_BISON], [
30170
72adc88bc674 modernize bison rules
John W. Eaton <jwe@octave.org>
parents: 30005
diff changeset
2905 dnl FIXME: What is our actual required minimum version for Bison?
72adc88bc674 modernize bison rules
John W. Eaton <jwe@octave.org>
parents: 30005
diff changeset
2906 gl_PROG_BISON([BISON], [3.0])
72adc88bc674 modernize bison rules
John W. Eaton <jwe@octave.org>
parents: 30005
diff changeset
2907 WARN_BISONFLAGS=
16784
0fabe0f49f38 use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents: 16733
diff changeset
2908
30170
72adc88bc674 modernize bison rules
John W. Eaton <jwe@octave.org>
parents: 30005
diff changeset
2909 case "`$BISON --version`" in
17197
fbee0d312af5 acinclude.m4: Remove some unnecessary double quotes around variables.
Rik <rik@octave.org>
parents: 17196
diff changeset
2910 *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
2911 *) 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
2912 esac
0fabe0f49f38 use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents: 16733
diff changeset
2913
17197
fbee0d312af5 acinclude.m4: Remove some unnecessary double quotes around variables.
Rik <rik@octave.org>
parents: 17196
diff changeset
2914 if test $tmp_have_bison = yes; then
30170
72adc88bc674 modernize bison rules
John W. Eaton <jwe@octave.org>
parents: 30005
diff changeset
2915 WARN_BISONFLAGS="-Wno-yacc"
26672
df42ea23502f build: support GNU bison 3.3, silence POSIX compatibility warning (bug #55613)
Mike Miller <mtmiller@octave.org>
parents: 26541
diff changeset
2916
18974
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2917 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
2918 [octave_cv_bison_api_prefix_decl_style], [
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2919 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
2920 quote="quote brace"
18974
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2921 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
2922 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
2923 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
2924 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
2925 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
2926 else
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
2927 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
2928 fi
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
2929 else
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
2930 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
2931 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
2932 else
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
2933 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
2934 fi
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
2935 fi
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
2936 cat << EOF > conftest.yy
18974
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2937 $def
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2938 %start input
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2939 %%
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2940 input:;
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2941 %%
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2942 EOF
19105
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
2943 ## Older versions of bison only warn and exit with success.
30170
72adc88bc674 modernize bison rules
John W. Eaton <jwe@octave.org>
parents: 30005
diff changeset
2944 octave_bison_output=`$BISON $WARN_BISONFLAGS conftest.yy 2>&1`
19105
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
2945 ac_status=$?
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
2946 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
2947 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
2948 break
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
2949 fi
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
2950 done
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
2951 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
2952 break
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2953 fi
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2954 done
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2955 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
2956 ])
29746
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2957
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2958 AC_CACHE_CHECK([whether api.prefix applies to yysymbol_kind_t],
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2959 [octave_cv_bison_api_prefix_applies_to_yysymbol_kind_t], [
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2960 [case "$octave_cv_bison_api_prefix_decl_style" in
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2961 "api brace")
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2962 def='%define api.prefix {PREFIX_}'
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2963 ;;
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2964 "api quote")
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2965 def='%define api.prefix "PREFIX_"'
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2966 ;;
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2967 "name brace")
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2968 def='%define name-prefix {PREFIX_}'
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2969 ;;
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2970 "name quote")
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2971 def='%define name-prefix "PREFIX_"'
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2972 ;;
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2973 esac]
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2974 cat << EOF > conftest.yy
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2975 $def
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2976 %start input
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2977 %%
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2978 input:;
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2979 %%
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2980 EOF
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2981 ## Older versions of bison only warn and exit with success.
30170
72adc88bc674 modernize bison rules
John W. Eaton <jwe@octave.org>
parents: 30005
diff changeset
2982 $BISON $WARN_BISONFLAGS --defines --output conftest.cc conftest.yy
72adc88bc674 modernize bison rules
John W. Eaton <jwe@octave.org>
parents: 30005
diff changeset
2983 if grep PREFIX_symbol_kind_t conftest.cc > /dev/null; then
29746
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2984 octave_cv_bison_api_prefix_applies_to_yysymbol_kind_t=yes
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2985 else
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2986 octave_cv_bison_api_prefix_applies_to_yysymbol_kind_t=no
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2987 fi
30170
72adc88bc674 modernize bison rules
John W. Eaton <jwe@octave.org>
parents: 30005
diff changeset
2988 rm -f conftest.yy y.tab.h conftest.cc
29746
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
2989 ])
18974
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2990 fi
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2991
25637
e1c3d1c6e896 don't substitute api.prefix style in bison input files
John W. Eaton <jwe@octave.org>
parents: 25559
diff changeset
2992 if test -z "$octave_cv_bison_api_prefix_decl_style" \
e1c3d1c6e896 don't substitute api.prefix style in bison input files
John W. Eaton <jwe@octave.org>
parents: 25559
diff changeset
2993 || test "$octave_cv_bison_api_prefix_decl_style" != "api brace"; then
19105
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
2994 tmp_have_bison=no
18974
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2995 warn_bison_api_prefix_decl_style="
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2996
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
2997 I wasn't able to find a suitable style for declaring the api prefix
25637
e1c3d1c6e896 don't substitute api.prefix style in bison input files
John W. Eaton <jwe@octave.org>
parents: 25559
diff changeset
2998 in a bison input file so I'm disabling bison. We expect bison to
e1c3d1c6e896 don't substitute api.prefix style in bison input files
John W. Eaton <jwe@octave.org>
parents: 25559
diff changeset
2999 understand the '%define api.prefix { PREFIX }' syntax.
18974
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3000 "
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3001 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
3002 fi
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3003
17197
fbee0d312af5 acinclude.m4: Remove some unnecessary double quotes around variables.
Rik <rik@octave.org>
parents: 17196
diff changeset
3004 if test $tmp_have_bison = no; then
30170
72adc88bc674 modernize bison rules
John W. Eaton <jwe@octave.org>
parents: 30005
diff changeset
3005 BISON='${top_srcdir}/build-aux/missing bison'
16784
0fabe0f49f38 use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents: 16733
diff changeset
3006 warn_bison="
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3007
19105
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
3008 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
3009 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
3010 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
3011 building from VCS sources.
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3012 "
16784
0fabe0f49f38 use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents: 16733
diff changeset
3013 OCTAVE_CONFIGURE_WARNING([warn_bison])
29746
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
3014
16784
0fabe0f49f38 use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents: 16733
diff changeset
3015 fi
29746
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
3016 if test "$octave_cv_bison_api_prefix_applies_to_yysymbol_kind_t" = no; then
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
3017 OCTAVE_PARSER_CPPFLAGS="-Dyysymbol_kind_t=octave_symbol_kind_t"
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
3018 OCTAVE_TEX_PARSER_CPPFLAGS="-Dyysymbol_kind_t=octave_tex_symbol_kind_t"
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
3019 fi
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
3020 AC_SUBST(OCTAVE_PARSER_CPPFLAGS)
7f339da6cabd avoid possible gcc warning about C++ one definition rule (bug #60586)
John W. Eaton <jwe@octave.org>
parents: 29663
diff changeset
3021 AC_SUBST(OCTAVE_TEX_PARSER_CPPFLAGS)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3022 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3023 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3024 dnl Find find program.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3025 dnl
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
3026 ## Prefer GNU find if found.
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3027 AN_MAKEVAR([FIND], [OCTAVE_PROG_FIND])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3028 AN_PROGRAM([gfind], [OCTAVE_PROG_FIND])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3029 AN_PROGRAM([find], [OCTAVE_PROG_FIND])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3030 AC_DEFUN([OCTAVE_PROG_FIND], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3031 AC_CHECK_PROGS(FIND, [gfind find])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3032 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3033 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3034 dnl Check for flex.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3035 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3036 AC_DEFUN([OCTAVE_PROG_FLEX], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3037 ## 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
3038 ## it, and it might not be installed.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3039 ##
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3040 ## 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
3041 ## using flex.
29661
9e670ec38513 * acinclude.m4 (OCTAVE_PROG_FLEX): Pass noyywrap to AC_PROG_LEX. (bug #60601)
John W. Eaton <jwe@octave.org>
parents: 29647
diff changeset
3042 dnl We declare %noyywrap in the lexer files so we use the noyywrap
9e670ec38513 * acinclude.m4 (OCTAVE_PROG_FLEX): Pass noyywrap to AC_PROG_LEX. (bug #60601)
John W. Eaton <jwe@octave.org>
parents: 29647
diff changeset
3043 dnl option here to skip the search for that function.
9e670ec38513 * acinclude.m4 (OCTAVE_PROG_FLEX): Pass noyywrap to AC_PROG_LEX. (bug #60601)
John W. Eaton <jwe@octave.org>
parents: 29647
diff changeset
3044 AC_PROG_LEX([noyywrap])
16784
0fabe0f49f38 use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents: 16733
diff changeset
3045 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
3046 *flex*)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3047 LFLAGS="-I"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3048 AC_MSG_RESULT([defining LFLAGS to be $LFLAGS])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3049 LEXLIB=
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 *)
25310
0b253ba6eb91 avoid syntax errors in build-aux/subst scripts
John W. Eaton <jwe@octave.org>
parents: 25299
diff changeset
3052 LEX='${top_srcdir}/build-aux/missing flex'
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3053 warn_flex="
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3054
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3055 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
3056 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
3057 "
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3058 OCTAVE_CONFIGURE_WARNING([warn_flex])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3059 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3060 esac
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3061 AC_SUBST(LFLAGS)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3062 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3063 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3064 dnl Check for ghostscript.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3065 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3066 AC_DEFUN([OCTAVE_PROG_GHOSTSCRIPT], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3067 case "$canonical_host_type" in
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3068 *-*-mingw* | *-*-msdosmsvc)
30832
d87406970676 build: Synchronize ghostscript binary names in configure check with .m file usage.
Markus Mützel <markus.muetzel@gmx.de>
parents: 30796
diff changeset
3069 ac_octave_gs_names="gs gswin32c gswin64c mgs"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3070 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3071 *)
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
3072 ac_octave_gs_names="gs"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3073 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3074 esac
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
3075 AC_CHECK_PROGS(GHOSTSCRIPT, [$ac_octave_gs_names])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3076 if test -z "$GHOSTSCRIPT"; then
25310
0b253ba6eb91 avoid syntax errors in build-aux/subst scripts
John W. Eaton <jwe@octave.org>
parents: 25299
diff changeset
3077 GHOSTSCRIPT='${top_srcdir}/build-aux/missing gs'
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3078 warn_ghostscript="
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3079
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3080 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
3081 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
3082 using Octave
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3083 "
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3084 OCTAVE_CONFIGURE_WARNING([warn_ghostscript])
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 AC_SUBST(GHOSTSCRIPT)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3087 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3088 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3089 dnl Check for gnuplot.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3090 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3091 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
3092 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
3093 ac_octave_gp_default="gnuplot"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3094 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
3095 GNUPLOT="$ac_octave_gp_default"
26071
658153e1976d Fix failing BIST tests and oddities when gnuplot is not present (bug #55023).
Rik <rik@octave.org>
parents: 25843
diff changeset
3096 GNUPLOT_BINARY=$GNUPLOT
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3097 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
3098 else
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
3099 AC_CHECK_PROGS(GNUPLOT, [$ac_octave_gp_names])
26071
658153e1976d Fix failing BIST tests and oddities when gnuplot is not present (bug #55023).
Rik <rik@octave.org>
parents: 25843
diff changeset
3100 GNUPLOT_BINARY=$GNUPLOT
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3101 if test -z "$GNUPLOT"; then
26071
658153e1976d Fix failing BIST tests and oddities when gnuplot is not present (bug #55023).
Rik <rik@octave.org>
parents: 25843
diff changeset
3102 GNUPLOT="$ac_octave_gp_default"
658153e1976d Fix failing BIST tests and oddities when gnuplot is not present (bug #55023).
Rik <rik@octave.org>
parents: 25843
diff changeset
3103 GNUPLOT_BINARY=""
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3104 warn_gnuplot="
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3105
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3106 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
3107 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
3108 Octave's plotting commands.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3109 "
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3110 OCTAVE_CONFIGURE_WARNING([warn_gnuplot])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3111 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3112 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3113 AC_SUBST(GNUPLOT)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3114 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3115 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3116 dnl Check for gperf.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3117 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3118 AC_DEFUN([OCTAVE_PROG_GPERF], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3119 AC_CHECK_PROG(GPERF, gperf, gperf, [])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3120 if test -z "$GPERF"; then
25310
0b253ba6eb91 avoid syntax errors in build-aux/subst scripts
John W. Eaton <jwe@octave.org>
parents: 25299
diff changeset
3121 GPERF='${top_srcdir}/build-aux/missing gperf'
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3122 warn_gperf="
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3123
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3124 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
3125 reconstruct oct-gperf.h
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3126 "
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3127 OCTAVE_CONFIGURE_WARNING([warn_gperf])
25310
0b253ba6eb91 avoid syntax errors in build-aux/subst scripts
John W. Eaton <jwe@octave.org>
parents: 25299
diff changeset
3128 GPERF='${top_srcdir}/build-aux/missing gperf'
15141
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 AC_SUBST(GPERF)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3131 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3132 dnl
19744
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3133 dnl Find icotool program.
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3134 dnl
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3135 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
3136 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
3137 if test -z "$ICOTOOL"; then
25310
0b253ba6eb91 avoid syntax errors in build-aux/subst scripts
John W. Eaton <jwe@octave.org>
parents: 25299
diff changeset
3138 ICOTOOL='${top_srcdir}/build-aux/missing icotool'
19753
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3139 warn_icotool="
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3140
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3141 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
3142 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
3143 VCS sources.
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3144 "
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3145 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
3146 fi
19744
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3147 AC_SUBST(ICOTOOL)
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3148 ])
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3149 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3150 dnl Check for makeinfo.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3151 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3152 AC_DEFUN([OCTAVE_PROG_MAKEINFO], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3153 dnl use MKINFO, not MAKEINFO, for variable name because Automake
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3154 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
3155 dnl exist which will then fool the 'test -z' line.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3156 AC_CHECK_PROG(MKINFO, makeinfo, makeinfo, [])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3157 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
3158 warn_makeinfo="
ca37c6023a79 don't abort configure if makeinfo is missing
John W. Eaton <jwe@octave.org>
parents: 15969
diff changeset
3159
ca37c6023a79 don't abort configure if makeinfo is missing
John W. Eaton <jwe@octave.org>
parents: 15969
diff changeset
3160 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
3161 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
3162 "
ca37c6023a79 don't abort configure if makeinfo is missing
John W. Eaton <jwe@octave.org>
parents: 15969
diff changeset
3163 OCTAVE_CONFIGURE_WARNING([warn_makeinfo])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3164 fi
24623
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3165 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
3166 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
3167 if test -n "$MKINFO"; then
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3168 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
3169 [octave_cv_makeinfo_sortas_command],
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3170 [cat << EOF > conftest.texi
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3171 \input texinfo
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3172 @node Top
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3173 @top Document
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3174 @menu
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3175 * Chapter::
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3176 * Index::
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3177 @end menu
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3178 @node Chapter
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3179 @chapter Chapter
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3180 @cindex @sortas{a} foo
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3181 @node Index
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3182 @unnumbered Index
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3183 @printindex cp
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3184 @bye
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3185 EOF
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3186 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
3187 octave_cv_makeinfo_sortas_command=yes
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3188 else
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3189 octave_cv_makeinfo_sortas_command=no
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3190 fi
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3191 rm -f conftest.info conftest.texi
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3192 ])
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3193 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
3194 warn_makeinfo="
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3195
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3196 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
3197 @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
3198 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
3199 "
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3200 OCTAVE_CONFIGURE_WARNING([warn_makeinfo])
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3201 fi
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3202 fi
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3203 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3204 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3205 dnl What pager should we use?
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_DEFUN([OCTAVE_PROG_PAGER], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3208 if test "$cross_compiling" = yes; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3209 DEFAULT_PAGER=less
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3210 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
3211 AC_SUBST(DEFAULT_PAGER)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3212 else
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
3213 ac_octave_possible_pagers="less more page pg"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3214 case "$canonical_host_type" in
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3215 *-*-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
3216 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
3217 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3218 esac
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3219
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
3220 AC_CHECK_PROGS(DEFAULT_PAGER, [$ac_octave_possible_pagers], [])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3221 if test -z "$DEFAULT_PAGER"; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3222 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
3223 OCTAVE_CONFIGURE_WARNING([warn_less])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3224 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3225 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3226 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3227 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3228 dnl Find Perl program.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3229 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3230 AC_DEFUN([OCTAVE_PROG_PERL], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3231 AC_CHECK_PROG(PERL, perl, perl, [])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3232 AC_SUBST(PERL)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3233 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3234 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3235 dnl Find Python program.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3236 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3237 AC_DEFUN([OCTAVE_PROG_PYTHON], [
31130
0c637fa9529a build: Search for python executable with multiple names (bug #62372)
Rik <rik@octave.org>
parents: 31124
diff changeset
3238 AC_CHECK_PROGS(PYTHON, [python3 python], python, [])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3239 AC_SUBST(PYTHON)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3240 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3241 dnl
19744
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3242 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
3243 dnl
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3244 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
3245 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
3246 if test -z "$RSVG_CONVERT"; then
25310
0b253ba6eb91 avoid syntax errors in build-aux/subst scripts
John W. Eaton <jwe@octave.org>
parents: 25299
diff changeset
3247 RSVG_CONVERT='${top_srcdir}/build-aux/missing rsvg-convert'
19753
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3248 warn_rsvg_convert="
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3249
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3250 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
3251 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
3252 from VCS sources.
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3253 "
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3254 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
3255 fi
19744
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3256 AC_SUBST(RSVG_CONVERT)
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3257 ])
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3258 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3259 dnl Find sed program.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3260 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3261 # Check for a fully-functional sed program, that truncates
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3262 # as few characters as possible and that supports "\(X\|Y\)"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3263 # style regular expression alternation. Prefer GNU sed if found.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3264 AC_DEFUN([OCTAVE_PROG_SED], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3265 AC_MSG_CHECKING([for a usable sed])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3266 if test -z "$SED"; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3267 AC_CACHE_VAL([octave_cv_prog_sed],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3268 [# 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
3269 # Next, test potential sed programs in list for truncation.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3270 _AS_PATH_WALK([$PATH],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3271 [for ac_prog in sed gsed; do
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3272 for ac_exec_ext in '' $ac_executable_extensions; do
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3273 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
3274 _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
3275 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3276 done
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3277 done
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3278 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3279 AS_TMPDIR(sed)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3280 _max=0
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3281 _count=0
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3282 # 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
3283 # along with /bin/sed that truncates output.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3284 for _sed in $_sed_list /usr/xpg4/bin/sed; do
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3285 test ! -f ${_sed} && break
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3286 cat /dev/null > "$tmp/sed.in"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3287 _count=0
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3288 echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3289 # Check for GNU sed and select it if it is found.
31344
989ebec75ff0 build: Use Autoconf macro to find egrep executable.
Rik <rik@octave.org>
parents: 30796
diff changeset
3290 if "${_sed}" --version 2>&1 < /dev/null | $EGREP '(GNU)' > /dev/null; then
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3291 octave_cv_prog_sed=${_sed}
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3292 break;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3293 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3294 # Reject if RE alternation is not handled.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3295 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
3296 continue;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3297 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3298 while true; do
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3299 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3300 mv "$tmp/sed.tmp" "$tmp/sed.in"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3301 cp "$tmp/sed.in" "$tmp/sed.nl"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3302 echo >>"$tmp/sed.nl"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3303 ${_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
3304 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3305 # 10000 chars as input seems more than enough
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3306 test $_count -gt 10 && break
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3307 _count=`expr $_count + 1`
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3308 if test $_count -gt $_max; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3309 _max=$_count
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3310 octave_cv_prog_sed=$_sed
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3311 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3312 done
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3313 done
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3314 rm -rf "$tmp"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3315 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3316 SED=$octave_cv_prog_sed
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3317 if test -z "$SED"; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3318 AC_MSG_ERROR([no usable version of sed found])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3319 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3320 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3321 AC_SUBST(SED)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3322 AC_MSG_RESULT([$SED])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3323 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3324 dnl
24077
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3325 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
3326 dnl
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3327 AC_DEFUN([OCTAVE_PROG_TAR_REPRODUCIBLE], [
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3328 AC_MSG_CHECKING([for options to make reproducible archives with GNU tar])
31124
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3329 AC_CACHE_VAL([octave_cv_tar_flags],
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3330 [octave_cv_tar_flags=
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3331 dnl This uses Automake's logic for finding GNU tar under various names
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3332 for octave_tar in tar gnutar gtar :; do
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3333 $octave_tar --version >/dev/null 2>&1 && break
24077
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3334 done
31124
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3335 dnl If we have a valid GNU tar program, see if it supports sets of options
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3336 if test x"$octave_tar" != x:; then
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3337 echo > conftest.txt
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3338 for octave_tar_flag in --owner=0 --group=0 --numeric-owner --sort=name; do
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3339 $octave_tar -cf conftest.tar $octave_cv_tar_flags $octave_tar_flag conftest.txt 2>/dev/null
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3340 if test $? -eq 0; then
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3341 octave_cv_tar_flags="${octave_cv_tar_flags:+$octave_cv_tar_flags }$octave_tar_flag"
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3342 fi
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3343 done
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3344 rm -f conftest.tar conftest.txt
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3345 fi
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3346 ])
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3347
441aa6226223 build: cache REPRODUCIBLE_TAR_FLAGS in configure (bug #62715)
Rik <rik@octave.org>
parents: 31121
diff changeset
3348 REPRODUCIBLE_TAR_FLAGS="$octave_cv_tar_flags"
24077
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3349 AC_SUBST(REPRODUCIBLE_TAR_FLAGS)
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3350 AC_MSG_RESULT([$REPRODUCIBLE_TAR_FLAGS])
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3351 ])
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3352 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3353 dnl Check for texi2dvi.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3354 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3355 AC_DEFUN([OCTAVE_PROG_TEXI2DVI], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3356 AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, [])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3357 if test -z "$TEXI2DVI"; then
25310
0b253ba6eb91 avoid syntax errors in build-aux/subst scripts
John W. Eaton <jwe@octave.org>
parents: 25299
diff changeset
3358 TEXI2DVI='${top_srcdir}/build-aux/missing texi2dvi'
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3359 warn_texi2dvi="
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3360
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3361 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
3362 reconstruct the DVI version of the manual
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3363 "
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3364 OCTAVE_CONFIGURE_WARNING([warn_texi2dvi])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3365 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3366 AC_SUBST(TEXI2DVI)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3367 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3368 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3369 dnl Check for texi2pdf.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3370 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3371 AC_DEFUN([OCTAVE_PROG_TEXI2PDF], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3372 AC_REQUIRE([OCTAVE_PROG_TEXI2DVI])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3373 AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, [])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3374 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
3375 ac_octave_texi2pdf_missing=yes;
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3376 if test -n "$TEXI2DVI"; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3377 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
3378 ac_octave_texi2pdf_missing=no;
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3379 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3380 else
16068
b309a5da17f5 use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents: 16012
diff changeset
3381 ac_octave_texi2pdf_missing=no;
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3382 fi
16068
b309a5da17f5 use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents: 16012
diff changeset
3383 if test $ac_octave_texi2pdf_missing = yes; then
25310
0b253ba6eb91 avoid syntax errors in build-aux/subst scripts
John W. Eaton <jwe@octave.org>
parents: 25299
diff changeset
3384 TEXI2PDF='${top_srcdir}/build-aux/missing texi2pdf'
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3385 warn_texi2pdf="
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3386
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3387 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
3388 reconstruct the PDF version of the manual
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3389 "
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3390 OCTAVE_CONFIGURE_WARNING([warn_texi2pdf])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3391 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3392 AC_SUBST(TEXI2PDF)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3393 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3394 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3395 dnl Set default value for a variable and substitute it.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3396 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3397 AC_DEFUN([OCTAVE_SET_DEFAULT], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3398 ifelse($#, 2, [: ${$1=$2}
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3399 ])dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3400 AC_MSG_RESULT([defining $1 to be $$1])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3401 AC_SUBST($1)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3402 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3403 dnl
15144
9cc337ced51a build: Update OCTAVE_UMFPACK_SEPARATE_SPLIT macro to look for SuiteSparse header file.
Rik <rik@octave.org>
parents: 15141
diff changeset
3404 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
3405 dnl
15144
9cc337ced51a build: Update OCTAVE_UMFPACK_SEPARATE_SPLIT macro to look for SuiteSparse header file.
Rik <rik@octave.org>
parents: 15141
diff changeset
3406 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
3407 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3408 AC_DEFUN([OCTAVE_UMFPACK_SEPARATE_SPLIT], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3409 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
3410 AC_CACHE_VAL([octave_cv_umfpack_separate_split],
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3411 [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
3412 #include <stdint.h>
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3413 #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
3414 #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
3415 #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
3416 # include <suitesparse/umfpack.h>
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3417 #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
3418 # include <umfpack/umfpack.h>
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3419 #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
3420 # include <umfpack.h>
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3421 #endif
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21604
diff changeset
3422 #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
3423 typedef uint64_t idx_type;
eb572251b7c6 check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents: 16313
diff changeset
3424 #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
3425 #else
eb572251b7c6 check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents: 16313
diff changeset
3426 typedef int idx_type;
eb572251b7c6 check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents: 16313
diff changeset
3427 #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
3428 #endif
eb572251b7c6 check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents: 16313
diff changeset
3429 idx_type n = 5;
eb572251b7c6 check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents: 16313
diff changeset
3430 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
3431 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
3432 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
3433 -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
3434 double br[] = {8., 45., -3., 3., 19.};
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3435 double bi[] = {0., 0., 0., 0., 0.};
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3436 int main (void)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3437 {
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3438 double *null = (double *) NULL ;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3439 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
3440 idx_type i ;
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3441 void *Symbolic, *Numeric ;
16318
eb572251b7c6 check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents: 16313
diff changeset
3442 (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
3443 (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
3444 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
3445 (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
3446 Numeric, null, null) ;
16318
eb572251b7c6 check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents: 16313
diff changeset
3447 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
3448 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
3449 if (fabs (*x - i - 1.) > 1.e-13)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3450 return (1);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3451 return (0) ;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3452 }
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3453 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3454 octave_cv_umfpack_separate_split=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3455 octave_cv_umfpack_separate_split=no,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3456 octave_cv_umfpack_separate_split=yes)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3457 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3458 if test "$cross_compiling" = yes; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3459 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
3460 else
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3461 AC_MSG_RESULT([$octave_cv_umfpack_separate_split])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3462 fi
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
3463 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
3464 AC_DEFINE(UMFPACK_SEPARATE_SPLIT, 1,
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3465 [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
3466 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3467 ])