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 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681
|
#
# Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
# Copyright (C) INRIA - 2006-2008 - Sylvestre Ledru
# Copyright (C) DIGITEO - 2009-2011 - Sylvestre Ledru
# Copyright (C) DIGITEO - 2009 - Pierre MARECHAL <pierre.marechal@scilab.org>
# Copyright (C) Scilab Enterprises - 2014 - Clement DAVID <clement.david@scilab-enterprises.com>
# Copyright (C) ESI Group - 2018 - Clement DAVID <clement.david@scilab-enterprises.com>
# Copyright (C) Dassault Systèmes - 2023 - Clement DAVID <clement.david@3ds.com>
#
# Copyright (C) 2012 - 2016 - Scilab Enterprises
#
# This file is hereby licensed under the terms of the GNU GPL v2.0,
# pursuant to article 5.3.4 of the CeCILL v.2.1.
# This file was originally licensed under the terms of the CeCILL v2.1,
# and continues to be available under such terms.
# For more information, see the COPYING file which you should have received
# along with this program.
#
dnl Process this file with autoconf to produce a configure script.
AC_REVISION($Revision$)dnl
AC_INIT([Scilab],[6],[https://gitlab.com/scilab/scilab/-/issues])
AC_PREREQ([2.71])
AC_CONFIG_MACRO_DIR([m4])
SCI_BUILDDIR="`pwd`"
SCI_SRCDIR="$srcdir"
SCI_SRCDIR_FULL="`cd $SCI_SRCDIR && pwd`"
if test -d "$SCI_SRCDIR_FULL/usr"; then
WITH_DEVTOOLS=true
DEVTOOLS_BINDIR="$SCI_SRCDIR_FULL/usr/bin"
DEVTOOLS_INCDIR="$SCI_SRCDIR_FULL/usr/include"
DEVTOOLS_LIBDIR="$SCI_SRCDIR_FULL/usr/lib"
export LD_LIBRARY_PATH="$DEVTOOLS_LIBDIR:$LD_LIBRARY_PATH"
else
WITH_DEVTOOLS=false
DEVTOOLS_BINDIR=
DEVTOOLS_INCDIR=
DEVTOOLS_LIBDIR=
fi
# Change version here, other files will be updated at the end of configure
SCILAB_VERSION_MAJOR=2024
SCILAB_VERSION_MINOR=1
SCILAB_VERSION_MAINTENANCE=0
AC_SUBST(SCILAB_VERSION_MAJOR)
AC_SUBST(SCILAB_VERSION_MINOR)
AC_SUBST(SCILAB_VERSION_MAINTENANCE)
SCILAB_LIBRARY_VERSION=$SCILAB_VERSION_MAJOR:$SCILAB_VERSION_MINOR:$SCILAB_VERSION_MAINTENANCE
AC_SUBST(SCILAB_LIBRARY_VERSION)
SCILAB_BINARY_VERSION=$SCILAB_VERSION_MAJOR.$SCILAB_VERSION_MINOR.$SCILAB_VERSION_MAINTENANCE
AC_SUBST(SCILAB_BINARY_VERSION)
#shared library versioning
#GENERIC_LIBRARY_VERSION=1:2:0
# | | |
# +------+ | +---+
# | | |
# current:revision:age
# | | |
# | | +- increment if interfaces have been added
# | | set to zero if interfaces have been removed
# or changed
# | +- increment if source code has changed
# | set to zero if current is incremented
# +- increment if interfaces have been added, removed or changed
# Check if we have a space in the path to the source tree
SPACE_IN_PATH=`echo "$SCI_SRCDIR_FULL"|grep " " > /dev/null; echo $?`
if test "$SPACE_IN_PATH" = "0"; then
AC_MSG_WARN([=====================================])
AC_MSG_WARN([Configure thinks that there is a space in the path to the source. This may cause problem with libtool and some other things...])
AC_MSG_WARN([=====================================])
sleep 180
fi
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_HEADERS([modules/core/includes/machine.h])
AC_PROG_LN_S
AM_PROG_AR
AC_SYS_LARGEFILE
# In order to be able to change the scilab directory
# See http://wiki.debian.org/RpathIssue
AC_RELOCATABLE
AC_RELOCATABLE_LIBRARY
AC_LIB_RPATH
# If configure detect that timestamp changed,
# it tries to rebuild configure & makefile which can be a painmaker
# if the version is different
AM_MAINTAINER_MODE
AM_INIT_AUTOMAKE([-Wall foreign serial-tests subdir-objects]) # Not using -Werror because we override {C,F}FLAGS in order to disable optimisation
AC_CANONICAL_HOST
#################################
## all the --with-* argument help
#################################
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],[Do not optimize and print warning messages (C/C++/Fortran/Java code)]))
AC_ARG_ENABLE(debug-C,
AS_HELP_STRING([--enable-debug-C],[Do not optimize and print warning messages (C code)]))
AC_ARG_ENABLE(debug-CXX,
AS_HELP_STRING([--enable-debug-CXX],[Do not optimize and print warning messages (C++ code)]))
AC_ARG_ENABLE(debug-java,
AS_HELP_STRING([--enable-debug-java],[Print warning messages and line numbers (Java code)]))
AC_ARG_ENABLE(debug-fortran,
AS_HELP_STRING([--enable-debug-fortran],[Do not optimize and print warning messages (Fortran code)]))
AC_ARG_ENABLE(debug-linker,
AS_HELP_STRING([--enable-debug-linker],[Print warning messages from the linker (ld)]))
AC_ARG_ENABLE(code-coverage,
AS_HELP_STRING([--enable-code-coverage],[Enable code coverage]))
AC_ARG_ENABLE(stop-on-warning,
AS_HELP_STRING([--enable-stop-on-warning],[Stop the compilation on the first warning found in the C/C++ code]))
AC_ARG_WITH(gcc,
AS_HELP_STRING([--with-gcc],[Use gcc C compiler ]))
AC_ARG_WITH(gfortran,
AS_HELP_STRING([--with-gfortran],[Use gfortran, GNU Fortran 95 compiler]))
AC_ARG_WITH(intelcompilers,
AS_HELP_STRING([--with-intelcompilers],[Use Intel C (icc) and Fortran (ifort) proprietary compilers (GNU/Linux only) ]))
AC_ARG_WITH(tk,
AS_HELP_STRING([--without-tk],[Disable the interface to Tcl/Tk ]))
AC_ARG_WITH(javasci,
AS_HELP_STRING([--without-javasci],[Disable the Java/Scilab interface (javasci)]))
AC_ARG_ENABLE(compilation-tests,
AS_HELP_STRING([--enable-compilation-tests],[Enable unitary tests and checks at compilation time]))
AC_ARG_WITH(gui,
AS_HELP_STRING([--without-gui],[Disable the Scilab Graphical User Interface (GUI). Intended for embedded/clustering/grid Scilab ]))
AC_ARG_ENABLE(build-swig,
AS_HELP_STRING([--enable-build-swig=path],[Regenerate Java => C and Scilab => C wrappers produced by Swig]))
AC_ARG_ENABLE(build-giws,
AS_HELP_STRING([--enable-build-giws],[Regenerate C/C++ => Java wrappers produced by Giws]))
AC_ARG_ENABLE(build-parser,
AS_HELP_STRING([--enable-build-parser],[Regenerate code for the parser (Lex & YACC)]))
################################################
########## compilator & misc programs detection
################################################
AC_PROG_CPP
AC_PROG_GREP
AC_ARG_WITH(min_macosx_version,
AS_HELP_STRING([--with-min-macosx-version],[Force compilers to generate binaries compatible with MacOSX minimal version.]))
case "$host" in
*darwin*)
if test -n "$with_min_macosx_version"; then
MIN_MACOSX_VERSION=$with_min_macosx_version
#Append to the default flags on Apple machines
ARCH_CFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
ARCH_CXXFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
ARCH_FFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
ARCH_LDFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
# We need this to be passed to all linker commands
LDFLAGS="$LDFLAGS -mmacosx-version-min=$MIN_MACOSX_VERSION"
fi
;;
esac
#####################################################
## Look for pkg-config
#####################################################
AC_MSG_CHECKING([if prebuilt binaries are available])
if $WITH_DEVTOOLS; then
AC_MSG_RESULT([WITH_DEVTOOLS: $SCI_SRCDIR_FULL/usr])
else
AC_MSG_RESULT([no])
PKG_PROG_PKG_CONFIG
fi
#####################################################
## check if options are correct (or not)
#####################################################
if test "$with_intelcompilers" = yes -a "$with_gcc" = yes; then
AC_MSG_ERROR([Conflicting options : you specified two compiler series])
fi
######## fortran ########
if test "$with_gfortran" = yes; then
: ${FFLAGS=""}
AC_PROG_F77(gfortran)
if test -z "$F77"; then
AC_MSG_ERROR([You asked me to use gfortran but i haven't been able to find it])
fi
fi
if test "$with_intelcompilers" = yes; then
: ${FFLAGS=""}
AC_PROG_F77(ifc ifort)
if test -z "$F77"; then
AC_MSG_ERROR([You asked me to use ifc (intel fortran compiler) but i haven't been able to find it])
fi
fi
if test -z "$F77"; then
## No Fortran compiler specified... Prefer gfortran and intel compilers
: ${FFLAGS=""}
AC_PROG_F77([gfortran ifc ifort])
if test -z "$F77"; then
# Best effort to find a compiler (might be g77)
: ${FFLAGS=""}
AC_PROG_F77
fi
fi
# case statements were introduced in fortran 90 so we can use that
# as a test to see if our compiler is fortran 90 compatible.
f90compatible=false
if test -z "$F77"; then
AC_MSG_ERROR([No fortran compiler found. Cannot compile scilab without a fortran compiler])
fi
AC_MSG_CHECKING([if $F77 is a fortran 90 compatible compiler])
f90compatible=false
AC_LANG_PUSH([Fortran 77])
AC_COMPILE_IFELSE([
PROGRAM hello
do 50 i = 1, 5
select case ( i )
case (1)
print*, "case is 1, i is ", i
case ( 2 : 3 )
print*, "case is 2 to 3, i is ", i
case default
print*, "default case, i is ", i
end select
50 continue
END
],
[AC_MSG_RESULT([yes])
AC_DEFINE([G95_FORTRAN],[],[uses G95 fortran])
f90compatible=true
],
[AC_MSG_RESULT([no])]
)
AC_LANG_POP([Fortran 77])
############ C ###############
if test "$with_gcc" = yes; then
: ${CFLAGS=""}
AC_PROG_CC(gcc)
if test -z "$CC"; then
AC_MSG_ERROR([You asked me to use gcc but i haven't been able to find it])
fi
fi
if test "$with_intelcompilers" = yes; then
: ${CFLAGS=""}
AC_PROG_CC(icc ecc)
if test -z "$CC"; then
AC_MSG_ERROR([You asked me to use icc (intel C compiler) but I haven't been able to find it])
fi
fi
if test -z "$CC"; then
# No C compiler specified... We rely on Autoconf to find the best
: ${CFLAGS=""}
AC_PROG_CC
fi
if test -z "$CC"; then
AC_MSG_ERROR([No C Compiler found. Cannot compile Scilab without a C compiler])
fi
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([long])
### C++ ###
: ${CXXFLAGS=""}
AC_PROG_CXX
# we can't just do something like
# AC_CHECK_PROG(cxx_present, $CXX, "yes", "no")
# because if the user has specified the full path of the desired C++ compiler then AC_CHECK_PROG
# will fail. If AC_PROG_CXX fails to find a c++ compiler it will set CXX=g++ so just run AC_CHECK_PROG
# in this special case
case $CXX in
g++)
AC_CHECK_PROG([cxx_present], [$CXX], [yes], [no])
if test "x$cxx_present" != "xyes"; then
AC_MSG_ERROR([No C++ compiler found. Cannot compile scilab without a C++ compiler])
fi
;;
esac
# for "subdir-objects"
AM_PROG_CC_C_O
AC_PROG_F77_C_O
if test "$enable_debug" = yes; then
enable_debug_fortran=yes
enable_debug_C=yes
enable_debug_CXX=yes
enable_debug_java=yes
else
enable_debug=no
fi
if test "$enable_debug_fortran" = yes; then
FFLAGS="`echo "$FFLAGS"| sed -e 's|-O[[0-9+]]|-O0|'`"
else
enable_debug_fortran=no
fi
if test "$enable_debug_C" = yes; then
CFLAGS="`echo "$CFLAGS"| sed -e 's|-O[[0-9+]]|-O0|'`"
else
enable_debug_C=no
fi
if test "$enable_debug_CXX" = yes; then
CXXFLAGS="`echo "$CXXFLAGS"| sed -e 's|-O[[0-9+]]|-O0|'`"
else
enable_debug_CXX=no
fi
if test "$enable_debug_java" = yes; then
LOGGING_LEVEL="INFO"
else
LOGGING_LEVEL="SEVERE"
fi
AC_SUBST(LOGGING_LEVEL)
if test "x${prefix}" = "xNONE"; then
prefix="${ac_default_prefix}"
fi
###############################
## get the version commited
###############################
SCIVERSION=$(sed -e "s/SCIVERSION=//" $SCI_SRCDIR/Version.incl)
#############################################
## Compilers and options according to machine
#############################################
######################
######## Set compilation options for intel C/Fortran compilers
######################
if test "$with_intelcompilers" = yes; then
SCI_INTEL_COMPILER()
fi
########### FORTRAN ######################
######################
######## With gfortran ...
######################
if test -n "$F77"; then
case "$F77" in
gfortran*)
## With GNU Compiler enable the code coverage
if test "$enable_code_coverage" = yes; then
CODECOVERAGE_FFLAGS="-fprofile-arcs -ftest-coverage"
fi
;;
g77*)
AC_MSG_ERROR([g77 is no longer supported. Please consider switching to gfortran])
;;
esac
if test "$enable_debug_fortran" = yes; then
AC_LANG_PUSH([Fortran 77])
for flag in -g -Wall -Wsurprising; do
case " ${FFLAGS} " in
*\ ${flag}\ *)
# flag is already present
;;
*)
AC_MSG_CHECKING([if the Fortran compiler accepts ${flag}])
ac_save_FFLAGS="$FFLAGS"
FFLAGS="$FFLAGS ${flag}"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[AC_MSG_RESULT([yes])
DEBUG_FFLAGS="${flag}"
],
[AC_MSG_RESULT([no])]
)
;;
esac
done
AC_LANG_POP([Fortran 77])
else
DEBUG_FFLAGS="-DNDEBUG -g1 -O2"
fi
case "$host" in
x86_64-*-linux*)
ARCH_FFLAGS="-m64 -fPIC"
;;
# Dec Alpha OSF 4
alpha*-dec-osf4.*)
ARCH_FFLAGS="-fpe3"
;;
alpha*-dec-osf*)
ARCH_FFLAGS="-fpe3 -switch nosqrt_recip"
;;
rs6000-*-*)
ARCH_FFLAGS="-qcharlen=4096"
;;
mips-*-ultrix*)
ARCH_FFLAGS="-O0 -fpe1"
;;
*-*-hpux9.*)
ARCH_FFLAGS="+Obb1200 +E4 -Dhpux"
;;
*-*-hpux10.*)
if test "$enable_debug_fortran" = yes; then
ARCH_FFLAGS="+E4 +Z +DAportable -Dhpux"
else
ARCH_FFLAGS="+O2 +E4 +Z +DAportable -Dhpux"
fi
# ARCH_LDFLAGS="-Wl,+vnocompatwarnings,-E /usr/lib/libdld.sl"
;;
*-*-hpux11.*)
if test "$enable_debug_fortran" = yes; then
ARCH_FFLAGS=" +Z +DAportable -Dhpux"
else
ARCH_FFLAGS="+O2 +Z +DAportable -Dhpux"
fi
ARCH_LDFLAGS="-ldld -lnsl -lU77 -lm"
;;
esac
fi
#########################
# setting parameters according to system types
#########################
case "$host" in
*-*-hpux9.*|*-*-hpux10.*|*-*-hpux11.*)
HPUX=1
;;
sparc-*)
SPARC=1
;;
mips-sgi-irix*)
MIPS_SGI_IRIX=1
;;
*-*-solaris*)
SOLARIS=1
;;
*darwin*)
MACOSX=1
;;
esac
AM_CONDITIONAL(IS_MACOSX, test -n "$MACOSX")
AM_CONDITIONAL(IS_HPUX, test -n "$HPUX")
AM_CONDITIONAL(IS_SPARC, test -n "$SPARC")
AM_CONDITIONAL(IS_SOLARIS, test -n "$SOLARIS")
AM_CONDITIONAL(IS_MIPS_SGI_IRIX, test -n "$MIPS_SGI_IRIX")
############
## C++
############
if test -z "$CXX"; then
AC_MSG_ERROR([No C++ compiler found. Cannot compile scilab without a C++ compiler])
fi
case "$CXX" in
g++-* | g++ | ccache*g++ | ccache*g++-* )
## With GNU C++ Compiler
# enable the code coverage
if test "$enable_code_coverage" = yes; then
CODECOVERAGE_CXXFLAGS="-fprofile-arcs -ftest-coverage"
fi
if test "$enable_debug_CXX" = yes; then
DEBUG_CXXFLAGS="-Wall -Wextra -Wno-unused-parameter -O0 -g3"
case "$host" in
*-linux-gnu )
# Only doing that under Linux
DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -fdiagnostics-show-option -Werror=format-security"
;;
esac
else
DEBUG_CXXFLAGS="-DNDEBUG -g1 -O2"
fi
COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -fno-stack-protector " # bug 3131
# add the extra filesystem library if needed
if test "$($CXX -dumpversion |cut -d\. -f1)" -lt "9" ; then
COMPILER_LDFLAGS="$COMPILER_LDFLAGS -lstdc++fs"
fi
;;
*clang++ | clang++*)
# enable the code coverage
if test "$enable_code_coverage" = yes; then
CODECOVERAGE_CXXFLAGS="-fprofile-arcs -ftest-coverage"
fi
if test "$enable_debug_CXX" = yes; then
DEBUG_CXXFLAGS="-Wall -Wextra -Wno-unused-parameter -O0 -g3"
else
DEBUG_CXXFLAGS="-DNDEBUG -g1 -O2"
fi
COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -fno-stack-protector " # bug 3131
# allow to compile under macOS < Catalina with c++17 enabled clang
# or compile under macOS > Catalina with min_macosx_version < 11
case "$host_os" in
*Darwin* | *darwin*)
macosx_version=`sw_vers -productVersion`
case $macosx_version in
10.*)
macosx_version_minor=`echo $macosx_version | awk -F\. {'print $2'}`
if [[ $macosx_version_minor -lt 15 ]]; then
COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -D_LIBCPP_DISABLE_AVAILABILITY"
fi
;;
*)
if test -n "$with_min_macosx_version"; then
min_macosx_version_major=`echo $with_min_macosx_version | awk -F\. {'print $1'}`
min_macosx_version_minor=`echo $with_min_macosx_version | awk -F\. {'print $2'}`
if [[ $min_macosx_version_major -eq 10 ]]; then
COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -D_LIBCPP_DISABLE_AVAILABILITY"
if [[ $min_macosx_version_minor -ge 13 ]]; then
# fmemopen() appeared in macos >= 10.13
SYS_FMEMOPEN=1
fi
fi
fi
;;
esac
;;
esac
;;
esac
AM_CONDITIONAL(IS_SYS_FMEMOPEN, test -n "$SYS_FMEMOPEN")
#### 64 bits detection
IS_64_BITS_CPU=false
case "$host" in
x86_64-*-linux-gnu | x86_64-linux-gnu | ia64-*-linux-gnu | alpha-*-linux-gnu | alpha-*-netbsd* | x86_64-*-netbsd* | sparc64-*-netbsd*)
IS_64_BITS_CPU=true
;;
esac
##########"
case "$CC" in
gcc-* | gcc | ccache*gcc | ccache*gcc-* )
## With GNU Compiler
# enable the code coverage
if test "$enable_code_coverage" = yes; then
CODECOVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
fi
if test "$enable_debug_C" = yes; then
DEBUG_CFLAGS="-Wall -Wextra -Wno-unused-parameter -O0 -g3"
# used to be -O0
case "$host" in
*-linux-gnu )
# Only doing that under Linux
if test "$enable_debug_linker" = yes; then
LDFLAGS="$LDFLAGS -Wl,--warn-common,-x"
fi
DEBUG_CFLAGS="$DEBUG_CFLAGS -fdiagnostics-show-option -Werror=format-security"
;;
esac
else
DEBUG_CFLAGS="-DNDEBUG -g1 -O2"
fi
COMPILER_CFLAGS="$COMPILER_CFLAGS -fno-stack-protector " # bug 3131
# Explictly disable the as needed. It was disable by default but Ubuntu
# activated it by default since release 11.04. See bug #8961.
# Once all cyclic dependencies have been dropped, this line could be removed.
# Check if linker supports --as-needed and --no-as-needed options
if $LD --help 2>/dev/null | grep no-as-needed > /dev/null; then
COMPILER_LDFLAGS="$COMPILER_LDFLAGS -Wl,--no-as-needed"
fi
case "$host" in
x86_64-*-linux-gnu | x86_64-linux-gnu)
ARCH_CFLAGS="-m64"
;;
alpha-*-linux-gnu)
ARCH_CFLAGS="-mieee-with-inexact"
ARCH_LDFLAGS="-mieee-with-inexact"
;;
powerpc-*-linux-gnu)
ARCH_CFLAGS="-D_GNU_SOURCE"
;;
*-*-solaris*)
ARCH_CFLAGS="-DSVR4 -DSYSV -Dsolaris"
;;
*-*-freebsd*)
ARCH_CFLAGS="-Dfreebsd"
ARCH_LDFLAGS="-lm"
;;
alpha-*-netbsd*)
ARCH_CFLAGS="-Dnetbsd -mieee"
ARCH_FFLAGS="-Dnetbsd -mieee"
;;
*-*-netbsd*)
ARCH_CFLAGS="-Dnetbsd"
;;
*-*-darwin*)
# Flag no more added since :
# - No more supported in recent gcc versions (> 4.6)
# - only needed when compiling with flag -mmacosx-min-version=10.5
#ARCH_CFLAGS="$ARCH_CFLAGS -no_compact_linkedit"
#ARCH_CXXFLAGS="$ARCH_CXXFLAGS -no_compact_linkedit"
#ARCH_LDFLAGS="$ARCH_LDFLAGS -no_compact_linkedit"
# We need this to be passed to all linker commands
#LDFLAGS="$LDFLAGS -no_compact_linkedit"
case "$F77" in
gfortran-*|gfortran)
# Extract from gfortran -v the version it has been built for
MAC_DETECTED_ARCH="`$F77 -v 2>&1|grep "Target:"|sed -e "s/Target: \([[a-z0-9A-Z_]]*\).*/\1/g"`"
if test "$MAC_DETECTED_ARCH" == "aarch64"; then
MAC_DETECTED_ARCH=arm64
fi
;;
*)
AC_MSG_WARN([gfortran not used. Could not detect the architecture. Switch to the default case: x86_64])
MAC_DETECTED_ARCH="x86_64"
;;
esac
CC="$CC -arch $MAC_DETECTED_ARCH"
CXX="$CXX -arch $MAC_DETECTED_ARCH"
;;
esac # end of case "$host"
;; # end of the gcc case on the $CC
*clang | clang*)
# enable the code coverage
if test "$enable_code_coverage" = yes; then
CODECOVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
fi
if test "$enable_debug_C" = yes; then
DEBUG_CFLAGS="-Wall -Wextra -Wno-unused-parameter -O0 -g3"
# used to be -O0
else
DEBUG_CFLAGS="-DNDEBUG -g1 -O2"
fi
COMPILER_CFLAGS="$COMPILER_CFLAGS -fno-stack-protector " # bug 3131
# prevent dll optimizations in the final binary
case "$host_os" in
*Darwin* | *darwin*)
LDFLAGS="${LDFLAGS//-Wl,-dead_strip_dylibs/}"
;;
esac
;; # end of the clang case on the $CC
*)
## CC compiler (not GCC)
if test "$enable_debug_C" != yes; then
DEBUG_CFLAGS="-DNDEBUG"
fi
case "$host" in
# Dec Alpha OSF 4
alpha*-dec-osf4.*)
ARCH_CFLAGS="-std -ieee_with_inexact"
ARCH_LDFLAGS="-ieee_with_inexact"
;;
alpha*-dec-osf*)
ARCH_CFLAGS="-ieee_with_inexact"
ARCH_LDFLAGS="-ieee_with_inexact"
;;
rs6000-*-*) # IBM AIX RS 6000 (NO LONGER SUPPORTED)
ARCH_CFLAGS="-Daix -DSYSV"
;;
mips-sgi-irix*) # SGI
ARCH_CFLAGS="-DSYSV -DSVR4"
;;
*-*-hpux9.*)
ARCH_CFLAGS="-DSYSV -Dhpux"
;;
*-*-hpux10.*) # HP 10
if test "$enable_debug_C" = yes; then
ARCH_CFLAGS="-DSYSV -Dhpux"
else
ARCH_CFLAGS="-DSYSV -Dhpux +Z +DAportable"
fi
;;
*-*-hpux11.*) # HP 11
ARCH_CFLAGS="-DSYSV -Dhpux -Dhppa +Z +DAportable"
;;
*-*-solaris*) # SUN SOLARIS
ARCH_CFLAGS="-DSVR4 -DSYSV -Dsolaris -I/usr/local/include/"
ARCH_LDFLAGS="-L/usr/local/lib/"
;;
esac
;; # end of not a gcc compiler
esac
# enable the code coverage
if test "$enable_code_coverage" = yes; then
AC_PATH_PROG(LCOV, lcov)
if test -z "$LCOV" ; then
AC_MSG_ERROR([Cannot find lcov. Please install it (package lcov under Debian) or remove the option --enable-code-coverage])
fi
AC_PATH_PROG(GENHTML, genhtml)
if test -z "$GENHTML" ; then
AC_MSG_ERROR([Cannot find genhtml. Please install it (package lcov under Debian) or remove the option --enable-code-coverage])
fi
CODECOVERAGE_LDFLAGS="-coverage -lgcov"
fi
AM_CONDITIONAL(CODE_COVERAGE, test "$enable_code_coverage" = yes)
AM_CONDITIONAL(ENABLE_DEBUG, test "$enable_debug" = yes)
# flag for possible compilations in configure
SCILIBS_CFLAGS=''
SCILIBS_CXXFLAGS=''
SCILIBS_FFLAGS=''
SCILIBS_LDFLAGS=''
if $WITH_DEVTOOLS; then
# with devtools the needed dependencies are all there, discard private dependencies
SCILIBS_LDFLAGS='-Wl,--allow-shlib-undefined'
fi
if test $IS_64_BITS_CPU = true -o "$MACOSX" = "1"; then
if test $f90compatible = false; then
AC_MSG_ERROR([64 bits support needs a fortran 90 compiler (try --with-gfortran).])
fi
fi
AM_CONDITIONAL(IS_64_BITS_CPU, test $IS_64_BITS_CPU = true)
# check if the compiler supports c++17
saved_cppflags="$CXXFLAGS"
CXXFLAGS=""
AX_CXX_COMPILE_STDCXX(17, noext, mandatory)
STDCXX_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$saved_cppflags"
################
## SSE
## By default, for x86 CPU, enable the SSE2.
## Note that it is already the case with 64 bits CPU
## (these extensions are enabled by default by gcc)
################
case "$host" in
i*86-linux-gnu|i*86-*-linux-gnu)
SSE_CFLAGS="-msse2"
SSE_FFLAGS="-msse2"
SSE_CXXFLAGS="-msse2"
;;
esac
#######################
## test for underscores (name mangling issues between C and fortran)
#######################
AC_CHECK_UNDERSCORE_FORTRAN()
###############################
### Regenerate the parser files
### Flex & Yacc
###############################
if test "$enable_build_parser" = yes; then
AC_PROG_LEX(noyywrap)
if test -z "$LEX" -o "$LEX" = ":"; then
AC_MSG_ERROR([No implementation of Lex (flex, lex) detected. Please install it (package flex)])
fi
AC_PROG_YACC
if test -z "$YACC"; then
AC_MSG_ERROR([No implementation of Yacc (bison, yacc) detected. Please install it (package bison)])
fi
# Actually, AC_PROG_YACC is lying. It sometimes put yacc into $YACC even it
# hasn't been able to find it.
# AC_CHECK_PROG(YACC_PRESENT, $YACC, AC_MSG_ERROR([No implementation of Yacc (bison, yacc) detected. Please install it (package bison)]) )
AC_CHECK_PROG(yacc_present, $YACC, "yes","no")
if test "x$yacc_present" != "xyes"; then
AC_MSG_ERROR([No implementation of Yacc (bison, yacc) detected. Please install it (package bison)])
fi
fi
AM_CONDITIONAL(BUILD_PARSER, test "$enable_build_parser" = yes)
#################
## HDF5
#################
AC_HDF5()
# The Java detection is done after in this file.
#################
## scirenderer
#################
AC_ARG_WITH(external-scirenderer,
AS_HELP_STRING([--with-external-scirenderer],[Disable the usage of the internal copy of scirenderer. Intended for packaging of Scilab]))
AM_CONDITIONAL(EXTERNAL_SCIRENDERER, test "$with_external_scirenderer" = yes)
#################
## XCOS
#################
AC_ARG_WITH(xcos,
AS_HELP_STRING([--without-xcos], [Disable Xcos]))
AC_ARG_WITH(modelica,
AS_HELP_STRING([--without-modelica],[Disable the OCaml module (modelica)]))
if test "$with_gui" = no; then
AC_MSG_WARN([GUI is disabled. Disabling then Xcos GUI])
fi
XCOS_ENABLE=no
if test "$with_xcos" != no; then
AC_DEFINE([WITH_XCOS], [], [with XCos])
save_LIBS="$LIBS"
AC_CHECK_LIB([rt], [clock_gettime],
[RT_LIB="-lrt";
AC_DEFINE([HAVE_CLOCK_GETTIME], [1],[Whether clock_gettime is available]) ],
[AC_MSG_WARN([librt: library missing (Cannot find symbol clock_gettime). Check if librt is installed (it is usually provided by the libc) and if the version is correct])]
)
LIBS="$save_LIBS"
AC_SUBST(RT_LIB)
#################
## ocaml which only called when using Xcos
#################
if test "$with_modelica" != no; then
AC_CHECK_PROG_OCAML()
fi
XCOS_ENABLE=yes
fi
AC_SUBST(XCOS_ENABLE)
AM_CONDITIONAL(OCAML, test "$with_modelica" != no -a "$OCAMLC" != no -a "$OCAMLOPT" != no)
AM_CONDITIONAL(XCOS, test "$XCOS_ENABLE" != no)
###########################
## test for JAVA compiler
###########################
if test "$with_javasci" != no -o "$with_gui" != no -o "$enable_build_help" != no; then
# See if --with-jdk command line argument is given
# Try to detect the installed JVM, this could be controlled
# by the above --with options
AC_JAVA_WITH_JDK
if test "$with_jdk" != no; then
AC_JAVA_DETECT_JVM
case "$ac_java_jvm_version" in
17)
;;
*)
AC_MSG_ERROR([Wrong version of Java. Expected at least 17. Found $ac_java_jvm_version])
;;
esac
if test "$ac_java_jvm_name" = "jdk"; then
JAVA_HOME=$ac_java_jvm_dir
JAVA_VERSION=$ac_java_jvm_version
# AC_JAVA_TOOLS
AC_JAVA_JNI_INCLUDE
JAVA_JNI_INCLUDE=$ac_java_jvm_jni_include_flags
AC_JAVA_JNI_LIBS
JAVA_JNI_LIBS=$ac_java_jvm_jni_lib_flags
JAVA_JNI_LIBS_PRELOAD=$ac_java_jvm_ld_preload
AC_JAVA_CLASSPATH
JAVA_CLASSPATH=$ac_java_classpath
AC_JAVA_TOOLS
AC_JAVA_ANT
if test "$with_gui" != no; then
# Jakarta Activation (Run dependency)
# Do not look for jakarta.activation.spi.MimeTypeRegistry here since it will detect jakarta.activation-api.jar
# Checked before activation.jar to avoid false detection
AC_JAVA_CHECK_JAR([jakarta-activation],[com.sun.activation.registries.MimeTypeFile],[Scilab Help - MimeTypes for image conversion])
JAKARTA_ACTIVATION=$PACKAGE_JAR_FILE
AC_SUBST(JAKARTA_ACTIVATION)
if test "$with_xcos" != no; then
# jgraphx
AC_JAVA_CHECK_JAR([jgraphx],[com.mxgraph.view.mxGraph],[Diagram design],[],[VERSION],[2.0.0.1])
JGRAPHX=$PACKAGE_JAR_FILE
AC_SUBST(JGRAPHX)
# Jaxb (Build dependency)
AC_JAVA_CHECK_JAR([jaxb-api],[javax.xml.bind.annotation.XmlElement],[XML file reading/validation])
JAXB_API=$PACKAGE_JAR_FILE
AC_SUBST(JAXB_API)
# Jaxb Runtime (Run dependency)
AC_JAVA_CHECK_JAR([jaxb-runtime],[javax.xml.bind.JAXBException],[XML file reading/validation])
JAXB_RUNTIME=$PACKAGE_JAR_FILE
AC_SUBST(JAXB_RUNTIME)
# Jaxb Impl
AC_JAVA_CHECK_JAR([jaxb-impl],[com.sun.xml.bind.v2.ContextFactory],[XML file reading/validation])
JAXB_IMPL=$PACKAGE_JAR_FILE
AC_SUBST(JAXB_IMPL)
# Activation
AC_JAVA_CHECK_JAR([activation],[javax.activation.DataSource],[XML file reading/validation])
ACTIVATION=$PACKAGE_JAR_FILE
AC_SUBST(ACTIVATION)
# Istack Commons Runtime
AC_JAVA_CHECK_JAR([istack-commons-runtime],[com.sun.istack.FinalArrayList],[XML file reading/validation])
ISTACK_COMMONS_RUNTIME=$PACKAGE_JAR_FILE
AC_SUBST(ISTACK_COMMONS_RUNTIME)
fi
if test "$with_external_scirenderer" = yes; then
# scirenderer
AC_JAVA_CHECK_JAR([scirenderer],[org.scilab.forge.scirenderer.PackageInfo],[Scilab Renderer],[],[VERSION],[1.1.0])
SCIRENDERER=$PACKAGE_JAR_FILE
SCIRENDERER_CP=$PACKAGE_JAR_FILE
else
echo "Use external version of scirenderer"
# Use the scirenderer in Scilab sources
SCIRENDERER="\${modules.dir}/scirenderer/\${build.jar.dir}/scirenderer.jar"
SCIRENDERER_CP="\$SCILAB/modules/scirenderer/jar/scirenderer.jar"
fi
AC_SUBST(SCIRENDERER)
AC_SUBST(SCIRENDERER_CP)
# Docking system
AC_JAVA_CHECK_JAR([flexdock],[org.flexdock.util.Utilities],[Scilab Gui],[],[VERSION],[1.2.5])
FLEXDOCK=$PACKAGE_JAR_FILE
AC_SUBST(FLEXDOCK)
# Swing look&feel implementations
AC_JAVA_CHECK_JAR([looks],[com.jgoodies.looks.common.MenuItemRenderer],[Scilab Gui - Look and feel],"yes")
LOOKS=$PACKAGE_JAR_FILE
# Named differently under ArchLinux or Fedora
if test -z "$LOOKS"; then
AC_JAVA_CHECK_JAR([jgoodies-looks],[com.jgoodies.looks.common.MenuItemRenderer],[Scilab Gui - Look and feel])
LOOKS=$PACKAGE_JAR_FILE
fi
AC_SUBST(LOOKS)
# Skin Look and Feel
AC_JAVA_CHECK_JAR([skinlf],[com.l2fprod.util.AccessUtils],[Scilab Gui - Skin Look and Feel])
SKINLF=$PACKAGE_JAR_FILE
AC_SUBST(SKINLF)
# Javax Annotation (Build dependency)
#AC_JAVA_CHECK_JAR([javax.annotation-api],[javax.annotation.Generated],[Scilab Graphics - CSS Validation])
#JAVAX_ANNOTATION=$PACKAGE_JAR_FILE
#AC_SUBST(JAVAX_ANNOTATION)
# Jakarta Activation API (Build dependency)
#AC_JAVA_CHECK_JAR([jakarta.activation-api],[jakarta.activation.spi.MimeTypeRegistryProvider],[Scilab Help - MimeTypes for image conversion])
#JAKARTA_ACTIVATION_API=$PACKAGE_JAR_FILE
#AC_SUBST(JAKARTA_ACTIVATION_API)
# JOGL 2
AC_JAVA_CHECK_JAR([jogl],[com.jogamp.opengl.GLAutoDrawable],[Scilab 3D rendering], [], [], 2.5)
JOGL2=$PACKAGE_JAR_FILE
AC_SUBST(JOGL2)
if test "$MACOSX" = 1; then
echo "Check of the presence of libjogl.jnilib and libjogl_awt.jnilib disabled under Mac OS X"
else
LDFLAGS_save=$LDFLAGS
# Provide known paths where distribs/OS can store JNI libs
LDFLAGS="$LDFLAGS -L/usr/lib/jni -L/usr/lib64/jni" # Debian
LDFLAGS="$LDFLAGS -L/usr/lib/java -L/usr/lib64/java" # jpackage.org
LDFLAGS="$LDFLAGS -L/usr/lib/jogl2 -L/usr/lib64/jogl2" # RedHat
LDFLAGS="$LDFLAGS -L$SCI_SRCDIR/thirdparty -L$SCI_SRCDIR/lib/thirdparty -L$SCI_SRCDIR/bin" # Scilab thirdparties
AC_CHECK_LIB([jogl_desktop], [glTexParameterf], [JOGL2_LIBS="-ljogl_desktop"],[AC_MSG_WARN([Could not link against -ljogl_desktop. Will try against -ljogl_desktop -lGL])])
if test -z "$JOGL2_LIBS"; then # The previous test failed add more options to the LDFLAGS
# the space after "jogl" in the following line is on
# purpose to disable the cache
AC_CHECK_LIB([jogl_desktop ], [glTexParameterf],
[JOGL2_LIBS="-ljogl_desktop -lGL"],
[AC_MSG_ERROR(["libjogl: Library
missing (Cannot find symbol glTexParameterf). Check if libjogl - C/Java (JNI)
interface for JOGL2 - or libGL (OpenGL library) are installed and if the version is correct. Note that you might have to update etc/librarypath.xml to provide the actual path to the JNI libraries."])],
[-lGL])
fi
LDFLAGS=$LDFLAGS_save
fi
# JoGL Native <=> Java connector
AC_JAVA_CHECK_JAR([gluegen],[com.jogamp.common.os.Platform],[Scilab 3D rendering])
GLUEGEN2_RT=$PACKAGE_JAR_FILE
AC_SUBST(GLUEGEN2_RT)
if test "$MACOSX" = 1; then
echo "Check of the presence of libgluegen-rt.jnilib disabled under Mac OS X"
else
LDFLAGS_save=$LDFLAGS
# Provide known paths where distribs/OS can store JNI libs
LDFLAGS="$LDFLAGS -L/usr/lib/jni -L/usr/lib64/jni" # Debian
LDFLAGS="$LDFLAGS -L/usr/lib/java -L/usr/lib64/java" # jpackage.org
LDFLAGS="$LDFLAGS -L/usr/lib/gluegen2 -L/usr/lib64/gluegen2" # RedHat
LDFLAGS="$LDFLAGS -L$SCI_SRCDIR/thirdparty -L$SCI_SRCDIR/lib/thirdparty -L$SCI_SRCDIR/bin" # Scilab thirdparties
symbol="Java_jogamp_common_jvm_JVMUtil_initialize"
AC_CHECK_LIB([gluegen2_rt], [$symbol], [GLUEGEN2_RT_LIBS="-lgluegen2_rt"],
[AC_MSG_ERROR([libgluegen2_rt: Library missing (Cannot find symbol $symbol). Check if libgluegen_rt - C/Java (JNI) interface for GLUEGEN2 - is installed and if the version is correct. Note that you might have to update etc/librarypath.xml to provide the actual path to the JNI libraries.])],
[-ldl])
LDFLAGS=$LDFLAGS_save
fi
# Jhall
AC_JAVA_CHECK_JAR([jhall],[javax.help.JHelp],[Scilab Help Browser],"yes")
# Named differently under Mandriva or Fedora
if test -z "$PACKAGE_JAR_FILE"; then
AC_JAVA_CHECK_JAR([javahelp2],[javax.help.JHelp],[Scilab Help Browser])
fi
JHALL=$PACKAGE_JAR_FILE
AC_SUBST(JHALL)
# Lucene Apache - core
AC_JAVA_CHECK_JAR([lucene-core],[org.apache.lucene.LucenePackage],[Lucene])
LUCENE=$PACKAGE_JAR_FILE
AC_SUBST(LUCENE)
# Lucene Apache - analyzers-common
AC_JAVA_CHECK_JAR([lucene-analyzers-common],[org.apache.lucene.analysis.standard.StandardAnalyzer],[Lucene StandardAnalyzer])
LUCENE_ANALYZER=$PACKAGE_JAR_FILE
AC_SUBST(LUCENE_ANALYZER)
# Lucene Apache - lucene-queryparser
AC_JAVA_CHECK_JAR([lucene-queryparser],[org.apache.lucene.queryparser.classic.QueryParser],[Lucene QueryParser])
LUCENE_PARSER=$PACKAGE_JAR_FILE
AC_SUBST(LUCENE_PARSER)
# Console API
AC_JAVA_CHECK_JAR([jrosetta-API],[com.artenum.rosetta.interfaces.core.ConsoleConfiguration],[JRosetta : Console API Artenum / Scilab],"yes")
if test -z "$PACKAGE_JAR_FILE"; then
AC_JAVA_CHECK_JAR([jrosetta-api],[com.artenum.rosetta.interfaces.core.ConsoleConfiguration],[JRosetta : Console API Artenum / Scilab])
fi
JROSETTA_API=$PACKAGE_JAR_FILE
AC_SUBST(JROSETTA_API)
# Console Core
AC_JAVA_CHECK_JAR([jrosetta-engine],[com.artenum.rosetta.util.ConfigurationBuilder],[JRosetta : Console Core Artenum / Scilab],[],[getVersion],[1.0.4])
JROSETTA_ENGINE=$PACKAGE_JAR_FILE
AC_SUBST(JROSETTA_ENGINE)
# MathML rendering solution
# Used in both graphic & help
AC_JAVA_CHECK_JAR([jeuclid-core],[net.sourceforge.jeuclid.LayoutContext],[MathML rendering solution (at least version 3.1.X)])
JEUCLID_CORE=$PACKAGE_JAR_FILE
AC_SUBST(JEUCLID_CORE)
# JavaFX base
# Used in native file chooser
AC_JAVA_CHECK_JAR([javafx.base],[javafx.collections.ObservableList],[JavaFX base])
JAVAFX_BASE=$PACKAGE_JAR_FILE
AC_SUBST(JAVAFX_BASE)
# JavaFX Swing
# Used in native file chooser
AC_JAVA_CHECK_JAR([javafx.swing],[javafx.embed.swing.JFXPanel],[JavaFX Swing])
JAVAFX_SWING=$PACKAGE_JAR_FILE
AC_SUBST(JAVAFX_SWING)
# JavaFX graphics
# Used in native file chooser
AC_JAVA_CHECK_JAR([javafx.graphics],[javafx.stage.Stage],[JavaFX graphics])
JAVAFX_GRAPHICS=$PACKAGE_JAR_FILE
AC_SUBST(JAVAFX_GRAPHICS)
################ Mandatory for graphic_export features #####
# XML to PDF/other Translator
AC_JAVA_CHECK_JAR([fop],[org.apache.fop.pdf.PDFInfo],[XML to PDF Translator (fop)])
FOP=$PACKAGE_JAR_FILE
AC_SUBST(FOP)
AC_ARG_WITH(emf, [AS_HELP_STRING([--without-emf],
[disable support for EMF (Windows Metafile) export])])
if test "x$with_emf" != xno; then
# Freehep Graphics2D
AC_JAVA_CHECK_JAR([freehep-graphics2d],[org.freehep.graphics2d.VectorGraphics],[Freehep Graphics2D])
FREEHEP_GRAPHICS2D=$PACKAGE_JAR_FILE
AC_SUBST(FREEHEP_GRAPHICS2D)
# Freehep GraphicsIO
AC_JAVA_CHECK_JAR([freehep-graphicsio],[org.freehep.graphicsio.VectorGraphicsIO],[Freehep GraphicsIO])
FREEHEP_GRAPHICSIO=$PACKAGE_JAR_FILE
AC_SUBST(FREEHEP_GRAPHICSIO)
# Freehep GraphicsIO EMF
AC_JAVA_CHECK_JAR([freehep-graphicsio-emf],[org.freehep.graphicsio.emf.EMFGraphics2D],[Freehep GraphicsIO EMF])
FREEHEP_GRAPHICSIO_EMF=$PACKAGE_JAR_FILE
AC_SUBST(FREEHEP_GRAPHICSIO_EMF)
# Freehep IO
AC_JAVA_CHECK_JAR([freehep-io],[org.freehep.util.io.XMLSequence],[Freehep IO])
FREEHEP_IO=$PACKAGE_JAR_FILE
AC_SUBST(FREEHEP_IO)
# Freehep Util
AC_JAVA_CHECK_JAR([freehep-util],[org.freehep.util.StringUtilities],[Freehep Util])
FREEHEP_UTIL=$PACKAGE_JAR_FILE
AC_SUBST(FREEHEP_UTIL)
fi
# xml.apache.org SVG Library (under mandriva for example)
AC_JAVA_CHECK_JAR([batik-all],[org.apache.batik.Version],
[Apache SVG Library],"yes",[getVersion],[1.8])
BATIK=$PACKAGE_JAR_FILE
if test -z "$BATIK"; then
# Other other distribs
AC_JAVA_CHECK_JAR([batik],[org.apache.batik.Version],
[Apache SVG Library],[],[getVersion],[1.8])
BATIK=$PACKAGE_JAR_FILE
fi
AC_SUBST(BATIK)
# Commons I/O library
AC_JAVA_CHECK_JAR([commons-io],[org.apache.commons.io.output.CountingOutputStream],[Commons I/O library])
COMMONS_IO=$PACKAGE_JAR_FILE
AC_SUBST(COMMONS_IO)
# XML graphics common
AC_JAVA_CHECK_JAR([xmlgraphics-commons],[org.apache.xmlgraphics.util.Service],[Commons graphics library])
XMLGRAPHICS_COMMONS=$PACKAGE_JAR_FILE
AC_SUBST(XMLGRAPHICS_COMMONS)
# Avalon Framework (PDF)
AC_JAVA_CHECK_JAR([avalon-framework],[org.apache.avalon.framework.configuration.ConfigurationException],[Common framework for Java server application])
AVALON_FRAMEWORK=$PACKAGE_JAR_FILE
AC_SUBST(AVALON_FRAMEWORK)
# XML API EXT (conversion of a SVG => PNG)
AC_JAVA_CHECK_JAR([xml-apis-ext],[org.w3c.dom.svg.SVGDocument],[XML Commons external code],"yes")
XML_APIS_EXT=$PACKAGE_JAR_FILE
if test -z "$XML_APIS_EXT"; then
# Other other distribs (Ex: Fedora/Redhat)
AC_JAVA_CHECK_JAR([xml-commons-apis-ext],[org.w3c.dom.svg.SVGDocument],[XML Commons external code])
XML_APIS_EXT=$PACKAGE_JAR_FILE
fi
AC_SUBST(XML_APIS_EXT)
################ END Mandatory for graphic_export features #####
# Logging (flexdock dep)
AC_JAVA_CHECK_JAR([commons-logging],[org.apache.commons.logging.LogFactory],[Apache logging])
COMMONS_LOGGING=$PACKAGE_JAR_FILE
AC_SUBST(COMMONS_LOGGING)
# JLaTeXMath
AC_JAVA_CHECK_JAR([jlatexmath],[org.scilab.forge.jlatexmath.TeXFormula],[LaTex Rendering],[],[VERSION],[1.0.3])
JLATEXMATH=$PACKAGE_JAR_FILE
AC_SUBST(JLATEXMATH)
# JLaTeXMath FOP
AC_JAVA_CHECK_JAR([jlatexmath-fop],[org.scilab.forge.jlatexmath.fop.JLaTeXMathObj],[LaTex Rendering - FOP plugin])
JLATEXMATH_FOP=$PACKAGE_JAR_FILE
AC_SUBST(JLATEXMATH_FOP)
# Saxon 9 HE
AC_JAVA_CHECK_JAR([Saxon-HE],[net.sf.saxon.TransformerFactoryImpl],[Saxon processor for XSLT, XQuery, and XML Schema])
SAXON=$PACKAGE_JAR_FILE
AC_SUBST(SAXON)
AC_DEFINE([WITH_GUI],[],[With the JAVA stuff (GUI, Console, JOGL...)])
fi
# Checkstyle (code checking)
AC_JAVA_CHECK_JAR([checkstyle],[com.puppycrawl.tools.checkstyle.CheckStyleTask],[Checkstyle - code checking],"yes")
CHECKSTYLE=$PACKAGE_JAR_FILE
AC_SUBST(CHECKSTYLE)
# Commons beanutils (dependency of checkstyle)
AC_JAVA_CHECK_JAR([commons-beanutils],[org.apache.commons.beanutils.Converter],[Bean utility],"yes")
COMMONS_BEANUTILS=$PACKAGE_JAR_FILE
AC_SUBST(COMMONS_BEANUTILS)
# antlr (dependency of checkstyle)
AC_JAVA_CHECK_JAR([antlr],[antlr.TokenStreamException],[language tool for constructing recognizers],"yes")
ANTLR=$PACKAGE_JAR_FILE
AC_SUBST(ANTLR)
# Junit 4 (java unitary test)
AC_JAVA_CHECK_JAR([junit4],[org.junit.Assert],[Junit4 - Unit tests],"yes")
if test -z "$PACKAGE_JAR_FILE"; then
AC_JAVA_CHECK_JAR([junit],[org.junit.Assert],[Junit4 -
Unit tests],"yes")
fi
JUNIT4=$PACKAGE_JAR_FILE
AC_SUBST(JUNIT4)
# hamcrest (junit4 dependency)
AC_JAVA_CHECK_JAR([hamcrest-all],[org.hamcrest.core.IsNull],[Hamcrest- library matchers],"yes")
if test -z "$PACKAGE_JAR_FILE"; then
AC_JAVA_CHECK_JAR([hamcrest/all],[org.hamcrest.core.IsNull],[Hamcrest- library matchers],"yes")
fi
HAMCREST=$PACKAGE_JAR_FILE
AC_SUBST(HAMCREST)
# Cobertura (java code coverage)
AC_JAVA_CHECK_JAR([cobertura],[net.sourceforge.cobertura.merge.Main],[cobertura - Java code coverage],"yes")
COBERTURA=$PACKAGE_JAR_FILE
AC_SUBST(COBERTURA)
# ASM (a dependency of Cobertura)
AC_JAVA_CHECK_JAR([asm3],[org.objectweb.asm.Type],[Java bytecode manipulation (dep of cobertura)],"yes")
if test -z "$ASM3"; then
AC_JAVA_CHECK_JAR([asm],[org.objectweb.asm.Type],[Java bytecode manipulation (dep of cobertura)],"yes")
fi
ASM3=$PACKAGE_JAR_FILE
AC_SUBST(ASM3)
AC_JAVA_CHECK_JAR([eclipse-jdt-core],[org.eclipse.jdt.core.compiler.batch.BatchCompiler],[Eclipse Java compiler],"yes")
ECJ=$PACKAGE_JAR_FILE
if test -z "$ECJ"; then
ECJ='$SCILAB/thirdparty/ecj-3.34.0.jar'
fi
AC_SUBST(ECJ)
else
AC_MSG_WARN([Sun javac not found: I will not build the java interface])
if test "$ac_java_jvm_name" != ""; then
AC_MSG_WARN([We do not support $ac_java_jvm_name yet])
fi
fi
AC_SUBST(JAVA_JNI_INCLUDE)
AC_SUBST(JAVA_JNI_LIBS)
AC_SUBST(JAVA_HOME)
if test "$enable_debug_java" = yes; then
JAVAC_DEBUG="on"
else
JAVAC_DEBUG="off"
fi
AC_SUBST(JAVAC_DEBUG)
if test "$enable_build_swig" != no -a "$enable_build_swig" != ""; then
SWIG_PROG()
SWIG_ENABLE_JAVA()
SWIG_ENABLE_SCILAB()
AC_SUBST(SWIG_BIN)
AC_SUBST(SWIG_JAVA)
AC_SUBST(SWIG_SCILAB)
fi
# Giws is the equivalent of Swig developed by the Scilab team
# in order to provide a wrapper to Java from C/C++
if test "$enable_build_giws" != no -a "$enable_build_giws" != ""; then
AC_GIWS([1.3.0])
fi
fi # "$with_jdk" != no;
fi
JAVA_ENABLE=yes
if test -z "$JAVAC"; then
JAVA_ENABLE=no
fi
AC_SUBST(JAVA_ENABLE)
# Xcos is not checked here because gui=no disables it
AM_CONDITIONAL(NEED_JAVA, [test "$with_jdk" != no -a \( "$with_javasci" != no -o "$with_gui" != no -o "$enable_build_help" != no \)])
AM_CONDITIONAL(GUI, [test "$with_jdk" != no -a "$with_gui" != no])
AM_CONDITIONAL(JAVASCI, [test "$with_jdk" != no -a "$with_javasci" != no])
AM_CONDITIONAL(SWIG, [test "$with_jdk" != no -a "$enable_build_swig" != no -a "$enable_build_swig" != ""])
AM_CONDITIONAL(GIWS, [test "$with_jdk" != no -a "$enable_build_giws" != no -a "$enable_build_giws" != ""])
##############################################################
## GUI module
##############################################################
GUI_ENABLE=no
if test "$JAVA_ENABLE" != no; then
GUI_ENABLE=yes
fi
if test "$with_gui" != no; then
GUI_ENABLE=yes
fi
AC_SUBST(GUI_ENABLE)
##############################################################
## test for functions in standard C library and C math library
##############################################################
# Provided by unistd.h
AC_CHECK_FUNCS([dup2] [getcwd] [getpagesize] [getpass])
AC_CHECK_FUNCS([rmdir])
# Provided by <regex.h>
AC_CHECK_FUNCS([regcomp])
# Provided by stdlib.h
AC_CHECK_FUNCS([atexit] [putenv] [setenv])
# Provided by String.h
AC_CHECK_FUNCS([bzero] [memmove] [memset] [strcasecmp] [strerror] [strchr] [strdup] [strpbrk] [strrchr] [strstr] [strtol])
# Provided by select.h
AC_CHECK_FUNCS([select])
# Provided by pwd.h
AC_CHECK_FUNCS([endpwent])
# Provided by netdb.h
AC_CHECK_FUNCS([gethostbyaddr] [gethostbyname] [gethostname])
# Provided by time.h
AC_CHECK_FUNCS([gettimeofday] [nanosleep])
# Provided by ctype.h
AC_CHECK_FUNCS([isascii])
# Provided by wctype.h
AC_CHECK_FUNCS([iswprint])
# Provided by types.h
AC_CHECK_FUNCS([mkdir])
# Provided by mman.h
AC_CHECK_FUNCS([munmap])
# Provided by signal.h
AC_CHECK_FUNCS([strsignal])
# Check of the libm (lib math). Macro provided by libtool.
save_LDFLAGS="$LDFLAGS"
LT_LIB_M()
# Provided by math.h
LDFLAGS="$LDFLAGS $LIBM"
AC_CHECK_FUNCS([pow] [sqrt] [finite] [floor] [exp10] [erf] [erfc] [isnan])
### If isinf exists or not (used to not be the case under Solaris)
### See bug #4164
AC_DEFINE([HAVE_ISINF],[1],[Have isinf function or macro equivalent])
AC_CHECK_FUNC([isinf],,[
AC_DEFINE([isinf(x)],[(!finite(x) && x==x)],[Provide a macro to do isinf])
])
LIBS="$LIBS $LIBM"
LDFLAGS="$save_LDFLAGS"
# Provided by regex.h
AC_CHECK_FUNCS([re_comp])
# Provided by socket.h
AC_CHECK_FUNCS([socket])
# Provided by utsname.h
AC_CHECK_FUNCS([uname])
# Provided by wtloop.c
AC_CHECK_FUNCS([setlocale])
# Function memcmp used in modules/fileio/src/c/xls.c
AC_FUNC_MEMCMP
# function stat used in modules/core/src/c/link_std.c
AC_FUNC_STAT
# function strtod used in modules/core/src/c/getval.c
AC_FUNC_STRTOD
########################
## test for header files
########################
AC_CHECK_HEADERS([limits.h values.h])
AC_CHECK_HEADERS([fcntl.h float.h libintl.h locale.h malloc.h netdb.h netinet/in.h nlist.h sgtty.h stddef.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/timeb.h sys/utsname.h syslog.h term.h termcap.h termio.h termios.h wchar.h wctype.h time.h])
# check header dirent
AC_HEADER_DIRENT
# check if the specific header is available or not | used in modules/core/src/c/link_SYSV.c
AC_HEADER_SYS_WAIT
#######################
## Test for structures ##
#######################
AC_CHECK_MEMBERS([struct stat.st_blksize])
AC_CHECK_MEMBERS([struct stat.st_rdev])
#######################
## MISC Test
#######################
# gettext. See http://www.gnu.org/software/hello/manual/gettext/AM_005fGNU_005fGETTEXT.html
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.16])
# function closedir used in modules/metanet/src/c/files.c
AC_FUNC_CLOSEDIR_VOID
# struct tm used in modules/core/src/c/history.c
AC_STRUCT_TM
# st_blocks in the struct in modules/io/sci_gateway/c/intfilestat.c
AC_STRUCT_ST_BLOCKS
##################
## termcap library
##################
# some systems may have a system curses implementation as well as ncurses
# installed. We need to be consistent in making sure we get the correct
# library to go with the correct header and also provide a way for the user
# to have some control over which is picked when both are available.
#
# For now, just check for -lcurses and then -lncurses. The user control
# may need to be revisited
# Various observations:
#
# ncurses
# - installs ncurses.h and possibly curses.h as a link to ncurses.h
# - installs -lncurses.
# - need to include term.h for tgetent() but tgetent() is in -lncurses.a
#
# curses as found in NetBSD-4 and NetBSD-5
# - installs curses.h
# - need to include termcap.h and link with -ltermcap for tgetent()
#
if $WITH_DEVTOOLS; then
# ncurses includes are in a subdir
NCURSES_CFLAGS="-I$DEVTOOLS_INCDIR -I$DEVTOOLS_INCDIR/ncurses"
NCURSES_LIBS="-L$DEVTOOLS_LIBDIR/ -lscincurses"
saved_LIBS="$LIBS"
LIBS="$LIBS $NCURSES_LIBS"
AC_CHECK_LIB([scincurses],[tgetent])
LIBS="$saved_LIBS"
ac_cv_lib_ncurses_tgetent=$ac_cv_lib_scincurses_tgetent
else
NCURSES_CFLAGS=""
AC_CHECK_LIB([curses],[tgetent],[NCURSES_LIBS="-lcurses"])
if test "x$ac_cv_lib_curses_tgetent" = "xno" ; then
AC_CHECK_LIB([ncurses],[tgetent],[NCURSES_LIBS="-lncurses"])
fi
# make sure we have what we need for tgetent
if test "x$ac_cv_lib_ncurses_tgetent" = "xno" ; then
AC_CHECK_LIB([termcap],[tgetent])
fi
fi
AC_CHECK_HEADERS([ncurses.h curses.h])
if test "x$ac_cv_lib_curses_tgetent" = "xyes" -o "x$ac_cv_lib_ncurses_tgetent" = "xyes" -o "x$ac_cv_lib_termcap_tgetent" = "xyes" ; then
AC_DEFINE([HAVE_TERMCAP],[],[Have Term Cap])
else
AC_MSG_ERROR([No termcap library detected. Please install ncurses dev library (or termcap library)])
fi
AC_SUBST(NCURSES_CFLAGS)
AC_SUBST(NCURSES_LIBS)
##################
## other libraries
##################
AC_CHECK_LIB(dl, dlopen)
AC_SEARCH_LIBS([pthread_join],[pthread])
#################
## FFTW
#################
AC_ARG_WITH(fftw,
AS_HELP_STRING([--without-fftw],[Disable the interface to the FFTW 3 library]))
FFTW_ENABLE=no
if test "$with_fftw" != no; then
AC_FFTW()
FFTW_ENABLE=yes
fi
AC_SUBST(FFTW_ENABLE)
AM_CONDITIONAL(FFTW, test "$with_fftw" != no)
#################
## EIGEN
#################
AC_EIGEN()
#################
## MPI
#################
# Disable by default the build of MPI:
# * It is hard to package
# * People are administrating cluster know about rebuilding packages
# * They use their own MPI library
AC_ARG_WITH(mpi,
AS_HELP_STRING([--with-mpi],[compile with MPI library]))
MPI_ENABLE=no
if test "$with_mpi" == yes; then
AC_OPENMPI()
# We will have to detect other implementation of OpenMPI
MPI_ENABLE=yes
fi
AC_SUBST(MPI_ENABLE)
AM_CONDITIONAL(MPI, test "$with_mpi" == yes)
#################
## OpenMP
#################
AC_ARG_WITH(openmp,
AS_HELP_STRING([--without-openmp],[Disable the usage of OpenMP (parallelization of some algoritms)]))
OPENMP_ENABLE=no
if test "$with_openmp" != no; then
# AC_OPENMP
OPENMP_CFLAGS="-fopenmp"
OPENMP_CXXFLAGS="-fopenmp"
OPENMP_LIBS="-lgomp"
AC_CHECK_HEADERS([omp.h], [],
[AC_MSG_ERROR([Could not find omp.h])])
OPENMP_ENABLE=yes
fi
AC_SUBST(OPENMP_ENABLE)
AC_SUBST(OPENMP_CFLAGS)
AC_SUBST(OPENMP_CXXFLAGS)
AC_SUBST(OPENMP_LIBS)
AM_CONDITIONAL(OPENMP, test "$with_openmp" != no)
#######################
## Test for libxml
#######################
PKG_CHECK_MODULES([XML], [libxml-2.0])
AC_SUBST(XML_CFLAGS)
AC_SUBST(XML_LIBS)
#######################
## Test for gettext
#######################
ALL_LINGUAS="en_US fr_FR zh_CN zh_TW ru_RU ca_ES de_DE es_ES pt_BR ja_JP it_IT uk_UA pl_PL cs_CZ"
ALL_LINGUAS_DOC="en_US fr_FR pt_BR ja_JP"
AC_ARG_ENABLE(build-localization,
AS_HELP_STRING([--disable-build-localization],[Disable the localization build])
)
BUILD_LOCALIZATION_ENABLE=no
if test "$enable_build_localization" != no; then
AC_SUBST(ALL_LINGUAS)
AC_SUBST(ALL_LINGUAS_DOC)
AC_CHECK_FUNCS([bind_textdomain_codeset])
AC_PATH_PROG(MSGCAT, msgcat, no)
# AC_PATH_PROG(MSGFMT, msgfmt, no)
# AC_PATH_PROG(XGETTEXT, xgettext, no)
if test x$MSGFMT = xno; then
AC_MSG_ERROR([The msgfmt command is required to build Scilab. If it is installed on your system, ensure that it is in your path. If it is not, install GNU gettext to continue or use the option --disable-build-localization ])
fi
if test x$MSGCAT = xno; then
AC_MSG_ERROR([The msgcat command is required to build Scilab. If it is installed on your system, ensure that it is in your path. If it is not, install GNU gettext to continue or use the option --disable-build-localization ])
fi
BUILD_LOCALIZATION_ENABLE=yes
fi
AM_CONDITIONAL(GENERATE_LOCALIZATION_FILES, test "$BUILD_LOCALIZATION_ENABLE" = yes)
#######################
## Test for blas/Atlas and lapack
#######################
AC_MSG_CHECKING([if BLAS, ATLAS or MKL is available])
echo ""
ACX_BLAS(
[AC_MSG_RESULT([$BLAS_TYPE found])]
,
AC_MSG_ERROR([Impossible to find a BLAS compatible library (see BLAS or ATLAS).])
)
AC_MSG_CHECKING([if LAPACK is available])
echo ""
ACX_LAPACK(
[AC_MSG_RESULT([$LAPACK_TYPE found])],
AC_MSG_ERROR([Impossible to find the LAPACK library.])
)
AC_ARG_WITH(arpack-ng,
AS_HELP_STRING([--without-arpack-ng],[Disable the interface to ARPACK-NG]))
ARPACK_NG=no
if test "$with_arpack_ng" != no; then
ARPACK_NG=yes
AC_MSG_CHECKING([if ARPACK-NG is available])
echo ""
ACX_ARPACK(
[AC_MSG_RESULT([ARPACK-NG library found])],
AC_MSG_ERROR([Impossible to find the ARPACK library. Please note that arpack was bundled with version prior to 5.4.0 and Scilab requires arpack-ng ( https://github.com/opencollab/arpack-ng/ ).])
)
CHECK_ARPACK_OK(
[AC_MSG_RESULT([Working ARPACK-NG library found (probably ARPACK-NG or a patched version of ARPACK)])],
[AC_MSG_ERROR([ARPACK library found, but seems not to work properly. Please make sure you are using arpack-ng])
])
else
AC_MSG_CHECKING([Skip ARPACK-NG detection])
fi
AM_CONDITIONAL(ARPACK_NG, test "$ARPACK_NG" != "no")
#################
## UMFPACK
#################
AC_ARG_WITH(umfpack,
AS_HELP_STRING([--without-umfpack],[Disable the interface to the UMFPACK library]))
UMFPACK_ENABLE=no
if test "$with_umfpack" != no; then
AC_UMFPACK([$BLAS_LIBS])
UMFPACK_ENABLE=yes
fi
AC_SUBST(UMFPACK_ENABLE)
AM_CONDITIONAL(UMFPACK, test "$with_umfpack" != no)
#################
## KLU
#################
AC_ARG_WITH(klu,
AS_HELP_STRING([--without-klu],[Disable the interface to the KLU library]))
KLU_ENABLE=no
if test "$with_klu" != no; then
AC_KLU([$BLAS_LIBS])
KLU_ENABLE=yes
fi
AC_SUBST(KLU_ENABLE)
AM_CONDITIONAL(KLU, test "$with_klu" != no)
#######################
## Test for PCRE
#######################
if $WITH_DEVTOOLS; then # Scilab thirdparties
PCRE_CFLAGS="-I$DEVTOOLS_INCDIR"
PCRE_LIBS="-L$DEVTOOLS_LIBDIR -lpcre -lpcreposix"
else
AC_PCRE()
fi
#######################
## Test for CURL
#######################
AC_CURL()
#################
## Tcl/Tk library
#################
WITH_TKSCI=no
if test "$with_tk" != no; then
if test "$MACOSX" = "1"; then
AC_MSG_ERROR([Due to technical constraints, Tcl/Tk must be disabled under Mac OS X (--without-tk)])
fi
# check user arguments
USER_TCL_LIB_PATH=""
USER_TCL_INC_PATH=""
AC_ARG_WITH(tcl-library,
AS_HELP_STRING([--with-tcl-library=DIR],[Set the path to the TCL library]),
[ USER_TCL_LIB_PATH=$withval
])
AC_ARG_WITH(tcl-include,
AS_HELP_STRING([--with-tcl-include=DIR],[Set the path to the TCL headers]),
[ USER_TCL_INC_PATH=$withval
])
USER_TK_LIB_PATH=$USER_TCL_LIB_PATH
USER_TK_INC_PATH=$USER_TCL_INC_PATH
AC_ARG_WITH(tk-library,
AS_HELP_STRING([--with-tk-library=DIR],[Set the path to the TK library]),
[ USER_TK_LIB_PATH=$withval
])
AC_ARG_WITH(tk-include,
AS_HELP_STRING([--with-tk-include=DIR],[Set the path to the TK headers]),
[ USER_TK_INC_PATH=$withval
])
###########################
########## X11 checks
###########################
## This check is mandatory since tk needs Xlib headers and libs
AC_PATH_XTRA
##
saved_cflags="$CFLAGS"
saved_ldflags="$LDFLAGS"
saved_cppflags="$CXXFLAGS"
AC_CHECK_LIB([dl], [main], [TCLTK_LIBS=" -ldl"])
AC_CHECK_TCLTK
# set variables
if test "$WITH_TKSCI" = yes; then
AC_DEFINE([WITH_TK], [], [With TK])
else
AC_MSG_ERROR([TCL/TK not found. Use --without-tk or specify the librairies and include paths manually])
fi
AC_SUBST(TCLTK_LIBS)
AC_SUBST(TCL_INC_PATH)
AC_SUBST(TK_INC_PATH)
fi
AC_SUBST(WITH_TKSCI)
AM_CONDITIONAL(TCLTK, test "$WITH_TKSCI" = yes)
#################
## MATIO LIBRARY (MAT File I/O Library)
#################
AC_ARG_WITH(matio,
AS_HELP_STRING([--without-matio],[Disable the interface to Matio (MAT File I/O library)]))
AC_ARG_WITH(matio_include,
AS_HELP_STRING([--with-matio-include=DIR],[Set the path to the MATIO headers]),
[with_matio_include="-I$withval"], [])
AC_ARG_WITH(matio_library,
AS_HELP_STRING([--with-matio-library=DIR],[Set the path to the MATIO libraries]),
[with_matio_library="-L$withval"], [])
MATIO_ENABLE=no
if test "$with_matio" != no; then
if test -n "$with_matio_include" -o -n "$with_matio_library" ; then
MATIO_CFLAGS="$with_matio_include"
MATIO_LIBS="$with_matio_library -lm -lz -lmatio -lhdf5"
else
if $WITH_DEVTOOLS; then # Scilab thirdparties
MATIO_CFLAGS="-I$DEVTOOLS_INCDIR"
MATIO_LIBS="-L$DEVTOOLS_LIBDIR -lm -lz -lmatio -lhdf5"
else
PKG_CHECK_MODULES(MATIO, [matio >= 1.5.0])
fi
fi
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
CFLAGS="$CFLAGS $MATIO_CFLAGS"
LIBS="$LIBS $MATIO_LIBS"
AC_CHECK_HEADERS([matio.h], [],
[AC_MSG_ERROR([Invalid MATIO_CFLAGS returned by pkg-config. Try to define MATIO_CFLAGS.])])
AC_CHECK_LIB([matio], [Mat_Open], [],
[AC_MSG_ERROR([Invalid MATIO_LIBS returned by pkg-config. Try to define MATIO_LIBS.])])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_DEFINE([WITH_MATIO], [], [With the MATIO library])
MATIO_ENABLE=yes
AC_SUBST(MATIO_LIBS)
AC_SUBST(MATIO_CFLAGS)
fi
AC_SUBST(MATIO_ENABLE)
AM_CONDITIONAL(MATIO, test "$with_matio" != no)
##############################################################
# LIBARCHIVE LIBRARY (reading and writing compressed files)) #
##############################################################
AC_LIBARCHIVE()
#############################
## Documentation management #
#############################
HELP_ENABLE=yes
AC_ARG_ENABLE(build-help,
AS_HELP_STRING([--disable-build-help],[Disable the help build])
)
if test "$enable_build_help" == no; then
HELP_ENABLE=no
fi
if test "$JAVA_ENABLE" = no; then
HELP_ENABLE=no
fi
AC_SUBST(HELP_ENABLE)
AM_CONDITIONAL(BUILD_HELP, test $HELP_ENABLE = yes)
## Install XML help files ###
AC_ARG_WITH(install-help-xml,
AS_HELP_STRING([--with-install-help-xml],[make install will install XML files])
)
HELP_INSTALL_ENABLE=no
if test "$with_install_help_xml" != no -a "$with_install_help_xml" != ""; then
HELP_INSTALL_ENABLE=yes
fi
AM_CONDITIONAL(INSTALL_HELP_XML, test "$HELP_INSTALL_ENABLE" != "")
## Doxygen help generation
AC_ARG_ENABLE(build-doxygen,
AS_HELP_STRING([--enable-build-doxygen],[Generate doxygen C/C++ documentation]))
DOXYGEN_ENABLE=yes
if test "$enable_build_doxygen" != no -a "$enable_build_doxygen" != ""; then
AC_DOXYGEN()
else
DOXYGEN_ENABLE=no
fi
AM_CONDITIONAL(DOXYGEN, test $DOXYGEN_ENABLE = yes)
## Valgrind specific code
PKG_CHECK_EXISTS([valgrind], [PKG_CHECK_MODULES([VALGRIND], [valgrind], [AC_DEFINE([VALGRIND_ENABLE], [], [Enable valgrind specific tweaks])])], [])
##############################################################
## Javasci module
##############################################################
JAVASCI_ENABLE=yes
if test "$JAVA_ENABLE" = no -o "$JAVASCI" = no; then
JAVASCI_ENABLE=no
fi
AC_SUBST(JAVASCI_ENABLE)
##############################################################
## Enable test at compilation time
##############################################################
COMPILATION_TESTS=no
if test "$enable_compilation_tests" != no -a "$enable_compilation_tests" != ""; then
COMPILATION_TESTS=yes
fi
if test COMPILATION_TESTS=yes -a "$JUNIT4" == ""; then
AC_MSG_WARN([--enable-compilation-tests deactivated: Could not find Junit4])
COMPILATION_TESTS=no
fi
AM_CONDITIONAL(COMPILATION_TESTS, test "$COMPILATION_TESTS" != "no")
##############################################################
## Enable the global force link
##############################################################
AC_ARG_ENABLE(force-full-link,
AS_HELP_STRING([--enable-force-full-link],[Forces the explicit link between libscilab and some "on-the-fly" loaded libraries. NOT USE IN PRODUCTION.]))
FORCE_FULL_LINK="no"
if test "$enable_force_full_link" == "yes"; then
FORCE_FULL_LINK="yes"
fi
AM_CONDITIONAL(FORCE_LINK, test "$FORCE_FULL_LINK" == "yes")
##############################################################
## demo_tools module
##############################################################
DEMOTOOLS_ENABLE=yes
if test "$GUI_ENABLE" = no; then
DEMOTOOLS_ENABLE=no
fi
AC_SUBST(DEMOTOOLS_ENABLE)
##############################################################
## graphics/renderer/graphic_export module
##############################################################
GRAPHICS_ENABLE=yes
if test "$GUI_ENABLE" = no; then
GRAPHICS_ENABLE=no
fi
AC_SUBST(GRAPHICS_ENABLE)
#########################
## libtool
#########################
LT_PREREQ([2.2.7])
LT_INIT([shared dlopen disable-static])
# Avoid to link all the dep from others libraries (*.la included by LIBADD)
link_all_deplibs=no
# Check to see if building shared libraries
libtool_build_shared_libs=no
if test "$enable_shared" = "yes"; then
libtool_build_shared_libs=yes
fi
# Check to see if building static libraries
libtool_build_static_libs=no
if test "$enable_static" = "yes"; then
libtool_build_static_libs=yes
fi
# AM_CONDITIONAL(ENABLE_STATIC, test "$libtool_build_static_libs" = yes)
# Fake to disable the static build
AM_CONDITIONAL(ENABLE_STATIC, test "$libtool_build_static_libs" = xxxx)
AC_C_CONST()
AC_C_INLINE()
AC_BACKTRACE()
##########
##### Code quality
##########
AC_PATH_PROG(SPLINT, splint, no)
##########
##### Detect ccache and use it by default if available
##########
AC_ARG_ENABLE(ccache,
AS_HELP_STRING([--disable-ccache],[Disable the use of ccache])
)
AC_PATH_PROG(CCACHE, ccache)
if test x"$CCACHE" != x -a "$enable_ccache" != no; then
CC="$CCACHE $CC"
CXX="$CCACHE $CXX"
fi
#######################
###### Creation of the header file (machine.h)
#######################
AC_DEFINE_UNQUOTED([PATH_SEPARATOR], ["$PATH_SEPARATOR"],
[The default path separator character.])
AH_TOP([#ifndef MACHINE_H
#define MACHINE_H
/* This file defines global element configuration of the build host */
])
AH_BOTTOM([
#ifdef DIR_SEPARATOR
#undef DIR_SEPARATOR
#endif
#define DIR_SEPARATOR "/"
#ifdef DIR_SEPARATORW
#undef DIR_SEPARATORW
#endif
#define DIR_SEPARATORW L"/"
#define bsiz 4096
#endif /* MACHINE_H */
])
# Define the standard extension of a dynamic library
AC_DEFINE_UNQUOTED([SHARED_LIB_EXT],["$shrext_cmds"],[Extension of a shared library])
AC_DEFINE_UNQUOTED([SHARED_LIB_EXTW],[L"$shrext_cmds"],[Extension of a shared library ( wide string )])
#########
## Check extra CC / CXX compiler flags to ease runtime behaviors
#########
AC_CHECK_STDCPP_STATIC()
AC_CHECK_ADDRESS_SANTIZER()
AC_CHECK_ANALYZER()
#################
## stop on warning
#################
# Stop to compile scilab when a warning is found ...
# This stuff is at the end of the configure.ac because it causes some
# problem with AC_COMPILE (the -Werror is added to the test)
#
if test "$enable_stop_on_warning" = yes; then
WARNING_CFLAGS="-Werror=implicit-function-declaration -Werror=declaration-after-statement "
WARNING_CXXFLAGS="-Werror=implicit-function-declaration "
fi
# SCI_*FLAGS contains all defaults values detected on configure
SCI_CFLAGS=$(echo \
$CODECOVERAGE_CFLAGS \
$DEBUG_CFLAGS \
$ARCH_CFLAGS \
$COMPILER_CFLAGS \
$SCILIBS_CFLAGS \
$SSE_CFLAGS \
$BACKTRACE_CFLAGS \
$WARNING_CFLAGS )
SCI_CXXFLAGS=$(echo \
$STDCXX_CXXFLAGS \
$CODECOVERAGE_CXXFLAGS \
$DEBUG_CXXFLAGS \
$ARCH_CXXFLAGS \
$COMPILER_CXXFLAGS \
$SCILIBS_CXXFLAGS \
$SSE_CXXFLAGS \
$BACKTRACE_CXXFLAGS \
$WARNING_CXXFLAGS )
SCI_FFLAGS=$(echo \
$CODECOVERAGE_FFLAGS \
$DEBUG_FFLAGS \
$ARCH_FFLAGS \
$COMPILER_FFLAGS \
$SCILIBS_FFLAGS \
$SSE_FFLAGS \
$BACKTRACE_FFLAGS \
$WARNING_FFLAGS )
SCI_LDFLAGS=$(echo \
$CODECOVERAGE_LDFLAGS \
$DEBUG_LDFLAGS \
$ARCH_LDFLAGS \
$COMPILER_LDFLAGS \
$SCILIBS_LDFLAGS \
$SSE_LDFLAGS \
$BACKTRACE_LDFLAGS \
$WARNING_LDFLAGS )
AC_SUBST(SCI_CFLAGS)
AC_SUBST(SCI_CXXFLAGS)
AC_SUBST(SCI_FFLAGS)
AC_SUBST(SCI_LDFLAGS)
AC_CONFIG_FILES([
contrib/Makefile
desktop/images/icons/Makefile
desktop/Makefile
modules/threads/Makefile
modules/ast/Makefile
modules/functions_manager/Makefile
modules/helptools/Makefile
modules/data_structures/Makefile
modules/differential_equations/Makefile
modules/optimization/Makefile
modules/elementary_functions/Makefile
modules/special_functions/Makefile
modules/io/Makefile
modules/completion/Makefile
modules/history_manager/Makefile
modules/jvm/Makefile
modules/commons/Makefile
modules/sound/Makefile
modules/statistics/Makefile
modules/mexlib/Makefile
modules/sparse/Makefile
modules/linear_algebra/Makefile
modules/polynomials/Makefile
modules/signal_processing/Makefile
modules/arnoldi/Makefile
modules/interpolation/Makefile
modules/localization/Makefile
modules/cacsd/Makefile
modules/boolean/Makefile
modules/integer/Makefile
modules/fileio/Makefile
modules/spreadsheet/Makefile
modules/string/Makefile
modules/time/Makefile
modules/graphics/Makefile
modules/graphic_export/Makefile
modules/graphic_objects/Makefile
modules/renderer/Makefile
modules/action_binding/Makefile
modules/gui/Makefile
modules/mpi/Makefile
modules/randlib/Makefile
modules/tclsci/Makefile
modules/windows_tools/Makefile
modules/core/Makefile
modules/prebuildjava/Makefile
modules/api_scilab/Makefile
modules/call_scilab/Makefile
modules/types/Makefile
modules/hdf5/Makefile
modules/fftw/Makefile
modules/umfpack/Makefile
modules/scicos/Makefile
modules/scicos_blocks/Makefile
modules/functions/Makefile
modules/dynamic_link/Makefile
modules/overloading/Makefile
modules/javasci/Makefile
modules/m2sci/Makefile
modules/development_tools/Makefile
modules/output_stream/Makefile
modules/console/Makefile
modules/demo_tools/Makefile
modules/parameters/Makefile
modules/matio/Makefile
modules/atoms/Makefile
modules/xcos/Makefile
modules/scinotes/Makefile
modules/ui_data/Makefile
modules/graph/Makefile
modules/parallel/Makefile
modules/modules_manager/Makefile
modules/history_browser/Makefile
modules/preferences/Makefile
modules/xml/Makefile
modules/external_objects/Makefile
modules/external_objects_java/Makefile
modules/slint/Makefile
modules/coverage/Makefile
modules/webtools/Makefile
modules/Makefile
Makefile
scilab.pc
build.incl.xml
etc/modules.xml
etc/classpath.xml
etc/Info.plist
etc/logging.properties
scilab.properties
scilab-lib.properties
scilab-lib-doc.properties
modules/helptools/etc/SciDocConf.xml
modules/core/includes/version.h
modules/atoms/etc/repositories
modules/atoms/tests/unit_tests/repositories.orig
])
# This script is used by Xcos in order to regenerate the function/block list
AC_CONFIG_COMMANDS_POST([chmod +x $SCI_SRCDIR_FULL/modules/scicos_blocks/src/scripts/GenBlocks.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/scicompile.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/compilerDetection.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/configure])
AC_OUTPUT
# To distribution packager, you can uncomment this stuff is you want to
# disable the rpath issue
# However, you will have to set all the LD_LIBRARY_PATH to .libs/ directory
# since scilab is compiling macros and help into the source tree (ie before
# the "make install")
# You should consider using chrpath:
# http://directory.fsf.org/project/chrpath/
# to remove it before the make install
#case ${host} in
# *-pc-linux-gnu)
# AC_MSG_RESULT([Fixing libtool for -rpath problems.])
# sed < libtool > libtool-2 \
# 's/^hardcode_libdir_flag_spec.*$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
# mv libtool-2 libtool
# chmod 755 libtool
# ;;
#esac
#
echo ""
echo "Scilab is configured as follows. Please verify that this configuration"
echo "matches your expectations."
echo ""
echo "Host system type : $host"
echo ""
echo " Option Value"
echo "-------------------------------------------------------------------------"
echo "Shared libraries....... --enable-shared=$libtool_build_shared_libs"
echo "Static libraries....... --enable-static=$libtool_build_static_libs"
echo "GNU ld................. --with-gnu-ld=$with_gnu_ld"
echo "Enable debug .......... --enable-debug=$enable_debug"
echo "Enable debug C......... --enable-debug-C=$enable_debug_C"
echo "Enable debug C++....... --enable-debug-CXX=$enable_debug_CXX"
echo "Enable debug Java...... --enable-debug-java=$enable_debug_java"
echo "Enable debug Fortran... --enable-debug-fortran=$enable_debug_fortran"
echo "Enable stop on warning. --enable-stop-on-warning=$enable_stop_on_warning"
echo ""
echo "Compiler Configuration:"
echo " Intel (--with-intelcompilers) .... = $with_intelcompilers"
echo " GNU gcc (--with-gcc) ............. = $with_gcc"
echo " GNU Fortran 95 (--with-gfortran) . = $with_gfortran"
echo ""
echo "Options:"
echo " Do not use TCL/TK (--without-tk) ................. = $with_tk"
echo " TCL include (--with-tcl-include) ................. = $USER_TCL_INC_PATH"
echo " TCL library (--with-tcl-library) ................. = $USER_TCL_LIB_PATH"
echo " TK include (--with-tk-include) ................... = $USER_TK_INC_PATH"
echo " TK library (--with-tk-library) ................... = $USER_TK_LIB_PATH"
echo " Install XML Help (--with-install-help-xml) ....... = $with_install_help_xml"
echo " Compilation tests (--enable-compilation-tests) ... = $COMPILATION_TESTS"
echo " Make the package relocatable (--enable-relocatable)= $RELOCATABLE"
echo " Use FFTW (--without-fftw) ........................ = $with_fftw"
echo " Use MATIO (--without-matio) ...................... = $with_matio"
echo ""
echo " Compile with Scilab thirdparties ................. = $WITH_DEVTOOLS"
echo ""
if test "$with_gui" = no; then
echo "Not using Xcos because of the option --without-gui"
else
if test $XCOS_ENABLE = yes; then
echo "Xcos enable"
echo "Build modelica compiler (--without-modelica) ....... = $with_modelica"
echo ""
if test "$with_modelica" != no -a "$OCAMLC" != no -a "$OCAMLOPT" != no; then
echo "Ocaml Configuration (for Modelica compiler):"
echo " OCAMLC ............. = $OCAMLC"
echo " OCAMLCFLAGS ........ = $OCAMLCFLAGS"
echo " OCAMLOPT ........... = $OCAMLOPT"
echo " OCAMLOPTFLAGS ...... = $OCAMLOPTFLAGS"
echo " OCAMLDEP ........... = $OCAMLDEP"
else
echo "Will not build Modelica compiler"
fi
else
echo "Not using Xcos"
fi
fi
echo ""
if test "$enable_code_coverage" = yes; then
echo "Code coverage configuration:"
echo " LCOV .............. = $LCOV"
echo " GENHTML ........... = $GENHTML"
else
echo "Not using code coverage"
fi
echo ""
if test $OPENMP_ENABLE = yes; then
echo "OpenMP Configuration:"
echo "OpenMP CFLAGS ...... = $OPENMP_CFLAGS"
echo "OpenMP CXXFLAGS .... = $OPENMP_CXXFLAGS"
echo "OpenMP LIBS ........ = $OPENMP_LIBS"
echo "OpenMP LDFLAGS ..... = $OPENMP_LDFLAGS"
else
echo "Not using OpenMP"
fi
echo ""
if test $FFTW_ENABLE = yes; then
echo "FFTW Configuration:"
echo " FFTW LIBS .......... = $FFTW3_LIB"
echo " FFTW CFLAGS ........ = $FFTW3_CFLAGS"
else
echo "Not using FFTW"
fi
echo ""
echo "Eigen3 Configuration:"
echo " EIGEN CPPFLAGS ...... = $EIGEN_CPPFLAGS"
echo ""
echo "libarchive Configuration:"
echo " LIBARCHIVE_CFLAGS ... = $LIBARCHIVE_CFLAGS"
echo " LIBARCHIVE_LIBS ..... = $LIBARCHIVE_LIBS"
echo " LIBARCHIVE_VERSION .. = $LIBARCHIVE_VERSION"
echo ""
if test $MATIO_ENABLE = yes; then
echo "MATIO Configuration:"
echo " MATIO LIBS .......... = $MATIO_LIBS"
echo " MATIO CFLAGS ........ = $MATIO_CFLAGS"
else
echo "Not using MATIO"
fi
echo ""
if test $UMFPACK_ENABLE = yes; then
echo "UMFPACK Configuration:"
echo " UMFPACK LIBS ....... = $UMFPACK_LIBS"
echo " UMFPACK CFLAGS ..... = $UMFPACK_CFLAGS"
if test $SUITESPARSE = yes; then
echo " UMFPACK SUITESPARSE = Yes"
else
echo " UMFPACK SUITESPARSE = No"
fi
else
echo "Not using UMFPACK"
fi
echo ""
if test $KLU_ENABLE = yes; then
echo "KLU Configuration:"
echo " KLU LIBS ....... = $KLU_LIBS"
echo " KLU CFLAGS ..... = $KLU_CFLAGS"
if test "$SUITESPARSE" = "yes"; then
echo " KLU SUITESPARSE = Yes"
else
echo " KLU SUITESPARSE = No"
fi
else
echo "Not using KLU"
fi
echo ""
echo "BLAS/LAPACK/ATLAS Configuration:"
echo " BLAS LIBS ............. = $BLAS_LIBS"
echo " BLAS TYPE ............. = $BLAS_TYPE"
echo " LAPACK LIBS ........... = $LAPACK_LIBS"
echo " LAPACK TYPE ........... = $LAPACK_TYPE"
echo " ARPACK LIBS ........... = $ARPACK_LIBS"
echo ""
if test "$with_mpi" == yes; then
echo "OpenMPI Configuration:"
echo "OpenMPI LIBS ........... = $OPENMPI_LIBS"
echo "OpenMPI C Compiler ..... = $OPENMPI_CC"
echo "OpenMPI C++ Compiler ... = $OPENMPI_CXX"
echo "OpenMPI F77 Compiler ... = $MPIF77"
else
echo "Not using MPI"
fi
echo ""
if test $BUILD_LOCALIZATION_ENABLE != no; then
echo "Gettext/localization configuration:"
echo " xgettext ............... = $XGETTEXT"
echo " msgfmt ................ = $MSGFMT"
echo " msgfmt_opts ............ = $MSGFMT_OPTS"
echo " msgcat ................ = $MSGCAT"
else
echo "Won't generate localization files"
fi
echo ""
if test $HELP_ENABLE = yes; then
echo "Documentation building configuration:"
echo " XML commons external ... = $XML_APIS_EXT"
else
echo "No documentation generated"
fi
echo ""
echo "Java Configuration:"
if test ! -z "$JAVAC"; then
echo " JAVA_HOME ........... = $JAVA_HOME"
echo " JAVAC ............... = $JAVAC"
echo " JAVA_CLASSPATH ...... = $JAVA_CLASSPATH"
echo " JAVA_VERSION ........ = $JAVA_VERSION"
echo " JAVAC_FLAGS ......... = $JAVAC_FLAGS"
echo " JAVA_JNI_INCLUDE .... = $JAVA_JNI_INCLUDE"
echo " JAVA_JNI_LIBS ....... = $JAVA_JNI_LIBS"
echo " JAVA_JNI_LIBS_PRELOAD = $JAVA_JNI_LIBS_PRELOAD"
echo " JAVA ................ = $JAVA"
echo " JAVADOC ............. = $JAVADOC"
echo " JAR ................. = $JAR"
echo " ANT ................. = $ANT"
else
echo " JAVA disabled"
fi
echo ""
echo "Java dependencies:"
if test ! -z "$JAVAC"; then
echo " Flexdock ............ = $FLEXDOCK"
echo " JOGL 2............... = $JOGL2"
echo " JOGL 2 LIBS (JNI) ... = $JOGL2_LIBS"
echo " Gluegen 2 ........... = $GLUEGEN2_RT"
echo " Gluegen 2 LIBS (JNI) = $GLUEGEN2_RT_LIBS"
echo " Jeuclid (MathML) .... = $JEUCLID_CORE"
echo " Jhall .............. = $JHALL"
echo " Jrosetta (API) ...... = $JROSETTA_API"
echo " Jrosetta (Engine) ... = $JROSETTA_ENGINE"
echo " Commons Logging ..... = $COMMONS_LOGGING"
echo " JGraph X ............ = $JGRAPHX"
echo " SciRenderer ......... = $SCIRENDERER"
echo " JLaTeXMath .......... = $JLATEXMATH"
echo " ECJ ................. = $ECJ"
fi
echo ""
if test ! -z "$JAVAC"; then
echo "Documentation, graphic export:"
echo " FOP (XML => PDF) .... = $FOP"
echo " JLaTeXMath Fop ...... = $JLATEXMATH_FOP"
echo " Batik (SVG) ......... = $BATIK"
echo " Avalon Framework .... = $AVALON_FRAMEWORK"
echo " Commons I/O ......... = $COMMONS_IO"
echo " XML graphics commons = $XMLGRAPHICS_COMMONS"
fi
echo ""
echo "Code quality (optional):"
echo " Checkstyle .......... = $CHECKSTYLE"
echo " Commons-beanutils ... = $COMMONS_BEANUTILS"
echo " Antlr ............... = $ANTLR"
echo " Junit4 .............. = $JUNIT4"
echo " Hamcrest ............ = $HAMCREST"
echo " Cobertura ........... = $COBERTURA"
echo " splint .............. = $SPLINT"
echo ""
echo "TCL/TK configuration:"
echo " TK_INC_PATH ........ = $TK_INC_PATH"
echo " TCL_INC_PATH ....... = $TCL_INC_PATH"
echo " TCLTK_LIBS ......... = $TCLTK_LIBS"
echo " TCL_SERIAL_VERSION . = $TCL_SERIAL_VERSION"
echo " TK_SERIAL_VERSION .. = $TK_SERIAL_VERSION"
echo ""
echo "XML configuration:"
echo " XML_CFLAGS .......... = $XML_CFLAGS"
echo " XML_LIBS ........... = $XML_LIBS"
echo ""
echo "HDF5 configuration:"
echo " HDF5 CFLAGS ......... = $HDF5_CFLAGS"
echo " HDF5 LIBS ........... = $HDF5_LIBS"
echo ""
echo "PCRE configuration:"
echo " PCRE_CFLAGS ........ = $PCRE_CFLAGS"
echo " PCRE_LIBS .......... = $PCRE_LIBS"
echo " PCRE_VERSION ....... = $PCRE_VERSION"
echo ""
echo "Regenerate Scilab's parser"
if test "$enable_build_parser" != no; then
echo " YACC ............... = $YACC"
echo " LEX ................ = $LEX"
echo " YFLAGS ............. = $YFLAGS"
else
echo " Regenerate parser disabled (will use embedded sources)"
fi
echo ""
echo "CURL configuration:"
echo " CURL_CFLAGS ........ = $CURL_CFLAGS"
echo " CURL_LIBS .......... = $CURL_LIBS"
echo " CURL_VERSION ....... = $CURL_VERSION"
echo ""
echo "SWIG Configuration:"
if test ! -z "$SWIG_BIN"; then
echo " SWIG_BIN ........... = $SWIG_BIN"
echo " SWIG_JAVA .......... = $SWIG_JAVA"
else
echo " SWIG generation disabled"
fi
echo ""
echo "GIWS Configuration:"
if test ! -z "$GIWS_BIN"; then
echo " GIWS_BIN ........... = $GIWS_BIN"
else
echo " GIWS generation disabled"
fi
echo ""
echo "Valgrind configuration:"
echo " VALGRIND_CFLAGS .... = $VALGRIND_CFLAGS"
echo " VALGRIND_LIBS ...... = $VALGRIND_LIBS"
echo ""
echo ""
echo "Libtool config:"
echo " objext .............. = $objext"
echo " libext (static) ..... = $libext"
echo " shrext_cmds ......... = $shrext_cmds"
echo " exeext .............. = $exeext"
echo ""
echo "Compilation paths:"
echo " srcdir .............. = $SCI_SRCDIR"
echo " srcdir_full ......... = $SCI_SRCDIR_FULL"
echo " builddir ............ = $SCI_BUILDDIR"
if test "$SCI_SRCDIR_FULL" != "$SCI_BUILDDIR"; then
echo " VPATH build ......... = Activated"
fi
echo ""
echo "Platform information:"
echo " host ........... = $host"
echo " host_cpu ....... = $host_cpu"
echo " host_vendor .... = $host_vendor"
echo " host_os ... .... = $host_os"
echo " hostname ....... = $ac_hostname"
echo " CPU 64 bits .... = $IS_64_BITS_CPU"
if test -n "$MAC_DETECTED_ARCH"; then
echo " Mac OS X arch .. = $MAC_DETECTED_ARCH"
echo " Mac OS X version = $macosx_version"
fi
echo ""
echo "Options used to compile and link:"
echo " prefix ......... = $prefix"
echo " localedir ...... = $localedir"
echo " VERSION ........ = $PACKAGE_VERSION"
echo " CC ............. = $CC"
echo " CFLAGS ......... = $CFLAGS"
echo " SCI_CFLAGS ..... = $SCI_CFLAGS"
echo " DEFS ........... = $DEFS"
echo " LD ............. = $LD"
echo " LDFLAGS ........ = $LDFLAGS"
echo " SCI_LDFLAGS .... = $SCI_LDFLAGS"
echo " LIBS ........... = $LIBS"
echo " CXX ............ = $CXX"
echo " CXXFLAGS ....... = $CXXFLAGS"
echo " SCI_CXXFLAGS ... = $SCI_CXXFLAGS"
echo " F77 ............ = $F77"
echo " FFLAGS ......... = $FFLAGS"
echo " SCI_FFLAGS ..... = $SCI_FFLAGS"
echo " F77_LDFLAGS .... = $F77_LDFLAGS"
echo " FLIBS...... .... = $FLIBS"
echo ""
#################
## Update the years in the various part of the code.
#################
if test ! -f modules/core/src/cpp/banner.cpp; then
AC_MSG_ERROR([Could not find the Scilab banner file.])
fi
CURRENT_YEAR=`date "+%Y"`
if test -n "$SOURCE_DATE_EPOCH"; then
CURRENT_YEAR=`date --utc --date="@$SOURCE_DATE_EPOCH" "+%Y"`
fi
DETECTED_YEAR=`grep "Copyright (c) 2022-" ${SCI_SRCDIR}/modules/core/src/cpp/banner.cpp|sed -e "s/.*Copyright (c) 2022-\([[0-9]]*\).*/\1/g"`
if test "$CURRENT_YEAR" != "$DETECTED_YEAR"; then
sed -i -e "s| 2022-$DETECTED_YEAR | 2022-$CURRENT_YEAR |g" ${SCI_SRCDIR}/modules/core/src/cpp/banner.cpp ${SCI_SRCDIR}/modules/windows_tools/src/c/scilab_windows/console.c
sed -i -e "s| 2022-$DETECTED_YEAR | 2022-$CURRENT_YEAR |g" ${SCI_SRCDIR}/etc/Info.plist.in
sed -i -e "s|VALUE \"LegalCopyright\", \"Copyright (C) $DETECTED_YEAR|VALUE \"LegalCopyright\", \"Copyright (C) $CURRENT_YEAR|" $(find ${SCI_SRCDIR} -iname '*.rc')
sed -i -e "s|2017-$DETECTED_YEAR|2017-$CURRENT_YEAR|" $(find ${SCI_SRCDIR} -iname 'banner.xml')
sed -i -e "s| 2022-$DETECTED_YEAR | 2022-$CURRENT_YEAR |g" ${SCI_SRCDIR}/modules/gui/images/icons/aboutscilab.svg
AC_CHECK_PROG(INKSCAPE, inkscape)
if test -n "$INKSCAPE"; then
$INKSCAPE -w 600 -h 290 ${SCI_SRCDIR}/modules/gui/images/icons/aboutscilab.svg -o ${SCI_SRCDIR}/modules/gui/images/icons/aboutscilab.png
else
AC_CHECK_PROG(CAIROSVG, cairosvg)
if test -n "$CAIROSVG"; then
$CAIROSVG --output-width 600 --output-height 290 ${SCI_SRCDIR}/modules/gui/images/icons/aboutscilab.svg -o ${SCI_SRCDIR}/modules/gui/images/icons/aboutscilab.png
fi
fi
AC_MSG_WARN([New year ($CURRENT_YEAR) detected. Source files updated, commit them !])
fi
#################
## Update Scilab version based on aboutscilab.svg
#################
if test ! -f ${SCI_SRCDIR}/modules/gui/images/icons/aboutscilab.svg; then
AC_MSG_ERROR([Could not find aboutscilab.svg file.])
fi
DETECTED_VERSION=`grep -m 1 ">Scilab" ${SCI_SRCDIR}/modules/gui/images/icons/aboutscilab.svg|sed -e "s/.*>Scilab //g"|sed -e "s/<.*//g"`
if test "$SCILAB_BINARY_VERSION" != "$DETECTED_VERSION"; then
# alert the user
AC_MSG_WARN([Migrating from version $DETECTED_VERSION to $SCILAB_BINARY_VERSION])
AC_PATH_PROG(INKSCAPE, inkscape)
# put the version into Version.incl
echo "SCIVERSION=scilab-branch-$SCILAB_VERSION_MAJOR.$SCILAB_VERSION_MINOR" >$SCI_SRCDIR/Version.incl
# put the correct text in version.h
sed -i -e "s|SCI_VERSION_STRING \".*\"|SCI_VERSION_STRING \"scilab-branch-$SCILAB_VERSION_MAJOR.$SCILAB_VERSION_MINOR\"|" \
-e "s|SCI_VERSION_WIDE_STRING L\".*\"|SCI_VERSION_WIDE_STRING L\"scilab-branch-$SCILAB_VERSION_MAJOR.$SCILAB_VERSION_MINOR\"|" \
-e "s|DEFAULT_SCI_VERSION_MESSAGE L\".*\"|DEFAULT_SCI_VERSION_MESSAGE L\"scilab-branch-$SCILAB_VERSION_MAJOR.$SCILAB_VERSION_MINOR\"|" \
${SCI_SRCDIR}/modules/core/includes/version.h ${SCI_SRCDIR}/modules/core/includes/version.h.{in,vc}
# update some help pages
sed -i -e "s|scilab-[[0-9]]\+\(\.[[0-9]]\+\)\+|scilab-$SCILAB_BINARY_VERSION|" $(find ${SCI_SRCDIR} -iname 'banner.xml')
# update rc files
sed -i -e "s|FILEVERSION [[0-9]]\+\(,[[0-9]]\+\)\+|FILEVERSION $SCILAB_VERSION_MAJOR,$SCILAB_VERSION_MINOR,$SCILAB_VERSION_MAINTENANCE,0|" \
-e "s|PRODUCTVERSION [[0-9]]\+\(,[[0-9]]\+\)\+|FILEVERSION $SCILAB_VERSION_MAJOR,$SCILAB_VERSION_MINOR,$SCILAB_VERSION_MAINTENANCE,0|" \
-e "s|VALUE \"FileVersion\", \"[[0-9]]\+\(, [[0-9]]\+\)\+\"|VALUE \"FileVersion\", \"$SCILAB_VERSION_MAJOR, $SCILAB_VERSION_MINOR, $SCILAB_VERSION_MAINTENANCE, 0\"|" \
-e "s|VALUE \"ProductVersion\", \"[[0-9]]\+\(, [[0-9]]\+\)\+\"|VALUE \"ProductVersion\", \"$SCILAB_VERSION_MAJOR, $SCILAB_VERSION_MINOR, $SCILAB_VERSION_MAINTENANCE, 0\"|" \
-e "s|Scilab [[0-9]]\+\(\.[[0-9]]\+\)\+|Scilab $SCILAB_BINARY_VERSION|" \
$(find ${SCI_SRCDIR} -iname '*.rc')
# update banner, inkscape is used to generate png from svg
sed -i -e "s|Scilab [[0-9]]\+\(\.[[0-9]]\+\)\+|Scilab $SCILAB_BINARY_VERSION|" ${SCI_SRCDIR}/modules/gui/images/icons/aboutscilab.svg
$INKSCAPE -w 600 -h 290 ${SCI_SRCDIR}/modules/gui/images/icons/aboutscilab.svg -o ${SCI_SRCDIR}/modules/gui/images/icons/aboutscilab.png
# alert the user
AC_MSG_WARN([New version $SCILAB_BINARY_VERSION detected. Source files updated, commit them !])
fi
|