comparison configure.ac @ 31153:8f67b53ac9ff

configure.ac: clean up ordering of macros, comments. * configure.ac: Use consistent wording for section headings (/^###/). Re-order macros to put more important tests first and group related macros.
author Rik <rik@octave.org>
date Tue, 26 Jul 2022 17:20:13 -0700
parents 60f32b7455e3
children 06c76eca5f95
comparison
equal deleted inserted replaced
31152:839c0fb5d63c 31153:8f67b53ac9ff
133 ## configurations for multiple versions of Octave may be installed at once. 133 ## configurations for multiple versions of Octave may be installed at once.
134 OCTAVE_SET_DEFAULT([octfiledir], 134 OCTAVE_SET_DEFAULT([octfiledir],
135 '${libdir}/octave/${version}/oct/${canonical_host_type}') 135 '${libdir}/octave/${version}/oct/${canonical_host_type}')
136 136
137 ## Directories that Octave should search for object files that will be 137 ## Directories that Octave should search for object files that will be
138 ## dynamically loaded and that are specific to this site (i.e. customizations), 138 ## dynamically loaded and that are specific to this site (i.e., customizations),
139 ## before consulting ${octfiledir}. This should be a colon-separated list of 139 ## before consulting ${octfiledir}. This should be a colon-separated list of
140 ## directories. 140 ## directories.
141 OCTAVE_SET_DEFAULT([localoctfiledir], 141 OCTAVE_SET_DEFAULT([localoctfiledir],
142 '${libdir}/octave/site/oct/${canonical_host_type}') 142 '${libdir}/octave/site/oct/${canonical_host_type}')
143 143
154 ## This includes the Octave version, so that the function files for different 154 ## This includes the Octave version, so that the function files for different
155 ## versions of Octave will be installed in separate directories. 155 ## versions of Octave will be installed in separate directories.
156 OCTAVE_SET_DEFAULT([fcnfiledir], '${datadir}/octave/${version}/m') 156 OCTAVE_SET_DEFAULT([fcnfiledir], '${datadir}/octave/${version}/m')
157 157
158 ## Directories that Octave should search for function files specific to this 158 ## Directories that Octave should search for function files specific to this
159 ## site (i.e. customizations), before consulting ${fcnfiledir}. 159 ## site (i.e., customizations), before consulting ${fcnfiledir}.
160 ## This should be a colon-separated list of directories. 160 ## This should be a colon-separated list of directories.
161 OCTAVE_SET_DEFAULT([localfcnfiledir], '${datadir}/octave/site/m') 161 OCTAVE_SET_DEFAULT([localfcnfiledir], '${datadir}/octave/site/m')
162 162
163 OCTAVE_SET_DEFAULT([localapifcnfiledir], 163 OCTAVE_SET_DEFAULT([localapifcnfiledir],
164 '${datadir}/octave/site/${api_version}/m') 164 '${datadir}/octave/site/${api_version}/m')
250 OCTAVE_PROG_ICOTOOL 250 OCTAVE_PROG_ICOTOOL
251 OCTAVE_PROG_RSVG_CONVERT 251 OCTAVE_PROG_RSVG_CONVERT
252 AM_CONDITIONAL([AMCOND_HAVE_ICON_TOOLS], 252 AM_CONDITIONAL([AMCOND_HAVE_ICON_TOOLS],
253 [test -n "$ICOTOOL" && test -n "$RSVG_CONVERT"]) 253 [test -n "$ICOTOOL" && test -n "$RSVG_CONVERT"])
254 254
255 ### Path separator. 255 ### Determine path separator.
256 256
257 sepchar=':' 257 sepchar=':'
258 AC_ARG_WITH([sepchar], 258 AC_ARG_WITH([sepchar],
259 [AS_HELP_STRING([--with-sepchar=<char>], 259 [AS_HELP_STRING([--with-sepchar=<char>],
260 [use <char> as the path separation character])]) 260 [use <char> as the path separation character])])
277 [Define this to be the path separator for your system, as a character constant.]) 277 [Define this to be the path separator for your system, as a character constant.])
278 AC_DEFINE_UNQUOTED(SEPCHAR_STR, ["$sepchar"], 278 AC_DEFINE_UNQUOTED(SEPCHAR_STR, ["$sepchar"],
279 [Define this to be the path separator for your system, as a string.]) 279 [Define this to be the path separator for your system, as a string.])
280 280
281 ### Define the path to the shell on the host system. 281 ### Define the path to the shell on the host system.
282 ### Most systems will ensure /bin/sh is the default shell so this can be safely 282 dnl Most systems will ensure /bin/sh is the default shell so this can be safely
283 ### ignored by almost everyone. However, when building for Android, for 283 dnl ignored by almost everyone. However, there are exceptions, such as
284 ### example, this will need to be set. 284 dnl Android, where this will need to be set.
285 SHELL_PATH=/bin/sh 285 SHELL_PATH=/bin/sh
286 AC_ARG_WITH([shell], 286 AC_ARG_WITH([shell],
287 [AS_HELP_STRING([--with-shell=SHELL], 287 [AS_HELP_STRING([--with-shell=SHELL],
288 [use SHELL as the shell interpreter (default: /bin/sh)])]) 288 [use SHELL as the shell interpreter (default: /bin/sh)])])
289 case $with_shell in 289 case $with_shell in
297 ;; 297 ;;
298 esac 298 esac
299 AC_DEFINE_UNQUOTED([SHELL_PATH], ["$SHELL_PATH"], 299 AC_DEFINE_UNQUOTED([SHELL_PATH], ["$SHELL_PATH"],
300 [Define this to be the path to the shell command interpreter.]) 300 [Define this to be the path to the shell command interpreter.])
301 301
302 ### Use the system-wide installation of GNU FreeFont if the user requests it.
303 ### By default, Octave includes its own copy of the FreeSans font, which it
304 ### installs in its own directory for use as a fallback default font. If this
305 ### configuration option is used, then do not install our own copy of the fonts
306 ### and assume they can be found in the provided system directory.
307 SYSTEM_FREEFONT_DIR=
308 AC_ARG_WITH([system-freefont],
309 [AS_HELP_STRING([--with-system-freefont=DIR],
310 [use FreeSans fonts in DIR (default: install and use internal copy)])])
311 case $with_system_freefont in
312 no | "")
313 SYSTEM_FREEFONT_DIR=
314 ;;
315 yes)
316 AC_MSG_ERROR([directory argument required for --with-system-freefont])
317 ;;
318 *)
319 SYSTEM_FREEFONT_DIR=$with_system_freefont
320 ;;
321 esac
322 if test -n "$SYSTEM_FREEFONT_DIR"; then
323 AC_MSG_NOTICE([configuring Octave to use system fonts in $SYSTEM_FREEFONT_DIR])
324 AC_DEFINE_UNQUOTED([SYSTEM_FREEFONT_DIR], ["$SYSTEM_FREEFONT_DIR"],
325 [Define this to be the system directory containing the GNU FreeFont fonts.])
326 fi
327 AM_CONDITIONAL([AMCOND_INSTALL_INTERNAL_FONT_FILES],
328 [test -z "$SYSTEM_FREEFONT_DIR"])
329
330 ### Determine which C++ compiler to use (we expect to find g++). 302 ### Determine which C++ compiler to use (we expect to find g++).
331 303
332 AC_PROG_CXX 304 AC_PROG_CXX
333 AC_PROG_CXXCPP 305 AC_PROG_CXXCPP
334 306
335 ENABLE_STD_PMR_POLYMORPHIC_ALLOCATOR=no 307 ENABLE_STD_PMR_POLYMORPHIC_ALLOCATOR=no
336 AC_ARG_ENABLE(std-pmr-polymorphic-allocator, 308 AC_ARG_ENABLE(std-pmr-polymorphic-allocator,
337 [AS_HELP_STRING([--enable-std-pmr-polymorphic-allocator], 309 [AS_HELP_STRING([--enable-std-pmr-polymorphic-allocator],
338 [build libraries requiring std::pmr::polymorphic_allocator if possible. This allows more efficient transfer of arrays at the .mex file interface. That also means that all libraries including Octave headers (e.g., .oct files) must be able to compile with that C++17 feature.])], 310 [build libraries requiring std::pmr::polymorphic_allocator if possible. This allows more efficient transfer of arrays at the .mex file interface. That also means that all libraries including Octave headers (e.g., .oct files) must be able to compile with that C++17 feature.])],
339 [case $enableval in 311 [case $enableval in
340 yes) ENABLE_STD_PMR_POLYMORPHIC_ALLOCATOR=yes ;; 312 yes) ENABLE_STD_PMR_POLYMORPHIC_ALLOCATOR=yes ;;
341 no) ENABLE_STD_PMR_POLYMORPHIC_ALLOCATOR=no ;; 313 no) ENABLE_STD_PMR_POLYMORPHIC_ALLOCATOR=no ;;
342 *) AC_MSG_ERROR([bad value $enableval for --enable-std-pmr-polymorphic-allocator]) ;; 314 *) AC_MSG_ERROR([bad value $enableval for --enable-std-pmr-polymorphic-allocator]) ;;
343 esac]) 315 esac])
344 316
345 ### Check compiler capabilities. 317 ### Determine compiler capabilities.
346 318
347 if test $ENABLE_STD_PMR_POLYMORPHIC_ALLOCATOR = yes; then 319 if test $ENABLE_STD_PMR_POLYMORPHIC_ALLOCATOR = yes; then
348 ## Test for flags to fully support C++17. 320 ## Test for flags to fully support C++17.
349 ## Preferably with GNU extensions if flags are required. 321 ## Preferably with GNU extensions if flags are required.
350 AX_CXX_COMPILE_STDCXX(17, [], []) 322 AX_CXX_COMPILE_STDCXX(17, [], [])
485 457
486 dnl Keep this check before the check for the Fortran compiler, 458 dnl Keep this check before the check for the Fortran compiler,
487 dnl in case -lm is needed to compile Fortran programs. 459 dnl in case -lm is needed to compile Fortran programs.
488 AC_CHECK_LIB(m, sin) 460 AC_CHECK_LIB(m, sin)
489 461
490 ### Determine the Fortran compiler and how to invoke it 462 ### Determine the Fortran compiler and how to invoke it.
491 463
492 ## Prefer gfortran, but the user's F77 environment variable will override. 464 ## Prefer gfortran, but the user's F77 environment variable will override.
493 AC_PROG_F77([gfortran]) 465 AC_PROG_F77([gfortran])
494 if test -z "$F77"; then 466 if test -z "$F77"; then
495 ## No gfortran found, search for any other installed compiler. 467 ## No gfortran found, search for any other installed compiler.
509 481
510 AC_F77_LIBRARY_LDFLAGS 482 AC_F77_LIBRARY_LDFLAGS
511 AC_F77_DUMMY_MAIN 483 AC_F77_DUMMY_MAIN
512 AC_F77_WRAPPERS 484 AC_F77_WRAPPERS
513 485
514 ### Must appear after checks for Fortran compiler. 486 ## Must appear after checks for Fortran compiler.
515 OCTAVE_CHECK_FORTRAN_SYMBOL_AND_CALLING_CONVENTIONS 487 OCTAVE_CHECK_FORTRAN_SYMBOL_AND_CALLING_CONVENTIONS
516 488
517 ### Must appear after checks for compilers. 489 ## Must appear after checks for all compilers.
518 OCTAVE_DEFINE_MKOCTFILE_DYNAMIC_LINK_OPTIONS 490 OCTAVE_DEFINE_MKOCTFILE_DYNAMIC_LINK_OPTIONS
519 491
520 ### Use a 64-bit integer type for array dimensions and indexing, if possible. 492 ### Use a 64-bit integer type for array dimensions and indexing, if possible.
521 493
522 AC_CHECK_SIZEOF([int]) 494 AC_CHECK_SIZEOF([int])
566 538
567 AC_SUBST(OCTAVE_IDX_TYPE) 539 AC_SUBST(OCTAVE_IDX_TYPE)
568 AC_DEFINE_UNQUOTED(OCTAVE_IDX_TYPE, [$OCTAVE_IDX_TYPE], 540 AC_DEFINE_UNQUOTED(OCTAVE_IDX_TYPE, [$OCTAVE_IDX_TYPE],
569 [Define to the type of octave_idx_type (64 or 32 bit signed integer).]) 541 [Define to the type of octave_idx_type (64 or 32 bit signed integer).])
570 542
571 ### Check for pthread library 543 ### Check for pthread library.
572 544
573 AX_PTHREAD 545 AX_PTHREAD
574 dnl Include pthread libs and flags early in case other config tests need them. 546 dnl Include pthread libs and flags early in case other config tests need them.
575 dnl They seem to be required for the OpenGL tests on Debian systems. 547 dnl They seem to be required for the OpenGL tests on Debian systems.
576 LIBS="$PTHREAD_LIBS $LIBS" 548 LIBS="$PTHREAD_LIBS $LIBS"
583 555
584 dnl Check if glibc uses wrong stack size 556 dnl Check if glibc uses wrong stack size
585 OCTAVE_CHECK_BROKEN_PTHREAD_STACKSIZE 557 OCTAVE_CHECK_BROKEN_PTHREAD_STACKSIZE
586 AM_CONDITIONAL([OCTAVE_CHECK_BROKEN_PTHREAD_STACKSIZE], 558 AM_CONDITIONAL([OCTAVE_CHECK_BROKEN_PTHREAD_STACKSIZE],
587 [test $octave_cv_broken_pthread_stacksize = yes]) 559 [test $octave_cv_broken_pthread_stacksize = yes])
588
589 560
590 ### Test whether the compiler supports OpenMP. 561 ### Test whether the compiler supports OpenMP.
591 dnl This is enabled by default to allow the option of using OpenMP in 562 dnl This is enabled by default to allow the option of using OpenMP in
592 dnl loadable modules. 563 dnl loadable modules.
593 564
617 AC_CHECK_HEADERS([omp.h]) 588 AC_CHECK_HEADERS([omp.h])
618 AC_CHECK_FUNCS([omp_get_num_threads]) 589 AC_CHECK_FUNCS([omp_get_num_threads])
619 AC_DEFINE(OCTAVE_ENABLE_OPENMP, 1, [Define to 1 if OpenMP is enabled]) 590 AC_DEFINE(OCTAVE_ENABLE_OPENMP, 1, [Define to 1 if OpenMP is enabled])
620 fi 591 fi
621 592
622 ### Start determination of shared vs. static libraries 593 ### Start determination of shared vs. static libraries.
623 594
624 ## Use -static if compiling on Alpha OSF/1 1.3 systems. 595 ## Use -static if compiling on Alpha OSF/1 1.3 systems.
625 case $canonical_host_type in 596 case $canonical_host_type in
626 alpha*-dec-osf1.3) 597 alpha*-dec-osf1.3)
627 LD_STATIC_FLAG=-static 598 LD_STATIC_FLAG=-static
668 639
669 if test $STATIC_LIBS = no && test $SHARED_LIBS = no; then 640 if test $STATIC_LIBS = no && test $SHARED_LIBS = no; then
670 AC_MSG_ERROR([You can't disable building both static AND shared libraries!]) 641 AC_MSG_ERROR([You can't disable building both static AND shared libraries!])
671 fi 642 fi
672 643
673
674 ### More configure argument checking related to linking 644 ### More configure argument checking related to linking
675 645
676 case $host_os in 646 case $host_os in
677 msdosmsvc | mingw* | AIX | BeOS | OS/2 ) 647 msdosmsvc | mingw* | AIX | BeOS | OS/2 )
678 DEFAULT_NO_UNDEFINED_LDFLAG="-no-undefined" 648 DEFAULT_NO_UNDEFINED_LDFLAG="-no-undefined"
681 DEFAULT_NO_UNDEFINED_LDFLAG="" 651 DEFAULT_NO_UNDEFINED_LDFLAG=""
682 ;; 652 ;;
683 esac 653 esac
684 AC_ARG_ENABLE([no-undefined], 654 AC_ARG_ENABLE([no-undefined],
685 [AS_HELP_STRING([--enable-no-undefined], 655 [AS_HELP_STRING([--enable-no-undefined],
686 [pass -no-undefined to libtool when linking Octave and its shared libraries. This is done by default for msdosmsvc, mingw*, AIX, BeOS, or OS/2 hosts.])], 656 [pass -no-undefined to libtool when linking Octave and its shared libraries. This is done by default for msdosmsvc, mingw*, AIX, BeOS, or OS/2 hosts.])],
687 [case $enableval in 657 [case $enableval in
688 yes) NO_UNDEFINED_LDFLAG="-no-undefined" ;; 658 yes) NO_UNDEFINED_LDFLAG="-no-undefined" ;;
689 no) NO_UNDEFINED_LDFLAG="" ;; 659 no) NO_UNDEFINED_LDFLAG="" ;;
690 *) AC_MSG_ERROR([bad value $enableval for --enable-no-undefined]) ;; 660 *) AC_MSG_ERROR([bad value $enableval for --enable-no-undefined]) ;;
691 esac], 661 esac],
702 ;; 672 ;;
703 esac], 673 esac],
704 [link_all_deps=no]) 674 [link_all_deps=no])
705 AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS], [test $link_all_deps = yes]) 675 AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS], [test $link_all_deps = yes])
706 676
707 ### Check for BLAS and LAPACK libraries: 677 ### Check for BLAS and LAPACK libraries.
708 678
709 ## Need to adjust FFLAGS to include correct integer size. 679 ## Need to adjust FFLAGS to include correct integer size.
710 save_FFLAGS="$FFLAGS" 680 save_FFLAGS="$FFLAGS"
711 FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG" 681 FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG"
712 682
861 esac 831 esac
862 832
863 AM_CONDITIONAL([AMCOND_BUILD_EXTERNAL_LIBXERBLA], 833 AM_CONDITIONAL([AMCOND_BUILD_EXTERNAL_LIBXERBLA],
864 [test -n "$BUILD_EXTERNAL_LIBXERBLA"]) 834 [test -n "$BUILD_EXTERNAL_LIBXERBLA"])
865 835
866 ### Dynamic linking is now enabled only if we are building shared 836 ### Set options for dynamic linking if enabled.
867 ### libs and some API for dynamic linking has been detected. 837 dnl Options set only only if we are building shared libs and some API for
838 dnl dynamic linking has been detected.
868 839
869 dnl FIXME: A lot of the following duplicates the functionality of 840 dnl FIXME: A lot of the following duplicates the functionality of
870 dnl code generated by the dlopen option for LT_INIT. 841 dnl code generated by the dlopen option for LT_INIT.
871 842
872 RDYNAMIC_FLAG= 843 RDYNAMIC_FLAG=
1381 if test $ENABLE_COMMAND_LINE_PUSH_PARSER = yes; then 1352 if test $ENABLE_COMMAND_LINE_PUSH_PARSER = yes; then
1382 AC_DEFINE(OCTAVE_ENABLE_COMMAND_LINE_PUSH_PARSER, 1, 1353 AC_DEFINE(OCTAVE_ENABLE_COMMAND_LINE_PUSH_PARSER, 1,
1383 [Define to 1 to use Bison's push parser interface in the command line REPL.]) 1354 [Define to 1 to use Bison's push parser interface in the command line REPL.])
1384 fi 1355 fi
1385 1356
1386 ### Configuring building of *experimental* Virtual Machine evaluator 1357 ### Configure compilation of *experimental* Virtual Machine evaluator.
1387 1358
1388 ENABLE_VM_EVALUATOR=yes 1359 ENABLE_VM_EVALUATOR=yes
1389 AC_ARG_ENABLE([vm-evaluator], 1360 AC_ARG_ENABLE([vm-evaluator],
1390 [AS_HELP_STRING([--disable-vm-evaluator], 1361 [AS_HELP_STRING([--disable-vm-evaluator],
1391 [don't compile *experimental* virtual machine evaluator])], 1362 [don't compile *experimental* virtual machine evaluator])],
1393 if test $ENABLE_VM_EVALUATOR = yes; then 1364 if test $ENABLE_VM_EVALUATOR = yes; then
1394 AC_DEFINE(OCTAVE_ENABLE_VM_EVALUATOR, 1, 1365 AC_DEFINE(OCTAVE_ENABLE_VM_EVALUATOR, 1,
1395 [Define to 1 to build experimental Virtual Machine evaluator.]) 1366 [Define to 1 to build experimental Virtual Machine evaluator.])
1396 fi 1367 fi
1397 1368
1398 ### Check for the Qhull library. 1369 ### Check for PCRE regex library.
1370
1371 OCTAVE_CHECK_LIB(pcre, PCRE,
1372 [], [pcre.h pcre/pcre.h], [pcre_compile], [], [],
1373 [OCTAVE_CHECK_LIB_PCRE_OK([],
1374 [AC_MSG_ERROR([PCRE library must be built with UTF support (--enable-utf)])])
1375 ],
1376 [libpcre], [REQUIRED])
1377
1378 ### Check for Qhull library.
1399 1379
1400 QHULL_CPPFLAGS= 1380 QHULL_CPPFLAGS=
1401 QHULL_LDFLAGS= 1381 QHULL_LDFLAGS=
1402 QHULL_LIBS= 1382 QHULL_LIBS=
1403 OCTAVE_CHECK_LIB(qhull_r, QHull, 1383 OCTAVE_CHECK_LIB(qhull_r, QHull,
1414 [warn_qhull_r="Qhull library found, but does not seem to work properly. This will result in loss of functionality for some geometry functions. Please try recompiling the library with -fno-strict-aliasing."])]) 1394 [warn_qhull_r="Qhull library found, but does not seem to work properly. This will result in loss of functionality for some geometry functions. Please try recompiling the library with -fno-strict-aliasing."])])
1415 AC_SUBST(QHULL_CPPFLAGS) 1395 AC_SUBST(QHULL_CPPFLAGS)
1416 AC_SUBST(QHULL_LDFLAGS) 1396 AC_SUBST(QHULL_LDFLAGS)
1417 AC_SUBST(QHULL_LIBS) 1397 AC_SUBST(QHULL_LIBS)
1418 1398
1419 ### Check for PCRE regex library. 1399 ### Check for RapidJSON header-only library.
1420
1421 OCTAVE_CHECK_LIB(pcre, PCRE,
1422 [], [pcre.h pcre/pcre.h], [pcre_compile], [], [],
1423 [OCTAVE_CHECK_LIB_PCRE_OK([],
1424 [AC_MSG_ERROR([PCRE library must be built with UTF support (--enable-utf)])])
1425 ],
1426 [libpcre], [REQUIRED])
1427
1428 ### Check for RapidJSON header only library.
1429 1400
1430 check_for_rapidjson=yes 1401 check_for_rapidjson=yes
1431 AC_ARG_ENABLE([rapidjson], 1402 AC_ARG_ENABLE([rapidjson],
1432 [AS_HELP_STRING([--disable-rapidjson], 1403 [AS_HELP_STRING([--disable-rapidjson],
1433 [disable rapidjson])], 1404 [disable rapidjson])],
1528 AC_DEFINE(HAVE_HDF5_INT2FLOAT_CONVERSIONS, 1, 1499 AC_DEFINE(HAVE_HDF5_INT2FLOAT_CONVERSIONS, 1,
1529 [Define to 1 if/when HDF5 supports automatic conversion between integer and floating-point binary data.]) 1500 [Define to 1 if/when HDF5 supports automatic conversion between integer and floating-point binary data.])
1530 fi 1501 fi
1531 1502
1532 ### Check for FFTW library. 1503 ### Check for FFTW library.
1533 ### Default to Fortran FFTPACK if it is not available. 1504 dnl Default to Fortran FFTPACK if it is not available.
1534 1505
1535 ## Check for FFTW header and library. 1506 ## Check for FFTW header and library.
1536 OCTAVE_CHECK_LIB(fftw3, FFTW3, 1507 OCTAVE_CHECK_LIB(fftw3, FFTW3,
1537 [FFTW3 library not found. The slower FFTPACK library will be used instead.], 1508 [FFTW3 library not found. The slower FFTPACK library will be used instead.],
1538 [fftw3.h], [fftw_plan_dft_1d]) 1509 [fftw3.h], [fftw_plan_dft_1d])
1563 dnl --without-fftw3 given, or one of the FFTW3 libs not installed. 1534 dnl --without-fftw3 given, or one of the FFTW3 libs not installed.
1564 dnl Don't check for FFTW threads as this is now pointless. 1535 dnl Don't check for FFTW threads as this is now pointless.
1565 build_fftw_threads=no 1536 build_fftw_threads=no
1566 fi 1537 fi
1567 1538
1568 ## Check for the multithreaded FFTW library. 1539 ## Check for multithreaded FFTW library.
1569 ## Fallback to singlethreaded if not found or disabled. 1540 ## Fallback to singlethreaded if not found or disabled.
1570 if test $build_fftw_threads = yes; then 1541 if test $build_fftw_threads = yes; then
1571 OCTAVE_CHECK_FFTW_THREADS(fftw3, fftw_plan_with_nthreads) 1542 OCTAVE_CHECK_FFTW_THREADS(fftw3, fftw_plan_with_nthreads)
1572 OCTAVE_CHECK_FFTW_THREADS(fftw3f, fftwf_plan_with_nthreads) 1543 OCTAVE_CHECK_FFTW_THREADS(fftw3f, fftwf_plan_with_nthreads)
1573 fi 1544 fi
1606 [AC_DEFINE(HAVE_GLPK, 1, [Define to 1 if GLPK is available.])], 1577 [AC_DEFINE(HAVE_GLPK, 1, [Define to 1 if GLPK is available.])],
1607 [warn_glpk="GLPK library found, but does not seem to work properly; disabling glpk function"])]) 1578 [warn_glpk="GLPK library found, but does not seem to work properly; disabling glpk function"])])
1608 LIBS="$save_LIBS" 1579 LIBS="$save_LIBS"
1609 CPPFLAGS="$save_CPPFLAGS" 1580 CPPFLAGS="$save_CPPFLAGS"
1610 1581
1611 ### Checks for cURL header and library. 1582 ### Check for cURL library existence and functionality.
1612 1583
1613 save_CPPFLAGS="$CPPFLAGS" 1584 save_CPPFLAGS="$CPPFLAGS"
1614 save_LIBS="$LIBS" 1585 save_LIBS="$LIBS"
1615 CPPFLAGS="$Z_CPPFLAGS $CPPFLAGS" 1586 CPPFLAGS="$Z_CPPFLAGS $CPPFLAGS"
1616 LIBS="$Z_LDFLAGS $Z_LIBS $LIBS" 1587 LIBS="$Z_LDFLAGS $Z_LIBS $LIBS"
1646 [warn_sndfile= 1617 [warn_sndfile=
1647 OCTAVE_CHECK_LIB_SNDFILE_OK( 1618 OCTAVE_CHECK_LIB_SNDFILE_OK(
1648 [AC_DEFINE(HAVE_SNDFILE, 1, [Define to 1 if sndfile is available.])], 1619 [AC_DEFINE(HAVE_SNDFILE, 1, [Define to 1 if sndfile is available.])],
1649 [warn_sndfile="sndfile library found, but does not seem to work properly; disabling audio file I/O functions"])]) 1620 [warn_sndfile="sndfile library found, but does not seem to work properly; disabling audio file I/O functions"])])
1650 1621
1651 ### Check for PortAudio 1622 ### Check for PortAudio library.
1652 1623
1653 OCTAVE_CHECK_LIB(portaudio, PortAudio, 1624 OCTAVE_CHECK_LIB(portaudio, PortAudio,
1654 [PortAudio library not found. The audioplayer, audiorecorder, and audiodevinfo functions will be disabled.], 1625 [PortAudio library not found. The audioplayer, audiorecorder, and audiodevinfo functions will be disabled.],
1655 [portaudio.h], [Pa_GetDeviceCount], 1626 [portaudio.h], [Pa_GetDeviceCount],
1656 [], [don't use PortAudio library, disable audio playback and recording], 1627 [], [don't use PortAudio library, disable audio playback and recording],
1657 [], [portaudio-2.0]) 1628 [], [portaudio-2.0])
1658 1629
1659 ### Check for either of Graphics/ImageMagick++ libraries. 1630 ### Check for either of GraphicsMagick++/ImageMagick++ libraries.
1660 1631
1661 check_magick=yes 1632 check_magick=yes
1662 use_magick=no 1633 use_magick=no
1663 AC_ARG_WITH([magick], 1634 AC_ARG_WITH([magick],
1664 [AS_HELP_STRING([--with-magick=LIB], 1635 [AS_HELP_STRING([--with-magick=LIB],
1733 fi 1704 fi
1734 AC_SUBST(MAGICK_CPPFLAGS) 1705 AC_SUBST(MAGICK_CPPFLAGS)
1735 AC_SUBST(MAGICK_LDFLAGS) 1706 AC_SUBST(MAGICK_LDFLAGS)
1736 AC_SUBST(MAGICK_LIBS) 1707 AC_SUBST(MAGICK_LIBS)
1737 1708
1738 ### Check for X11 libraries 1709 ### Check for X11 libraries.
1739 1710
1740 AC_PATH_X 1711 AC_PATH_X
1741 if test "$have_x" = yes; then 1712 if test "$have_x" = yes; then
1742 AC_DEFINE(HAVE_X_WINDOWS, 1, [Define to 1 if X11 is available.]) 1713 AC_DEFINE(HAVE_X_WINDOWS, 1, [Define to 1 if X11 is available.])
1743 1714
1881 esac 1852 esac
1882 DEFAULT_TERMINAL_FONT_SIZE=10 1853 DEFAULT_TERMINAL_FONT_SIZE=10
1883 AC_SUBST(DEFAULT_TERMINAL_FONT) 1854 AC_SUBST(DEFAULT_TERMINAL_FONT)
1884 AC_SUBST(DEFAULT_TERMINAL_FONT_SIZE) 1855 AC_SUBST(DEFAULT_TERMINAL_FONT_SIZE)
1885 1856
1886 ### Check for FLTK library 1857 ### Check for FLTK library.
1887 1858
1888 check_fltk=yes 1859 check_fltk=yes
1889 build_fltk_graphics=no 1860 build_fltk_graphics=no
1890 1861
1891 AC_ARG_WITH([fltk], 1862 AC_ARG_WITH([fltk],
1996 1967
1997 AC_SUBST(FLTK_CPPFLAGS) 1968 AC_SUBST(FLTK_CPPFLAGS)
1998 AC_SUBST(FLTK_LDFLAGS) 1969 AC_SUBST(FLTK_LDFLAGS)
1999 AC_SUBST(FLTK_LIBS) 1970 AC_SUBST(FLTK_LIBS)
2000 1971
2001 ### Final determination of whether OpenGL graphics can be built 1972 ### Final determination of whether OpenGL graphics can be built.
2002 if test $build_qt_graphics = no && test $build_fltk_graphics = no; then 1973 if test $build_qt_graphics = no && test $build_fltk_graphics = no; then
2003 opengl_graphics=no 1974 opengl_graphics=no
2004 else 1975 else
2005 opengl_graphics=yes 1976 opengl_graphics=yes
2006 fi 1977 fi
2022 fi 1993 fi
2023 1994
2024 AC_SUBST(GL2PS_LIBS) 1995 AC_SUBST(GL2PS_LIBS)
2025 fi 1996 fi
2026 1997
2027 ### Check for the qrupdate library 1998 ### Use the system-wide installation of GNU FreeFont if the user requests it.
1999 dnl By default, Octave includes its own copy of the FreeSans font which it
2000 dnl installs in its own directory for use as a fallback default font. If this
2001 dnl configuration option is used, then do not install our own copy of the fonts
2002 dnl and assume they can be found in the provided system directory.
2003 SYSTEM_FREEFONT_DIR=
2004 AC_ARG_WITH([system-freefont],
2005 [AS_HELP_STRING([--with-system-freefont=DIR],
2006 [use FreeSans fonts in DIR (default: install and use internal copy)])])
2007 case $with_system_freefont in
2008 no | "")
2009 SYSTEM_FREEFONT_DIR=
2010 ;;
2011 yes)
2012 AC_MSG_ERROR([directory argument required for --with-system-freefont])
2013 ;;
2014 *)
2015 SYSTEM_FREEFONT_DIR=$with_system_freefont
2016 ;;
2017 esac
2018 if test -n "$SYSTEM_FREEFONT_DIR"; then
2019 AC_MSG_NOTICE([configuring Octave to use system fonts in $SYSTEM_FREEFONT_DIR])
2020 AC_DEFINE_UNQUOTED([SYSTEM_FREEFONT_DIR], ["$SYSTEM_FREEFONT_DIR"],
2021 [Define this to be the system directory containing the GNU FreeFont fonts.])
2022 fi
2023 AM_CONDITIONAL([AMCOND_INSTALL_INTERNAL_FONT_FILES],
2024 [test -z "$SYSTEM_FREEFONT_DIR"])
2025
2026 ### Check for qrupdate library.
2028 2027
2029 dnl No need to adjust FFLAGS because only link is attempted. 2028 dnl No need to adjust FFLAGS because only link is attempted.
2030 dnl Must supply proper LIBS, however. 2029 dnl Must supply proper LIBS, however.
2031 save_LIBS="$LIBS" 2030 save_LIBS="$LIBS"
2032 LIBS="$LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS" 2031 LIBS="$LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS"
2076 2075
2077 if test -n "$SUITESPARSECONFIG_LIBS" && test -n "$LIB_CLOCK_GETTIME"; then 2076 if test -n "$SUITESPARSECONFIG_LIBS" && test -n "$LIB_CLOCK_GETTIME"; then
2078 SUITESPARSECONFIG_LIBS="$SUITESPARSECONFIG_LIBS $LIB_CLOCK_GETTIME" 2077 SUITESPARSECONFIG_LIBS="$SUITESPARSECONFIG_LIBS $LIB_CLOCK_GETTIME"
2079 fi 2078 fi
2080 2079
2081 ### Reset below, after all checks for SuiteSparse libraries. 2080 ## Save and restore LIBS after all checks for SuiteSparse libraries.
2082 suitesparse_save_LIBS="$LIBS" 2081 suitesparse_save_LIBS="$LIBS"
2083 LIBS="$SUITESPARSECONFIG_LIBS $LIBS" 2082 LIBS="$SUITESPARSECONFIG_LIBS $LIBS"
2084 2083
2085 ### Check for AMD library 2084 ### Check for AMD library.
2086 2085
2087 OCTAVE_CHECK_LIB(amd, AMD, 2086 OCTAVE_CHECK_LIB(amd, AMD,
2088 [AMD library not found. This will result in some lack of functionality for sparse matrices.], 2087 [AMD library not found. This will result in some lack of functionality for sparse matrices.],
2089 [amd.h suitesparse/amd.h amd/amd.h], 2088 [amd.h suitesparse/amd.h amd/amd.h],
2090 [amd_postorder], 2089 [amd_postorder],
2091 [], [don't use AMD library, disable some sparse matrix functionality]) 2090 [], [don't use AMD library, disable some sparse matrix functionality])
2092 2091
2093 ### Check for CAMD library 2092 ### Check for CAMD library.
2094 2093
2095 OCTAVE_CHECK_LIB(camd, CAMD, 2094 OCTAVE_CHECK_LIB(camd, CAMD,
2096 [CAMD library not found. This will result in some lack of functionality for sparse matrices.], 2095 [CAMD library not found. This will result in some lack of functionality for sparse matrices.],
2097 [camd.h suitesparse/camd.h camd/camd.h], 2096 [camd.h suitesparse/camd.h camd/camd.h],
2098 [camd_postorder], 2097 [camd_postorder],
2099 [], [don't use CAMD library, disable some sparse matrix functionality]) 2098 [], [don't use CAMD library, disable some sparse matrix functionality])
2100 2099
2101 ### Check for COLAMD library 2100 ### Check for COLAMD library.
2102 2101
2103 OCTAVE_CHECK_LIB(colamd, COLAMD, 2102 OCTAVE_CHECK_LIB(colamd, COLAMD,
2104 [COLAMD library not found. This will result in some lack of functionality for sparse matrices.], 2103 [COLAMD library not found. This will result in some lack of functionality for sparse matrices.],
2105 [colamd.h suitesparse/colamd.h colamd/colamd.h], 2104 [colamd.h suitesparse/colamd.h colamd/colamd.h],
2106 [colamd], 2105 [colamd],
2107 [], [don't use COLAMD library, disable some sparse matrix functionality]) 2106 [], [don't use COLAMD library, disable some sparse matrix functionality])
2108 2107
2109 ### Check for CCOLAMD library 2108 ### Check for CCOLAMD library.
2110 2109
2111 OCTAVE_CHECK_LIB(ccolamd, CCOLAMD, 2110 OCTAVE_CHECK_LIB(ccolamd, CCOLAMD,
2112 [CCOLAMD library not found. This will result in some lack of functionality for sparse matrices.], 2111 [CCOLAMD library not found. This will result in some lack of functionality for sparse matrices.],
2113 [ccolamd.h suitesparse/ccolamd.h ccolamd/ccolamd.h], 2112 [ccolamd.h suitesparse/ccolamd.h ccolamd/ccolamd.h],
2114 [ccolamd], 2113 [ccolamd],
2115 [], [don't use CCOLAMD library, disable some sparse matrix functionality]) 2114 [], [don't use CCOLAMD library, disable some sparse matrix functionality])
2116 2115
2117 ### Check for CHOLMOD library. 2116 ### Check for CHOLMOD library.
2118 ### If your cholmod library requires cblas, then you will need to configure 2117 dnl If your cholmod library requires cblas, then you will need to configure
2119 ### with --with-cholmod="-lcholmod -lcblas". 2118 dnl with --with-cholmod="-lcholmod -lcblas".
2120 2119
2121 save_LIBS="$LIBS" 2120 save_LIBS="$LIBS"
2122 LIBS="$COLAMD_LDFLAGS $COLAMD_LIBS $AMD_LDFLAGS $AMD_LIBS $LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS" 2121 LIBS="$COLAMD_LDFLAGS $COLAMD_LIBS $AMD_LDFLAGS $AMD_LIBS $LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS"
2123 OCTAVE_CHECK_LIB(cholmod, CHOLMOD, 2122 OCTAVE_CHECK_LIB(cholmod, CHOLMOD,
2124 [CHOLMOD library not found. This will result in some lack of functionality for sparse matrices.], 2123 [CHOLMOD library not found. This will result in some lack of functionality for sparse matrices.],
2125 [cholmod.h suitesparse/cholmod.h cholmod/cholmod.h], 2124 [cholmod.h suitesparse/cholmod.h cholmod/cholmod.h],
2126 [cholmod${CHOLMOD_TAG}start], 2125 [cholmod${CHOLMOD_TAG}start],
2127 [], [don't use CHOLMOD library, disable some sparse matrix functionality]) 2126 [], [don't use CHOLMOD library, disable some sparse matrix functionality])
2128 LIBS="$save_LIBS" 2127 LIBS="$save_LIBS"
2129 2128
2130 ### Check for SPQR library 2129 ### Check for SPQR library.
2131 2130
2132 save_LIBS="$LIBS" 2131 save_LIBS="$LIBS"
2133 LIBS="$CHOLMOD_LIBS $LIBS" 2132 LIBS="$CHOLMOD_LIBS $LIBS"
2134 OCTAVE_CHECK_LIB(spqr, SPQR, 2133 OCTAVE_CHECK_LIB(spqr, SPQR,
2135 [SPQR library not found. This will result in some lack of functionality for sparse matrices.], 2134 [SPQR library not found. This will result in some lack of functionality for sparse matrices.],
2136 [SuiteSparseQR.hpp suitesparse/SuiteSparseQR.hpp], 2135 [SuiteSparseQR.hpp suitesparse/SuiteSparseQR.hpp],
2137 [SuiteSparseQR_C], 2136 [SuiteSparseQR_C],
2138 [C++], [don't use SPQR library, disable some sparse matrix functionality]) 2137 [C++], [don't use SPQR library, disable some sparse matrix functionality])
2139 LIBS="$save_LIBS" 2138 LIBS="$save_LIBS"
2140 2139
2141 ### Check for CXSparse library 2140 ### Check for CXSparse library.
2142 2141
2143 OCTAVE_CHECK_LIB(cxsparse, CXSparse, 2142 OCTAVE_CHECK_LIB(cxsparse, CXSparse,
2144 [CXSparse library not found. This will result in some lack of functionality for sparse matrices.], 2143 [CXSparse library not found. This will result in some lack of functionality for sparse matrices.],
2145 [cs.h suitesparse/cs.h cxsparse/cs.h], 2144 [cs.h suitesparse/cs.h cxsparse/cs.h],
2146 [cs${CXSPARSE_TAG}sqr], 2145 [cs${CXSPARSE_TAG}sqr],
2192 OCTAVE_CHECK_LIB(klu, KLU, 2191 OCTAVE_CHECK_LIB(klu, KLU,
2193 [KLU library not found. This will result in some lack of functionality for sparse matrices.], 2192 [KLU library not found. This will result in some lack of functionality for sparse matrices.],
2194 [klu.h suitesparse/klu.h klu/klu.h], [klu_solve], 2193 [klu.h suitesparse/klu.h klu/klu.h], [klu_solve],
2195 [], [don't use KLU library, disable some sparse matrix functionality]) 2194 [], [don't use KLU library, disable some sparse matrix functionality])
2196 2195
2197 ### SUITESPARSECONFIG_LIBS added to LIBS above. 2196 ## Restore LIBS after all suitesparse configuration tests
2198 LIBS="$suitesparse_save_LIBS" 2197 LIBS="$suitesparse_save_LIBS"
2199 2198
2200 ## Collections of flags. 2199 ## Collections of flags.
2201 dnl These are here instead of just in the Makefile.am file because we 2200 dnl These are here instead of just in the Makefile.am file because we
2202 dnl substitute some of them into other source files like mkoctfile. 2201 dnl substitute some of them into other source files like mkoctfile.
2262 2261
2263 CPPFLAGS="$SUNDIALS_IDA_CPPFLAGS $SUNDIALS_NVECSERIAL_CPPFLAGS $KLU_CPPFLAGS $BLAS_CPPFLAGS $CPPFLAGS" 2262 CPPFLAGS="$SUNDIALS_IDA_CPPFLAGS $SUNDIALS_NVECSERIAL_CPPFLAGS $KLU_CPPFLAGS $BLAS_CPPFLAGS $CPPFLAGS"
2264 LDFLAGS="$SUNDIALS_IDA_LDFLAGS $SUNDIALS_NVECSERIAL_LDFLAGS $KLU_LDFLAGS $BLAS_LDFLAGS $LDFLAGS" 2263 LDFLAGS="$SUNDIALS_IDA_LDFLAGS $SUNDIALS_NVECSERIAL_LDFLAGS $KLU_LDFLAGS $BLAS_LDFLAGS $LDFLAGS"
2265 LIBS="$SUNDIALS_IDA_LIBS $SUNDIALS_NVECSERIAL_LIBS $KLU_LIBS $BLAS_LIBS $FLIBS $LIBS" 2264 LIBS="$SUNDIALS_IDA_LIBS $SUNDIALS_NVECSERIAL_LIBS $KLU_LIBS $BLAS_LIBS $FLIBS $LIBS"
2266 if test -z "$warn_sundials_nvecserial" && test -z "$warn_sundials_ida"; then 2265 if test -z "$warn_sundials_nvecserial" && test -z "$warn_sundials_ida"; then
2267 dnl Any of the following tests could determine that SUNDIALS is incompatible 2266 dnl Any of the following tests could determine that SUNDIALS is
2268 dnl and should be disabled. In that event, they all populate the same 2267 dnl incompatible and should be disabled. In that event, they all populate
2269 dnl variable with appropriate warning messages, and further tests should be 2268 dnl the same variable with appropriate warning messages, and further tests
2270 dnl skipped if a warning message has already been generated that SUNDIALS is 2269 dnl should be skipped if a warning message has already been generated that
2271 dnl disabled. 2270 dnl SUNDIALS is disabled.
2272 warn_sundials_disabled= 2271 warn_sundials_disabled=
2273 if test -z "$warn_sundials_disabled"; then 2272 if test -z "$warn_sundials_disabled"; then
2274 OCTAVE_CHECK_SUNDIALS_COMPATIBLE_API 2273 OCTAVE_CHECK_SUNDIALS_COMPATIBLE_API
2275 fi 2274 fi
2276 if test -z "$warn_sundials_disabled"; then 2275 if test -z "$warn_sundials_disabled"; then
2291 fi 2290 fi
2292 2291
2293 dnl Define this way instead of with an #if in oct-conf-post-private.h so that 2292 dnl Define this way instead of with an #if in oct-conf-post-private.h so that
2294 dnl the build features script will get the correct value. 2293 dnl the build features script will get the correct value.
2295 dnl 2294 dnl
2296 dnl The test on the sunlinsol_klu.h header is a bit of a kluge. 2295 dnl FIXME: The test on the sunlinsol_klu.h header is a bit of a kluge.
2297 dnl How can we do a better job here? Do we need to disable sundials 2296 dnl How can we do a better job here? Do we need to disable sundials
2298 dnl any tests fail, or can we fix __ode15__.cc so that it still partially 2297 dnl any tests fail, or can we fix __ode15__.cc so that it still partially
2299 dnl works when some things are missing (for example, KLU)? 2298 dnl works when some things are missing (for example, KLU)?
2300 if test -n "$SUNDIALS_IDA_LIBS" && test -n "$SUNDIALS_NVECSERIAL_LIBS"; then 2299 if test -n "$SUNDIALS_IDA_LIBS" && test -n "$SUNDIALS_NVECSERIAL_LIBS"; then
2301 if test "x$octave_cv_sundials_sunlinsol_dense" = xyes \ 2300 if test "x$octave_cv_sundials_sunlinsol_dense" = xyes \
2427 case $build_os in 2426 case $build_os in
2428 mingw* | msdosmsvc) 2427 mingw* | msdosmsvc)
2429 ## Under Win32 platform, we want JAVA_HOME to be in MSYS format; that is, 2428 ## Under Win32 platform, we want JAVA_HOME to be in MSYS format; that is,
2430 ## without colon and backslashes, as it is also used as path separator. 2429 ## without colon and backslashes, as it is also used as path separator.
2431 ## Use quoted paths as Java may be installed in a path with whitespaces 2430 ## Use quoted paths as Java may be installed in a path with whitespaces
2432 ## (e.g. C:\Program Files\Java\...). 2431 ## (e.g., C:\Program Files\Java\...).
2433 if test -n "$JAVA_HOME"; then 2432 if test -n "$JAVA_HOME"; then
2434 JAVA_HOME=`cd "$JAVA_HOME" && pwd` 2433 JAVA_HOME=`cd "$JAVA_HOME" && pwd`
2435 fi 2434 fi
2436 ;; 2435 ;;
2437 esac 2436 esac
2466 warn_java="Java version is too old (< 1.5). Octave will not be able to call Java methods." 2465 warn_java="Java version is too old (< 1.5). Octave will not be able to call Java methods."
2467 break 2466 break
2468 fi 2467 fi
2469 2468
2470 ## At this point Win32 systems have enough configuration data. 2469 ## At this point Win32 systems have enough configuration data.
2471 ## We assume that all appropriate variables (e.g. INCLUDE and LIB) already 2470 ## We assume that all appropriate variables (e.g., INCLUDE and LIB) already
2472 ## contain the required paths to compile and link against JDK. 2471 ## contain the required paths to compile and link against JDK.
2473 case $host_os in 2472 case $host_os in
2474 msdosmsvc) 2473 msdosmsvc)
2475 build_java=yes 2474 build_java=yes
2476 JAVA_LIBS=-ladvapi32 2475 JAVA_LIBS=-ladvapi32
2684 ### Determine whether to install build logs with Octave. 2683 ### Determine whether to install build logs with Octave.
2685 2684
2686 install_build_logs=no 2685 install_build_logs=no
2687 AC_ARG_ENABLE([install-build-logs], 2686 AC_ARG_ENABLE([install-build-logs],
2688 [AS_HELP_STRING([--enable-install-build-logs], 2687 [AS_HELP_STRING([--enable-install-build-logs],
2689 [install build logs (i.e. config.log) with Octave])], 2688 [install build logs (i.e., config.log) with Octave])],
2690 [if test "$enableval" = yes; then install_build_logs=yes; fi]) 2689 [if test "$enableval" = yes; then install_build_logs=yes; fi])
2691 AM_CONDITIONAL([AMCOND_INSTALL_BUILD_LOGS], [test $install_build_logs = yes]) 2690 AM_CONDITIONAL([AMCOND_INSTALL_BUILD_LOGS], [test $install_build_logs = yes])
2692 2691
2693 ### Determine whether libraries should be linked with visibility attributes 2692 ### Determine whether libraries should be linked with visibility attributes.
2694 2693
2695 ENABLE_LIB_VISIBILITY_FLAGS=yes 2694 ENABLE_LIB_VISIBILITY_FLAGS=yes
2696 AC_ARG_ENABLE(lib-visibility-flags, 2695 AC_ARG_ENABLE(lib-visibility-flags,
2697 [AS_HELP_STRING([--disable-lib-visibility-flags], 2696 [AS_HELP_STRING([--disable-lib-visibility-flags],
2698 [don't build libraries with visibility flags (export all symbols)])], 2697 [don't build libraries with visibility flags (export all symbols)])],
2726 fi 2725 fi
2727 2726
2728 AM_CONDITIONAL([AMCOND_LIB_VISIBILITY_FLAGS], 2727 AM_CONDITIONAL([AMCOND_LIB_VISIBILITY_FLAGS],
2729 [test $ENABLE_LIB_VISIBILITY_FLAGS = yes]) 2728 [test $ENABLE_LIB_VISIBILITY_FLAGS = yes])
2730 2729
2731 ### Set flags for symbol visibility 2730 ### Set flags for symbol visibility.
2732 2731
2733 if test $ENABLE_LIB_VISIBILITY_FLAGS = yes; then 2732 if test $ENABLE_LIB_VISIBILITY_FLAGS = yes; then
2734 EXTERNAL_DLL_DEFS="-DEXTERNAL_DLL" 2733 EXTERNAL_DLL_DEFS="-DEXTERNAL_DLL"
2735 OCTAVE_DLL_DEFS="-DOCTAVE_DLL" 2734 OCTAVE_DLL_DEFS="-DOCTAVE_DLL"
2736 OCTINTERP_DLL_DEFS="-DOCTINTERP_DLL" 2735 OCTINTERP_DLL_DEFS="-DOCTINTERP_DLL"
2906 OCTAVE_CC_FLAG([-Wimplicit-fallthrough], 2905 OCTAVE_CC_FLAG([-Wimplicit-fallthrough],
2907 [AC_DEFINE(HAVE_WARN_IMPLICIT_FALLTHROUGH, 1, 2906 [AC_DEFINE(HAVE_WARN_IMPLICIT_FALLTHROUGH, 1,
2908 [Define to 1 if compiler supports -Wimplicit-fallthrough warning])]) 2907 [Define to 1 if compiler supports -Wimplicit-fallthrough warning])])
2909 fi 2908 fi
2910 2909
2911 ### These are recommended by the gnulib bootstrap script: 2910 ### Recommendations from the gnulib bootstrap script.
2912 2911
2913 GNULIB_LINK_DEPS="$FREXPF_LIBM $FREXP_LIBM $GETHOSTNAME_LIB $LIBSOCKET $LIB_CLOCK_GETTIME $LIB_CRYPTO $LIB_GETLOGIN $LIB_NANOSLEEP $LIB_SELECT $LTLIBICONV $LTLIBINTL $LTLIBTHREAD $INTL_MACOSX_LIBS" 2912 GNULIB_LINK_DEPS="$FREXPF_LIBM $FREXP_LIBM $GETHOSTNAME_LIB $LIBSOCKET $LIB_CLOCK_GETTIME $LIB_CRYPTO $LIB_GETLOGIN $LIB_NANOSLEEP $LIB_SELECT $LTLIBICONV $LTLIBINTL $LTLIBTHREAD $INTL_MACOSX_LIBS"
2914 2913
2915 ### FIXME: This is a kluge to transform $libdir/libiconv.dll.a to -liconv. 2914 ## FIXME: This is a kluge to transform $libdir/libiconv.dll.a to -liconv.
2916 ### It would probably be better to fix gnulib to not give us an absolute 2915 ## It would probably be better to fix gnulib to not give us an absolute
2917 ### file name... 2916 ## file name...
2918 2917
2919 case $host_os in 2918 case $host_os in
2920 mingw*) 2919 mingw*)
2921 ## Don't use $libdir here because that's defined to be 2920 ## Don't use $libdir here because that's defined to be
2922 ## ${exec_prefix}/lib and at this point, ${exec_prefix} is "NONE"! 2921 ## ${exec_prefix}/lib and at this point, ${exec_prefix} is "NONE"!
2929 esac 2928 esac
2930 2929
2931 MKOCTFILE_GNULIB_LINK_DEPS="$FREXPF_LIBM $FREXP_LIBM $GETHOSTNAME_LIB $LIBSOCKET $LIB_CLOCK_GETTIME $LIB_CRYPTO $LIB_GETLOGIN $LIB_NANOSLEEP $LIB_SELECT $MKOCTFILE_LIBICONV $LIBINTL $LIBTHREAD $INTL_MACOSX_LIBS" 2930 MKOCTFILE_GNULIB_LINK_DEPS="$FREXPF_LIBM $FREXP_LIBM $GETHOSTNAME_LIB $LIBSOCKET $LIB_CLOCK_GETTIME $LIB_CRYPTO $LIB_GETLOGIN $LIB_NANOSLEEP $LIB_SELECT $MKOCTFILE_LIBICONV $LIBINTL $LIBTHREAD $INTL_MACOSX_LIBS"
2932 2931
2933 AC_SUBST(GNULIB_LINK_DEPS) 2932 AC_SUBST(GNULIB_LINK_DEPS)
2933
2934 ### Set variables for link dependencies and options.
2934 2935
2935 BASE_LIBOCTAVE_LINK_DEPS="$CURL_LIBS $SPARSE_XLIBS $ARPACK_LIBS $QRUPDATE_LIBS $FFTW_XLIBS $LAPACK_LIBS $BLAS_LIBS $READLINE_LIBS $TERM_LIBS $LIBGLOB $PCRE_LIBS $DL_LIBS $PTHREAD_LIBS $FLIBS $LIBS" 2936 BASE_LIBOCTAVE_LINK_DEPS="$CURL_LIBS $SPARSE_XLIBS $ARPACK_LIBS $QRUPDATE_LIBS $FFTW_XLIBS $LAPACK_LIBS $BLAS_LIBS $READLINE_LIBS $TERM_LIBS $LIBGLOB $PCRE_LIBS $DL_LIBS $PTHREAD_LIBS $FLIBS $LIBS"
2936 2937
2937 LIBOCTAVE_LINK_DEPS="$BASE_LIBOCTAVE_LINK_DEPS $GNULIB_LINK_DEPS" 2938 LIBOCTAVE_LINK_DEPS="$BASE_LIBOCTAVE_LINK_DEPS $GNULIB_LINK_DEPS"
2938 2939
3018 3019
3019 AC_SUBST(OCTAVE_GUI_LINK_DEPS) 3020 AC_SUBST(OCTAVE_GUI_LINK_DEPS)
3020 AC_SUBST(OCTAVE_GUI_LINK_OPTS) 3021 AC_SUBST(OCTAVE_GUI_LINK_OPTS)
3021 3022
3022 ############################################################################## 3023 ##############################################################################
3023 ### Configuration tests done 3024 ### Configuration tests done.
3024 3025
3025 ### Restore original compilation flags 3026 ### Restore original compilation flags.
3026 CFLAGS="$original_octave_configure_CFLAGS" 3027 CFLAGS="$original_octave_configure_CFLAGS"
3027 CXXFLAGS="$original_octave_configure_CXXFLAGS" 3028 CXXFLAGS="$original_octave_configure_CXXFLAGS"
3028 3029
3029 ### Add footer to config.h 3030 ### Add footer to config.h
3030 3031