comparison configure.in @ 1667:f1b5a5086e46

[project @ 1995-12-26 04:14:18 by jwe]
author jwe
date Tue, 26 Dec 1995 04:15:08 +0000
parents 913a157f1e02
children 6e8ac624ed9b
comparison
equal deleted inserted replaced
1666:90ee76b9fabe 1667:f1b5a5086e46
18 ### 18 ###
19 ### You should have received a copy of the GNU General Public License 19 ### You should have received a copy of the GNU General Public License
20 ### along with Octave; see the file COPYING. If not, write to the Free 20 ### along with Octave; see the file COPYING. If not, write to the Free
21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 22
23 AC_REVISION($Revision: 1.143 $) 23 AC_REVISION($Revision: 1.144 $)
24 AC_PREREQ(2.0) 24 AC_PREREQ(2.0)
25 AC_INIT(src/octave.cc) 25 AC_INIT(src/octave.cc)
26 AC_CONFIG_HEADER(config.h) 26 AC_CONFIG_HEADER(config.h)
27 27
28 AC_DEFINE(OCTAVE_SOURCE, 1) 28 AC_DEFINE(OCTAVE_SOURCE, 1)
36 if test "$host" = unknown; then 36 if test "$host" = unknown; then
37 AC_MSG_WARN([configuring Octave for unknown system type 37 AC_MSG_WARN([configuring Octave for unknown system type
38 ]) 38 ])
39 fi 39 fi
40 AC_SUBST(target_host_type) 40 AC_SUBST(target_host_type)
41
42 ### Allow the user to force us to use f2c.
43
44 AC_ARG_WITH(f2c,
45 [ --with-f2c use f2c even if Fortran compiler is available],
46 [if test $withval = no; then use_f2c=false; else use_f2c=true; fi],
47 use_f2c=false)
48
49 ### Allow the user to force us to use g77.
50
51 AC_ARG_WITH(g77,
52 [ --with-g77 use g77 to compile Fortran subroutines],
53 [if test $withval = no; then use_g77=false; else use_g77=true; fi],
54 use_g77=false)
55
56 if $use_f2c && $use_g77; then
57 AC_MSG_WARN([--with-f2c and --with-g77 both specified! Using g77...])
58 use_f2c=false
59 fi
60
61 ### Allow the user to experiment with dynamic linking using GNU dld.
62
63 AC_ARG_ENABLE(dld,
64 [ --enable-dld use DLD for dynamic linking (not all systems)],
65 [if test $enableval = no; then use_dld=false; else use_dld=true; fi],
66 use_dld=false)
67 AC_SUBST(use_dld)
68
69 ### Allow the user to experiment with dynamic linking using dlopen/dlsym.
70
71 AC_ARG_ENABLE(dl,
72 [ --enable-dl use dlopen/dlsym for dynamic linking (not all systems)],
73 [if test $enableval = no; then use_dl=false; else use_dl=true; fi],
74 use_dl=false)
75 AC_SUBST(use_dl)
76
77 ### Allow the user to experiment with dynamic linking using
78 ### shl_load/shl_findsym (HP/UX only?).
79
80 AC_ARG_ENABLE(shl,
81 [ --enable-shl use shl_load/shl_findsym for dynamic linking (HP only?)],
82 [if test $enableval = no; then use_shl=false; else use_shl=true; fi],
83 use_shl=false)
84 AC_SUBST(use_shl)
85
86 ### Allow compilation of smaller kernel. This only works if some form
87 ### of dynamic linking is also supported and used.
88
89 AC_ARG_ENABLE(lite-kernel,
90 [ --enable-lite-kernel compile smaller kernel (requires DLD)],
91 [if test $enableval = no; then lite_kernel=false; else lite_kernel=true; fi],
92 lite_kernel=false)
93 if $lite_kernel; then
94 AC_DEFINE(OCTAVE_LITE, 1)
95 fi
96 AC_SUBST(lite_kernel)
97
98 ### Allow the user disable support for GNU info.
99
100 INFO_DIR=info
101 USE_GNU_INFO=true
102 LIBINFO=../info/libinfo.a
103 AC_ARG_ENABLE(info,
104 [ --enable-info use GNU info (default is yes)],
105 [if test $enableval = no; then
106 USE_GNU_INFO=false;
107 LIBINFO="";
108 INFO_DIR="";
109 fi], [])
110 if $USE_GNU_INFO; then
111 AC_DEFINE(USE_GNU_INFO, 1)
112 fi
113 AC_SUBST(LIBINFO)
114 AC_SUBST(INFO_DIR)
115
116 ### Allow the user disable support for plplot.
117
118 # USE_PLPLOT=true
119 # PLPLOT_DIR=plplot
120 # LIBPLPLOT=../plplot/libplplot.a
121 USE_PLPLOT=false
122 PLPLOT_DIR=""
123 LIBPLPLOT=""
124 AC_ARG_ENABLE(plplot,
125 [ --enable-plplot use plplot for plotting (default is yes)],
126 [if test $enableval = no; then
127 USE_PLPLOT=false;
128 LIBPLPLOT="";
129 PLPLOT_DIR="";
130 fi], [])
131 if $USE_PLPLOT; then
132 AC_DEFINE(USE_PLPLOT, 1)
133 fi
134 AC_SUBST(LIBPLPLOT)
135 AC_SUBST(PLPLOT_DIR)
136
137 ### Allow the user disable support for command line editing using GNU
138 ### readline.
139
140 READLINE_DIR=readline
141 USE_READLINE=true
142 LIBREADLINE=../readline/libreadline.a
143 AC_ARG_ENABLE(readline,
144 [ --enable-readline use readline library (default is yes)],
145 [if test "$enableval" = no; then
146 USE_READLINE=false;
147 LIBREADLINE="";
148 READLINE_DIR="";
149 fi], [])
150 if $USE_READLINE; then
151 AC_DEFINE(USE_READLINE, 1)
152 fi
153 AC_SUBST(LIBREADLINE)
154 AC_SUBST(READLINE_DIR)
155 41
156 ### some defaults 42 ### some defaults
157 43
158 AC_PREFIX_DEFAULT(/usr/local) 44 AC_PREFIX_DEFAULT(/usr/local)
159 45
191 AC_MSG_RESULT([defining localoctfiledir to be $localoctfiledir]) 77 AC_MSG_RESULT([defining localoctfiledir to be $localoctfiledir])
192 AC_MSG_RESULT([defining localoctfilepath to be $localoctfilepath]) 78 AC_MSG_RESULT([defining localoctfilepath to be $localoctfilepath])
193 AC_MSG_RESULT([defining fcnfilepath to be $fcnfilepath]) 79 AC_MSG_RESULT([defining fcnfilepath to be $fcnfilepath])
194 AC_MSG_RESULT([defining imagedir to be $imagedir]) 80 AC_MSG_RESULT([defining imagedir to be $imagedir])
195 AC_MSG_RESULT([defining imagepath to be $imagepath]) 81 AC_MSG_RESULT([defining imagepath to be $imagepath])
82
196 AC_SUBST(exec_prefix) 83 AC_SUBST(exec_prefix)
197 AC_SUBST(bindir) 84 AC_SUBST(bindir)
198 AC_SUBST(datadir) 85 AC_SUBST(datadir)
199 AC_SUBST(libdir) 86 AC_SUBST(libdir)
200 AC_SUBST(includedir) 87 AC_SUBST(includedir)
211 AC_SUBST(imagedir) 98 AC_SUBST(imagedir)
212 AC_SUBST(imagepath) 99 AC_SUBST(imagepath)
213 100
214 ### Path separator. 101 ### Path separator.
215 102
216 AC_DEFINE(SEPCHAR, [':']) 103 SEPCHAR=":"
217 AC_DEFINE(SEPCHAR_STR, [":"]) 104 AC_MSG_RESULT([defining SEPCHAR to be $SEPCHAR])
218 105 AC_DEFINE(SEPCHAR, [']$SEPCHAR['])
219 ### Do special stuff if using dld. 106 AC_DEFINE(SEPCHAR_STR, ["]$SEPCHAR["])
220 107
221 DLD_DIR= 108 ### Allow the user to force us to use f2c.
222 LIBDLD= 109
223 LIBOCTDLD='liboctdld.a' 110 AC_ARG_WITH(f2c,
224 LD_STATIC_FLAG= 111 [ --with-f2c use f2c even if Fortran compiler is available],
225 if $use_dld; then 112 [if test $withval = no; then use_f2c=false; else use_f2c=true; fi],
226 DLD_DIR=dld 113 use_f2c=false)
227 LIBDLD='../dld/libdld.a' 114
228 LD_STATIC_FLAG=-static 115 ### Allow the user to force us to use g77.
229 AC_DEFINE(WITH_DLD, 1) 116
230 fi 117 AC_ARG_WITH(g77,
231 118 [ --with-g77 use g77 to compile Fortran subroutines],
232 ### Don't link these functions if small kernel option requested. 119 [if test $withval = no; then use_g77=false; else use_g77=true; fi],
233 120 use_g77=false)
234 if $lite_kernel; then 121
235 LIBOCTDLD= 122 if $use_f2c && $use_g77; then
236 fi 123 AC_MSG_WARN([--with-f2c and --with-g77 both specified! Using g77...])
237 124 use_f2c=false
238 ### Also use -static if compiling on Alpha OSF/1 1.3 systems. 125 fi
239 126
240 case "$canonical_host_type" in 127 ### Allow the user disable support for GNU info.
241 alpha-dec-osf1.3) 128
242 LD_STATIC_FLAG=-static 129 INFO_DIR=info
243 ;; 130 USE_GNU_INFO=true
244 esac 131 LIBINFO=../info/libinfo.a
245 132 AC_ARG_ENABLE(info,
246 if test -n "$DLD_DIR"; then 133 [ --enable-info use GNU info (default is yes)],
247 AC_MSG_RESULT([defining DLD_DIR to be $DLD_DIR]) 134 [if test $enableval = no; then
248 fi 135 USE_GNU_INFO=false;
249 if test -n "$LIBDLD"; then 136 LIBINFO="";
250 AC_MSG_RESULT([defining LIBDLD to be $LIBDLD]) 137 INFO_DIR="";
251 fi 138 fi], [])
252 if test -n "$LIBOCTDLD"; then 139 if $USE_GNU_INFO; then
253 AC_MSG_RESULT([defining LIBOCTDLD to be $LIBOCTDLD]) 140 AC_DEFINE(USE_GNU_INFO, 1)
254 fi 141 fi
255 if test -n "$LD_STATIC_FLAG"; then 142 AC_SUBST(LIBINFO)
256 AC_MSG_RESULT([defining LD_STATIC_FLAG to be $LD_STATIC_FLAG]) 143 AC_SUBST(INFO_DIR)
257 fi 144
258 AC_SUBST(DLD_DIR) 145 ### Allow the user disable support for plplot.
259 AC_SUBST(LIBDLD) 146
260 AC_SUBST(LIBOCTDLD) 147 # USE_PLPLOT=true
261 AC_SUBST(LD_STATIC_FLAG) 148 # PLPLOT_DIR=plplot
262 149 # LIBPLPLOT=../plplot/libplplot.a
263 ### See if the optional nonlinear programming code is present. 150 USE_PLPLOT=false
264 151 PLPLOT_DIR=""
265 AC_MSG_CHECKING([for npsol]) 152 LIBPLPLOT=""
266 if test -f $srcdir/libcruft/npsol/npsol.f; then 153 AC_ARG_ENABLE(plplot,
267 AC_MSG_RESULT(yes) 154 [ --enable-plplot use plplot for plotting (default is yes)],
268 else 155 [if test $enableval = no; then
269 AC_MSG_RESULT(no) 156 USE_PLPLOT=false;
270 AC_DEFINE(NPSOL_MISSING, 1) 157 LIBPLPLOT="";
271 fi 158 PLPLOT_DIR="";
272 159 fi], [])
273 AC_MSG_CHECKING([for qpsol]) 160 if $USE_PLPLOT; then
274 if test -f $srcdir/libcruft/qpsol/qpsol.f; then 161 AC_DEFINE(USE_PLPLOT, 1)
275 AC_MSG_RESULT(yes) 162 fi
276 else 163 AC_SUBST(LIBPLPLOT)
277 AC_MSG_RESULT(no) 164 AC_SUBST(PLPLOT_DIR)
278 AC_DEFINE(QPSOL_MISSING, 1) 165
279 fi 166 ### Allow the user disable support for command line editing using GNU
280 167 ### readline.
281 AC_MSG_CHECKING([for fsqp]) 168
282 if test -f $srcdir/libcruft/fsqp/fsqpd.f; then 169 READLINE_DIR=readline
283 AC_MSG_RESULT(yes) 170 USE_READLINE=true
284 else 171 LIBREADLINE=../readline/libreadline.a
285 AC_MSG_RESULT(no) 172 AC_ARG_ENABLE(readline,
286 AC_DEFINE(FSQP_MISSING, 1) 173 [ --enable-readline use readline library (default is yes)],
287 fi 174 [if test "$enableval" = no; then
175 USE_READLINE=false;
176 LIBREADLINE="";
177 READLINE_DIR="";
178 fi], [])
179 if $USE_READLINE; then
180 AC_DEFINE(USE_READLINE, 1)
181 fi
182 AC_SUBST(LIBREADLINE)
183 AC_SUBST(READLINE_DIR)
288 184
289 ### See which C++ compiler to use (we expect to find g++). 185 ### See which C++ compiler to use (we expect to find g++).
290 186
291 EXTERN_CXXFLAGS="$CXXFLAGS" 187 EXTERN_CXXFLAGS="$CXXFLAGS"
292 188
365 261
366 ### On Linux systems we need to compile with -mieee-fp to get full 262 ### On Linux systems we need to compile with -mieee-fp to get full
367 ### support for IEEE floating point. 263 ### support for IEEE floating point.
368 264
369 case "$canonical_host_type" in 265 case "$canonical_host_type" in
370 i386-*-linux | i486-*-linux | i586-*-linux) 266 i[345]86-*-linux)
371 GCC_IEEE_FP_FLAG="-mieee-fp" 267 GCC_IEEE_FP_FLAG="-mieee-fp"
372 AC_MSG_RESULT([defining GCC_IEEE_FP_FLAG to be $GCC_IEEE_FP_FLAG]) 268 AC_MSG_RESULT([defining GCC_IEEE_FP_FLAG to be $GCC_IEEE_FP_FLAG])
373 ;; 269 ;;
374 esac 270 esac
375
376 AC_SUBST(GCC_IEEE_FP_FLAG) 271 AC_SUBST(GCC_IEEE_FP_FLAG)
272
273 ### Use -static if compiling on Alpha OSF/1 1.3 systems.
274
275 case "$canonical_host_type" in
276 alpha-dec-osf1.3)
277 LD_STATIC_FLAG=-static
278 ;;
279 esac
280
281 ### Handle dynamic linking and shared library options.
282
283 ### Allow the user to experiment with dynamic linking using GNU dld.
284
285 DLD_DIR=
286 LIBDLD=
287 LIBOCTDLD='liboctdld.a'
288 LD_STATIC_FLAG=
289 AC_ARG_ENABLE(dld,
290 [ --enable-dld use DLD for dynamic linking (not all systems)],
291 [if test $enableval = no; then use_dld=false; else use_dld=true; fi],
292 use_dld=false)
293 if $use_dld; then
294 DLD_DIR=dld
295 LIBDLD='../dld/libdld.a'
296 LD_STATIC_FLAG=-static
297 AC_DEFINE(WITH_DLD, 1)
298 fi
299 AC_SUBST(use_dld)
300
301 ### Allow the user to experiment with dynamic linking using dlopen/dlsym.
302
303 AC_ARG_ENABLE(dl,
304 [ --enable-dl use dlopen/dlsym for dynamic linking (not all systems)],
305 [if test $enableval = no; then use_dl=false; else use_dl=true; fi],
306 use_dl=false)
307 AC_SUBST(use_dl)
308
309 ### Allow the user to experiment with dynamic linking using
310 ### shl_load/shl_findsym (HP/UX only?).
311
312 AC_ARG_ENABLE(shl,
313 [ --enable-shl use shl_load/shl_findsym for dynamic linking (HP only?)],
314 [if test $enableval = no; then use_shl=false; else use_shl=true; fi],
315 use_shl=false)
316 AC_SUBST(use_shl)
317
318 ### Enable creation of shared libraries. Currently only works with
319 ### gcc on some systems.
320
321 AC_ARG_ENABLE(shared,
322 [ --shared create shared libraries (not all systems)],
323 [if test $enableval = no; then shared_libs=false; else shared_libs=true; fi],
324 shared_libs=false)
325 AC_SUBST(shared_libs)
326
327 if $shared_libs; then
328 CPICFLAG=-fPIC
329 CXXPICFLAG=-fPIC
330 FPICFLAG=-fPIC
331 case "$cannonical_host_type" in
332 alpha-dec-osf* | rs6000-ibm-aix*)
333 CPICFLAG=
334 CXXPICFLAG=
335 FPICFLAG=
336 ;;
337 hppa*-hp-hpux*)
338 FPICFLAG=+Z
339 ;;
340 *-sgi-*)
341 FPICFLAG=-KPIC
342 ;;
343 sparc-sun-sunos*)
344 FPICFLAG=-PIC
345 ;;
346 esac
347 else
348 FPICFLAG=
349 CPICFLAG=
350 CXXPICFLAG=
351 fi
352 AC_MSG_RESULT([defining FPICFLAG to be $FPICFLAG])
353 AC_MSG_RESULT([defining CPICFLAG to be $CPICFLAG])
354 AC_MSG_RESULT([defining CXXPICFLAG to be $CXXPICFLAG])
355
356 ### Allow compilation of smaller kernel. This only works if some form
357 ### of dynamic linking is also supported and used.
358
359 AC_ARG_ENABLE(lite-kernel,
360 [ --enable-lite-kernel compile smaller kernel (requires dynamic linking)],
361 [if test $enableval = no; then lite_kernel=false; else lite_kernel=true; fi],
362 lite_kernel=false)
363 if $lite_kernel; then
364 LIBOCTDLD=
365 AC_DEFINE(OCTAVE_LITE, 1)
366 fi
367 AC_SUBST(lite_kernel)
368
369 if test -n "$DLD_DIR"; then
370 AC_MSG_RESULT([defining DLD_DIR to be $DLD_DIR])
371 fi
372 if test -n "$LIBDLD"; then
373 AC_MSG_RESULT([defining LIBDLD to be $LIBDLD])
374 fi
375 if test -n "$LIBOCTDLD"; then
376 AC_MSG_RESULT([defining LIBOCTDLD to be $LIBOCTDLD])
377 fi
378 if test -n "$LD_STATIC_FLAG"; then
379 AC_MSG_RESULT([defining LD_STATIC_FLAG to be $LD_STATIC_FLAG])
380 fi
381 AC_SUBST(DLD_DIR)
382 AC_SUBST(LIBDLD)
383 AC_SUBST(LIBOCTDLD)
384 AC_SUBST(LD_STATIC_FLAG)
377 385
378 ### Special checks for odd OS specific things. 386 ### Special checks for odd OS specific things.
379 387
380 AC_ISC_POSIX 388 AC_ISC_POSIX
381 AC_MINIX 389 AC_MINIX
591 true 599 true
592 else 600 else
593 AC_MSG_ERROR([I couldn't find termios.h, termio.h, or sgtty.h!]) 601 AC_MSG_ERROR([I couldn't find termios.h, termio.h, or sgtty.h!])
594 fi 602 fi
595 603
604 ### See if the optional nonlinear programming code is present.
605
606 AC_MSG_CHECKING([for npsol])
607 if test -f $srcdir/libcruft/npsol/npsol.f; then
608 AC_MSG_RESULT(yes)
609 else
610 AC_MSG_RESULT(no)
611 AC_DEFINE(NPSOL_MISSING, 1)
612 fi
613
614 AC_MSG_CHECKING([for qpsol])
615 if test -f $srcdir/libcruft/qpsol/qpsol.f; then
616 AC_MSG_RESULT(yes)
617 else
618 AC_MSG_RESULT(no)
619 AC_DEFINE(QPSOL_MISSING, 1)
620 fi
621
622 AC_MSG_CHECKING([for fsqp])
623 if test -f $srcdir/libcruft/fsqp/fsqpd.f; then
624 AC_MSG_RESULT(yes)
625 else
626 AC_MSG_RESULT(no)
627 AC_DEFINE(FSQP_MISSING, 1)
628 fi
629
596 ### Checks for functions. 630 ### Checks for functions.
597 631
598 AC_CHECK_FUNCS(setvbuf getcwd gethostname bzero bcopy rindex vfprintf vsprintf) 632 AC_CHECK_FUNCS(setvbuf getcwd gethostname bzero bcopy rindex vfprintf vsprintf)
599 AC_CHECK_FUNCS(stricmp strnicmp strcasecmp strncasecmp strerror atexit) 633 AC_CHECK_FUNCS(stricmp strnicmp strcasecmp strncasecmp strerror atexit)
600 AC_CHECK_FUNCS(on_exit tempnam memmove putenv getrusage) 634 AC_CHECK_FUNCS(on_exit tempnam memmove putenv getrusage)