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
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
|
#!/bin/sh
# From configure.in Revision: 1.17
#!/bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 1.11
# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
# This configure script is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This script is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Save the original args to write them into config.status later.
configure_args="$*"
# Only options that might do something get documented.
ac_usage="Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
--build=BUILD configure for building on BUILD [BUILD=HOST]
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local]
--help print this message
--host=HOST configure for HOST [guessed]
--prefix=PREFIX install host independent files in PREFIX [/usr/local]
--quiet, --silent do not print \`checking for...' messages
--srcdir=DIR find the sources in DIR [configure dir or ..]
--target=TARGET configure for TARGET [TARGET=HOST]
--verbose print results of checks
--version print the version of autoconf that created configure
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR"
# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
exec_prefix=
host=NONE
no_create=
nonopt=NONE
norecursion=
prefix=
program_prefix=
program_suffix=
program_transform_name=
silent=
srcdir=
target=NONE
verbose=
x_includes=
x_libraries=
ac_prev=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
# Accept (but ignore some of) the important Cygnus configure
# options, so we can diagnose typos.
case "$ac_option" in
-*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) ac_optarg= ;;
esac
case "$ac_option" in
-build | --build | --buil | --bui | --bu | --b)
ac_prev=build ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
build="$ac_optarg" ;;
-disable-* | --disable-*)
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
# Reject names that aren't valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
echo "configure: $ac_feature: invalid feature name" >&2; exit 1
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
eval "enable_${ac_feature}=no" ;;
-enable-* | --enable-*)
ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
# Reject names that aren't valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
echo "configure: $ac_feature: invalid feature name" >&2; exit 1
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "enable_${ac_feature}='$ac_optarg'" ;;
# For backward compatibility, recognize -exec-prefix and --exec_prefix.
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
ac_prev=exec_prefix ;;
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix="$ac_optarg" ;;
-gas | --gas | --ga | --g)
with_gas=yes ;; # Obsolete; use --with-gas.
-help | --help | --hel | --he)
cat << EOF
$ac_usage
EOF
exit 0 ;;
-host | --host | --hos | --ho)
ac_prev=host ;;
-host=* | --host=* | --hos=* | --ho=*)
host="$ac_optarg" ;;
-nfp | --nfp | --nf)
with_fp=no ;; # Obsolete; use --without-fp.
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c)
no_create=yes ;;
-norecursion | --norecursion | --norecursio | --norecursi \
| --norecurs | --norecur | --norecu | --norec | --nore | --nor)
norecursion=yes ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix="$ac_optarg" ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
program_prefix="$ac_optarg" ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
program_suffix="$ac_optarg" ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- \
| --program-transform | --program-transfor \
| --program-transfo | --program-transf \
| --program-trans | --program-tran \
| --progr-tra | --program-tr | --program-t)
ac_prev=program_transform_name ;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name="$ac_optarg" ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir="$ac_optarg" ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target="$ac_optarg" ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 1.11"
exit 0 ;;
-with-* | --with-*)
ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
# Reject names that aren't valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
echo "configure: $ac_package: invalid package name" >&2; exit 1
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "with_${ac_package}='$ac_optarg'" ;;
-without-* | --without-*)
ac_package=`echo $ac_option|sed -e 's/-*without-//'`
# Reject names that aren't valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
echo "configure: $ac_package: invalid package name" >&2; exit 1
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
eval "with_${ac_package}=no" ;;
--x) with_x=yes ;; # Obsolete; use --with-x.
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
| --x-incl | --x-inc | --x-in | --x-i)
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
x_includes="$ac_optarg" ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries="$ac_optarg" ;;
-*) echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1
;;
*)
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
echo "configure: warning: $ac_option: invalid host type" >&2
fi
if test "x$nonopt" != xNONE; then
echo "configure: can only configure for one host and one target at a time" >&2; exit 1
fi
nonopt="$ac_option"
;;
esac
done
if test -n "$ac_prev"; then
echo "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1
fi
trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
trap 'rm -fr confdefs* $ac_clean_files' 0
# Save the original args if we used an alternate arg parser.
ac_configure_temp="${configure_args-$*}"
# Strip out --no-create and --norecursion so they don't pile up.
configure_args=
for ac_arg in $ac_configure_temp; do
case "$ac_arg" in
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c) ;;
-norecursion | --norecursion | --norecursio | --norecursi \
| --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
*) configure_args="$configure_args $ac_arg" ;;
esac
done
# NLS nuisances.
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
if test "${LANG+set}" = 'set'; then LANG=C; export LANG; fi
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=screen.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then `..'.
ac_prog=$0
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
fi
if test ! -r $srcdir/$ac_unique_file; then
if test x$ac_srcdir_defaulted = xyes; then
echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
else
echo "configure: can not find sources in ${srcdir}" >&2; exit 1
fi
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='${CPP}'
ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
rev=`sed < ${srcdir}/patchlevel.h -n -e '/#define REV/s/#define REV *//p'`
vers=`sed < ${srcdir}/patchlevel.h -n -e '/#define VERS/s/#define VERS *//p'`
pat=`sed < ${srcdir}/patchlevel.h -n -e '/#define PATCHLEVEL/s/#define PATCHLEVEL *//p'`
VERSION="$rev.$vers.$pat"
test -n "$silent" || echo "this is screen version $VERSION"
if test -z "$prefix"
then
test -n "$silent" || echo "checking for gzip to derive installation directory prefix"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$IFS:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test $ac_dir != . && test -f $ac_dir/gzip; then
# Not all systems have dirname.
prefix=`echo $ac_dir|sed 's%/[^/][^/]*$%%'`
break
fi
done
IFS="$ac_save_ifs"
test -n "$verbose" && echo " chose installation directory prefix ${prefix}"
fi
if test -z "$CC"; then
# Extract the first word of `gcc', so it can be a program name with args.
set ac_dummy gcc; ac_word=$2
test -n "$silent" || echo "checking for $ac_word"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
CC="gcc"
break
fi
done
IFS="$ac_save_ifs"
fi
test -z "$CC" && CC="cc"
test -n "$CC" && test -n "$verbose" && echo " setting CC to $CC"
# Find out if we are using GNU C, under whatever name.
cat > conftest.c <<EOF
#ifdef __GNUC__
yes
#endif
EOF
${CC-cc} -E conftest.c > conftest.out 2>&1
if egrep yes conftest.out >/dev/null 2>&1; then
GCC=1 # For later tests.
fi
rm -f conftest*
test -n "$silent" || echo "checking how to run the C preprocessor"
if test -z "$CPP"; then
# This must be in double quotes, not single quotes, because CPP may get
# substituted into the Makefile and ``${CC-cc}'' will simply confuse
# make. It must be expanded now.
CPP="${CC-cc} -E"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <stdio.h>
Syntax Error
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
:
else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <stdio.h>
Syntax Error
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
:
else
rm -rf conftest*
CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
test -n "$verbose" && echo " setting CPP to $CPP"
if test -n "$GCC"; then
test -n "$silent" || echo "checking whether -traditional is needed"
ac_pattern="Autoconf.*'x'"
ac_prog='#include <sgtty.h>
Autoconf TIOCGETP'
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$ac_prog
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
rm -rf conftest*
ac_need_trad=1
fi
rm -f conftest*
if test -z "$ac_need_trad"; then
ac_prog='#include <termio.h>
Autoconf TCGETA'
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$ac_prog
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
rm -rf conftest*
ac_need_trad=1
fi
rm -f conftest*
fi
test -n "$ac_need_trad" && CC="$CC -traditional"
fi
test -n "$silent" || echo "checking for POSIXized ISC"
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
ISC=1 # If later tests want to check for ISC.
{
test -n "$verbose" && \
echo " defining _POSIX_SOURCE"
echo "#define" _POSIX_SOURCE "1" >> confdefs.h
DEFS="$DEFS -D_POSIX_SOURCE=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
\${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
\${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
"
}
if test -n "$GCC"; then
CC="$CC -posix"
else
CC="$CC -Xp"
fi
fi
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
main(){exit(0);}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
:
else
echo "configure: Can't run the compiler - sorry" >&2; exit 1
fi
rm -fr conftest*
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
main()
{
int __something_strange_();
__something_strange_(0);
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
echo "configure: Your compiler does not set the exit status - sorry" >&2; exit 1
fi
rm -fr conftest*
for ac_prog in mawk gawk nawk awk
do
if test -z "$AWK"; then
# Extract the first word of `$ac_prog', so it can be a program name with args.
set ac_dummy $ac_prog; ac_word=$2
test -n "$silent" || echo "checking for $ac_word"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
AWK="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
test -n "$AWK" && test -n "$verbose" && echo " setting AWK to $AWK"
test -n "$AWK" && break
done
# Make sure to not get the incompatible SysV /etc/install and
# /usr/sbin/install, which might be in PATH before a BSD-like install,
# or the SunOS /usr/etc/install directory, or the AIX /bin/install,
# or the AFS install, which mishandles nonexistent args, or
# /usr/ucb/install on SVR4, which tries to use the nonexistent group
# `staff', or /sbin/install on IRIX which has incompatible command-line
# syntax. Sigh.
#
# On most BSDish systems install is in /usr/bin, not /usr/ucb
# anyway.
# This turns out not to be true, so the mere pathname isn't an indication
# of whether the program works. What we really need is a set of tests for
# the install program to see if it actually works in all the required ways.
#
# Avoid using ./install, which might have been erroneously created
# by make from ./install.sh.
if test -z "${INSTALL}"; then
test -n "$silent" || echo "checking for a BSD compatible install"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
case "$ac_dir" in
''|.|/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
for ac_prog in installbsd scoinst install; do
if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
# OSF/1 installbsd also uses dspmsg, but is usable.
:
else
INSTALL="$ac_dir/$ac_prog -c"
break 2
fi
fi
done
;;
esac
done
IFS="$ac_save_ifs"
fi
if test -z "$INSTALL"; then
# As a last resort, use the slow shell script.
for ac_dir in ${srcdir} ${srcdir}/.. ${srcdir}/../..; do
if test -f $ac_dir/install.sh; then
INSTALL="$ac_dir/install.sh -c"; break
fi
done
fi
if test -z "$INSTALL"; then
echo "configure: can not find install.sh in ${srcdir} or ${srcdir}/.. or ${srcdir}/../.." >&2; exit 1
fi
test -n "$verbose" && echo " setting INSTALL to $INSTALL"
# Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -n "$verbose" && echo " setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
test -n "$verbose" && echo " setting INSTALL_DATA to $INSTALL_DATA"
if test -f etc/toolcheck; then
test -n "$silent" || echo "checking for buggy tools"
sh etc/toolcheck
fi
if test -n "$ISC"; then
{
test -n "$verbose" && \
echo " defining ISC"
echo "#define" ISC "1" >> confdefs.h
DEFS="$DEFS -DISC=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}ISC\${ac_dB}ISC\${ac_dC}1\${ac_dD}
\${ac_uA}ISC\${ac_uB}ISC\${ac_uC}1\${ac_uD}
\${ac_eA}ISC\${ac_eB}ISC\${ac_eC}1\${ac_eD}
"
}
LIBS="$LIBS -linet"
fi
if test -f /sysV68 ; then
{
test -n "$verbose" && \
echo " defining sysV68"
echo "#define" sysV68 "1" >> confdefs.h
DEFS="$DEFS -DsysV68=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}sysV68\${ac_dB}sysV68\${ac_dC}1\${ac_dD}
\${ac_uA}sysV68\${ac_uB}sysV68\${ac_uC}1\${ac_uD}
\${ac_eA}sysV68\${ac_eB}sysV68\${ac_eC}1\${ac_eD}
"
}
fi
test -n "$silent" || echo "checking for MIPS"
if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
test -f /bin/mx || LIBS="$LIBS -lmld" # for nlist. But not on alpha.
if test -r /dev/ptc; then
{
test -n "$verbose" && \
echo " defining MIPS"
echo "#define" MIPS "1" >> confdefs.h
DEFS="$DEFS -DMIPS=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}MIPS\${ac_dB}MIPS\${ac_dC}1\${ac_dD}
\${ac_uA}MIPS\${ac_uB}MIPS\${ac_uC}1\${ac_uD}
\${ac_eA}MIPS\${ac_eB}MIPS\${ac_eC}1\${ac_eD}
"
}
test -n "$silent" || echo "checking for wait3"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { wait3();; return 0; }
EOF
if eval $ac_compile; then
:
else
rm -rf conftest*
test -n "$silent" || echo "checking for wait2"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { wait2();; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining USE_WAIT2"
echo "#define" USE_WAIT2 "1" >> confdefs.h
DEFS="$DEFS -DUSE_WAIT2=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}USE_WAIT2\${ac_dB}USE_WAIT2\${ac_dC}1\${ac_dD}
\${ac_uA}USE_WAIT2\${ac_uB}USE_WAIT2\${ac_uC}1\${ac_uD}
\${ac_eA}USE_WAIT2\${ac_eB}USE_WAIT2\${ac_eC}1\${ac_eD}
"
}
LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd"
fi
rm -f conftest*
fi
rm -f conftest*
fi
fi
test -n "$silent" || echo "checking for Ultrix"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#if defined(ultrix) || defined(__ultrix)
yes
#endif
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
rm -rf conftest*
ULTRIX=1
fi
rm -f conftest*
if test -f /usr/lib/libpyr.a ; then
oldlibs="$LIBS"
LIBS="$LIBS -lpyr"
test -n "$silent" || echo "checking for Pyramid OSX"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { open_controlling_pty("");; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining OSX"
echo "#define" OSX "1" >> confdefs.h
DEFS="$DEFS -DOSX=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}OSX\${ac_dB}OSX\${ac_dC}1\${ac_dD}
\${ac_uA}OSX\${ac_uB}OSX\${ac_uC}1\${ac_uD}
\${ac_eA}OSX\${ac_eB}OSX\${ac_eC}1\${ac_eD}
"
}
else
rm -rf conftest*
LIBS="oldlibs"
fi
rm -f conftest*
fi
test -n "$silent" || echo "checking for butterfly"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#if defined(butterfly)
yes
#endif
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
rm -rf conftest*
butterfly=1
fi
rm -f conftest*
if test -z "$butterfly"; then
if test -n "$ULTRIX"; then
test -z "$GCC" && CC="$CC -YBSD"
fi
test -n "$silent" || echo "checking for POSIX.1"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <unistd.h>
main () {
#ifdef _POSIX_VERSION
yes
#endif
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
rm -rf conftest*
test -n "$silent" || echo "- you have a POSIX system"
{
test -n "$verbose" && \
echo " defining POSIX"
echo "#define" POSIX "1" >> confdefs.h
DEFS="$DEFS -DPOSIX=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}POSIX\${ac_dB}POSIX\${ac_dC}1\${ac_dD}
\${ac_uA}POSIX\${ac_uB}POSIX\${ac_uC}1\${ac_uD}
\${ac_eA}POSIX\${ac_eB}POSIX\${ac_eC}1\${ac_eD}
"
}
posix=1
fi
rm -f conftest*
fi
test -n "$silent" || echo "checking for System V"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#include <fcntl.h>
int main() { return 0; }
int t() { int x = SIGCHLD | FNDELAY;; return 0; }
EOF
if eval $ac_compile; then
:
else
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining SYSV"
echo "#define" SYSV "1" >> confdefs.h
DEFS="$DEFS -DSYSV=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSV\${ac_dB}SYSV\${ac_dC}1\${ac_dD}
\${ac_uA}SYSV\${ac_uB}SYSV\${ac_uC}1\${ac_uD}
\${ac_eA}SYSV\${ac_eB}SYSV\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$silent" || echo "checking for sequent/ptx"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#ifdef _SEQUENT_
yes
#endif
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
rm -rf conftest*
LIBS="$LIBS -lsocket -linet";seqptx=1
fi
rm -f conftest*
oldlibs="$LIBS"
LIBS="$LIBS -lelf"
test -n "$silent" || echo "checking for SVR4"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <utmpx.h>
int main() { return 0; }
int t() { ; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
test -n "$silent" || echo "checking for dwarf.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <dwarf.h>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining SVR4"
echo "#define" SVR4 "1" >> confdefs.h
DEFS="$DEFS -DSVR4=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}SVR4\${ac_dB}SVR4\${ac_dC}1\${ac_dD}
\${ac_uA}SVR4\${ac_uB}SVR4\${ac_uC}1\${ac_uD}
\${ac_eA}SVR4\${ac_eB}SVR4\${ac_eC}1\${ac_eD}
"
}
{
test -n "$verbose" && \
echo " defining BUGGYGETLOGIN"
echo "#define" BUGGYGETLOGIN "1" >> confdefs.h
DEFS="$DEFS -DBUGGYGETLOGIN=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}BUGGYGETLOGIN\${ac_dB}BUGGYGETLOGIN\${ac_dC}1\${ac_dD}
\${ac_uA}BUGGYGETLOGIN\${ac_uB}BUGGYGETLOGIN\${ac_uC}1\${ac_uD}
\${ac_eA}BUGGYGETLOGIN\${ac_eB}BUGGYGETLOGIN\${ac_eC}1\${ac_eD}
"
}
else
rm -rf conftest*
test -n "$silent" || echo "checking for elf.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <elf.h>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining SVR4"
echo "#define" SVR4 "1" >> confdefs.h
DEFS="$DEFS -DSVR4=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}SVR4\${ac_dB}SVR4\${ac_dC}1\${ac_dD}
\${ac_uA}SVR4\${ac_uB}SVR4\${ac_uC}1\${ac_uD}
\${ac_eA}SVR4\${ac_eB}SVR4\${ac_eC}1\${ac_eD}
"
}
{
test -n "$verbose" && \
echo " defining BUGGYGETLOGIN"
echo "#define" BUGGYGETLOGIN "1" >> confdefs.h
DEFS="$DEFS -DBUGGYGETLOGIN=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}BUGGYGETLOGIN\${ac_dB}BUGGYGETLOGIN\${ac_dC}1\${ac_dD}
\${ac_uA}BUGGYGETLOGIN\${ac_uB}BUGGYGETLOGIN\${ac_uC}1\${ac_uD}
\${ac_eA}BUGGYGETLOGIN\${ac_eB}BUGGYGETLOGIN\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
fi
rm -f conftest*
else
rm -rf conftest*
LIBS="$oldlibs"
fi
rm -f conftest*
test -n "$silent" || echo "checking for BSD job control"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ioctl.h>
int main() { return 0; }
int t() {
#ifdef POSIX
tcsetpgrp(0, 0);
#else
int x = TIOCSPGRP;
#ifdef SYSV
setpgrp();
#else
int y = TIOCNOTTY;
#endif
#endif
; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
test -n "$silent" || echo "- you have jobcontrol"
{
test -n "$verbose" && \
echo " defining BSDJOBS"
echo "#define" BSDJOBS "1" >> confdefs.h
DEFS="$DEFS -DBSDJOBS=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}BSDJOBS\${ac_dB}BSDJOBS\${ac_dC}1\${ac_dD}
\${ac_uA}BSDJOBS\${ac_uB}BSDJOBS\${ac_uC}1\${ac_uD}
\${ac_eA}BSDJOBS\${ac_eB}BSDJOBS\${ac_eC}1\${ac_eD}
"
}
else
rm -rf conftest*
test -n "$silent" || echo "- you don't have jobcontrol"
fi
rm -f conftest*
test -n "$silent" || echo "checking for setreuid"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() {
#ifdef __hpux
setresuid(0, 0, 0);
#else
setreuid(0, 0);
#endif
; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining HAVE_SETREUID"
echo "#define" HAVE_SETREUID "1" >> confdefs.h
DEFS="$DEFS -DHAVE_SETREUID=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SETREUID\${ac_dB}HAVE_SETREUID\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_SETREUID\${ac_uB}HAVE_SETREUID\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_SETREUID\${ac_eB}HAVE_SETREUID\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$silent" || echo "checking for seteuid"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() {
#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news)
seteuid_is_broken(0);
#else
seteuid(0);
#endif
; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining HAVE_SETEUID"
echo "#define" HAVE_SETEUID "1" >> confdefs.h
DEFS="$DEFS -DHAVE_SETEUID=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SETEUID\${ac_dB}HAVE_SETEUID\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_SETEUID\${ac_uB}HAVE_SETEUID\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_SETEUID\${ac_eB}HAVE_SETEUID\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$silent" || echo "checking for select"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { select(0, 0, 0, 0, 0);; return 0; }
EOF
if eval $ac_compile; then
:
else
rm -rf conftest*
LIBS="$LIBS -lnet -lnsl"
test -n "$silent" || echo "checking for select with $LIBS"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { select(0, 0, 0, 0, 0);; return 0; }
EOF
if eval $ac_compile; then
:
else
rm -rf conftest*
echo "configure: !!! no select - no screen" >&2; exit 1
fi
rm -f conftest*
fi
rm -f conftest*
test -n "$silent" || echo "checking fifos"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#ifndef O_NONBLOCK
#define O_NONBLOCK O_NDELAY
#endif
#ifndef S_IFIFO
#define S_IFIFO 0010000
#endif
char *fin = "/tmp/conftest$$";
main()
{
struct stat stb;
int f;
(void)alarm(5);
#ifdef POSIX
if (mkfifo(fin, 0777))
#else
if (mknod(fin, S_IFIFO|0777, 0))
#endif
exit(1);
if (stat(fin, &stb) || (stb.st_mode & S_IFIFO) != S_IFIFO)
exit(1);
close(0);
#ifdef __386BSD__
/*
* The next test fails under 386BSD, but screen works using fifos.
* Fifos in O_RDWR mode are only used for the BROKEN_PIPE case and for
* the select() configuration test.
*/
exit(0);
#endif
if (open(fin, O_RDONLY | O_NONBLOCK))
exit(1);
if (fork() == 0)
{
close(0);
if (open(fin, O_WRONLY | O_NONBLOCK))
exit(1);
close(0);
if (open(fin, O_WRONLY | O_NONBLOCK))
exit(1);
if (write(0, "TEST", 4) == -1)
exit(1);
exit(0);
}
f = 1;
if (select(1, &f, 0, 0, 0) == -1)
exit(1);
exit(0);
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
test -n "$silent" || echo "- your fifos are usable";fifo=1
else
test -n "$silent" || echo "- your fifos are not usable"
fi
rm -fr conftest*
rm -f /tmp/conftest*
if test -n "$fifo"; then
test -n "$silent" || echo "checking for broken fifo implementation"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <fcntl.h>
#include <sys/time.h>
#include <sys/stat.h>
#ifndef O_NONBLOCK
#define O_NONBLOCK O_NDELAY
#endif
#ifndef S_IFIFO
#define S_IFIFO 0010000
#endif
char *fin = "/tmp/conftest$$";
main()
{
struct timeval tv;
int r, x;
#ifdef POSIX
if (mkfifo(fin, 0600))
#else
if (mknod(fin, S_IFIFO|0600, 0))
#endif
exit(1);
close(0);
if (open(fin, O_RDONLY|O_NONBLOCK))
exit(1);
r = 1;
tv.tv_sec = 1;
tv.tv_usec = 0;
if (select(1, &r, 0, 0, &tv))
exit(1);
exit(0);
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
test -n "$silent" || echo "- your implementation is ok"
else
test -n "$silent" || echo "- you have a broken implementation"
{
test -n "$verbose" && \
echo " defining BROKEN_PIPE"
echo "#define" BROKEN_PIPE "1" >> confdefs.h
DEFS="$DEFS -DBROKEN_PIPE=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}BROKEN_PIPE\${ac_dB}BROKEN_PIPE\${ac_dC}1\${ac_dD}
\${ac_uA}BROKEN_PIPE\${ac_uB}BROKEN_PIPE\${ac_uC}1\${ac_uD}
\${ac_eA}BROKEN_PIPE\${ac_eB}BROKEN_PIPE\${ac_eC}1\${ac_eD}
"
}
fifobr=1
fi
rm -fr conftest*
rm -f /tmp/conftest*
fi
test -n "$silent" || echo "checking sockets"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <fcntl.h>
char *son = "/tmp/conftest$$";
main()
{
int s1, s2, s3, l;
struct sockaddr_un a;
(void)alarm(5);
if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
exit(1);
a.sun_family = AF_UNIX;
strcpy(a.sun_path, son);
(void) unlink(son);
if (bind(s1, (struct sockaddr *) &a, strlen(son)+2) == -1)
exit(1);
if (listen(s1, 2))
exit(1);
if (fork() == 0)
{
if ((s2 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
kill(getppid(), 3);
(void)connect(s2, (struct sockaddr *)&a, strlen(son) + 2);
if (write(s2, "HELLO", 5) == -1)
kill(getppid(), 3);
exit(0);
}
l = sizeof(a);
close(0);
if (accept(s1, &a, &l))
exit(1);
l = 1;
if (select(1, &l, 0, 0, 0) == -1)
exit(1);
exit(0);
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
test -n "$silent" || echo "- your sockets are usable";sock=1
else
test -n "$silent" || echo "- your sockets are not usable"
fi
rm -fr conftest*
rm -f /tmp/conftest*
if test -n "$sock"; then
test -n "$silent" || echo "checking socket implementation"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
char *son = "/tmp/conftest$$";
main()
{
int s;
struct stat stb;
struct sockaddr_un a;
if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
exit(0);
a.sun_family = AF_UNIX;
strcpy(a.sun_path, son);
(void) unlink(son);
if (bind(s, (struct sockaddr *) &a, strlen(son)+2) == -1)
exit(0);
if (stat(son, &stb))
exit(1);
close(s);
exit(0);
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
test -n "$silent" || echo "- you are normal"
else
test -n "$silent" || echo "- unix domain sockets are not kept in the filesystem"
{
test -n "$verbose" && \
echo " defining SOCK_NOT_IN_FS"
echo "#define" SOCK_NOT_IN_FS "1" >> confdefs.h
DEFS="$DEFS -DSOCK_NOT_IN_FS=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}SOCK_NOT_IN_FS\${ac_dB}SOCK_NOT_IN_FS\${ac_dC}1\${ac_dD}
\${ac_uA}SOCK_NOT_IN_FS\${ac_uB}SOCK_NOT_IN_FS\${ac_uC}1\${ac_uD}
\${ac_eA}SOCK_NOT_IN_FS\${ac_eB}SOCK_NOT_IN_FS\${ac_eC}1\${ac_eD}
"
}
socknofs=1
fi
rm -fr conftest*
rm -f /tmp/conftest*
fi
if test -n "$fifo"; then
if test -n "$sock"; then
if test -n "$nore"; then
test -n "$silent" || echo "- hmmm... better take the fifos"
{
test -n "$verbose" && \
echo " defining NAMEDPIPE"
echo "#define" NAMEDPIPE "1" >> confdefs.h
DEFS="$DEFS -DNAMEDPIPE=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}NAMEDPIPE\${ac_dB}NAMEDPIPE\${ac_dC}1\${ac_dD}
\${ac_uA}NAMEDPIPE\${ac_uB}NAMEDPIPE\${ac_uC}1\${ac_uD}
\${ac_eA}NAMEDPIPE\${ac_eB}NAMEDPIPE\${ac_eC}1\${ac_eD}
"
}
elif test -n "$fifobr"; then
test -n "$silent" || echo "- as your fifos are broken lets use the sockets."
else
test -n "$silent" || echo "- both sockets and fifos usable. let's take fifos."
{
test -n "$verbose" && \
echo " defining NAMEDPIPE"
echo "#define" NAMEDPIPE "1" >> confdefs.h
DEFS="$DEFS -DNAMEDPIPE=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}NAMEDPIPE\${ac_dB}NAMEDPIPE\${ac_dC}1\${ac_dD}
\${ac_uA}NAMEDPIPE\${ac_uB}NAMEDPIPE\${ac_uC}1\${ac_uD}
\${ac_eA}NAMEDPIPE\${ac_eB}NAMEDPIPE\${ac_eC}1\${ac_eD}
"
}
fi
else
test -n "$silent" || echo "- using named pipes"
{
test -n "$verbose" && \
echo " defining NAMEDPIPE"
echo "#define" NAMEDPIPE "1" >> confdefs.h
DEFS="$DEFS -DNAMEDPIPE=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}NAMEDPIPE\${ac_dB}NAMEDPIPE\${ac_dC}1\${ac_dD}
\${ac_uA}NAMEDPIPE\${ac_uB}NAMEDPIPE\${ac_uC}1\${ac_uD}
\${ac_eA}NAMEDPIPE\${ac_eB}NAMEDPIPE\${ac_eC}1\${ac_eD}
"
}
fi
elif test -n "$sock"; then
test -n "$silent" || echo "- using unix-domain sockets"
else
echo "configure: you have neither usable sockets nor usable pipes -> no screen" >&2; exit 1
fi
test -n "$silent" || echo "checking select return value"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
char *nam = "/tmp/conftest$$";
#ifdef NAMEDPIPE
#ifndef O_NONBLOCK
#define O_NONBLOCK O_NDELAY
#endif
#ifndef S_IFIFO
#define S_IFIFO 0010000
#endif
main()
{
int l;
#ifdef __FreeBSD__
/* From Andrew A. Chernov (ache@astral.msk.su):
* opening RDWR fifo fails in BSD 4.4, but select return values is
* right.
*/
exit(0);
#endif
(void)alarm(5);
#ifdef POSIX
if (mkfifo(nam, 0777))
#else
if (mknod(nam, S_IFIFO|0777, 0))
#endif
exit(1);
close(0);
if (open(nam, O_RDWR | O_NONBLOCK))
exit(1);
if (write(0, "TEST", 4) == -1)
exit(1);
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
main()
{
int s1, s2, s3, l;
struct sockaddr_un a;
(void)alarm(5);
if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
exit(1);
a.sun_family = AF_UNIX;
strcpy(a.sun_path, nam);
(void) unlink(nam);
if (bind(s1, (struct sockaddr *) &a, strlen(nam)+2) == -1)
exit(1);
if (listen(s1, 2))
exit(1);
if (fork() == 0)
{
if ((s2 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
kill(getppid(), 3);
(void)connect(s2, (struct sockaddr *)&a, strlen(nam) + 2);
if (write(s2, "HELLO", 5) == -1)
kill(getppid(), 3);
exit(0);
}
l = sizeof(a);
close(0);
if (accept(s1, (struct sockaddr *)&a, &l))
exit(1);
#endif
l = 1;
if (select(1, &l, 0, 0, 0) == -1)
exit(1);
if (select(1, &l, &l, 0, 0) != 2)
exit(1);
exit(0);
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
test -n "$silent" || echo "- select is ok"
else
test -n "$silent" || echo "- it is not usable"
{
test -n "$verbose" && \
echo " defining SELECT_BROKEN"
echo "#define" SELECT_BROKEN "1" >> confdefs.h
DEFS="$DEFS -DSELECT_BROKEN=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}SELECT_BROKEN\${ac_dB}SELECT_BROKEN\${ac_dC}1\${ac_dD}
\${ac_uA}SELECT_BROKEN\${ac_uB}SELECT_BROKEN\${ac_uC}1\${ac_uD}
\${ac_eA}SELECT_BROKEN\${ac_eB}SELECT_BROKEN\${ac_eC}1\${ac_eD}
"
}
fi
rm -fr conftest*
test -n "$silent" || echo "checking for tgetent"
olibs="$LIBS"
LIBS="-lcurses $olibs"
test -n "$silent" || echo "checking for libcurses"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() {
#ifdef __hpux
__sorry_hpux_libcurses_is_totally_broken_in_10_10();
#else
tgetent((char *)0, (char *)0);
#endif
; return 0; }
EOF
if eval $ac_compile; then
:
else
rm -rf conftest*
LIBS="-ltermcap $olibs"
test -n "$silent" || echo "checking for libtermcap"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { tgetent((char *)0, (char *)0);; return 0; }
EOF
if eval $ac_compile; then
:
else
rm -rf conftest*
LIBS="-ltermlib $olibs"
test -n "$silent" || echo "checking for libtermlib"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { tgetent((char *)0, (char *)0);; return 0; }
EOF
if eval $ac_compile; then
:
else
rm -rf conftest*
echo "configure: !!! no tgetent - no screen" >&2; exit 1
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
main()
{
exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
test -n "$silent" || echo "- you use the termcap database"
else
test -n "$silent" || echo "- you use the terminfo database"
{
test -n "$verbose" && \
echo " defining TERMINFO"
echo "#define" TERMINFO "1" >> confdefs.h
DEFS="$DEFS -DTERMINFO=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}TERMINFO\${ac_dB}TERMINFO\${ac_dC}1\${ac_dD}
\${ac_uA}TERMINFO\${ac_uB}TERMINFO\${ac_uC}1\${ac_uD}
\${ac_eA}TERMINFO\${ac_eB}TERMINFO\${ac_eC}1\${ac_eD}
"
}
fi
rm -fr conftest*
test -n "$silent" || echo "checking for ospeed"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
extern short ospeed;
int main() { return 0; }
int t() { ospeed=5;; return 0; }
EOF
if eval $ac_compile; then
:
else
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining NEED_OSPEED"
echo "#define" NEED_OSPEED "1" >> confdefs.h
DEFS="$DEFS -DNEED_OSPEED=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}NEED_OSPEED\${ac_dB}NEED_OSPEED\${ac_dC}1\${ac_dD}
\${ac_uA}NEED_OSPEED\${ac_uB}NEED_OSPEED\${ac_uC}1\${ac_uD}
\${ac_eA}NEED_OSPEED\${ac_eB}NEED_OSPEED\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$silent" || echo "checking for /dev/ptc"
if test -r /dev/ptc; then
{
test -n "$verbose" && \
echo " defining HAVE_DEV_PTC"
echo "#define" HAVE_DEV_PTC "1" >> confdefs.h
DEFS="$DEFS -DHAVE_DEV_PTC=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_DEV_PTC\${ac_dB}HAVE_DEV_PTC\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_DEV_PTC\${ac_uB}HAVE_DEV_PTC\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_DEV_PTC\${ac_eB}HAVE_DEV_PTC\${ac_eC}1\${ac_eD}
"
}
fi
test -n "$silent" || echo "checking for ptyranges"
if test -d /dev/ptym ; then
pdir='/dev/ptym'
else
pdir='/dev'
fi
ptys=`echo $pdir/pty??`
if test "$ptys" != "$pdir/pty??" ; then
p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
{
test -n "$verbose" && \
echo " defining" PTYRANGE0 to be "\"$p0\""
echo "#define" PTYRANGE0 "\"$p0\"" >> confdefs.h
DEFS="$DEFS -DPTYRANGE0=\"$p0\""
ac_sed_defs="${ac_sed_defs}\${ac_dA}PTYRANGE0\${ac_dB}PTYRANGE0\${ac_dC}\"$p0\"\${ac_dD}
\${ac_uA}PTYRANGE0\${ac_uB}PTYRANGE0\${ac_uC}\"$p0\"\${ac_uD}
\${ac_eA}PTYRANGE0\${ac_eB}PTYRANGE0\${ac_eC}\"$p0\"\${ac_eD}
"
}
{
test -n "$verbose" && \
echo " defining" PTYRANGE1 to be "\"$p1\""
echo "#define" PTYRANGE1 "\"$p1\"" >> confdefs.h
DEFS="$DEFS -DPTYRANGE1=\"$p1\""
ac_sed_defs="${ac_sed_defs}\${ac_dA}PTYRANGE1\${ac_dB}PTYRANGE1\${ac_dC}\"$p1\"\${ac_dD}
\${ac_uA}PTYRANGE1\${ac_uB}PTYRANGE1\${ac_uC}\"$p1\"\${ac_uD}
\${ac_eA}PTYRANGE1\${ac_eB}PTYRANGE1\${ac_eC}\"$p1\"\${ac_eD}
"
}
fi
test -n "$silent" || echo "checking default tty permissions/group"
rm -f conftest_grp
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
main()
{
struct stat sb;
char *x,*ttyname();
int om, m;
FILE *fp;
if (!(x = ttyname(0))) exit(1);
if (stat(x, &sb)) exit(1);
om = sb.st_mode;
if (om & 002) exit(0);
m = system("mesg y");
if (m == -1 || m == 127) exit(1);
if (stat(x, &sb)) exit(1);
m = sb.st_mode;
if (chmod(x, om)) exit(1);
if (m & 002) exit(0);
if (sb.st_gid == getgid()) exit(1);
if (!(fp=fopen("conftest_grp", "w")))
exit(1);
fprintf(fp, "%d\n", sb.st_gid);
fclose(fp);
exit(0);
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
if test -f conftest_grp; then
ptygrp=`cat conftest_grp`
test -n "$silent" || echo "- pty mode: 0620"
{
test -n "$verbose" && \
echo " defining" PTYMODE to be "0620"
echo "#define" PTYMODE "0620" >> confdefs.h
DEFS="$DEFS -DPTYMODE=0620"
ac_sed_defs="${ac_sed_defs}\${ac_dA}PTYMODE\${ac_dB}PTYMODE\${ac_dC}0620\${ac_dD}
\${ac_uA}PTYMODE\${ac_uB}PTYMODE\${ac_uC}0620\${ac_uD}
\${ac_eA}PTYMODE\${ac_eB}PTYMODE\${ac_eC}0620\${ac_eD}
"
}
{
test -n "$verbose" && \
echo " defining" PTYGROUP to be "$ptygrp"
echo "#define" PTYGROUP "$ptygrp" >> confdefs.h
DEFS="$DEFS -DPTYGROUP=$ptygrp"
ac_sed_defs="${ac_sed_defs}\${ac_dA}PTYGROUP\${ac_dB}PTYGROUP\${ac_dC}$ptygrp\${ac_dD}
\${ac_uA}PTYGROUP\${ac_uB}PTYGROUP\${ac_uC}$ptygrp\${ac_uD}
\${ac_eA}PTYGROUP\${ac_eB}PTYGROUP\${ac_eC}$ptygrp\${ac_eD}
"
}
else
test -n "$silent" || echo "- ptys are world accessable"
fi
else
test -n "$silent" || echo "- can't determine - assume ptys are world accessable"
fi
rm -fr conftest*
rm -f conftest_grp
test -n "$silent" || echo "checking for getutent"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <time.h> /* to get time_t on SCO */
#include <sys/types.h>
#if defined(SVR4) && !defined(DGUX)
#include <utmpx.h>
#define utmp utmpx
#else
#include <utmp.h>
#endif
#ifdef __hpux
#define pututline _pututline
#endif
int main() { return 0; }
int t() { int x = DEAD_PROCESS; struct utmp *y = pututline((struct utmp *)0); getutent();; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining GETUTENT"
echo "#define" GETUTENT "1" >> confdefs.h
DEFS="$DEFS -DGETUTENT=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}GETUTENT\${ac_dB}GETUTENT\${ac_dC}1\${ac_dD}
\${ac_uA}GETUTENT\${ac_uB}GETUTENT\${ac_uC}1\${ac_uD}
\${ac_eA}GETUTENT\${ac_eB}GETUTENT\${ac_eC}1\${ac_eD}
"
}
else
rm -rf conftest*
olibs="$LIBS"
LIBS="$LIBS -lgen"
test -n "$silent" || echo "checking for getutent with -lgen"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <time.h>
#include <sys/types.h>
#if defined(SVR4) && !defined(DGUX)
#include <utmpx.h>
#define utmp utmpx
#else
#include <utmp.h>
#endif
#ifdef __hpux
#define pututline _pututline
#endif
int main() { return 0; }
int t() { int x = DEAD_PROCESS; struct utmp *y = pututline((struct utmp *)0); getutent();; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining GETUTENT"
echo "#define" GETUTENT "1" >> confdefs.h
DEFS="$DEFS -DGETUTENT=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}GETUTENT\${ac_dB}GETUTENT\${ac_dC}1\${ac_dD}
\${ac_uA}GETUTENT\${ac_uB}GETUTENT\${ac_uC}1\${ac_uD}
\${ac_eA}GETUTENT\${ac_eB}GETUTENT\${ac_eC}1\${ac_eD}
"
}
else
rm -rf conftest*
LIBS="$olibs"
fi
rm -f conftest*
fi
rm -f conftest*
test -n "$silent" || echo "checking for ut_host"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <time.h>
#include <sys/types.h>
#if defined(SVR4) && !defined(DGUX)
#include <utmpx.h>
#define utmp utmpx
#else
#include <utmp.h>
#endif
int main() { return 0; }
int t() { struct utmp u; u.ut_host[0] = 0;; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining UTHOST"
echo "#define" UTHOST "1" >> confdefs.h
DEFS="$DEFS -DUTHOST=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}UTHOST\${ac_dB}UTHOST\${ac_dC}1\${ac_dD}
\${ac_uA}UTHOST\${ac_uB}UTHOST\${ac_uC}1\${ac_uD}
\${ac_eA}UTHOST\${ac_eB}UTHOST\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$silent" || echo "checking for libutil(s)"
test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
test -n "$silent" || echo "checking for getloadavg"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { getloadavg((double *)0, 0);; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining LOADAV_GETLOADAVG"
echo "#define" LOADAV_GETLOADAVG "1" >> confdefs.h
DEFS="$DEFS -DLOADAV_GETLOADAVG=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}LOADAV_GETLOADAVG\${ac_dB}LOADAV_GETLOADAVG\${ac_dC}1\${ac_dD}
\${ac_uA}LOADAV_GETLOADAVG\${ac_uB}LOADAV_GETLOADAVG\${ac_uC}1\${ac_uD}
\${ac_eA}LOADAV_GETLOADAVG\${ac_eB}LOADAV_GETLOADAVG\${ac_eC}1\${ac_eD}
"
}
load=1
else
rm -rf conftest*
if test -f /usr/lib/libkvm.a ; then
olibs="$LIBS"
LIBS="$LIBS -lkvm"
test -n "$silent" || echo "checking for getloadavg with -lkvm"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { getloadavg((double *)0, 0);; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining LOADAV_GETLOADAVG"
echo "#define" LOADAV_GETLOADAVG "1" >> confdefs.h
DEFS="$DEFS -DLOADAV_GETLOADAVG=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}LOADAV_GETLOADAVG\${ac_dB}LOADAV_GETLOADAVG\${ac_dC}1\${ac_dD}
\${ac_uA}LOADAV_GETLOADAVG\${ac_uB}LOADAV_GETLOADAVG\${ac_uC}1\${ac_uD}
\${ac_eA}LOADAV_GETLOADAVG\${ac_eB}LOADAV_GETLOADAVG\${ac_eC}1\${ac_eD}
"
}
load=1
else
rm -rf conftest*
LIBS="$olibs"
fi
rm -f conftest*
fi
fi
rm -f conftest*
if test -z "$load" ; then
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#if defined(NeXT) || defined(apollo) || defined(linux)
yes
#endif
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
rm -rf conftest*
load=1
fi
rm -f conftest*
fi
if test -z "$load" ; then
test -n "$silent" || echo "checking for kernelfile"
for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do
if test -f $core || test -c $core; then
break
fi
done
if test ! -f $core && test ! -c $core ; then
test -n "$silent" || echo "- no kernelfile found"
else
test -n "$silent" || echo "- using kernelfile '$core'"
{
test -n "$verbose" && \
echo " defining" LOADAV_UNIX to be "\"$core\""
echo "#define" LOADAV_UNIX "\"$core\"" >> confdefs.h
DEFS="$DEFS -DLOADAV_UNIX=\"$core\""
ac_sed_defs="${ac_sed_defs}\${ac_dA}LOADAV_UNIX\${ac_dB}LOADAV_UNIX\${ac_dC}\"$core\"\${ac_dD}
\${ac_uA}LOADAV_UNIX\${ac_uB}LOADAV_UNIX\${ac_uC}\"$core\"\${ac_uD}
\${ac_eA}LOADAV_UNIX\${ac_eB}LOADAV_UNIX\${ac_eC}\"$core\"\${ac_eD}
"
}
test -n "$silent" || echo "checking for nlist.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <nlist.h>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining NLIST_STRUCT"
echo "#define" NLIST_STRUCT "1" >> confdefs.h
DEFS="$DEFS -DNLIST_STRUCT=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}NLIST_STRUCT\${ac_dB}NLIST_STRUCT\${ac_dC}1\${ac_dD}
\${ac_uA}NLIST_STRUCT\${ac_uB}NLIST_STRUCT\${ac_uC}1\${ac_uD}
\${ac_eA}NLIST_STRUCT\${ac_eB}NLIST_STRUCT\${ac_eC}1\${ac_eD}
"
}
test -n "$silent" || echo "checking for n_un in struct nlist"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <nlist.h>
int main() { return 0; }
int t() { struct nlist n; n.n_un.n_name = 0;; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining NLIST_NAME_UNION"
echo "#define" NLIST_NAME_UNION "1" >> confdefs.h
DEFS="$DEFS -DNLIST_NAME_UNION=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}NLIST_NAME_UNION\${ac_dB}NLIST_NAME_UNION\${ac_dC}1\${ac_dD}
\${ac_uA}NLIST_NAME_UNION\${ac_uB}NLIST_NAME_UNION\${ac_uC}1\${ac_uD}
\${ac_eA}NLIST_NAME_UNION\${ac_eB}NLIST_NAME_UNION\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
fi
rm -f conftest*
test -n "$silent" || echo "checking for nlist declaration"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#ifdef NLIST_STRUCT
# include <nlist.h>
#else
# include <a.out.h>
#endif
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "nlist(( | )( | )*.*\(|\()" conftest.out >/dev/null 2>&1; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining NLIST_DECLARED"
echo "#define" NLIST_DECLARED "1" >> confdefs.h
DEFS="$DEFS -DNLIST_DECLARED=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}NLIST_DECLARED\${ac_dB}NLIST_DECLARED\${ac_dC}1\${ac_dD}
\${ac_uA}NLIST_DECLARED\${ac_uB}NLIST_DECLARED\${ac_uC}1\${ac_uD}
\${ac_eA}NLIST_DECLARED\${ac_eB}NLIST_DECLARED\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$silent" || echo "checking for avenrun symbol"
for av in avenrun _avenrun _Loadavg ; do
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#ifdef NLIST_STRUCT
#include <nlist.h>
#else
#include <a.out.h>
#endif
#ifdef __sgi
# if _MIPS_SZLONG == 64
# define nlist nlist64
# endif
#endif
struct nlist nl[2];
main()
{
#if !defined(_AUX_SOURCE) && !defined(AUX)
# ifdef NLIST_NAME_UNION
nl[0].n_un.n_name = "$av";
# else
nl[0].n_name = "$av";
# endif
#else
strncpy(nl[0].n_name, "$av", sizeof(nl[0].n_name));
#endif
nlist(LOADAV_UNIX, nl);
if (nl[0].n_value == 0)
exit(1);
exit(0);
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
avensym=$av;break
fi
rm -fr conftest*
done
if test -z "$avensym" ; then
test -n "$silent" || echo "- no avenrun symbol found"
else
test -n "$silent" || echo "- using avenrun symbol '$avensym'"
{
test -n "$verbose" && \
echo " defining" LOADAV_AVENRUN to be "\"$avensym\""
echo "#define" LOADAV_AVENRUN "\"$avensym\"" >> confdefs.h
DEFS="$DEFS -DLOADAV_AVENRUN=\"$avensym\""
ac_sed_defs="${ac_sed_defs}\${ac_dA}LOADAV_AVENRUN\${ac_dB}LOADAV_AVENRUN\${ac_dC}\"$avensym\"\${ac_dD}
\${ac_uA}LOADAV_AVENRUN\${ac_uB}LOADAV_AVENRUN\${ac_uC}\"$avensym\"\${ac_uD}
\${ac_eA}LOADAV_AVENRUN\${ac_eB}LOADAV_AVENRUN\${ac_eC}\"$avensym\"\${ac_eD}
"
}
load=1
fi
fi
fi
cat > conftest.c <<EOF
#include <sys/types.h>
#include <sys/param.h>
_CUT_HERE_
#if ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || defined(SVR4) || defined(sony_news) || defined(__alpha) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k))
loadtype=long
# if defined(apollo) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX)
loadscale=65536
# else
# if defined(FSCALE) && !defined(__osf__)
# undef FSCALE
loadscale=FSCALE
# else
# ifdef sgi
loadscale=1024
loadtype=int
# else
# if defined(MIPS) || defined(SVR4) || defined(m88k)
loadscale=256
# else /* not MIPS */
loadscale=1000 /* our default value */
# endif /* MIPS */
# endif /* sgi */
# endif /* not FSCALE */
# endif /* not apollo */
#else
loadtype=double
loadscale=1
#endif
#ifdef alliant
loadnum=4
#else
loadnum=3
#endif
EOF
$CPP $DEFS conftest.c 2>/dev/null | sed -e '1,/_CUT_HERE_/d' > conftest.out
. ./conftest.out
rm -f conftest*
if test -n "$load" ; then
{
test -n "$verbose" && \
echo " defining LOADAV"
echo "#define" LOADAV "1" >> confdefs.h
DEFS="$DEFS -DLOADAV=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}LOADAV\${ac_dB}LOADAV\${ac_dC}1\${ac_dD}
\${ac_uA}LOADAV\${ac_uB}LOADAV\${ac_uC}1\${ac_uD}
\${ac_eA}LOADAV\${ac_eB}LOADAV\${ac_eC}1\${ac_eD}
"
}
fi
if test -n "$loadtype" ; then
{
test -n "$verbose" && \
echo " defining" LOADAV_TYPE to be "$loadtype"
echo "#define" LOADAV_TYPE "$loadtype" >> confdefs.h
DEFS="$DEFS -DLOADAV_TYPE=$loadtype"
ac_sed_defs="${ac_sed_defs}\${ac_dA}LOADAV_TYPE\${ac_dB}LOADAV_TYPE\${ac_dC}$loadtype\${ac_dD}
\${ac_uA}LOADAV_TYPE\${ac_uB}LOADAV_TYPE\${ac_uC}$loadtype\${ac_uD}
\${ac_eA}LOADAV_TYPE\${ac_eB}LOADAV_TYPE\${ac_eC}$loadtype\${ac_eD}
"
}
fi
if test -n "$loadnum" ; then
{
test -n "$verbose" && \
echo " defining" LOADAV_NUM to be "$loadnum"
echo "#define" LOADAV_NUM "$loadnum" >> confdefs.h
DEFS="$DEFS -DLOADAV_NUM=$loadnum"
ac_sed_defs="${ac_sed_defs}\${ac_dA}LOADAV_NUM\${ac_dB}LOADAV_NUM\${ac_dC}$loadnum\${ac_dD}
\${ac_uA}LOADAV_NUM\${ac_uB}LOADAV_NUM\${ac_uC}$loadnum\${ac_uD}
\${ac_eA}LOADAV_NUM\${ac_eB}LOADAV_NUM\${ac_eC}$loadnum\${ac_eD}
"
}
fi
if test -n "$loadscale" ; then
{
test -n "$verbose" && \
echo " defining" LOADAV_SCALE to be "$loadscale"
echo "#define" LOADAV_SCALE "$loadscale" >> confdefs.h
DEFS="$DEFS -DLOADAV_SCALE=$loadscale"
ac_sed_defs="${ac_sed_defs}\${ac_dA}LOADAV_SCALE\${ac_dB}LOADAV_SCALE\${ac_dC}$loadscale\${ac_dD}
\${ac_uA}LOADAV_SCALE\${ac_uB}LOADAV_SCALE\${ac_uC}$loadscale\${ac_uD}
\${ac_eA}LOADAV_SCALE\${ac_eB}LOADAV_SCALE\${ac_eC}$loadscale\${ac_eD}
"
}
fi
if test -n "$posix" ; then
test -n "$silent" || echo "assuming posix signal definition"
{
test -n "$verbose" && \
echo " defining SIGVOID"
echo "#define" SIGVOID "1" >> confdefs.h
DEFS="$DEFS -DSIGVOID=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}SIGVOID\${ac_dB}SIGVOID\${ac_dC}1\${ac_dD}
\${ac_uA}SIGVOID\${ac_uB}SIGVOID\${ac_uC}1\${ac_uD}
\${ac_eA}SIGVOID\${ac_eB}SIGVOID\${ac_eC}1\${ac_eD}
"
}
else
test -n "$silent" || echo "checking for return type of signal handlers"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
#undef signal
#endif
extern void (*signal ()) ();
int main() { return 0; }
int t() { int i;; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining SIGVOID"
echo "#define" SIGVOID "1" >> confdefs.h
DEFS="$DEFS -DSIGVOID=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}SIGVOID\${ac_dB}SIGVOID\${ac_dC}1\${ac_dD}
\${ac_uA}SIGVOID\${ac_uB}SIGVOID\${ac_uC}1\${ac_uD}
\${ac_eA}SIGVOID\${ac_eB}SIGVOID\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$silent" || echo "checking for sigset"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int main() { return 0; }
int t() {
#ifdef SIGVOID
sigset(0, (void (*)())0);
#else
sigset(0, (int (*)())0);
#endif
; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining USESIGSET"
echo "#define" USESIGSET "1" >> confdefs.h
DEFS="$DEFS -DUSESIGSET=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}USESIGSET\${ac_dB}USESIGSET\${ac_dC}1\${ac_dD}
\${ac_uA}USESIGSET\${ac_uB}USESIGSET\${ac_uC}1\${ac_uD}
\${ac_eA}USESIGSET\${ac_eB}USESIGSET\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$silent" || echo "checking signal implementation"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifndef SIGCLD
#define SIGCLD SIGCHLD
#endif
#ifdef USESIGSET
#define signal sigset
#endif
int got;
#ifdef SIGVOID
void
#endif
hand()
{
got++;
}
main()
{
/* on hpux we use sigvec to get bsd signals */
#ifdef __hpux
(void)signal(SIGCLD, hand);
kill(getpid(), SIGCLD);
kill(getpid(), SIGCLD);
if (got < 2)
exit(1);
#endif
exit(0);
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
:
else
{
test -n "$verbose" && \
echo " defining SYSVSIGS"
echo "#define" SYSVSIGS "1" >> confdefs.h
DEFS="$DEFS -DSYSVSIGS=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSVSIGS\${ac_dB}SYSVSIGS\${ac_dC}1\${ac_dD}
\${ac_uA}SYSVSIGS\${ac_uB}SYSVSIGS\${ac_uC}1\${ac_uD}
\${ac_eA}SYSVSIGS\${ac_eB}SYSVSIGS\${ac_eC}1\${ac_eD}
"
}
fi
rm -fr conftest*
fi
test -n "$silent" || echo "checking for crypt and sec libraries"
test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
test -f /lib/libcrypt.a || test -f /usr/lib/libcrypt.a && LIBS="$LIBS -lcrypt"
test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
oldlibs="$LIBS"
LIBS="$LIBS -lsun"
test -n "$silent" || echo "checking for IRIX sun library"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { ; return 0; }
EOF
if eval $ac_compile; then
:
else
rm -rf conftest*
LIBS="$oldlibs"
fi
rm -f conftest*
test -n "$silent" || echo "checking for wait union"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
int main() { return 0; }
int t() {
union wait x;
int y;
#ifdef WEXITSTATUS
y = WEXITSTATUS(x);
#endif
; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining BSDWAIT"
echo "#define" BSDWAIT "1" >> confdefs.h
DEFS="$DEFS -DBSDWAIT=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}BSDWAIT\${ac_dB}BSDWAIT\${ac_dC}1\${ac_dD}
\${ac_uA}BSDWAIT\${ac_uB}BSDWAIT\${ac_uC}1\${ac_uD}
\${ac_eA}BSDWAIT\${ac_eB}BSDWAIT\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
if test -z "$butterfly"; then
test -n "$silent" || echo "checking for termio or termios"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <termio.h>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining TERMIO"
echo "#define" TERMIO "1" >> confdefs.h
DEFS="$DEFS -DTERMIO=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}TERMIO\${ac_dB}TERMIO\${ac_dC}1\${ac_dD}
\${ac_uA}TERMIO\${ac_uB}TERMIO\${ac_uC}1\${ac_uD}
\${ac_eA}TERMIO\${ac_eB}TERMIO\${ac_eC}1\${ac_eD}
"
}
else
rm -rf conftest*
if test -n "$posix"; then
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <termios.h>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining TERMIO"
echo "#define" TERMIO "1" >> confdefs.h
DEFS="$DEFS -DTERMIO=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}TERMIO\${ac_dB}TERMIO\${ac_dC}1\${ac_dD}
\${ac_uA}TERMIO\${ac_uB}TERMIO\${ac_uC}1\${ac_uD}
\${ac_eA}TERMIO\${ac_eB}TERMIO\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
fi
fi
rm -f conftest*
fi
test -n "$silent" || echo "checking for getspnam"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <shadow.h>
int main() { return 0; }
int t() { getspnam("x");; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining SHADOWPW"
echo "#define" SHADOWPW "1" >> confdefs.h
DEFS="$DEFS -DSHADOWPW=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}SHADOWPW\${ac_dB}SHADOWPW\${ac_dC}1\${ac_dD}
\${ac_uA}SHADOWPW\${ac_uB}SHADOWPW\${ac_uC}1\${ac_uD}
\${ac_eA}SHADOWPW\${ac_eB}SHADOWPW\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$silent" || echo "checking for getttyent"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { getttyent();; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining GETTTYENT"
echo "#define" GETTTYENT "1" >> confdefs.h
DEFS="$DEFS -DGETTTYENT=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}GETTTYENT\${ac_dB}GETTTYENT\${ac_dC}1\${ac_dD}
\${ac_uA}GETTTYENT\${ac_uB}GETTTYENT\${ac_uC}1\${ac_uD}
\${ac_eA}GETTTYENT\${ac_eB}GETTTYENT\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$silent" || echo "checking whether memcpy/memmove/bcopy handles overlapping arguments"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
main() {
char buf[10];
strcpy(buf, "abcdefghi");
bcopy(buf, buf + 2, 3);
if (strncmp(buf, "ababcf", 6))
exit(1);
strcpy(buf, "abcdefghi");
bcopy(buf + 2, buf, 3);
if (strncmp(buf, "cdedef", 6))
exit(1);
exit(0); /* libc version works properly. */
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
{
test -n "$verbose" && \
echo " defining USEBCOPY"
echo "#define" USEBCOPY "1" >> confdefs.h
DEFS="$DEFS -DUSEBCOPY=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}USEBCOPY\${ac_dB}USEBCOPY\${ac_dC}1\${ac_dD}
\${ac_uA}USEBCOPY\${ac_uB}USEBCOPY\${ac_uC}1\${ac_uD}
\${ac_eA}USEBCOPY\${ac_eB}USEBCOPY\${ac_eC}1\${ac_eD}
"
}
fi
rm -fr conftest*
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#define bcopy(s,d,l) memmove(d,s,l)
main() {
char buf[10];
strcpy(buf, "abcdefghi");
bcopy(buf, buf + 2, 3);
if (strncmp(buf, "ababcf", 6))
exit(1);
strcpy(buf, "abcdefghi");
bcopy(buf + 2, buf, 3);
if (strncmp(buf, "cdedef", 6))
exit(1);
exit(0); /* libc version works properly. */
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
{
test -n "$verbose" && \
echo " defining USEMEMMOVE"
echo "#define" USEMEMMOVE "1" >> confdefs.h
DEFS="$DEFS -DUSEMEMMOVE=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}USEMEMMOVE\${ac_dB}USEMEMMOVE\${ac_dC}1\${ac_dD}
\${ac_uA}USEMEMMOVE\${ac_uB}USEMEMMOVE\${ac_uC}1\${ac_uD}
\${ac_eA}USEMEMMOVE\${ac_eB}USEMEMMOVE\${ac_eC}1\${ac_eD}
"
}
fi
rm -fr conftest*
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#define bcopy(s,d,l) memcpy(d,s,l)
main() {
char buf[10];
strcpy(buf, "abcdefghi");
bcopy(buf, buf + 2, 3);
if (strncmp(buf, "ababcf", 6))
exit(1);
strcpy(buf, "abcdefghi");
bcopy(buf + 2, buf, 3);
if (strncmp(buf, "cdedef", 6))
exit(1);
exit(0); /* libc version works properly. */
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
{
test -n "$verbose" && \
echo " defining USEMEMCPY"
echo "#define" USEMEMCPY "1" >> confdefs.h
DEFS="$DEFS -DUSEMEMCPY=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}USEMEMCPY\${ac_dB}USEMEMCPY\${ac_dC}1\${ac_dD}
\${ac_uA}USEMEMCPY\${ac_uB}USEMEMCPY\${ac_uC}1\${ac_uD}
\${ac_eA}USEMEMCPY\${ac_eB}USEMEMCPY\${ac_eC}1\${ac_eD}
"
}
fi
rm -fr conftest*
test -n "$silent" || echo "checking for long file names"
(echo 1 > /tmp/conftest9012345) 2>/dev/null
(echo 2 > /tmp/conftest9012346) 2>/dev/null
val=`cat /tmp/conftest9012345 2>/dev/null`
if test -f /tmp/conftest9012345 && test "$val" = 1; then :
else
{
test -n "$verbose" && \
echo " defining" NAME_MAX to be "14"
echo "#define" NAME_MAX "14" >> confdefs.h
DEFS="$DEFS -DNAME_MAX=14"
ac_sed_defs="${ac_sed_defs}\${ac_dA}NAME_MAX\${ac_dB}NAME_MAX\${ac_dC}14\${ac_dD}
\${ac_uA}NAME_MAX\${ac_uB}NAME_MAX\${ac_uC}14\${ac_uD}
\${ac_eA}NAME_MAX\${ac_eB}NAME_MAX\${ac_eC}14\${ac_eD}
"
}
fi
rm -f /tmp/conftest*
test -n "$silent" || echo "checking for vsprintf"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <varargs.h>
#include <stdio.h>
int main() { return 0; }
int t() { vsprintf();; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining USEVARARGS"
echo "#define" USEVARARGS "1" >> confdefs.h
DEFS="$DEFS -DUSEVARARGS=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}USEVARARGS\${ac_dB}USEVARARGS\${ac_dC}1\${ac_dD}
\${ac_uA}USEVARARGS\${ac_uB}USEVARARGS\${ac_uC}1\${ac_uD}
\${ac_eA}USEVARARGS\${ac_eB}USEVARARGS\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$silent" || echo "checking for directory library header"
ac_dir_header=
if test -z "$ac_dir_header"; then
test -n "$silent" || echo "checking for dirent.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <dirent.h>
int main() { return 0; }
int t() { DIR *dirp = 0;; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining DIRENT"
echo "#define" DIRENT "1" >> confdefs.h
DEFS="$DEFS -DDIRENT=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD}
\${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD}
\${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD}
"
}
ac_dir_header=dirent.h
fi
rm -f conftest*
fi
if test -z "$ac_dir_header"; then
test -n "$silent" || echo "checking for sys/ndir.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ndir.h>
int main() { return 0; }
int t() { DIR *dirp = 0;; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining SYSNDIR"
echo "#define" SYSNDIR "1" >> confdefs.h
DEFS="$DEFS -DSYSNDIR=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD}
\${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD}
\${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD}
"
}
ac_dir_header=sys/ndir.h
fi
rm -f conftest*
fi
if test -z "$ac_dir_header"; then
test -n "$silent" || echo "checking for sys/dir.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/dir.h>
int main() { return 0; }
int t() { DIR *dirp = 0;; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining SYSDIR"
echo "#define" SYSDIR "1" >> confdefs.h
DEFS="$DEFS -DSYSDIR=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD}
\${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD}
\${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD}
"
}
ac_dir_header=sys/dir.h
fi
rm -f conftest*
fi
if test -z "$ac_dir_header"; then
test -n "$silent" || echo "checking for ndir.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <ndir.h>
int main() { return 0; }
int t() { DIR *dirp = 0;; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining NDIR"
echo "#define" NDIR "1" >> confdefs.h
DEFS="$DEFS -DNDIR=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD}
\${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD}
\${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD}
"
}
ac_dir_header=ndir.h
fi
rm -f conftest*
fi
test -n "$silent" || echo "checking for closedir return value"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_dir_header>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
:
else
{
test -n "$verbose" && \
echo " defining VOID_CLOSEDIR"
echo "#define" VOID_CLOSEDIR "1" >> confdefs.h
DEFS="$DEFS -DVOID_CLOSEDIR=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD}
\${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD}
\${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD}
"
}
fi
rm -fr conftest*
test -n "$silent" || echo "checking for Xenix"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#if defined(M_XENIX) && !defined(M_UNIX)
yes
#endif
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
rm -rf conftest*
XENIX=1
fi
rm -f conftest*
if test -n "$XENIX"; then
LIBS="$LIBS -lx"
case "$DEFS" in
*SYSNDIR*) ;;
*) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
esac
fi
test -n "$silent" || echo "checking for setenv"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { setenv((char *)0,(char *)0);unsetenv((char *)0);; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining USESETENV"
echo "#define" USESETENV "1" >> confdefs.h
DEFS="$DEFS -DUSESETENV=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}USESETENV\${ac_dB}USESETENV\${ac_dC}1\${ac_dD}
\${ac_uA}USESETENV\${ac_uB}USESETENV\${ac_uC}1\${ac_uD}
\${ac_eA}USESETENV\${ac_eB}USESETENV\${ac_eC}1\${ac_eD}
"
}
else
rm -rf conftest*
test -n "$silent" || echo "checking for putenv"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { putenv((char *)0);unsetenv((char *)0);; return 0; }
EOF
if eval $ac_compile; then
:
else
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining NEEDPUTENV"
echo "#define" NEEDPUTENV "1" >> confdefs.h
DEFS="$DEFS -DNEEDPUTENV=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}NEEDPUTENV\${ac_dB}NEEDPUTENV\${ac_dC}1\${ac_dD}
\${ac_uA}NEEDPUTENV\${ac_uB}NEEDPUTENV\${ac_uC}1\${ac_uD}
\${ac_eA}NEEDPUTENV\${ac_eB}NEEDPUTENV\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
fi
rm -f conftest*
test -n "$silent" || echo "checking for rename"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { rename(0,0);; return 0; }
EOF
if eval $ac_compile; then
:
else
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining NEED_RENAME"
echo "#define" NEED_RENAME "1" >> confdefs.h
DEFS="$DEFS -DNEED_RENAME=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}NEED_RENAME\${ac_dB}NEED_RENAME\${ac_dC}1\${ac_dD}
\${ac_uA}NEED_RENAME\${ac_uB}NEED_RENAME\${ac_uC}1\${ac_uD}
\${ac_eA}NEED_RENAME\${ac_eB}NEED_RENAME\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$silent" || echo "checking for _exit"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { _exit(0);; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining HAVE__EXIT"
echo "#define" HAVE__EXIT "1" >> confdefs.h
DEFS="$DEFS -DHAVE__EXIT=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE__EXIT\${ac_dB}HAVE__EXIT\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE__EXIT\${ac_uB}HAVE__EXIT\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE__EXIT\${ac_eB}HAVE__EXIT\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$silent" || echo "checking for lstat"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { lstat(0,0);; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining HAVE_LSTAT"
echo "#define" HAVE_LSTAT "1" >> confdefs.h
DEFS="$DEFS -DHAVE_LSTAT=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LSTAT\${ac_dB}HAVE_LSTAT\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_LSTAT\${ac_uB}HAVE_LSTAT\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_LSTAT\${ac_eB}HAVE_LSTAT\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$silent" || echo "checking for strerror"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
int main() { return 0; }
int t() { strerror(0);; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
{
test -n "$verbose" && \
echo " defining HAVE_STRERROR"
echo "#define" HAVE_STRERROR "1" >> confdefs.h
DEFS="$DEFS -DHAVE_STRERROR=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_STRERROR\${ac_dB}HAVE_STRERROR\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_STRERROR\${ac_uB}HAVE_STRERROR\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_STRERROR\${ac_eB}HAVE_STRERROR\${ac_eC}1\${ac_eD}
"
}
fi
rm -f conftest*
test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lsec -lseq"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
main(){exit(0);}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
:
else
echo "configure: Can't run the compiler - internal error. Sorry." >&2; exit 1
fi
rm -fr conftest*
if test -n "$prefix"; then
{
test -n "$verbose" && \
echo " defining" ETCSCREENRC to be "\"$prefix/etc/screenrc\""
echo "#define" ETCSCREENRC "\"$prefix/etc/screenrc\"" >> confdefs.h
DEFS="$DEFS -DETCSCREENRC=\"$prefix/etc/screenrc\""
ac_sed_defs="${ac_sed_defs}\${ac_dA}ETCSCREENRC\${ac_dB}ETCSCREENRC\${ac_dC}\"$prefix/etc/screenrc\"\${ac_dD}
\${ac_uA}ETCSCREENRC\${ac_uB}ETCSCREENRC\${ac_uC}\"$prefix/etc/screenrc\"\${ac_uD}
\${ac_eA}ETCSCREENRC\${ac_eB}ETCSCREENRC\${ac_eC}\"$prefix/etc/screenrc\"\${ac_eD}
"
}
fi
# The preferred way to propogate these variables is regular @ substitutions.
if test -n "$prefix"; then
ac_prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
else
prefix=/usr/local
fi
if test -n "$exec_prefix"; then
ac_prsub="$ac_prsub
s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
else
exec_prefix='${prefix}' # Let make expand it.
fi
# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
fi
# Quote sed substitution magic chars in DEFS.
cat >conftest.def <<EOF
$DEFS
EOF
ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
rm -f conftest.def
# Substitute for predefined variables.
trap 'rm -f config.status; exit 1' 1 2 15
echo creating config.status
rm -f config.status
cat > config.status <<EOF
#!/bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $configure_args
ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
for ac_option
do
case "\$ac_option" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "config.status generated by autoconf version 1.11"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
*) echo "\$ac_cs_usage"; exit 1 ;;
esac
done
trap 'rm -fr Makefile doc/Makefile config.h conftest*; exit 1' 1 2 15
VERSION='$VERSION'
CC='$CC'
CPP='$CPP'
AWK='$AWK'
INSTALL='$INSTALL'
INSTALL_PROGRAM='$INSTALL_PROGRAM'
INSTALL_DATA='$INSTALL_DATA'
LIBS='$LIBS'
srcdir='$srcdir'
top_srcdir='$top_srcdir'
prefix='$prefix'
exec_prefix='$exec_prefix'
ac_prsub='$ac_prsub'
ac_vpsub='$ac_vpsub'
extrasub='$extrasub'
EOF
cat >> config.status <<\EOF
ac_given_srcdir=$srcdir
CONFIG_FILES=${CONFIG_FILES-"Makefile doc/Makefile"}
for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
ac_dir_suffix="/$ac_dir"
else
ac_dir_suffix=
fi
# A "../" for each directory in $ac_dir_suffix.
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
case "$ac_given_srcdir" in
.) srcdir=.
if test -z "$ac_dir_suffix"; then top_srcdir=.
else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
*) # Relative path.
srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
echo creating "$ac_file"
rm -f "$ac_file"
comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
case "$ac_file" in
*.c | *.h | *.C | *.cc | *.m ) echo "/* $comment_str */" > "$ac_file" ;;
* ) echo "# $comment_str" > "$ac_file" ;;
esac
sed -e "
$ac_prsub
$ac_vpsub
$extrasub
s%@VERSION@%$VERSION%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@AWK@%$AWK%g
s%@INSTALL@%$INSTALL%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@LIBS@%$LIBS%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@prefix@%$prefix%g
s%@exec_prefix@%$exec_prefix%g
s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
fi; done
# These sed commands are put into ac_sed_defs when defining a macro.
# They are broken into pieces to make the sed script easier to manage.
# They are passed to sed as "A NAME B NAME C VALUE D", where NAME
# is the cpp macro being defined and VALUE is the value it is being given.
# Each defining turns into a single global substitution command.
# Hopefully no one uses "!" as a variable value.
# Other candidates for the sed separators, like , and @, do get used.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s!^\([ ]*\)#\([ ]*define[ ][ ]*\)'
ac_dB='\([ ][ ]*\)[^ ]*!\1#\2'
ac_dC='\3'
ac_dD='!g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='\([ ]\)!\1#\2define\3'
ac_uC=' '
ac_uD='\4!g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_eB='$!\1#\2define\3'
ac_eC=' '
ac_eD='!g'
rm -f conftest.sed
EOF
# Turn off quoting long enough to insert the sed commands.
rm -f conftest.sh
cat > conftest.sh <<EOF
$ac_sed_defs
EOF
# Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
# on the size of here documents.
# Maximum number of lines to put in a single here document.
ac_max_sh_lines=9
while :
do
# wc gives bogus results for an empty file on some AIX systems.
ac_lines=`grep -c . conftest.sh`
if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
rm -f conftest.s1 conftest.s2
sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9.
sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10.
# Write a limited-size here document to append to conftest.sed.
echo 'cat >> conftest.sed <<CONFEOF' >> config.status
cat conftest.s1 >> config.status
echo 'CONFEOF' >> config.status
rm -f conftest.s1 conftest.sh
mv conftest.s2 conftest.sh
done
rm -f conftest.sh
# Now back to your regularly scheduled config.status.
cat >> config.status <<\EOF
# This sed command replaces #undef's with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it in
# config.h.
cat >> conftest.sed <<\CONFEOF
s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
CONFEOF
rm -f conftest.h
# Break up the sed commands because old seds have small limits.
ac_max_sed_lines=20
CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
echo creating $ac_file
cp $ac_given_srcdir/$ac_file.in conftest.h1
cp conftest.sed conftest.stm
while :
do
ac_lines=`grep -c . conftest.stm`
if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
rm -f conftest.s1 conftest.s2 conftest.h2
sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20.
sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21.
sed -f conftest.s1 < conftest.h1 > conftest.h2
rm -f conftest.s1 conftest.h1 conftest.stm
mv conftest.h2 conftest.h1
mv conftest.s2 conftest.stm
done
rm -f conftest.stm conftest.h
echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
cat conftest.h1 >> conftest.h
rm -f conftest.h1
if cmp -s $ac_file conftest.h 2>/dev/null; then
# The file exists and we would not be changing it.
echo "$ac_file is unchanged"
rm -f conftest.h
else
rm -f $ac_file
mv conftest.h $ac_file
fi
fi; done
rm -f conftest.sed
exit 0
EOF
chmod +x config.status
# Some shells look in PATH for config.status without the "./".
test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} ./config.status
# a hook for preserving undef directive in config.h
if test -z "$no_create" ; then
mv config.h conftest
sed -e 's@^\(.*\)defin.\( .*\) .*/\*\(.*KEEP_UNDEF_HERE\)@\1undef\2 /\*\3@' < conftest > config.h
rm -f conftest
fi
cat >> config.status << EOF
mv config.h conftest
sed -e 's@^\(.*\)defin.\( .*\) .*/\*\(.*KEEP_UNDEF_HERE\)@\1undef\2 /\*\3@' < conftest > config.h
rm -f conftest
EOF
echo ""
if test -z "$AWK"; then
echo "!!! Since you have no awk you must copy the files 'comm.h.dist'"
echo "!!! and 'term.h.dist' to 'comm.h' and 'term.h'."
echo "!!! Do _not_ change the user configuration section in config.h!"
echo "Please check the pathnames in the Makefile."
else
echo "Now please check the pathnames in the Makefile and the user"
echo "configuration section in config.h."
fi
echo "Then type 'make' to make screen. Good luck."
echo ""
|