1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822
|
dnl =========================================================================
dnl
dnl configure.in: script source file
dnl
dnl author: Pierre.Saramito@imag.fr
dnl
dnl date: 14 january 1999
dnl
dnl note: enter 'make INSTALL' to extract installation documention
dnl
dnl #P:INSTALL
dnl #NAME: Installing @PACKAGE@ (@PACKAGE@-@VERSION@)
dnl #@cindex installing
dnl #@pindex configure
dnl #@toindex Makefile
dnl #
dnl #@example
dnl #@cartouche
dnl # ./configure
dnl # make
dnl # make install
dnl #@end cartouche
dnl #@end example
dnl #
dnl #@toindex @code{make}
dnl #@noindent
dnl #Successfull compilation and installation require the GNU @code{make} command.
dnl #
dnl #READING THE DOCUMENTATION:
dnl #@fiindex @file{.info} GNU info
dnl #@toindex @code{info}
dnl #@fiindex @file{.ps} postscript
dnl #@toindex @code{ghostview}
dnl #@fiindex @file{.1}, @file{.3},... unix manual pages
dnl #@toindex @code{man}
dnl #
dnl #@noindent
dnl # Rheolef comes with three documentations:
dnl #
dnl #@noindent
dnl # @itemize @bullet
dnl # @item an users guide with a set of complete examples
dnl # @item a reference manual for unix commands an C++ classes
dnl # @item the full browsable source code in html format
dnl # @end itemize
dnl #
dnl #@noindent
dnl # All these documentations are downloadable in various formats from the Rheolef home page.
dnl # These files are also locally installed during the @code{make install} stage.
dnl #@noindent
dnl # The users guide is generated in @code{pdf} format:
dnl #
dnl #@example
dnl #@cartouche
dnl # evince http://ljk.imag.fr/membres/Pierre.Saramito/rheolef/rheolef.pdf
dnl #@end cartouche
dnl #@end example
dnl #
dnl #@noindent
dnl # The reference manual is generated in @code{html} format:
dnl #
dnl #@example
dnl # firefox http://ljk.imag.fr/membres/Pierre.Saramito/rheolef/rheolef-refman.html
dnl #@end example
dnl #
dnl #@noindent
dnl #and you could add it to your bookmarks.
dnl # Moreover, after performing @code{make install}, unix manuals are available for commands and classes:
dnl #
dnl #@example
dnl # man field
dnl # man 2rheolef field
dnl #@end example
dnl #
dnl #@noindent
dnl # The browsable source code is generated in @code{html} format:
dnl #
dnl #@example
dnl # firefox http://ljk.imag.fr/membres/Pierre.Saramito/rheolef/source_html/
dnl #@end example
dnl #
dnl #USING AND ALTERNATIVE INSTALLATION DIRECTORY:
dnl #@toindex @code{sh}
dnl #@toindex @code{bash}
dnl #@toindex @code{csh}
dnl #@noindent
dnl # The default install prefix is @file{/usr/local}.
dnl # If you prefer an alternative directory, e.g. @file{HOME/sys}, you should enter:
dnl #
dnl #@example
dnl # ./configure --prefix=$HOME/sys
dnl #@end example
dnl #
dnl #@noindent
dnl # In that case, you have to add the folowing lines at the end
dnl # of your @file{.profile} or @file{.bash_profile} file:
dnl #
dnl #@example
dnl # export PATH="$HOME/sys/bin:$PATH"
dnl # export LD_LIBRARY_PATH="$HOME/sys/lib:$LD_LIBRARY_PATH"
dnl # export MANPATH="$HOME/sys/man:$MANPATH"
dnl #@end example
dnl #
dnl #@noindent
dnl # assuming you are using the @code{sh} or the @code{bash} unix interpreter.
dnl # Conversely, if you are using @code{csh} or @code{tcsh}, add
dnl # at the bottom of your @file{.cshrc} file:
dnl #
dnl #@example
dnl # set path = ($HOME/sys/bin $path)
dnl # setenv LD_LIBRARY_PATH "$HOME/sys/lib:$LD_LIBRARY_PATH"
dnl # setenv MANPATH "$HOME/sys/man:$MANPATH"
dnl #@end example
dnl #
dnl #@noindent
dnl # If you are unure about unix interpreter, get the SHELL value:
dnl #@example
dnl # echo $SHELL
dnl #@end example
dnl #
dnl #@noindent
dnl # Then, you have to @emph{source} the modified file, e.g.:
dnl #
dnl #@example
dnl # source ~/.cshrc
dnl #@end example
dnl #
dnl #@toindex hpux, operating system
dnl #@pindex rheolef-config
dnl #@noindent
dnl # hpux users should replace @code{LD_LIBRARY_PATH} by @code{SHLIB_PATH}.
dnl # If you are unure, get the shared library path variable:
dnl #
dnl #@example
dnl # rheolef-config --shlibpath-var
dnl #@end example
dnl #
dnl #@noindent
dnl # Check also your installation by compiling a sample
dnl # program with the installed library:
dnl #
dnl #@example
dnl # make installcheck
dnl #@end example
dnl #
dnl #@noindent
dnl # Since it is a common mistake, you can later, at each time, test
dnl # your run-time environment sanity with:
dnl #
dnl #@example
dnl # rheolef-config --check
dnl #@end example
dnl #
dnl #REQUIERED LIBRARIES:
dnl #@noindent
dnl # All the required libraries have precompiled packages under Debian GNU/Linux and Ubuntu systems.
dnl # If you are running a system where these libraries are not available,
dnl # please consult the corresponding home pages and install instructions.
dnl #
dnl #@toindex boost, extensions of the c++ standard template library
dnl #@noindent
dnl # a) Rheolef widely uses the @code{boost} library, that
dnl # provides usefull extensions of the c++ standard template library.
dnl # @code{boost} at @url{http://www.boost.org} .
dnl #
dnl #@toindex mumps, multifrontal massively distributed sparse direct solver
dnl #@cindex multifrontal linear solver
dnl #@cindex sparse matrix
dnl #@noindent
dnl # b) The use of implicit numerical schemes leads to the
dnl # resolution of large sparse linear systems.
dnl # Rheolef installation optionally requieres
dnl # @code{mumps} as direct solver library.
dnl # @code{mumps} is available at @url{http://graal.ens-lyon.fr/MUMPS} .
dnl #
dnl #@toindex cgal, computational geometry library
dnl #@noindent
dnl # c) Rheolef implements the characteristic method and interpolation from one mesh to another:
dnl # these features leads to sophisticated algorithms and octree-type data structures.
dnl # The @code{cgal} library provide easy access to efficient and reliable geometric algorithms
dnl # in the form of a C++ library.
dnl # @code{cgal} is available at @url{http://www.cgal.org} .
dnl #
dnl #HIGHLY RECOMMENDED LIBRARIES:
dnl #@noindent
dnl # All the highly recommended libraries have precompiled packages under Debian GNU/Linux and Ubuntu systems.
dnl # With all these libraries, Rheolef with run optimally. Otherwise, it will build and run
dnl # also, but with some loss of performances.
dnl #
dnl #@toindex mpi, message passing interface
dnl #@noindent
dnl # a) Rheolef bases on @code{mpi}, the message passing interface standard.
dnl # When no @code{mpi} libraries are available, the distributed features are turned off.
dnl #
dnl #@toindex scotch, mesh partitioner
dnl #@noindent
dnl # b) Rheolef bases on @code{scotch} for distributed mesh partitioning.
dnl # @code{scotch} is available at @url{http://www.labri.fr/perso/pelegrin/scotch} .
dnl # When the @code{scotch} library is not available, the distributed features are turned off.
dnl #
dnl #@toindex trilinos, large-scale object-oriented solvers framework
dnl #@noindent
dnl # c) Rheolef installation optionally uses
dnl # @code{trilinos/ifpack} as a library of preconditioner used for iterative solvers.
dnl # @code{trilinos} is available at @url{http://trilinos.sandia.gov} .
dnl # When @code{trilinos} is not available, a less efficient builtin IC0 preconditioner is used.
dnl #
dnl #RUN-TIME OPTIONAL TOOLS:
dnl #
dnl #@toindex @code{gmsh}
dnl #@toindex @code{gnuplot}
dnl #@toindex @code{mayavi}
dnl #@toindex @code{paraview}
dnl #@noindent
dnl # Using Rheolef suggests the use of the following optional tools
dnl # for pre- and post-processing purpose:
dnl #
dnl #@example
dnl # gmsh
dnl # gnuplot
dnl # mayavi
dnl # paraview
dnl #@end example
dnl #
dnl #@noindent
dnl # None of these tools are required when building and installing Rheolef.
dnl #
dnl #BUILD-TIME EXTRA TOOLS FOR RHEOLEF DEVELOPPERS:
dnl #
dnl #@toindex ginac, not a computer algebra system
dnl #@noindent
dnl # These tools are required if you build from the development version (under CVS).
dnl # Re-generating some source files, as initiated with the "bootstrap" command,
dnl # requiers autotools @code{autoconf}, @code{automake} and @code{libtool}
dnl # and also @code{flex} and @code{bison}.
dnl # It requiers also @code{ginac} for polynomial basis management.
dnl # @code{ginac} is available at @url{http://www.ginac.de} .
dnl # It requiers finaly latex figure management tools to.
dnl # Here is the @code{apt-get} commands to install these tools under Debian GNU/Linux and Ubuntu:
dnl #
dnl #@example
dnl # apt-get install cvs autoconf automake libtool
dnl # apt-get install flex bison
dnl # apt-get install pkg-config libginac-dev
dnl # apt-get install ghostscript gnuplot xfig transfig imagemagick graphviz
dnl #@end example
dnl #
dnl #PORTABILITY ISSUES:
dnl #@cindex standard template library (STL)
dnl #@noindent
dnl # Rheolef is based on STL and its extensions, the BOOST library. Therefore you need a compiler
dnl # that supports the ANSI C++ standards. STL and Rheolef especially depend
dnl # heavily on the template support of the compiler.
dnl # Most recent c++ 2012 standard features are recommanded but still optional:
dnl # when available, it allows an elegant matrix concatenation syntax via
dnl # the @code{std::initializer_list} class.
dnl #
dnl #@toindex gnu c++ compiler
dnl #@toindex intel c++ compiler
dnl #@noindent
dnl # Current distributed version of Rheolef has been heavily tested with GNU C++
dnl # and INTEL C++ on debian, ubuntu and suse GNU/Linux systems for various 32 and 64 bits
dnl # architectures, up to 100 distributed memories and processes.
dnl #
dnl #@noindent
dnl # The GNU C++ compiler is a free software
dnl # available at @url{http://www.gnu.org}.
dnl # The Intel C++ compiler is a privative software.
dnl #
dnl #@toindex kai c++ compiler
dnl #@toindex cray c++ compiler
dnl #@toindex mac osx, operating system
dnl #@toindex cray unicos, operating system
dnl #@toindex hpux, operating system
dnl #@toindex irix, operating system
dnl #@toindex irix, operating system
dnl #@noindent
dnl # Older 5.x versions was tested also on the
dnl # KAI C++ compiler (KCC-3.2b) and the
dnl # CRAY C++ compiler (CC-3.0.2.0)
dnl # on the following operating systems:
dnl #
dnl #@example
dnl # mac os x (i386-apple-darwin9.8.0), using GNU C++
dnl # sun solaris 2.8, ultrasparc, using GNU C++
dnl # compacq OSF1 alpha (V5.1, V4.0), using Compacq C++
dnl # aix 4.1 ibm sp2, multiprocessor based on rs6000
dnl # cray unicos t3e, multiprocessor based on 64 bits dec alpha
dnl # cray unicos c94
dnl # hpux 9.05 and 10.20, hppa
dnl # sgi irix 6.3, mips
dnl # sun solaris 2.5.1, sparc
dnl #@end example
dnl #
dnl #@noindent
dnl # The KAI C++ is available at @url{http://www.kai.com}.
dnl # The CRAY C++ is available on CRAY platforms.
dnl # Nevertheless, the current version has no more been tested
dnl # on these compilers and systems.
dnl #
dnl #@noindent
dnl # If the required libraries are located in a non-standard directory, please use
dnl # the configure options:
dnl #
dnl #@example
dnl # ./configure --help
dnl #@end example
dnl #
dnl #@noindent
dnl # and also consider the CXX, CXXFLAGS and LIBS variables, as in the following more complex
dnl # configure command:
dnl #
dnl #@example
dnl # CXX=icpc CXXFLAGS=-I/usr/local/include LIBS="-L/usr/local/lib -lz" ./configure
dnl #@end example
dnl #
dnl #@noindent
dnl # Finaly, if troubles still persist after the configure step, you can also edit
dnl # directly the config/config.mk and config/config.h files. In these cases please also post
dnl # to the mailling list @code{rheolef@@grenet.fr} any portability problem.
dnl #
dnl #@toindex Makefile
dnl #@noindent
dnl # If you are running a another compiler and operating system combination,
dnl # please run the non-regression test suite:
dnl #
dnl #@example
dnl #@cartouche
dnl # make check
dnl #@end cartouche
dnl #@end example
dnl #
dnl #@noindent
dnl # and reports us the result. If all is ok, please, send us a mail,
dnl # and we will add your configuration to the
dnl # list, and else we will try to circumvent the problem.
dnl #
dnl #@noindent
dnl #@table @code
dnl-------------------------------------------------------------------------
dnl avoid config.cache creation (hpux9*: "sh internal 2K buffer overflow")
dnl-------------------------------------------------------------------------
define([AC_CACHE_LOAD], )dnl
define([AC_CACHE_SAVE], )dnl
dnl libtool creates a "conftest" subdir
dnl that persists when entering ^C :
chmod -R a+rwx conftest
/bin/rm -rf conftest
dnl-------------------------------------------------------------------------
dnl init autoconf
dnl-------------------------------------------------------------------------
AC_INIT([rheolef], 6.5)
dnl echo "configure: testing ${srcdir}/config/config.h"
if test -f ${srcdir}/config/config.h; then
if test -f ${srcdir}/config/config.h.cache && diff ${srcdir}/config/config.h ${srcdir}/config/config.h.cache >/dev/null ; then
dnl echo "configure: conserving ${srcdir}/config/config.h in cache"
rm -f ${srcdir}/config/config.h
else
dnl echo "configure: puting ${srcdir}/config/config.h in cache"
mv ${srcdir}/config/config.h ${srcdir}/config/config.h.cache
fi
dnl else
dnl echo "configure: no ${srcdir}/config/config.h"
fi
AC_PREREQ(2.57)
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([config])
dnl-------------------------------------------------------------------------
dnl defines PACKAGE and VERSION
dnl-------------------------------------------------------------------------
PACKAGE="${PACKAGE_NAME}"
VERSION=`cat ${srcdir}/VERSION | sed -e 's/\([[0-9]]*\.[[0-9]]*\)-[[0-9]]*/\1/'`
if test x"${PACKAGE_VERSION}" != x"${VERSION}"; then
echo "AC INIT: may be initialized with ${PACKAGE} version ${VERSION} instead of ${PACKAGE_VERSION}"
exit 1
fi
echo "configuring $PACKAGE $VERSION..."
MINOR_VERSION=`echo $VERSION | awk -F. '{print $NF}'`
MAJOR_VERSION=`echo $VERSION | awk -F. '{i=NF-1; print $i}'`
MICRO_VERSION=`cat ${srcdir}/VERSION | sed -e 's/.*-//'`
# if test $MINOR_VERSION -ge 100; then
# MINOR_VERSION=0
# echo "** WARNING: VERSION $VERSION"
# echo "** WARNING: MINOR_VERSION = $MINOR_VERSION should be < 100 (for library version setting)"
# MAJOR_VERSION=`expr $MAJOR_VERSION + 1`
# MINOR_VERSION=0
# VERSION="$MAJOR_VERSION.$MINOR_VERSION"
# echo "** WARNING: setting VERSION to $VERSION"
# echo $VERSION > $srcdir/VERSION
# echo
# fi
# by default; try to activate distributed features
rheo_use_distributed=yes
dnl-------------------------------------------------------------------------
dnl checking for autotools
dnl-------------------------------------------------------------------------
dnl automake 1.5 will suppose these checks done
AC_CHECK_PROGS(ACLOCAL, aclocal)
AC_CHECK_PROGS(AUTOHEADER, autoheader)
AC_CHECK_PROGS(AUTOCONF, autoconf)
AC_CHECK_PROGS(AUTOMAKE, automake)
AC_CHECK_PROGS(AMTAR, tar gtar)
AC_CHECK_PROGS(MAKEINFO, makeinfo)
dnl-------------------------------------------------------------------------
dnl init automake
dnl-------------------------------------------------------------------------
AC_CONFIG_SRCDIR([config/install-sh])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config/acconfig.h)
ACLOCAL_AMFLAGS="-I ${srcdir}/config"
AC_SUBST(ACLOCAL_AMFLAGS)
dnl see also in top Makefile.am: AUTOMAKE_OPTIONS = 1.5 dist-bzip2
dnl AC_SUBST(CONFIGURE_DEPENDENCIES)
dnl CONFIGURE_DEPENDENCIES=""\$(top_srcdir)/config/acinclude.m4"
dnl-------------------------------------------------------------------------
dnl set PREFIX directory for installation
dnl-------------------------------------------------------------------------
default_prefix=/usr/local
AC_PREFIX_DEFAULT(${default_prefix})
test x"${prefix}" = x"NONE" && prefix=${default_prefix}
pkgdatadir=${prefix}/share/rheolef
AH_TEMPLATE([PKGDATADIR], Defines the package data directory)
AC_DEFINE_UNQUOTED(PKGDATADIR,"$pkgdatadir")
dnl libdir="${exec_prefix}/lib" by default,
dnl thus, we may eval the string:
test x"${exec_prefix}" = x"NONE" && exec_prefix=${prefix}
command="echo \"$libdir\""
rheolef_libdir=`eval $command`
AH_TEMPLATE([RHEOLEF_LIBDIR], Defines the object code libraries directory)
AC_DEFINE_UNQUOTED(RHEOLEF_LIBDIR,"${rheolef_libdir}")
dnl-------------------------------------------------------------------------
dnl init C++
dnl-------------------------------------------------------------------------
USER_CFLAGS=${CFLAGS-"-O2"}
USER_CXXFLAGS="$CXXFLAGS"
AC_PROG_CC(gcc-4.5 gcc cc icc cl)
AC_PROG_CPP
AC_PROG_CXX(g++-4.5 g++ c++ cxx icpc KCC CC CC cc++ xlC aCC)
AC_PROG_CXXCPP
# when GNU C/C++ is recognized, force "-O2 -g" => skip it
CFLAGS="${USER_CFLAGS}"
CXXFLAGS="${USER_CXXFLAGS}"
AC_LANG_CPLUSPLUS
dnl-------------------------------------------------------------------------
dnl libtool
dnl-------------------------------------------------------------------------
AC_DISABLE_FAST_INSTALL
AC_ENABLE_SHARED
AM_DISABLE_STATIC
AM_PROG_LIBTOOL
dnl since library interface (headers) are modified at each release
dnl libraries are numbered libxxx.so.421.0.0 if VERSION=4.21
LIBRARY_VERSION=${VERSION}
AC_SUBST(LIBRARY_VERSION)
LIBTOOL_VERSION_INFO="-version-info ${MAJOR_VERSION}:${MINOR_VERSION}:0"
LIBTOOL_RELEASE="-release ${MAJOR_VERSION}.${MINOR_VERSION}"
dnl libtool init has computed the name of the environment variable SHLIBPATH
dnl thus, propagate it:
AC_SUBST(LIBTOOL_VERSION_INFO)
AC_SUBST(LIBTOOL_RELEASE)
dnl-------------------------------------------------------------------------
dnl is it a well-known C++ compiler ?
dnl-------------------------------------------------------------------------
RHEO_RECOGNIZE_CXX
if test x"${rheo_cxx}" = x"gnu"; then
# TODO: check for g++ -std=c++0x option
RHEO_GXX2011
if test x"${rheo_gxx2011}" = x"yes"; then
CXXFLAGS="${CXXFLAGS} -std=c++11"
else
RHEO_GXX2011_PRE
if test x"${rheo_gxx2011_pre}" = x"yes"; then
CXXFLAGS="${CXXFLAGS} -std=c++0x"
else
CXXFLAGS="${CXXFLAGS} -ansi"
fi
fi
CXXFLAGS="${CXXFLAGS} -Wall -Wno-unused -Werror -Wno-strict-aliasing"
fi
dnl-------------------------------------------------------------------------
dnl #
dnl # @item --enable-optim
dnl # Turns compile-time optimization to maximum available.
dnl # Include architecture-dependent compilation (e.g. on intel, executable
dnl # are less portable accross intel variants).
dnl # Default is on.
dnl-------------------------------------------------------------------------
AC_ARG_ENABLE(optim,
[ --enable-optim compile-time architecture-dependent optimization mode (default=yes) ],
[ case "${enableval}" in
yes | no) enable_optim=${enableval};;
*) enable_optim=yes;;
esac],
[ enable_optim=yes ]
)
if test x"${enable_optim}" = x"yes"; then
RHEO_OPTIMIZE_CXX
else
# TODO: architecture-independent optim, when no debug
if test x"${enable_debug}" != x"yes"; then
CXXFLAGS="${CXXFLAGS} -O2"
fi
fi
dnl-------------------------------------------------------------------------
dnl for backward compatibility tests (with old rheolef versions)
dnl-------------------------------------------------------------------------
AH_TEMPLATE([MAJOR_VERSION], Defines the package major version)
AC_DEFINE_UNQUOTED(MAJOR_VERSION,${MAJOR_VERSION})
AH_TEMPLATE([MINOR_VERSION], Defines the package minor version)
AC_DEFINE_UNQUOTED(MINOR_VERSION,${MINOR_VERSION})
dnl-------------------------------------------------------------------------
dnl check some commands
dnl-------------------------------------------------------------------------
dnl on x86:
RHEO_CXX_FLAGS_IEEE
dnl for compile time:
AC_PROG_CPP
RHEO_PROG_GNU_MAKE
dnl for documentation time:
AC_CHECK_PROGS(COL, col)
dnl col -b -x seems to be buggy on squeeze, wheezy and most ubuntu...
dnl uncomment when col becomes more robust:
COL=""
AM_CONDITIONAL(COMPILE_COL, test x"${COL}" = x"")
test x"${COL}" != x"" || COL="\${top_builddir}/config/col"
AC_CHECK_PROGS(TEX, tex)
AC_CHECK_PROGS(LATEX, latex)
AC_CHECK_PROGS(PDFLATEX, pdflatex)
if test x"$LATEX" != x""; then
RHEO_CHECK_LATEX_HYPEREF
fi
AC_CHECK_PROGS(BIBTEX, bibtex)
AC_CHECK_PROGS(MAKEINDEX, makeindex)
AC_CHECK_PROGS(FIG2DEV, fig2dev)
AC_CHECK_PROGS(GNUPLOT, gnuplot, gnuplot)
AC_CHECK_PROGS(TEXI2DVI, texi2dvi)
AC_CHECK_PROGS(TEXI2PDF, texi2pdf)
AC_CHECK_PROGS(DVIPS, dvips)
AC_CHECK_PROGS(PS2PDF, ps2pdf)
AC_CHECK_PROGS(DOXYGEN, doxygen)
AC_CHECK_PROGS(DOT, dot)
if test x"$DOT" != x""; then
HAVE_DOT=YES
AC_SUBST(HAVE_DOT)
fi
AC_CHECK_PROGS(CONVERT, convert)
dnl graphics: is plotmtv the default output ?
AH_TEMPLATE([HAVE_PLOTMTV], Defines whether plotmtv graphics is available)
AC_CHECK_PROGS(PLOTMTV, plotmtv, plotmtv)
if test x"$PLOTMTV" != x""; then
AC_DEFINE(HAVE_PLOTMTV)
fi
dnl for check time:
AC_CHECK_PROGS(GZIP_BIN, gzip)
AC_CHECK_PROGS(BZIP2_BIN, bzip2)
dnl AC_CHECK_PROGS(OCTAVE, octave)
dnl for maintainers:
RHEO_CHECK_FLEX
AC_CHECK_PROGS(BISON, bison)
AC_CHECK_PROGS(M4, m4)
AC_CHECK_PROGS(GPERF, gperf)
dnl-------------------------------------------------------------------------
dnl check some C++ library headers
dnl-------------------------------------------------------------------------
dnl ------------------
dnl c standard headers
dnl ------------------
AC_CHECK_HEADERS(climits, break)
AC_CHECK_HEADERS(cmath, break)
AC_CHECK_HEADERS(cstdio, break)
AC_CHECK_HEADERS(cstdlib, break)
AC_CHECK_HEADERS(cctype, break)
AC_CHECK_HEADERS(cassert, break)
AC_CHECK_HEADERS(cfloat, break)
AC_CHECK_HEADERS(cstring, break)
AC_CHECK_HEADERS(cstdarg, break)
AC_CHECK_HEADERS(ctime, break)
dnl --------------------
dnl c++ standard headers
dnl --------------------
AC_CHECK_HEADERS(limits, break, [AC_MSG_ERROR(rheolef requires numeric_limits)])
AC_CHECK_HEADERS(iostream iostream.h, break)
AC_CHECK_HEADERS(iomanip iomanip.h, break)
AC_CHECK_HEADERS(ios ios.h, break)
AC_CHECK_HEADERS(string bstring.h mstring.h, break)
AC_CHECK_HEADERS(sstream sstream.h strstream strstream.h, break)
AC_CHECK_HEADERS(iterator iterator.h, break)
AC_CHECK_HEADERS(functional function.h functional.h, break)
AC_CHECK_HEADERS(numeric numeric.h, break)
AC_CHECK_HEADERS(algorithm algo.h algobase.h, break)
AC_CHECK_HEADERS(memory memory.h defalloc.h, break)
AC_CHECK_HEADERS(istream istream.h, break)
AC_CHECK_HEADERS(ostream ostream.h, break)
AC_CHECK_HEADERS(fstream fstream.h, break)
AC_CHECK_HEADERS(vector vector.h, break)
AC_CHECK_HEADERS(list list.h, break)
AC_CHECK_HEADERS(set set.h, break)
AC_CHECK_HEADERS(map map.h, break)
dnl on solaris/g++ we have <utility> for C++ and <utility.h> for C
dnl on solaris2.7: /usr/include/utility.h is a C header
dnl that includes <curses.h>, and curses.h #define erase(..)
dnl and erase() is an inline fct in C++ <vector.h> : aie..!
AC_CHECK_HEADERS(utility utility.h, break)
dnl ------------------------
dnl c++ non-standard headers
dnl ------------------------
dnl skip: avoid "obsolete" warning
dnl AC_CHECK_HEADERS(slist slist.h, break)
dnl AC_CHECK_HEADERS(hash_map hash_map.h, break)
dnl-------------------------------------------------------------------------
dnl check some C system library headers
dnl-------------------------------------------------------------------------
AC_CHECK_HEADERS(symlink.h, break)
AC_CHECK_HEADERS(unistd.h, break)
dnl-------------------------------------------------------------------------
dnl check C++ compiler features...
dnl-------------------------------------------------------------------------
RHEO_CHECK_ISTREAM_RDBUF
if test x"${rheo_have_istream_rdbuf}" != x"yes"; then
RHEO_CHECK_IOS_BP
fi
RHEO_CHECK_IOS_SETSTATE
RHEO_CHECK_IOS_BITALLOC
dnl obsolete:
dnl RHEO_CHECK_TEMPLATE_FULL_SPECIALIZATION
dnl RHEO_CHECK_NAMESPACE
dnl C++ 2011 standard:
RHEO_CHECK_STD_INITIALIZER_LIST
AM_CONDITIONAL(HAVE_STD_INITIALIZER_LIST, test x"${rheo_have_std_initializer_list}" = x"yes")
dnl-------------------------------------------------------------------------
dnl check C++ system library
dnl-------------------------------------------------------------------------
AC_FUNC_ALLOCA
if test x"$ALLOCA" != x""; then
ALLOCA="\${top_builddir}/config/$ALLOCA"
fi
RHEO_CHECK_GETTIMEOFDAY
if test x"${rheo_have_gettimeofday}" != x"yes"; then
RHEO_CHECK_WIERDGETTIMEOFDAY
if test x"${rheo_have_wierdgettimeofday}" != x"yes"; then
RHEO_CHECK_BSDGETTIMEOFDAY
if test x"${rheo_have_bsdgettimeofday}" != x"yes"; then
RHEO_CHECK_AMICCLK
fi
fi
fi
dnl-------------------------------------------------------------------------
dnl check C++ math library
dnl-------------------------------------------------------------------------
RHEO_CHECK_ISINF_DOUBLE
RHEO_CHECK_FINITE_DOUBLE
RHEO_CHECK_ABS_DOUBLE
RHEO_CHECK_SQR_DOUBLE
dnl-------------------------------------------------------------------------
dnl #
dnl #@toindex cln, arbitrary precision float library
dnl #
dnl # @item --with-bigfloat=@var{digits10}
dnl # Turn on Bruno Haible's @code{cln} arbitrary
dnl # precision float library with @var{digits10} precision,
dnl #
dnl # See @url{http://clisp.cons.org/~haible/packages-cln.html}.
dnl # Default is off.
dnl # The @var{digits10} value is optional and
dnl # default @var{digits10} value is 60.
dnl # This feature is still under development.
dnl #
dnl # @item --with-cln=@var{dir_cln}
dnl # Set the home directory for the @code{cln} library.
dnl # Default @var{dir_cln} is @file{/usr/local/math}.
dnl-------------------------------------------------------------------------
AH_TEMPLATE([DIGITS10], Define the arbitrary precision)
rheo_digits10=60
rheo_default_bigfloat="no"
AC_ARG_WITH(bigfloat,
[ --with-bigfloat[=DIGITS10] use bigfloat class with DIGITS10 (default=no, DIGITS10=60) ],
[changequote(%%, %%)dnl
case "${withval}" in
yes) with_bigfloat="yes"
;;
no) with_bigfloat="no"
;;
[0-9]*) with_bigfloat="yes"
rheo_digits10="${withval}"
;;
*) echo " ERROR: bad value ${withval} for --with-bigfloat"; exit 1
;;
esac
changequote([, ])dnl
],
[with_bigfloat=${rheo_default_bigfloat}]
)
rheo_dir_cln="/usr"
AC_ARG_WITH(cln,
[ --with-cln[=DIR] bigfloat CLN library prefix directory (default=no) ],
[case "${withval}" in
yes) with_cln="yes"
;;
no) with_cln="no"
;;
/*) with_cln="yes"
rheo_dir_cln="${withval}"
;;
*) echo " ERROR: bad value ${withval} for --with-cln"; exit 1
;;
esac],
[with_cln=${rheo_default_bigfloat}]
)
# echo with_bigfloat ${with_bigfloat}
# echo with_cln ${with_cln}
if test x"${with_bigfloat}" = x"yes" -o x"${with_cln}" = x"yes"; then
with_cln="yes"
RHEO_CHECK_CLN
# set: rheo_have_cln=..
else
rheo_have_cln="no"
fi
AM_CONDITIONAL(HAVE_CLN, test x"${with_cln}" = x"yes")
if test x"${rheo_have_cln}" = x"yes"; then
LDADD_BIGFLOAT="\${top_builddir}/util/bigfloat/libbigfloat.la ${LDADD_CLN}"
INCLUDES_BIGFLOAT="${INCLUDES_CLN}"
AC_DEFINE_UNQUOTED(DIGITS10,${rheo_digits10})
fi
# echo rheo_have_cln ${rheo_have_cln}
dnl-------------------------------------------------------------------------
dnl #
dnl #@toindex doubledouble, quadruple precision library
dnl #@clindex Float
dnl #
dnl # @item --with-doubledouble
dnl # Uses @code{doubledouble} class as the default Rheolef @code{Float} type.
dnl # This option is usefull for a quadruple-like precision on
dnl # machines where this feature is not or incorrectly available.
dnl # Default is off.
dnl-------------------------------------------------------------------------
AH_TEMPLATE([HAVE_DOUBLEDOUBLE], Defines if you use doubledouble library)
AC_ARG_WITH(doubledouble,
[ --with-doubledouble use quadruple precision class (default=no) ],
[ if test x"${with_doubledouble}" != x"no"; then
LDADD_DOUBLEDOUBLE="\${top_builddir}/util/doubledouble/libdoubledouble.la"
AC_DEFINE(HAVE_DOUBLEDOUBLE)
rheo_have_doubledouble=yes
fi
],
[ with_doubledouble="no" ])
if test x"${with_doubledouble}" = x"yes" -a x"${rheo_have_cln}" = x"yes"; then
echo " ERROR: incompatible options doubledouble and cln"; exit 1
fi
AC_SUBST(LDADD_DOUBLEDOUBLE)
AC_SUBST(INCLUDES_DOUBLEDOUBLE)
AM_CONDITIONAL(HAVE_DOUBLEDOUBLE, test x"${with_doubledouble}" = x"yes")
dnl ----------------------------------------------------------------
dnl Merge "doubledouble" and "cln" in one float ldadd/include pair:
dnl ----------------------------------------------------------------
AC_SUBST(INCLUDES_FLOAT)
INCLUDES_FLOAT="${INCLUDES_DOUBLEDOUBLE} ${INCLUDES_BIGFLOAT}"
AC_SUBST(LDADD_FLOAT)
LDADD_FLOAT="${LDADD_DOUBLEDOUBLE} ${LDADD_BIGFLOAT}"
dnl-------------------------------------------------------------------------
dnl Check for Ginac : computer algebra system in C++
dnl used to generate FEM basis and elementary forms
dnl-------------------------------------------------------------------------
AC_ARG_ENABLE(ginac,
[ --enable-ginac GiNaC (for rheolef developers; default=yes) ],
[ case "${enableval}" in
yes | no) enable_ginac=${enableval};;
*) enable_ginac=yes;;
esac],
[ enable_ginac=yes ]
)
if test x"$enable_ginac" = x"yes"; then
RHEO_CHECK_GINAC
fi
AM_CONDITIONAL(HAVE_GINAC, test x"${rheo_have_ginac}" = x"yes")
dnl-------------------------------------------------------------------------
dnl Check for GMP interface : big float and integers in C++
dnl used by 3D octree (fast point localization in mesh)
dnl-------------------------------------------------------------------------
dnl AC_SUBST(LDADD_GMPXX)
dnl AC_CHECK_HEADERS(gmpxx.h, [LDADD_GMPXX="-lgmpxx"])
dnl-------------------------------------------------------------------------
dnl check for: unsigned long long int (used by geo_tree.h)
dnl-------------------------------------------------------------------------
AC_TYPE_LONG_LONG_INT
AC_TYPE_UNSIGNED_LONG_LONG_INT
dnl-------------------------------------------------------------------------
dnl #
dnl #@toindex debian
dnl #
dnl # @item --enable-debian-packaging=@var{debian_packaging}
dnl # Generate files the debian way
dnl # by respecting the `Debian Policy Manual`.
dnl
dnl TODO: suppress this option (to be managed by debian/rules)
dnl-------------------------------------------------------------------------
pkglibdir="$libdir/$PACKAGE"
AC_SUBST(pkglibdir)
AC_ARG_ENABLE(debian-packaging,
[ --enable-debian-packaging Only if you are creating deb packages (default=no) ],
[ case "${enableval}" in
yes) debian_packaging="yes"
doc_dir="rheolef-doc"
;;
*) debian_packaging=""
doc_dir="rheolef"
;;
esac],
[ debian_packaging=""
doc_dir="rheolef"
]
)
AC_SUBST(doc_dir)
AM_CONDITIONAL(HAVE_DEBIAN_PACKAGING, test x"${debian_packaging}" = x"yes")
dnl-------------------------------------------------------------------------
dnl #
dnl #@toindex boost, generic dense/sparse matrix library
dnl #
dnl # @item --with-boost-incdir=@var{incdir_boost}
dnl # @itemx --with-boost-libdir=@var{libdir_boost}
dnl # Specifies the @code{boost} library.
dnl # This library is required by rheolef.
dnl-------------------------------------------------------------------------
AC_ARG_WITH(boost-incdir,
[ --with-boost-incdir[=DIR] the boost includes directory (required; default=autodetect) ],
[ case "${withval}" in
yes|no) rheo_incdir_boost=""
;;
*) rheo_incdir_boost=${withval}
;;
esac],
[ rheo_incdir_boost="" ]
)
AC_ARG_WITH(boost-libdir,
[ --with-boost-libdir[=DIR] the boost libraries directory (required; default=autodetect) ],
[ case "${withval}" in
yes|no) rheo_libdir_boost=""
;;
*) rheo_libdir_boost=${withval}
;;
esac],
[ rheo_libdir_boost="" ]
)
RHEO_CHECK_BOOST
RHEO_CHECK_BOOST_UBLAS
AM_CONDITIONAL(HAVE_BOOST, test x"${rheo_have_boost}" = x"yes")
if test x"${rheo_have_boost}" = x"yes"; then
true
else
AC_MSG_ERROR(required boost/ublas library not found)
fi
dnl-------------------------------------------------------------------------
dnl #
dnl #@pindex dmalloc
dnl #@toindex dmalloc, debug runtime library
dnl #@cindex debugging
dnl #
dnl # @item --enable-debug
dnl # Produce a @code{c++ -g} like code.
dnl # @item --enable-dmalloc
dnl # With debugging, also uses dynamic allocation runtime checking
dnl # with @code{dmalloc} when available.
dnl-------------------------------------------------------------------------
AH_TEMPLATE([PARANO], Defines it if you are parano for debug)
AC_SUBST(INSTALL_PROGRAM_FLAGS)
AC_ARG_ENABLE(debug,
[ --enable-debug debug mode; default=no) ],
[ case "${enableval}" in
yes | no) enable_debug=${enableval};;
*) enable_debug=yes;;
esac],
[ enable_debug=no ]
)
AC_ARG_ENABLE(dmalloc,
[ --enable-dmalloc dmalloc debug library, when available; requiers debug mode; default=no) ],
[ case "${enableval}" in
yes | no) enable_dmalloc=${enableval};;
*) enable_dmalloc=yes;;
esac],
[ enable_dmalloc=no ]
)
if test x"${enable_debug}" = x"yes"; then
CXXFLAGS="$CXXFLAGS -g"
LDFLAGS="$LDFLAGS -g"
AC_DEFINE(PARANO)
INSTALL_PROGRAM_FLAGS=""
if test x"${enable_dmalloc}" = x"yes"; then
RHEO_CHECK_DMALLOC
fi
else
INSTALL_PROGRAM_FLAGS="-s"
fi
AM_CONDITIONAL(HAVE_DMALLOC, test x"${rheo_have_dmalloc}" = x"yes")
dnl-------------------------------------------------------------------------
dnl #
dnl # @item --enable-old-code
dnl # Turns on/off the old code branch (before distributed computation features).
dnl # Default is off.
dnl-------------------------------------------------------------------------
rheo_enable_old_code=no
AC_ARG_ENABLE(old-code,
[ --enable-old-code for going back to old code branch (5.93 branch); default=no) ],
[ case "${enableval}" in
yes | no) rheo_enable_old_code=${enableval} ;;
*) rheo_enable_old_code=no ;;
esac
],
[
rheo_enable_old_code=no
]
)
if test x"${rheo_enable_old_code}" = x"yes"; then
rheo_enable_new_code=no
else
rheo_enable_new_code=yes
fi
dnl-------------------------------------------------------------------------
dnl #
dnl # @item --enable-mpi
dnl # Turns on/off the distributed computation features.
dnl # Default is on when distributed is on. This feature is currently in development.
dnl # When on, configure try to detect either the scotch or the parmetis libraries.
dnl-------------------------------------------------------------------------
rheo_incdir_mpi=""
rheo_libdir_mpi=""
#rheo_libs_openmpi="-lmpi_cxx -lmpi_f77 -lmpi -lopen-rte -lopen-pal"
rheo_libs_openmpi="-lmpi_cxx -lmpi"
AC_ARG_ENABLE(mpi,
[ --enable-mpi MPI library, for distributed algebra; default=autodetect) ],
[ case "${enableval}" in
yes | no) enable_mpi="${enableval}";;
*) enable_mpi="yes";;
esac],
[ enable_mpi="${rheo_enable_new_code}" ]
)
AC_ARG_WITH(mpi-incdir,
[ --with-mpi-incdir[=DIR] the mpi includes directory (default=autodetect) ],
[ case "${withval}" in
yes|no) rheo_incdir_mpi="";;
*) rheo_incdir_mpi=${withval};;
esac]
)
AC_ARG_WITH(mpi-libdir,
[ --with-mpi-libdir[=DIR] the mpi library directory (default=autodetect) ],
[ case "${withval}" in
yes|no) rheo_libdir_mpi="";;
*) rheo_libdir_mpi=${withval};;
esac]
)
AC_ARG_WITH(mpi-libs,
[ --with-mpi-libs[=LIBS] the mpi library directory (default=autodetect) ],
[ case "${withval}" in
yes|no) rheo_libs_mpi="";;
*) rheo_libs_mpi=${withval};;
esac]
)
if test x"$enable_mpi" = x"yes"; then
RHEO_CHECK_MPI
fi
if test x"$rheo_have_mpi" = x"yes"; then
# if mpi is set, then default is distributed version
rheo_enable_new_code="yes"
else
rheo_use_distributed=no
fi
AM_CONDITIONAL(USE_NEW_CODE, test x"${rheo_enable_new_code}" = x"yes")
AH_TEMPLATE([USE_NEW_CODE], Defines whether use the new code branch)
AC_SUBST(USE_NEW_CODE)
if test x"$rheo_enable_new_code" = x"yes"; then
AC_DEFINE(USE_NEW_CODE)
USE_NEW_CODE=true
else
USE_NEW_CODE=false
fi
dnl-------------------------------------------------------------------------
dnl #@toindex scotch, distributed mesh partitioner
dnl #
dnl # @item --with-scotch-incdir=@var{incdir_scotch}
dnl # @itemx --with-scotch-libdir=@var{libdir_scotch}
dnl # @itemx --with-scotch-libs=@var{libs_scotch}
dnl # Turns on/off the @code{scotch} distributed mesh partitioner.
dnl # Check in @var{libdir_scotch} for @code{libptscotchparmetis.so},
dnl # @code{libptscotch.so} and @code{libptscotcherrexit.so} or
dnl # corresponding @code{.a} libraries.
dnl # Default is to auto-detect when mpi is available.
dnl-------------------------------------------------------------------------
dnl #@toindex parmetis, distributed mesh partitioner
dnl #
dnl # @item --with-parmetis-incdir=@var{incdir_parmetis}
dnl # @itemx --with-parmetis-libdir=@var{libdir_parmetis}
dnl # Turns on/off the @code{parmetis} distributed mesh partitioner.
dnl # Check in @var{libdir_parmetis} for @code{libparmetis.so},
dnl # @code{libparmetis.a} and also @code{libmetis.a}
dnl # @code{libmetis.so}.
dnl # Default is to autodetect when mpi is available and scotch unavailable.
dnl-------------------------------------------------------------------------
with_scotch=""
rheo_incdir_scotch=""
rheo_libdir_scotch=""
rheo_libs_scotch="-lptscotchparmetis -lptscotch -lptscotcherrexit -lz"
#rheo_libs_scotch="-lptscotchparmetis -lptscotch -lptscotcherrexit -lscotch -lscotcherrexit"
#rheo_libs_scotch="-lptscotchparmetis"
AC_ARG_WITH(scotch-incdir,
[ --with-scotch-incdir[=DIR] the scotch distributed mesh partitioner includes directory (default=autodetect) ],
[ case "${withval}" in
yes|no) with_scotch=${withval};;
*) rheo_incdir_scotch=${withval}
with_scotch=yes
;;
esac]
)
AC_ARG_WITH(scotch-libdir,
[ --with-scotch-libdir[=DIR] the scotch distributed mesh partitioner library directory (default=autodetect) ],
[ case "${withval}" in
yes|no) with_scotch=${withval};;
*) rheo_libdir_scotch=${withval}
with_scotch=yes
;;
esac]
)
AC_ARG_WITH(scotch-libs,
[ --with-scotch-libs[=LIBS] the scotch distributed mesh partitioner library linker flags (default=-lptscotchparmetis -lptscotch -lptscotcherrexit -lz) ],
[ case "${withval}" in
yes|no) with_scotch=${withval};;
*) rheo_libs_scotch=${withval}
with_scotch=yes
;;
esac]
)
with_parmetis=""
rheo_incdir_parmetis=""
rheo_libdir_parmetis=""
AC_ARG_WITH(parmetis-incdir,
[ --with-parmetis-incdir[=DIR] the parmetis distributed mesh partitioner includes directory (default=autodetect) ],
[ case "${withval}" in
yes|no) with_parmetis=${withval};;
*) rheo_incdir_parmetis=${withval}
with_parmetis=yes
;;
esac]
)
AC_ARG_WITH(parmetis-libdir,
[ --with-parmetis-libdir[=DIR] the parmetis distributed mesh partitioner library directory (default=autodetect) ],
[ case "${withval}" in
yes|no) with_parmetis=${withval};;
*) rheo_libdir_parmetis=${withval}
with_parmetis=yes
;;
esac]
)
if test x"${rheo_use_distributed}" = x"yes"; then
if test x"${with_scotch}" != x"no"; then
RHEO_CHECK_SCOTCH
fi
if test x"${with_parmetis}" = x"yes"; then
RHEO_CHECK_PARMETIS
fi
if test x"${rheo_have_scotch}" != x"yes" && test x"${rheo_have_parmetis}" != x"yes"; then
rheo_use_distributed=no
fi
fi
dnl-------------------------------------------------------------------------
dnl #@toindex blas, basic linear algebra subroutines
dnl #
dnl # @item --with-blas-libdidr=@var{rheo_libdir_blas}
dnl # @itemx --with-blas-libs=@var{rheo_libs_blas}
dnl # Turns on/off the @code{blas} libraries.
dnl # Check in @var{rheo_libs_blas} for @code{libblas.so},
dnl # or the corresponding @code{.a} libraries.
dnl # Default is to auto-detect.
dnl # This librariy is required for the pastix library.
dnl-------------------------------------------------------------------------
with_blas=""
#rheo_libs_blas="-llapack -lblas"; # mumps links to libblas automatically now
rheo_libs_blas=""
AC_ARG_WITH(blas-libdir,
[ --with-blas-libdir[=DIR] the basic linear algebra subroutines (BLAS) library directory (default=autodetect) ],
[ case "${withval}" in
yes|no) rheo_libdir_blas=""
with_blas=${withval}
;;
*) rheo_libdir_blas=${withval}
with_blas=yes
;;
esac],
[ rheo_libdir_blas="" ]
)
AC_ARG_WITH(blas-libs,
[ --with-blas-libs[=LIBS] the basic linear algebra subroutines (BLAS) libraries linker flags (default=-llapack -lblas) ],
[ case "${withval}" in
yes|no) rheo_libs_blas=""
with_blas=${withval}
;;
*) rheo_libs_blas=${withval}
with_blas=yes
;;
esac],
[ rheo_libs_blas="" ]
)
if test x"${rheo_enable_new_code}" = x"yes"; then
RHEO_CHECK_BLAS
fi
dnl-------------------------------------------------------------------------
dnl #@toindex scalapack, scalable linear algebra package
dnl #
dnl # @item --with-scalapack-libdidr=@var{rheo_libdir_scalapack}
dnl # @itemx --with-scalapack-libs=@var{rheo_libs_scalapack}
dnl # Turns on/off the @code{scalapack} libraries.
dnl # Check in @var{rheo_libs_scalapack} for @code{libscalapack.so},
dnl # or the corresponding @code{.a} libraries.
dnl # Default is to auto-detect.
dnl # This librariy is required for the pastix library.
dnl-------------------------------------------------------------------------
with_scalapack=""
rheo_libs_scalapack="-lscalapack-openmpi -lblacs-openmpi"
AC_ARG_WITH(scalapack-libdir,
[ --with-scalapack-libdir[=DIR] the scalable linear algebra subroutines (BLAS) library directory (default=autodetect) ],
[ case "${withval}" in
yes|no) rheo_libdir_scalapack=""
with_scalapack=${withval}
;;
*) rheo_libdir_scalapack=${withval}
with_scalapack=yes
;;
esac],
[ rheo_libdir_scalapack="" ]
)
AC_ARG_WITH(scalapack-libs,
[ --with-scalapack-libs[=LIBS] the scalable linear algebra subroutines (BLAS) libraries linker flags (default=-lscalapack-openmpi -lblacs-openmpi) ],
[ case "${withval}" in
yes|no) rheo_libs_scalapack=""
with_scalapack=${withval}
;;
*) rheo_libs_scalapack=${withval}
with_scalapack=yes
;;
esac],
[ rheo_libs_scalapack="" ]
)
if test x"${rheo_enable_new_code}" = x"yes"; then
RHEO_CHECK_SCALAPACK
fi
dnl-------------------------------------------------------------------------
dnl #@toindex mumps, distributed direct solver
dnl #
dnl # @item --with-mumps-incdir=@var{incdir_mumps}
dnl # @itemx --with-mumps-libdir=@var{libdir_mumps}
dnl # @itemx --with-mumps-libs=@var{libs_mumps}
dnl # Turns on/off the @code{mumps} distributed solver.
dnl # Check in @var{libdir_mumps} for @code{libmumps.so},
dnl # or the corresponding @code{.a} libraries.
dnl # Default is to auto-detect when mpi is available.
dnl-------------------------------------------------------------------------
with_mumps="yes"
rheo_incdir_mumps=""
rheo_libdir_mumps=""
rheo_libs_mumps="-ldmumps"
AC_ARG_WITH(mumps-incdir,
[ --with-mumps-incdir[=DIR] the mumps distributed direct solver includes directory (default=autodetect) ],
[ case "${withval}" in
yes|no) with_mumps=${withval};;
*) rheo_incdir_mumps=${withval}
with_mumps=yes
;;
esac]
)
AC_ARG_WITH(mumps-libdir,
[ --with-mumps-libdir[=DIR] the mumps distributed direct solver library directory (default=autodetect) ],
[ case "${withval}" in
yes|no) with_mumps=${withval};;
*) rheo_libdir_mumps=${withval}
with_mumps=yes
;;
esac]
)
AC_ARG_WITH(mumps-libs,
[ --with-mumps-libs[=DIR] the mumps distributed direct solver library directory (default=autodetect) ],
[ case "${withval}" in
yes|no) with_mumps=${withval};;
*) rheo_libs_mumps=${withval}
with_mumps=yes
;;
esac]
)
if test x"${with_mumps}" = x"yes" && test x"${rheo_enable_new_code}" = x"yes"; then
RHEO_CHECK_MUMPS
fi
dnl-------------------------------------------------------------------------
dnl #@toindex trilinos, distributed incomplete choleski factorization
dnl #
dnl # @item --with-trilinos
dnl # @itemx --with-trilinos=@var{libdir_trilinos}
dnl # Turns on/off the @code{trilinos} distributed preconditioner library.
dnl # Check in @var{libdir_trilinos} for @code{libtrilinos_ifpack.so},
dnl # or the corresponding @code{.a} libraries.
dnl # Default is to auto-detect when mpi is available.
dnl-------------------------------------------------------------------------
with_trilinos="yes"
rheo_incdir_trilinos=""
rheo_libdir_trilinos=""
#rheo_libs_trilinos="-ltrilinos_ifpack"
#rheo_libs_trilinos="-ltrilinos_ifpack -ltrilinos_amesos -ltrilinos_epetra -ltrilinos_teuchos -ltrilinos_galeri -ltrilinos_triutils"
rheo_libs_trilinos="-ltrilinos_ifpack -ltrilinos_amesos -ltrilinos_epetra -ltrilinos_teuchos"
AC_ARG_WITH(trilinos-incdir,
[ --with-trilinos-incdir[=DIR] the trilinos distributed preconditioner includes directory (default=autodetect) ],
[ case "${withval}" in
yes|no) with_trilinos=${withval};;
*) rheo_incdir_trilinos=${withval}
with_trilinos=yes
;;
esac]
)
AC_ARG_WITH(trilinos-libdir,
[ --with-trilinos-libdir[=DIR] the trilinos distributed preconditioner library directory (default=autodetect) ],
[ case "${withval}" in
yes|no) with_trilinos=${withval};;
*) rheo_libdir_trilinos=${withval}
with_trilinos=yes
;;
esac]
)
AC_ARG_WITH(trilinos-libs,
[ --with-trilinos-libs[=DIR] the trilinos distributed preconditioner library flags (default=-ltrilinos_ifpack) ],
[ case "${withval}" in
yes|no) with_trilinos=${withval};;
*) rheo_libs_trilinos=${withval}
with_trilinos=yes
;;
esac]
)
if test x"${with_trilinos}" = x"yes" && test x"${rheo_use_distributed}" = x"yes" -a x"${rheo_enable_new_code}" = x"yes"; then
# TRILIONOS requires mpi
RHEO_CHECK_TRILINOS
fi
dnl-------------------------------------------------------------------------
dnl #@toindex pastix, distributed direct solver
dnl #
dnl # @item --with-pastix
dnl # @itemx --with-pastix=@var{libdir_pastix}
dnl # Turns on/off the @code{pastix} distributed solver.
dnl # Check in @var{libdir_pastix} for @code{libpastix.so},
dnl # or the corresponding @code{.a} libraries.
dnl # Default is to auto-detect when mpi is available.
dnl-------------------------------------------------------------------------
dnl pastix is now obsolete: no debian & bug on small matrix (size < np)
dnl => waiting for a debian package and bug fixes
dnl note: implementation could replace a missing trilinos or mumps
dnl
with_pastix=""
AC_ARG_WITH(pastix-incdir,
[ --with-pastix-incdir[=DIR] the pastix distributed direct solver includes directory (default=autodetect) ],
[ case "${withval}" in
yes|no) rheo_incdir_pastix=""
with_pastix=${withval}
;;
*) rheo_incdir_pastix=${withval}
with_pastix=yes
;;
esac],
[ rheo_incdir_pastix="" ]
)
AC_ARG_WITH(pastix-libdir,
[ --with-pastix-libdir[=DIR] the pastix distributed direct solver library directory (default=autodetect) ],
[ case "${withval}" in
yes|no) rheo_libdir_pastix=""
with_pastix=${withval}
;;
*) rheo_libdir_pastix=${withval}
with_pastix=yes
;;
esac],
[ rheo_libdir_pastix="" ]
)
if test x"${with_pastix}" != x"no" && test x"${use_distributed}" = x"yes" \
&& test x"${rheo_have_scotch}" = x"yes" && test x"${rheo_have_blas}" = x"yes" \
&& test x"${rheo_have_mumps}" != x"yes" -o x"${rheo_have_trilinos}" != x"yes"; then
RHEO_CHECK_PASTIX
fi
dnl-------------------------------------------------------------------------
dnl #
dnl #@toindex umfpack, sequential multifrontal solver library
dnl #@cindex multifrontal linear solver
dnl #
dnl # @item --with-umfpack-incdir=@var{incdir_umfpack}
dnl # @itemx --with-umfpack-libdir=@var{libdir_umfpack}
dnl # @itemx --with-umfpack-libs=@var{libs_umfpack}
dnl # Turns on/off the @code{umfpack} version 4.3 multifrontal direct solver.
dnl # Default @var{incdir_umfpack} is @var{libdir_umfpack}.
dnl # Check in @var{libdir_umfpack} for @code{libumfpack.so} or
dnl # @code{libumfpack.a} and for header
dnl # @var{incdir_umfpack}/umfpack.h or @var{incdir_umfpack}/umfpack/umfpack.h.
dnl # When this library is not available, the direct solver
dnl # bases upon a traditionnal skyline Choleski factorisation
dnl # combined with a reverse Cuthill-Mc Kee reordering.
dnl-------------------------------------------------------------------------
rheo_incdir_umfpack=""
with_umfpack=yes
AC_ARG_WITH(umfpack-incdir,
[ --with-umfpack-incdir=DIR the umfpack includes directory],
[ case "${withval}" in
yes|no) with_umfpack=${withval};;
*) rheo_incdir_umfpack=${withval}
with_umfpack=yes;;
esac]
)
rheo_libdir_umfpack=""
AC_ARG_WITH(umfpack-libdir,
[ --with-umfpack-libdir=DIR the umfpack library directory],
[ case "${withval}" in
yes|no) with_umfpack=${withval};;
*) rheo_libdir_umfpack=${withval}
with_umfpack=yes;;
esac]
)
rheo_libs_umfpack="-lumfpack -lamd"
AC_ARG_WITH(umfpack-libs,
[ --with-umfpack-libs[=LIBS] the umfpack libraries linker flags (default=-lumfpack -lamd) ],
[ case "${withval}" in
yes|no) with_umfpack=${withval};;
*) rheo_libs_umfpack=${withval}
with_umfpack=yes
esac]
)
if test x"${with_umfpack}" = x"yes" && test x"${with_bigfloat}" != x"yes" -a x"${with_doubledouble}" != x"yes" ; then
RHEO_CHECK_UMFPACK
else
rheo_have_umfpack="no"
fi
dnl-------------------------------------------------------------------------
dnl #
dnl #@toindex taucs, out-of-core sparse solver library
dnl #@cindex out-of-core sparse linear solver
dnl #
dnl # @item --with-taucs-ldadd=@var{taucs_ldadd}
dnl # @itemx --with-taucs-incdir=@var{taucs_incdir}
dnl # Turns on/off the @code{taucs} version 2.0 out-of-core sparse direct solver.
dnl # When this library is not available, the configure script
dnl # check for the spooles multifrontal (see below).
dnl-------------------------------------------------------------------------
try_taucs=no
AC_ARG_WITH(taucs-ldadd,
[ --with-taucs-ldadd=LIBS the taucs out-of-core sparse direct solver (optional) ],
[ case "${withval}" in
yes | no) try_taucs=${withval};;
*) rheo_ldadd_taucs=${withval}
try_taucs=yes;;
esac]
)
AC_ARG_WITH(taucs-incdir,
[ --with-taucs-incdir=DIR the taucs includes directory (optional) ],
[ case "${withval}" in
yes | no) try_taucs=${withval};;
*) rheo_incdir_taucs=${withval}
try_taucs=yes;;
esac]
)
if test x"$rheo_enable_new_code" != x"yes"; then
if test x"${rheo_have_mpi}" != x"yes" && test x"${try_taucs}" = x"yes" -a x"$rheo_have_umfpack" != x"yes"; then
if test x"${rheo_have_doubledouble}" = x"yes"; then
echo " ERROR: incompatible options doubledouble and spooles"; exit 1
fi
if test x"${rheo_have_cln}" = x"yes"; then
echo " ERROR: incompatible options cln/bigfloat and spooles"; exit 1
fi
RHEO_CHECK_TAUCS
else
rheo_have_taucs="no"
fi
else
rheo_have_taucs="no"
fi
dnl-------------------------------------------------------------------------
dnl #
dnl #@toindex spooles, multifrontal solver library
dnl #@cindex multifrontal linear solver
dnl #
dnl # @item --with-spooles-libdir=@var{libdir_spooles}
dnl # @itemx --with-spooles-incdir=@var{incdir_spooles}
dnl # Turns on/off the @code{spooles} version 2.2 multifrontal direct solver.
dnl # Default @var{incdir_spooles} is @var{libdir_spooles}.
dnl # Check in @var{libdir_spooles} for @code{libspooles.so},
dnl # @code{libspooles.a} or @code{spooles.a} and for header
dnl # @var{incdir_spooles}/FrontMtx.h.
dnl # When this library is not available, the direct solver
dnl # bases upon a traditionnal skyline Choleski factorisation
dnl # combined with a reverse Cuthill-Mc Kee reordering.
dnl-------------------------------------------------------------------------
AC_ARG_WITH(spooles,
[ --with-spooles-libdir[=DIR] the spooles multifrontal direct solver library directory (recommended; default=no) ],
[ case "${withval}" in
no) with_spooles="no";;
/*) rheo_libdir_spooles=${with_spooles}
with_spooles="yes"
if test x"${rheo_have_taucs}" = x"yes"; then
echo " ERROR: incompatible options taucs and spooles"; exit 1
fi
if test x"${rheo_have_doubledouble}" = x"yes"; then
echo " ERROR: incompatible options doubledouble and spooles"; exit 1
fi
if test x"${rheo_have_cln}" = x"yes"; then
echo " ERROR: incompatible options cln/bigfloat and spooles"; exit 1
fi
;;
*) echo " ERROR: bad value ${withval} for --with-spooles"; exit 1;;
esac],
[ with_spooles="no";
]
)
AC_ARG_WITH(spooles-incdir,
[ --with-spooles-incdir[=DIR] the spooles includes directory (optional) ],
[ case "${withval}" in
no) with_spooles="no";;
/*) rheo_incdir_spooles=${with_spooles_incdir}
if test x"${with_spooles}" != x"yes"; then
echo " WARNING: turns on --with-spooles to use --with-spooles-incdir";
fi
;;
*) echo " ERROR: bad value ${withval} for --with-spooles-incdir"; exit 1;;
esac],
[ rheo_incdir_spooles="" # will try to auto-detect from incdir
]
)
if test x"$rheo_enable_new_code" != x"yes"; then
if test x"${rheo_have_mpi}" != x"yes" && test x"${with_spooles}" = x"yes" -a x"$rheo_have_umfpack" != x"yes" -a x"$rheo_have_taucs" != x"yes"; then
# compiled spooles works with double...
RHEO_CHECK_SPOOLES
else
rheo_have_spooles="no"
fi
else
rheo_have_spooles="no"
fi
dnl-------------------------------------------------------------------------
dnl #@toindex cgal, computational geometry library
dnl #
dnl # @item --with-cgal-incdir=@var{incdir_cgal}
dnl # @itemx --with-cgal-libdir=@var{libdir_cgal}
dnl # Turns on/off the @code{cgal} distributed solver.
dnl # Check in @var{libdir_cgal} for @code{libcgal.so},
dnl # or the corresponding @code{.a} libraries.
dnl # Default is to auto-detect when mpi is available.
dnl-------------------------------------------------------------------------
with_cgal=""
rheo_incdir_cgal=""
rheo_libdir_cgal=""
#rheo_libs_cgal="-lCGAL_Core -lCGAL -lboost_thread"
rheo_libs_cgal="-lCGAL -lgmp"; # -lgmp for ubuntu
AC_ARG_WITH(cgal-incdir,
[ --with-cgal-incdir[=DIR] the cgal computational geometry includes directory (default=autodetect) ],
[ case "${withval}" in
yes|no) rheo_incdir_cgal=""
with_cgal=${withval}
;;
*) rheo_incdir_cgal=${withval}
with_cgal=yes
;;
esac],
[ rheo_incdir_cgal="" ]
)
AC_ARG_WITH(cgal-libdir,
[ --with-cgal-libdir[=DIR] the cgal computational geometry library directory (default=autodetect) ],
[ case "${withval}" in
yes|no) rheo_libdir_cgal=""
with_cgal=${withval}
;;
*) rheo_libdir_cgal=${withval}
with_cgal=yes
;;
esac],
[ rheo_libdir_cgal="" ]
)
AC_ARG_WITH(cgal-libs,
[ --with-cgal-libs[=LIBS] the cgal distributed mesh partitioner library linker flags (default=-lCGAL) ],
[ case "${withval}" in
yes|no) with_cgal=${withval};;
*) rheo_libs_cgal=${withval}
with_cgal=yes
;;
esac]
)
RHEO_CHECK_CGAL
dnl-------------------------------------------------------------------------
dnl determine here if we use the distributed environment:
dnl-------------------------------------------------------------------------
AH_TEMPLATE([HAVE_MPI], Defines if you have distributed environment)
AC_SUBST(USE_DISTRIBUTED)
if test x"${rheo_use_distributed}" = x"yes"; then
AC_DEFINE(HAVE_MPI)
USE_DISTRIBUTED=true
else
USE_DISTRIBUTED=false
# un-activate: MPI, BOOST_MPI, SCOTCH & PARMETIS
dnl AC_MSG_RESULT(** WARNING: the distributed feature is turned off)
MPIRUN=""
INCLUDES_MPI=""
LDADD_MPI=""
INCLUDES_BOOST_MPI=""
LDADD_BOOST_MPI=""
INCLUDES_SCOTCH=""
LDADD_SCOTCH=""
INCLUDES_PARMETIS=""
LDADD_PARMETIS=""
fi
dnl-------------------------------------------------------------------------
dnl # Generic or hardware-dependant optimization
dnl use previous enable_optim and enable_debug
dnl => may be after debug and optim
dnl-------------------------------------------------------------------------
m4_include(config/acmacros.m4)
m4_include(config/acoptim.m4)
dnl-------------------------------------------------------------------------
dnl other options, not yet implemented
dnl-------------------------------------------------------------------------
dnl # @end table
dnl #FUTURE CONFIGURE OPTIONS:
dnl #@noindent
dnl # These options will be implemented in the future:
dnl #
dnl #@table @code
dnl # @item --with-long-double
dnl # Defines @code{long double} as the default
dnl # Rheolef @code{Float} type. Default is off and defines @code{double} as
dnl # @code{Float} type.
dnl # Warning: most of architectures does not provides mathematical library in
dnl # @code{long double}, e.g. @code{sqrt((long double)2)} returns only double precision
dnl # result on Sun architectures, despites it uses a double memory space.
dnl # Thus use @code{--with-doubledouble} instead.
dnl #@end table
dnl #
dnl-------------------------------------------------------------------------
dnl others variables
dnl-------------------------------------------------------------------------
dnl HAVE_GLOBAL_CONSTRUCTOR: uses global constructors in library
dnl since most compilers does not support it correctly, this is disable by default
dnl the date of the version:
DATE=`date +"%d/%m/%y %H:%M"`
dnl where executables and scripts can find auxilliary data:
dnl echo ${ac_n} "toto${ac_c}" = portable echo -n "toto" or echo "toto\c"
AC_SUBST(ac_n)
AC_SUBST(ac_c)
AC_SUBST(ac_t)
dnl-------------------------------------------------------------------------
dnl Output
dnl-------------------------------------------------------------------------
AC_OUTPUT( \
Makefile \
config/Makefile \
config/config.mk \
util/Makefile \
util/dmallocxx/Makefile \
util/doubledouble/Makefile \
util/bigfloat/Makefile \
util/fdstream/Makefile \
util/ublas/Makefile \
util/bamg/Makefile \
util/lib/Makefile \
util/tst/Makefile \
skit/Makefile \
skit/lib/Makefile \
skit/tst/Makefile \
skit/plib2/Makefile \
skit/pbin/Makefile \
skit/ptst2/Makefile \
nfem/Makefile \
nfem/data/Makefile \
nfem/quadrature/Makefile \
nfem/geo_element/Makefile \
nfem/lib/Makefile \
nfem/plib/Makefile \
nfem/basis/Makefile \
nfem/pbasis/Makefile \
nfem/form_element/Makefile \
nfem/sbin/Makefile \
nfem/bin/Makefile \
nfem/pbin/Makefile \
nfem/vtk/Makefile \
nfem/tst/Makefile \
nfem/ptst/Makefile \
doc/Makefile \
doc/refman/Makefile \
doc/usrman/Makefile \
doc/pexamples/Makefile \
doc/pusrman/Makefile \
doc/doxygen/Makefile \
)
dnl-------------------------------------------------------------------------
dnl libtool, 2nd pass
dnl-------------------------------------------------------------------------
dnl this 2nd pass may be after the AC_OUTPUT command, that generates the "libtool" script
dnl since we use this script here. Also, the "config.status" output was generated before
dnl "libtool" was created, and the two variables calculated here cannot be added to "config.status"
dnl So, create an additional "config2.status"...
AC_MSG_CHECKING(for shlibpath variable name)
RHEOLEF_SHLIBPATH_VAR=`./libtool --config | grep -i "^shlibpath_var=" | sed -e 's/.*=//'`
AC_MSG_RESULT(${RHEOLEF_SHLIBPATH_VAR})
# add optional -rpath flag to linker ?
AC_MSG_CHECKING(for hardcode libdir flag spec)
libtool_rpath_sh="/tmp/libtool-rpath-$$.sh"
./libtool --config > $libtool_rpath_sh
echo "eval \"echo \$hardcode_libdir_flag_spec\"" >> $libtool_rpath_sh
RHEOLEF_HARDCODE_LIBDIR_FLAG_SPEC=`exec_prefix=${exec_prefix} libdir=${libdir} sh $libtool_rpath_sh`
rm -f $libtool_rpath_sh
AC_MSG_RESULT(${RHEOLEF_HARDCODE_LIBDIR_FLAG_SPEC})
dnl if test x"$debian_packaging" = x"yes"; then
dnl # rpath issue for debian package: seems to be buggy with DESTDIR!=""
dnl RHEO_DEBIAN_FIX_LIBTOOL
dnl fi
# then output results to "config2.status"
output2="${srcdir}/config2.status"
rm -f $output2
echo "#!/bin/sh" >> $output2
echo "# File automatically generated by configure." >> $output2
echo "exec_prefix=\"${exec_prefix}\"" >> $output2
echo "RHEOLEF_SHLIBPATH_VAR=\"${RHEOLEF_SHLIBPATH_VAR}\"" >> $output2
echo "RHEOLEF_HARDCODE_LIBDIR_FLAG_SPEC=\"${RHEOLEF_HARDCODE_LIBDIR_FLAG_SPEC}\"" >> $output2
echo "configure: creating $output2"
dnl-------------------------------------------------------------------------
dnl add a _RHEOLEF_ prefix to #defined macros
dnl-------------------------------------------------------------------------
/bin/sh $srcdir/config/rheolef_config_header.sh \
< config/acconfig.h \
> config/config.h.new
if test -f config/config.h.cache && diff config/config.h.cache config/config.h.new >/dev/null; then
cp -a config/config.h.cache config/config.h
echo "configure: ${srcdir}/config/config.h is unchanged"
else
mv config/config.h.new config/config.h
echo "configure: creating ${srcdir}/config/config.h"
fi
echo "configure: creating ${srcdir}/config/config.mk"
dnl-------------------------------------------------------------------------
dnl summary
dnl-------------------------------------------------------------------------
status=0
echo "--------------------------------------"
echo "summary:"
echo " prefix : ${prefix}"
echo " c++ compiler : ${rheo_cxx}"
if test x"${enable_optim}" = x"yes"; then
echo " optimization : machine-dependent"
else
echo " optimization : machine-independent"
fi
if test x"${rheo_have_boost}" = x"yes"; then
echo " boost : yes"
else
echo " boost : *NO*"
status=1
fi
echo " ginac : ${rheo_have_ginac}"
# new code case:
if test x"${rheo_enable_new_code}" = x"yes"; then
if test x"${rheo_have_cgal}" = x"yes"; then
echo " geometry : cgal"
else
echo " geometry : *NONE*"
status=1
fi
solvers=""
if test x"${rheo_have_mumps}" = x"yes"; then
solvers="${solvers}mumps "
elif test x"${rheo_have_pastix}" = x"yes"; then
solvers="${solvers}pastix "
elif test x"${rheo_have_umfpack}" = x"yes"; then
solvers="${solvers}umfpack "
fi
if test x"$solvers" == x""; then
# TODO: builtin
solvers="*NONE*"
status=1
fi
echo " direct solver : $solvers"
if test x"${rheo_have_trilinos}" = x"yes"; then
echo " preconditioners : trilinos/ifpack"
elif test x"${rheo_have_pastix}" = x"yes"; then
echo " preconditioners : pastix"
else
echo " preconditioners : builtin"
fi
if test x"${rheo_use_distributed}" = x"yes"; then
if test x"${rheo_have_scotch}" = x"yes"; then
echo " partitioner : scotch"
elif test x"${rheo_have_parmetis}" = x"yes"; then
echo " partitioner : parmetis"
else
echo " partitioner : *NONE*"
status=1
fi
if test x"${rheo_have_mpi}" = x"yes"; then
if test x"${rheo_recognized_mpi}" != x"no"; then
echo " mpi : ${rheo_recognized_mpi}"
else
echo " mpi : yes"
fi
else
echo " mpi : *NONE*"
status=1
fi
fi
echo " distributed : ${rheo_use_distributed}"
else # old sequential case:
echo " old code branch : yes"
if test x"${rheo_have_umfpack}" = x"yes"; then
echo " solver : umfpack"
elif test x"${rheo_have_spooles}" = x"yes"; then
echo " solver : spooles"
elif test x"${rheo_have_taucs}" = x"yes"; then
echo " solver : taucs"
else
echo " solver : *NONE*"
status=1
fi
fi
if test $status -ne 0; then
AC_MSG_ERROR(some required library are not found)
fi
echo "--------------------------------------"
dnl-------------------------------------------------------------------------
dnl End of configure script: rest of the documenttion
dnl-------------------------------------------------------------------------
dnl #THE DIRECTORY STRUCTURE:
dnl #@table @code
dnl # @item config
dnl # portability related files and documentation extractors
dnl # @item util
dnl # a collection of useful C++ classes
dnl # and functions for smart pointers,
dnl # handling files and directories, using strings, timing.
dnl # @item skit
dnl # sparse matrix library, linear solvers.
dnl # @item nfem
dnl # finite element library, mesh, spaces and forms.
dnl # @item doc
dnl # reference manual, user's guide and examples.
dnl #@end table
dnl #
dnl #AUTHOR:
dnl # LMC-IMAG, 38041 Grenoble cedex 9, France
dnl # @email{Pierre.Saramito@@imag.fr}
dnl #DATE:
dnl # 19 january 1999
dnl #End:
dnl=========================================================================
|