Mercurial > hg > octave-nkf
comparison configure.in @ 4298:055d2f68d445
[project @ 2003-01-13 15:09:31 by jwe]
author | jwe |
---|---|
date | Mon, 13 Jan 2003 15:10:39 +0000 |
parents | b20d6c838416 |
children | b8f7e8193bf6 |
comparison
equal
deleted
inserted
replaced
4297:59a2ba0fb205 | 4298:055d2f68d445 |
---|---|
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 | 21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
22 ### 02111-1307, USA. | 22 ### 02111-1307, USA. |
23 | 23 |
24 AC_INIT | 24 AC_INIT |
25 AC_REVISION($Revision: 1.407 $) | 25 AC_REVISION($Revision: 1.408 $) |
26 AC_PREREQ(2.52) | 26 AC_PREREQ(2.52) |
27 AC_CONFIG_SRCDIR([src/octave.cc]) | 27 AC_CONFIG_SRCDIR([src/octave.cc]) |
28 AC_CONFIG_HEADER(config.h) | 28 AC_CONFIG_HEADER(config.h) |
29 | 29 |
30 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.]) | 30 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.]) |
171 ### Do special things for g++. | 171 ### Do special things for g++. |
172 | 172 |
173 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \ | 173 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \ |
174 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'` | 174 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'` |
175 | 175 |
176 ### Auto instantiate all templates, other than those that are explicitly | |
177 ### instantiated in Octave. Octave currently instantiates all needed | |
178 ### templates for GCC-2.8.x and EGCS-1.1.x, but not for newer GNU releases | |
179 ### nor for other supported compilers. | |
180 | |
181 cxx_auto_instantiate_templates=yes | |
182 case "$gxx_version" in | 176 case "$gxx_version" in |
183 1.* | 2.[[0123456789]].*) | 177 1.* | 2.[[0123456789]].*) |
184 AC_MSG_ERROR([g++ version $gxx_version will probably fail to compile Octave]) | 178 AC_MSG_ERROR([g++ version $gxx_version will probably fail to compile Octave]) |
185 ;; | 179 ;; |
186 esac | 180 esac |
296 OCTAVE_CXX_FLAG(-mminimal-toc, [ | 290 OCTAVE_CXX_FLAG(-mminimal-toc, [ |
297 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mminimal-toc"]) | 291 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mminimal-toc"]) |
298 ;; | 292 ;; |
299 esac | 293 esac |
300 | 294 |
301 ### We do our own template instantiation for specific compilers. | |
302 | |
303 if test "$cxx_auto_instantiate_templates" = no; then | |
304 case "$canonical_host_type" in | |
305 *-*-darwin*) | |
306 OCTAVE_CXX_FLAG(-fno-coalesce-templates, [ | |
307 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-coalesce-templates" | |
308 AC_MSG_RESULT([adding -fno-coalesce-templates to XTRA_CXXFLAGS])]) | |
309 ;; | |
310 esac | |
311 OCTAVE_CXX_FLAG(-fno-implicit-templates, [ | |
312 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-implicit-templates" | |
313 AC_MSG_RESULT([adding -fno-implicit-templates to XTRA_CXXFLAGS])]) | |
314 fi | |
315 | |
316 AC_SUBST(XTRA_CFLAGS) | 295 AC_SUBST(XTRA_CFLAGS) |
317 AC_SUBST(XTRA_CXXFLAGS) | 296 AC_SUBST(XTRA_CXXFLAGS) |
318 | 297 |
319 ### Use -static if compiling on Alpha OSF/1 1.3 systems. | 298 ### Use -static if compiling on Alpha OSF/1 1.3 systems. |
320 | 299 |
331 OCTAVE_CXX_PREPENDS_UNDERSCORE | 310 OCTAVE_CXX_PREPENDS_UNDERSCORE |
332 | 311 |
333 ### Defaults for cross compiling. BUILD_CC and BUILD_CXX are | 312 ### Defaults for cross compiling. BUILD_CC and BUILD_CXX are |
334 ### the compilers that we use for building tools on the build system. | 313 ### the compilers that we use for building tools on the build system. |
335 ### For now, we assume that the only cross compiling we can do is | 314 ### For now, we assume that the only cross compiling we can do is |
336 ### with gcc on a Unixy system. | 315 ### with gcc on a Unixy system, but the dedicated hacker can override these. |
337 | 316 |
338 if test "$cross_compiling" = yes; then | 317 if test "$cross_compiling" = yes; then |
339 BUILD_CC="gcc" | 318 BUILD_CC="gcc" |
340 BUILD_CFLAGS="-O2 -g" | 319 BUILD_CFLAGS="-O2 -g" |
341 BUILD_CXX="g++" | 320 BUILD_CXX="g++" |
342 BUILD_CXXFLAGS="-O2 -g" | 321 BUILD_CXXFLAGS="-O2 -g" |
322 BUILD_LDFLAGS="" | |
343 BUILD_EXEEXT="" | 323 BUILD_EXEEXT="" |
344 else | 324 else |
345 BUILD_CC="$CC" | 325 BUILD_CC='$(CC)' |
346 BUILD_CFLAGS="-O2 -g" | 326 BUILD_CFLAGS='$(CFLAGS)' |
347 BUILD_CXX="$CXX" | 327 BUILD_CXX='$(CXX)' |
348 BUILD_CXXFLAGS="-O2 -g" | 328 BUILD_CXXFLAGS='$(CXXFLAGS)' |
329 BUILD_LDFLAGS='$(LDFLAGS)' | |
349 case "$canonical_host_type" in | 330 case "$canonical_host_type" in |
350 sparc-sun-solaris2*) | 331 sparc-sun-solaris2*) |
351 if test "$GCC" != yes; then | 332 if test "$GCC" != yes; then |
352 BUILD_CC="$CC -O1" | 333 ## The Sun C++ compiler never seems to complete compiling |
353 BUILD_CFLAGS="-g" | 334 ## gendoc.cc unless we reduce the optimization level... |
354 BUILD_CXX="$CXX -O1" | 335 BUILD_CXXFLAGS="-g -O1" |
355 BUILD_CXXFLAGS="-g" | |
356 fi | 336 fi |
357 ;; | 337 ;; |
358 esac | 338 esac |
359 BUILD_EXEEXT="$EXEEXT" | 339 BUILD_EXEEXT='$(EXEEXT)' |
360 fi | 340 fi |
361 | 341 |
362 AC_ARG_VAR(BUILD_CC, [build system C compiler (used if cross compiling)]) | 342 AC_ARG_VAR(BUILD_CC, [build system C compiler (used if cross compiling)]) |
363 AC_ARG_VAR(BUILD_CFLAGS, [build system C compiler flags (used if cross compiling)]) | 343 AC_ARG_VAR(BUILD_CFLAGS, [build system C compiler flags (used if cross compiling)]) |
364 AC_ARG_VAR(BUILD_CXX, [build system C++ compiler (used if cross compiling)]) | 344 AC_ARG_VAR(BUILD_CXX, [build system C++ compiler (used if cross compiling)]) |
365 AC_ARG_VAR(BUILD_CXXFLAGS, [build system C++ compiler flags (used if cross compiling)]) | 345 AC_ARG_VAR(BUILD_CXXFLAGS, [build system C++ compiler flags (used if cross compiling)]) |
366 AC_SUBST(BUILD_EXEEXT) | 346 AC_ARG_VAR(BUILD_LDFLAGS, [build system C++ compiler link flags (used if cross compiling)]) |
347 AC_ARG_VAR(BUILD_EXEEXT, [build system executable extension (used if cross compiling)]) | |
367 | 348 |
368 dnl This is bogus. We shouldn't have to explicitly add libc too! | 349 dnl This is bogus. We shouldn't have to explicitly add libc too! |
369 | 350 |
370 ### Look for math library. If found, this will add -lm to LIBS. | 351 ### Look for math library. If found, this will add -lm to LIBS. |
371 | 352 |