Mercurial > pytave
annotate m4/ax_octave.m4 @ 167:f31a5f5b5269
maint: remove workarounds and comments on old Octave versions
* ax_octave.m4 (AX_OCTAVE): Use AS_DIRNAME for parent directory. Remove
checking message.
* octave_to_python.cc (pytave::octlist_to_pytuple): Remove workaround for
bug in old version of Octave.
* pytave.cc (pytave::delvar): Likewise.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Wed, 06 Apr 2016 15:21:51 -0700 |
parents | 3af7523b395a |
children | 277b1e172123 |
rev | line source |
---|---|
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
1 # =========================================================================== |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
2 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
3 # =========================================================================== |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
4 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
5 # SYNOPSIS |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
6 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
7 # AX_OCTAVE([OCTAVE_CONFIG], [ACTION_IF_FOUND], [ACTION_IF_NOT_FOUND]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
8 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
9 # DESCRIPTION |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
10 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
11 # This macro does a Octave development environment check. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
12 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
13 # It accepts one optional argument, OCTAVE_CONFIG. This is the full |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
14 # path the the octave-config used to find out the environment. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
15 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
16 # If OCTAVE_CONFIG is not set, or empty, a octave-config executable |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
17 # is searched for using AC_PATH_TOOL. If the executable is not |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
18 # found, or does not return results, the Octave interpreter will be |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
19 # used instead. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
20 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
21 # As a final check, a simple test program is compiled and linked |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
22 # against the found Octave installation. If the check is |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
23 # successful, ACTION_IF_FOUND is executed, otherwise |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
24 # ACTION_IF_NOT_FOUND. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
25 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
26 # AX_OCTAVE substitutes OCTAVE_CPPFLAGS, OCTAVE_LDFLAGS and |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
27 # OCTAVE_LIBS, along with the optional OCTAVE_LIBRARYDIR and |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
28 # OCTAVE_INCLUDEDIR. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
29 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
30 # Typical usage: |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
31 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
32 # AX_OCTAVE([], [], [ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
33 # AC_MSG_ERROR([[Octave required but not available]]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
34 # ]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
35 # LIBS="$LIBS $OCTAVE_LIBS" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
36 # CPPFLAGS="$CPPFLAGS $OCTAVE_CPPFLAGS" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
37 # LDFLAGS="$LDFLAGS $OCTAVE_LDFLAGS" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
38 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
39 # LAST MODIFICATION |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
40 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
41 # 2009-05-04 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
42 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
43 # COPYING |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
44 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
45 # Copyright (c) 2009 David Grundberg |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
46 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
47 # This program is free software; you can redistribute it and/or modify it |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
48 # under the terms of the GNU General Public License as published by the |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
49 # Free Software Foundation; either version 2 of the License, or (at your |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
50 # option) any later version. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
51 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
52 # This program is distributed in the hope that it will be useful, but |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
53 # WITHOUT ANY WARRANTY; without even the implied warranty of |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
54 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
55 # Public License for more details. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
56 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
57 # You should have received a copy of the GNU General Public License along |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
58 # with this program. If not, see <http://www.gnu.org/licenses/>. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
59 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
60 # As a special exception, the respective Autoconf Macro's copyright owner |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
61 # gives unlimited permission to copy, distribute and modify the configure |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
62 # scripts that are the output of Autoconf when processing the Macro. You |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
63 # need not follow the terms of the GNU General Public License when using |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
64 # or distributing such scripts, even though portions of the text of the |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
65 # Macro appear in them. The GNU General Public License (GPL) does govern |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
66 # all other use of the material that constitutes the Autoconf Macro. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
67 # |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
68 # This special exception to the GPL applies to versions of the Autoconf |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
69 # Macro released by the Autoconf Macro Archive. When you make and |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
70 # distribute a modified version of the Autoconf Macro, you may extend this |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
71 # special exception to the GPL to apply to your modified version as well. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
72 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
73 AC_DEFUN([AX_OCTAVE],[ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
74 # These are the variables AX_OCTAVE uses |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
75 OCTAVE_LDFLAGS= |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
76 OCTAVE_LIBS= |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
77 OCTAVE_CPPFLAGS= |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
78 OCTAVE_INCLUDEDIR= |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
79 OCTAVE_LIBRARYDIR= |
83
8145ecfecfb9
Configuration changes. Detect numpy in ./configure.
David Grundberg <c04dgg@cs.umu.se>
parents:
29
diff
changeset
|
80 ax_octave_config="[$]$1" |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
81 ax_octave_ok= |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
82 |
115
00d19f71c9ca
Initial implementation of py oct-file
Mike Miller <mtmiller@octave.org>
parents:
104
diff
changeset
|
83 AC_CHECK_TOOLS([MKOCTFILE], [mkoctfile]) |
00d19f71c9ca
Initial implementation of py oct-file
Mike Miller <mtmiller@octave.org>
parents:
104
diff
changeset
|
84 |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
85 AC_MSG_CHECKING([for octave-config filename]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
86 AS_IF([test -z "$ax_octave_config"], [ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
87 AC_MSG_RESULT([determined from path]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
88 AC_PATH_TOOL([ax_octave_config], [octave-config], []) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
89 AS_IF([test -z "$ax_octave_config"], [ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
90 AC_MSG_WARN([Could not find octave-config.]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
91 ], []) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
92 ], [ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
93 AC_MSG_RESULT([specified $ax_octave_config]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
94 ]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
95 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
96 AS_IF([test -n "$ax_octave_config"], [ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
97 AC_MSG_CHECKING([for Octave library path]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
98 OCTAVE_LIBRARYDIR=`$ax_octave_config -p OCTLIBDIR` |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
99 AC_MSG_RESULT([$OCTAVE_LIBRARYDIR]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
100 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
101 AC_MSG_CHECKING([for Octave include path]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
102 OCTAVE_INCLUDEDIR=`$ax_octave_config -p OCTINCLUDEDIR` |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
103 AC_MSG_RESULT([$OCTAVE_INCLUDEDIR]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
104 ]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
105 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
106 AS_IF([[test -z "$OCTAVE_LIBRARYDIR" -o -z "$OCTAVE_INCLUDEDIR"]], [ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
107 AC_MSG_WARN([[ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
108 ======================================================================== |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
109 Octave library or include path not found using octave-config, trying |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
110 Octave interpreter. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
111 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
112 This could be a sign that the Octave development package is missing. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
113 ========================================================================]]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
114 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
115 OCTAVE_LIBRARYDIR= |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
116 OCTAVE_INCLUDEDIR= |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
117 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
118 AC_MSG_NOTICE([[checking for Octave interpreter]]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
119 AC_PATH_TOOL([ax_octave_interpreter], [octave], []) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
120 AS_IF([test -z "$ax_octave_interpreter"], [ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
121 AC_MSG_WARN([Could not find Octave interpreter.]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
122 ], [ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
123 AC_MSG_CHECKING([for Octave library path (alt)]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
124 OCTAVE_LIBRARYDIR=`$ax_octave_interpreter -q --eval "printf(octave_config_info.octlibdir)"` |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
125 AC_MSG_RESULT([$OCTAVE_LIBRARYDIR]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
126 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
127 AC_MSG_CHECKING([for Octave include path (alt)]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
128 OCTAVE_INCLUDEDIR=`$ax_octave_interpreter -q --eval "printf(octave_config_info.octincludedir)"` |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
129 AC_MSG_RESULT([$OCTAVE_INCLUDEDIR]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
130 ]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
131 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
132 AS_IF([[test -z "$OCTAVE_LIBRARYDIR" -o -z "$OCTAVE_INCLUDEDIR"]], [ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
133 ax_octave_ok=no |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
134 ]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
135 ]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
136 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
137 AS_IF([test -z "$ax_octave_ok"], [ |
96
66bd40c8d36e
Make Pytave compile against Octave 3.3+. Fix configuration bugs.
David Grundberg <individ@acc.umu.se>
parents:
83
diff
changeset
|
138 if test -f "$OCTAVE_INCLUDEDIR/oct.h" ; then |
167
f31a5f5b5269
maint: remove workarounds and comments on old Octave versions
Mike Miller <mtmiller@octave.org>
parents:
156
diff
changeset
|
139 OCTAVE_INCLUDEDIR=`AS_DIRNAME(["$OCTAVE_INCLUDEDIR"])` |
96
66bd40c8d36e
Make Pytave compile against Octave 3.3+. Fix configuration bugs.
David Grundberg <individ@acc.umu.se>
parents:
83
diff
changeset
|
140 fi |
66bd40c8d36e
Make Pytave compile against Octave 3.3+. Fix configuration bugs.
David Grundberg <individ@acc.umu.se>
parents:
83
diff
changeset
|
141 |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
142 OCTAVE_LDFLAGS="-L$OCTAVE_LIBRARYDIR" |
104
6450086b1934
build: Fix values used for OCTAVE_CPPFLAGS and OCTAVE_LIBS
Mike Miller <mtmiller@octave.org>
parents:
96
diff
changeset
|
143 OCTAVE_LIBS="-loctinterp -loctave" |
6450086b1934
build: Fix values used for OCTAVE_CPPFLAGS and OCTAVE_LIBS
Mike Miller <mtmiller@octave.org>
parents:
96
diff
changeset
|
144 OCTAVE_CPPFLAGS="-I$OCTAVE_INCLUDEDIR -I$OCTAVE_INCLUDEDIR/octave" |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
145 |
96
66bd40c8d36e
Make Pytave compile against Octave 3.3+. Fix configuration bugs.
David Grundberg <individ@acc.umu.se>
parents:
83
diff
changeset
|
146 AC_CACHE_CHECK([whether linking to Octave works], [ax_octave_cv_lib_octave], |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
147 [ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
148 ax_octave_cv_lib_octave=no |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
149 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
150 AC_LANG_PUSH([C++]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
151 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
152 ax_octave_old_ldflags="$LDFLAGS" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
153 ax_octave_old_cppflags="$CPPFLAGS" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
154 ax_octave_old_libs="$LIBS" |
96
66bd40c8d36e
Make Pytave compile against Octave 3.3+. Fix configuration bugs.
David Grundberg <individ@acc.umu.se>
parents:
83
diff
changeset
|
155 |
66bd40c8d36e
Make Pytave compile against Octave 3.3+. Fix configuration bugs.
David Grundberg <individ@acc.umu.se>
parents:
83
diff
changeset
|
156 LDFLAGS="$OCTAVE_LDFLAGS $ax_octave_old_ldflags" |
66bd40c8d36e
Make Pytave compile against Octave 3.3+. Fix configuration bugs.
David Grundberg <individ@acc.umu.se>
parents:
83
diff
changeset
|
157 CPPFLAGS="$OCTAVE_CPPFLAGS $ax_octave_old_cppflags" |
66bd40c8d36e
Make Pytave compile against Octave 3.3+. Fix configuration bugs.
David Grundberg <individ@acc.umu.se>
parents:
83
diff
changeset
|
158 LIBS="$OCTAVE_LIBS $ax_octave_old_libs" |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
159 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
160 AC_LANG_ASSERT(C++) |
156
3af7523b395a
build: Properly quote AC_LANG_PROGRAM body to silence m4 warnings
Mike Miller <mtmiller@octave.org>
parents:
115
diff
changeset
|
161 AC_LINK_IFELSE([AC_LANG_PROGRAM( |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
162 [[#include <octave/oct.h> |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
163 #include <octave/Matrix.h> ]], |
156
3af7523b395a
build: Properly quote AC_LANG_PROGRAM body to silence m4 warnings
Mike Miller <mtmiller@octave.org>
parents:
115
diff
changeset
|
164 [[MatrixType()]])], |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
165 [ax_octave_cv_lib_octave=yes], |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
166 [ax_octave_cv_lib_octave=no]) |
96
66bd40c8d36e
Make Pytave compile against Octave 3.3+. Fix configuration bugs.
David Grundberg <individ@acc.umu.se>
parents:
83
diff
changeset
|
167 |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
168 LDFLAGS="$ax_octave_old_ldflags" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
169 CPPFLAGS="$ax_octave_old_cppflags" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
170 LIBS="$ax_octave_old_libs" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
171 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
172 AC_LANG_POP([C++]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
173 ]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
174 AS_IF([test "x$ax_octave_cv_lib_octave" != "xyes"], [ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
175 ax_octave_ok=no |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
176 ]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
177 ]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
178 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
179 AS_IF([test -n "$ax_octave_ok"], [ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
180 OCTAVE_LDFLAGS= |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
181 OCTAVE_LIBS= |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
182 OCTAVE_CPPFLAGS= |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
183 OCTAVE_INCLUDEDIR= |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
184 OCTAVE_LIBRARYDIR= |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
185 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
186 AC_MSG_WARN([[ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
187 ======================================================================== |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
188 Can not link with Octave. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
189 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
190 Make sure the Octave development package is installed. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
191 ========================================================================]]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
192 ]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
193 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
194 AC_SUBST([OCTAVE_LDFLAGS]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
195 AC_SUBST([OCTAVE_CPPFLAGS]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
196 AC_SUBST([OCTAVE_LIBS]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
197 AC_SUBST([OCTAVE_INCLUDEDIR]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
198 AC_SUBST([OCTAVE_LIBRARYDIR]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
199 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
200 # Execute ACTION_IF_FOUND or ACTION_IF_NOT_FOUND |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
201 if test -z "$ax_octave_ok" ; then |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
202 m4_ifvaln([$2],[$2],[:])dnl |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
203 m4_ifvaln([$3],[else $3])dnl |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
204 fi |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
205 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
diff
changeset
|
206 ]) |