1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.69])
5AC_INIT([control], [3.3.1])
6AC_CONFIG_SRCDIR([sl_ab01od.cc])
7AC_CONFIG_HEADERS([config.h])
8
9# Avoid warnings for redefining AH-generated preprocessor symbols of
10# Octave.
11AH_TOP([#include "undef-ah-octave.h"])
12
13AC_CONFIG_MACRO_DIRS([m4])
14
15# Checks for programs.
16AC_CHECK_PROG(MKOCTFILE, mkoctfile, mkoctfile)
17if test -z "$MKOCTFILE"; then
18AC_MSG_ERROR([mkoctfile not found], 1);
19fi
20AC_CHECK_PROG(OCTAVE_CONFIG, octave-config, octave-config)
21if test -z "$OCTAVE_CONFIG"; then
22AC_MSG_ERROR([octave-config not found], 1);
23fi
24
25AC_PROG_CXX
26
27# Start of checks for Octave features, preparations for checks.
28OCTLIBDIR=${OCTLIBDIR:-`$OCTAVE_CONFIG -p OCTLIBDIR`}
29## We need Octaves include path both with and without '/octave'
30## appended. The path without '/octave' is needed to selectively test
31## for Octave headers, like octave/....h. The path with '/octave' is
32## needed since some Octave headers contain include directives for
33## other Octave headers with <> instead of "".
34OCTINCLUDEDIR=${OCTINCLUDEDIR:-`$MKOCTFILE -p INCFLAGS`}
35AC_LANG_PUSH([C++])
36TCXXFLAGS=$CXXFLAGS
37TLDFLAGS=$LDFLAGS
38TLIBS=$LIBS
39TCPPFLAGS=$CPPFLAGS
40LDFLAGS="-L$OCTLIBDIR $LDFLAGS"
41LIBS="-loctinterp $LIBS"
42# CXXFLAGS=
43CPPFLAGS="$OCTINCLUDEDIR $CPPFLAGS"
44
45## Simple symbol alternatives of different Octave versions.
46OF_OCTAVE_LIST_ALT_SYMS([
47[dnl
48  [is_real_type],
49  [isreal],
50  [[octave_value ().isreal ();]],
51  [OV_ISREAL],
52  [],
53  []
54],
55
56[dnl
57  [is_cell],
58  [iscell],
59  [[octave_value ().iscell ();]],
60  [OV_ISCELL],
61  [],
62  []
63],
64
65[dnl
66  [is_object],
67  [isobject],
68  [[octave_value ().isobject ();]],
69  [OV_ISOBJECT],
70  [],
71  []
72],
73
74[dnl
75  [is_complex_type],
76  [iscomplex],
77  [[octave_value ().iscomplex ();]],
78  [OV_ISCOMPLEX],
79  [],
80  []
81],
82
83[dnl
84  [is_numeric_type],
85  [isnumeric],
86  [[octave_value ().isnumeric ();]],
87  [OV_ISNUMERIC],
88  [],
89  []
90]
91
92],
93   [oct-alt-includes.h])
94
95LIBS=$TLIBS
96LDFLAGS=$TLDFLAGS
97CXXFLAGS=$TCXXFLAGS
98CPPFLAGS=$TCPPFLAGS
99AC_LANG_POP([C++])
100# End of checks for Octave features.
101
102# Test for newer DGGES routine in LAPACK
103AC_LANG_PUSH([Fortran 77])
104AC_SEARCH_LIBS(dgges, lapack,[HAVE_DGGES=1],[HAVE_DGGES=0])
105AC_LANG_POP([Fortran 77])
106AC_SUBST(HAVE_DGGES)
107
108# Output results and subst variables in Makefile.conf.in
109AC_OUTPUT(Makefile.conf)
110