annotate m4/acinclude.m4 @ 29049:461bd8b9ce91 stable

use Qt::SplitBehavior enum and values if available * acinclude.m4 (OCTAVE_CHECK_QT_SPLITBEHAVIOR_ENUM): New macro. (OCTAVE_CHECK_QT_VERSION): Use it. * files-dock-widget.cc (files_dock_widget::display_directory): Use Qt::SkipEmptyParts if available. * documentation.cc (documentation::global_search): Likewise. * octave-qscintilla.cc (octave_qscintilla::contextmenu_run): Likewise. * QTerminal.cc (QTerminal::run_selection): Likewise.
author John W. Eaton <jwe@octave.org>
date Wed, 11 Nov 2020 23:41:06 -0500
parents 440ace36950e
children 0678fdb81efc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1232
5f1bb459e99c [project @ 1995-04-10 05:20:52 by jwe]
jwe
parents:
diff changeset
1 dnl aclocal.m4 -- extra macros for configuring Octave
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
27919
1891570abac8 update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 27918
diff changeset
5 dnl Copyright (C) 1995-2020 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
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
8 dnl or <https://octave.org/copyright/>.
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 27842
diff changeset
9 dnl
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
10 dnl
1232
5f1bb459e99c [project @ 1995-04-10 05:20:52 by jwe]
jwe
parents:
diff changeset
11 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
12 dnl
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24446
diff changeset
13 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
14 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
15 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
16 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
17 dnl
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22509
diff changeset
18 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
19 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22509
diff changeset
20 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22509
diff changeset
21 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
22 dnl
1232
5f1bb459e99c [project @ 1995-04-10 05:20:52 by jwe]
jwe
parents:
diff changeset
23 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
24 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
25 dnl <https://www.gnu.org/licenses/>.
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
26 dnl
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
27 dnl --------------------------------------------------------------------
2813
d45d48b3dcde [project @ 1997-03-13 22:39:15 by jwe]
jwe
parents: 2641
diff changeset
28 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
29 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
30 dnl
4366
ad851d04b396 [project @ 2003-03-05 09:49:18 by jwe]
jwe
parents: 4360
diff changeset
31 dnl
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
32 dnl Figure out the hardware-vendor-os info.
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
33 dnl
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
34 AC_DEFUN([OCTAVE_CANONICAL_HOST], [
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
35 AC_CANONICAL_HOST
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
36 if test -z "$host"; then
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
37 host=unknown-unknown-unknown
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
38 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
39 fi
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
40 canonical_host_type=$host
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
41 AC_SUBST(canonical_host_type)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
42 if test -z "$host_cpu"; then
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
43 host_cpu=unknown
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
44 fi
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
45 if test -z "$host_vendor"; then
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
46 host_vendor=unknown
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
47 fi
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
48 if test -z "$host_os"; then
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
49 host_os=unknown
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
50 fi
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
51 ])
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
52 dnl
15133
f91eac1bc66d m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents: 15126
diff changeset
53 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
54 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
55 AC_DEFUN([OCTAVE_CARBON_CGDISPLAYBITSPERPIXEL], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
56 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
57 [octave_cv_func_carbon_cgdisplaybitsperpixel],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
58 [AC_LANG_PUSH(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
59 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
60 #include <Carbon/Carbon.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
61 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
62 CGDirectDisplayID display = CGMainDisplayID ();
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
63 size_t depth = CGDisplayBitsPerPixel (display);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
64 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
65 octave_cv_func_carbon_cgdisplaybitsperpixel=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
66 octave_cv_func_carbon_cgdisplaybitsperpixel=no)
3888
70ebd3d672a1 [project @ 2002-04-04 01:05:53 by jwe]
jwe
parents: 3887
diff changeset
67 AC_LANG_POP(C++)
3107
a8dcfbf87ea3 [project @ 1997-11-19 22:34:59 by jwe]
jwe
parents: 3089
diff changeset
68 ])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
69 if test $octave_cv_func_carbon_cgdisplaybitsperpixel = yes; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
70 AC_DEFINE(HAVE_CARBON_CGDISPLAYBITSPERPIXEL, 1,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
71 [Define to 1 if Carbon Framework has CGDisplayBitsPerPixel.])
3107
a8dcfbf87ea3 [project @ 1997-11-19 22:34:59 by jwe]
jwe
parents: 3089
diff changeset
72 fi
a8dcfbf87ea3 [project @ 1997-11-19 22:34:59 by jwe]
jwe
parents: 3089
diff changeset
73 ])
3126
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
74 dnl
15133
f91eac1bc66d m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents: 15126
diff changeset
75 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
76 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
77 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
78 dnl
9654
a307a6f77fb3 aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents: 9645
diff changeset
79 AC_DEFUN([OCTAVE_CC_FLAG], [
17661
1978a6c76aa9 Use user-specified SED during build process (bug #40273).
Rik <rik@octave.org>
parents: 17615
diff changeset
80 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
81 AC_MSG_CHECKING([whether ${CC-cc} accepts $1])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
82 AC_CACHE_VAL([octave_cv_cc_flag_$ac_safe],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
83 [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
84 ac_octave_save_CFLAGS="$CFLAGS"
3126
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
85 CFLAGS="$CFLAGS $1"
5177
86fa011d6404 [project @ 2005-03-03 00:32:34 by jwe]
jwe
parents: 5094
diff changeset
86 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
87 [eval "octave_cv_cc_flag_$ac_safe=yes"],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
88 [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
89 CFLAGS="$ac_octave_save_CFLAGS"
3888
70ebd3d672a1 [project @ 2002-04-04 01:05:53 by jwe]
jwe
parents: 3887
diff changeset
90 AC_LANG_POP(C)
3126
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
91 ])
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
92 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
93 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
94 ifelse([$2], ,
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
95 [CFLAGS="$CFLAGS $1"
3131
9c5160c83bd2 [project @ 1998-01-29 04:46:33 by jwe]
jwe
parents: 3130
diff changeset
96 AC_MSG_RESULT([adding $1 to CFLAGS])], [$2])
3126
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
97 else
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
98 AC_MSG_RESULT([no])
3126
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
99 ifelse([$3], , , [$3])
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
100 fi
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
101 ])
0f6ec7b761a6 [project @ 1998-01-16 05:15:43 by jwe]
jwe
parents: 3107
diff changeset
102 dnl
17965
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
103 dnl Check for broken stl_algo.h header file in gcc versions 4.8.0, 4.8.1, 4.8.2
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
104 dnl which leads to failures in nth_element.
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
105 dnl
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
106 AC_DEFUN([OCTAVE_CHECK_BROKEN_STL_ALGO_H], [
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
107 AC_CACHE_CHECK([whether stl_algo.h is broken],
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
108 [octave_cv_broken_stl_algo_h],
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
109 [AC_LANG_PUSH(C++)
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
110 AC_RUN_IFELSE([AC_LANG_PROGRAM([[
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
111 // Based on code from a GCC test program.
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
112
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
113 // Copyright (C) 2013 Free Software Foundation, Inc.
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
114 //
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
115 // This file is part of the GNU ISO C++ Library. This library is free
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
116 // software; you can redistribute it and/or modify it under the
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
117 // terms of the GNU General Public License as published by the
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
118 // Free Software Foundation; either version 3, or (at your option)
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
119 // any later version.
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
120
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
121 // This library is distributed in the hope that it will be useful,
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
122 // but WITHOUT ANY WARRANTY; without even the implied warranty of
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
123 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
124 // GNU General Public License for more details.
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
125
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
126 // You should have received a copy of the GNU General Public License along
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
127 // with this library; see the file COPYING3. If not see
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24446
diff changeset
128 // <https://www.gnu.org/licenses/>.
17965
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
129
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
130 // 25.3.2 [lib.alg.nth.element]
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
131
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
132 // { dg-options "-std=gnu++11" }
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
133
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
134 #include <algorithm>
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
135 #include <vector>
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
136 ]], [[
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
137 std::vector<int> v (7);
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
138
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
139 v[0] = 207089;
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
140 v[1] = 202585;
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
141 v[2] = 180067;
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
142 v[3] = 157549;
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
143 v[4] = 211592;
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
144 v[5] = 216096;
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
145 v[6] = 207089;
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
146
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
147 std::nth_element (v.begin (), v.begin () + 3, v.end ());
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
148
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
149 return v[3] == 207089 ? 0 : 1;
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
150 ]])],
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
151 octave_cv_broken_stl_algo_h=no,
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
152 octave_cv_broken_stl_algo_h=yes,
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
153 [case "$GXX_VERSION" in
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
154 *4.8.2*)
17967
303157af491f acinclude.m4: Fix undefined value in macro CHECK_BROKEN_STL_ALGO_H when cross-compiling.
Rik <rik@octave.org>
parents: 17965
diff changeset
155 octave_cv_broken_stl_algo_h=yes
303157af491f acinclude.m4: Fix undefined value in macro CHECK_BROKEN_STL_ALGO_H when cross-compiling.
Rik <rik@octave.org>
parents: 17965
diff changeset
156 ;;
303157af491f acinclude.m4: Fix undefined value in macro CHECK_BROKEN_STL_ALGO_H when cross-compiling.
Rik <rik@octave.org>
parents: 17965
diff changeset
157 *)
303157af491f acinclude.m4: Fix undefined value in macro CHECK_BROKEN_STL_ALGO_H when cross-compiling.
Rik <rik@octave.org>
parents: 17965
diff changeset
158 octave_cv_broken_stl_algo_h=no
17965
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
159 ;;
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
160 esac
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
161 ])
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
162 AC_LANG_POP(C++)
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
163 ])
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
164 if test "$GXX" = yes; then
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
165 if test $octave_cv_broken_stl_algo_h = yes; then
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
166 case "$GXX_VERSION" in
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
167 4.8.[[012]])
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
168 ;;
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
169 *)
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
170 octave_cv_broken_stl_algo_h=no
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
171 warn_stl_algo_h="UNEXPECTED: found nth_element broken in g++ $GXX_VERSION. Refusing to fix except for g++ 4.8.0, 4.8.1, or 4.8.2. You appear to have g++ $GXX_VERSION."
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
172 OCTAVE_CONFIGURE_WARNING([warn_stl_algo_h])
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
173 ;;
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
174 esac
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
175 else
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
176 case "$GXX_VERSION" in
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
177 4.8.2)
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
178 warn_stl_algo_h="UNEXPECTED: found nth_element working in g++ 4.8.2. Has it been patched on your system?"
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
179 OCTAVE_CONFIGURE_WARNING([warn_stl_algo_h])
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
180 ;;
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
181 esac
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
182 fi
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
183 else
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
184 octave_cv_broken_stl_algo_h=no
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
185 warn_stl_algo_h="UNEXPECTED: nth_element test failed. Refusing to fix except for g++ 4.8.2."
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
186 OCTAVE_CONFIGURE_WARNING([warn_stl_algo_h])
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
187 fi
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
188 ])
1d58abc740c0 acinclude.m4: Place new macro CHECK_BROKEN_STL_ALGO_H in alphabetical ordering.
Rik <rik@octave.org>
parents: 17888
diff changeset
189 dnl
28527
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
190 dnl Check if pthread stack size accounts for thread-local storage.
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
191 dnl
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
192 dnl This program should succeed if the pthread library allocates memory
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
193 dnl for thread-local (__thread) variables independently of the
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
194 dnl requested thread stack size.
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
195 dnl
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
196 dnl It will fail if (as in the current version of glibc) the storage
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
197 dnl for thread-local variables is subtracted from the memory allocated
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
198 dnl for the thread stack. (This can cause problems for Java and for
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
199 dnl other libraries.)
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
200 dnl
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
201 dnl This bug is tracked in glibc at:
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
202 dnl https://sourceware.org/bugzilla/show_bug.cgi?id=11787
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
203 dnl
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
204 AC_DEFUN([OCTAVE_CHECK_BROKEN_PTHREAD_STACKSIZE], [
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
205 AC_CACHE_CHECK([whether pthread stack size does not account for thread-local storage],
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
206 [octave_cv_broken_pthread_stacksize],
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
207 [AC_LANG_PUSH(C)
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
208 AC_RUN_IFELSE([AC_LANG_PROGRAM([[
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
209 #include <stdio.h>
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
210 #include <string.h>
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
211 #include <pthread.h>
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
212
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
213 static char __thread data[100 * 1024];
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
214
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
215 static void * threadfunc(void *arg)
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
216 {
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
217 return data;
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
218 }
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
219 ]], [[
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
220 pthread_attr_t attr;
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
221 pthread_t thread;
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
222 int errnum;
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
223
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
224 pthread_attr_init (&attr);
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
225 errnum = pthread_attr_setstacksize (&attr, 64 * 1024);
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
226 if (errnum != 0)
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
227 {
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
228 fprintf (stderr, "pthread_attr_setstacksize: %s\n", strerror(errnum));
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
229 return 1;
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
230 }
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
231 errnum = pthread_create (&thread, &attr, &threadfunc, NULL);
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
232 if (errnum != 0)
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
233 {
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
234 fprintf (stderr, "pthread_create: %s\n", strerror(errnum));
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
235 return 1;
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
236 }
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
237 errnum = pthread_join (thread, NULL);
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
238 if (errnum != 0)
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
239 {
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
240 fprintf (stderr, "pthread_join: %s\n", strerror(errnum));
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
241 return 1;
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
242 }
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
243
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
244 pthread_attr_destroy (&attr);
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
245 return 0;
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
246 ]])],
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
247 octave_cv_broken_pthread_stacksize=no,
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
248 octave_cv_broken_pthread_stacksize=yes,
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
249 octave_cv_broken_pthread_stacksize=no)
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
250 AC_LANG_POP(C)
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
251 ])
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
252 if test $octave_cv_broken_pthread_stacksize = yes; then
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
253 AC_DEFINE(HAVE_BROKEN_PTHREAD_STACKSIZE, 1,
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
254 [Define to 1 if pthread stack size does not account for thread-local storage.])
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
255 fi
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
256 ])
9e7b2625e574 ov-java.cc: Set reaper thread to use default stack size (bug #58641).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27957
diff changeset
257 dnl
21160
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
258 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
259 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
260 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
261 dnl
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
262 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
263 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
264 [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
265 [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
266 CPPFLAGS="$CXSPARSE_CPPFLAGS $CPPFLAGS"
21160
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
267 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
268 #if defined (HAVE_SUITESPARSE_CS_H)
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
269 #include <suitesparse/cs.h>
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
270 #elif defined (HAVE_UFSPARSE_CS_H)
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
271 #include <ufsparse/cs.h>
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
272 #elif defined (HAVE_CXSPARSE_CS_H)
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
273 #include <cxsparse/cs.h>
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
274 #elif defined (HAVE_CS_H)
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
275 #include <cs.h>
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
276 #endif
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
277 ]], [[
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
278 #if (defined (HAVE_CXSPARSE) \
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
279 && (! defined (CS_VER) \
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
280 || CS_VER < 2 \
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
281 || (CS_VER == 2 && CS_SUBVER < 2)))
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
282 #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
283 #endif
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
284 ]])],
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
285 octave_cv_cxsparse_version_ok=yes,
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
286 octave_cv_cxsparse_version_ok=no)
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
287 CPPFLAGS="$ac_octave_save_CPPFLAGS"
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
288 ])
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
289 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
290 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
291 [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
292 fi
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
293 ])
b5b531ba93ce build: Use configure-time test to check CXSparse version.
Rik <rik@octave.org>
parents: 21150
diff changeset
294 dnl
15969
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
295 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
296 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
297 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
298 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
299 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
300 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
301 dnl ahead of the main FFTW library.
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
302 dnl
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
303 AC_DEFUN([OCTAVE_CHECK_FFTW_THREADS], [
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
304 ac_octave_save_CPPFLAGS="$CPPFLAGS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
305 ac_octave_save_LDFLAGS="$LDFLAGS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
306 ac_octave_save_LIBS="$LIBS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
307 CPPFLAGS="$m4_toupper([$1])_CPPFLAGS $CPPFLAGS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
308 LDFLAGS="$m4_toupper([$1])_LDFLAGS $LDFLAGS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
309 LIBS="$m4_toupper([$1])_LIBS $LIBS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
310 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
311 [octave_cv_[$1]_threads_lib],
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
312 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
313 #include <fftw3.h>
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
314 ]], [[
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
315 $2 (2);
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
316 ]])],
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
317 [octave_cv_[$1]_threads_lib=yes],
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
318 [LIBS="-l[$1]_threads $LIBS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
319 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
320 #include <fftw3.h>
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
321 ]], [[
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
322 $2 (2);
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
323 ]])],
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
324 [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
325 [octave_cv_[$1]_threads_lib=no])
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 ])
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
328 case $octave_cv_[$1]_threads_lib in
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
329 -l*)
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
330 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
331 ;;
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
332 no)
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
333 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
334 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
335 ;;
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
336 esac
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
337 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
338 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
339 [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
340 fi
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
341 CPPFLAGS="$ac_octave_save_CPPFLAGS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
342 LDFLAGS="$ac_octave_save_LDFLAGS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
343 LIBS="$ac_octave_save_LIBS"
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
344 ])
139f4b19a3ac build: Improve detection of FFTW multi-threading
Mike Miller <mtmiller@ieee.org>
parents: 15863
diff changeset
345 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
346 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
347 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
348 AC_DEFUN([OCTAVE_CHECK_FUNC_GLUTESSCALLBACK_THREEDOTS], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
349 AC_CACHE_CHECK([whether gluTessCallback is called with "(...)"],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
350 [octave_cv_func_glutesscallback_threedots],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
351 [AC_LANG_PUSH(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
352 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
353 #if defined (HAVE_GL_GLU_H)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
354 # include <GL/glu.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
355 #elif defined HAVE_OPENGL_GLU_H || defined HAVE_FRAMEWORK_OPENGL
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
356 # include <OpenGL/glu.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
357 #endif
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
358 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
359 GLvoid (*func)(...);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
360 gluTessCallback(0, 0, func);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
361 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
362 octave_cv_func_glutesscallback_threedots=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
363 octave_cv_func_glutesscallback_threedots=no)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
364 AC_LANG_POP(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
365 ])
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
366 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
367 AC_DEFINE(HAVE_GLUTESSCALLBACK_THREEDOTS, 1,
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
368 [Define to 1 if gluTessCallback is called with (...).])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
369 fi
9596
f26229391ea1 configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents: 9577
diff changeset
370 ])
f26229391ea1 configure.in, aclocal.m4: check fortran integer size
John W. Eaton <jwe@octave.org>
parents: 9577
diff changeset
371 dnl
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
372 dnl Check whether the Qt class QAbstractItemModel exists and has the
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
373 dnl beginResetModel and endResetModel member functions. These member
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
374 dnl functions were introduced in Qt 4.6.
18973
625e3bb65885 don't require Qt 4.7 (bug #42657)
John W. Eaton <jwe@octave.org>
parents: 18141
diff changeset
375 dnl
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
376 dnl FIXME: Delete this entirely when we can safely assume that Qt 4.6 or later
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
377 dnl is in use everywhere, or when we drop support for Qt 4.
17111
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
378 dnl
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
379 AC_DEFUN([OCTAVE_CHECK_FUNC_QABSTRACTITEMMODEL_BEGINRESETMODEL], [
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
380 AC_CACHE_CHECK([for QAbstractItemModel::beginResetModel in <QAbstractItemModel>],
17111
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
381 [octave_cv_func_qabstractitemmodel_beginresetmodel],
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
382 [AC_LANG_PUSH(C++)
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
383 ac_octave_save_CPPFLAGS="$CPPFLAGS"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
384 ac_octave_save_CXXFLAGS="$CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
385 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
386 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
17111
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
387 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
388 #include <QAbstractItemModel>
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
389 class item_model : public QAbstractItemModel
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
390 {
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
391 public:
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
392 item_model (QObject *parent = 0) : QAbstractItemModel (parent) {}
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
393 ~item_model () {}
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
394 QModelIndex index (int, int, const QModelIndex& m) const { return m; }
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
395 QModelIndex parent (const QModelIndex& m) const { return m; }
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
396 int columnCount (const QModelIndex&) const { return 0; }
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
397 int rowCount (const QModelIndex&) const { return 0; }
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
398 QVariant data (const QModelIndex&, int) const { return QVariant(); }
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
399 void update_model ()
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
400 {
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
401 this->beginResetModel ();
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
402 this->endResetModel ();
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
403 }
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
404 };
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
405 ]], [[
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
406 item_model model;
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
407 model.update_model ();
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
408 ]])],
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
409 octave_cv_func_qabstractitemmodel_beginresetmodel=yes,
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
410 octave_cv_func_qabstractitemmodel_beginresetmodel=no)
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
411 CPPFLAGS="$ac_octave_save_CPPFLAGS"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
412 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
413 AC_LANG_POP(C++)
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
414 ])
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
415 if test $octave_cv_func_qabstractitemmodel_beginresetmodel = yes; then
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
416 AC_DEFINE(HAVE_QABSTRACTITEMMODEL_BEGINRESETMODEL, 1,
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
417 [Define to 1 if you have the `QAbstractItemModel::beginResetModel' member function.])
17111
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
418 fi
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
419 ])
bb713af2e1d9 build: detect Qt functions required for building the gui
Mike Miller <mtmiller@ieee.org>
parents: 17034
diff changeset
420 dnl
27842
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
421 dnl Check whether the Qt QComboBox class has the setCurrentText
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
422 dnl function. This function was introduced in Qt 5.
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
423 dnl
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
424 dnl FIXME: Delete this entirely when we drop support for Qt 4.
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
425 dnl
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
426 AC_DEFUN([OCTAVE_CHECK_FUNC_QCOMBOBOX_SETCURRENTTEXT], [
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
427 AC_CACHE_CHECK([for QComboBox::setCurrentText],
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
428 [octave_cv_func_qcombobox_setcurrenttext],
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
429 [AC_LANG_PUSH(C++)
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
430 ac_octave_save_CPPFLAGS="$CPPFLAGS"
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
431 ac_octave_save_CXXFLAGS="$CXXFLAGS"
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
432 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
433 CXXFLAGS="$CXXPICFLAG $CPPFLAGS"
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
434 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
435 #include <QComboBox>
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
436 ]], [[
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
437 QComboBox combo_box (nullptr);
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
438 combo_box.setCurrentText ("text");
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
439 ]])],
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
440 octave_cv_func_qcombobox_setcurrenttext=yes,
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
441 octave_cv_func_qcombobox_setcurrenttext=no)
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
442 CPPFLAGS="$ac_octave_save_CPPFLAGS"
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
443 CXXFLAGS="$ac_octave_save_CXXFLAGS"
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
444 AC_LANG_POP(C++)
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
445 ])
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
446 if test $octave_cv_func_qcombobox_setcurrenttext = yes; then
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
447 AC_DEFINE(HAVE_QCOMBOBOX_SETCURRENTTEXT, 1,
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
448 [Define to 1 if you have the `QComboBox::setCurrentText' member function.])
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
449 fi
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
450 ])
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
451 dnl
25046
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
452 dnl Check whether the Qt QGuiApplication class has the setDesktopFileName
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
453 dnl static member function. This function was introduced in Qt 5.7.
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
454 dnl
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
455 dnl FIXME: Delete this entirely when we drop support for Qt 5.6 or older.
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
456 dnl
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
457 AC_DEFUN([OCTAVE_CHECK_FUNC_QGUIAPPLICATION_SETDESKTOPFILENAME], [
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
458 AC_CACHE_CHECK([for QGuiApplication::setDesktopFileName],
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
459 [octave_cv_func_qguiapplication_setdesktopfilename],
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
460 [AC_LANG_PUSH(C++)
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
461 ac_octave_save_CPPFLAGS="$CPPFLAGS"
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
462 ac_octave_save_CXXFLAGS="$CXXFLAGS"
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
463 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
464 CXXFLAGS="$CXXPICFLAG $CPPFLAGS"
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
465 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
466 #include <QGuiApplication>
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
467 ]], [[
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
468 QGuiApplication::setDesktopFileName ("com.example.Example.desktop");
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
469 ]])],
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
470 octave_cv_func_qguiapplication_setdesktopfilename=yes,
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
471 octave_cv_func_qguiapplication_setdesktopfilename=no)
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
472 CPPFLAGS="$ac_octave_save_CPPFLAGS"
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
473 CXXFLAGS="$ac_octave_save_CXXFLAGS"
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
474 AC_LANG_POP(C++)
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
475 ])
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
476 if test $octave_cv_func_qguiapplication_setdesktopfilename = yes; then
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
477 AC_DEFINE(HAVE_QGUIAPPLICATION_SETDESKTOPFILENAME, 1,
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
478 [Define to 1 if you have the `QGuiApplication::setDesktopFileName' member function.])
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
479 fi
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
480 ])
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
481 dnl
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
482 dnl Check whether the Qt QHeaderView class has the setSectionResizeMode
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
483 dnl function. This function was introduced in Qt 5.
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
484 dnl
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
485 dnl FIXME: Delete this entirely when we drop support for Qt 4.
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
486 dnl
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
487 AC_DEFUN([OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONRESIZEMODE], [
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
488 AC_CACHE_CHECK([for QHeaderView::setSectionResizeMode],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
489 [octave_cv_func_qheaderview_setsectionresizemode],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
490 [AC_LANG_PUSH(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
491 ac_octave_save_CPPFLAGS="$CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
492 ac_octave_save_CXXFLAGS="$CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
493 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
494 CXXFLAGS="$CXXPICFLAG $CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
495 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
496 #include <QHeaderView>
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
497 ]], [[
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
498 QHeaderView header_view (Qt::Horizontal);
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
499 header_view.setSectionResizeMode (QHeaderView::Interactive);
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
500 ]])],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
501 octave_cv_func_qheaderview_setsectionresizemode=yes,
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
502 octave_cv_func_qheaderview_setsectionresizemode=no)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
503 CPPFLAGS="$ac_octave_save_CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
504 CXXFLAGS="$ac_octave_save_CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
505 AC_LANG_POP(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
506 ])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
507 if test $octave_cv_func_qheaderview_setsectionresizemode = yes; then
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
508 AC_DEFINE(HAVE_QHEADERVIEW_SETSECTIONRESIZEMODE, 1,
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
509 [Define to 1 if you have the `QHeaderView::setSectionResizeMode' member function.])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
510 fi
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
511 ])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
512 dnl
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
513 dnl Check whether the Qt QHeaderView class has the setSectionsClickable
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
514 dnl function. This function was introduced in Qt 5.
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
515 dnl
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
516 dnl FIXME: Delete this entirely when we drop support for Qt 4.
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
517 dnl
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
518 AC_DEFUN([OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONSCLICKABLE], [
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
519 AC_CACHE_CHECK([for QHeaderView::setSectionsClickable],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
520 [octave_cv_func_qheaderview_setsectionsclickable],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
521 [AC_LANG_PUSH(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
522 ac_octave_save_CPPFLAGS="$CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
523 ac_octave_save_CXXFLAGS="$CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
524 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
525 CXXFLAGS="$CXXPICFLAG $CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
526 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
527 #include <QHeaderView>
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
528 ]], [[
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
529 QHeaderView header_view (Qt::Horizontal);
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
530 header_view.setSectionsClickable (true);
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
531 ]])],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
532 octave_cv_func_qheaderview_setsectionsclickable=yes,
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
533 octave_cv_func_qheaderview_setsectionsclickable=no)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
534 CPPFLAGS="$ac_octave_save_CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
535 CXXFLAGS="$ac_octave_save_CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
536 AC_LANG_POP(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
537 ])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
538 if test $octave_cv_func_qheaderview_setsectionsclickable = yes; then
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
539 AC_DEFINE(HAVE_QHEADERVIEW_SETSECTIONSCLICKABLE, 1,
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
540 [Define to 1 if you have the `QHeaderView::setSectionsClickable' member function.])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
541 fi
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
542 ])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
543 dnl
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
544 dnl Check whether the Qt QHeaderView class has the setSectionsMovable
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
545 dnl function. This function was introduced in Qt 5.
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
546 dnl
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
547 dnl FIXME: Delete this entirely when we drop support for Qt 4.
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
548 dnl
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
549 AC_DEFUN([OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONSMOVABLE], [
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
550 AC_CACHE_CHECK([for QHeaderView::setSectionsMovable],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
551 [octave_cv_func_qheaderview_setsectionsmovable],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
552 [AC_LANG_PUSH(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
553 ac_octave_save_CPPFLAGS="$CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
554 ac_octave_save_CXXFLAGS="$CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
555 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
556 CXXFLAGS="$CXXPICFLAG $CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
557 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
558 #include <QHeaderView>
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
559 ]], [[
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
560 QHeaderView header_view (Qt::Horizontal);
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
561 header_view.setSectionsMovable (true);
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
562 ]])],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
563 octave_cv_func_qheaderview_setsectionsmovable=yes,
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
564 octave_cv_func_qheaderview_setsectionsmovable=no)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
565 CPPFLAGS="$ac_octave_save_CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
566 CXXFLAGS="$ac_octave_save_CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
567 AC_LANG_POP(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
568 ])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
569 if test $octave_cv_func_qheaderview_setsectionsmovable = yes; then
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
570 AC_DEFINE(HAVE_QHEADERVIEW_SETSECTIONSMOVABLE, 1,
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
571 [Define to 1 if you have the `QHeaderView::setSectionsMovable' member function.])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
572 fi
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
573 ])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
574 dnl
25061
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
575 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
576 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
577 dnl
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
578 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
579 dnl
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
580 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
581 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
582 [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
583 [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
584 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
585 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
586 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
587 CXXFLAGS="$CXXPICFLAG $CPPFLAGS"
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
588 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
589 #include <QHelpSearchQueryWidget>
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
590 #include <QString>
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
591 ]], [[
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
592 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
593 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
594 ]])],
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
595 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
596 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
597 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
598 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
599 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
600 ])
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
601 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
602 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
603 [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
604 fi
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
605 ])
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
606 dnl
29034
e3bc897115ed Change feature test to OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API in cset a0ff81c8b8e8.
Rik <rik@octave.org>
parents: 29031
diff changeset
607 dnl Check whether new API is used with QHelpIndexWidget.
e3bc897115ed Change feature test to OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API in cset a0ff81c8b8e8.
Rik <rik@octave.org>
parents: 29031
diff changeset
608 dnl Under new API, QHelpIndexWidget emits documentActivates.
e3bc897115ed Change feature test to OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API in cset a0ff81c8b8e8.
Rik <rik@octave.org>
parents: 29031
diff changeset
609 dnl Under old API, QHelpIndexWidget emits linkActivated.
e3bc897115ed Change feature test to OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API in cset a0ff81c8b8e8.
Rik <rik@octave.org>
parents: 29031
diff changeset
610 dnl New structure/signal API was introduced in Qt 5.15.
29031
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
611 dnl
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
612 dnl FIXME: Delete this entirely when we drop support for Qt 5.14 or older.
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
613 dnl
29034
e3bc897115ed Change feature test to OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API in cset a0ff81c8b8e8.
Rik <rik@octave.org>
parents: 29031
diff changeset
614 AC_DEFUN([OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API], [
e3bc897115ed Change feature test to OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API in cset a0ff81c8b8e8.
Rik <rik@octave.org>
parents: 29031
diff changeset
615 AC_CACHE_CHECK([for new QHelpIndexWidget API],
e3bc897115ed Change feature test to OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API in cset a0ff81c8b8e8.
Rik <rik@octave.org>
parents: 29031
diff changeset
616 [octave_cv_new_qhelpindexwidget_api],
29031
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
617 [AC_LANG_PUSH(C++)
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
618 ac_octave_save_CPPFLAGS="$CPPFLAGS"
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
619 ac_octave_save_CXXFLAGS="$CXXFLAGS"
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
620 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
621 CXXFLAGS="$CXXPICFLAG $CPPFLAGS"
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
622 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
623 #include <QHelpLink>
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
624 ]], [[
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
625 QHelpLink link;
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
626 ]])],
29034
e3bc897115ed Change feature test to OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API in cset a0ff81c8b8e8.
Rik <rik@octave.org>
parents: 29031
diff changeset
627 octave_cv_new_qhelpindexwidget_api=yes,
e3bc897115ed Change feature test to OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API in cset a0ff81c8b8e8.
Rik <rik@octave.org>
parents: 29031
diff changeset
628 octave_cv_new_qhelpindexwidget_api=no)
29031
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
629 CPPFLAGS="$ac_octave_save_CPPFLAGS"
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
630 CXXFLAGS="$ac_octave_save_CXXFLAGS"
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
631 AC_LANG_POP(C++)
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
632 ])
29034
e3bc897115ed Change feature test to OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API in cset a0ff81c8b8e8.
Rik <rik@octave.org>
parents: 29031
diff changeset
633 if test $octave_cv_new_qhelpindexwidget_api = yes; then
e3bc897115ed Change feature test to OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API in cset a0ff81c8b8e8.
Rik <rik@octave.org>
parents: 29031
diff changeset
634 AC_DEFINE(HAVE_NEW_QHELPINDEXWIDGET_API, 1,
e3bc897115ed Change feature test to OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API in cset a0ff81c8b8e8.
Rik <rik@octave.org>
parents: 29031
diff changeset
635 [Define to 1 if using new QHelpIndexWidget API.])
29031
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
636 fi
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
637 ])
a0ff81c8b8e8 fix index in document browser for Qt 5.15 (bug #59375)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 28938
diff changeset
638 dnl
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
639 dnl Check whether the Qt function qInstallMessageHandler is available.
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
640 dnl This function was introduced in Qt 5.
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
641 dnl
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
642 dnl FIXME: Delete this entirely when we drop support for Qt 4.
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
643 dnl
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
644 AC_DEFUN([OCTAVE_CHECK_FUNC_QINSTALLMESSAGEHANDLER], [
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
645 AC_CACHE_CHECK([for qInstallMessageHandler],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
646 [octave_cv_func_qinstallmessagehandler],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
647 [AC_LANG_PUSH(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
648 ac_octave_save_CPPFLAGS="$CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
649 ac_octave_save_CXXFLAGS="$CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
650 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
651 CXXFLAGS="$CXXPICFLAG $CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
652 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
653 #include <QtGlobal>
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
654 ]], [[
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
655 qInstallMessageHandler (nullptr);
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
656 ]])],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
657 octave_cv_func_qinstallmessagehandler=yes,
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
658 octave_cv_func_qinstallmessagehandler=no)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
659 CPPFLAGS="$ac_octave_save_CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
660 CXXFLAGS="$ac_octave_save_CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
661 AC_LANG_POP(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
662 ])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
663 if test $octave_cv_func_qinstallmessagehandler = yes; then
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
664 AC_DEFINE(HAVE_QINSTALLMESSAGEHANDLER, 1,
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
665 [Define to 1 if you have the `qInstallMessageHandler' function.])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
666 fi
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
667 ])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
668 dnl
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
669 dnl Check whether the Qt class QLineEdit has the setPlaceholderText member
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
670 dnl function. This member function was introduced in Qt 4.7.
18216
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
671 dnl
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
672 dnl FIXME: Delete this entirely when we can safely assume that Qt 4.7 or later
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
673 dnl is in use everywhere, or when we drop support for Qt 4.
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
674 dnl
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
675 AC_DEFUN([OCTAVE_CHECK_FUNC_QLINEEDIT_SETPLACEHOLDERTEXT], [
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
676 AC_CACHE_CHECK([for QLineEdit::setPlaceholderText in <QLinedEdit>],
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
677 [octave_cv_func_qlineedit_setplaceholdertext],
18216
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
678 [AC_LANG_PUSH(C++)
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
679 ac_octave_save_CPPFLAGS="$CPPFLAGS"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
680 ac_octave_save_CXXFLAGS="$CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
681 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
682 CXXFLAGS="$CXXPICFLAG $CPPFLAGS"
18216
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
683 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
684 #include <QLineEdit>
18216
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
685 ]], [[
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
686 QLineEdit line_edit;
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
687 line_edit.setPlaceholderText ("placeholder text");
18216
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
688 ]])],
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
689 octave_cv_func_qlineedit_setplaceholdertext=yes,
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
690 octave_cv_func_qlineedit_setplaceholdertext=no)
18216
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
691 CPPFLAGS="$ac_octave_save_CPPFLAGS"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
692 CXXFLAGS="$ac_octave_save_CXXFLAGS"
18216
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
693 AC_LANG_POP(C++)
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
694 ])
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
695 if test $octave_cv_func_qlineedit_setplaceholdertext = yes; then
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
696 AC_DEFINE(HAVE_QLINEEDIT_SETPLACEHOLDERTEXT, 1,
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
697 [Define to 1 if you have the `QLineEdit::setPlaceholderText' member function.])
18216
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
698 fi
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
699 ])
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
700 dnl
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
701 dnl Check whether the Qt QMouseEvent class has the localPos function.
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
702 dnl This function was introduced in Qt 5.
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
703 dnl
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
704 dnl FIXME: Delete this entirely when we drop support for Qt 4.
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
705 dnl
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
706 AC_DEFUN([OCTAVE_CHECK_FUNC_QMOUSEEVENT_LOCALPOS], [
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
707 AC_CACHE_CHECK([for QMouseEvent::localPos],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
708 [octave_cv_func_qmouseevent_localpos],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
709 [AC_LANG_PUSH(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
710 ac_octave_save_CPPFLAGS="$CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
711 ac_octave_save_CXXFLAGS="$CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
712 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
713 CXXFLAGS="$CXXPICFLAG $CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
714 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
715 #include <QMouseEvent>
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
716 ]], [[
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
717 QMouseEvent *event;
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
718 event->localPos ();
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
719 ]])],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
720 octave_cv_func_qmouseevent_localpos=yes,
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
721 octave_cv_func_qmouseevent_localpos=no)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
722 CPPFLAGS="$ac_octave_save_CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
723 CXXFLAGS="$ac_octave_save_CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
724 AC_LANG_POP(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
725 ])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
726 if test $octave_cv_func_qmouseevent_localpos = yes; then
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
727 AC_DEFINE(HAVE_QMOUSEEVENT_LOCALPOS, 1,
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
728 [Define to 1 if you have the `QMouseEvent::localPos' member function.])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
729 fi
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
730 ])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
731 dnl
24823
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
732 dnl Check whether QObject::findChildren accepts Qt::FindChildOptions
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
733 dnl argument.
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
734 dnl
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
735 dnl FIXME: Delete this entirely when we drop support for Qt 4.
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
736 dnl
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
737 AC_DEFUN([OCTAVE_CHECK_FUNC_QOBJECT_FINDCHILDREN_ACCEPTS_FINDCHILDOPTIONS], [
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
738 AC_CACHE_CHECK([whether QObject::findChildren accepts Qt::FindChildOptions],
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
739 [octave_cv_func_qobject_findchildren_accepts_findchildoptions],
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
740 [AC_LANG_PUSH(C++)
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
741 ac_octave_save_CPPFLAGS="$CPPFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
742 ac_octave_save_CXXFLAGS="$CXXFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
743 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
744 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
745 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
746 #include <QList>
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
747 #include <QObject>
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
748 #include <QWidget>
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
749 ]], [[
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
750 QObject obj;
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
751 QList<QWidget *> widgets
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
752 = obj.findChildren<QWidget *> ("name", Qt::FindDirectChildrenOnly);
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
753 ]])],
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
754 octave_cv_func_qobject_findchildren_accepts_findchildoptions=yes,
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
755 octave_cv_func_qobject_findchildren_accepts_findchildoptions=no)
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
756 CPPFLAGS="$ac_octave_save_CPPFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
757 CXXFLAGS="$ac_octave_save_CXXFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
758 AC_LANG_POP(C++)
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
759 ])
24825
e08c1fea96c5 acinclude.m4: Fix another typo in cset 53f68d0fb122.
Rik <rik@octave.org>
parents: 24824
diff changeset
760 if test $octave_cv_func_qobject_findchildren_accepts_findchildoptions = yes; then
24824
cce5d2ea39ff acinclude.m4: Fix typo in previous cset (53f68d0fb122).
Rik <rik@octave.org>
parents: 24823
diff changeset
761 AC_DEFINE(QOBJECT_FINDCHILDREN_ACCEPTS_FINDCHILDOPTIONS, 1,
24823
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
762 [Define to 1 if 'QObject::findChildren' accepts 'Qt::FindChildOptions' argument.])
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
763 fi
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
764 ])
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
765 dnl
25884
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
766 dnl Check whether the Qt class QScreen has the devicePixelRatio member function.
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
767 dnl This member function was introduced in Qt 5.5.
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
768 dnl
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
769 AC_DEFUN([OCTAVE_CHECK_FUNC_QSCREEN_DEVICEPIXELRATIO], [
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
770 AC_CACHE_CHECK([for QScreen::devicePixelRatio in <QScreen>],
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
771 [octave_cv_func_qscreen_devicepixelratio],
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
772 [AC_LANG_PUSH(C++)
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
773 ac_octave_save_CPPFLAGS="$CPPFLAGS"
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
774 ac_octave_save_CXXFLAGS="$CXXFLAGS"
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
775 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
776 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
777 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
778 #include <QApplication>
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
779 #include <QScreen>
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
780 ]], [[
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
781 QScreen *screen = QApplication::primaryScreen ();
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
782 qreal ratio = screen->devicePixelRatio ();
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
783 ]])],
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
784 octave_cv_func_qscreen_devicepixelratio=yes,
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
785 octave_cv_func_qscreen_devicepixelratio=no)
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
786 CPPFLAGS="$ac_octave_save_CPPFLAGS"
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
787 CXXFLAGS="$ac_octave_save_CXXFLAGS"
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
788 AC_LANG_POP(C++)
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
789 ])
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
790 if test $octave_cv_func_qscreen_devicepixelratio = yes; then
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
791 AC_DEFINE(HAVE_QSCREEN_DEVICEPIXELRATIO, 1,
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
792 [Define to 1 if you have the `QScreen::devicePixelRatio' member function.])
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
793 fi
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
794 ])
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
795 dnl
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
796 dnl Check whether the Qt class QTabWidget has the setMovable member function.
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
797 dnl This member function was introduced in Qt 4.5.
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
798 dnl
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
799 dnl FIXME: Delete this entirely when we can safely assume that Qt 4.5 or later
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
800 dnl is in use everywhere, or when we drop support for Qt 4.
18216
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
801 dnl
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
802 AC_DEFUN([OCTAVE_CHECK_FUNC_QTABWIDGET_SETMOVABLE], [
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
803 AC_CACHE_CHECK([for QTabWidget::setMovable in <QTabWidget>],
18216
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
804 [octave_cv_func_qtabwidget_setmovable],
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
805 [AC_LANG_PUSH(C++)
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
806 ac_octave_save_CPPFLAGS="$CPPFLAGS"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
807 ac_octave_save_CXXFLAGS="$CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
808 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
809 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
18216
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
810 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
811 #include <QTabWidget>
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
812 class tab_widget : public QTabWidget
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
813 {
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
814 public:
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
815 tab_widget (QWidget *parent = 0) : QTabWidget (parent) { this->setMovable (true); }
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
816 ~tab_widget () {}
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
817 };
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
818 ]], [[
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
819 tab_widget tw;
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
820 ]])],
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
821 octave_cv_func_qtabwidget_setmovable=yes,
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
822 octave_cv_func_qtabwidget_setmovable=no)
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
823 CPPFLAGS="$ac_octave_save_CPPFLAGS"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
824 CXXFLAGS="$ac_octave_save_CXXFLAGS"
18216
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
825 AC_LANG_POP(C++)
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
826 ])
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
827 if test $octave_cv_func_qtabwidget_setmovable = yes; then
e54cfaae830b Make editor tabs draggable if feature is available
Richard Crozier richard dot crozier(at)yahoo.co.uk
parents: 18141
diff changeset
828 AC_DEFINE(HAVE_QTABWIDGET_SETMOVABLE, 1,
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
829 [Define to 1 if you have the `QTabWidget::setMovable' member function.])
18854
0a66861d8069 implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents: 18216
diff changeset
830 fi
0a66861d8069 implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents: 18216
diff changeset
831 ])
0a66861d8069 implementation of search in selection in gui editor (bbug #41196)
Torsten <ttl@justmail.de>
parents: 18216
diff changeset
832 dnl
27215
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
833 dnl Check whether the Qt class QWheelEvent has the angleDelta member function.
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
834 dnl This member function was introduced in Qt 5.
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
835 dnl
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
836 dnl FIXME: Delete this entirely when we drop support for Qt 4.
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
837 dnl
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
838 AC_DEFUN([OCTAVE_CHECK_FUNC_QWHEELEVENT_ANGLEDELTA], [
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
839 AC_CACHE_CHECK([for QWheelEvent::angleDelta in <QWheelEvent>],
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
840 [octave_cv_func_qwheelevent_angledelta],
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
841 [AC_LANG_PUSH(C++)
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
842 ac_octave_save_CPPFLAGS="$CPPFLAGS"
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
843 ac_octave_save_CXXFLAGS="$CXXFLAGS"
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
844 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
845 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
846 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
847 #include <QWheelEvent>
29047
94396ec1a89d avoid warnings about deprecated QWheelEvent methods delta and orientation
John W. Eaton <jwe@octave.org>
parents: 29034
diff changeset
848 void foo (const QWheelEvent& ev)
27215
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
849 {
29047
94396ec1a89d avoid warnings about deprecated QWheelEvent methods delta and orientation
John W. Eaton <jwe@octave.org>
parents: 29034
diff changeset
850 ev.angleDelta ();
27215
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
851 };
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
852 ]])],
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
853 octave_cv_func_qwheelevent_angledelta=yes,
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
854 octave_cv_func_qwheelevent_angledelta=no)
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
855 CPPFLAGS="$ac_octave_save_CPPFLAGS"
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
856 CXXFLAGS="$ac_octave_save_CXXFLAGS"
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
857 AC_LANG_POP(C++)
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
858 ])
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
859 if test $octave_cv_func_qwheelevent_angledelta = yes; then
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
860 AC_DEFINE(HAVE_QWHEELEVENT_ANGLEDELTA, 1,
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
861 [Define to 1 if you have the `QWheelEvent::angleDelta' member function.])
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
862 fi
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
863 ])
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
864 dnl
29048
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
865 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
866 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
867 dnl
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
868 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
869 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
870 [octave_cv_func_qwheelevent_position],
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
871 [AC_LANG_PUSH(C++)
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
872 ac_octave_save_CPPFLAGS="$CPPFLAGS"
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
873 ac_octave_save_CXXFLAGS="$CXXFLAGS"
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
874 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
875 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
876 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
877 #include <QWheelEvent>
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
878 void foo (const QWheelEvent& ev)
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
879 {
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
880 ev.position ();
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
881 };
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
882 ]])],
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
883 octave_cv_func_qwheelevent_position=yes,
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
884 octave_cv_func_qwheelevent_position=no)
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
885 CPPFLAGS="$ac_octave_save_CPPFLAGS"
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
886 CXXFLAGS="$ac_octave_save_CXXFLAGS"
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
887 AC_LANG_POP(C++)
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
888 ])
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
889 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
890 AC_DEFINE(HAVE_QWHEELEVENT_POSITION, 1,
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
891 [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
892 fi
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
893 ])
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
894 dnl
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
895 dnl Check whether Qt message handler function accepts QMessageLogContext
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
896 dnl argument. This change was introduced in Qt 5.
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
897 dnl
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
898 dnl FIXME: Delete this entirely when we drop support for Qt 4.
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
899 dnl
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
900 AC_DEFUN([OCTAVE_CHECK_FUNC_QTMESSAGEHANDLER_ACCEPTS_QMESSAGELOGCONTEXT], [
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
901 AC_CACHE_CHECK([whether Qt message handler accepts QMessageLogContext],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
902 [octave_cv_func_qtmessagehandler_accepts_qmessagelogcontext],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
903 [AC_LANG_PUSH(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
904 ac_octave_save_CPPFLAGS="$CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
905 ac_octave_save_CXXFLAGS="$CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
906 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
907 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
908 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
909 #include <QtGlobal>
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
910 static void
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
911 msg_handler (QtMsgType, const QMessageLogContext &, const QString &)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
912 { }
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
913 ]], [[
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
914 QtMessageHandler fptr = msg_handler;
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
915 ]])],
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
916 octave_cv_func_qtmessagehandler_accepts_qmessagelogcontext=yes,
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
917 octave_cv_func_qtmessagehandler_accepts_qmessagelogcontext=no)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
918 CPPFLAGS="$ac_octave_save_CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
919 CXXFLAGS="$ac_octave_save_CXXFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
920 AC_LANG_POP(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
921 ])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
922 if test $octave_cv_func_qtmessagehandler_accepts_qmessagelogcontext = yes; then
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
923 AC_DEFINE(QTMESSAGEHANDLER_ACCEPTS_QMESSAGELOGCONTEXT, 1,
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
924 [Define to 1 if Qt message handler accepts 'QMessageLogContext' argument.])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
925 fi
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
926 ])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
927 dnl
28835
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
928 dnl Check whether the Qt class QList has a constructor that accepts
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
929 dnl a pair of iterators. This constructor was introduced in Qt 5.14.
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
930 dnl
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
931 AC_DEFUN([OCTAVE_CHECK_FUNC_QLIST_ITERATOR_CONSTRUCTOR], [
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
932 AC_CACHE_CHECK([for QList<T>::QList (iterator, iterator) constructor],
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
933 [octave_cv_func_qlist_iterator_constructor],
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
934 [AC_LANG_PUSH(C++)
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
935 ac_octave_save_CPPFLAGS="$CPPFLAGS"
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
936 ac_octave_save_CXXFLAGS="$CXXFLAGS"
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
937 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
938 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
939 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
940 #include <QList>
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
941 ]], [[
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
942 QList<int> lst_one;
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
943 QList<int> lst_two (lst_one.begin (), lst_one.end ());
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
944 ]])],
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
945 octave_cv_func_qlist_iterator_constructor=yes,
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
946 octave_cv_func_qlist_iterator_constructor=no)
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
947 CPPFLAGS="$ac_octave_save_CPPFLAGS"
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
948 CXXFLAGS="$ac_octave_save_CXXFLAGS"
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
949 AC_LANG_POP(C++)
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
950 ])
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
951 if test $octave_cv_func_qlist_iterator_constructor = yes; then
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
952 AC_DEFINE(HAVE_QLIST_ITERATOR_CONSTRUCTOR, 1,
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
953 [Define to 1 if you have the `QList<T>::QList (iterator, iterator)' constructor.])
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
954 fi
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
955 ])
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
956 dnl
28845
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
957 dnl Check whether the Qt class QRegion has the iterators and related
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
958 dnl functions introduced in Qt 5.8.
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
959 dnl
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
960 AC_DEFUN([OCTAVE_CHECK_QREGION_ITERATORS], [
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
961 AC_CACHE_CHECK([for QRegion iterators and related functions],
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
962 [octave_cv_qregion_iterators],
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
963 [AC_LANG_PUSH(C++)
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
964 ac_octave_save_CPPFLAGS="$CPPFLAGS"
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
965 ac_octave_save_CXXFLAGS="$CXXFLAGS"
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
966 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
967 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
968 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
969 #include <QRegion>
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
970 ]], [[
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
971 QRegion region;
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
972 QRegion::const_iterator it;
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
973 it = region.begin ();
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
974 it = region.end ();
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
975 it = region.cbegin ();
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
976 it = region.cend ();
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
977 QRegion::const_reverse_iterator rit;
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
978 rit = region.rbegin ();
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
979 rit = region.rend ();
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
980 rit = region.crbegin ();
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
981 rit = region.crend ();
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
982 ]])],
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
983 octave_cv_qregion_iterators=yes,
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
984 octave_cv_qregion_iterators=no)
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
985 CPPFLAGS="$ac_octave_save_CPPFLAGS"
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
986 CXXFLAGS="$ac_octave_save_CXXFLAGS"
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
987 AC_LANG_POP(C++)
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
988 ])
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
989 if test $octave_cv_qregion_iterators = yes; then
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
990 AC_DEFINE(HAVE_QREGION_ITERATORS, 1,
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
991 [Define to 1 if you have the `QFontMetrics::horizontalAdvance' function.])
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
992 fi
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
993 ])
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
994 dnl
29049
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
995 dnl Check whether the Qt::SplitBehavior enum exists and has
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
996 dnl Qt::KeepEmptyParts and Qt::SkipEmptyParts members. This enum
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
997 dnl was introduced or modified in Qt 5.14.
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
998 dnl
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
999 AC_DEFUN([OCTAVE_CHECK_QT_SPLITBEHAVIOR_ENUM], [
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1000 AC_CACHE_CHECK([for Qt::SplitBehavior enum],
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1001 [octave_cv_qt_splitbehavior_enum],
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1002 [AC_LANG_PUSH(C++)
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1003 ac_octave_save_CPPFLAGS="$CPPFLAGS"
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1004 ac_octave_save_CXXFLAGS="$CXXFLAGS"
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1005 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1006 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1007 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1008 #include <Qt>
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1009 ]], [[
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1010 Qt::SplitBehavior sb_keep = Qt::KeepEmptyParts;
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1011 Qt::SplitBehavior sb_skip = Qt::SkipEmptyParts;
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1012 ]])],
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1013 octave_cv_qt_splitbehavior_enum=yes,
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1014 octave_cv_qt_splitbehavior_enum=no)
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1015 CPPFLAGS="$ac_octave_save_CPPFLAGS"
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1016 CXXFLAGS="$ac_octave_save_CXXFLAGS"
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1017 AC_LANG_POP(C++)
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1018 ])
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1019 if test $octave_cv_qt_splitbehavior_enum = yes; then
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1020 AC_DEFINE(HAVE_QT_SPLITBEHAVIOR_ENUM, 1,
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1021 [Define to 1 if you have the `Qt::SplitBehavior' enum.])
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1022 fi
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1023 ])
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
1024 dnl
28846
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1025 dnl Check whether the Qt class QList has a constructor that accepts
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1026 dnl a pair of iterators. This constructor was introduced in Qt 5.14.
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1027 dnl
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1028 AC_DEFUN([OCTAVE_CHECK_FUNC_QFONTMETRICS_HORIZONTAL_ADVANCE], [
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1029 AC_CACHE_CHECK([for QFontMetrics::horizontalAdvance function],
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1030 [octave_cv_func_qfontmetrics_horizontal_advance],
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1031 [AC_LANG_PUSH(C++)
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1032 ac_octave_save_CPPFLAGS="$CPPFLAGS"
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1033 ac_octave_save_CXXFLAGS="$CXXFLAGS"
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1034 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1035 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1036 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1037 #include <QFont>
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1038 #include <QFontMetrics>
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1039 #include <QString>
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1040 ]], [[
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1041 QFont font;
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1042 QFontMetrics fm (font);
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1043 fm.horizontalAdvance ('x');
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1044 fm.horizontalAdvance (QString ("string"));
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1045 ]])],
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1046 octave_cv_func_qfontmetrics_horizontal_advance=yes,
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1047 octave_cv_func_qfontmetrics_horizontal_advance=no)
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1048 CPPFLAGS="$ac_octave_save_CPPFLAGS"
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1049 CXXFLAGS="$ac_octave_save_CXXFLAGS"
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1050 AC_LANG_POP(C++)
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1051 ])
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1052 if test $octave_cv_func_qfontmetrics_horizontal_advance = yes; then
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1053 AC_DEFINE(HAVE_QFONTMETRICS_HORIZONTAL_ADVANCE, 1,
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1054 [Define to 1 if you have the `QFontMetrics::horizontalAdvance' function.])
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1055 fi
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1056 ])
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
1057 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1058 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
1059 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1060 AC_DEFUN([OCTAVE_CHECK_HDF5_HAS_VER_16_API], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1061 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
1062 [octave_cv_hdf5_has_ver_16_api],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1063 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1064 #include <hdf5.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1065 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1066 H5Eset_auto (0, 0);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1067 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1068 octave_cv_hdf5_has_ver_16_api=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1069 octave_cv_hdf5_has_ver_16_api=no)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1070 ])
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1071 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
1072 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
1073 fi
14605
28e53daab1f8 Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14550
diff changeset
1074 ])
28e53daab1f8 Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14550
diff changeset
1075 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1076 dnl Usage:
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1077 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
1078 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
1079 dnl REQUIRED)
14605
28e53daab1f8 Cleanup on autoconf warnings
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14550
diff changeset
1080 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1081 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
1082 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
1083 [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
1084 [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
1085 [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
1086 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
1087
23017
0f22914be30e * acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents: 23008
diff changeset
1088 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
1089 [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
1090 [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
1091 [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
1092 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
1093
23017
0f22914be30e * acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents: 23008
diff changeset
1094 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
1095 [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
1096 [m4_ifblank([$7],
23017
0f22914be30e * acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents: 23008
diff changeset
1097 [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
1098 [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
1099 [m4_ifblank([$7],
23017
0f22914be30e * acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents: 23008
diff changeset
1100 [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
1101 [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
1102 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
1103
22039
0a528a6dac95 build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents: 22036
diff changeset
1104 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
1105 m4_toupper([$1])_LIBS=
21381
e5d96f39a37d configure script fixes
John W. Eaton <jwe@octave.org>
parents: 21374
diff changeset
1106 warn_$1="$3"
9519
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
1107 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
1108 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
1109 ifelse([$#], 10,
23017
0f22914be30e * acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents: 23008
diff changeset
1110 [AC_MSG_ERROR([--without-m4_tolower($1) specified but $2 is required.])],
0f22914be30e * acinclude.m4 (OCTAVE_CHECK_LIB): Downcase --with-XYZ options.
John W. Eaton <jwe@octave.org>
parents: 23008
diff changeset
1111 [warn_$1="--without-m4_tolower($1) specified. Functions or features that depend on $2 will be disabled."
23006
06c248729e6f allow OCTAVE_CHECK_LIB to stop with an error if a library is required
John W. Eaton <jwe@octave.org>
parents: 22986
diff changeset
1112 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
1113 ;;
9519
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
1114 yes | "")
22039
0a528a6dac95 build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents: 22036
diff changeset
1115 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
1116 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
1117 ;;
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
1118 -* | */* | *.a | *.so | *.so.* | *.o)
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
1119 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
1120 ;;
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
1121 *)
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
1122 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
1123 ;;
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
1124 esac
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
1125
22039
0a528a6dac95 build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents: 22036
diff changeset
1126 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
1127 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
1128 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
1129 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
1130 fi
0a528a6dac95 build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents: 22036
diff changeset
1131 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
1132 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
1133 fi
23835
6ae0292aaa5c configure: ensure empty pkg-config results are actually empty (bug #51680)
Mike Miller <mtmiller@octave.org>
parents: 23414
diff changeset
1134 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
1135 ])
0a528a6dac95 build: use pkg-config in OCTAVE_CHECK_LIB without overriding user options
Mike Miller <mtmiller@octave.org>
parents: 22036
diff changeset
1136 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
1137
9519
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
1138 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
1139 ac_octave_save_CPPFLAGS="$CPPFLAGS"
15350
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
1140 ac_octave_save_LDFLAGS="$LDFLAGS"
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
1141 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
1142 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
1143 LDFLAGS="$m4_toupper([$1])_LDFLAGS $LDFLAGS"
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
1144 LIBS="$m4_toupper([$1])_LIBS $LIBS"
9523
0ce82753dd72 more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents: 9520
diff changeset
1145 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
1146 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
1147 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
1148 [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
1149 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
1150 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
1151 [octave_cv_lib_$1],
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
1152 [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
1153 [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
1154 ])
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
1155 if test "$octave_cv_lib_$1" = yes; then
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1156 m4_ifblank([$8], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1157 warn_$1=
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1158 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
1159 [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
1160 else
537b732926fb fix logic error in OCTAVE_CONFIG_LIB (bug #53736)
John W. Eaton <jwe@octave.org>
parents: 25135
diff changeset
1161 m4_toupper([$1])_LIBS=
9519
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
1162 fi
25299
537b732926fb fix logic error in OCTAVE_CONFIG_LIB (bug #53736)
John W. Eaton <jwe@octave.org>
parents: 25135
diff changeset
1163 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
1164 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
1165 m4_toupper([$1])_LIBS=
9568
d3fccc4c4b9e use OCTAVE_CHECK_LIBRARY to check for ARPACK
John W. Eaton <jwe@octave.org>
parents: 9543
diff changeset
1166 fi
9523
0ce82753dd72 more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents: 9520
diff changeset
1167 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
1168 CPPFLAGS="$ac_octave_save_CPPFLAGS"
15350
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
1169 LDFLAGS="$ac_octave_save_LDFLAGS"
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
1170 LIBS="$ac_octave_save_LIBS"
21381
e5d96f39a37d configure script fixes
John W. Eaton <jwe@octave.org>
parents: 21374
diff changeset
1171 else
e5d96f39a37d configure script fixes
John W. Eaton <jwe@octave.org>
parents: 21374
diff changeset
1172 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
1173 fi
15350
6a0c0d3d60b6 build: Implement some caching for OCTAVE_CHECK_LIB macro.
Rik <rik@octave.org>
parents: 15338
diff changeset
1174
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
1175 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
1176 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
1177 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
1178 fi])
9519
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
1179 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
1180 if test -n "$warn_$1"; then
21381
e5d96f39a37d configure script fixes
John W. Eaton <jwe@octave.org>
parents: 21374
diff changeset
1181 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
1182 fi
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
1183 ])
ee99f9f37505 improve configure checks for qhull and curl libs
John W. Eaton <jwe@octave.org>
parents: 9515
diff changeset
1184 dnl
15133
f91eac1bc66d m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents: 15126
diff changeset
1185 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
1186 dnl
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1187 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
1188 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
1189 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
1190 dnl allocated arrays in Fortran does not?
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1191 dnl
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1192 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
1193 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
1194 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
1195 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
1196 dnl
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1197 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
1198 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
1199 [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
1200 [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
1201 AC_RUN_IFELSE([AC_LANG_PROGRAM([[
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1202
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1203 #include <cfloat>
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1204
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1205 #include <stdint.h>
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1206
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1207 typedef int F77_RET_T;
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1208
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1209 #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
1210 #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
1211
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1212 #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
1213
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1214 #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
1215 #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
1216
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
1217 #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
1218 #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
1219
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1220 extern "C"
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1221 {
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1222 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
1223 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
1224 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
1225 const F77_INT&,
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1226 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
1227 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
1228 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
1229 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
1230 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
1231 const F77_INT&, F77_INT&
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1232 F77_CHAR_ARG_LEN_DECL
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1233 F77_CHAR_ARG_LEN_DECL);
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1234
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1235 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
1236 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
1237 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
1238 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
1239 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
1240 const F77_DBLE&, F77_DBLE*,
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1241 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
1242 const F77_INT&,
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1243 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
1244 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
1245 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
1246 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
1247 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
1248 const F77_INT&, F77_INT&
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1249 F77_CHAR_ARG_LEN_DECL
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1250 F77_CHAR_ARG_LEN_DECL
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1251 F77_CHAR_ARG_LEN_DECL);
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1252
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1253 F77_RET_T
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1254 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
1255 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
1256 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
1257 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
1258 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
1259 F77_DBLE*, const F77_INT&
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1260 F77_CHAR_ARG_LEN_DECL);
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1261 }
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1262
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1263 void
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1264 doit (void)
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1265 {
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1266 // 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
1267
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1268 // 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
1269 F77_INT n = 4;
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1270 double *m = new double [n * n];
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1271 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
1272 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
1273 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
1274 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
1275
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1276 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
1277
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1278 resid[0] = 0.960966;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1279 resid[1] = 0.741195;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1280 resid[2] = 0.150143;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1281 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
1282
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
1283 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
1284
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1285 ip[0] = 1; // ishift
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1286 ip[1] = 0; // ip[1] not referenced
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1287 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
1288 ip[3] = 1; // NB blocksize in recurrence
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1289 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
1290 ip[5] = 0; // ip[5] not referenced
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1291 ip[6] = 1; // mode
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1292 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
1293 ip[8] = 0;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1294 ip[9] = 0;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1295 ip[10] = 0;
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
1296
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
1297 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
1298
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
1299 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
1300 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
1301 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
1302
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1303 double *v = new double [n * (p + 1)];
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1304 double *workl = new double [lwork + 1];
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1305 double *workd = new double [3 * n + 1];
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1306
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
1307 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
1308 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
1309
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1310 double tol = DBL_EPSILON;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1311
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
1312 do
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1313 {
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1314 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
1315 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
1316 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
1317 workd, workl, lwork, info
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1318 F77_CHAR_ARG_LEN (1)
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1319 F77_CHAR_ARG_LEN (2));
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1320
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1321 if (ido == -1 || ido == 1 || ido == 2)
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1322 {
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1323 double *x = workd + ipntr[0] - 1;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1324 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
1325
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1326 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
1327 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
1328 F77_CHAR_ARG_LEN (1));
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1329 }
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1330 else
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1331 {
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1332 if (info < 0)
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1333 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
1334
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1335 break;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1336 }
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
1337 }
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1338 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
1339
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
1340 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
1341
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1342 // 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
1343 double *dr = new double [k + 1];
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1344 double *di = new double [k + 1];
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1345 double *workev = new double [3 * p];
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1346
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
1347 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
1348 dr[i] = di[i] = 0.0;
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1349
25047
1fe6002f68a7 update arpack checks for F77_INT vs octave_idx_type changes
John W. Eaton <jwe@octave.org>
parents: 25046
diff changeset
1350 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
1351
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1352 double sigmar = 0.0;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1353 double sigmai = 0.0;
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1354
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1355 // 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
1356 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
1357
18058
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1358 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
1359 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
1360 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
1361 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
1362 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
1363 workl, lwork, info
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1364 F77_CHAR_ARG_LEN (1)
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1365 F77_CHAR_ARG_LEN (1)
46ca76f194cb make arpack check work with --enable-64
John W. Eaton <jwe@octave.org>
parents: 18036
diff changeset
1366 F77_CHAR_ARG_LEN (2));
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1367 }
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1368
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1369 ]], [[
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1370
14147
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1371 for (int i = 0; i < 10; i++)
71e28fda7be9 use C++ program to test ARPACK
John W. Eaton <jwe@octave.org>
parents: 14144
diff changeset
1372 doit ();
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1373
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1374 ]])],
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1375 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
1376 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
1377 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
1378 AC_LANG_POP(C++)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1379 ])
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1380 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
1381 $1
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1382 :
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1383 else
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1384 $2
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1385 :
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1386 fi
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1387 ])
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1388 dnl
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1389 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
1390 dnl
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1391 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
1392 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
1393 dnl See bug #52425.
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1394 dnl
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1395 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
1396 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
1397 [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
1398 [save_FFLAGS="$FFLAGS"
0771ce2d30ef build: Fix compiling OCTAVE_ARPACK_OK_2 Fortran code (bug #52425).
Rik <rik@octave.org>
parents: 24289
diff changeset
1399 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
1400 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
1401 AC_RUN_IFELSE([[
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1402 program bug_52425
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1403 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1404 integer maxn, maxnev, maxncv, ldv
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1405 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
1406 $ ldv=maxn )
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1407 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1408 Double precision
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1409 & 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
1410 & 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
1411 & ax(maxn)
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1412 logical select(maxncv)
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1413 integer iparam(11), ipntr(11)
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1414 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1415 character bmat*1, which*2
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1416 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
1417 & nx, nconv, maxitr, mode, ishfts
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1418 logical rvec
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1419 Double precision
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1420 & tol, sigma
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1421 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1422 Double precision
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1423 & zero
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1424 parameter (zero = 0.0D+0)
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1425 c
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1426 Double precision
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1427 & dnrm2
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1428 external dnrm2, daxpy
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1429 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1430 intrinsic abs
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1431 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1432 n = 20
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1433 nev = 4
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1434 ncv = 20
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1435 bmat = 'I'
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1436 which = 'BE'
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1437 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1438 lworkl = ncv*(ncv+8)
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1439 tol = zero
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1440 info = 1
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1441 do j = 1,n
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1442 resid (j) = 1.0d0
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1443 end do
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1444 ido = 0
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1445 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1446 ishfts = 1
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1447 maxitr = 300
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1448 mode = 1
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1449 c
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1450 iparam(1) = ishfts
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1451 iparam(3) = maxitr
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1452 iparam(7) = mode
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1453 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1454 10 continue
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1455 c
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1456 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
1457 & 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
1458 & lworkl, info )
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1459 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1460 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
1461 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
1462 go to 10
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1463 end if
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1464 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1465 if ( info .lt. 0 ) then
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1466 stop 1
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1467 else
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1468 rvec = .false.
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1469 c
24446
4ca5c9f899d3 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 24337
diff changeset
1470 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
1471 & 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
1472 & 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
1473 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1474 if ( ierr .ne. 0) then
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1475 stop 1
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1476 else
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1477 nconv = iparam(5)
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1478 do 20 j=1, nconv
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1479 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
1480 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
1481 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
1482 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
1483 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1484 20 continue
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1485 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1486 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
1487 c
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1488 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
1489 stop 1
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1490 else
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1491 stop 0
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1492 end if
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1493 end if
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1494 end if
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1495 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1496 end
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1497 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1498 subroutine av (n, v, w)
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1499 integer n, j
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1500 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
1501 c
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1502 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
1503 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
1504 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
1505 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
1506 10 continue
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1507 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
1508 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
1509 return
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1510 end
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1511 ]],
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1512 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
1513 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
1514 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
1515 ## Restore FFLAGS.
0771ce2d30ef build: Fix compiling OCTAVE_ARPACK_OK_2 Fortran code (bug #52425).
Rik <rik@octave.org>
parents: 24289
diff changeset
1516 FFLAGS="$save_FFLAGS"
24289
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1517 AC_LANG_POP(Fortran 77)
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1518 ])
f52d91f6ef80 Check ARPACK library for buggy behavior in configure (bug #52425)
Rik <rik@octave.org>
parents: 23835
diff changeset
1519 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
1520 $1
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1521 :
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
1522 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
1523 $2
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1524 :
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
1525 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
1526 ])
834df9f10963 remove ARPACK files from sources and restore configure checks for external ARPACK library
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
1527 dnl
17241
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1528 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
1529 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
1530 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
1531 dnl
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1532 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
1533 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
1534 [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
1535 [AC_LANG_PUSH(C++)
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1536 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
1537 extern "C"
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1538 {
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1539 #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
1540 #include <glpk/glpk.h>
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1541 #else
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1542 #include <glpk.h>
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1543 #endif
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1544 }
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1545 ]], [[
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1546 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
1547 glp_iptcp iptcp;
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1548 glp_init_iptcp (&iptcp);
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1549 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
1550 ]])],
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1551 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
1552 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
1553 AC_LANG_POP(C++)
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1554 ])
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1555 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
1556 $1
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1557 :
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1558 else
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1559 $2
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1560 :
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1561 fi
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1562 ])
03a666018e0f build: Detect new GLPK API features required since changeset 54e251e699bb
Mike Miller <mtmiller@ieee.org>
parents: 17197
diff changeset
1563 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1564 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
1565 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
1566 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
1567 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1568 AC_DEFUN([OCTAVE_CHECK_LIB_HDF5_DLL], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1569 AC_CACHE_CHECK([if _HDF5USEDLL_ needs to be defined],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1570 [octave_cv_lib_hdf5_dll],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1571 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1572 #include <hdf5.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1573 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1574 hid_t x = H5T_NATIVE_DOUBLE;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1575 return x
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1576 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1577 [octave_cv_lib_hdf5_dll=no],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1578 [save_CFLAGS="$CFLAGS"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1579 CFLAGS="$CFLAGS -DWIN32 -D_HDF5USEDLL_"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1580 save_LIBS="$LIBS"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1581 LIBS="$HDF5_LIBS $LIBS"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1582 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1583 #include <hdf5.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1584 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1585 hid_t x = H5T_NATIVE_DOUBLE;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1586 return x
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1587 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1588 octave_cv_lib_hdf5_dll=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1589 octave_cv_lib_hdf5_dll=no)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1590 CFLAGS="$save_CFLAGS"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1591 LIBS="$save_LIBS"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1592 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1593 ])
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1594 if test $octave_cv_lib_hdf5_dll = yes; then
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1595 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
1596 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1597 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1598 dnl
15133
f91eac1bc66d m4/acinclude.m4: Correct typos, use consistent style for describing macros.
Rik <rik@octave.org>
parents: 15126
diff changeset
1599 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
1600 dnl
15063
36cbcc37fdb8 Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents: 15013
diff changeset
1601 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
1602 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
1603 dnl
15063
36cbcc37fdb8 Refactor configure.ac to make it more understandable.
Rik <rik@octave.org>
parents: 15013
diff changeset
1604 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
1605 dnl libraries and header files?
7825
13871b7de124 Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 7361
diff changeset
1606 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1607 AC_DEFUN([OCTAVE_CHECK_LIB_OPENGL], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1608 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
1609
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1610 ## On MacOSX systems the OpenGL framework can be used
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1611 OCTAVE_HAVE_FRAMEWORK(OpenGL, [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1612 #include <OpenGL/gl.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1613 #include <OpenGL/glu.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1614 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1615 GLint par; glGetIntegerv (GL_VIEWPORT, &par);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1616 ]],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1617 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
1618
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1619 if test $have_framework_opengl = yes; then
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1620 AC_DEFINE(HAVE_FRAMEWORK_OPENGL, 1,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1621 [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
1622 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
1623 AC_MSG_NOTICE([adding -framework OpenGL to OPENGL_LIBS])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1624 OCTAVE_CHECK_FUNC_GLUTESSCALLBACK_THREEDOTS
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1625 else
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1626 case $canonical_host_type in
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1627 *-*-mingw32* | *-*-msdosmsvc)
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
1628 AC_CHECK_HEADERS([windows.h])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1629 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1630 esac
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1631 have_opengl_incs=no
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1632 AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1633 [AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1634 [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
1635 #if defined (HAVE_WINDOWS_H)
7954
3ffc34caec65 configure fixes
John W. Eaton <jwe@octave.org>
parents: 7945
diff changeset
1636 #include <windows.h>
3ffc34caec65 configure fixes
John W. Eaton <jwe@octave.org>
parents: 7945
diff changeset
1637 #endif
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1638 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1639 break
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1640 ], [], [
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21604
diff changeset
1641 #if defined (HAVE_WINDOWS_H)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1642 # include <windows.h>
7954
3ffc34caec65 configure fixes
John W. Eaton <jwe@octave.org>
parents: 7945
diff changeset
1643 #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
1644 ])
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
1645
17197
fbee0d312af5 acinclude.m4: Remove some unnecessary double quotes around variables.
Rik <rik@octave.org>
parents: 17196
diff changeset
1646 if test $have_opengl_incs = yes; then
18866
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1647 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
1648 #if defined (HAVE_WINDOWS_H)
18866
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1649 # include <windows.h>
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1650 #endif
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1651 #if defined (HAVE_GL_GL_H)
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1652 # include <GL/gl.h>
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1653 #elif defined (HAVE_OPENGL_GL_H)
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1654 # include <OpenGL/gl.h>
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1655 #endif
95b69b880b19 Allow conpile of gl-render.cc under mingw.
John Donoghue
parents: 18854
diff changeset
1656 ])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1657 case $canonical_host_type in
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1658 *-*-mingw32* | *-*-msdosmsvc)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1659 save_LIBS="$LIBS"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1660 LIBS="$LIBS -lopengl32"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1661 AC_MSG_CHECKING([for glEnable in -lopengl32])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1662 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1663 #if HAVE_WINDOWS_H
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1664 # include <windows.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1665 #endif
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1666 #if defined (HAVE_GL_GL_H)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1667 # include <GL/gl.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1668 #elif defined (HAVE_OPENGL_GL_H)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1669 # include <OpenGL/gl.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1670 #endif
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
1671 ]], [[
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1672 glEnable(GL_SMOOTH);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1673 ]])], [OPENGL_LIBS="-lopengl32 -lglu32"])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1674
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1675 LIBS="$save_LIBS"
21374
1487a68a496a untangle configuration of OpenGL, FLTK, and Qt (bug #47263)
John W. Eaton <jwe@octave.org>
parents: 21354
diff changeset
1676 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
1677 AC_MSG_RESULT([yes])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1678 else
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
1679 AC_MSG_RESULT([no])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1680 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1681 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1682 *)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1683 ## 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
1684 AC_CHECK_LIB([GL], [glEnable], [OPENGL_LIBS="-lGL -lGLU"])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1685 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1686 esac
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1687 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
1688 fi
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1689 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
1690 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
1691 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
1692 fi
7825
13871b7de124 Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 7361
diff changeset
1693 ])
7834
caab78e7e377 added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents: 7825
diff changeset
1694 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1695 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
1696 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1697 AC_DEFUN([OCTAVE_CHECK_LIB_QHULL_OK], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1698 AC_CACHE_CHECK([whether the qhull library works],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1699 [octave_cv_lib_qhull_ok],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1700 [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1701 #include <stdio.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1702 #if defined (HAVE_LIBQHULL_LIBQHULL_H)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1703 # include <libqhull/libqhull.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1704 # include <libqhull/qset.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1705 # include <libqhull/geom.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1706 # include <libqhull/poly.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1707 # include <libqhull/io.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1708 #elif defined (HAVE_QHULL_LIBQHULL_H) || defined (HAVE_QHULL_QHULL_H)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1709 # if defined (HAVE_QHULL_LIBQHULL_H)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1710 # include <qhull/libqhull.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1711 # else
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1712 # include <qhull/qhull.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1713 # endif
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1714 # include <qhull/qset.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1715 # include <qhull/geom.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1716 # include <qhull/poly.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1717 # include <qhull/io.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1718 #elif defined (HAVE_LIBQHULL_H) || defined (HAVE_QHULL_H)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1719 # if defined (HAVE_LIBQHULL_H)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1720 # include <libqhull.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1721 # else
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1722 # include <qhull.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1723 # endif
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1724 # include <qset.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1725 # include <geom.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1726 # include <poly.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1727 # include <io.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1728 #endif
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21604
diff changeset
1729 #if defined (NEED_QHULL_VERSION)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1730 char *qh_version = "version";
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1731 #endif
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1732 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1733 int dim = 2;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1734 int n = 4;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1735 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
1736 boolT ismalloc = 0;
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
1737 return qh_new_qhull (dim, n, points, ismalloc, "qhull ", 0, stderr);
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1738 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1739 octave_cv_lib_qhull_ok=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1740 octave_cv_lib_qhull_ok=no,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1741 octave_cv_lib_qhull_ok=yes)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1742 ])
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1743 if test $octave_cv_lib_qhull_ok = yes; then
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1744 $1
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1745 :
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1746 else
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1747 $2
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1748 :
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1749 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
1750 ])
20715
5b7643257978 Remove trailing whitespace at end of lines.
Rik <rik@octave.org>
parents: 20420
diff changeset
1751 dnl
27543
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1752 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
1753 dnl
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1754 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
1755 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
1756 [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
1757 [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
1758 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
1759 #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
1760 #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
1761 # 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
1762 #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
1763 # 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
1764 #endif
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1765 ]], [[
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1766 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
1767 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
1768 int erroffset;
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1769 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
1770 return (! data);
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1771 ]])],
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1772 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
1773 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
1774 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
1775 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
1776 ])
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1777 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
1778 $1
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1779 :
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1780 else
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1781 $2
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1782 :
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1783 fi
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1784 ])
d7b18d44ae4e Check if PCRE was compiled with --enable-utf (bug #35910).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27450
diff changeset
1785 dnl
20153
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1786 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
1787 dnl
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1788 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
1789 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
1790 [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
1791 [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
1792 #include <sndfile.h>
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1793 ]], [[
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1794 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
1795 ]])],
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1796 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
1797 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
1798 ])
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1799 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
1800 $1
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1801 :
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1802 else
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1803 $2
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1804 :
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1805 fi
3b3579ad7e46 Check for a modern version of sndfile in configure scripts (bug #44976).
Rik <rik@octave.org>
parents: 19816
diff changeset
1806 ])
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
1807 dnl
15302
a8cfbc1911e4 build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents: 15295
diff changeset
1808 dnl Find a suitable termlib to use.
a8cfbc1911e4 build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents: 15295
diff changeset
1809 dnl
a8cfbc1911e4 build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents: 15295
diff changeset
1810 AC_DEFUN([OCTAVE_CHECK_LIB_TERMLIB], [
a8cfbc1911e4 build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents: 15295
diff changeset
1811 TERM_LIBS=
15338
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1812 ac_octave_save_LIBS="$LIBS"
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1813 AC_SEARCH_LIBS([tputs],
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1814 [ncurses curses termcap terminfo termlib],
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1815 [], [])
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1816 LIBS="$ac_octave_save_LIBS"
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1817 case "$ac_cv_search_tputs" in
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
1818 -l*)
15338
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1819 TERM_LIBS="$ac_cv_search_tputs"
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1820 ;;
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1821 no)
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1822 warn_termlibs="I couldn't find -ltermcap, -lterminfo, -lncurses, -lcurses, or -ltermlib!"
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1823 AC_MSG_WARN([$warn_termlibs])
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1824 ;;
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1825 esac
15302
a8cfbc1911e4 build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents: 15295
diff changeset
1826
15338
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1827 dnl Old code (9/9/2012). Delete when new code is definitely proven.
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1828 dnl
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1829 dnl for _termlib in ncurses curses termcap terminfo termlib; do
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1830 dnl AC_CHECK_LIB([${_termlib}], [tputs], [
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1831 dnl TERM_LIBS="-l${termlib}"
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1832 dnl octave_cv_lib_found_termlib=yes
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1833 dnl break])
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1834 dnl done
dc39c1d84c5b build: Use caching on more intermediate results to speed up configure.
Rik <rik@octave.org>
parents: 15336
diff changeset
1835
15302
a8cfbc1911e4 build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents: 15295
diff changeset
1836 AC_SUBST(TERM_LIBS)
7825
13871b7de124 Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 7361
diff changeset
1837 ])
7834
caab78e7e377 added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents: 7825
diff changeset
1838 dnl
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1839 dnl Check whether the Qt class QFont has the ForceIntegerMetrics enumerated
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1840 dnl type member. This property was introduced in Qt 4.7.
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1841 dnl
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1842 dnl FIXME: Delete this entirely when we can safely assume that Qt 4.7 or later
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1843 dnl is in use everywhere, or when we drop support for Qt 4.
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1844 dnl
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1845 AC_DEFUN([OCTAVE_CHECK_MEMBER_QFONT_FORCE_INTEGER_METRICS], [
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1846 AC_CACHE_CHECK([for QFont::ForceIntegerMetrics in <QFont>],
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1847 [octave_cv_decl_qfont_force_integer_metrics],
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1848 [AC_LANG_PUSH(C++)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1849 ac_octave_save_CPPFLAGS="$CPPFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1850 ac_octave_save_CXXFLAGS="$CXXFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1851 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1852 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1853 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1854 #include <QFont>
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1855 ]], [[
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1856 QFont::StyleStrategy strategy = QFont::ForceIntegerMetrics;
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1857 ]])],
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1858 octave_cv_decl_qfont_force_integer_metrics=yes,
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1859 octave_cv_decl_qfont_force_integer_metrics=no)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1860 CPPFLAGS="$ac_octave_save_CPPFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1861 CXXFLAGS="$ac_octave_save_CXXFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1862 AC_LANG_POP(C++)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1863 ])
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1864 if test $octave_cv_decl_qfont_force_integer_metrics = yes; then
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1865 AC_DEFINE(HAVE_QFONT_FORCE_INTEGER_METRICS, 1,
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1866 [Define to 1 if `ForceIntegerMetrics' is a member of `QFont'.])
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1867 fi
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1868 ])
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1869 dnl
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1870 dnl Check whether the Qt class QFont has the Monospace enumerated type member.
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1871 dnl This property was introduced in Qt 4.7.
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1872 dnl
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1873 dnl FIXME: Delete this entirely when we can safely assume that Qt 4.7 or later
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1874 dnl is in use everywhere, or when we drop support for Qt 4.
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1875 dnl
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1876 AC_DEFUN([OCTAVE_CHECK_MEMBER_QFONT_MONOSPACE], [
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1877 AC_CACHE_CHECK([for QFont::Monospace in <QFont>],
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1878 [octave_cv_decl_qfont_monospace],
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1879 [AC_LANG_PUSH(C++)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1880 ac_octave_save_CPPFLAGS="$CPPFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1881 ac_octave_save_CXXFLAGS="$CXXFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1882 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1883 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1884 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1885 #include <QFont>
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1886 ]], [[
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1887 QFont::StyleHint hint = QFont::Monospace;
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1888 ]])],
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1889 octave_cv_decl_qfont_monospace=yes,
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1890 octave_cv_decl_qfont_monospace=no)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1891 CPPFLAGS="$ac_octave_save_CPPFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1892 CXXFLAGS="$ac_octave_save_CXXFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1893 AC_LANG_POP(C++)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1894 ])
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1895 if test $octave_cv_decl_qfont_monospace = yes; then
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1896 AC_DEFINE(HAVE_QFONT_MONOSPACE, 1,
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
1897 [Define to 1 if `Monospace' is a member of `QFont'.])
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1898 fi
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1899 ])
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
1900 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1901 dnl Check for the Qhull version.
8724
a50228129dba Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents: 8676
diff changeset
1902 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1903 AC_DEFUN([OCTAVE_CHECK_QHULL_VERSION], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1904 AC_CACHE_CHECK([for qh_version in $QHULL_LIBS],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1905 [octave_cv_lib_qhull_version],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1906 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1907 #include <stdio.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1908 #if defined (HAVE_LIBQHULL_LIBQHULL_H)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1909 # include <libqhull/libqhull.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1910 # include <libqhull/qset.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1911 # include <libqhull/geom.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1912 # include <libqhull/poly.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1913 # include <libqhull/io.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1914 #elif defined (HAVE_QHULL_LIBQHULL_H) || defined (HAVE_QHULL_QHULL_H)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1915 # if defined (HAVE_QHULL_LIBQHULL_H)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1916 # include <qhull/libqhull.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1917 # else
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1918 # include <qhull/qhull.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1919 # endif
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1920 # include <qhull/qset.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1921 # include <qhull/geom.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1922 # include <qhull/poly.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1923 # include <qhull/io.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1924 #elif defined (HAVE_LIBQHULL_H) || defined (HAVE_QHULL_H)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1925 # if defined (HAVE_LIBQHULL_H)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1926 # include <libqhull.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1927 # else
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1928 # include <qhull.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1929 # endif
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1930 # include <qset.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1931 # include <geom.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1932 # include <poly.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1933 # include <io.h>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1934 #endif
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1935 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1936 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
1937 ]])],
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1938 octave_cv_lib_qhull_version=yes, octave_cv_lib_qhull_version=no)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1939 ])
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
1940 if test $octave_cv_lib_qhull_version = no; then
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1941 AC_DEFINE(NEED_QHULL_VERSION, 1,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1942 [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
1943 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1944 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
1945 dnl
22823
e2afee0041bf new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
1946 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
1947 dnl
22823
e2afee0041bf new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
1948 AC_DEFUN([OCTAVE_CHECK_QSCINTILLA], [
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1949 qt_version="$1";
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1950 use_qscintilla=no
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1951 warn_qscintilla=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1952
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1953 ## Check for Qt libraries
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1954 case "$qt_version" in
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1955 4)
24125
ed746cbfce24 * acinclude.m4: Search for version-specific qscintilla libs first.
John W. Eaton <jwe@octave.org>
parents: 24124
diff changeset
1956 octave_qscintilla_libnames="qscintilla2-qt4 qscintilla2_qt4 qt4scintilla2 qscintilla2"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1957 ;;
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1958 5)
23414
a759896c2b53 acinclude.m4: Look for "qscintilla_qt5" as another name for Qt5 scintilla library.
Rik <rik@octave.org>
parents: 23219
diff changeset
1959 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
1960 ;;
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1961 *)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1962 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
1963 ;;
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1964 esac
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1965
22823
e2afee0041bf new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
1966 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
1967
22286
f394436a4025 build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents: 22257
diff changeset
1968 ## 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
1969 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
1970 [octave_cv_lib_qscintilla],
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1971 [save_CPPFLAGS="$CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1972 save_CXXFLAGS="$CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1973 save_LDFLAGS="$LDFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1974 save_LIBS="$LIBS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1975 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1976 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1977 LDFLAGS="$QT_LDFLAGS $LDFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1978 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
1979 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
1980 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
1981 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
22456
8924139b4f21 fix test for qscintilla (bug #49018)
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
1982 #include <Qsci/qsciapis.h>
8924139b4f21 fix test for qscintilla (bug #49018)
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
1983 #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
1984 ]], [[
22456
8924139b4f21 fix test for qscintilla (bug #49018)
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
1985 QsciLexer *lexer = new QsciLexerCPP ();
8924139b4f21 fix test for qscintilla (bug #49018)
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
1986 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
1987 ]])],
f394436a4025 build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents: 22257
diff changeset
1988 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
1989 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
1990 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
1991 break
f394436a4025 build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents: 22257
diff changeset
1992 fi
f394436a4025 build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents: 22257
diff changeset
1993 done
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1994 CPPFLAGS="$save_CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1995 CXXFLAGS="$save_CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1996 LDFLAGS="$save_LDFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1997 LIBS="$save_LIBS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1998 AC_LANG_POP([C++])
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
1999 ])
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 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
2002 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
2003 else
22286
f394436a4025 build: improve QScintilla detection to work with distro naming schemes (bug #48773)
Mike Miller <mtmiller@octave.org>
parents: 22257
diff changeset
2004 ## 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
2005 ## 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
2006 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
2007 OCTAVE_CHECK_QSCINTILLA_VERSION
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2008 AC_DEFINE(HAVE_QSCINTILLA, 1,
22250
2fd4f1a3f4a8 allow building with Qt5 (bug #40252)
John W. Eaton <jwe@octave.org>
parents: 22234
diff changeset
2009 [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
2010
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2011 save_CPPFLAGS="$CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2012 save_CXXFLAGS="$CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2013 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2014 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2015 AC_LANG_PUSH(C++)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2016 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
2017 AC_LANG_POP(C++)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2018 CPPFLAGS="$save_CPPFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2019 CXXFLAGS="$save_CXXFLAGS"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2020
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2021 use_qscintilla=yes
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2022 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2023 fi
22823
e2afee0041bf new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
2024 ])
e2afee0041bf new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
2025 dnl
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2026 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
2027 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
2028 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
2029 dnl
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2030 AC_DEFUN([OCTAVE_CHECK_QSCINTILLA_VERSION], [
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2031 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
2032 [octave_cv_version_2_6_0],
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2033 [AC_LANG_PUSH(C++)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2034 ac_octave_save_CPPFLAGS="$CPPFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2035 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2036 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2037 #include <Qsci/qsciglobal.h>
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2038 ]], [[
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2039 #if QSCINTILLA_VERSION < 0x020600
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2040 #error Old FindFirst function found.
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2041 #endif
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2042 ]])],
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2043 octave_cv_version_2_6_0=yes,
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2044 octave_cv_version_2_6_0=no)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2045 CPPFLAGS="$ac_octave_save_CPPFLAGS"
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2046 AC_LANG_POP(C++)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2047 ])
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
2048 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
2049 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
2050 [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
2051 fi
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2052 ])
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2053 dnl
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2054 dnl OCTAVE_CHECK_QT
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2055 dnl
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2056 AC_DEFUN([OCTAVE_CHECK_QT], [
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2057 octave_qt_versions="$1"
22257
945e7f9c11ff build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents: 22255
diff changeset
2058
945e7f9c11ff build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents: 22255
diff changeset
2059 build_qt_gui=no
945e7f9c11ff build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents: 22255
diff changeset
2060 build_qt_graphics=no
945e7f9c11ff build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents: 22255
diff changeset
2061 use_qscintilla=no
945e7f9c11ff build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents: 22255
diff changeset
2062 win32_terminal=no
945e7f9c11ff build: fix configure --without-qt or --with-qt
Mike Miller <mtmiller@octave.org>
parents: 22255
diff changeset
2063
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2064 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
2065 OCTAVE_CHECK_QT_VERSION([$ver])
22250
2fd4f1a3f4a8 allow building with Qt5 (bug #40252)
John W. Eaton <jwe@octave.org>
parents: 22234
diff changeset
2066 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
2067 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
2068 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
2069 elif test -n "$QT_MODULES_AVAILABLE"; then
25114
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2070 ## If some modules were found for $ver, then warn about possible
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2071 ## incomplete or broken Qt installation instead of checking for
25134
5fccb7373bc4 allow configure to continue if some Qt tools are found (bug #53571)
John W. Eaton <jwe@octave.org>
parents: 25119
diff changeset
2072 ## next version in the list. Don't attempt a similar check for
27956
2310164737b3 fix many spelling errors (bug #57613)
John W. Eaton <jwe@octave.org>
parents: 26889
diff changeset
2073 ## tools here because Qt4 and Qt5 tools may be installed with
25134
5fccb7373bc4 allow configure to continue if some Qt tools are found (bug #53571)
John W. Eaton <jwe@octave.org>
parents: 25119
diff changeset
2074 ## the same name so determining whether there is a mix of versions
5fccb7373bc4 allow configure to continue if some Qt tools are found (bug #53571)
John W. Eaton <jwe@octave.org>
parents: 25119
diff changeset
2075 ## 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
2076 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
2077 break
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2078 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2079 done
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2080
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2081 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
2082 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
2083 if test x"$have_qt_version" = x4; then
24810
8a92f442c4a2 configure.ac: Overhaul file (bug #53186).
Rik <rik@octave.org>
parents: 24798
diff changeset
2084 AC_DEFINE(HAVE_QT4, 1, [Define to 1 if using Qt version 4.])
27839
a8c5255c34b1 Announce deprecation of Qt4 and removal in Octave version 7.
Rik <rik@octave.org>
parents: 27543
diff changeset
2085 warn_qt_ver="Use of Qt version 4 is deprecated. Support will be removed in Octave version 7."
a8c5255c34b1 Announce deprecation of Qt4 and removal in Octave version 7.
Rik <rik@octave.org>
parents: 27543
diff changeset
2086 OCTAVE_CONFIGURE_WARNING([warn_qt_ver])
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2087 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2088 if test x"$have_qt_version" = x5; then
24810
8a92f442c4a2 configure.ac: Overhaul file (bug #53186).
Rik <rik@octave.org>
parents: 24798
diff changeset
2089 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
2090 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2091 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
2092 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
2093 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
2094 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
2095 else
cc21f66ecb1c display more info in configure summary about Qt version and missing features
John W. Eaton <jwe@octave.org>
parents: 25061
diff changeset
2096 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
2097 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
2098 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
2099 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
2100 fi
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2101 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
2102 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
2103 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2104 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
2105 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
2106 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2107 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
2108 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
2109 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2110 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
2111 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
2112 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2113 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
2114 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
2115 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2116 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
2117 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
2118 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2119 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
2120 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
2121 fi
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2122 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
2123 OCTAVE_CONFIGURE_WARNING([warn_qscintilla])
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2124 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2125 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2126
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2127 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
2128 AM_CONDITIONAL([AMCOND_BUILD_QT_GRAPHICS], [test $build_qt_graphics = yes])
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2129 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
2130 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
2131 ])
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2132 dnl
24798
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2133 dnl Check whether QOffscreenSurface is present.
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2134 dnl
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2135 AC_DEFUN([OCTAVE_CHECK_QT_OPENGL_OFFSCREEN_OK], [
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2136 dnl Normally the language and compiler flags would be set and restored
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2137 dnl inside of the AC_CACHE_CHECK body. Because we also need to check for
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2138 dnl Qt header files associated with the compilation test, set and restore
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2139 dnl these values outside of the AC_CACHE_CHECK for this macro only.
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2140 AC_LANG_PUSH(C++)
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2141 ac_octave_save_CPPFLAGS="$CPPFLAGS"
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2142 ac_octave_save_CXXFLAGS="$CXXFLAGS"
26881
4af9840f9ce5 make building with Qt4 QGLWidget work again (bug #55735)
John W. Eaton <jwe@octave.org>
parents: 26672
diff changeset
2143 CPPFLAGS="$QT_OPENGL_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
24798
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2144 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2145 AC_CHECK_HEADERS([QOffscreenSurface])
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2146 AC_CACHE_CHECK([whether Qt supports full offscreen OpenGL rendering],
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2147 [octave_cv_qt_opengl_os_ok],
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2148 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2149 #if HAVE_WINDOWS_H
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2150 # include <windows.h>
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2151 #endif
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2152 #if defined (HAVE_GL_GL_H)
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2153 # include <GL/gl.h>
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2154 #elif defined (HAVE_OPENGL_GL_H)
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2155 # include <OpenGL/gl.h>
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2156 #endif
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2157 #if defined (HAVE_GL_GLU_H)
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2158 # include <GL/glu.h>
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2159 #elif defined HAVE_OPENGL_GLU_H || defined HAVE_FRAMEWORK_OPENGL
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2160 # include <OpenGL/glu.h>
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2161 #endif
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2162 #if defined (HAVE_QOPENGLWIDGET)
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2163 # include <QOpenGLWidget>
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2164 # include <QOpenGLContext>
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2165 #endif
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2166 #if defined (HAVE_QOFFSCREENSURFACE)
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2167 # include <QOffscreenSurface>
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2168 #endif
25061
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
2169 QOpenGLContext ctx;
24798
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2170 QOffscreenSurface surf;
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2171 ]])],
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2172 octave_cv_qt_opengl_os_ok=yes,
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2173 octave_cv_qt_opengl_os_ok=no)
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2174 ])
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2175 CPPFLAGS="$ac_octave_save_CPPFLAGS"
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2176 CXXFLAGS="$ac_octave_save_CXXFLAGS"
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2177 AC_LANG_POP(C++)
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2178 if test $octave_cv_qt_opengl_os_ok = yes; then
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2179 $1
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2180 :
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2181 else
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2182 $2
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2183 :
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2184 fi
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2185 ])
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2186 dnl
20420
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2187 dnl Check whether Qt works with full OpenGL support
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2188 dnl
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2189 AC_DEFUN([OCTAVE_CHECK_QT_OPENGL_OK], [
24144
8e034cb195f1 configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents: 24143
diff changeset
2190 dnl Normally the language and compiler flags would be set and restored
8e034cb195f1 configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents: 24143
diff changeset
2191 dnl inside of the AC_CACHE_CHECK body. Because we also need to check for
8e034cb195f1 configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents: 24143
diff changeset
2192 dnl Qt header files associated with the compilation test, set and restore
8e034cb195f1 configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents: 24143
diff changeset
2193 dnl these values outside of the AC_CACHE_CHECK for this macro only.
8e034cb195f1 configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents: 24143
diff changeset
2194 AC_LANG_PUSH(C++)
8e034cb195f1 configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents: 24143
diff changeset
2195 ac_octave_save_CPPFLAGS="$CPPFLAGS"
8e034cb195f1 configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents: 24143
diff changeset
2196 ac_octave_save_CXXFLAGS="$CXXFLAGS"
26881
4af9840f9ce5 make building with Qt4 QGLWidget work again (bug #55735)
John W. Eaton <jwe@octave.org>
parents: 26672
diff changeset
2197 CPPFLAGS="$QT_OPENGL_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
24144
8e034cb195f1 configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents: 24143
diff changeset
2198 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
25862
e5a73a8c116c use wrapper class to call OpenGL functions
John W. Eaton <jwe@octave.org>
parents: 25844
diff changeset
2199 AC_CHECK_HEADERS([QOpenGLWidget QGLWidget QGLFunctions_1_1])
20420
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2200 AC_CACHE_CHECK([whether Qt works with OpenGL and GLU],
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2201 [octave_cv_qt_opengl_ok],
24144
8e034cb195f1 configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents: 24143
diff changeset
2202 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
20420
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2203 #if HAVE_WINDOWS_H
24142
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2204 # include <windows.h>
20420
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2205 #endif
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2206 #if defined (HAVE_GL_GL_H)
24142
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2207 # include <GL/gl.h>
20420
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2208 #elif defined (HAVE_OPENGL_GL_H)
24142
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2209 # include <OpenGL/gl.h>
20420
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2210 #endif
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21604
diff changeset
2211 #if defined (HAVE_GL_GLU_H)
24142
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2212 # include <GL/glu.h>
20420
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2213 #elif defined HAVE_OPENGL_GLU_H || defined HAVE_FRAMEWORK_OPENGL
24142
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2214 # include <OpenGL/glu.h>
20420
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2215 #endif
24142
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2216 #if defined (HAVE_QOPENGLWIDGET)
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2217 # include <QOpenGLWidget>
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2218 # define OCTAVE_QT_OPENGL_WIDGET QOpenGLWidget
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2219 #elif defined (HAVE_QGLWIDGET)
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2220 # include <QGLWidget>
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2221 # define OCTAVE_QT_OPENGL_WIDGET QGLWidget
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2222 #endif
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2223 class gl_widget : public OCTAVE_QT_OPENGL_WIDGET
20420
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2224 {
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2225 public:
24142
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2226 gl_widget (QWidget *parent = 0)
59cdf06c940e use QOpenGLWidget if it is available
John W. Eaton <jwe@octave.org>
parents: 24125
diff changeset
2227 : OCTAVE_QT_OPENGL_WIDGET (parent) { }
20420
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2228 ~gl_widget () {}
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2229 };
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2230 ]], [[
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2231 gl_widget widget;
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2232 ]])],
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2233 octave_cv_qt_opengl_ok=yes,
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2234 octave_cv_qt_opengl_ok=no)
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2235 ])
24144
8e034cb195f1 configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents: 24143
diff changeset
2236 CPPFLAGS="$ac_octave_save_CPPFLAGS"
8e034cb195f1 configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents: 24143
diff changeset
2237 CXXFLAGS="$ac_octave_save_CXXFLAGS"
8e034cb195f1 configure: set and restore compiler flags when testing for Qt header files
Mike Miller <mtmiller@octave.org>
parents: 24143
diff changeset
2238 AC_LANG_POP(C++)
20420
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2239 if test $octave_cv_qt_opengl_ok = yes; then
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2240 $1
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2241 :
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2242 else
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2243 $2
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2244 :
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2245 fi
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2246 ])
6cfbf412a2c3 configure.ac: Test that Qt and OpenGL can be used together (bug #45672)
Mike Miller <mtmiller@octave.org>
parents: 20416
diff changeset
2247 dnl
25135
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2248 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
2249 dnl
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2250 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
2251 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
2252 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
2253 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
2254 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
2255 if test -n "$QTCHOOSER"; then
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2256 m4_toupper([$1])FLAGS="-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
2257 fi
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2258 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
2259 else
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2260 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
2261 fi
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2262 else
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2263 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
2264 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
2265 fi
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2266 ])
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2267 dnl
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2268 dnl Check whether Qt VERSION is present, supports QtOpenGL and
24798
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2269 dnl QScintilla, and will work for Octave.
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2270 dnl
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2271 dnl OCTAVE_CHECK_QT_VERSION(VERSION)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2272 dnl
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2273 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
2274 QT_CPPFLAGS=
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2275 QT_LDFLAGS=
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2276 QT_LIBS=
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2277
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2278 qt_version="$1";
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2279
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2280 build_qt_gui=yes
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2281 build_qt_graphics=no
24798
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2282 have_qt_opengl_offscreen=no
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2283 win32_terminal=no
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2284
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2285 warn_qt_libraries=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2286 warn_qt_version=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2287 warn_qt_tools=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2288 warn_qt_setvbuf=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2289 warn_qt_lib_fcns=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2290 warn_qt_abstract_item_model=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2291 warn_qt_opengl=""
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2292
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2293 ## Check for Qt libraries
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2294 case "$qt_version" in
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2295 4)
26889
8295dfd22a02 Backed out changeset 4b256f00650c
John W. Eaton <jwe@octave.org>
parents: 26887
diff changeset
2296 QT_OPENGL_MODULE="QtOpenGL"
26027
98d7a111786a Add SVG convertion option for printing to PDF and raster outputs (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 25931
diff changeset
2297 QT_MODULES="QtCore QtGui QtNetwork QtHelp QtXml"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2298 ;;
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2299 5)
26889
8295dfd22a02 Backed out changeset 4b256f00650c
John W. Eaton <jwe@octave.org>
parents: 26887
diff changeset
2300 QT_OPENGL_MODULE="Qt5OpenGL"
26027
98d7a111786a Add SVG convertion option for printing to PDF and raster outputs (bug #52193)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 25931
diff changeset
2301 QT_MODULES="Qt5Core Qt5Gui Qt5Network Qt5PrintSupport Qt5Help Qt5Xml"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2302 ;;
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2303 *)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2304 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
2305 ;;
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2306 esac
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2307
25114
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2308 ## 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
2309 PKG_CHECK_MODULES(QT, [$QT_MODULES],
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2310 [],
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2311 [build_qt_gui=no
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2312 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
2313
25114
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2314 ## 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
2315 ## 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
2316 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
2317 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
2318 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
2319 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
2320 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
2321 else
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2322 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
2323 fi
f191e1a26095 if a Qt version appears partially installed, don't check another version
John W. Eaton <jwe@octave.org>
parents: 25098
diff changeset
2324 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
2325
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2326 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
2327 ## 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
2328 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
2329 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
2330 QT_LIBS="$($PKG_CONFIG --libs-only-l $QT_MODULES | $SED -e 's/^ *$//')"
26889
8295dfd22a02 Backed out changeset 4b256f00650c
John W. Eaton <jwe@octave.org>
parents: 26887
diff changeset
2331 QT_OPENGL_CPPFLAGS="$($PKG_CONFIG --cflags-only-I $QT_OPENGL_MODULE | $SED -e 's/^ *$//')"
8295dfd22a02 Backed out changeset 4b256f00650c
John W. Eaton <jwe@octave.org>
parents: 26887
diff changeset
2332 QT_OPENGL_LDFLAGS="$($PKG_CONFIG --libs-only-L $QT_OPENGL_MODULE | $SED -e 's/^ *$//')"
8295dfd22a02 Backed out changeset 4b256f00650c
John W. Eaton <jwe@octave.org>
parents: 26887
diff changeset
2333 QT_OPENGL_LIBS="$($PKG_CONFIG --libs-only-l $QT_OPENGL_MODULE | $SED -e 's/^ *$//')"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2334
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2335 case $host_os in
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2336 *darwin*)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2337 ## Qt might be installed in framework
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2338 if test -z "$QT_LIBS"; then
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2339 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
2340 QT_LIBS="`$PKG_CONFIG --libs-only-other $QT_MODULES | tr ' ' '\n' | $GREP -v -e '-F' | uniq | tr '\n' ' '`"
26889
8295dfd22a02 Backed out changeset 4b256f00650c
John W. Eaton <jwe@octave.org>
parents: 26887
diff changeset
2341 QT_OPENGL_LDFLAGS="`$PKG_CONFIG --libs-only-other $QT_OPENGL_MODULE | tr ' ' '\n' | $GREP -e '-F' | uniq | tr '\n' ' '`"
8295dfd22a02 Backed out changeset 4b256f00650c
John W. Eaton <jwe@octave.org>
parents: 26887
diff changeset
2342 QT_OPENGL_LIBS="`$PKG_CONFIG --libs-only-other $QT_OPENGL_MODULE | tr ' ' '\n' | $GREP -v -e '-F' | uniq | tr '\n' ' '`"
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2343 ## 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
2344 ## of the -F flag
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2345 AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS],
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2346 [test $link_all_deps = yes || test -n "$QT_LDFLAGS"])
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2347 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2348 ;;
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2349 esac
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2350
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2351 if test $qt_version = 4; then
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2352 ## Check for Qt4
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2353 if ! `$PKG_CONFIG --atleast-version=4.0.0 QtCore`; then
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2354 build_qt_gui=no
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2355 warn_qt_version="Qt >= 4.0.0 not found; disabling Qt GUI"
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2356 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2357 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2358 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2359
25119
14b9e2a1f3e1 if some Qt tools are instaslled, don't check for another version
John W. Eaton <jwe@octave.org>
parents: 25114
diff changeset
2360 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
2361 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
2362
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2363 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
2364 AC_CHECK_TOOLS(QTCHOOSER, [qtchooser])
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2365
25135
ab3904f253c5 correctly track available/missing Qt tools when qtchooser is not found
John W. Eaton <jwe@octave.org>
parents: 25134
diff changeset
2366 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
2367 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
2368 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
2369 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
2370 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
2371 OCTAVE_CHECK_QT_TOOL([qhelpgenerator])
24873
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2372
25119
14b9e2a1f3e1 if some Qt tools are instaslled, don't check for another version
John W. Eaton <jwe@octave.org>
parents: 25114
diff changeset
2373 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
2374 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
2375 build_qt_gui=no
23154
80a2434ba83c refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents: 23088
diff changeset
2376 MOC_QTVER=
80a2434ba83c refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents: 23088
diff changeset
2377 UIC_QTVER=
80a2434ba83c refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents: 23088
diff changeset
2378 RCC_QTVER=
80a2434ba83c refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents: 23088
diff changeset
2379 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
2380 QCOLLECTIONGENERATOR_QTVER=
24873
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2381 QHELPGENERATOR_QTVER=
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2382 MOCFLAGS=
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2383 UICFLAGS=
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2384 RCCFLAGS=
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2385 LRELEASEFLAGS=
24938
4f1da669b610 build: export and use qcollectiongenerator command line options correctly
Mike Miller <mtmiller@octave.org>
parents: 24890
diff changeset
2386 QCOLLECTIONGENERATORFLAGS=
24873
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2387 QHELPGENERATORFLAGS=
23154
80a2434ba83c refactor checks for Qt tools (bug #50214)
John W. Eaton <jwe@octave.org>
parents: 23088
diff changeset
2388 $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
2389 $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
2390 $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
2391 $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
2392 $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
2393 $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
2394 $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
2395 $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
2396 $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
2397 $as_unset ac_cv_prog_ac_ct_QCOLLECTIONGENERATOR_QTVER
24873
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2398 $as_unset ac_cv_prog_QHELPGENERATOR_QTVER
486bc22482ca Improve Doxygen generation.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24837
diff changeset
2399 $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
2400 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2401 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2402
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2403 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
2404 case $host_os in
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2405 mingw* | msdosmsvc*)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2406 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
2407 [build_qt_gui=no
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2408 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
2409 ;;
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2410 *)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2411 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
2412 AC_SEARCH_LIBS([openpty], [util],
24810
8a92f442c4a2 configure.ac: Overhaul file (bug #53186).
Rik <rik@octave.org>
parents: 24798
diff changeset
2413 [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
2414 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
2415 [build_qt_gui=no
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2416 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
2417 ;;
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2418 esac
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2419 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2420
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2421 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
2422 OCTAVE_CHECK_FUNC_QABSTRACTITEMMODEL_BEGINRESETMODEL
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2423
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2424 if test $octave_cv_func_qabstractitemmodel_beginresetmodel = no; then
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2425 build_qt_gui=no
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2426 warn_qt_abstract_item_model="QAbstractItemModel::beginResetModel not found; disabling Qt GUI"
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2427 ## Invalidate cache so that this test will be done again if we
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2428 ## perform the test with a different Qt version.
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2429 $as_unset octave_cv_func_qabstractitemmodel_beginresetmodel
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2430 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2431 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2432
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2433 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
2434 ## 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
2435 ## 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
2436
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2437 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
2438 [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
2439
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2440 AC_LANG_PUSH(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2441 ac_octave_save_CPPFLAGS="$CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2442 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2443 AC_CHECK_HEADERS([QStandardPaths])
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2444 CPPFLAGS="$ac_octave_save_CPPFLAGS"
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2445 AC_LANG_POP(C++)
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2446
22255
8e18e364a686 improve checks for Qt when Qt 5 is not installed
John W. Eaton <jwe@octave.org>
parents: 22250
diff changeset
2447 ## 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
2448 ## 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
2449 ## 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
2450
27842
e79999c5d782 fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents: 27839
diff changeset
2451 OCTAVE_CHECK_FUNC_QCOMBOBOX_SETCURRENTTEXT
28846
2219027f5bd4 avoid deprecated Qt QFontMetrics::width function
John W. Eaton <jwe@octave.org>
parents: 28845
diff changeset
2452 OCTAVE_CHECK_FUNC_QFONTMETRICS_HORIZONTAL_ADVANCE
25046
a4c687fec320 gui: set Qt Application and Desktop metadata for desktop integration (bug #53102)
Mike Miller <mtmiller@octave.org>
parents: 25042
diff changeset
2453 OCTAVE_CHECK_FUNC_QGUIAPPLICATION_SETDESKTOPFILENAME
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2454 OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONRESIZEMODE
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2455 OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONSCLICKABLE
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2456 OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONSMOVABLE
25061
5fef743c34d7 build: Check for new help query member in qt 5.9 (bug #53006).
Torsten <mttl@mailbox.org>
parents: 25054
diff changeset
2457 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
2458 OCTAVE_CHECK_NEW_QHELPINDEXWIDGET_API
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2459 OCTAVE_CHECK_FUNC_QINSTALLMESSAGEHANDLER
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
2460 OCTAVE_CHECK_FUNC_QLINEEDIT_SETPLACEHOLDERTEXT
28835
2735fb9007e9 avoid QList deprecated function warnings
John W. Eaton <jwe@octave.org>
parents: 28527
diff changeset
2461 OCTAVE_CHECK_FUNC_QLIST_ITERATOR_CONSTRUCTOR
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2462 OCTAVE_CHECK_FUNC_QMOUSEEVENT_LOCALPOS
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2463 OCTAVE_CHECK_FUNC_QOBJECT_FINDCHILDREN_ACCEPTS_FINDCHILDOPTIONS
25884
4e108574385c Improve OpenGL rendering on high resolution screens with Qt 5 (bug #49053)
John Swensen <jpswensen@gmail.com>
parents: 25862
diff changeset
2464 OCTAVE_CHECK_FUNC_QSCREEN_DEVICEPIXELRATIO
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2465 OCTAVE_CHECK_FUNC_QTABWIDGET_SETMOVABLE
24827
1e0718c1867c eliminate most Qt version checks
John W. Eaton <jwe@octave.org>
parents: 24825
diff changeset
2466 OCTAVE_CHECK_FUNC_QTMESSAGEHANDLER_ACCEPTS_QMESSAGELOGCONTEXT
27215
274766cae722 allow building with Qt4 to work again
John W. Eaton <jwe@octave.org>
parents: 27134
diff changeset
2467 OCTAVE_CHECK_FUNC_QWHEELEVENT_ANGLEDELTA
29048
440ace36950e avoid warnings about deprecated QWheelEvent::pos method
John W. Eaton <jwe@octave.org>
parents: 29047
diff changeset
2468 OCTAVE_CHECK_FUNC_QWHEELEVENT_POSITION
24093
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
2469 OCTAVE_CHECK_MEMBER_QFONT_FORCE_INTEGER_METRICS
7d9ba57201b4 configure: improve Qt feature tests for functionality and consistency
Mike Miller <mtmiller@octave.org>
parents: 24077
diff changeset
2470 OCTAVE_CHECK_MEMBER_QFONT_MONOSPACE
24821
88665923596c Make variable editor code compile under Qt4 (bug #53259)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24810
diff changeset
2471 OCTAVE_HAVE_QGUIAPPLICATION
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2472
28845
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
2473 OCTAVE_CHECK_QREGION_ITERATORS
29049
461bd8b9ce91 use Qt::SplitBehavior enum and values if available
John W. Eaton <jwe@octave.org>
parents: 29048
diff changeset
2474 OCTAVE_CHECK_QT_SPLITBEHAVIOR_ENUM
28845
50c112129700 avoid deprecated Qt QRegion::rects function
John W. Eaton <jwe@octave.org>
parents: 28835
diff changeset
2475
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2476 if test -n "$OPENGL_LIBS"; then
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2477 OCTAVE_CHECK_QT_OPENGL_OK([build_qt_graphics=yes],
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2478 [warn_qt_opengl="Qt does not work with the OpenGL libs (GL and GLU); disabling OpenGL graphics with Qt GUI"])
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2479
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2480 if test $build_qt_graphics = yes; then
24837
ae6679369a80 Rely on QOffscreenSurface functionality rather than its presence (bug #53278)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24827
diff changeset
2481 AC_DEFINE(HAVE_QT_GRAPHICS, 1, [Define to 1 if Qt works with OpenGL libs (GL and GLU)])
24798
45470049a43f Allow getframe and print to work without osmesa (bug #53186).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24623
diff changeset
2482 OCTAVE_CHECK_QT_OPENGL_OFFSCREEN_OK([have_qt_opengl_offscreen=yes])
24837
ae6679369a80 Rely on QOffscreenSurface functionality rather than its presence (bug #53278)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24827
diff changeset
2483 if test $have_qt_opengl_offscreen = yes; then
ae6679369a80 Rely on QOffscreenSurface functionality rather than its presence (bug #53278)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24827
diff changeset
2484 AC_DEFINE(HAVE_QT_OFFSCREEN, 1, [Define to 1 if Qt handles offscreen OpenGL rendering])
ae6679369a80 Rely on QOffscreenSurface functionality rather than its presence (bug #53278)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 24827
diff changeset
2485 fi
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2486 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2487 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2488
22823
e2afee0041bf new configure option, --without-qscintilla
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
2489 OCTAVE_CHECK_QSCINTILLA([$qt_version])
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2490
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2491 fi
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2492 AC_SUBST(MOCFLAGS)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2493 AC_SUBST(UICFLAGS)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2494 AC_SUBST(RCCFLAGS)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2495 AC_SUBST(LRELEASEFLAGS)
24938
4f1da669b610 build: export and use qcollectiongenerator command line options correctly
Mike Miller <mtmiller@octave.org>
parents: 24890
diff changeset
2496 AC_SUBST(QCOLLECTIONGENERATORFLAGS)
4f1da669b610 build: export and use qcollectiongenerator command line options correctly
Mike Miller <mtmiller@octave.org>
parents: 24890
diff changeset
2497 AC_SUBST(QHELPGENERATORFLAGS)
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2498 AC_SUBST(QT_CPPFLAGS)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2499 AC_SUBST(QT_LDFLAGS)
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2500 AC_SUBST(QT_LIBS)
26881
4af9840f9ce5 make building with Qt4 QGLWidget work again (bug #55735)
John W. Eaton <jwe@octave.org>
parents: 26672
diff changeset
2501 AC_SUBST(QT_OPENGL_CPPFLAGS)
4af9840f9ce5 make building with Qt4 QGLWidget work again (bug #55735)
John W. Eaton <jwe@octave.org>
parents: 26672
diff changeset
2502 AC_SUBST(QT_OPENGL_LDFLAGS)
25931
332be8be16eb dynamically load qt graphics
John W. Eaton <jwe@octave.org>
parents: 25884
diff changeset
2503 AC_SUBST(QT_OPENGL_LIBS)
22234
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2504 ])
66dd260512a4 allow configure to select Qt version
John W. Eaton <jwe@octave.org>
parents: 22208
diff changeset
2505 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2506 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
2507 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
2508 dnl is already set.
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2509 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2510 AC_DEFUN([OCTAVE_CHECK_SIZEOF_FORTRAN_INTEGER], [
22986
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2511 AC_CACHE_CHECK([default size of Fortran INTEGER],
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2512 [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
2513 [ac_octave_save_FFLAGS="$FFLAGS"
22986
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2514 FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG"
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2515 AC_LANG_PUSH(Fortran 77)
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2516 AC_RUN_IFELSE([AC_LANG_PROGRAM(,[[
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2517 integer*8 n8
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2518 integer n
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2519 c Generate -2**33 + 1.
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2520 n8 = 2
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2521 n8 = -4 * (n8 ** 30)
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2522 n8 = n8 + 1
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2523 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
2524 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
2525 n = n8
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2526 if (n .ne. n8) stop 1
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2527 ]])],
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2528 octave_cv_sizeof_fortran_integer=8,
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2529 octave_cv_sizeof_fortran_integer=4,
21707d6a02c7 make --enable-64 the default
John W. Eaton <jwe@octave.org>
parents: 22899
diff changeset
2530 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
2531 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
2532 FFLAGS="$ac_octave_save_FFLAGS"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2533 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2534 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2535 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
2536 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
2537 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
2538 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
2539 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
2540 dnl
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2541 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
2542 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
2543 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
2544 dnl Current API functions present in SUNDIALS version 4
27013
b37c1656aa42 configure: test all SUNKLU functions after core SUNDIALS features (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26992
diff changeset
2545 AC_CHECK_FUNCS([IDASetJacFn IDASetLinearSolver SUNLinSol_Dense])
26991
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2546 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
2547 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
2548 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
2549 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
2550 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
2551 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
2552 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
2553 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
2554 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
2555 && 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
2556 && 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
2557 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
2558 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
2559 && 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
2560 && 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
2561 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
2562 else
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2563 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
2564 fi
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2565 AC_MSG_RESULT([$octave_have_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
2566 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
2567 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
2568 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
2569 fi
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2570 ])
c188513f5496 configure: disable building with SUNDIALS when the API is too old (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26938
diff changeset
2571 dnl
23981
6420142ff32c configure: fix capitalization of SUNDIALS, reword related terms
Mike Miller <mtmiller@octave.org>
parents: 23980
diff changeset
2572 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
2573 dnl precision realtype.
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2574 dnl
23980
eb6602171d59 configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents: 23836
diff changeset
2575 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
2576 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
2577 [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
2578 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
22899
31bd8a50d44c Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents: 22890
diff changeset
2579 #if defined (HAVE_IDA_IDA_H)
26900
ebe7e12765ba fix sundials configure warnings (bug #55911)
John W. Eaton <jwe@octave.org>
parents: 26898
diff changeset
2580 # include <ida/ida.h>
22899
31bd8a50d44c Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents: 22890
diff changeset
2581 #endif
31bd8a50d44c Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents: 22890
diff changeset
2582 #include <assert.h>
31bd8a50d44c Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents: 22890
diff changeset
2583 ]], [[
23980
eb6602171d59 configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents: 23836
diff changeset
2584 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
2585 "SUNDIALS is not configured for double precision");
22899
31bd8a50d44c Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents: 22890
diff changeset
2586 ]])],
23980
eb6602171d59 configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents: 23836
diff changeset
2587 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
2588 octave_cv_sundials_realtype_is_double=no)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2589 ])
23980
eb6602171d59 configure: make SUNDIALS double precision test cross-compile-safe (bug #51904)
Mike Miller <mtmiller@octave.org>
parents: 23836
diff changeset
2590 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
2591 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
2592 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
2593 fi
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2594 ])
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2595 dnl
26894
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2596 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
2597 dnl enabled.
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2598 dnl
26894
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2599 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
2600 ## 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
2601 ## 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
2602 ## 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
2603 ## 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
2604 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
2605 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
2606 [#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
2607 # include <klu.h>
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2608 #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
2609 # include <klu/klu.h>
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2610 #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
2611 # include <suitesparse/klu.h>
58e300954518 search for klu.h in more places (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26937
diff changeset
2612 #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
2613 # 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
2614 #endif
cfa2a65c9fdc fix sunlinsol_klu.h detection with sundials 4.x (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26923
diff changeset
2615 ])
26910
075c4d3bf1de use OCTAVE_CHECK_LIB to check for sundials_sunlinsolklu library
John W. Eaton <jwe@octave.org>
parents: 26909
diff changeset
2616 OCTAVE_CHECK_LIB(sundials_sunlinsolklu, SUNLINSOL_KLU, [],
26937
cfa2a65c9fdc fix sunlinsol_klu.h detection with sundials 4.x (bug #55950)
John W. Eaton <jwe@octave.org>
parents: 26923
diff changeset
2617 [], [SUNKLU], [],
26992
05f389459461 configure: avoid excessive SUNDIALS warning messages when already disabled
Mike Miller <mtmiller@octave.org>
parents: 26991
diff changeset
2618 [don't use SUNDIALS SUNLINSOL_KLU library, disable ode15i and ode15s sparse Jacobian],
27013
b37c1656aa42 configure: test all SUNKLU functions after core SUNDIALS features (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26992
diff changeset
2619 [AC_CHECK_FUNCS([SUNLinSol_KLU SUNKLU])
b37c1656aa42 configure: test all SUNKLU functions after core SUNDIALS features (bug #55937)
Mike Miller <mtmiller@octave.org>
parents: 26992
diff changeset
2620 AC_CACHE_CHECK([whether compiling a program that calls SUNKLU works],
26910
075c4d3bf1de use OCTAVE_CHECK_LIB to check for sundials_sunlinsolklu library
John W. Eaton <jwe@octave.org>
parents: 26909
diff changeset
2621 [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
2622 [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
2623 #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
2624 #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
2625 #endif
26895
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2626 #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
2627 #include <klu.h>
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2628 #endif
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2629 #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
2630 #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
2631 #endif
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2632 #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
2633 #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
2634 #endif
a1acd11bad19 Directly include klu.h in __ode15__.cc (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26894
diff changeset
2635 #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
2636 #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
2637 #endif
26894
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2638 #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
2639 #include <sunlinsol/sunlinsol_klu.h>
23021
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2640 #endif
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2641 ]], [[
26894
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2642 SUNKLU (0, 0);
23021
6094018f5e72 refactor configure checks for Sundials (bug #50003)
John W. Eaton <jwe@octave.org>
parents: 23017
diff changeset
2643 ]])],
26894
ee6300e77c92 Update detection of sundials in the build system (bug #52475).
Carlo de Falco <carlo.defalco@polimi.it>
parents: 26889
diff changeset
2644 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
2645 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
2646 ])])
26923
c81b471cdb28 build: avoid test syntax error in sundials configuration (bug #55926)
Mike Miller <mtmiller@octave.org>
parents: 26910
diff changeset
2647 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
2648 && 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
2649 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
2650 [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
2651 else
26992
05f389459461 configure: avoid excessive SUNDIALS warning messages when already disabled
Mike Miller <mtmiller@octave.org>
parents: 26991
diff changeset
2652 warn_sundials_sunlinsol_klu="SUNDIALS IDA library not configured with SUNLINSOL_KLU or sunlinksol_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
2653 OCTAVE_CONFIGURE_WARNING([warn_sundials_sunlinsol_klu])
22899
31bd8a50d44c Add Sundials library support
Francesco Faccio <francesco.faccio@mail.polimi.it>
parents: 22890
diff changeset
2654 fi
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2655 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2656 dnl
28938
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2657 dnl Check whether SUNDIALS IDA library has the SUNLINSOL_DENSE linear solver.
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2658 dnl
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2659 AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SUNLINSOL_DENSE], [
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2660 AC_CHECK_HEADERS([sunlinsol/sunlinsol_dense.h],
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2661 octave_cv_sundials_sunlinsol_dense=yes,
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2662 octave_cv_sundials_sunlinsol_dense=no)
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2663 ])
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2664 if test $octave_cv_sundials_sunlinsol_dense = yes; then
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2665 AC_DEFINE(HAVE_SUNDIALS_SUNLINSOL_DENSE, 1,
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2666 [Define to 1 if SUNDIALS IDA includes the SUNLINSOL_DENSE linear solver.])
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2667 else
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2668 warn_sundials_disabled="SUNDIALS IDA library does not include the SUNLINSOL_DENSE linear solver. The solvers ode15i and ode15s will be disabled."
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2669 OCTAVE_CONFIGURE_WARNING([warn_sundials_disabled])
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2670 fi
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2671 ])
8592190176a8 build: Re-instate configure test for SUNLinSol_Dense header (bug #59248).
Markus Mützel <markus.muetzel@gmx.de>
parents: 28933
diff changeset
2672 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2673 dnl Add warning to final summary.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2674 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2675 AC_DEFUN([OCTAVE_CONFIGURE_WARNING], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2676 AC_MSG_WARN([$][$1])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2677 m4_set_add([summary_warning_list], [$1])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2678 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2679 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2680 dnl Print final summary.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2681 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2682 AC_DEFUN([OCTAVE_CONFIGURE_WARNING_SUMMARY], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2683 m4_set_foreach([summary_warning_list], [elt], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2684 if test -n "[$]elt"; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2685 AC_MSG_WARN([$]elt)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2686 warn_msg_printed=true
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2687 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
2688 ])
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
2689 dnl
21397
df859661e31e generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents: 21381
diff changeset
2690 dnl Like AC_CONFIG_FILES, but don't touch the output file if it already
df859661e31e generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents: 21381
diff changeset
2691 dnl exists and hasn't changed.
df859661e31e generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents: 21381
diff changeset
2692 dnl
df859661e31e generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents: 21381
diff changeset
2693 AC_DEFUN([OCTAVE_CONFIG_MOVE_IF_CHANGE_FILES], [
df859661e31e generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents: 21381
diff changeset
2694 m4_foreach_w([elt], [$1], [
21398
7e8a410e6124 break generated file dependence on Makefile (bug #46063)
John W. Eaton <jwe@octave.org>
parents: 21397
diff changeset
2695 AC_CONFIG_FILES(elt[-tmp:]patsubst(elt, [.sh$], [.in.sh]))
21397
df859661e31e generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents: 21381
diff changeset
2696 AC_CONFIG_COMMANDS(elt,
df859661e31e generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents: 21381
diff changeset
2697 [$SHELL $srcdir/build-aux/move-if-change ]elt[-tmp ]elt)])])
df859661e31e generate default-qt-settings at configure time
John W. Eaton <jwe@octave.org>
parents: 21381
diff changeset
2698 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2699 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
2700 dnl templates defined.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2701 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2702 AC_DEFUN([OCTAVE_CXX_BITWISE_OP_TEMPLATES], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2703 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
2704 [octave_cv_cxx_bitwise_op_templates],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2705 [AC_LANG_PUSH(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2706 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2707 #include <functional>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2708 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2709 int x = 0;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2710 int y = 1;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2711 int z1 = std::bit_and<int>() (x, y);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2712 int z2 = std::bit_or<int>() (x, y);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2713 int z3 = std::bit_xor<int>() (x, y);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2714 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2715 octave_cv_cxx_bitwise_op_templates=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2716 octave_cv_cxx_bitwise_op_templates=no)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2717 AC_LANG_POP(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2718 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2719 if test $octave_cv_cxx_bitwise_op_templates = yes; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2720 AC_DEFINE(HAVE_CXX_BITWISE_OP_TEMPLATES, 1,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2721 [Define to 1 if C++ library has templated bitwise operators.])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2722 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2723 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2724 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2725 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
2726 dnl parts of complex numbers independently via references.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2727 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2728 AC_DEFUN([OCTAVE_CXX_COMPLEX_REFERENCE_ACCESSORS], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2729 AC_CACHE_CHECK([whether complex class can reference components independently],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2730 [octave_cv_cxx_complex_reference_accessors],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2731 [AC_LANG_PUSH(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2732 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2733 #include <complex>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2734 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2735 std::complex<double> x;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2736 x.real () = 1.0;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2737 x.imag () = 1.0;
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 octave_cv_cxx_complex_reference_accessors=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2740 octave_cv_cxx_complex_reference_accessors=no)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2741 AC_LANG_POP(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2742 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2743 if test $octave_cv_cxx_complex_reference_accessors = yes; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2744 AC_DEFINE(HAVE_CXX_COMPLEX_REFERENCE_ACCESSORS, 1,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2745 [Define to 1 if C++ complex class has T& real (void) and T& imag (void) methods.])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2746 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2747 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2748 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2749 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
2750 dnl parts of complex numbers independently.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2751 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2752 AC_DEFUN([OCTAVE_CXX_COMPLEX_SETTERS], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2753 AC_CACHE_CHECK([whether complex class can set components independently],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2754 [octave_cv_cxx_complex_setters],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2755 [AC_LANG_PUSH(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2756 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2757 #include <complex>
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2758 ]], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2759 std::complex<double> x;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2760 x.real (1.0);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2761 x.imag (2.0);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2762 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2763 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
2764 AC_LANG_POP(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2765 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2766 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
2767 AC_DEFINE(HAVE_CXX_COMPLEX_SETTERS, 1,
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2768 [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
2769 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2770 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2771 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2772 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
2773 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2774 AC_DEFUN([OCTAVE_CXX_DYNAMIC_AUTO_ARRAYS], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2775 AC_CACHE_CHECK([whether C++ supports dynamic auto arrays],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2776 [octave_cv_cxx_dynamic_auto_arrays],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2777 [AC_LANG_PUSH(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2778 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2779 void test(char *);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2780 int length();
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2781 char x[length()];
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2782 test(x);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2783 ]])],
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
2784 octave_cv_cxx_dynamic_auto_arrays=yes,
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2785 octave_cv_cxx_dynamic_auto_arrays=no)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2786 AC_LANG_POP(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2787 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2788 if test $octave_cv_cxx_dynamic_auto_arrays = yes; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2789 AC_DEFINE(HAVE_DYNAMIC_AUTO_ARRAYS, 1,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2790 [Define to 1 if C++ supports dynamic auto arrays.])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2791 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2792 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2793 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2794 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
2795 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
2796 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
2797 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2798 AC_DEFUN([OCTAVE_CXX_FLAG], [
17661
1978a6c76aa9 Use user-specified SED during build process (bug #40273).
Rik <rik@octave.org>
parents: 17615
diff changeset
2799 ac_safe=`echo "$1" | $SED 'y%./+-:=%__p___%'`
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2800 AC_MSG_CHECKING([whether ${CXX-g++} accepts $1])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2801 AC_CACHE_VAL([octave_cv_cxx_flag_$ac_safe],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2802 [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
2803 ac_octave_save_CXXFLAGS="$CXXFLAGS"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2804 CXXFLAGS="$CXXFLAGS $1"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2805 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2806 eval "octave_cv_cxx_flag_$ac_safe=yes",
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2807 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
2808 CXXFLAGS="$ac_octave_save_CXXFLAGS"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2809 AC_LANG_POP(C++)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2810 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2811 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
2812 AC_MSG_RESULT([yes])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2813 ifelse([$2], ,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2814 [CXXFLAGS="$CXXFLAGS $1"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2815 AC_MSG_RESULT([adding $1 to CXXFLAGS])], [$2])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2816 else
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
2817 AC_MSG_RESULT([no])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2818 ifelse([$3], , , [$3])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2819 fi
10471
bcabc1c4f20c Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents: 10380
diff changeset
2820 ])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2821 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2822 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
2823 dnl readline.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2824 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2825 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
2826 USE_READLINE=yes
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2827 READLINE_LIBS=
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
2828 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
2829 [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
2830 [do not use readline library])],
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2831 [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
2832 USE_READLINE=no
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2833 warn_readline="command editing and history features require GNU Readline"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2834 fi])
16068
b309a5da17f5 use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents: 16012
diff changeset
2835 if test $USE_READLINE = yes; then
15302
a8cfbc1911e4 build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents: 15295
diff changeset
2836 dnl RHEL 5 and older systems require termlib set before enabling readline
a8cfbc1911e4 build: Set TERM_LIBS before checking for READLINE.
Rik <rik@octave.org>
parents: 15295
diff changeset
2837 AC_REQUIRE([OCTAVE_CHECK_LIB_TERMLIB])
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
2838 ac_octave_save_LIBS="$LIBS"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2839 LIBS="$TERM_LIBS"
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
2840 AC_CHECK_LIB([readline], [rl_set_keyboard_input_timeout],
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2841 [READLINE_LIBS="-lreadline"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2842 AC_DEFINE(USE_READLINE, 1, [Define to 1 to use the readline library.])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2843 ],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2844 [AC_MSG_WARN([I need GNU Readline 4.2 or later])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2845 AC_MSG_ERROR([this is fatal unless you specify --disable-readline])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2846 ])
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
2847 LIBS="$ac_octave_save_LIBS"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2848 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2849 AC_SUBST(READLINE_LIBS)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2850 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2851 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2852 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
2853 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
2854 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
2855 dnl the flag.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2856 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2857 AC_DEFUN([OCTAVE_F77_FLAG], [
17661
1978a6c76aa9 Use user-specified SED during build process (bug #40273).
Rik <rik@octave.org>
parents: 17615
diff changeset
2858 ac_safe=`echo "$1" | $SED 'y%./+-:=%__p___%'`
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2859 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
2860 AC_CACHE_VAL([octave_cv_f77_flag_$ac_safe], [
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2861 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
2862 ac_octave_save_FFLAGS="$FFLAGS"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2863 FFLAGS="$FFLAGS $1"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2864 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2865 eval "octave_cv_f77_flag_$ac_safe=yes",
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2866 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
2867 FFLAGS="$ac_octave_save_FFLAGS"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2868 AC_LANG_POP(Fortran 77)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2869 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2870 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
2871 AC_MSG_RESULT([yes])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2872 ifelse([$2], ,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2873 [FFLAGS="$FFLAGS $1"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2874 AC_MSG_RESULT([adding $1 to FFLAGS])], [$2])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2875 else
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
2876 AC_MSG_RESULT([no])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2877 ifelse([$3], , , [$3])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2878 fi
10471
bcabc1c4f20c Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents: 10380
diff changeset
2879 ])
bcabc1c4f20c Add detection of OpenMP support to configure. Disabled by default
David Bateman <dbateman@free.fr>
parents: 10380
diff changeset
2880 dnl
8595
dee5d60257e4 Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents: 8169
diff changeset
2881 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
2882 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
2883 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
2884 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
2885 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
2886 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
2887 dnl
9654
a307a6f77fb3 aclocal.m4: consistently quote first arg to AC_DEFUN
John W. Eaton <jwe@octave.org>
parents: 9645
diff changeset
2888 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
2889 AC_MSG_CHECKING([whether ${LD-ld} accepts -framework $1])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2890 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
2891 [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
2892 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
2893 AC_LANG_PUSH(C++)
8595
dee5d60257e4 Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents: 8169
diff changeset
2894 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
2895 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
2896 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
2897 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
2898 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
2899 ])
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
2900 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
2901 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
2902 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
2903 [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
2904 [don't use framework $1])],
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2905 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
2906 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
2907 [$4]
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
2908 :
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
2909 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
2910 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
2911 [$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
2912 fi
8595
dee5d60257e4 Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents: 8169
diff changeset
2913 else
15319
daf74ce2afdc m4/acinclude.m4: Use more consistent m4 quoting of arguments to macros.
Rik <rik@octave.org>
parents: 15302
diff changeset
2914 AC_MSG_RESULT([no])
8595
dee5d60257e4 Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents: 8169
diff changeset
2915 [$5]
dee5d60257e4 Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents: 8169
diff changeset
2916 fi
dee5d60257e4 Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents: 8169
diff changeset
2917 ])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2918 dnl
24823
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2919 dnl Check whether the Qt class QGuiApplication exists.
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2920 dnl This class was introduced in Qt 5.0.
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2921 dnl
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2922 dnl FIXME: Delete this entirely when we drop support for Qt 4.
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2923 dnl
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2924 AC_DEFUN([OCTAVE_HAVE_QGUIAPPLICATION], [
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2925 AC_CACHE_CHECK([for QGuiApplication],
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2926 [octave_cv_decl_qguiapplication],
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2927 [AC_LANG_PUSH(C++)
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2928 ac_octave_save_CPPFLAGS="$CPPFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2929 ac_octave_save_CXXFLAGS="$CXXFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2930 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2931 CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2932 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2933 #include <QGuiApplication>
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2934 ]], [[
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2935 QScreen *pscreen = QGuiApplication::primaryScreen ();
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2936 ]])],
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2937 octave_cv_decl_qguiapplication=yes,
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2938 octave_cv_decl_qguiapplication=no)
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2939 CPPFLAGS="$ac_octave_save_CPPFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2940 CXXFLAGS="$ac_octave_save_CXXFLAGS"
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2941 AC_LANG_POP(C++)
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2942 ])
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2943 if test $octave_cv_decl_qguiapplication = yes; then
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2944 AC_DEFINE(HAVE_QGUIAPPLICATION, 1,
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2945 [Define to 1 if `QGuiApplication' class is available.])
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2946 fi
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2947 ])
53f68d0fb122 acinclude.m4: Keep macros in alphabetical order.
Rik <rik@octave.org>
parents: 24821
diff changeset
2948 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2949 dnl Check for IEEE 754 data format.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2950 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2951 AC_DEFUN([OCTAVE_IEEE754_DATA_FORMAT], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2952 AC_MSG_CHECKING([for IEEE 754 data format])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2953 AC_CACHE_VAL([octave_cv_ieee754_data_format],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2954 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2955 int
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
2956 main (void)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2957 {
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2958 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
2959
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2960 ieeebytes l = {0x1c, 0xbc, 0x6e, 0xf2, 0x54, 0x8b, 0x11, 0x43};
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2961 ieeebytes b = {0x43, 0x11, 0x8b, 0x54, 0xf2, 0x6e, 0xbc, 0x1c};
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2962
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2963 return l.d != 1234567891234567.0 && b.d != 1234567891234567.0;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2964 }
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2965 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2966 octave_cv_ieee754_data_format=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2967 octave_cv_ieee754_data_format=no,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2968 octave_cv_ieee754_data_format=yes)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2969 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2970 if test "$cross_compiling" = yes; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2971 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
2972 else
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2973 AC_MSG_RESULT([$octave_cv_ieee754_data_format])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2974 fi
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
2975 if test $octave_cv_ieee754_data_format = yes; then
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2976 AC_DEFINE(HAVE_IEEE754_DATA_FORMAT, 1,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2977 [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
2978 else
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2979 ## 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
2980 ## useful system, so we will abort here. Anyone wishing to
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2981 ## experiment with building Octave on a system without IEEE
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2982 ## floating point should be capable of removing this check and
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2983 ## 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
2984 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
2985 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2986 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
2987 dnl
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
2988 dnl Check for CallInst::addAttribute API
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
2989 dnl
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
2990 AC_DEFUN([OCTAVE_LLVM_CALLINST_ADDATTRIBUTE_API], [
26541
3e6d559c8756 jit: configure: Improve configure AC_CACHE_CHECK messages
Julien Bect <jbect@users.sourceforge.net>
parents: 26540
diff changeset
2991 AC_CACHE_CHECK([if llvm::CallInst::addAttribute's arg type is llvm::Attributes],
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
2992 [octave_cv_callinst_addattribute_arg_is_attributes],
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
2993 [AC_LANG_PUSH(C++)
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
2994 AC_COMPILE_IFELSE(
17615
3a7d5d655749 Fix typos in configure tests for LLVM methods (bug #39973)
Mike Miller <mtmiller@ieee.org>
parents: 17241
diff changeset
2995 [AC_LANG_PROGRAM([[
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21604
diff changeset
2996 #if defined (HAVE_LLVM_IR_FUNCTION_H)
17164
36fd98b9ce48 Add support for llvm 3.3
Max Brister <max@2bass.com>
parents: 17111
diff changeset
2997 #include <llvm/IR/Instructions.h>
36fd98b9ce48 Add support for llvm 3.3
Max Brister <max@2bass.com>
parents: 17111
diff changeset
2998 #include <llvm/IR/Attributes.h>
36fd98b9ce48 Add support for llvm 3.3
Max Brister <max@2bass.com>
parents: 17111
diff changeset
2999 #else
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3000 #include <llvm/Instructions.h>
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3001 #include <llvm/Attributes.h>
17164
36fd98b9ce48 Add support for llvm 3.3
Max Brister <max@2bass.com>
parents: 17111
diff changeset
3002 #endif
17615
3a7d5d655749 Fix typos in configure tests for LLVM methods (bug #39973)
Mike Miller <mtmiller@ieee.org>
parents: 17241
diff changeset
3003 ]], [[
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3004 llvm::CallInst *callinst;
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3005 llvm::AttrBuilder attr_builder;
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3006 attr_builder.addAttribute(llvm::Attributes::StructRet);
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3007 llvm::Attributes attrs = llvm::Attributes::get(llvm::getGlobalContext(), attr_builder);
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3008 callinst->addAttribute (1, attrs);
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3009 ]])],
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3010 octave_cv_callinst_addattribute_arg_is_attributes=yes,
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3011 octave_cv_callinst_addattribute_arg_is_attributes=no)
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3012 AC_LANG_POP(C++)
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3013 ])
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3014 if test $octave_cv_callinst_addattribute_arg_is_attributes = yes; then
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3015 AC_DEFINE(CALLINST_ADDATTRIBUTE_ARG_IS_ATTRIBUTES, 1,
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3016 [Define to 1 if llvm::CallInst:addAttribute arg type is llvm::Attributes.])
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3017 fi
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3018 ])
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3019 dnl
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3020 dnl Check for Function::addAttribute API
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3021 dnl
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3022 AC_DEFUN([OCTAVE_LLVM_FUNCTION_ADDATTRIBUTE_API], [
26541
3e6d559c8756 jit: configure: Improve configure AC_CACHE_CHECK messages
Julien Bect <jbect@users.sourceforge.net>
parents: 26540
diff changeset
3023 AC_CACHE_CHECK([if llvm::Function::addAttribute's arg type is llvm::Attributes],
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3024 [octave_cv_function_addattribute_arg_is_attributes],
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3025 [AC_LANG_PUSH(C++)
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3026 AC_COMPILE_IFELSE(
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3027 [AC_LANG_PROGRAM([[
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21604
diff changeset
3028 #if defined (HAVE_LLVM_IR_FUNCTION_H)
17164
36fd98b9ce48 Add support for llvm 3.3
Max Brister <max@2bass.com>
parents: 17111
diff changeset
3029 #include <llvm/IR/Function.h>
36fd98b9ce48 Add support for llvm 3.3
Max Brister <max@2bass.com>
parents: 17111
diff changeset
3030 #include <llvm/IR/Attributes.h>
36fd98b9ce48 Add support for llvm 3.3
Max Brister <max@2bass.com>
parents: 17111
diff changeset
3031 #include <llvm/IR/LLVMContext.h>
36fd98b9ce48 Add support for llvm 3.3
Max Brister <max@2bass.com>
parents: 17111
diff changeset
3032 #else
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3033 #include <llvm/Function.h>
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3034 #include <llvm/Attributes.h>
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3035 #include <llvm/LLVMContext.h>
17164
36fd98b9ce48 Add support for llvm 3.3
Max Brister <max@2bass.com>
parents: 17111
diff changeset
3036 #endif
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3037 ]], [[
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3038 llvm::Function *llvm_function;
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3039 llvm::AttrBuilder attr_builder;
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3040 attr_builder.addAttribute(llvm::Attributes::StructRet);
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3041 llvm::Attributes attrs = llvm::Attributes::get(llvm::getGlobalContext(), attr_builder);
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3042 llvm_function->addAttribute (1, attrs);
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3043 ]])],
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3044 octave_cv_function_addattribute_arg_is_attributes=yes,
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3045 octave_cv_function_addattribute_arg_is_attributes=no)
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3046 AC_LANG_POP(C++)
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3047 ])
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3048 if test $octave_cv_function_addattribute_arg_is_attributes = yes; then
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3049 AC_DEFINE(FUNCTION_ADDATTRIBUTE_ARG_IS_ATTRIBUTES, 1,
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3050 [Define to 1 if llvm::Function:addAttribute arg type is llvm::Attributes.])
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3051 fi
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3052 ])
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3053 dnl
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3054 dnl Check for Function::addFnAttr API
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3055 dnl
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3056 AC_DEFUN([OCTAVE_LLVM_FUNCTION_ADDFNATTR_API], [
26541
3e6d559c8756 jit: configure: Improve configure AC_CACHE_CHECK messages
Julien Bect <jbect@users.sourceforge.net>
parents: 26540
diff changeset
3057 AC_CACHE_CHECK([if llvm::Function::addFnAttr's arg type is llvm::Attributes],
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3058 [octave_cv_function_addfnattr_arg_is_attributes],
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3059 [AC_LANG_PUSH(C++)
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3060 AC_COMPILE_IFELSE(
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3061 [AC_LANG_PROGRAM([[
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21604
diff changeset
3062 #if defined (HAVE_LLVM_IR_FUNCTION_H)
17615
3a7d5d655749 Fix typos in configure tests for LLVM methods (bug #39973)
Mike Miller <mtmiller@ieee.org>
parents: 17241
diff changeset
3063 #include <llvm/IR/Function.h>
3a7d5d655749 Fix typos in configure tests for LLVM methods (bug #39973)
Mike Miller <mtmiller@ieee.org>
parents: 17241
diff changeset
3064 #include <llvm/IR/Attributes.h>
17164
36fd98b9ce48 Add support for llvm 3.3
Max Brister <max@2bass.com>
parents: 17111
diff changeset
3065 #else
36fd98b9ce48 Add support for llvm 3.3
Max Brister <max@2bass.com>
parents: 17111
diff changeset
3066 #include <llvm/Function.h>
36fd98b9ce48 Add support for llvm 3.3
Max Brister <max@2bass.com>
parents: 17111
diff changeset
3067 #include <llvm/Attributes.h>
36fd98b9ce48 Add support for llvm 3.3
Max Brister <max@2bass.com>
parents: 17111
diff changeset
3068 #endif
17034
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3069 ]], [[
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3070 llvm::Function *llvm_function;
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3071 llvm_function->addFnAttr (llvm::Attributes::AlwaysInline);
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3072 ]])],
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3073 octave_cv_function_addfnattr_arg_is_attributes=yes,
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3074 octave_cv_function_addfnattr_arg_is_attributes=no)
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3075 AC_LANG_POP(C++)
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3076 ])
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3077 if test $octave_cv_function_addfnattr_arg_is_attributes = yes; then
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3078 AC_DEFINE(FUNCTION_ADDFNATTR_ARG_IS_ATTRIBUTES, 1,
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3079 [Define to 1 if llvm::Function:addFnAttr arg type is llvm::Attributes.])
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3080 fi
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3081 ])
8d84dc5f5b5d acinclude.m4: Use m4 quote '[' rather than '"' in AC_MSG_ERROR.
Rik <rik@octave.org>
parents: 17031
diff changeset
3082 dnl
18831
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3083 dnl Check for legacy::PassManager API
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3084 dnl
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3085 AC_DEFUN([OCTAVE_LLVM_LEGACY_PASSMANAGER_API], [
26541
3e6d559c8756 jit: configure: Improve configure AC_CACHE_CHECK messages
Julien Bect <jbect@users.sourceforge.net>
parents: 26540
diff changeset
3086 AC_CACHE_CHECK([if llvm::legacy::PassManager exists],
18831
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3087 [octave_cv_legacy_passmanager],
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3088 [AC_LANG_PUSH(C++)
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3089 save_LIBS="$LIBS"
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3090 LIBS="$LLVM_LIBS $LIBS"
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3091 AC_LINK_IFELSE(
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3092 [AC_LANG_PROGRAM([[
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3093 #include <llvm/IR/LegacyPassManager.h>
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3094 ]], [[
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3095 llvm::Module *module;
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3096 llvm::legacy::PassManager *module_pass_manager;
19597
db92e7e28e1f strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 19355
diff changeset
3097 llvm::legacy::FunctionPassManager *pass_manager;
18831
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3098 module_pass_manager = new llvm::legacy::PassManager ();
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3099 pass_manager = new llvm::legacy::FunctionPassManager (module);
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3100 ]])],
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3101 octave_cv_legacy_passmanager=yes,
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3102 octave_cv_legacy_passmanager=no)
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3103 LIBS="$save_LIBS"
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3104 AC_LANG_POP(C++)
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3105 ])
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3106 if test $octave_cv_legacy_passmanager = yes; then
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3107 AC_DEFINE(LEGACY_PASSMANAGER, 1,
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3108 [Define to 1 if LLVM::legacy::PassManager exists.])
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3109 fi
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3110 ])
4a4edf0f2077 fix LLVM 3.4 build (bug #41061)
Stefan Mahr <dac922@gmx.de>
parents: 18216
diff changeset
3111 dnl
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3112 dnl Check for raw_fd_ostream API
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3113 dnl
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3114 AC_DEFUN([OCTAVE_LLVM_RAW_FD_OSTREAM_API], [
26541
3e6d559c8756 jit: configure: Improve configure AC_CACHE_CHECK messages
Julien Bect <jbect@users.sourceforge.net>
parents: 26540
diff changeset
3115 AC_CACHE_CHECK([if llvm::raw_fd_ostream's arg type is llvm::sys:fs],
23510
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3116 [octave_cv_raw_fd_ostream_arg_is_llvm_sys_fs],
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3117 [AC_LANG_PUSH(C++)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3118 AC_COMPILE_IFELSE(
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3119 [AC_LANG_PROGRAM([[
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3120 #include <llvm/Support/raw_os_ostream.h>
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3121 ]], [[
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3122 std::string str;
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3123 llvm::raw_fd_ostream fout ("", str, llvm::sys::fs::F_Binary);
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3124 ]])],
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3125 octave_cv_raw_fd_ostream_arg_is_llvm_sys_fs=yes,
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3126 octave_cv_raw_fd_ostream_arg_is_llvm_sys_fs=no)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3127 AC_LANG_POP(C++)
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3128 ])
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3129 if test $octave_cv_raw_fd_ostream_arg_is_llvm_sys_fs = yes; then
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3130 AC_DEFINE(RAW_FD_OSTREAM_ARG_IS_LLVM_SYS_FS, 1,
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3131 [Define to 1 if LLVM::raw_fd_ostream arg type is llvm::sys:fs.])
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3132 fi
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3133 ])
b0e23bfa9966 maint: sort Octave m4 macro definitions
Mike Miller <mtmiller@octave.org>
parents: 23509
diff changeset
3134 dnl
26536
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3135 dnl Check llvm::IRBuilder API
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3136 dnl
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3137 AC_DEFUN([OCTAVE_LLVM_IRBUILDER_API], [
26541
3e6d559c8756 jit: configure: Improve configure AC_CACHE_CHECK messages
Julien Bect <jbect@users.sourceforge.net>
parents: 26540
diff changeset
3138 AC_CACHE_CHECK([if llvm::IRBuilder has two template arguments],
26536
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3139 [octave_cv_llvm_irbuilder_has_two_template_args],
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3140 [AC_LANG_PUSH(C++)
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3141 AC_COMPILE_IFELSE(
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3142 [AC_LANG_PROGRAM([[
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3143 #if defined (HAVE_LLVM_IR_FUNCTION_H)
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3144 #include <llvm/IR/LLVMContext.h>
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3145 #else
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3146 #include <llvm/LLVMContext.h>
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3147 #endif
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3148 #if defined (HAVE_LLVM_IR_IRBUILDER_H)
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3149 #include <llvm/IR/IRBuilder.h>
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3150 #elif defined (HAVE_LLVM_SUPPORT_IRBUILDER_H)
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3151 #include <llvm/Support/IRBuilder.h>
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3152 #else
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3153 #include <llvm/IRBuilder.h>
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3154 #endif
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3155 using namespace llvm;
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3156 ]], [[
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3157 LLVMContext c;
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3158 IRBuilder<ConstantFolder,IRBuilderDefaultInserter> irb (c);
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3159 ]])],
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3160 octave_cv_llvm_irbuilder_has_two_template_args=yes,
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3161 octave_cv_llvm_irbuilder_has_two_template_args=no)
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3162 AC_LANG_POP(C++)
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3163 ])
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3164 if test $octave_cv_llvm_irbuilder_has_two_template_args = yes; then
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3165 AC_DEFINE(LLVM_IRBUILDER_HAS_TWO_TEMPLATE_ARGS, 1,
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3166 [Define to 1 if llvm::IRBuilder has two template arguments.])
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3167 fi
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3168 ])
b3157525cebf jit: configure: Check llvm::IRBuilder API
Julien Bect <jbect@users.sourceforge.net>
parents: 26376
diff changeset
3169 dnl
26538
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3170 dnl Check for llvm::createAlwaysInlinerPass
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3171 dnl
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3172 AC_DEFUN([OCTAVE_LLVM_HAS_CREATEALWAYSINLINERPASS], [
26541
3e6d559c8756 jit: configure: Improve configure AC_CACHE_CHECK messages
Julien Bect <jbect@users.sourceforge.net>
parents: 26540
diff changeset
3173 AC_CACHE_CHECK([if llvm::createAlwaysInlinerPass exists],
26538
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3174 [octave_cv_llvm_has_createalwaysinlinerpass],
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3175 [AC_LANG_PUSH(C++)
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3176 AC_COMPILE_IFELSE(
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3177 [AC_LANG_PROGRAM([[
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3178 #include <llvm/Transforms/IPO.h>
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3179 ]], [[
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3180 llvm::Pass *p;
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3181 p = llvm::createAlwaysInlinerPass ();
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3182 ]])],
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3183 octave_cv_llvm_has_createalwaysinlinerpass=yes,
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3184 octave_cv_llvm_has_createalwaysinlinerpass=no)
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3185 AC_LANG_POP(C++)
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3186 ])
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3187 if test $octave_cv_llvm_has_createalwaysinlinerpass = yes; then
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3188 AC_DEFINE(LLVM_HAS_CREATEALWAYSINLINERPASS, 1,
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3189 [Define to 1 if llvm::createAlwaysInlinerPass exists.])
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3190 fi
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3191 ])
ea25fc64c275 jit: configure: Check if llvm::createAlwaysInlinerPass exists
Julien Bect <jbect@users.sourceforge.net>
parents: 26536
diff changeset
3192 dnl
26540
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3193 dnl Check llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3194 dbl
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3195 AC_DEFUN([OCTAVE_LLVM_IRBUILDER_CREATECONSTINBOUNDSGEP1_32_API], [
26541
3e6d559c8756 jit: configure: Improve configure AC_CACHE_CHECK messages
Julien Bect <jbect@users.sourceforge.net>
parents: 26540
diff changeset
3196 AC_CACHE_CHECK([if llvm::IRBuilder::CreateConstInBoundsGEP1_32 requires a type argument],
26540
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3197 [octave_cv_llvm_irbuilder_createconstinboundsgep1_32_requires_type],
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3198 [AC_LANG_PUSH(C++)
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3199 AC_COMPILE_IFELSE(
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3200 [AC_LANG_PROGRAM([[
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3201 #if defined (HAVE_LLVM_IR_IRBUILDER_H)
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3202 #include <llvm/IR/IRBuilder.h>
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3203 #elif defined (HAVE_LLVM_SUPPORT_IRBUILDER_H)
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3204 #include <llvm/Support/IRBuilder.h>
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3205 #else
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3206 #include <llvm/IRBuilder.h>
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3207 #endif
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3208 ]], [[
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3209 llvm::LLVMContext c;
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3210 llvm::IRBuilder<> irb (c);
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3211 llvm::Value *v;
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3212 v = irb.CreateConstInBoundsGEP1_32 ((llvm::Value *) nullptr, 0);
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3213 ]])],
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3214 octave_cv_llvm_irbuilder_createconstinboundsgep1_32_requires_type=no,
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3215 octave_cv_llvm_irbuilder_createconstinboundsgep1_32_requires_type=yes)
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3216 AC_LANG_POP(C++)
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3217 ])
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3218 if test $octave_cv_llvm_irbuilder_createconstinboundsgep1_32_requires_type = yes; then
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3219 AC_DEFINE(LLVM_IRBUILDER_CREATECONSTINBOUNDSGEP1_32_REQUIRES_TYPE, 1,
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3220 [Define to 1 if llvm::IRBuilder::CreateConstInBoundsGEP1_32 requires a type argument.])
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3221 fi
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3222 ])
df230bb22ba6 jit: configure: Check if llvm::IRBuilder::CreateConstInBoundsGEP1_32 API
Julien Bect <jbect@users.sourceforge.net>
parents: 26538
diff changeset
3223 dnl
25559
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3224 dnl OCTAVE_CHECK_FORTRAN_SYMBOL_AND_CALLING_CONVENTIONS
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3225 dnl
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3226 dnl Set variables related to Fortran symbol names (append underscore,
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3227 dnl use uppercase names, etc.) and calling convention (mostly used for
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3228 dnl determining how character strings are passed).
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3229 dnl
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3230 AC_DEFUN([OCTAVE_CHECK_FORTRAN_SYMBOL_AND_CALLING_CONVENTIONS], [
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3231 F77_TOLOWER=yes
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3232 F77_APPEND_UNDERSCORE=yes
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3233 F77_APPEND_EXTRA_UNDERSCORE=yes
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3234
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3235 case $ac_cv_f77_mangling in
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3236 "upper case") F77_TOLOWER=no ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3237 esac
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3238 case $ac_cv_f77_mangling in
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3239 "no underscore") F77_APPEND_UNDERSCORE=no ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3240 esac
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3241 case $ac_cv_f77_mangling in
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3242 "no extra underscore") F77_APPEND_EXTRA_UNDERSCORE=no ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3243 esac
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3244
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3245 case $canonical_host_type in
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3246 i[[3456789]]86-*-*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3247 if test $ac_cv_f77_compiler_gnu = yes; then
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3248 OCTAVE_F77_FLAG([-mieee-fp])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3249 fi
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3250 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3251 alpha*-*-*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3252 if test $ac_cv_f77_compiler_gnu = yes; then
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3253 OCTAVE_F77_FLAG([-mieee])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3254 else
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3255 OCTAVE_F77_FLAG([-ieee])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3256 OCTAVE_F77_FLAG([-fpe1])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3257 fi
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3258 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3259 powerpc-apple-machten*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3260 FFLAGS=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3261 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3262 esac
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3263
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3264 if test $ac_cv_f77_compiler_gnu = yes; then
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3265 FORTRAN_CALLING_CONVENTION=gfortran
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3266 else
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3267 FORTRAN_CALLING_CONVENTION=unknown
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3268 fi
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3269 AC_ARG_ENABLE([fortran-calling-convention],
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3270 [AS_HELP_STRING([--enable-fortran-calling-convention=OPTION],
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3271 [Select C++ to Fortran calling convention. "gfortran" should be detected automatically. Other options are "cray", "visual-fortran", or "f2c".])],
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3272 [FORTRAN_CALLING_CONVENTION="$enableval"], [])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3273
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3274 case $FORTRAN_CALLING_CONVENTION in
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3275 gfortran)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3276 AC_DEFINE(F77_USES_GFORTRAN_CALLING_CONVENTION, 1, [Define to 1 if calling Fortran from C++ should use the gfortran calling convention.])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3277 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3278 cray)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3279 AC_DEFINE(F77_USES_CRAY_CALLING_CONVENTION, 1, [Define to 1 if calling Fortran from C++ should use the Cray Fortran calling convention.])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3280 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3281 visual-fortran)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3282 AC_DEFINE(F77_USES_VISUAL_FORTRAN_CALLING_CONVENTION, 1, [Define to 1 if calling Fortran from C++ should use the Visual Fortran calling convention.])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3283 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3284 f2c)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3285 AC_DEFINE(F77_USES_F2C_CALLING_CONVENTION, 1, [Define to 1 if calling Fortran from C++ should use the f2c calling convention.])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3286 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3287 *)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3288 AC_MSG_ERROR([to build Octave, the C++ to Fortran calling convention must be known.])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3289 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3290 esac
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3291
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3292 if test -n "$FFLAGS"; then
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3293 AC_MSG_NOTICE([defining FFLAGS to be $FFLAGS])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3294 fi
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3295
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3296 AC_SUBST(F77_TOLOWER)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3297 AC_SUBST(F77_APPEND_UNDERSCORE)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3298 AC_SUBST(F77_APPEND_EXTRA_UNDERSCORE)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3299 ])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3300 dnl
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3301 dnl OCTAVE_DEFINE_MKOCTFILE_DYNAMIC_LINK_OPTIONS
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3302 dnl
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3303 dnl Requires the following variables to already be set:
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3304 dnl
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3305 dnl AR
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3306 dnl CFLAGS
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3307 dnl CXX
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3308 dnl CXXFLAGS
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3309 dnl EXEEXT
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3310 dnl GCC
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3311 dnl GREP
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3312 dnl GXX
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3313 dnl LDFLAGS
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3314 dnl ac_cv_f77_compiler_gnu
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3315 dnl ac_top_build_prefix
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3316 dnl canonical_host_type
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3317 dnl have_msvc
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3318 dnl
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3319 AC_DEFUN_ONCE([OCTAVE_DEFINE_MKOCTFILE_DYNAMIC_LINK_OPTIONS], [
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3320 ### Set system-dependent options for building shared libraries.
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3321 ### These are used by mkoctfile to create dynamically loadable
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3322 ### .oct and .mex files. It would be great if we could somehow
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3323 ### use libtool to get this information.
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3324
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3325 CPICFLAG=-fPIC
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3326 CXXPICFLAG=-fPIC
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3327 FPICFLAG=-fPIC
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3328 SH_LDFLAGS=-shared
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3329 DL_LDFLAGS="${SH_LDFLAGS}"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3330 MKOCTFILE_DL_LDFLAGS="${DL_LDFLAGS}"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3331 NO_OCT_FILE_STRIP=false
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3332 TEMPLATE_AR="${AR}"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3333 TEMPLATE_ARFLAGS="${ARFLAGS}"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3334 EXTERNAL_DLL_DEFS=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3335 OCTAVE_DLL_DEFS=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3336 OCTINTERP_DLL_DEFS=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3337 OCTGUI_DLL_DEFS=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3338 OCTGRAPHICS_DLL_DEFS=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3339 library_path_var=LD_LIBRARY_PATH
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3340 ldpreloadsep=" "
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3341 case $canonical_host_type in
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3342 *-*-386bsd* | *-*-netbsd*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3343 SH_LDFLAGS=-Bshareable
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3344 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3345 *-*-openbsd*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3346 SH_LDFLAGS="-shared -fPIC"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3347 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3348 *-*-freebsd*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3349 SH_LDFLAGS="-shared -Wl,-x"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3350 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3351 alpha*-dec-osf*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3352 CPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3353 CXXPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3354 FPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3355 SH_LDFLAGS="-shared -Wl,-expect_unresolved -Wl,'*'"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3356 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3357 *-*-darwin*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3358 DL_LDFLAGS="-bundle -bundle_loader ${ac_top_build_prefix}libinterp/octave ${LDFLAGS}"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3359 dnl Contains variables that are defined and undefined at this point, so use
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3360 dnl appropriate quoting to defer expansion of ${bindir} and ${version}.
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3361 MKOCTFILE_DL_LDFLAGS='-bundle -bundle_loader ${bindir}/octave-${version}'"${EXEEXT}"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3362 SH_LDFLAGS="-dynamiclib -single_module ${LDFLAGS}"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3363 case $canonical_host_type in
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3364 powerpc-*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3365 CXXPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3366 CPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3367 FPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3368 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3369 esac
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3370 NO_OCT_FILE_STRIP=true
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3371 library_path_var=DYLD_LIBRARY_PATH
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3372 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3373 *-*-cygwin*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3374 CPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3375 CXXPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3376 FPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3377 DL_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3378 SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-auto-image-base"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3379 ldpreloadsep=":"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3380 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3381 *-*-mingw*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3382 if test $have_msvc = yes; then
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3383 DL_LDFLAGS="-shared"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3384 CPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3385 CXXPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3386 FPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3387 SH_LDFLAGS="-shared"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3388 if test -n "`echo $CFLAGS | $GREP -e '-g'`" || test -n "`echo $CXXFLAGS | $GREP -e '-g'`"; then
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3389 DL_LDFLAGS="$DL_LDFLAGS -g"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3390 SH_LDFLAGS="$SH_LDFLAGS -g"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3391 fi
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3392 NO_OCT_FILE_STRIP=true
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3393 library_path_var=PATH
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3394 ## Extra compilation flags.
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3395 EXTERNAL_DLL_DEFS="-DEXTERNAL_DLL"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3396 OCTAVE_DLL_DEFS="-DOCTAVE_DLL"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3397 OCTINTERP_DLL_DEFS="-DOCTINTERP_DLL"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3398 OCTGUI_DLL_DEFS="-DOCTGUI_DLL"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3399 OCTGRAPHICS_DLL_DEFS="-DOCTGRAPHICS_DLL"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3400 else
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3401 CPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3402 CXXPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3403 FPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3404 DL_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3405 SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-auto-image-base"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3406 library_path_var=PATH
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3407 fi
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3408 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3409 *-*-msdosmsvc)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3410 DL_LDFLAGS="-shared"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3411 CPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3412 CXXPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3413 FPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3414 SH_LDFLAGS="-shared"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3415 if test -n "`echo $CFLAGS | $GREP -e '-g'`" || test -n "`echo $CXXFLAGS | $GREP -e '-g'`"; then
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3416 DL_LDFLAGS="$DL_LDFLAGS -g"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3417 SH_LDFLAGS="$SH_LDFLAGS -g"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3418 fi
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3419 NO_OCT_FILE_STRIP=true
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3420 library_path_var=PATH
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3421 ## Extra compilation flags.
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3422 EXTERNAL_DLL_DEFS="-DEXTERNAL_DLL"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3423 OCTAVE_DLL_DEFS="-DOCTAVE_DLL"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3424 OCTGUI_DLL_DEFS="-DOCTGUI_DLL"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3425 OCTGRAPHICS_DLL_DEFS="-DOCTGRAPHICS_DLL"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3426 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3427 *-*-linux* | *-*-gnu*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3428 MKOCTFILE_DL_LDFLAGS="-shared -Wl,-Bsymbolic"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3429 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3430 i[[3456]]86-*-sco3.2v5*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3431 SH_LDFLAGS=-G
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3432 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3433 rs6000-ibm-aix* | powerpc-ibm-aix*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3434 CPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3435 CXXPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3436 FPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3437 library_path_var=LIBPATH
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3438 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3439 hppa*-hp-hpux*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3440 if test $ac_cv_f77_compiler_gnu = yes; then
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3441 FPICFLAG=-fPIC
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3442 else
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3443 FPICFLAG=+Z
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3444 fi
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3445 SH_LDFLAGS="-shared -fPIC"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3446 library_path_var=SHLIB_PATH
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3447 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3448 ia64*-hp-hpux*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3449 if test $ac_cv_f77_compiler_gnu = yes; then
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3450 FPICFLAG=-fPIC
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3451 else
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3452 FPICFLAG=+Z
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3453 fi
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3454 SH_LDFLAGS="-shared -fPIC"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3455 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3456 *-sgi-*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3457 CPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3458 CXXPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3459 FPICFLAG=
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3460 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3461 sparc-sun-sunos4*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3462 if test $ac_cv_f77_compiler_gnu = yes; then
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3463 FPICFLAG=-fPIC
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3464 else
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3465 FPICFLAG=-PIC
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3466 fi
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3467 SH_LDFLAGS="-assert nodefinitions"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3468 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3469 sparc-sun-solaris2* | i386-pc-solaris2*)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3470 if test $ac_cv_f77_compiler_gnu = yes; then
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3471 FPICFLAG=-fPIC
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3472 else
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3473 FPICFLAG=-KPIC
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3474 fi
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3475 if test "$GCC" = yes; then
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3476 CPICFLAG=-fPIC
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3477 else
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3478 CPICFLAG=-KPIC
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3479 fi
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3480 if test "$GXX" = yes; then
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3481 CXXPICFLAG=-fPIC
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3482 SH_LDFLAGS=-shared
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3483 else
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3484 CXXPICFLAG=-KPIC
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3485 SH_LDFLAGS=-G
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3486 fi
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3487 ## Template closures in archive libraries need a different mechanism.
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3488 if test "$GXX" != yes; then
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3489 TEMPLATE_AR="${CXX}"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3490 TEMPLATE_ARFLAGS="-xar -o"
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3491 fi
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3492 ;;
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3493 esac
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3494
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3495 AC_MSG_NOTICE([defining FPICFLAG to be $FPICFLAG])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3496 AC_MSG_NOTICE([defining CPICFLAG to be $CPICFLAG])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3497 AC_MSG_NOTICE([defining CXXPICFLAG to be $CXXPICFLAG])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3498 AC_MSG_NOTICE([defining SH_LDFLAGS to be $SH_LDFLAGS])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3499 AC_MSG_NOTICE([defining DL_LDFLAGS to be $DL_LDFLAGS])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3500 AC_MSG_NOTICE([defining MKOCTFILE_DL_LDFLAGS to be $MKOCTFILE_DL_LDFLAGS])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3501 AC_MSG_NOTICE([defining NO_OCT_FILE_STRIP to be $NO_OCT_FILE_STRIP])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3502 AC_MSG_NOTICE([defining TEMPLATE_AR to be $TEMPLATE_AR])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3503 AC_MSG_NOTICE([defining TEMPLATE_ARFLAGS to be $TEMPLATE_ARFLAGS])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3504 AC_MSG_NOTICE([defining EXTERNAL_DLL_DEFS to be $EXTERNAL_DLL_DEFS])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3505 AC_MSG_NOTICE([defining OCTAVE_DLL_DEFS to be $OCTAVE_DLL_DEFS])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3506 AC_MSG_NOTICE([defining OCTINTERP_DLL_DEFS to be $OCTINTERP_DLL_DEFS])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3507 AC_MSG_NOTICE([defining OCTGUI_DLL_DEFS to be $OCTGUI_DLL_DEFS])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3508 AC_MSG_NOTICE([defining OCTGRAPHICS_DLL_DEFS to be $OCTGRAPHICS_DLL_DEFS])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3509 AC_MSG_NOTICE([defining library_path_var to be $library_path_var])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3510 AC_SUBST(FPICFLAG)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3511 AC_SUBST(CPICFLAG)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3512 AC_SUBST(CXXPICFLAG)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3513 AC_SUBST(SH_LDFLAGS)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3514 AC_SUBST(DL_LDFLAGS)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3515 AC_SUBST(MKOCTFILE_DL_LDFLAGS)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3516 AC_SUBST(NO_OCT_FILE_STRIP)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3517 AC_SUBST(TEMPLATE_AR)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3518 AC_SUBST(TEMPLATE_ARFLAGS)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3519 AC_SUBST(EXTERNAL_DLL_DEFS)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3520 AC_SUBST(OCTAVE_DLL_DEFS)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3521 AC_SUBST(OCTINTERP_DLL_DEFS)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3522 AC_SUBST(OCTGUI_DLL_DEFS)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3523 AC_SUBST(OCTGRAPHICS_DLL_DEFS)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3524 AC_SUBST(library_path_var)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3525 AC_SUBST(ldpreloadsep)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3526 AM_SUBST_NOTMAKE(ldpreloadsep)
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3527 ])
4fe32753cb56 move some fortran and dynamic linking configure checks to separate macros
John W. Eaton <jwe@octave.org>
parents: 25310
diff changeset
3528 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3529 dnl Check for ar.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3530 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3531 AC_DEFUN([OCTAVE_PROG_AR], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3532 if test -z "$AR"; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3533 AR=ar
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3534 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3535 AC_SUBST(AR)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3536
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3537 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
3538 ARFLAGS="cr"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3539 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3540 AC_SUBST(ARFLAGS)
23400
b5ee9b985a82 Silence compile warning about 'u' modifier to ar.
Rik <rik@octave.org>
parents: 23329
diff changeset
3541
23402
1fadf480a63b maint: tweak ARFLAGS and AR_FLAGS defaults and comments
Mike Miller <mtmiller@octave.org>
parents: 23400
diff changeset
3542 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
3543 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
3544 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
3545 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
3546 AR_FLAGS="$ARFLAGS"
23400
b5ee9b985a82 Silence compile warning about 'u' modifier to ar.
Rik <rik@octave.org>
parents: 23329
diff changeset
3547 fi
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3548 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3549 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3550 dnl Check for bison.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3551 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3552 AC_DEFUN([OCTAVE_PROG_BISON], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3553 AC_PROG_YACC
26672
df42ea23502f build: support GNU bison 3.3, silence POSIX compatibility warning (bug #55613)
Mike Miller <mtmiller@octave.org>
parents: 26541
diff changeset
3554 WARN_YFLAGS=
16784
0fabe0f49f38 use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents: 16733
diff changeset
3555
0fabe0f49f38 use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents: 16733
diff changeset
3556 case "`$YACC --version`" in
17197
fbee0d312af5 acinclude.m4: Remove some unnecessary double quotes around variables.
Rik <rik@octave.org>
parents: 17196
diff changeset
3557 *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
3558 *) 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
3559 esac
0fabe0f49f38 use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents: 16733
diff changeset
3560
17197
fbee0d312af5 acinclude.m4: Remove some unnecessary double quotes around variables.
Rik <rik@octave.org>
parents: 17196
diff changeset
3561 if test $tmp_have_bison = yes; then
26672
df42ea23502f build: support GNU bison 3.3, silence POSIX compatibility warning (bug #55613)
Mike Miller <mtmiller@octave.org>
parents: 26541
diff changeset
3562 dnl FIXME: Call GNU bison with the `-Wno-yacc` option, which works with
df42ea23502f build: support GNU bison 3.3, silence POSIX compatibility warning (bug #55613)
Mike Miller <mtmiller@octave.org>
parents: 26541
diff changeset
3563 dnl bison 2.5 and all later versions, as recommended by the bison NEWS.
df42ea23502f build: support GNU bison 3.3, silence POSIX compatibility warning (bug #55613)
Mike Miller <mtmiller@octave.org>
parents: 26541
diff changeset
3564 dnl This is needed as long as Octave supports Autoconf version 2.69 or
df42ea23502f build: support GNU bison 3.3, silence POSIX compatibility warning (bug #55613)
Mike Miller <mtmiller@octave.org>
parents: 26541
diff changeset
3565 dnl older. In Autoconf 2.70, AC_PROG_YACC no longer adds the `-y`
df42ea23502f build: support GNU bison 3.3, silence POSIX compatibility warning (bug #55613)
Mike Miller <mtmiller@octave.org>
parents: 26541
diff changeset
3566 dnl option to emulate POSIX yacc.
df42ea23502f build: support GNU bison 3.3, silence POSIX compatibility warning (bug #55613)
Mike Miller <mtmiller@octave.org>
parents: 26541
diff changeset
3567 WARN_YFLAGS="-Wno-yacc"
df42ea23502f build: support GNU bison 3.3, silence POSIX compatibility warning (bug #55613)
Mike Miller <mtmiller@octave.org>
parents: 26541
diff changeset
3568
18974
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3569 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
3570 [octave_cv_bison_api_prefix_decl_style], [
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3571 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
3572 quote="quote brace"
18974
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3573 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
3574 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
3575 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
3576 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
3577 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
3578 else
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
3579 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
3580 fi
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
3581 else
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
3582 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
3583 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
3584 else
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
3585 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
3586 fi
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
3587 fi
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
3588 cat << EOF > conftest.yy
18974
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3589 $def
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3590 %start input
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3591 %%
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3592 input:;
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3593 %%
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3594 EOF
19105
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
3595 ## Older versions of bison only warn and exit with success.
26672
df42ea23502f build: support GNU bison 3.3, silence POSIX compatibility warning (bug #55613)
Mike Miller <mtmiller@octave.org>
parents: 26541
diff changeset
3596 octave_bison_output=`$YACC $WARN_YFLAGS 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
3597 ac_status=$?
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
3598 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
3599 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
3600 break
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
3601 fi
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
3602 done
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
3603 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
3604 break
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3605 fi
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3606 done
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3607 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
3608 ])
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3609 fi
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3610
25637
e1c3d1c6e896 don't substitute api.prefix style in bison input files
John W. Eaton <jwe@octave.org>
parents: 25559
diff changeset
3611 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
3612 || 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
3613 tmp_have_bison=no
18974
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3614 warn_bison_api_prefix_decl_style="
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3615
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3616 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
3617 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
3618 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
3619 "
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3620 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
3621 fi
d8abf813c69f handle changes in bison 3.x
John W. Eaton <jwe@octave.org>
parents: 18973
diff changeset
3622
17197
fbee0d312af5 acinclude.m4: Remove some unnecessary double quotes around variables.
Rik <rik@octave.org>
parents: 17196
diff changeset
3623 if test $tmp_have_bison = no; then
25310
0b253ba6eb91 avoid syntax errors in build-aux/subst scripts
John W. Eaton <jwe@octave.org>
parents: 25299
diff changeset
3624 YACC='${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
3625 warn_bison="
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3626
19105
6b4dfb1e5afb allow building with old versions of bison again (bug #43023)
John W. Eaton <jwe@octave.org>
parents: 18974
diff changeset
3627 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
3628 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
3629 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
3630 building from VCS sources.
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3631 "
16784
0fabe0f49f38 use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents: 16733
diff changeset
3632 OCTAVE_CONFIGURE_WARNING([warn_bison])
0fabe0f49f38 use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents: 16733
diff changeset
3633 fi
26672
df42ea23502f build: support GNU bison 3.3, silence POSIX compatibility warning (bug #55613)
Mike Miller <mtmiller@octave.org>
parents: 26541
diff changeset
3634 AC_SUBST(WARN_YFLAGS)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3635 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3636 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3637 dnl Find find program.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3638 dnl
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
3639 ## Prefer GNU find if found.
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3640 AN_MAKEVAR([FIND], [OCTAVE_PROG_FIND])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3641 AN_PROGRAM([gfind], [OCTAVE_PROG_FIND])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3642 AN_PROGRAM([find], [OCTAVE_PROG_FIND])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3643 AC_DEFUN([OCTAVE_PROG_FIND], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3644 AC_CHECK_PROGS(FIND, [gfind find])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3645 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3646 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3647 dnl Check for flex.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3648 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3649 AC_DEFUN([OCTAVE_PROG_FLEX], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3650 ## 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
3651 ## it, and it might not be installed.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3652 ##
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3653 ## 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
3654 ## using flex.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3655 AC_PROG_LEX
16784
0fabe0f49f38 use better method to determine whether we are using flex and bison
John W. Eaton <jwe@octave.org>
parents: 16733
diff changeset
3656 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
3657 *flex*)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3658 LFLAGS="-I"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3659 AC_MSG_RESULT([defining LFLAGS to be $LFLAGS])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3660 LEXLIB=
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3661 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3662 *)
25310
0b253ba6eb91 avoid syntax errors in build-aux/subst scripts
John W. Eaton <jwe@octave.org>
parents: 25299
diff changeset
3663 LEX='${top_srcdir}/build-aux/missing flex'
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3664 warn_flex="
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3665
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3666 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
3667 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
3668 "
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3669 OCTAVE_CONFIGURE_WARNING([warn_flex])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3670 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3671 esac
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3672 AC_SUBST(LFLAGS)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3673 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3674 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3675 dnl Check for ghostscript.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3676 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3677 AC_DEFUN([OCTAVE_PROG_GHOSTSCRIPT], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3678 case "$canonical_host_type" in
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3679 *-*-mingw* | *-*-msdosmsvc)
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
3680 ac_octave_gs_names="gswin32c gs mgs"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3681 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3682 *)
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
3683 ac_octave_gs_names="gs"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3684 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3685 esac
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
3686 AC_CHECK_PROGS(GHOSTSCRIPT, [$ac_octave_gs_names])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3687 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
3688 GHOSTSCRIPT='${top_srcdir}/build-aux/missing gs'
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3689 warn_ghostscript="
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3690
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3691 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
3692 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
3693 using Octave
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3694 "
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3695 OCTAVE_CONFIGURE_WARNING([warn_ghostscript])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3696 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3697 AC_SUBST(GHOSTSCRIPT)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3698 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3699 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3700 dnl Check for gnuplot.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3701 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3702 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
3703 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
3704 ac_octave_gp_default="gnuplot"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3705 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
3706 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
3707 GNUPLOT_BINARY=$GNUPLOT
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3708 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
3709 else
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
3710 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
3711 GNUPLOT_BINARY=$GNUPLOT
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3712 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
3713 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
3714 GNUPLOT_BINARY=""
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3715 warn_gnuplot="
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3716
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3717 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
3718 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
3719 Octave's plotting commands.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3720 "
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3721 OCTAVE_CONFIGURE_WARNING([warn_gnuplot])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3722 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3723 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3724 AC_SUBST(GNUPLOT)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3725 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3726 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3727 dnl Check for gperf.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3728 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3729 AC_DEFUN([OCTAVE_PROG_GPERF], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3730 AC_CHECK_PROG(GPERF, gperf, gperf, [])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3731 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
3732 GPERF='${top_srcdir}/build-aux/missing gperf'
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3733 warn_gperf="
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3734
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3735 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
3736 reconstruct oct-gperf.h
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3737 "
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3738 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
3739 GPERF='${top_srcdir}/build-aux/missing gperf'
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3740 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3741 AC_SUBST(GPERF)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3742 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3743 dnl
19744
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3744 dnl Find icotool program.
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3745 dnl
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3746 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
3747 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
3748 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
3749 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
3750 warn_icotool="
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3751
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3752 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
3753 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
3754 VCS sources.
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3755 "
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3756 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
3757 fi
19744
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3758 AC_SUBST(ICOTOOL)
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3759 ])
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3760 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3761 dnl Check for makeinfo.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3762 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3763 AC_DEFUN([OCTAVE_PROG_MAKEINFO], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3764 dnl use MKINFO, not MAKEINFO, for variable name because Automake
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3765 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
3766 dnl exist which will then fool the 'test -z' line.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3767 AC_CHECK_PROG(MKINFO, makeinfo, makeinfo, [])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3768 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
3769 warn_makeinfo="
ca37c6023a79 don't abort configure if makeinfo is missing
John W. Eaton <jwe@octave.org>
parents: 15969
diff changeset
3770
ca37c6023a79 don't abort configure if makeinfo is missing
John W. Eaton <jwe@octave.org>
parents: 15969
diff changeset
3771 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
3772 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
3773 "
ca37c6023a79 don't abort configure if makeinfo is missing
John W. Eaton <jwe@octave.org>
parents: 15969
diff changeset
3774 OCTAVE_CONFIGURE_WARNING([warn_makeinfo])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3775 fi
24623
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3776 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
3777 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
3778 if test -n "$MKINFO"; then
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3779 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
3780 [octave_cv_makeinfo_sortas_command],
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3781 [cat << EOF > conftest.texi
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3782 \input texinfo
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3783 @node Top
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3784 @top Document
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3785 @menu
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3786 * Chapter::
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3787 * Index::
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3788 @end menu
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3789 @node Chapter
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3790 @chapter Chapter
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3791 @cindex @sortas{a} foo
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3792 @node Index
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3793 @unnumbered Index
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3794 @printindex cp
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3795 @bye
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3796 EOF
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3797 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
3798 octave_cv_makeinfo_sortas_command=yes
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3799 else
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3800 octave_cv_makeinfo_sortas_command=no
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3801 fi
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3802 rm -f conftest.info conftest.texi
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3803 ])
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3804 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
3805 warn_makeinfo="
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3806
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3807 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
3808 @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
3809 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
3810 "
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3811 OCTAVE_CONFIGURE_WARNING([warn_makeinfo])
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3812 fi
f39ae754a7d8 configure: test that makeinfo supports the @sortas command
Mike Miller <mtmiller@octave.org>
parents: 24534
diff changeset
3813 fi
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3814 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3815 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3816 dnl What pager should we use?
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3817 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3818 AC_DEFUN([OCTAVE_PROG_PAGER], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3819 if test "$cross_compiling" = yes; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3820 DEFAULT_PAGER=less
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3821 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
3822 AC_SUBST(DEFAULT_PAGER)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3823 else
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
3824 ac_octave_possible_pagers="less more page pg"
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3825 case "$canonical_host_type" in
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3826 *-*-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
3827 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
3828 ;;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3829 esac
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3830
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
3831 AC_CHECK_PROGS(DEFAULT_PAGER, [$ac_octave_possible_pagers], [])
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3832 if test -z "$DEFAULT_PAGER"; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3833 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
3834 OCTAVE_CONFIGURE_WARNING([warn_less])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3835 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3836 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3837 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3838 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3839 dnl Find Perl program.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3840 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3841 AC_DEFUN([OCTAVE_PROG_PERL], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3842 AC_CHECK_PROG(PERL, perl, perl, [])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3843 AC_SUBST(PERL)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3844 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3845 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3846 dnl Find Python program.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3847 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3848 AC_DEFUN([OCTAVE_PROG_PYTHON], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3849 AC_CHECK_PROG(PYTHON, python, python, [])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3850 AC_SUBST(PYTHON)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3851 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3852 dnl
19744
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3853 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
3854 dnl
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3855 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
3856 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
3857 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
3858 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
3859 warn_rsvg_convert="
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3860
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3861 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
3862 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
3863 from VCS sources.
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3864 "
bc2a8db22831 build: Use the missing script for icotool and rsvg-convert
Mike Miller <mtmiller@ieee.org>
parents: 19744
diff changeset
3865 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
3866 fi
19744
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3867 AC_SUBST(RSVG_CONVERT)
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3868 ])
1687269e31e4 build: Generate Octave logo icons from SVG source (bug #37062)
Mike Miller <mtmiller@ieee.org>
parents: 19697
diff changeset
3869 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3870 dnl Find sed program.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3871 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3872 # Check for a fully-functional sed program, that truncates
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3873 # as few characters as possible and that supports "\(X\|Y\)"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3874 # style regular expression alternation. Prefer GNU sed if found.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3875 AC_DEFUN([OCTAVE_PROG_SED], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3876 AC_MSG_CHECKING([for a usable sed])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3877 if test -z "$SED"; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3878 AC_CACHE_VAL([octave_cv_prog_sed],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3879 [# 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
3880 # Next, test potential sed programs in list for truncation.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3881 _AS_PATH_WALK([$PATH],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3882 [for ac_prog in sed gsed; do
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3883 for ac_exec_ext in '' $ac_executable_extensions; do
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3884 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
3885 _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
3886 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3887 done
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3888 done
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3889 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3890 AS_TMPDIR(sed)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3891 _max=0
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3892 _count=0
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3893 # 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
3894 # along with /bin/sed that truncates output.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3895 for _sed in $_sed_list /usr/xpg4/bin/sed; do
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3896 test ! -f ${_sed} && break
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3897 cat /dev/null > "$tmp/sed.in"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3898 _count=0
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3899 echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3900 # Check for GNU sed and select it if it is found.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3901 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3902 octave_cv_prog_sed=${_sed}
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3903 break;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3904 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3905 # Reject if RE alternation is not handled.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3906 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
3907 continue;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3908 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3909 while true; do
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3910 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3911 mv "$tmp/sed.tmp" "$tmp/sed.in"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3912 cp "$tmp/sed.in" "$tmp/sed.nl"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3913 echo >>"$tmp/sed.nl"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3914 ${_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
3915 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3916 # 10000 chars as input seems more than enough
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3917 test $_count -gt 10 && break
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3918 _count=`expr $_count + 1`
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3919 if test $_count -gt $_max; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3920 _max=$_count
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3921 octave_cv_prog_sed=$_sed
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3922 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3923 done
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3924 done
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3925 rm -rf "$tmp"
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3926 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3927 SED=$octave_cv_prog_sed
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3928 if test -z "$SED"; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3929 AC_MSG_ERROR([no usable version of sed found])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3930 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3931 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3932 AC_SUBST(SED)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3933 AC_MSG_RESULT([$SED])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3934 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3935 dnl
24077
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3936 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
3937 dnl
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3938 AC_DEFUN([OCTAVE_PROG_TAR_REPRODUCIBLE], [
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3939 AC_MSG_CHECKING([for options to make reproducible archives with GNU tar])
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3940 dnl This uses Automake's logic for finding GNU tar under various names
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3941 for octave_tar in tar gnutar gtar :; do
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3942 $octave_tar --version >/dev/null 2>&1 && break
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3943 done
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3944 dnl If we have a valid GNU tar program, see if it supports sets of options
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3945 if test x"$octave_tar" != x:; then
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3946 octave_tar_flags=
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3947 echo > conftest.txt
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3948 for octave_tar_flag in --owner=0 --group=0 --numeric-owner --sort=name; do
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3949 $octave_tar -cf conftest.tar $octave_tar_flags $octave_tar_flag conftest.txt 2>/dev/null
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3950 if test $? -eq 0; then
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3951 octave_tar_flags="${octave_tar_flags:+$octave_tar_flags }$octave_tar_flag"
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3952 fi
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3953 done
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3954 rm -f conftest.tar conftest.txt
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3955 REPRODUCIBLE_TAR_FLAGS="$octave_tar_flags"
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3956 fi
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3957 AC_SUBST(REPRODUCIBLE_TAR_FLAGS)
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3958 AC_MSG_RESULT([$REPRODUCIBLE_TAR_FLAGS])
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3959 ])
e483dcb5777d build the source distribution archives reproducibly
Mike Miller <mtmiller@octave.org>
parents: 24022
diff changeset
3960 dnl
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3961 dnl Check for texi2dvi.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3962 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3963 AC_DEFUN([OCTAVE_PROG_TEXI2DVI], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3964 AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, [])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3965 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
3966 TEXI2DVI='${top_srcdir}/build-aux/missing texi2dvi'
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3967 warn_texi2dvi="
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3968
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3969 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
3970 reconstruct the DVI version of the manual
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3971 "
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3972 OCTAVE_CONFIGURE_WARNING([warn_texi2dvi])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3973 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3974 AC_SUBST(TEXI2DVI)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3975 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3976 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3977 dnl Check for texi2pdf.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3978 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3979 AC_DEFUN([OCTAVE_PROG_TEXI2PDF], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3980 AC_REQUIRE([OCTAVE_PROG_TEXI2DVI])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3981 AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, [])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3982 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
3983 ac_octave_texi2pdf_missing=yes;
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3984 if test -n "$TEXI2DVI"; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3985 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
3986 ac_octave_texi2pdf_missing=no;
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3987 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3988 else
16068
b309a5da17f5 use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents: 16012
diff changeset
3989 ac_octave_texi2pdf_missing=no;
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3990 fi
16068
b309a5da17f5 use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents: 16012
diff changeset
3991 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
3992 TEXI2PDF='${top_srcdir}/build-aux/missing texi2pdf'
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3993 warn_texi2pdf="
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3994
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3995 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
3996 reconstruct the PDF version of the manual
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3997 "
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3998 OCTAVE_CONFIGURE_WARNING([warn_texi2pdf])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
3999 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4000 AC_SUBST(TEXI2PDF)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4001 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4002 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4003 dnl Set default value for a variable and substitute it.
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4004 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4005 AC_DEFUN([OCTAVE_SET_DEFAULT], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4006 ifelse($#, 2, [: ${$1=$2}
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4007 ])dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4008 AC_MSG_RESULT([defining $1 to be $$1])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4009 AC_SUBST($1)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4010 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4011 dnl
15144
9cc337ced51a build: Update OCTAVE_UMFPACK_SEPARATE_SPLIT macro to look for SuiteSparse header file.
Rik <rik@octave.org>
parents: 15141
diff changeset
4012 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
4013 dnl
15144
9cc337ced51a build: Update OCTAVE_UMFPACK_SEPARATE_SPLIT macro to look for SuiteSparse header file.
Rik <rik@octave.org>
parents: 15141
diff changeset
4014 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
4015 dnl
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4016 AC_DEFUN([OCTAVE_UMFPACK_SEPARATE_SPLIT], [
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4017 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
4018 AC_CACHE_VAL([octave_cv_umfpack_separate_split],
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4019 [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
4020 #include <stdint.h>
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4021 #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
4022 #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
4023 #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
4024 # include <suitesparse/umfpack.h>
9cc337ced51a build: Update OCTAVE_UMFPACK_SEPARATE_SPLIT macro to look for SuiteSparse header file.
Rik <rik@octave.org>
parents: 15141
diff changeset
4025 #elif defined (HAVE_UFSPARSE_UMFPACK_H)
9cc337ced51a build: Update OCTAVE_UMFPACK_SEPARATE_SPLIT macro to look for SuiteSparse header file.
Rik <rik@octave.org>
parents: 15141
diff changeset
4026 # include <ufsparse/umfpack.h>
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4027 #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
4028 # include <umfpack/umfpack.h>
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4029 #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
4030 # include <umfpack.h>
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4031 #endif
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21604
diff changeset
4032 #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
4033 typedef uint64_t idx_type;
eb572251b7c6 check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents: 16313
diff changeset
4034 #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
4035 #else
eb572251b7c6 check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents: 16313
diff changeset
4036 typedef int idx_type;
eb572251b7c6 check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents: 16313
diff changeset
4037 #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
4038 #endif
eb572251b7c6 check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents: 16313
diff changeset
4039 idx_type n = 5;
eb572251b7c6 check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents: 16313
diff changeset
4040 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
4041 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
4042 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
4043 -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
4044 double br[] = {8., 45., -3., 3., 19.};
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4045 double bi[] = {0., 0., 0., 0., 0.};
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4046 int main (void)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4047 {
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4048 double *null = (double *) NULL ;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4049 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
4050 idx_type i ;
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4051 void *Symbolic, *Numeric ;
16318
eb572251b7c6 check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents: 16313
diff changeset
4052 (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
4053 (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
4054 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
4055 (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
4056 Numeric, null, null) ;
16318
eb572251b7c6 check for correct SuiteSparse functions if --enable-64
John W. Eaton <jwe@octave.org>
parents: 16313
diff changeset
4057 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
4058 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
4059 if (fabs (*x - i - 1.) > 1.e-13)
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4060 return (1);
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4061 return (0) ;
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4062 }
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4063 ]])],
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4064 octave_cv_umfpack_separate_split=yes,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4065 octave_cv_umfpack_separate_split=no,
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4066 octave_cv_umfpack_separate_split=yes)
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4067 ])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4068 if test "$cross_compiling" = yes; then
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4069 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
4070 else
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4071 AC_MSG_RESULT([$octave_cv_umfpack_separate_split])
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4072 fi
15336
5fff79162342 acinclude.m4: Put temporary shell variables in macros into ac_octave namespace.
Rik <rik@octave.org>
parents: 15330
diff changeset
4073 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
4074 AC_DEFINE(UMFPACK_SEPARATE_SPLIT, 1,
15141
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4075 [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
4076 fi
4388f6518440 build: Overhaul acinclude.m4 macros.
Rik <rik@octave.org>
parents: 15134
diff changeset
4077 ])