annotate main/sparsersb/src/configure.base @ 12699:41d5b212e9fa octave-forge

Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
author michelemartone
date Sun, 06 Dec 2015 10:19:16 +0000
parents 18d7476a8db6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
1 dnl The configure script is generated by autogen.sh from configure.base
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
2 dnl and the various configure.add files in the source tree. Edit
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
3 dnl configure.base and reprocess rather than modifying ./configure.
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
4
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
5 dnl autoconf 2.13 certainly doesn't work! What is the minimum requirement?
11878
ffd8edaaa76f packaging oriented notes and suggestions from carandraug.
michelemartone
parents: 8923
diff changeset
6 AC_PREREQ([2.67])
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
7
11878
ffd8edaaa76f packaging oriented notes and suggestions from carandraug.
michelemartone
parents: 8923
diff changeset
8 AC_INIT([sparsersb package], [1.0.0])
ffd8edaaa76f packaging oriented notes and suggestions from carandraug.
michelemartone
parents: 8923
diff changeset
9 dnl
ffd8edaaa76f packaging oriented notes and suggestions from carandraug.
michelemartone
parents: 8923
diff changeset
10 dnl AC_CHECK_HEADERS([rsb.h], [], [AC_MSG_ERROR([missing the rsb library])])
ffd8edaaa76f packaging oriented notes and suggestions from carandraug.
michelemartone
parents: 8923
diff changeset
11 dnl AC_OUTPUT
ffd8edaaa76f packaging oriented notes and suggestions from carandraug.
michelemartone
parents: 8923
diff changeset
12 dnl
ffd8edaaa76f packaging oriented notes and suggestions from carandraug.
michelemartone
parents: 8923
diff changeset
13 dnl TODO: shall clean up all from here on
ffd8edaaa76f packaging oriented notes and suggestions from carandraug.
michelemartone
parents: 8923
diff changeset
14 dnl
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
15 PACKAGE=octave-forge
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
16 MAJOR_VERSION=0
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
17 MINOR_VERSION=1
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
18 PATCH_LEVEL=0
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
19
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
20 dnl Kill caching --- this ought to be the default
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
21 define([AC_CACHE_LOAD], )dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
22 define([AC_CACHE_SAVE], )dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
23
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
24 dnl uncomment to put support files in another directory
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
25 dnl AC_CONFIG_AUX_DIR(admin)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
26
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
27 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
28 AC_SUBST(PACKAGE)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
29 AC_SUBST(VERSION)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
30
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
31 dnl need to find admin files, so keep track of the top dir.
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
32 TOPDIR=`pwd`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
33 AC_SUBST(TOPDIR)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
34
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
35 dnl if mkoctfile doesn't work, then we need the following:
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
36 dnl AC_PROG_CXX
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
37 dnl AC_PROG_F77
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
38
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
39 dnl Need C compiler regardless so define it in a way that
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
40 dnl makes autoconf happy and we can override whatever we
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
41 dnl need with mkoctfile -p.
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
42 dnl XXX FIXME XXX should use mkoctfile to get CC and CFLAGS
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
43 AC_PROG_CC
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
44
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
45 dnl XXX FIXME XXX need tests for -p -c -s in mkoctfile.
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
46
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
47 dnl *******************************************************************
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
48 dnl Sort out mkoctfile version number and install paths
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
49
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
50 dnl XXX FIXME XXX latest octave has octave-config so we don't
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
51 dnl need to discover things here. Doesn't have --exe-site-dir
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
52 dnl but defines --oct-site-dir and --m-site-dir
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
53
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
54 dnl Check for mkoctfile
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
55 AC_CHECK_PROG(MKOCTFILE,mkoctfile,mkoctfile)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
56 test -z "$MKOCTFILE" && AC_MSG_WARN([no mkoctfile found on path])
12699
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
57 AC_CHECK_PROG(OCTAVE_CONFIG,octave-config,octave-config)
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
58 test -z "$OCTAVE_CONFIG" && AC_MSG_WARN([no octave-config found on path])
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
59
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
60 AC_SUBST(ver)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
61 AC_SUBST(subver)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
62 AC_SUBST(mpath)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
63 AC_SUBST(opath)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
64 AC_SUBST(xpath)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
65 AC_SUBST(altpath)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
66 AC_SUBST(altmpath)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
67 AC_SUBST(altopath)
12539
b8f0148a86f1 ./configure --help will show extra info about relevant *RSB* variables. doc update.
michelemartone
parents: 12395
diff changeset
68 dnl
b8f0148a86f1 ./configure --help will show extra info about relevant *RSB* variables. doc update.
michelemartone
parents: 12395
diff changeset
69 AC_SUBST(LIBRSB_CONFIG)
12540
18d7476a8db6 configure chanes: librsb-config is not anymore a requirement; if specified, LIBRSB_CXXFLAGS and LIBRSB_LIBS can override what given by librsb-config.
michelemartone
parents: 12539
diff changeset
70 AC_ARG_VAR([LIBRSB_CONFIG],[Pathname to the librsb-config script.])
12058
2b71b294a790 added a further linkable library variable to the autogen.sh: SPARSERSB_LIBS.
michelemartone
parents: 11878
diff changeset
71 AC_SUBST(SPARSERSB_LIBS)
12539
b8f0148a86f1 ./configure --help will show extra info about relevant *RSB* variables. doc update.
michelemartone
parents: 12395
diff changeset
72 AC_ARG_VAR([SPARSERSB_LIBS],[Additional libraries you want to link sparsersb against.])
b8f0148a86f1 ./configure --help will show extra info about relevant *RSB* variables. doc update.
michelemartone
parents: 12395
diff changeset
73 AC_SUBST(LIBRSB_LIBS)
b8f0148a86f1 ./configure --help will show extra info about relevant *RSB* variables. doc update.
michelemartone
parents: 12395
diff changeset
74 dnl AC_ARG_VAR([LIBRSB_LIBS],[Link line for librsb (determined using LIBRSB_CONFIG).])
b8f0148a86f1 ./configure --help will show extra info about relevant *RSB* variables. doc update.
michelemartone
parents: 12395
diff changeset
75 AC_SUBST(RSBOI_CXXFLAGS)
b8f0148a86f1 ./configure --help will show extra info about relevant *RSB* variables. doc update.
michelemartone
parents: 12395
diff changeset
76 dnl AC_ARG_VAR([RSBOI_CXXFLAGS],[Compile/preprocess options for librsb (determined using LIBRSB_CONFIG).])
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
77 AC_SUBST(LIBRSB_CXXFLAGS)
12539
b8f0148a86f1 ./configure --help will show extra info about relevant *RSB* variables. doc update.
michelemartone
parents: 12395
diff changeset
78 dnl AC_ARG_VAR([LIBRSB_CXXFLAGS],[Link line for librsb (determined using LIBRSB_CONFIG).])
b8f0148a86f1 ./configure --help will show extra info about relevant *RSB* variables. doc update.
michelemartone
parents: 12395
diff changeset
79 dnl
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
80
8923
ba575291987f sparsersb: added the --with-verbosity-level configure switch, to activate sparsersb (debug) verbosity at build time.
michelemartone
parents: 8882
diff changeset
81 AC_ARG_WITH(verbosity-level,
ba575291987f sparsersb: added the --with-verbosity-level configure switch, to activate sparsersb (debug) verbosity at build time.
michelemartone
parents: 8882
diff changeset
82 [ --with-verbosity-level verbosity level (0,1,..)],
ba575291987f sparsersb: added the --with-verbosity-level configure switch, to activate sparsersb (debug) verbosity at build time.
michelemartone
parents: 8882
diff changeset
83 [ RSBOI_VERBOSE_CONFIG=$withval ])
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
84 AC_ARG_WITH(path,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
85 [ --with-path install path prefix],
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
86 [ path=$withval ])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
87 AC_ARG_WITH(mpath,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
88 [ --with-mpath override path for m-files],
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
89 [mpath=$withval])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
90 AC_ARG_WITH(opath,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
91 [ --with-opath override path for oct-files],
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
92 [opath=$withval])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
93 AC_ARG_WITH(xpath,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
94 [ --with-xpath override path for executables],
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
95 [xpath=$withval])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
96 AC_ARG_WITH(altpath,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
97 [ --with-altpath alternative functions install path prefix],
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
98 [ altpath=$withval ])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
99 AC_ARG_WITH(altmpath,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
100 [ --with-altmpath override path for alternative m-files],
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
101 [altmpath=$withval])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
102 AC_ARG_WITH(altopath,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
103 [ --with-altopath override path for alternative oct-files],
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
104 [altopath=$withval])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
105 AC_ARG_WITH([swig],
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
106 [AS_HELP_STRING([--with-swig],[use swig wrapper generator [no]])],
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
107 [with_swig=$withval],
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
108 [with_swig=no])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
109
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
110 if test -n "$path" ; then
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
111 test -z "$mpath" && mpath=$path
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
112 test -z "$opath" && opath=$path/oct
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
113 test -z "$xpath" && xpath=$path/bin
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
114 test -z "$altpath" && altpath=$path-alternatives
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
115 fi
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
116
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
117 if test -n "$altpath" ; then
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
118 test -z "$altmpath" && altmpath=$altpath
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
119 test -z "$altopath" && altopath=$altpath/oct
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
120 fi
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
121
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
122 dnl Don't query if path/ver are given in the configure environment
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
123 #if test -z "$mpath" || test -z "$opath" || test -z "$xpath" || test -z "$altmpath" || test -z "$altopath" || test -z "$ver" ; then
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
124 if test -z "$mpath" || test -z "$opath" || test -z "$xpath" || test -z "$ver" ; then
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
125 dnl Construct program to get mkoctfile version and local install paths
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
126 cat > conftest.cc <<EOF
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
127 #include <octave/config.h>
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
128 #include <octave/version.h>
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
129 #include <octave/defaults.h>
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
130
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
131 #define INFOV "\nINFOV=" OCTAVE_VERSION "\n"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
132
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
133 #define INFOH "\nINFOH=" OCTAVE_CANONICAL_HOST_TYPE "\n"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
134
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
135 #ifdef OCTAVE_LOCALVERFCNFILEDIR
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
136 # define INFOM "\nINFOM=" OCTAVE_LOCALVERFCNFILEDIR "\n"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
137 #else
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
138 # define INFOM "\nINFOM=" OCTAVE_LOCALFCNFILEPATH "\n"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
139 #endif
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
140
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
141 #ifdef OCTAVE_LOCALVEROCTFILEDIR
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
142 # define INFOO "\nINFOO=" OCTAVE_LOCALVEROCTFILEDIR "\n"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
143 #else
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
144 # define INFOO "\nINFOO=" OCTAVE_LOCALOCTFILEPATH "\n"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
145 #endif
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
146
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
147 #ifdef OCTAVE_LOCALVERARCHLIBDIR
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
148 # define INFOX "\nINFOX=" OCTAVE_LOCALVERARCHLIBDIR "\n"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
149 #else
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
150 # define INFOX "\nINFOX=" OCTAVE_LOCALARCHLIBDIR "\n"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
151 #endif
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
152
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
153 const char *infom = INFOM;
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
154 const char *infoo = INFOO;
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
155 const char *infox = INFOX;
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
156 const char *infoh = INFOH;
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
157 const char *infov = INFOV;
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
158 EOF
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
159
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
160 dnl Compile program perhaps with a special version of mkoctfile
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
161 $MKOCTFILE conftest.cc || AC_MSG_ERROR(Could not run $MKOCTFILE)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
162
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
163 dnl Strip the config info from the compiled file
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
164 eval `strings conftest.o | grep "^INFO.=" | sed -e "s,//.*$,,"`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
165 rm -rf conftest*
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
166
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
167 dnl set the appropriate variables if they are not already set
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
168 ver=`echo $INFOV | sed -e "s/\.//" -e "s/\..*$//"`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
169 subver=`echo $INFOV | sed -e "[s/^[^.]*[.][^.]*[.]//]"`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
170 alt_mbase=`echo $INFOM | sed -e "[s,\/[^\/]*$,,]"`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
171 alt_obase=`echo $INFOO | sed -e "[s,/site.*$,/site,]"`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
172 test -z "$mpath" && mpath=$INFOM/octave-forge
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
173 test -z "$opath" && opath=$INFOO/octave-forge
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
174 test -z "$xpath" && xpath=$INFOX
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
175 test -z "$altmpath" && altmpath=$alt_mbase/octave-forge-alternatives/m
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
176 test -z "$altopath" && altopath=$alt_obase/octave-forge-alternatives/oct/$INFOH
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
177 fi
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
178
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
179 dnl *******************************************************************
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
180
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
181 dnl XXX FIXME XXX Should we allow the user to override these?
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
182 dnl Do we even need them? The individual makefiles can call mkoctfile -p
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
183 dnl themselves, so the only reason to keep them is for configure, and
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
184 dnl for those things which are not built using mkoctfile (e.g., aurecord)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
185 dnl but it is not clear we should be using octave compile flags for those.
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
186
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
187 dnl C compiler and flags
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
188 AC_MSG_RESULT([retrieving compile and link flags from $MKOCTFILE])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
189 CC=`$MKOCTFILE -p CC`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
190 CFLAGS=`$MKOCTFILE -p CFLAGS`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
191 CPPFLAGS=`$MKOCTFILE -p CPPFLAGS`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
192 CPICFLAG=`$MKOCTFILE -p CPICFLAG`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
193 LDFLAGS=`$MKOCTFILE -p LDFLAGS`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
194 LIBS=`$MKOCTFILE -p LIBS`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
195 # add -fPIC or equivalent flags
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
196 FPICFLAG=`$MKOCTFILE -p FPICFLAG`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
197 CPICFLAG=`$MKOCTFILE -p CPICFLAG`
12699
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
198
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
199 FFLAGS="$FFLAGS $FPICFLAG"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
200 CFLAGS="$CFLAGS $CPICFLAG"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
201 AC_SUBST(CC)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
202 AC_SUBST(CFLAGS)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
203 AC_SUBST(CPPFLAGS)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
204 AC_SUBST(CPICFLAG)
12699
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
205
8923
ba575291987f sparsersb: added the --with-verbosity-level configure switch, to activate sparsersb (debug) verbosity at build time.
michelemartone
parents: 8882
diff changeset
206 RSBOI_CXXFLAGS=""
ba575291987f sparsersb: added the --with-verbosity-level configure switch, to activate sparsersb (debug) verbosity at build time.
michelemartone
parents: 8882
diff changeset
207 if test x$RSBOI_VERBOSE_CONFIG != x ; then
12699
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
208 RSBOI_CXXFLAGS="$RSBOI_CXXFLAGS -DRSBOI_VERBOSE_CONFIG=$RSBOI_VERBOSE_CONFIG";
8923
ba575291987f sparsersb: added the --with-verbosity-level configure switch, to activate sparsersb (debug) verbosity at build time.
michelemartone
parents: 8882
diff changeset
209 fi
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
210
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
211 dnl Fortran compiler and flags
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
212 F77=`$MKOCTFILE -p F77`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
213 FFLAGS=`$MKOCTFILE -p FFLAGS`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
214 FPICFLAG=`$MKOCTFILE -p FPICFLAG`
12699
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
215
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
216 AC_SUBST(F77)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
217 AC_SUBST(FFLAGS)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
218 AC_SUBST(FPICFLAG)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
219
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
220 dnl C++ compiler and flags
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
221 CXX=`$MKOCTFILE -p CXX`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
222 CXXFLAGS=`$MKOCTFILE -p CXXFLAGS`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
223 CXXPICFLAG=`$MKOCTFILE -p CXXPICFLAG`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
224 CXXFLAGS="$CXXFLAGS $CXXPICFLAG"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
225 AC_SUBST(CXX)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
226 AC_SUBST(CXXFLAGS)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
227 AC_SUBST(CXXPICFLAG)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
228
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
229 dnl *******************************************************************
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
230
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
231 dnl Check for features of your version of mkoctfile.
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
232 dnl All checks should be designed so that the default
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
233 dnl action if the tests are not performed is to do whatever
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
234 dnl is appropriate for the most recent version of Octave.
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
235
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
236 dnl Define the following macro:
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
237 dnl OF_CHECK_LIB(lib,fn,true,false,helpers)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
238 dnl This is just like AC_CHECK_LIB, but it doesn't update LIBS
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
239 AC_DEFUN(OF_CHECK_LIB,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
240 [save_LIBS="$LIBS"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
241 AC_CHECK_LIB($1,$2,$3,$4,$5)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
242 LIBS="$save_LIBS"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
243 ])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
244
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
245 dnl Define the following macro:
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
246 dnl TRY_MKOCTFILE(msg,program,action_if_true,action_if_false)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
247 dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
248 AC_DEFUN(TRY_MKOCTFILE,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
249 [AC_MSG_CHECKING($1)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
250 cat > conftest.cc << EOF
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
251 #include <octave/config.h>
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
252 $2
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
253 EOF
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
254 ac_try="$MKOCTFILE -c conftest.cc"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
255 if AC_TRY_EVAL(ac_try) ; then
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
256 AC_MSG_RESULT(yes)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
257 $3
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
258 else
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
259 AC_MSG_RESULT(no)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
260 $4
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
261 fi
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
262 ])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
263
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
264 dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
265 dnl Check if F77_FUNC works with MKOCTFILE
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
266 dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
267 TRY_MKOCTFILE([for F77_FUNC],
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
268 [int F77_FUNC (hello, HELLO) (const int &n);],,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
269 [MKOCTFILE="$MKOCTFILE -DF77_FUNC=F77_FCN"])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
270
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
271 dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
272 dnl Check if octave still uses SLList.h
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
273 dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
274 TRY_MKOCTFILE([for SLList.h],[#include <octave/SLList.h>],
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
275 [MKOCTFILE="$MKOCTFILE -DHAVE_SLLIST_H"],)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
276
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
277 dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
278 dnl Check if octave has lo_ieee_nan_value
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
279 dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
280 TRY_MKOCTFILE([for lo_ieee_nan_value],
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
281 [ #include <octave/lo-ieee.h>
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
282 int test(void) { lo_ieee_nan_value(); }],,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
283 [MKOCTFILE="$MKOCTFILE -DUSE_OCTAVE_NAN"])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
284
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
285 dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
286 dnl Check if octave is needs octave_idx_type
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
287 dnl
8882
c47ac161e75d sparsersb: commented out a (probably) redundant (octave_idx_type) symbol redefinition in configure.base.
michelemartone
parents: 8849
diff changeset
288 dnl TRY_MKOCTFILE([for octave_idx_type],
c47ac161e75d sparsersb: commented out a (probably) redundant (octave_idx_type) symbol redefinition in configure.base.
michelemartone
parents: 8849
diff changeset
289 dnl [#include <octave/oct-types.h>
c47ac161e75d sparsersb: commented out a (probably) redundant (octave_idx_type) symbol redefinition in configure.base.
michelemartone
parents: 8849
diff changeset
290 dnl octave_idx_type test(void) { octave_idx_type idx = 1; return idx; }],,
c47ac161e75d sparsersb: commented out a (probably) redundant (octave_idx_type) symbol redefinition in configure.base.
michelemartone
parents: 8849
diff changeset
291 dnl [MKOCTFILE="$MKOCTFILE -Doctave_idx_type=int"])
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
292
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
293 dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
294 dnl Check if octave uses quit.h
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
295 dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
296 TRY_MKOCTFILE([for quit.h],[#include <octave/quit.h>],,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
297 [MKOCTFILE="$MKOCTFILE -DNEED_OCTAVE_QUIT"])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
298
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
299 dnl **********************************************************
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
300
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
301 dnl Evaluate an expression in octave
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
302 dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
303 dnl OCTAVE_EVAL(expr,var) -> var=expr
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
304 dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
305 AC_DEFUN(OCTAVE_EVAL,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
306 [AC_MSG_CHECKING([for $1 in Octave])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
307 $2=`echo "disp($1)" | $OCTAVE -qf`
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
308 AC_MSG_RESULT($$2)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
309 AC_SUBST($2)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
310 ])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
311
12699
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
312 dnl Use octave-config to get an octave setting
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
313 dnl and set as a variable
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
314 dnl
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
315 AC_DEFUN(OCTAVE_CONFIG_EVAL,
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
316 [AC_MSG_CHECKING([for $1 in octave-config])
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
317 $2=`$OCTAVE_CONFIG -p $1`
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
318 AC_MSG_RESULT($$2)
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
319 AC_SUBST($2)
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
320 ])
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
321
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
322 AC_DEFUN(MKOCTFILE_EVAL,
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
323 [AC_MSG_CHECKING([for $1 in mkoctfile])
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
324 $2=`$MKOCTFILE -p $1`
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
325 AC_MSG_RESULT($$2)
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
326 AC_SUBST($2)
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
327 ])
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
328
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
329
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
330 dnl Check status of an octave variable
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
331 dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
332 dnl OCTAVE_CHECK_EXIST(variable,action_if_true,action_if_false)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
333 dnl
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
334 AC_DEFUN(OCTAVE_CHECK_EXIST,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
335 [AC_MSG_CHECKING([for $1 in Octave])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
336 if test `echo 'disp(exist("$1"))' | $OCTAVE -qf`X != 0X ; then
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
337 AC_MSG_RESULT(yes)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
338 $2
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
339 else
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
340 AC_MSG_RESULT(no)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
341 $3
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
342 fi
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
343 ])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
344
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
345 dnl should check that $(OCTAVE) --version matches $(MKOCTFILE) --version
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
346 AC_CHECK_PROG(OCTAVE,octave,octave)
12699
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
347 dnl OCTAVE_EVAL(OCTAVE_VERSION,OCTAVE_VERSION)
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
348 OCTAVE_CONFIG_EVAL(VERSION,OCTAVE_VERSION)
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
349
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
350 dnl grab canonical host type so we can write system specific install stuff
12699
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
351 dnl OCTAVE_EVAL(octave_config_info('canonical_host_type'),canonical_host_type)
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
352 OCTAVE_CONFIG_EVAL(CANONICAL_HOST_TYPE,canonical_host_type)
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
353
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
354 dnl grab SHLEXT from octave config
12699
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
355 dnl OCTAVE_EVAL(octave_config_info('SHLEXT'),SHLEXT)
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
356 OCTAVE_CONFIG_EVAL(SHLEXT,SHLEXT)
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
357
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
358 AC_PROG_LN_S
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
359
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
360 AC_PROG_RANLIB
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
361
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
362 dnl Use $(COPY_FLAGS) to set options for cp when installing .oct files.
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
363 COPY_FLAGS="-Rfp"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
364 case "$canonical_host_type" in
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
365 *-*-linux*)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
366 COPY_FLAGS="-fdp"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
367 ;;
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
368 esac
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
369 AC_SUBST(COPY_FLAGS)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
370
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
371 OTHERLIBS=
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
372 OF_CHECK_LIB(m,sin,[OTHERLIBS=-lm])
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
373 AC_SUBST(OTHERLIBS)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
374
12699
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
375 dnl OCTAVE_EVAL(octave_config_info('AR'),AR)
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
376 dnl OCTAVE_EVAL(octave_config_info('ARFLAGS'),ARFLAGS)
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
377 MKOCTFILE_EVAL(AR,AR)
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
378 MKOCTFILE_EVAL(ARFLAGS,ARFLAGS)
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
379
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
380 CPPFLAGS="$CPPFLAGS -DSTATIC_LINKED"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
381
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
382 dnl Use $(STRIP) in the makefile to strip executables. If not found,
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
383 dnl STRIP expands to ':', which in the makefile does nothing.
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
384 dnl Don't need this for .oct files since mkoctfile handles them directly
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
385 STRIP=${STRIP-strip}
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
386 AC_CHECK_PROG(STRIP,$STRIP,$STRIP,:)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
387
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
388 dnl Strip on windows, don't strip on Mac OS/X or IRIX
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
389 dnl For the rest, you can force strip using MKOCTFILE="mkoctfile -s"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
390 dnl or avoid strip using STRIP=: before ./configure
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
391 case "$canonical_host_type" in
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
392 powerpc-apple-darwin*|*-sgi-*)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
393 STRIP=:
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
394 ;;
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
395 *-cygwin-*|*-mingw-*)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
396 MKOCTFILE="$MKOCTFILE -s"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
397 ;;
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
398 esac
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
399
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
400 dnl check for swig and test that it supports octave
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
401 SWIG=""
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
402 if test x"$with_swig" = "xyes"; then
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
403 AC_PATH_PROG(SWIG,swig)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
404 test -z "$SWIG" && AC_MSG_ERROR(swig not found on path)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
405 cat > conftest.i <<EOF
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
406 %module conftest
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
407 EOF
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
408 $SWIG -c++ -octave conftest.i || AC_MSG_ERROR(swig doesn't support octave modules)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
409 rm -f conftest.*
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
410 fi
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
411
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
412 CONFIGURE_OUTPUTS="Makeconf"
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
413 STATUS_MSG="
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
414 octave commands will install into the following directories:
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
415 m-files: $mpath
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
416 oct-files: $opath
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
417 binaries: $xpath
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
418 alternatives:
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
419 m-files: $altmpath
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
420 oct-files: $altopath
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
421
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
422 shell commands will install into the following directories:
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
423 binaries: $bindir
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
424 man pages: $mandir
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
425 libraries: $libdir
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
426 headers: $includedir
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
427
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
428 octave-forge is configured with
12395
ae50074dd6ff activated and documented the autotuning and plot features available with librsb-1.1.
michelemartone
parents: 12058
diff changeset
429 CXX: $CXX
ae50074dd6ff activated and documented the autotuning and plot features available with librsb-1.1.
michelemartone
parents: 12058
diff changeset
430 CXXFLAGS: $CXXFLAGS
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
431 octave: $OCTAVE (version $OCTAVE_VERSION)
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
432 mkoctfile: $MKOCTFILE for Octave $subver
12699
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
433 octave-config: $OCTAVE_CONFIG for Octave $subver
8849
b995a264e374 imported the project files in main/sparsersb.
michelemartone
parents:
diff changeset
434 swig: $SWIG"
12699
41d5b212e9fa Applied the patch provided by John Donoghue on Mon 23 Nov 2015 12:10:17 AM UTC, http://savannah.gnu.org/bugs/?46500 .
michelemartone
parents: 12540
diff changeset
435