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
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
|
dnl Process this file with autoconf to produce a configure script.
dnl configure.in for xlockmore. Various things were taken from xscreensaver's
dnl configure.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski.
dnl
AC_INIT(config.h.in)
AC_CANONICAL_HOST
canonical=$host
AC_PROG_CC
dnl Check if C++ compiler is present. If not set CXX to the C-compiler used
dnl for the other compilations.
if test "$CC" = gcc; then
AC_CHECK_PROGS(CXX, $CCC g++ CC C++ c++ cxx cc++ xlC $CC, gcc)
else
AC_CHECK_PROGS(CXX, $CCC CC C++ g++ c++ cxx cc++ xlC $CC, gcc)
fi
AC_PROG_CXX
if test "${CXX}" = "xlC" ; then
CXXFLAGS="${CXXFLAGS} -+"
fi
dnl If you're using g++-2.95 or later and have old X11 includes, you may need
dnl to use "g++ -fpermissive" in the Makefiles
dnl if test "${CXX}" = "g++" ; then
dnl gpp_major_version=`g++ --version | cut -f1 -d.`
dnl if test "${gpp_major_version}" -gt "2" ; then
dnl AC_MSG_RESULT([enabling -fpermissive option for g++])
dnl CXXFLAGS="${CXXFLAGS} -fpermissive"
dnl fi
dnl if test "${gpp_major_version}" -eq "2" ; then
dnl gpp_minor_version=`g++ --version | cut -f2 -d.`
dnl if test "${gpp_minor_version}" -ge "95" ; then
dnl AC_MSG_RESULT([enabling -fpermissive option for g++])
dnl CXXFLAGS="${CXXFLAGS} -fpermissive"
dnl fi
dnl fi
dnl fi
dnl These 2 assume for now c++ exists....
AC_DEFINE(HAVE_CXX)
CCC=
PACKAGE=xlockmore
AC_SUBST(PACKAGE)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
VERSION=5.03
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
dnl Checks for programs.
dnl AC_ARG_WITH(gcc,
dnl[ --without-gcc use CC to compile])
dnl test -n "$CC" && cc_specified=yes
dnl case ${with_gcc} in
dnl yes ) CC=gcc ;;
dnl dnl yes ) CC=g++ ;;
dnl no ) CC=cc ;;
dnl * ) AC_PROG_CC;;
dnl * ) AC_PROG_CXX ;;
dnl esac
if test -n "$GCC"; then
AC_MSG_RESULT(Turning on GNU compiler warnings.)
dnl This creates a lot of noise.
dnl CFLAGS="${CFLAGS} -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings"
dnl -Wall -Wmissing-prototypes -Wstrict-prototypes
dnl -Waggregate-return
CC="$CC -Wnested-externs -Wno-format"
fi
###############################################################################
#
# Functions to figure out how to disable // comments in ANSI C code.
#
# (With recent gcc, this is done with "-std=c89". With older gcc, this
# is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
# gcc. Old gcc doesn't support -std, and new gcc doesn't support -lang.
# so much for compatibility!)
#
###############################################################################
AC_DEFUN(AC_GCC_ACCEPTS_STD,
[if test -n "$GCC"; then
AC_CACHE_CHECK([whether gcc accepts -std],
ac_cv_gcc_accepts_std,
[if ( gcc -E -std=c89 - </dev/null 2>&1 >/dev/null | \
grep unrecognized >/dev/null ); then
ac_cv_gcc_accepts_std=no
else
ac_cv_gcc_accepts_std=yes
fi])
ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
fi
])
AC_DEFUN(AC_NO_CPLUSPLUS_COMMENTS_IN_C_CODE,
[if test -n "$GCC"; then
AC_GCC_ACCEPTS_STD
AC_MSG_RESULT(Disabling C++ comments in ANSI C code.)
#
# The reason that // comments are banned is that gcc is
# basically the only compiler in the world that supports them in C code.
# All other vendors support them only in their C++ compilers, not in their
# ANSI C compilers. This means that it's a portability problem: every time
# these comments have snuck into the source code, I've gotten
# complaints about it the next day. So we turn off support for them in gcc
# as well to prevent them from accidentially slipping in.
#
if test "$ac_gcc_accepts_std" = yes ; then
#
# -std=c89 defines __STRICT_ANSI__, which we don't want.
# (That appears to be the only additional preprocessor symbol
# it defines, in addition to the syntax changes it makes.)
#
# -std=gnu89 is no good, because // comments were a GNU extension
# before they were in the ANSI C 99 spec... (gcc 2.96 permits //
# with -std=gnu89 but not with -std=c89.)
#
# -U__STRICT_ANSI__ broken on Redhat 7.1
CC="$CC -std=c89 -U__STRICT_ANSI__"
else
# The old way:
CC="$CC -Wp,-lang-c89"
fi
fi
])
opt_purify=no
AC_ARG_WITH(purify, [ --with-purify configure to postprocess with purify], opt_purify=$withval)
if test "$opt_purify" = yes; then
AC_MSG_RESULT([enabling purify])
PURIFY="purify"
else
PURIFY=
fi
#AC_NO_CPLUSPLUS_COMMENTS_IN_C_CODE
AC_PROG_LN_S
AC_PROG_CPP
AC_AIX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
ac_link_test="-L"
# test test
AC_MSG_CHECKING([test -h])
if (test \! -h /) >/dev/null 2>/dev/null ; then
ac_link_test="-h"
AC_MSG_RESULT($ac_link_test)
else
AC_MSG_RESULT($ac_link_test)
fi
dnl Optional features.
dnl add copious amounts of debugging with gcc
dnl Checks for header files.
dnl AC_HEADER_STDC /* If its not ansi, its not going to go */
AC_ISC_POSIX
dnl AC_HEADER_SYS_WAIT
dnl AC_CHECK_HEADERS(poll.h sys/poll.h)
AC_CHECK_HEADERS(fcntl.h limits.h sys/select.h sys/time.h syslog.h unistd.h memory.h sys/param.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
dnl AC_HEADER_SYS_WAIT
AC_TYPE_MODE_T
AC_TYPE_UID_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_MSG_CHECKING([for getenv declaration])
AC_EGREP_HEADER(getenv, stdlib.h,
AC_DEFINE(DECLARED_GETENV) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
dnl Checks for library functions.
dnl AC_TYPE_GETGROUPS
dnl AC_TYPE_SIGNAL
dnl AC_CHECK_FUNCS(poll)
dnl AC_CHECK_FUNCS(signal)
AC_CHECK_FUNCS(gethostname select strdup)
AC_CHECK_FUNC(setpriority, AC_DEFINE(HAVE_SETPRIORITY))
AC_CHECK_FUNC(vfork, AC_DEFINE(HAVE_VFORK))
AC_CHECK_FUNC(seteuid, AC_DEFINE(HAVE_SETEUID))
if test $ac_cv_func_seteuid = no; then
AC_CHECK_FUNC(setreuid, AC_DEFINE(HAVE_SETREUID))
fi
# Configure paths for GTK+
# Owen Taylor 97-11-3
dnl AC_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
dnl
AC_DEFUN(AC_PATH_GTK,
[dnl
dnl Get the cflags and libraries from the gtk-config script
dnl
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=DIR Prefix where GTK is installed (optional)],
gtk_config_prefix="$withval", gtk_config_prefix="")
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=DIR
Exec prefix where GTK is installed (optional)],
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK program],
, enable_gtktest=yes)
if test x$gtk_config_exec_prefix != x ; then
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
fi
fi
if test x$gtk_config_prefix != x ; then
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
fi
fi
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
min_gtk_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
no_gtk=""
if test "$GTK_CONFIG" = "no" ; then
no_gtk=yes
else
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_gtktest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
dnl
dnl Now check if the installed GTK is sufficiently new. (Also sanity
dnl checks the results of gtk-config to some extent
dnl
rm -f conf.gtktest
AC_TRY_RUN([
#include <gtk/gtk.h>
#include <stdio.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.gtktest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_gtk_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
printf("%s, bad version string\n", "$min_gtk_version");
exit(1);
}
if ((gtk_major_version != $gtk_config_major_version) ||
(gtk_minor_version != $gtk_config_minor_version) ||
(gtk_micro_version != $gtk_config_micro_version))
{
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf ("*** was found! If gtk-config was correct, then it is best\n");
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
else
{
if ((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_gtk" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GTK_CONFIG" = "no" ; then
echo "*** The gtk-config script installed by GTK could not be found"
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GTK_CONFIG environment variable to the"
echo "*** full path to gtk-config."
else
if test -f conf.gtktest ; then
:
else
echo "*** Could not run GTK test program, checking why..."
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
AC_TRY_LINK([
#include <gtk/gtk.h>
#include <stdio.h>
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GTK or finding the wrong"
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GTK_CFLAGS=""
GTK_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
rm -f conf.gtktest
])
dnl X Window System files.
AC_PATH_XTRA
if test "$no_x" = yes; then
XLIBS=NONE
else
if test -n "${x_includes}"; then
XLOCKINC="-I${x_includes} ${XLOCKINC}"
XMLOCKINC="-I${x_includes} ${XMLOCKINC}"
if test "${CXX}" = "g++" ; then
dnl Do not warn me about anything here
XLOCKINC="-isystem ${x_includes} ${XLOCKINC}"
XMLOCKINC="-isystem ${x_includes} ${XMLOCKINC}"
fi
fi
XLIBS="${x_libraries}"
if test -n "${x_libraries}"; then
XLOCK_LDFLAGS="/usr/lib:${x_libraries}"
XMLOCK_LDFLAGS="/usr/lib:${x_libraries}"
XLOCKLIBPATHS="-L${x_libraries} ${XLOCKLIBPATHS}"
XMLOCKLIBPATHS="-L${x_libraries} ${XMLOCKLIBPATHS}"
fi
XLOCKLIBS="${X_PRE_LIBS} ${X_EXTRA_LIBS} ${XLOCKLIBS}"
case "${canonical}" in
*-*-sco* )
XLOCKLIBS="${X_PRE_LIBS} ${XLOCKLIBS} ${X_EXTRA_LIBS}"
;;
*-*-cygwin* )
XLOCKLIBS="${XLOCKLIBS} -lcrypt"
XMLOCKLIBS="-lSM -lICE ${XMLOCKLIBS}"
;;
esac
XMLOCKLIBS="-lXt ${XMLOCKLIBS}"
# if you need regex and regcmp
# XMLOCKLIBS="-lXt ${XMLOCKLIBS} -lgen"
dnl AC_DEFINE(X11) /* If there is no X, its not going to go */
fi
# Try and find the app-defaults directory.
AC_DEFUN(AC_PATH_X_APP_DEFAULTS_XMKMF,
[
rm -fr conftestdir
if mkdir conftestdir; then
cd conftestdir
# Make sure to not put "make" in the Imakefile rules, since we grep it out.
cat > Imakefile <<'EOF'
acfindx:
@echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
EOF
if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
# GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
fi
cd ..
rm -fr conftestdir
fi])
AC_DEFUN(AC_PATH_X_APP_DEFAULTS_DIRECT,
[ # Look for the directory under a standard set of common directories.
# Check X11 before X11Rn because it's often a symlink to the current release.
for ac_dir in \
/lib/X11/app-defaults \
/lib/app-defaults \
/lib/X11R6.5.1/app-defaults \
/lib/X11R6.5.1/X11/app-defaults \
/lib/X11R6.4/app-defaults \
/lib/X11R6.4/X11/app-defaults \
/lib/X11R6.3/app-defaults \
/lib/X11R6.3/X11/app-defaults \
/lib/X11R6.2/app-defaults \
/lib/X11R6.2/X11/app-defaults \
/lib/X11R6.1/app-defaults \
/lib/X11R6.1/X11/app-defaults \
/lib/X11R6/app-defaults \
/lib/X11R6/X11/app-defaults \
/lib/X11R5/app-defaults \
/lib/X11R5/X11/app-defaults \
/lib/X11R4/app-defaults \
/lib/X11R4/X11/app-defaults \
; \
do
found=""
if test -d "${prefix}$ac_dir"; then
ac_x_app_defaults=\\\$\\\{prefix\\\}$ac_dir
found="1"
break
fi
done
if test -z "$found"; then
for ac_dir in \
/usr/X11/lib/app-defaults \
/lib/X11R6.5.1/lib/app-defaults \
/lib/X11R6.5.1/lib/X11/app-defaults \
/lib/X11R6.4/lib/app-defaults \
/lib/X11R6.4/lib/X11/app-defaults \
/usr/X11R6.3/lib/app-defaults \
/usr/X11R6.3/lib/X11/app-defaults \
/usr/X11R6.2/lib/app-defaults \
/usr/X11R6.2/lib/X11/app-defaults \
/usr/X11R6.1/lib/app-defaults \
/usr/X11R6.1/lib/X11/app-defaults \
/usr/X11R6/lib/app-defaults \
/usr/X11R6/lib/X11/app-defaults \
/usr/X11R5/lib/app-defaults \
/usr/X11R5/lib/X11/app-defaults \
/usr/X11R4/lib/app-defaults \
/usr/X11R4/lib/X11/app-defaults \
\
/usr/lib/X11/app-defaults \
/usr/lib/X11R6.5.1/app-defaults \
/usr/lib/X11R6.4/app-defaults \
/usr/lib/X11R6.3/app-defaults \
/usr/lib/X11R6.2/app-defaults \
/usr/lib/X11R6.1/app-defaults \
/usr/lib/X11R6/app-defaults \
/usr/lib/X11R5/app-defaults \
/usr/lib/X11R4/app-defaults \
\
/usr/local/X11/lib/app-defaults \
/usr/remote/X11/lib/app-defaults \
/usr/local/X11R6.5.1/lib/app-defaults \
/usr/local/X11R6.5.1/lib/X11/app-defaults \
/usr/local/X11R6.4/lib/app-defaults \
/usr/local/X11R6.4/lib/X11/app-defaults \
/usr/local/X11R6.3/lib/app-defaults \
/usr/local/X11R6.3/lib/X11/app-defaults \
/usr/local/X11R6.2/lib/app-defaults \
/usr/local/X11R6.2/lib/X11/app-defaults \
/usr/local/X11R6.1/lib/app-defaults \
/usr/local/X11R6.1/lib/X11/app-defaults \
/usr/local/X11R6/lib/app-defaults \
/usr/local/X11R6/lib/X11/app-defaults \
/usr/local/X11R5/lib/app-defaults \
/usr/local/X11R5/lib/X11/app-defaults \
/usr/local/X11R4/lib/app-defaults \
/usr/local/X11R4/lib/X11/app-defaults \
\
/usr/local/lib/X11/app-defaults \
/usr/remote/lib/X11/app-defaults \
/usr/local/lib/X11R6.5.1/app-defaults \
/usr/local/lib/X11R6.5.1/X11/app-defaults \
/usr/local/lib/X11R6.4/app-defaults \
/usr/local/lib/X11R6.4/X11/app-defaults \
/usr/local/lib/X11R6.3/app-defaults \
/usr/local/lib/X11R6.3/X11/app-defaults \
/usr/local/lib/X11R6.2/app-defaults \
/usr/local/lib/X11R6.2/X11/app-defaults \
/usr/local/lib/X11R6.1/app-defaults \
/usr/local/lib/X11R6.1/X11/app-defaults \
/usr/local/lib/X11R6/app-defaults \
/usr/local/lib/X11R6/X11/app-defaults \
/usr/local/lib/X11R5/app-defaults \
/usr/local/lib/X11R5/X11/app-defaults \
/usr/local/lib/X11R4/app-defaults \
/usr/local/lib/X11R4/X11/app-defaults \
\
/usr/X386/lib/X11/app-defaults \
/usr/x386/lib/X11/app-defaults \
/usr/XFree86/lib/X11/app-defaults \
\
/usr/lib/X11/app-defaults \
/usr/unsupported/lib/X11/app-defaults \
/usr/athena/lib/X11/app-defaults \
/usr/local/x11r5/lib/X11/app-defaults \
/usr/lpp/Xamples/lib/X11/app-defaults \
/lib/usr/lib/X11/app-defaults \
/usr/local/lib/app-defaults \
/usr/remote/lib/app-defaults \
\
/usr/openwin/lib/app-defaults \
/usr/openwin/lib/X11/app-defaults \
/usr/openwin/share/lib/app-defaults \
/usr/openwin/share/lib/X11/app-defaults \
\
/X11R6.5.1/lib/app-defaults \
/X11R6.4/lib/app-defaults \
/X11R6.3/lib/app-defaults \
/X11R6.2/lib/app-defaults \
/X11R6.1/lib/app-defaults \
/X11R6/lib/app-defaults \
/X11R5/lib/app-defaults \
/X11R4/lib/app-defaults \
; \
do
if test -d "$ac_dir"; then
ac_x_app_defaults=$ac_dir
break
fi
done
fi
])
AC_DEFUN(AC_PATH_X_APP_DEFAULTS,
[AC_REQUIRE_CPP()
AC_CACHE_CHECK([for X app-defaults directory], ac_cv_x_app_defaults,
[AC_PATH_X_APP_DEFAULTS_XMKMF
AC_PATH_X_APP_DEFAULTS_DIRECT
if test x"$ac_x_app_defaults" = x; then
ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
else
# Record where we found app-defaults for the cache.
ac_cv_x_app_defaults="$ac_x_app_defaults"
fi])
eval ac_x_app_defaults="$ac_cv_x_app_defaults"])
AC_PATH_X_APP_DEFAULTS
APPDEFAULTS=$ac_x_app_defaults
AC_ARG_WITH(includes, [ --with-includes=DIR search include DIR for optional packages below])
case "x$withval" in
x/*|x.*)
extra_include=$withval
AC_MSG_RESULT([adding $extra_include to include search path for following packages])
if test ! -d $extra_include; then
AC_MSG_RESULT([Warning: Directory $extra_include does not exist])
fi
;;
*)
extra_include=""
;;
esac
AC_ARG_WITH(libraries, [ --with-libraries=DIR search library DIR for optional packages below])
case "x$withval" in
x/*|x.*)
extra_lib=$withval
AC_MSG_RESULT([adding $extra_lib to library search path for following packages])
if test ! -d $extra_lib; then
AC_MSG_RESULT([Warning: Directory $extra_lib does not exist])
fi
;;
*)
extra_lib=""
;;
esac
dnl Xm MOTIF Motif motif
AC_DEFUN(AC_PATH_MOTIF_DIRECT,
[test -z "$motif_direct_test_library" && motif_direct_test_library=Xm
test -z "$motif_direct_test_function" && motif_direct_test_function=XmCreatePushButton
test -z "$motif_direct_test_include" && motif_direct_test_include=Xm/Xm.h
for ac_dir in \
/usr/include/Motif1.2 \
/usr/Motif1.2/include \
\
/usr/motif/include \
\
/usr/X11R6.5.1/include \
/usr/X11R6.4/include \
/usr/X11R6.3/include \
/usr/X11R6.2/include \
/usr/X11R6.1/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11R4/include \
\
/usr/include/X11R6.5.1 \
/usr/include/X11R6.4 \
/usr/include/X11R6.3 \
/usr/include/X11R6.2 \
/usr/include/X11R6.1 \
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
\
/usr/local/X11R6.5.1/include \
/usr/local/X11R6.4/include \
/usr/local/X11R6.3/include \
/usr/local/X11R6.2/include \
/usr/local/X11R6.1/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
/usr/local/X11R4/include \
\
/usr/local/include/X11R6.5.1 \
/usr/local/include/X11R6.4 \
/usr/local/include/X11R6.3 \
/usr/local/include/X11R6.2 \
/usr/local/include/X11R6.1 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
/usr/local/include/X11R4 \
\
/usr/X11/include \
/usr/include/X11 \
/usr/local/X11/include \
/usr/local/include/X11 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/dt/include \
\
/usr/local/include \
/usr/remote/include \
/usr/include \
/usr/unsupported/include \
/usr/athena/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
$extra_include \
; \
do
if test -r "$ac_dir/$motif_direct_test_include"; then
no_motif= ac_motif_includes=$ac_dir
break
fi
done
# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$motif_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_motif_includes" | sed s/include/lib/` \
/usr/lib/Motif1.2 \
/usr/Motif1.2/lib \
\
/usr/motif/lib \
\
/usr/X11R6.5.1/lib \
/usr/X11R6.4/lib \
/usr/X11R6.3/lib \
/usr/X11R6.2/lib \
/usr/X11R6.1/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11R4/lib \
\
/usr/lib/X11R6.5.1 \
/usr/lib/X11R6.4 \
/usr/lib/X11R6.3 \
/usr/lib/X11R6.2 \
/usr/lib/X11R6.1 \
/usr/lib/X11R6 \
/usr/lib/X11R5 \
/usr/lib/X11R4 \
\
/usr/local/X11R6.5.1/lib \
/usr/local/X11R6.4/lib \
/usr/local/X11R6.3/lib \
/usr/local/X11R6.2/lib \
/usr/local/X11R6.1/lib \
/usr/local/X11R6/lib \
/usr/local/X11R5/lib \
/usr/local/X11R4/lib \
\
/usr/local/lib/X11R6.5.1 \
/usr/local/lib/X11R6.4 \
/usr/local/lib/X11R6.3 \
/usr/local/lib/X11R6.2 \
/usr/local/lib/X11R6.1 \
/usr/local/lib/X11R6 \
/usr/local/lib/X11R5 \
/usr/local/lib/X11R4 \
\
/usr/X11/lib \
/usr/lib/X11 \
/usr/local/X11/lib \
\
/usr/X386/lib \
/usr/x386/lib \
/usr/XFree86/lib/X11 \
\
/usr/lib \
/usr/local/lib \
/usr/remote/lib \
/usr/unsupported/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
$extra_lib \
; \
do
for ac_extension in a so sl; do
if test -r $ac_dir/lib${motif_direct_test_library}.$ac_extension; then
no_motif= ac_motif_libraries=$ac_dir
break 2
fi
done
done
LIBS="$ac_save_LIBS"])
AC_DEFUN(AC_PATH_MOTIF,
[AC_REQUIRE_CPP()dnl
motif_includes=NONE
motif_libraries=NONE
AC_MSG_CHECKING(for Motif)
AC_ARG_WITH(motif, [ --without-motif disable Motif (for xmlock)])
if test "x$with_motif" = xno; then
no_motif=yes
else
if test "x$motif_includes" != xNONE && test "x$motif_libraries" != xNONE; then
no_motif=
else
AC_CACHE_VAL(ac_cv_path_motif,
[# One or both of these vars are not set, and there is no cached value.
no_motif=yes
AC_PATH_MOTIF_DIRECT
if test "$no_motif" = yes; then
ac_cv_path_motif="no_motif=yes"
else
ac_cv_path_motif="no_motif= ac_motif_includes=$ac_motif_includes ac_motif_libraries=$ac_motif_libraries"
fi])dnl
fi
eval "$ac_cv_path_motif"
fi # with_motif != no
if test "$no_motif" = yes; then
AC_MSG_RESULT(no)
XMLOCK=""
INSTALL_XMLOCK=""
UNINSTALL_XMLOCK=""
else
XMLOCKLIBS="-lXm ${XMLOCKLIBS}"
XMLOCK="xmlock"
INSTALL_XMLOCK="install_xmlock"
UNINSTALL_XMLOCK="uninstall_xmlock"
test "x$motif_includes" = xNONE && motif_includes=$ac_motif_includes
test "x$motif_libraries" = xNONE && motif_libraries=$ac_motif_libraries
ac_cv_path_motif="no_motif= ac_motif_includes=$motif_includes ac_motif_libraries=$motif_libraries"
AC_MSG_RESULT([libraries $motif_libraries, headers $motif_includes])
fi
])
AC_PATH_MOTIF
if test "x$motif_libraries" != x && test "x$motif_libraries" != xNONE ; then
XMLOCK_LDFLAGS="${XMLOCK_LDFLAGS}:$motif_libraries"
XMLOCKLIBPATHS="${XMLOCKLIBPATHS} -L$motif_libraries"
fi
if test "x$motif_includes" != x && test "x$motif_includes" != xNONE ; then
XMLOCKINC="${XMLOCKINC} -I$motif_includes"
fi
dnl Xmu EDITRES Editres editres
AC_DEFUN(AC_PATH_EDITRES_DIRECT,
[test -z "$editres_direct_test_library" && editres_direct_test_library=Xmu
test -z "$editres_direct_test_function" && editres_direct_test_function=_XEditResCheckMessages
test -z "$editres_direct_test_include" && editres_direct_test_include=X11/Xmu/Editres.h
for ac_dir in \
/usr/include/X11R6.5.1 \
/usr/include/X11R6.4 \
/usr/include/X11R6.3 \
/usr/include/X11R6.2 \
/usr/include/X11R6.1 \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11R4/include \
/usr/X11/include \
\
/usr/include/X11 \
/usr/include/X11R6.5.1 \
/usr/include/X11R6.4 \
/usr/include/X11R6.3 \
/usr/include/X11R6.2 \
/usr/include/X11R6.1 \
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
\
/usr/local/X11/include \
/usr/local/X11R6.5.1/include \
/usr/local/X11R6.4/include \
/usr/local/X11R6.3/include \
/usr/local/X11R6.2/include \
/usr/local/X11R6.1/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
/usr/local/X11R4/include \
\
/usr/local/include/X11 \
/usr/local/include/X11R6.5.1 \
/usr/local/include/X11R6.4 \
/usr/local/include/X11R6.3 \
/usr/local/include/X11R6.2 \
/usr/local/include/X11R6.1 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
/usr/local/include/X11R4 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include \
\
/usr/local/include \
/usr/remote/include \
/usr/include \
/usr/unsupported/include \
/usr/athena/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include \
$extra_include \
; \
do
if test -r "$ac_dir/$editres_direct_test_include"; then
no_editres= ac_editres_includes=$ac_dir
break
fi
done
# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$editres_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_editres_includes" | sed s/include/lib/` \
\
/usr/X11/lib \
/usr/X11R6.5.1/lib \
/usr/X11R6.4/lib \
/usr/X11R6.3/lib \
/usr/X11R6.2/lib \
/usr/X11R6.1/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11R4/lib \
\
/usr/lib/X11 \
/usr/lib/X11R6.5.1 \
/usr/lib/X11R6.4 \
/usr/lib/X11R6.3 \
/usr/lib/X11R6.2 \
/usr/lib/X11R6.1 \
/usr/lib/X11R6 \
/usr/lib/X11R5 \
/usr/lib/X11R4 \
\
/usr/local/X11/lib \
/usr/local/X11R6.5.1/lib \
/usr/local/X11R6.4/lib \
/usr/local/X11R6.3/lib \
/usr/local/X11R6.2/lib \
/usr/local/X11R6.1/lib \
/usr/local/X11R6/lib \
/usr/local/X11R5/lib \
/usr/local/X11R4/lib \
\
/usr/local/lib/X11 \
/usr/local/lib/X11R6.5.1 \
/usr/local/lib/X11R6.4 \
/usr/local/lib/X11R6.3 \
/usr/local/lib/X11R6.2 \
/usr/local/lib/X11R6.1 \
/usr/local/lib/X11R6 \
/usr/local/lib/X11R5 \
/usr/local/lib/X11R4 \
\
/usr/X386/lib \
/usr/x386/lib \
/usr/XFree86/lib/X11 \
\
/usr/lib \
/usr/local/lib \
/usr/remote/lib \
/usr/unsupported/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
/lib/usr/lib/X11 \
\
/usr/openwin/lib \
/usr/openwin/share/lib \
$extra_lib \
; \
do
for ac_extension in a so sl; do
if test -r $ac_dir/lib${editres_direct_test_library}.$ac_extension; then
no_editres= ac_editres_libraries=$ac_dir
break 2
fi
done
done
LIBS="$ac_save_LIBS"])
AC_DEFUN(AC_PATH_EDITRES,
[AC_REQUIRE_CPP()dnl
editres_includes=NONE
editres_libraries=NONE
AC_MSG_CHECKING(for Editres)
AC_ARG_WITH(editres, [ --without-editres disable debugger (for x?lock)])
if test "x$with_editres" = xno; then
no_editres=yes
else
if test "x$editres_includes" != xNONE && test "x$editres_libraries" != xNONE; then
no_editres=
else
AC_CACHE_VAL(ac_cv_path_editres,
[# One or both of these vars are not set, and there is no cached value.
no_editres=yes
AC_PATH_EDITRES_DIRECT
if test "$no_editres" = yes; then
ac_cv_path_editres="no_editres=yes"
else
ac_cv_path_editres="no_editres= ac_editres_includes=$ac_editres_includes ac_editres_libraries=$ac_editres_libraries"
fi])dnl
fi
eval "$ac_cv_path_editres"
fi # with_editres != no
if test "$no_editres" = yes; then
AC_MSG_RESULT(no)
else
AC_DEFINE(USE_XMU)
XLOCKLIBS="${XLOCKLIBS} -lXmu"
XMLOCKLIBS="-lXmu ${XMLOCKLIBS}"
test "x$editres_includes" = xNONE && editres_includes=$ac_editres_includes
test "x$editres_libraries" = xNONE && editres_libraries=$ac_editres_libraries
ac_cv_path_editres="no_editres= ac_editres_includes=$editres_includes ac_editres_libraries=$editres_libraries"
AC_MSG_RESULT([libraries $editres_libraries, headers $editres_includes])
fi
])
AC_PATH_EDITRES
if test "x$editres_libraries" != x && test "x$editres_libraries" != xNONE ; then
XMLOCK_LDFLAGS="${XMLOCK_LDFLAGS}:$editres_libraries"
XMLOCKLIBPATHS="${XMLOCKLIBPATHS} -L$editres_libraries"
fi
if test "x$editres_includes" != x && test "x$editres_includes" != xNONE ; then
XMLOCKINC="${XMLOCKINC} -I$editres_includes"
fi
xpm=no
dnl Xpm XPM xpm
AC_DEFUN(AC_PATH_XPM_DIRECT,
[test -z "$xpm_direct_test_library" && xpm_direct_test_library=Xpm
test -z "$xpm_direct_test_function" && xpm_direct_test_function=XpmCreateImageFromData
test -z "$xpm_direct_test_include" && xpm_direct_test_include=X11/xpm.h
for ac_dir in \
/usr/X11R6.5.1/include \
/usr/X11R6.4/include \
/usr/X11R6.3/include \
/usr/X11R6.2/include \
/usr/X11R6.1/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11R4/include \
/usr/X11/include \
\
/usr/include/X11 \
/usr/include/X11R6.5.1 \
/usr/include/X11R6.4 \
/usr/include/X11R6.3 \
/usr/include/X11R6.2 \
/usr/include/X11R6.1 \
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
\
/usr/local/X11/include \
/usr/local/X11R6.5.1/include \
/usr/local/X11R6.4/include \
/usr/local/X11R6.3/include \
/usr/local/X11R6.2/include \
/usr/local/X11R6.1/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
/usr/local/X11R4/include \
\
/usr/local/include/X11 \
/usr/local/include/X11R6.5.1 \
/usr/local/include/X11R6.4 \
/usr/local/include/X11R6.3 \
/usr/local/include/X11R6.2 \
/usr/local/include/X11R6.1 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
/usr/local/include/X11R4 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/local/include \
/usr/remote/include \
/usr/include \
/usr/unsupported/include \
/usr/athena/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include \
/usr/openwin/include \
\
/usr/include/Vk \
$extra_include \
; \
do
if test -r "$ac_dir/$xpm_direct_test_include"; then
no_xpm= ac_xpm_includes=$ac_dir
break
fi
done
# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$xpm_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_xpm_includes" | sed s%/X11$%% | sed s/include/lib/` \
\
/usr/X11/lib \
/usr/X11R6.5.1/lib \
/usr/X11R6.4/lib \
/usr/X11R6.3/lib \
/usr/X11R6.2/lib \
/usr/X11R6.1/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11R4/lib \
\
/usr/lib/X11 \
/usr/lib/X11R6.5.1 \
/usr/lib/X11R6.4 \
/usr/lib/X11R6.3 \
/usr/lib/X11R6.2 \
/usr/lib/X11R6.1 \
/usr/lib/X11R6 \
/usr/lib/X11R5 \
/usr/lib/X11R4 \
\
/usr/local/X11/lib \
/usr/local/X11R6/lib \
/usr/local/X11R5/lib \
/usr/local/X11R4/lib \
\
/usr/local/lib/X11 \
/usr/local/X11R6.5.1/lib \
/usr/local/X11R6.4/lib \
/usr/local/X11R6.3/lib \
/usr/local/X11R6.2/lib \
/usr/local/X11R6.1/lib \
/usr/local/lib/X11R6 \
/usr/local/lib/X11R5 \
/usr/local/lib/X11R4 \
\
/usr/X386/lib \
/usr/x386/lib \
/usr/XFree86/lib/X11 \
\
/usr/lib \
/usr/local/lib \
/usr/remote/lib \
/usr/unsupported/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
/lib/usr/lib/X11 \
\
/usr/openwin/lib \
/usr/openwin/share/lib \
$extra_lib \
; \
do
for ac_extension in a so sl; do
if test -r $ac_dir/lib${xpm_direct_test_library}.$ac_extension; then
no_xpm= ac_xpm_libraries=$ac_dir
break 2
fi
done
done
LIBS="$ac_save_LIBS"])
AC_DEFUN(AC_PATH_XPM,
[AC_REQUIRE_CPP()dnl
xpm_includes=NONE
xpm_libraries=NONE
AC_MSG_CHECKING(for XPM)
AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM mode(s)])
if test "x$with_xpm" = xno; then
no_xpm=yes
else
if test "x$xpm_includes" != xNONE && test "x$xpm_libraries" != xNONE; then
no_xpm=
else
AC_CACHE_VAL(ac_cv_path_xpm,
[# One or both of these vars are not set, and there is no cached value.
no_xpm=yes
AC_PATH_XPM_DIRECT
if test "$no_xpm" = yes; then
ac_cv_path_xpm="no_xpm=yes"
else
ac_cv_path_xpm="no_xpm= ac_xpm_includes=$ac_xpm_includes ac_xpm_libraries=$ac_xpm_libraries"
fi])dnl
fi
eval "$ac_cv_path_xpm"
fi # with_xpm != no
if test "$no_xpm" = yes; then
AC_MSG_RESULT(no)
XPM="#"
else
xpm=yes
AC_DEFINE(HAVE_XPM)
XLOCKLIBS="${XLOCKLIBS} -lXpm"
XMLOCKLIBS="-lXpm ${XMLOCKLIBS}"
test "x$xpm_includes" = xNONE && xpm_includes=$ac_xpm_includes
test "x$xpm_libraries" = xNONE && xpm_libraries=$ac_xpm_libraries
ac_cv_path_xpm="no_xpm= ac_xpm_includes=$xpm_includes ac_xpm_libraries=$xpm_libraries"
AC_MSG_RESULT([libraries $xpm_libraries, headers $xpm_includes])
XPM=""
fi
])
AC_PATH_XPM
if test "x$xpm_libraries" != x && test "x$xpm_libraries" != xNONE ; then
XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$xpm_libraries"
XMLOCK_LDFLAGS="${XMLOCK_LDFLAGS}:$xpm_libraries"
XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$xpm_libraries"
XMLOCKLIBPATHS="${XMLOCKLIBPATHS} -L$xpm_libraries"
fi
if test "x$xpm_includes" != x && test "x$xpm_includes" != xNONE ; then
XLOCKINC="${XLOCKINC} -I$xpm_includes"
fi
gltt=no
dnl gltt GLTT
AC_DEFUN(AC_PATH_GLTT_DIRECT,
[test -z "$gltt_direct_test_library" && gltt_direct_test_library=gltt
# test -z "$gltt_direct_test_function" && gltt_direct_test_function=glttCreateImageFromData
test -z "$gltt_direct_test_include" && gltt_direct_test_include=gltt/GLTTFont.h
for ac_dir in \
/usr/X11R6.5.1/include \
/usr/X11R6.4/include \
/usr/X11R6.3/include \
/usr/X11R6.2/include \
/usr/X11R6.1/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11R4/include \
/usr/X11/include \
\
/usr/include/X11 \
/usr/include/X11R6.5.1 \
/usr/include/X11R6.4 \
/usr/include/X11R6.3 \
/usr/include/X11R6.2 \
/usr/include/X11R6.1 \
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
\
/usr/local/X11/include \
/usr/local/X11R6.5.1/include \
/usr/local/X11R6.4/include \
/usr/local/X11R6.3/include \
/usr/local/X11R6.2/include \
/usr/local/X11R6.1/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
/usr/local/X11R4/include \
\
/usr/local/include/X11 \
/usr/local/include/X11R6.5.1 \
/usr/local/include/X11R6.4 \
/usr/local/include/X11R6.3 \
/usr/local/include/X11R6.2 \
/usr/local/include/X11R6.1 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
/usr/local/include/X11R4 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/local/include \
/usr/remote/include \
/usr/include \
/usr/unsupported/include \
/usr/athena/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include \
/usr/openwin/include \
\
$extra_include \
; \
do
if test -r "$ac_dir/$gltt_direct_test_include"; then
no_gltt= ac_gltt_includes=$ac_dir
break
fi
done
# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$gltt_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_gltt_includes" | sed s%/X11$%% | sed s/include/lib/` \
\
/usr/X11/lib \
/usr/X11R6.5.1/lib \
/usr/X11R6.4/lib \
/usr/X11R6.3/lib \
/usr/X11R6.2/lib \
/usr/X11R6.1/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11R4/lib \
\
/usr/lib/X11 \
/usr/lib/X11R6.5.1 \
/usr/lib/X11R6.4 \
/usr/lib/X11R6.3 \
/usr/lib/X11R6.2 \
/usr/lib/X11R6.1 \
/usr/lib/X11R6 \
/usr/lib/X11R5 \
/usr/lib/X11R4 \
\
/usr/local/X11/lib \
/usr/local/X11R6/lib \
/usr/local/X11R5/lib \
/usr/local/X11R4/lib \
\
/usr/local/lib/X11 \
/usr/local/X11R6.5.1/lib \
/usr/local/X11R6.4/lib \
/usr/local/X11R6.3/lib \
/usr/local/X11R6.2/lib \
/usr/local/X11R6.1/lib \
/usr/local/lib/X11R6 \
/usr/local/lib/X11R5 \
/usr/local/lib/X11R4 \
\
/usr/X386/lib \
/usr/x386/lib \
/usr/XFree86/lib/X11 \
\
/usr/lib \
/usr/local/lib \
/usr/remote/lib \
/usr/unsupported/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
/lib/usr/lib/X11 \
\
/usr/openwin/lib \
/usr/openwin/share/lib \
$extra_lib \
; \
do
for ac_extension in a so sl; do
if test -r $ac_dir/lib${gltt_direct_test_library}.$ac_extension; then
no_gltt= ac_gltt_libraries=$ac_dir
break 2
fi
done
done
LIBS="$ac_save_LIBS"])
AC_DEFUN(AC_PATH_GLTT,
[AC_REQUIRE_CPP()dnl
gltt_includes=NONE
gltt_libraries=NONE
AC_MSG_CHECKING(for GLTT)
AC_ARG_WITH(gltt, [ --without-gltt disable GL True Text library])
if test "x$with_gltt" = xno; then
no_gltt=yes
else
if test "x$gltt_includes" != xNONE && test "x$gltt_libraries" != xNONE; then
no_gltt=
else
AC_CACHE_VAL(ac_cv_path_gltt,
[# One or both of these vars are not set, and there is no cached value.
no_gltt=yes
AC_PATH_GLTT_DIRECT
if test "$no_gltt" = yes; then
ac_cv_path_gltt="no_gltt=yes"
else
ac_cv_path_gltt="no_gltt= ac_gltt_includes=$ac_gltt_includes ac_gltt_libraries=$ac_gltt_libraries"
fi])dnl
fi
eval "$ac_cv_path_gltt"
fi # with_gltt != no
if test "$no_gltt" = yes; then
AC_MSG_RESULT(no)
GLTT="#"
else
gltt=yes
AC_DEFINE(HAVE_GLTT)
XLOCKLIBS="${XLOCKLIBS} -lgltt"
test "x$gltt_includes" = xNONE && gltt_includes=$ac_gltt_includes
test "x$gltt_libraries" = xNONE && gltt_libraries=$ac_gltt_libraries
ac_cv_path_gltt="no_gltt= ac_gltt_includes=$gltt_includes ac_gltt_libraries=$gltt_libraries"
AC_MSG_RESULT([libraries $gltt_libraries, headers $gltt_includes])
GLTT=""
fi
])
AC_PATH_GLTT
if test "x$gltt_libraries" != x && test "x$gltt_libraries" != xNONE ; then
XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$gltt_libraries"
XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$gltt_libraries"
fi
if test "x$gltt_includes" != x && test "x$gltt_includes" != xNONE ; then
XLOCKINC="${XLOCKINC} -I$gltt_includes"
fi
ttf=no
dnl ttf TTF
AC_DEFUN(AC_PATH_TTF_DIRECT,
[test -z "$ttf_direct_test_library" && ttf_direct_test_library=ttf
test -z "$ttf_direct_test_function" && ttf_direct_test_function=TT_Init_FreeType
test -z "$ttf_direct_test_include" && ttf_direct_test_include=gltt/FTFace.h
for ac_dir in \
/usr/X11R6.5.1/include \
/usr/X11R6.4/include \
/usr/X11R6.3/include \
/usr/X11R6.2/include \
/usr/X11R6.1/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11R4/include \
/usr/X11/include \
\
/usr/include/X11 \
/usr/include/X11R6.5.1 \
/usr/include/X11R6.4 \
/usr/include/X11R6.3 \
/usr/include/X11R6.2 \
/usr/include/X11R6.1 \
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
\
/usr/local/X11/include \
/usr/local/X11R6.5.1/include \
/usr/local/X11R6.4/include \
/usr/local/X11R6.3/include \
/usr/local/X11R6.2/include \
/usr/local/X11R6.1/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
/usr/local/X11R4/include \
\
/usr/local/include/X11 \
/usr/local/include/X11R6.5.1 \
/usr/local/include/X11R6.4 \
/usr/local/include/X11R6.3 \
/usr/local/include/X11R6.2 \
/usr/local/include/X11R6.1 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
/usr/local/include/X11R4 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/local/include \
/usr/remote/include \
/usr/include/X11 \
/usr/unsupported/include \
/usr/athena/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include \
/usr/openwin/include \
\
$extra_include \
; \
do
if test -r "$ac_dir/$ttf_direct_test_include"; then
no_ttf= ac_ttf_includes=$ac_dir
break
fi
done
# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$ttf_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_ttf_includes" | sed s%/X11$%% | sed s/include/lib/` \
\
/usr/X11/lib \
/usr/X11R6.5.1/lib \
/usr/X11R6.4/lib \
/usr/X11R6.3/lib \
/usr/X11R6.2/lib \
/usr/X11R6.1/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11R4/lib \
\
/usr/lib/X11 \
/usr/lib/X11R6.5.1 \
/usr/lib/X11R6.4 \
/usr/lib/X11R6.3 \
/usr/lib/X11R6.2 \
/usr/lib/X11R6.1 \
/usr/lib/X11R6 \
/usr/lib/X11R5 \
/usr/lib/X11R4 \
\
/usr/local/X11/lib \
/usr/local/X11R6/lib \
/usr/local/X11R5/lib \
/usr/local/X11R4/lib \
\
/usr/local/lib/X11 \
/usr/local/X11R6.5.1/lib \
/usr/local/X11R6.4/lib \
/usr/local/X11R6.3/lib \
/usr/local/X11R6.2/lib \
/usr/local/X11R6.1/lib \
/usr/local/lib/X11R6 \
/usr/local/lib/X11R5 \
/usr/local/lib/X11R4 \
\
/usr/X386/lib \
/usr/x386/lib \
/usr/XFree86/lib/X11 \
\
/usr/lib \
/usr/local/lib \
/usr/remote/lib \
/usr/unsupported/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
/lib/usr/lib/X11 \
\
/usr/openwin/lib \
/usr/openwin/share/lib \
$extra_lib \
; \
do
for ac_extension in a so sl; do
if test -r $ac_dir/lib${ttf_direct_test_library}.$ac_extension; then
no_ttf= ac_ttf_libraries=$ac_dir
break 2
fi
done
done
LIBS="$ac_save_LIBS"])
AC_DEFUN(AC_PATH_TTF,
[AC_REQUIRE_CPP()dnl
ttf_includes=NONE
ttf_libraries=NONE
AC_MSG_CHECKING(for TTF)
AC_ARG_WITH(ttf, [ --without-ttf disable True Text Font mode(s)])
if test "x$with_ttf" = xno; then
no_ttf=yes
else
if test "x$ttf_includes" != xNONE && test "x$ttf_libraries" != xNONE; then
no_ttf=
else
AC_CACHE_VAL(ac_cv_path_ttf,
[# One or both of these vars are not set, and there is no cached value.
no_ttf=yes
AC_PATH_TTF_DIRECT
if test "$no_ttf" = yes; then
ac_cv_path_ttf="no_ttf=yes"
else
ac_cv_path_ttf="no_ttf= ac_ttf_includes=$ac_ttf_includes ac_ttf_libraries=$ac_ttf_libraries"
fi])dnl
fi
eval "$ac_cv_path_ttf"
fi # with_ttf != no
if test "$no_ttf" = yes; then
AC_MSG_RESULT(no)
TTF="#"
else
ttf=yes
AC_DEFINE(HAVE_TTF)
if test "x$prefix" = "xNONE"; then
AC_DEFINE_UNQUOTED(DEF_TTFONT, "/usr/lib/X11/xlock/fonts/")
else
AC_DEFINE_UNQUOTED(DEF_TTFONT, "${prefix}/lib/X11/xlock/fonts/")
fi
XLOCKLIBS="${XLOCKLIBS} -lttf"
test "x$ttf_includes" = xNONE && ttf_includes=$ac_ttf_includes
test "x$ttf_libraries" = xNONE && ttf_libraries=$ac_ttf_libraries
ac_cv_path_ttf="no_ttf= ac_ttf_includes=$ttf_includes ac_ttf_libraries=$ttf_libraries"
AC_MSG_RESULT([libraries $ttf_libraries, headers $ttf_includes])
TTF=""
fi
])
AC_PATH_TTF
if test "x$ttf_libraries" != x && test "x$ttf_libraries" != xNONE ; then
XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$ttf_libraries"
XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$ttf_libraries"
fi
if test "x$ttf_includes" != x && test "x$ttf_includes" != xNONE ; then
XLOCKINC="${XLOCKINC} -I$ttf_includes"
fi
ftgl=no
dnl ftgl FTGL
AC_DEFUN(AC_PATH_FTGL_DIRECT,
[test -z "$ftgl_direct_test_library" && ftgl_direct_test_library=ftgl
# test -z "$ftgl_direct_test_function" && ftgl_direct_test_function=ftglCreateImageFromData
test -z "$ftgl_direct_test_include" && ftgl_direct_test_include=FTGL/FTFont.h
for ac_dir in \
/usr/X11R6.5.1/include \
/usr/X11R6.4/include \
/usr/X11R6.3/include \
/usr/X11R6.2/include \
/usr/X11R6.1/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11R4/include \
/usr/X11/include \
\
/usr/include/X11 \
/usr/include/X11R6.5.1 \
/usr/include/X11R6.4 \
/usr/include/X11R6.3 \
/usr/include/X11R6.2 \
/usr/include/X11R6.1 \
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
\
/usr/local/X11/include \
/usr/local/X11R6.5.1/include \
/usr/local/X11R6.4/include \
/usr/local/X11R6.3/include \
/usr/local/X11R6.2/include \
/usr/local/X11R6.1/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
/usr/local/X11R4/include \
\
/usr/local/include/X11 \
/usr/local/include/X11R6.5.1 \
/usr/local/include/X11R6.4 \
/usr/local/include/X11R6.3 \
/usr/local/include/X11R6.2 \
/usr/local/include/X11R6.1 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
/usr/local/include/X11R4 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/local/include \
/usr/remote/include \
/usr/include \
/usr/unsupported/include \
/usr/athena/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include \
/usr/openwin/include \
\
$extra_include \
; \
do
if test -r "$ac_dir/$ftgl_direct_test_include"; then
no_ftgl= ac_ftgl_includes=$ac_dir
break
fi
done
# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$ftgl_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_ftgl_includes" | sed s%/X11$%% | sed s/include/lib/` \
\
/usr/X11/lib \
/usr/X11R6.5.1/lib \
/usr/X11R6.4/lib \
/usr/X11R6.3/lib \
/usr/X11R6.2/lib \
/usr/X11R6.1/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11R4/lib \
\
/usr/lib/X11 \
/usr/lib/X11R6.5.1 \
/usr/lib/X11R6.4 \
/usr/lib/X11R6.3 \
/usr/lib/X11R6.2 \
/usr/lib/X11R6.1 \
/usr/lib/X11R6 \
/usr/lib/X11R5 \
/usr/lib/X11R4 \
\
/usr/local/X11/lib \
/usr/local/X11R6/lib \
/usr/local/X11R5/lib \
/usr/local/X11R4/lib \
\
/usr/local/lib/X11 \
/usr/local/X11R6.5.1/lib \
/usr/local/X11R6.4/lib \
/usr/local/X11R6.3/lib \
/usr/local/X11R6.2/lib \
/usr/local/X11R6.1/lib \
/usr/local/lib/X11R6 \
/usr/local/lib/X11R5 \
/usr/local/lib/X11R4 \
\
/usr/X386/lib \
/usr/x386/lib \
/usr/XFree86/lib/X11 \
\
/usr/lib \
/usr/local/lib \
/usr/remote/lib \
/usr/unsupported/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
/lib/usr/lib/X11 \
\
/usr/openwin/lib \
/usr/openwin/share/lib \
$extra_lib \
; \
do
for ac_extension in a so sl; do
if test -r $ac_dir/lib${ftgl_direct_test_library}.$ac_extension; then
no_ftgl= ac_ftgl_libraries=$ac_dir
break 2
fi
done
done
LIBS="$ac_save_LIBS"])
AC_DEFUN(AC_PATH_FTGL,
[AC_REQUIRE_CPP()dnl
ftgl_includes=NONE
ftgl_libraries=NONE
AC_MSG_CHECKING(for FTGL)
AC_ARG_WITH(ftgl, [ --without-ftgl disable GL font rendering library])
if test "x$with_ftgl" = xno; then
no_ftgl=yes
else
if test "x$ftgl_includes" != xNONE && test "x$ftgl_libraries" != xNONE; then
no_ftgl=
else
AC_CACHE_VAL(ac_cv_path_ftgl,
[# One or both of these vars are not set, and there is no cached value.
no_ftgl=yes
AC_PATH_FTGL_DIRECT
if test "$no_ftgl" = yes; then
ac_cv_path_ftgl="no_ftgl=yes"
else
ac_cv_path_ftgl="no_ftgl= ac_ftgl_includes=$ac_ftgl_includes ac_ftgl_libraries=$ac_ftgl_libraries"
fi])dnl
fi
eval "$ac_cv_path_ftgl"
fi # with_ftgl != no
if test "$no_ftgl" = yes; then
AC_MSG_RESULT(no)
FTGL="#"
else
ftgl=yes
AC_DEFINE(HAVE_FTGL)
XLOCKLIBS="${XLOCKLIBS} -lftgl"
test "x$ftgl_includes" = xNONE && ftgl_includes=$ac_ftgl_includes
test "x$ftgl_libraries" = xNONE && ftgl_libraries=$ac_ftgl_libraries
ac_cv_path_ftgl="no_ftgl= ac_ftgl_includes=$ftgl_includes ac_ftgl_libraries=$ftgl_libraries"
AC_MSG_RESULT([libraries $ftgl_libraries, headers $ftgl_includes])
FTGL=""
fi
])
AC_PATH_FTGL
if test "x$ftgl_libraries" != x && test "x$ftgl_libraries" != xNONE ; then
XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$ftgl_libraries"
XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$ftgl_libraries"
fi
if test "x$ftgl_includes" != x && test "x$ftgl_includes" != xNONE ; then
XLOCKINC="${XLOCKINC} -I$ftgl_includes"
fi
freetype=no
dnl freetype FREETYPE
AC_DEFUN(AC_PATH_FREETYPE_DIRECT,
[test -z "$freetype_direct_test_library" && freetype_direct_test_library=freetype
test -z "$freetype_direct_test_function" && freetype_direct_test_function=FT_Init_FreeType
test -z "$freetype_direct_test_include" && freetype_direct_test_include=freetype2/freetype/freetype.h
for ac_dir in \
/usr/X11R6.5.1/include \
/usr/X11R6.4/include \
/usr/X11R6.3/include \
/usr/X11R6.2/include \
/usr/X11R6.1/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11R4/include \
/usr/X11/include \
\
/usr/include/X11 \
/usr/include/X11R6.5.1 \
/usr/include/X11R6.4 \
/usr/include/X11R6.3 \
/usr/include/X11R6.2 \
/usr/include/X11R6.1 \
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
\
/usr/local/X11/include \
/usr/local/X11R6.5.1/include \
/usr/local/X11R6.4/include \
/usr/local/X11R6.3/include \
/usr/local/X11R6.2/include \
/usr/local/X11R6.1/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
/usr/local/X11R4/include \
\
/usr/local/include/X11 \
/usr/local/include/X11R6.5.1 \
/usr/local/include/X11R6.4 \
/usr/local/include/X11R6.3 \
/usr/local/include/X11R6.2 \
/usr/local/include/X11R6.1 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
/usr/local/include/X11R4 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/include \
/usr/local/include \
/usr/remote/include \
/usr/include/X11 \
/usr/unsupported/include \
/usr/athena/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include \
/usr/openwin/include \
\
$extra_include \
; \
do
if test -r "$ac_dir/$freetype_direct_test_include"; then
no_freetype= ac_freetype_includes=$ac_dir/freetype2
break
fi
done
# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$freetype_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_freetype_includes" | sed s%/X11$%% | sed s/include/lib/` \
\
/usr/X11/lib \
/usr/X11R6.5.1/lib \
/usr/X11R6.4/lib \
/usr/X11R6.3/lib \
/usr/X11R6.2/lib \
/usr/X11R6.1/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11R4/lib \
\
/usr/lib/X11 \
/usr/lib/X11R6.5.1 \
/usr/lib/X11R6.4 \
/usr/lib/X11R6.3 \
/usr/lib/X11R6.2 \
/usr/lib/X11R6.1 \
/usr/lib/X11R6 \
/usr/lib/X11R5 \
/usr/lib/X11R4 \
\
/usr/local/X11/lib \
/usr/local/X11R6/lib \
/usr/local/X11R5/lib \
/usr/local/X11R4/lib \
\
/usr/local/lib/X11 \
/usr/local/X11R6.5.1/lib \
/usr/local/X11R6.4/lib \
/usr/local/X11R6.3/lib \
/usr/local/X11R6.2/lib \
/usr/local/X11R6.1/lib \
/usr/local/lib/X11R6 \
/usr/local/lib/X11R5 \
/usr/local/lib/X11R4 \
\
/usr/X386/lib \
/usr/x386/lib \
/usr/XFree86/lib/X11 \
\
/usr/lib \
/usr/local/lib \
/usr/remote/lib \
/usr/unsupported/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
/lib/usr/lib/X11 \
\
/usr/openwin/lib \
/usr/openwin/share/lib \
$extra_lib \
; \
do
for ac_extension in a so sl; do
if test -r $ac_dir/lib${freetype_direct_test_library}.$ac_extension; then
no_freetype= ac_freetype_libraries=$ac_dir
break 2
fi
done
done
LIBS="$ac_save_LIBS"])
AC_DEFUN(AC_PATH_FREETYPE,
[AC_REQUIRE_CPP()dnl
freetype_includes=NONE
freetype_libraries=NONE
AC_MSG_CHECKING(for FREETYPE2)
AC_ARG_WITH(freetype, [ --without-freetype disable Freetype2 mode(s)])
if test "x$with_freetype" = xno; then
no_freetype=yes
else
if test "x$freetype_includes" != xNONE && test "x$freetype_libraries" != xNONE; then
no_freetype=
else
AC_CACHE_VAL(ac_cv_path_freetype,
[# One or both of these vars are not set, and there is no cached value.
no_freetype=yes
AC_PATH_FREETYPE_DIRECT
if test "$no_freetype" = yes; then
ac_cv_path_freetype="no_freetype=yes"
else
ac_cv_path_freetype="no_freetype= ac_freetype_includes=$ac_freetype_includes ac_freetype_libraries=$ac_freetype_libraries"
fi])dnl
fi
eval "$ac_cv_path_freetype"
fi # with_freetype != no
if test "$no_freetype" = yes; then
AC_MSG_RESULT(no)
FREETYPE="#"
else
freetype=yes
AC_DEFINE(HAVE_FREETYPE)
if test "x$prefix" = "xNONE"; then
AC_DEFINE_UNQUOTED(DEF_TTFONT, "/usr/lib/X11/xlock/fonts/")
else
AC_DEFINE_UNQUOTED(DEF_TTFONT, "${prefix}/lib/X11/xlock/fonts/")
fi
XLOCKLIBS="${XLOCKLIBS} -lfreetype -lz"
test "x$freetype_includes" = xNONE && freetype_includes=$ac_freetype_includes
test "x$freetype_libraries" = xNONE && freetype_libraries=$ac_freetype_libraries
ac_cv_path_freetype="no_freetype= ac_freetype_includes=$freetype_includes ac_freetype_libraries=$freetype_libraries"
AC_MSG_RESULT([libraries $freetype_libraries, headers $freetype_includes])
FREETYPE=""
fi
])
AC_PATH_FREETYPE
if test "x$freetype_libraries" != x && test "x$freetype_libraries" != xNONE ; then
XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$freetype_libraries"
XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$freetype_libraries"
fi
if test "x$freetype_includes" != x && test "x$freetype_includes" != xNONE ; then
XLOCKINC="${XLOCKINC} -I$freetype_includes"
fi
gl=no
dnl OpenGL opengl
dnl test -z "$opengl_direct_test_library" && opengl_direct_test_library=opengl
AC_DEFUN(AC_PATH_OPENGL_DIRECT,
[test -z "$opengl_direct_test_library" && opengl_direct_test_library=GL
test -z "$opengl_direct_test_library" && opengl_direct_test_library=GLU
test -z "$opengl_direct_test_function" && opengl_direct_test_function=glXCreateContext
test -z "$opengl_direct_test_include" && opengl_direct_test_include=GL/gl.h
for ac_dir in \
/usr/include \
/usr/openwin/include \
/usr/openwin/share/include \
\
/usr/X11R6.5.1/include \
/usr/X11R6.4/include \
/usr/X11R6.3/include \
/usr/X11R6.2/include \
/usr/X11R6.1/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11/include \
\
/usr/include/X11 \
/usr/include/X11R6.5.1 \
/usr/include/X11R6.4 \
/usr/include/X11R6.3 \
/usr/include/X11R6.2 \
/usr/include/X11R6.1 \
/usr/include/X11R6 \
/usr/include/X11R5 \
\
/usr/local/X11/include \
/usr/local/X11R6.5.1/include \
/usr/local/X11R6.4/include \
/usr/local/X11R6.3/include \
/usr/local/X11R6.2/include \
/usr/local/X11R6.1/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
\
/usr/local/include/X11 \
/usr/local/include/X11R6.5.1 \
/usr/local/include/X11R6.4 \
/usr/local/include/X11R6.3 \
/usr/local/include/X11R6.2 \
/usr/local/include/X11R6.1 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/local/include \
/usr/remote/include \
/usr/unsupported/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
$extra_include \
; \
do
dnl # Make sure this is not Mesa
dnl if test -r "$ac_dir/$opengl_direct_test_include" && test ! -r "$ac_dir/GL/xmesa.h"; then
if test -r "$ac_dir/$opengl_direct_test_include"; then
no_opengl= ac_opengl_includes=$ac_dir
break
fi
done
# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$opengl_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_opengl_includes" | sed s/include/lib/` \
\
/usr/lib \
/usr/openwin/lib \
/usr/openwin/share/lib \
\
/usr/X11/lib \
/usr/X11R6.5.1/lib \
/usr/X11R6.4/lib \
/usr/X11R6.3/lib \
/usr/X11R6.2/lib \
/usr/X11R6.1/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
\
/usr/lib/X11 \
/usr/lib/X11R6.5.1 \
/usr/lib/X11R6.4 \
/usr/lib/X11R6.3 \
/usr/lib/X11R6.2 \
/usr/lib/X11R6.1 \
/usr/lib/X11R6 \
/usr/lib/X11R5 \
\
/usr/local/X11/lib \
/usr/local/X11R6.5.1/lib \
/usr/local/X11R6.4/lib \
/usr/local/X11R6.3/lib \
/usr/local/X11R6.2/lib \
/usr/local/X11R6.1/lib \
/usr/local/X11R6/lib \
/usr/local/X11R5/lib \
\
/usr/local/lib/X11 \
/usr/local/lib/X11R6.5.1 \
/usr/local/lib/X11R6.4 \
/usr/local/lib/X11R6.3 \
/usr/local/lib/X11R6.2 \
/usr/local/lib/X11R6.1 \
/usr/local/lib/X11R6 \
/usr/local/lib/X11R5 \
\
/usr/X386/lib \
/usr/x386/lib \
/usr/XFree86/lib/X11 \
\
/usr/local/lib \
/usr/remote/lib \
/usr/unsupported/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
/lib/usr/lib/X11 \
\
$extra_lib \
; \
do
for ac_extension in a so sl; do
# Make sure its not a symbolic link to MesaGL library
if test -r $ac_dir/lib${opengl_direct_test_library}.$ac_extension && test ! $ac_link_test $ac_dir/lib${opengl_direct_test_library}.$ac_extension && test ! -r $ac_dir/libMesa${opengl_direct_test_library}.$ac_extension; then
no_opengl= ac_opengl_libraries=$ac_dir
break 2
fi
done
done
LIBS="$ac_save_LIBS"])
AC_DEFUN(AC_PATH_OPENGL,
[AC_REQUIRE_CPP()dnl
opengl_includes=NONE
opengl_libraries=NONE
AC_MSG_CHECKING(for OpenGL (OK if this is Mesa))
AC_ARG_WITH(opengl, [ --without-opengl disable 3D OpenGL (for GL modes)])
if test "x$with_opengl" = xno; then
no_opengl=yes
else
if test "x$opengl_includes" != xNONE && test "x$opengl_libraries" != xNONE; then
no_opengl=
else
AC_CACHE_VAL(ac_cv_path_opengl,
[# One or both of these vars are not set, and there is no cached value.
no_opengl=yes
AC_PATH_OPENGL_DIRECT
if test "$no_opengl" = yes; then
ac_cv_path_opengl="no_opengl=yes"
else
ac_cv_path_opengl="no_opengl= ac_opengl_includes=$ac_opengl_includes ac_opengl_libraries=$ac_opengl_libraries"
fi])dnl
fi
eval "$ac_cv_path_opengl"
fi # with_opengl != no
if test "$no_opengl" = yes; then
AC_MSG_RESULT(no)
else
gl=yes
AC_DEFINE(USE_GL)
XLOCKLIBS="${XLOCKLIBS} -lGL -lGLU"
test "x$opengl_includes" = xNONE && opengl_includes=$ac_opengl_includes
test "x$opengl_libraries" = xNONE && opengl_libraries=$ac_opengl_libraries
case "${canonical}" in
*-*-solaris2* )
AC_DEFINE(SUN_OGL_NO_VERTEX_MACROS)
if test "x$opengl_includes" = "x/usr/include"; then
opengl_includes=""
fi
;;
*-*-irix5* | *-*-irix6* )
XLOCKLIBS="${XLOCKLIBS} -lgl"
;;
esac
ac_cv_path_opengl="no_opengl= ac_opengl_includes=$opengl_includes ac_opengl_libraries=$opengl_libraries"
AC_MSG_RESULT([libraries $opengl_libraries, headers $opengl_includes])
GL=""
fi
])
AC_PATH_OPENGL
if test "x$opengl_libraries" != x && test "x$opengl_libraries" != xNONE ; then
XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$opengl_libraries"
XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$opengl_libraries"
fi
if test "x$opengl_includes" != x && test "x$opengl_includes" != xNONE ; then
XLOCKINC="${XLOCKINC} -I$opengl_includes"
fi
dnl Mesa mesa
dnl test -z "$mesa_direct_test_library" && mesa_direct_test_library=MesaGLU
AC_DEFUN(AC_PATH_MESA_DIRECT,
[test -z "$mesa_direct_test_library" && mesa_direct_test_library=MesaGL
test -z "$mesa_direct_test_library" && mesa_direct_test_library=MesaGLU
test -z "$mesa_direct_test_function" && mesa_direct_test_function=glXCreateContext
test -z "$mesa_direct_test_include" && mesa_direct_test_include=GL/gl.h
for ac_dir in \
/usr/X11R6.5.1/include \
/usr/X11R6.4/include \
/usr/X11R6.3/include \
/usr/X11R6.2/include \
/usr/X11R6.1/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11/include \
\
/usr/include/X11 \
/usr/include/X11R6.5.1 \
/usr/include/X11R6.4 \
/usr/include/X11R6.3 \
/usr/include/X11R6.2 \
/usr/include/X11R6.1 \
/usr/include/X11R6 \
/usr/include/X11R5 \
\
/usr/local/X11/include \
/usr/local/X11R6.5.1/include \
/usr/local/X11R6.4/include \
/usr/local/X11R6.3/include \
/usr/local/X11R6.2/include \
/usr/local/X11R6.1/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
\
/usr/local/include/X11 \
/usr/local/include/X11R6.5.1 \
/usr/local/include/X11R6.4 \
/usr/local/include/X11R6.3 \
/usr/local/include/X11R6.2 \
/usr/local/include/X11R6.1 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/local/include \
/usr/remote/include \
/usr/include \
/usr/unsupported/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include \
$extra_include \
; \
do
if test -r "$ac_dir/$mesa_direct_test_include"; then
no_mesa= ac_mesa_includes=$ac_dir
break
fi
done
# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$mesa_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_mesa_includes" | sed s/include/lib/` \
\
/usr/X11/lib \
/usr/X11R6.5.1/lib \
/usr/X11R6.4/lib \
/usr/X11R6.3/lib \
/usr/X11R6.2/lib \
/usr/X11R6.1/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
\
/usr/lib/X11 \
/usr/lib/X11R6.5.1 \
/usr/lib/X11R6.4 \
/usr/lib/X11R6.3 \
/usr/lib/X11R6.2 \
/usr/lib/X11R6.1 \
/usr/lib/X11R6 \
/usr/lib/X11R5 \
\
/usr/local/X11/lib \
/usr/local/X11R6.5.1/lib \
/usr/local/X11R6.4/lib \
/usr/local/X11R6.3/lib \
/usr/local/X11R6.2/lib \
/usr/local/X11R6.1/lib \
/usr/local/X11R6/lib \
/usr/local/X11R5/lib \
\
/usr/local/lib/X11 \
/usr/local/lib/X11R6.5.1 \
/usr/local/lib/X11R6.4 \
/usr/local/lib/X11R6.3 \
/usr/local/lib/X11R6.2 \
/usr/local/lib/X11R6.1 \
/usr/local/lib/X11R6 \
/usr/local/lib/X11R5 \
\
/usr/X386/lib \
/usr/x386/lib \
/usr/XFree86/lib/X11 \
\
/usr/lib \
/usr/local/lib \
/usr/remote/lib \
/usr/unsupported/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
/lib/usr/lib/X11 \
\
/usr/openwin/lib \
/usr/openwin/share/lib \
$extra_lib \
; \
do
for ac_extension in a so sl; do
if test -r $ac_dir/lib${mesa_direct_test_library}.$ac_extension; then
no_mesa= ac_mesa_libraries=$ac_dir
break 2
fi
done
done
LIBS="$ac_save_LIBS"])
AC_DEFUN(AC_PATH_MESA,
[AC_REQUIRE_CPP()dnl
mesa_includes=NONE
mesa_libraries=NONE
AC_MSG_CHECKING(for Mesa)
AC_ARG_WITH(mesa, [ --without-mesa disable Mesa 3D (for GL modes)])
if test "x$with_mesa" = xno; then
no_mesa=yes
else
if test "x$mesa_includes" != xNONE && test "x$mesa_libraries" != xNONE; then
no_mesa=
else
AC_CACHE_VAL(ac_cv_path_mesa,
[# One or both of these vars are not set, and there is no cached value.
no_mesa=yes
AC_PATH_MESA_DIRECT
if test "$no_mesa" = yes -a "$no_opengl" = yes ; then
ac_cv_path_mesa="no_mesa=yes"
else
ac_cv_path_mesa="no_mesa= ac_mesa_includes=$ac_mesa_includes ac_mesa_libraries=$ac_mesa_libraries"
fi])dnl
fi
eval "$ac_cv_path_mesa"
fi # with_mesa != no
if test "$no_mesa" = yes; then
AC_MSG_RESULT(no)
GL="#"
else
if test "$gl" = no; then
gl=yes
AC_DEFINE(USE_GL)
XLOCKLIBS="${XLOCKLIBS} -lMesaGL -lMesaGLU"
test "x$mesa_includes" = xNONE && mesa_includes=$ac_mesa_includes
test "x$mesa_libraries" = xNONE && mesa_libraries=$ac_mesa_libraries
case "${canonical}" in
*-*-solaris2* )
if test "x$mesa_includes" = "x/usr/include"; then
mesa_includes=""
fi
;;
esac
ac_cv_path_mesa="no_mesa= ac_mesa_includes=$mesa_includes ac_mesa_libraries=$mesa_libraries"
AC_MSG_RESULT([libraries $mesa_libraries, headers $mesa_includes])
# Issue a warning if the version number of Mesa is less than 3.0 since
# 2.6 and earlier had a security bug and 2.2 and earlier had memory leaks.
# pre-3.4 Mesa will core dump with the -showfps option. A patch must be
# applied to 3.4 and 3.4.1 Mesa to correct a memory leak in the molecule
# mode and the -showfps option. This memory leak is fixed in Mesa 3.4.2
AC_CACHE_CHECK([Mesa version number], ac_cv_mesa_version_string,
[cat > conftest.$ac_ext <<EOF
#line __oline__ "configure"
#include "confdefs.h"
#include <GL/xmesa.h>
configure: XMESA_MAJOR_VERSION XMESA_MINOR_VERSION
EOF
ac_save_CPPFLAGS="$CPPFLAGS"
if test \! -z "$ac_mesa_includes" ; then
CPPFLAGS="$CPPFLAGS -I$ac_mesa_includes"
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
changequote(X,Y)
mglv=`(eval "$ac_cpp conftest.$ac_ext") | sed -n \
's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
dnl autoconf-4.53 really hates this next line
dnl mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC | sed -n \
dnl 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
changequote([,])
rm -f conftest.$ac_ext
CPPFLAGS="$ac_save_CPPFLAGS"
if test "$mglv" = ""; then
ac_mesa_version=unknown
ac_mesa_version_string=unknown
else
ac_mesa_version_string=$mglv
maj=`echo $mglv | sed -n 's/\..*//p'`
min=`echo $mglv | sed -n 's/.*\.//p'`
ac_mesa_version=`echo "$maj * 1000 + $min" | bc`
if test -z "$ac_mesa_version"; then
ac_mesa_version=unknown
ac_mesa_version_string=unknown
fi
fi
ac_cv_mesa_version=$ac_mesa_version
ac_cv_mesa_version_string=$ac_mesa_version_string
])
ac_mesa_version=$ac_cv_mesa_version
ac_mesa_version_string=$ac_cv_mesa_version_string
preferred_mesa="3.4.2"
if test "$ac_mesa_version" = unknown; then
AC_MSG_RESULT(!!!WARNING!!! Unable to determine the Mesa version number!)
AC_MSG_RESULT(!!!WARNING!!! Make sure you are using Mesa version $preferred_mesa or newer.)
elif test \! "$ac_mesa_version" -gt 3004; then
AC_MSG_RESULT(!!!WARNING!!! Mesa version $ac_mesa_version_string is being used.)
AC_MSG_RESULT(!!!WARNING!!! Mesa versions 3.4.1 and earlier have a memory leak when using)
AC_MSG_RESULT(!!!WARNING!!! molecule mode or the -showfps option. This can be corrected by)
AC_MSG_RESULT(!!!WARNING!!! applying the Mesa.patch file to Mesa 3.4 or 3.4.1 using patch)
AC_MSG_RESULT(!!!WARNING!!! or by using Mesa 3.4.2 or newer.)
if test \! "$ac_mesa_version" -gt 3003; then
AC_MSG_RESULT(!!!WARNING!!! Mesa version $ac_mesa_version_string is being used.)
AC_MSG_RESULT(!!!WARNING!!! Mesa versions 3.3 and earlier will SEGV with the -showfps option.)
if test \! "$ac_mesa_version" -gt 2006; then
AC_MSG_RESULT(!!!WARNING!!! Mesa versions 2.6 and earlier have a security bug.)
if test \! "$ac_mesa_version" -gt 2002; then
AC_MSG_RESULT(!!!WARNING!!! Mesa versions 2.2 and earlier have memory leaks.)
fi
fi
fi
AC_MSG_RESULT(!!!WARNING!!! It is strongly recommended that you upgrade to Mesa V$preferred_mesa or newer.)
fi
case "${canonical}" in
*-*-linux* )
# Testing if Mesa was compiled against VGA
if test -f $mesa_libraries/libMesaGL.so; then
have_mesa_svga=`nm $mesa_libraries/libMesaGL.so | grep SVGAMesa | wc -l`
else
have_mesa_svga=0
fi
if eval "test $have_mesa_svga -ge 1"; then
AC_MSG_RESULT([Mesa library is linked against SVGA: adding -lvga])
XLOCKLIBS="${XLOCKLIBS} -lvga"
fi
# Testing if Mesa was compiled against glide
if test -f $mesa_libraries/libMesaGL.so; then
have_mesa_glide=`nm $mesa_libraries/libMesaGL.so | grep grGlideInit | wc -l`
else
have_mesa_glide=0
fi
if eval "test $have_mesa_glide -ge 1"; then
AC_MSG_RESULT([Mesa library is linked against GLIDE: adding -lglide2x])
XLOCKLIBS="${XLOCKLIBS} -lglide2x"
fi
# Causes major errors for maintainer. xlock refuses to run.
# I am not able to reproduce the problem ? What is it ?
# Does a new glibc version fix this problem ?
# Testing if Mesa was compiled against pthread
if test -f $mesa_libraries/libMesaGL.so; then
have_mesa_pthread=`nm $mesa_libraries/libMesaGL.so | grep pthread_once | wc -l`
else
have_mesa_pthread=0
fi
if eval "test $have_mesa_pthread -ge 1"; then
AC_MSG_RESULT([Mesa library is linked against PTHREAD: adding -lpthread])
XLOCKLIBS="${XLOCKLIBS} -lpthread"
fi
;;
esac
GL=""
else
AC_MSG_RESULT(ignored - using OpenGL)
fi
fi
])
AC_PATH_MESA
if test "x$mesa_libraries" != x && test "x$mesa_libraries" != xNONE ; then
XLOCK_LDFLAGS="$mesa_libraries:${XLOCK_LDFLAGS}"
XLOCKLIBPATHS="-L$mesa_libraries ${XLOCKLIBPATHS}"
fi
if test "x$mesa_includes" != x && test "x$mesa_includes" != xNONE ; then
XLOCKINC="-I$mesa_includes ${XLOCKINC}"
fi
# Test if Mesa or OpenGL has GL1.1 features
# (Should this test be performed only if (Mesa)GL is used? In that case
# it fails anyway.)
AC_MSG_CHECKING([for GL >=1.1])
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="${CFLAGS} ${XLOCKINC}"
LIBS="${XLOCKLIBPATHS} ${XLOCKLIBS} -lX11 $(LIBXCB) -lXext -lXau -lXdmcp -lm"
AC_CACHE_VAL(ac_cv_c_gl1_1,[
AC_TRY_LINK([#define _XOPEN_SOURCE 1
#include <GL/gl.h>], [
GLint texture;
glBindTexture(GL_TEXTURE_2D, texture);
], ac_cv_c_gl1_1=yes, ac_cv_c_gl1_1=no)])
dnl This does not seem to work on Sun's OpenGL
dnl if test x"$ac_cv_c_gl1_1" = xyes; then
AC_DEFINE(HAVE_GLBINDTEXTURE)
AC_MSG_RESULT(yes)
dnl else
dnl AC_MSG_RESULT(no)
dnl fi
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
dnl DTSAVER DtSaver dtsaver DtSvc
AC_DEFUN(AC_PATH_DTSAVER_DIRECT,
[test -z "$dtsaver_direct_test_library" && dtsaver_direct_test_library=DtSvc
test -z "$dtsaver_direct_test_function" && dtsaver_direct_test_function=DtSaverGetWindows
test -z "$dtsaver_direct_test_include" && dtsaver_direct_test_include=Dt/Saver.h
for ac_dir in \
/usr/dt/include \
$extra_include \
; \
do
if test -r "$ac_dir/$dtsaver_direct_test_include"; then
no_dtsaver= ac_dtsaver_includes=$ac_dir
break
fi
done
# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$dtsaver_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_dtsaver_includes" | sed s/include/lib/` \
$extra_lib \
; \
do
for ac_extension in a so sl; do
if test -r $ac_dir/lib${dtsaver_direct_test_library}.$ac_extension; then
no_dtsaver= ac_dtsaver_libraries=$ac_dir
break 2
fi
done
done
LIBS="$ac_save_LIBS"])
AC_DEFUN(AC_PATH_DTSAVER,
[AC_REQUIRE_CPP()dnl
dtsaver_includes=NONE
dtsaver_libraries=NONE
AC_MSG_CHECKING(for DtSaver)
AC_ARG_WITH(dtsaver, [ --without-dtsaver disable -dtsaver option])
if test "x$with_dtsaver" = xno; then
no_dtsaver=yes
else
if test "x$dtsaver_includes" != xNONE && test "x$dtsaver_libraries" != xNONE; then
no_dtsaver=
else
AC_CACHE_VAL(ac_cv_path_dtsaver,
[# One or both of these vars are not set, and there is no cached value.
no_dtsaver=yes
AC_PATH_DTSAVER_DIRECT
if test "$no_dtsaver" = yes; then
ac_cv_path_dtsaver="no_dtsaver=yes"
else
ac_cv_path_dtsaver="no_dtsaver= ac_dtsaver_includes=$ac_dtsaver_includes ac_dtsaver_libraries=$ac_dtsaver_libraries"
fi])dnl
fi
eval "$ac_cv_path_dtsaver"
fi # with_dtsaver != no
if test "$no_dtsaver" = yes; then
AC_MSG_RESULT(no)
else
AC_DEFINE(USE_DTSAVER)
XLOCKLIBS="${XLOCKLIBS} -lDtSvc"
test "x$dtsaver_includes" = xNONE && dtsaver_includes=$ac_dtsaver_includes
test "x$dtsaver_libraries" = xNONE && dtsaver_libraries=$ac_dtsaver_libraries
ac_cv_path_dtsaver="no_dtsaver= ac_dtsaver_includes=$dtsaver_includes ac_dtsaver_libraries=$dtsaver_libraries"
AC_MSG_RESULT([libraries $dtsaver_libraries, headers $dtsaver_includes])
fi
])
AC_PATH_DTSAVER
if test "x$dtsaver_libraries" != x && test "x$dtsaver_libraries" != xNONE ; then
XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$dtsaver_libraries"
XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$dtsaver_libraries"
fi
if test "x$dtsaver_includes" != x && test "x$dtsaver_includes" != xNONE ; then
XLOCKINC="${XLOCKINC} -I$dtsaver_includes"
fi
dnl Xdpms DPMS
AC_DEFUN(AC_PATH_DPMS_DIRECT,
[test -z "$dpms_direct_test_library" && dpms_direct_test_library=Xdpms
test -z "$dpms_direct_test_function" && dpms_direct_test_function=DPMSSetTimeouts
test -z "$dpms_direct_test_include" && dpms_direct_test_include=X11/extensions/dpms.h
for ac_dir in \
/usr/X11R6.5.1/include \
/usr/X11R6.4/include \
/usr/X11R6.3/include \
/usr/X11R6.2/include \
/usr/X11R6.1/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11R4/include \
\
/usr/include/X11R6.5.1 \
/usr/include/X11R6.4 \
/usr/include/X11R6.3 \
/usr/include/X11R6.2 \
/usr/include/X11R6.1 \
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
\
/usr/local/X11R6.5.1/include \
/usr/local/X11R6.4/include \
/usr/local/X11R6.3/include \
/usr/local/X11R6.2/include \
/usr/local/X11R6.1/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
/usr/local/X11R4/include \
\
/usr/local/include/X11R6.5.1 \
/usr/local/include/X11R6.4 \
/usr/local/include/X11R6.3 \
/usr/local/include/X11R6.2 \
/usr/local/include/X11R6.1 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
/usr/local/include/X11R4 \
\
/usr/X11/include \
/usr/include/X11 \
/usr/local/X11/include \
/usr/local/include/X11 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/dt/include \
\
/usr/local/include \
/usr/remote/include \
/usr/include \
/usr/unsupported/include \
/usr/dpms/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include \
$extra_include \
; \
do
if test -r "$ac_dir/$dpms_direct_test_include"; then
no_dpms= ac_dpms_includes=$ac_dir
break
fi
done
# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$dpms_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_dpms_includes" | sed s/include/lib/` \
\
/usr/X11R6.5.1/lib \
/usr/X11R6.4/lib \
/usr/X11R6.3/lib \
/usr/X11R6.2/lib \
/usr/X11R6.1/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11R4/lib \
\
/usr/lib/X11R6.5.1 \
/usr/lib/X11R6.4 \
/usr/lib/X11R6.3 \
/usr/lib/X11R6.2 \
/usr/lib/X11R6.1 \
/usr/lib/X11R6 \
/usr/lib/X11R5 \
/usr/lib/X11R4 \
\
/usr/local/X11R6.5.1/lib \
/usr/local/X11R6.4/lib \
/usr/local/X11R6.3/lib \
/usr/local/X11R6.2/lib \
/usr/local/X11R6.1/lib \
/usr/local/X11R6/lib \
/usr/local/X11R5/lib \
/usr/local/X11R4/lib \
\
/usr/local/lib/X11R6.5.1 \
/usr/local/lib/X11R6.4 \
/usr/local/lib/X11R6.3 \
/usr/local/lib/X11R6.2 \
/usr/local/lib/X11R6.1 \
/usr/local/lib/X11R6 \
/usr/local/lib/X11R5 \
/usr/local/lib/X11R4 \
\
/usr/X11/lib \
/usr/lib/X11 \
/usr/local/X11/lib \
\
/usr/X386/lib \
/usr/x386/lib \
/usr/XFree86/lib/X11 \
\
/usr/lib \
/usr/local/lib \
/usr/remote/lib \
/usr/unsupported/lib \
/usr/dpms/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
\
/usr/openwin/lib \
/usr/openwin/share/lib \
/shlib \
/usr/shlib \
/usr/shlib/X11 \
$extra_lib \
; \
do
for ac_extension in a so sl; do
if test -r $ac_dir/lib${dpms_direct_test_library}.$ac_extension; then
no_dpms= ac_dpms_libraries=$ac_dir
break 2
fi
done
done
LIBS="$ac_save_LIBS"])
AC_DEFUN(AC_PATH_DPMS,
[AC_REQUIRE_CPP()dnl
dpms_includes=NONE
dpms_libraries=NONE
AC_MSG_CHECKING(for DPMS)
AC_ARG_WITH(dpms, [ --without-dpms disable DPMS])
dpmslib=no
if test "x$with_dpms" = xno; then
no_dpms=yes
else
if test "x$dpms_includes" != xNONE && test "x$dpms_libraries" != xNONE; then
no_dpms=
else
AC_CACHE_VAL(ac_cv_path_dpms,
[# One or both of these vars are not set, and there is no cached value.
no_dpms=yes
AC_PATH_DPMS_DIRECT
if test "$no_dpms" = yes; then
ac_cv_path_dpms="no_dpms=yes"
else
ac_cv_path_dpms="no_dpms= ac_dpms_includes=$ac_dpms_includes ac_dpms_libraries=$ac_dpms_libraries"
fi])dnl
fi
eval "$ac_cv_path_dpms"
fi # with_dpms != no
if test "$no_dpms" = yes; then
AC_MSG_RESULT(no)
else
AC_DEFINE(USE_DPMS)
dnl test needed for Digital Unix machines
if test "x$ac_dpms_libraries" != x && test "x$ac_dpms_libraries" != xNONE ; then
XLOCKLIBS="${XLOCKLIBS} -lXdpms"
fi
test "x$dpms_includes" = xNONE && dpms_includes=$ac_dpms_includes
test "x$dpms_libraries" = xNONE && dpms_libraries=$ac_dpms_libraries
ac_cv_path_dpms="no_dpms= ac_dpms_includes=$dpms_includes ac_dpms_libraries=$dpms_libraries"
AC_MSG_RESULT([libraries $dpms_libraries, headers $dpms_includes])
fi
])
AC_PATH_DPMS
if test "x$dpms_libraries" != x && test "x$dpms_libraries" != xNONE ; then
XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$dpms_libraries"
XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$dpms_libraries"
fi
if test "x$dpms_includes" != x && test "x$dpms_includes" != xNONE ; then
XLOCKINC="${XLOCKINC} -I$dpms_includes"
fi
sound=none
dnl RPLAY RPlay rplay
AC_DEFUN(AC_PATH_RPLAY_DIRECT,
[test -z "$rplay_direct_test_library" && rplay_direct_test_library=rplay
test -z "$rplay_direct_test_function" && rplay_direct_test_function=rplay_open_default
test -z "$rplay_direct_test_include" && rplay_direct_test_include=rplay.h
for ac_dir in \
/usr/X11R6.5.1/include \
/usr/X11R6.4/include \
/usr/X11R6.3/include \
/usr/X11R6.2/include \
/usr/X11R6.1/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11/include \
/usr/local/include \
/usr/remote/include \
/usr/include \
$extra_include \
; \
do
if test -r "$ac_dir/$rplay_direct_test_include"; then
no_rplay= ac_rplay_includes=$ac_dir
break
fi
done
# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$rplay_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_rplay_includes" | sed s/include/lib/` \
\
/usr/X11R6.5.1/lib \
/usr/X11R6.4/lib \
/usr/X11R6.3/lib \
/usr/X11R6.2/lib \
/usr/X11R6.1/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11/lib \
/usr/lib \
/usr/local/lib \
/usr/remote/lib \
$extra_lib \
; \
do
for ac_extension in a so sl; do
if test -r $ac_dir/lib${rplay_direct_test_library}.$ac_extension; then
no_rplay= ac_rplay_libraries=$ac_dir
break 2
fi
done
done
LIBS="$ac_save_LIBS"])
AC_DEFUN(AC_PATH_RPLAY,
[AC_REQUIRE_CPP()dnl
rplay_includes=NONE
rplay_libraries=NONE
AC_MSG_CHECKING(for RPLAY)
AC_ARG_WITH(rplay, [ --without-rplay disable RPLAY sounds])
if test "x$with_rplay" = xno; then
no_rplay=yes
else
if test "x$rplay_includes" != xNONE && test "x$rplay_libraries" != xNONE; then
no_rplay=
else
AC_CACHE_VAL(ac_cv_path_rplay,
[# One or both of these vars are not set, and there is no cached value.
no_rplay=yes
AC_PATH_RPLAY_DIRECT
if test "$no_rplay" = yes; then
ac_cv_path_rplay="no_rplay=yes"
else
ac_cv_path_rplay="no_rplay= ac_rplay_includes=$ac_rplay_includes ac_rplay_libraries=$ac_rplay_libraries"
fi])dnl
fi
eval "$ac_cv_path_rplay"
fi # with_rplay != no
if test "$no_rplay" = yes; then
AC_MSG_RESULT(no)
else
dnl solaris26=no
dnl case "${canonical}" in
dnl *-*-solaris2.6 )
dnl solaris26=yes
dnl ;;
dnl esac
dnl if test "$CC" = gcc && test "$solaris26" = yes; then
dnl AC_MSG_RESULT(ignored - problems here with gcc and solaris2.6)
dnl else
sound=rplay
AC_DEFINE(USE_RPLAY)
XLOCKLIBS="${XLOCKLIBS} -lrplay"
test "x$rplay_includes" = xNONE && rplay_includes=$ac_rplay_includes
test "x$rplay_libraries" = xNONE && rplay_libraries=$ac_rplay_libraries
ac_cv_path_rplay="no_rplay= ac_rplay_includes=$rplay_includes ac_rplay_libraries=$rplay_libraries"
AC_MSG_RESULT([libraries $rplay_libraries, headers $rplay_includes])
dnl fi
fi
])
AC_PATH_RPLAY
if test "x$rplay_libraries" != x && test "x$rplay_libraries" != xNONE ; then
XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$rplay_libraries"
XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$rplay_libraries"
fi
if test "x$rplay_includes" != x && test "x$rplay_includes" != xNONE ; then
XLOCKINC="${XLOCKINC} -I$rplay_includes"
fi
dnl ESOUND Enlightenment sound daemon
AC_DEFUN(AC_PATH_ESOUND,
[AC_REQUIRE_CPP()dnl
esound_includes=NONE
esound_libraries=NONE
AC_MSG_CHECKING(for ESOUND)
AC_ARG_WITH(esound, [ --with-esound enable Enlightenment Sound Daemon sounds])
AC_ARG_WITH(esound_config, [ --with-esound-config use this configator for Enlightenment Sound Daemon])
AC_ARG_WITH(esound_prefix, [ --with-esound-prefix use this prefix for Enlightenment Sound Daemon])
AC_ARG_WITH(esound_includes, [ --with-esound-includes use this dir for Enlightenment Sound Daemon headers])
AC_ARG_WITH(esound_librairies, [ --with-esound-libraries use this dir for Enlightenment Sound Daemon libs])
if test "x$with_esound" = xno; then
no_esound=yes
else
if test "x$esound_includes" != xNONE && test "x$esound_libraries" != xNONE; then
no_esound=
if test "x$esound_config" = "x"; then
if test "x$esound_prefix" != "x"; then
esound_config="$esound_prefix/bin/esd-config"
else
esound_config="esd-config"
fi
else
if test "x$esound_prefix" = "x"; then
esound_prefix=`$esound_config --prefix`
fi
fi
else
if test "x$esound_config" = "x"; then
if test "x$esound_prefix" != "x"; then
esound_config="$esound_prefix/bin/esd-config"
else
esound_config="esd-config"
fi
else
if test "x$esound_prefix" = "x"; then
esound_prefix=`$esound_config --prefix 2> /dev/null`
fi
fi
AC_CACHE_VAL(ac_cv_path_esound,
[# One or both of these vars are not set, and there is no cached value.
no_esound=yes
if test "x$esound_prefix" != "x"; then
ac_esound_prefix=$esound_prefix
ac_esound_includes=$ac_esound_prefix/include
ac_esound_libraries=$ac_esound_prefix/lib
no_esound="ac_esound_config=$ac_esound_config ac_esound_prefix=$ac_esound_prefix ac_esound_includes=$ac_esound_includes ac_esound_libraries=$ac_esound_libraries"
else
ac_esound_config="$esound_config"
ac_esound_prefix=`$esound_config --prefix 2> /dev/null`
if test $? != 0; then
no_esound=yes
ac_esound_config=""
ac_esound_prefix=""
else
no_esound=
ac_esound_includes=$ac_esound_prefix/include
ac_esound_libraries=$ac_esound_prefix/lib
fi
fi
if test "$no_esound" = yes; then
ac_cv_path_esound="no_esound=yes"
else
ac_cv_path_esound="no_esound= ac_esound_config=\"$ac_esound_config\" ac_esound_prefix=\"$ac_esound_prefix\" ac_esound_includes=\"$ac_esound_includes\" ac_esound_libraries=\"$ac_esound_libraries\""
fi])dnl
fi
eval "$ac_cv_path_esound"
fi # with_esound != no
if test "$no_esound" = yes; then
AC_MSG_RESULT(no)
else
if test "$sound" = none; then
sound=yes
AC_DEFINE(USE_ESOUND)
AC_DEFINE(HAVE_LIBESD)
if test "x$prefix" = "xNONE"; then
AC_DEFINE_UNQUOTED(DEFAULT_SOUND_DIR, "/usr/lib/X11/xlock/sounds/")
else
AC_DEFINE_UNQUOTED(DEFAULT_SOUND_DIR, "${prefix}/lib/X11/xlock/sounds/")
fi
test "x$esound_config" = xNONE && esound_config=$ac_esound_config
test "x$esound_prefix" = xNONE && esound_prefix=$ac_esound_prefix
test "x$esound_includes" = xNONE && esound_includes=$ac_esound_includes
test "x$esound_libraries" = xNONE && esound_libraries=$ac_esound_libraries
ac_cv_path_esound="no_esound= ac_esound_config=$esound_config ac_esound_prefix=$esound_prefix ac_esound_includes=$esound_includes ac_esound_libraries=$esound_libraries"
AC_MSG_RESULT([libraries $esound_libraries, headers $esound_includes])
else
AC_MSG_RESULT(ignored - using $sound)
fi
fi
])
AC_PATH_ESOUND
if test "x$esound_libraries" != x && test "x$esound_libraries" != xNONE ; then
XLOCKLIBS="${XLOCKLIBS} `$esound_config --libs`"
XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$esound_libraries"
XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$esound_libraries"
fi
if test "x$esound_includes" != x && test "x$esound_includes" != xNONE ; then
XLOCKINC="${XLOCKINC} -I$esound_includes `$esound_config --cflags`"
fi
dnl NAS audio
AC_DEFUN(AC_PATH_NAS_DIRECT,
[test -z "$nas_direct_test_library" && nas_direct_test_library=audio
test -z "$nas_direct_test_function" && nas_direct_test_function=AuOpenServer
test -z "$nas_direct_test_include" && nas_direct_test_include=audio/audio.h
for ac_dir in \
/usr/X11R6.5.1/include \
/usr/X11R6.4/include \
/usr/X11R6.3/include \
/usr/X11R6.2/include \
/usr/X11R6.1/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11/include \
/usr/local/include \
/usr/remote/include \
/usr/include \
$extra_include \
; \
do
if test -r "$ac_dir/$nas_direct_test_include"; then
no_nas= ac_nas_includes=$ac_dir
break
fi
done
# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$nas_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_nas_includes" | sed s/include/lib/` \
\
/usr/X11R6.5.1/lib \
/usr/X11R6.4/lib \
/usr/X11R6.3/lib \
/usr/X11R6.2/lib \
/usr/X11R6.1/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11/lib \
/usr/lib \
/usr/local/lib \
/usr/remote/lib \
$extra_lib \
; \
do
for ac_extension in a so sl; do
if test -r $ac_dir/lib${nas_direct_test_library}.$ac_extension; then
no_nas= ac_nas_libraries=$ac_dir
break 2
fi
done
done
LIBS="$ac_save_LIBS"])
AC_DEFUN(AC_PATH_NAS,
[AC_REQUIRE_CPP()dnl
nas_includes=NONE
nas_libraries=NONE
AC_MSG_CHECKING(for NAS)
AC_ARG_WITH(nas, [ --without-nas disable NAS sounds])
if test "x$with_nas" = xno; then
no_nas=yes
else
if test "x$nas_includes" != xNONE && test "x$nas_libraries" != xNONE; then
no_nas=
else
AC_CACHE_VAL(ac_cv_path_nas,
[# One or both of these vars are not set, and there is no cached value.
no_nas=yes
AC_PATH_NAS_DIRECT
if test "$no_nas" = yes; then
ac_cv_path_nas="no_nas=yes"
else
ac_cv_path_nas="no_nas= ac_nas_includes=$ac_nas_includes ac_nas_libraries=$ac_nas_libraries"
fi])dnl
fi
eval "$ac_cv_path_nas"
fi # with_nas != no
if test "$no_nas" = yes; then
AC_MSG_RESULT(no)
else
if test "$sound" = none; then
sgi=no
case "${canonical}" in
*-*-irix5* | *-*-irix6* )
sgi=yes
;;
esac
if test "$sgi" = yes; then
AC_MSG_RESULT(ignored - problems here with audio and nas)
else
sound=nas
AC_DEFINE(USE_NAS)
XLOCKLIBS="${XLOCKLIBS} -laudio"
dnl XLOCKLIBS="${XLOCKLIBS} -lnas"
test "x$nas_includes" = xNONE && nas_includes=$ac_nas_includes
test "x$nas_libraries" = xNONE && nas_libraries=$ac_nas_libraries
ac_cv_path_nas="no_nas= ac_nas_includes=$nas_includes ac_nas_libraries=$nas_libraries"
AC_MSG_RESULT([libraries $nas_libraries, headers $nas_includes])
fi
else
AC_MSG_RESULT(ignored - using rplay)
fi
fi
])
AC_PATH_NAS
if test "x$nas_libraries" != x && test "x$nas_libraries" != xNONE ; then
XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$nas_libraries"
XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$nas_libraries"
fi
if test "x$nas_includes" != x && test "x$nas_includes" != xNONE ; then
XLOCKINC="${XLOCKINC} -I$nas_includes"
fi
dnl crypt CRYPT
AC_DEFUN(AC_PATH_CRYPT_DIRECT,
[test -z "$crypt_direct_test_library" && crypt_direct_test_library=crypt
# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$crypt_direct_test_library $LIBS"
for ac_dir in \
/usr/lib \
/usr/local/lib \
/usr/remote/lib \
$extra_lib \
; \
do
for ac_extension in a so sl; do
if test -r $ac_dir/lib${crypt_direct_test_library}.$ac_extension; then
no_crypt= ac_crypt_libraries=$ac_dir
break 2
fi
done
done
LIBS="$ac_save_LIBS"])
AC_DEFUN(AC_PATH_CRYPT,
[AC_REQUIRE_CPP()dnl
crypt_libraries=NONE
AC_MSG_CHECKING(for CRYPT)
AC_ARG_WITH(crypt, [ --without-crypt disable CRYPT])
if test "x$with_crypt" = xno; then
no_crypt=yes
else
if test "x$crypt_libraries" != xNONE; then
no_crypt=
else
AC_CACHE_VAL(ac_cv_path_crypt,
[# One or both of these vars are not set, and there is no cached value.
no_crypt=yes
AC_PATH_CRYPT_DIRECT
if test "$no_crypt" = yes; then
ac_cv_path_crypt="no_crypt=yes"
else
ac_cv_path_crypt="no_crypt= ac_crypt_libraries=$ac_crypt_libraries"
fi])dnl
fi
eval "$ac_cv_path_crypt"
fi # with_crypt != no
if test "$no_crypt" = yes; then
AC_MSG_RESULT(no)
else
XLOCKLIBS="${XLOCKLIBS} -lcrypt"
test "x$crypt_libraries" = xNONE && crypt_libraries=$ac_crypt_libraries
ac_cv_path_crypt="no_crypt= ac_crypt_libraries=$crypt_libraries"
AC_MSG_RESULT([libraries $crypt_libraries])
fi
])
AC_PATH_CRYPT
if test "x$crypt_libraries" != x && test "x$crypt_libraries" != xNONE ; then
XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$crypt_libraries"
XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$crypt_libraries"
fi
XGLOCK=""
XGLOCKDIR=""
INSTALL_XGLOCK=""
UNINSTALL_XGLOCK=""
dnl
dnl Check pkg-config borrowed from xscreensaver
dnl
AC_PATH_PROGS(pkg_config, pkg-config,, $PATH)
if test -n "$pkg_config" ; then
#
# the new way...
# run pkg-config based tests.
#
pkgs=''
pkg_check_version() {
if test "$ok" = yes ; then
req="$1"
min="$2"
AC_MSG_CHECKING(for $req)
if $pkg_config --exists "$req" 2> /dev/null ; then
vers=`$pkg_config --modversion "$req"`
if $pkg_config --exists "$req >= $min" ; then
AC_MSG_RESULT($vers)
pkgs="$pkgs $req"
return 1
else
AC_MSG_RESULT($vers (wanted >= $min))
ok=no
return 0
fi
else
AC_MSG_RESULT(no)
ok=no
return 0
fi
fi
}
AC_ARG_WITH(gtk2, [ --without-gtk2 disable GTK2 (no xglock build)],)
if test "x$with_gtk2" != "xno" ; then
#AC_MSG_RESULT(checking for GTK 2.x with pkg-config based tests...)
ok="yes"
pkg_check_version gtk+-2.0 2.0.1 ; ac_gtk_version_string="$vers"
have_gtk="$ok"
if test "$have_gtk" = yes; then
XGLOCK="xglock"
INSTALL_XGLOCK="install_xglock"
UNINSTALL_XGLOCK="uninstall_xglock"
XGLOCKINC=`$pkg_config --cflags gtk+-x11-2.0`
XGLOCKLDFLAGS=`$pkg_config --libs gtk+-x11-2.0`
with_gtk="no"
fi
fi
fi
AC_ARG_WITH(gtk, [ --without-gtk disable GTK (no xglock build)],)
if test "x$with_gtk" != "xno" ; then
AC_PATH_GTK(1.2.0,
have_gtk="yes",
have_gtk="no")
if test "$have_gtk" = yes; then
XGLOCK="xglock"
INSTALL_XGLOCK="install_xglock"
UNINSTALL_XGLOCK="uninstall_xglock"
fi
fi
dnl Should have a tester for XHPUX Xhp
dnl Now we handle the various system dependant problems
dnl that are not addressed in the X header files, or things dealing
dnl with utility quirks on some systems.
aixv3=no
dirent=yes
case "${canonical}" in
*-*-aix* )
BITMAPTYPE="ibm"
PIXMAPTYPE="ibm"
AC_DEFINE(AIXV3)
aixv3=yes
case "${canonical}" in
*-*-aix2* | *-*-aix3.0* | *-*-aix3.1* )
AC_DEFINE(LESS_THAN_AIX3_2)
;;
esac
;;
*-*-freebsd* | *-*-netbsd* | *-*-dragonfly* )
BITMAPTYPE="bsd"
PIXMAPTYPE="bsd"
INSTPGMFLAGS="-s -o root -m 4111"
cpp_name=`echo $CC | cut -f1 -d' '`
if test "$cpp_name" = "gcc"; then
dirname=`which gcc`
dirname=`dirname $dirname`
dirname=`dirname $dirname`/lib
if test "$dirname" != "/lib"; then
XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$dirname"
XMLOCK_LDFLAGS="${XMLOCK_LDFLAGS}:$dirname"
fi
fi
XLOCKLDFLAGS="-Wl,-R${XLOCK_LDFLAGS}"
XMLOCKLDFLAGS="-Wl,-R${XMLOCK_LDFLAGS}"
;;
*-*-openbsd*)
BITMAPTYPE="blowfish"
PIXMAPTYPE="blowfish"
INSTPGMFLAGS="-s -g auth -m 2755"
;;
*-*-dgux5* )
BITMAPTYPE="x11"
PIXMAPTYPE="x11"
;;
*-*-hpux* )
if test "${CC}" = "cc" ; then
dnl CFLAGS="${CFLAGS} -O -Aa -z -D_HPUX_SOURCE" # -O sometimes problems
CFLAGS="${CFLAGS} -Aa -z -D_HPUX_SOURCE"
GPROF_CFLAGS="${GPROF_CFLAGS} -Aa -z -D_HPUX_SOURCE"
fi
dnl LDFLAGS=-Wl,-B,immediate
XLOCKLIBS="-lXhp11 ${XLOCKLIBS}"
AC_DEFINE(SYSV)
AC_DEFINE(SVR4)
BITMAPTYPE="hp"
PIXMAPTYPE="hp"
;;
*-*-irix5* | *-*-irix6* )
if test "${CC}" = "cc" ; then
CFLAGS="${CFLAGS} -fullwarn"
fi
AC_DEFINE_UNQUOTED(glGenTextures,"glGenTexturesEXT")
AC_DEFINE_UNQUOTED(glDeleteTextures,"glDeleteTexturesEXT")
AC_DEFINE_UNQUOTED(glBindTextures,"glBindTexturesEXT")
BITMAPTYPE="sgi"
PIXMAPTYPE="sgi"
;;
*-*-linux* )
AC_CHECK_HEADER(elf.h, AC_DEFINE(HAVE_SHADOW))
dnl CFLAGS="${CFLAGS} -ansi -pedantic"
AC_DEFINE(linux)
dnl AC_DEFINE(__i386__)
AC_DEFINE(_POSIX_SOURCE)
AC_DEFINE(_BSD_SOURCE)
AC_DEFINE(_GNU_SOURCE)
dnl AC_DEFINE(DX_LOCALE)
if test -e /etc/shadow ; then
INSTPGMFLAGS="-g shadow -m 2111"
case `ls -l /etc/shadow` in
-???r?????\ *\ shadow\ *\ /etc/shadow) # group shadow can read it
INSTPGMFLAGS="-g shadow -m 2111"
;;
*)
INSTPGMFLAGS="-o root -m 4111"
;;
esac
fi
INSTPGMFLAGS="-s $INSTPGMFLAGS"
BITMAPTYPE="linux"
PIXMAPTYPE="linux"
dnl if Shadow and not elf
dnl XLOCKLIBS="${XLOCKLIBS} -lgdbm"
;;
*-*-cygwin* )
BITMAPTYPE="cygwin"
PIXMAPTYPE="cygwin"
;;
*-*-osf* )
BITMAPTYPE="dec"
PIXMAPTYPE="dec"
AC_MSG_CHECKING([for Digital/Tru64 Unix Enhanced Security])
# This section should check for the presense of the newer Enhanced
# security routines, and use them if they're available.
if test -f /usr/sbin/rcmgr && test -f /etc/rc.config ; then
if test X`/usr/sbin/rcmgr get SECURITY` = XENHANCED ; then
AC_MSG_RESULT(yes)
AC_DEFINE(OSF1_ENH_SEC)
AC_SUBST(OSF1_ENH_SEC)
XLOCKLIBS="${XLOCKLIBS} -lsecurity"
# SETGID auth may not be enough for Tru64 5.x.
INSTPGMFLAGS="-s -g auth -m 2111"
else
AC_MSG_RESULT(no)
fi
fi
;;
*-*-sco* )
BITMAPTYPE="sco"
PIXMAPTYPE="sco"
AC_DEFINE(HAVE_SHADOW)
AC_DEFINE(SYSV)
;;
*-*-solaris2* )
AC_DEFINE(SOLARIS2)
PIXMAPTYPE="solaris"
case "${canonical}" in
*-*-solaris2.0* | *-*-solaris2.1* | *-*-solaris2.2* | *-*-solaris2.3* | *-*-solaris2.4* )
AC_DEFINE(LESS_THAN_SOLARIS2_5)
PIXMAPTYPE="sol"
;;
*-*-solaris2.5* | *-*-solaris2.6* )
PIXMAPTYPE="sol"
;;
esac
INSTPGMFLAGS="-s -o root -m 4111"
AC_DEFINE(HAVE_SHADOW)
AC_DEFINE(SYSV)
AC_DEFINE(SVR4)
BITMAPTYPE="sun"
dnl XLOCKLIBS="${XLOCKLIBS} -lsocket -lnsl -lposix4"
XLOCKLIBS="${XLOCKLIBS} -lposix4"
LIBS="${LIBS} -lsocket -lnsl -lposix4"
cpp_name=`echo $CC | cut -f1 -d' '`
if test "$cpp_name" = "gcc"; then
dirname=`which gcc`
dirname=`dirname $dirname`
dirname=`dirname $dirname`/lib
if test "$dirname" != "/lib"; then
XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$dirname"
XMLOCK_LDFLAGS="${XMLOCK_LDFLAGS}:$dirname"
fi
fi
XLOCKLDFLAGS="-R${XLOCK_LDFLAGS}"
XMLOCKLDFLAGS="-R${XMLOCK_LDFLAGS}"
;;
*-*-sunos4* )
AC_DEFINE(SUNOS4)
BITMAPTYPE="sun"
PIXMAPTYPE="sun"
;;
*-*-sysv5* )
INSTPGMFLAGS="-s -o root -m 4111"
AC_DEFINE(HAVE_SHADOW)
AC_DEFINE(SYSV)
AC_DEFINE(SVR4)
XLOCKLIBS="${XLOCKLIBS} -lgen"
XMLOCKLIBS="${XMLOCKLIBS} -lgen"
LIBS="${LIBS} -lsocket -lnsl"
BITMAPTYPE="x11"
PIXMAPTYPE="x11"
;;
*)
BITMAPTYPE="x11"
PIXMAPTYPE="x11"
;;
esac
if test "$dirent" = yes; then
AC_HEADER_DIRENT
fi
dnl Rather have a usleep
AC_CHECK_FUNC(usleep, AC_DEFINE(HAVE_USLEEP))
if test $ac_cv_func_usleep = no; then
AC_CHECK_FUNC(nanosleep, AC_DEFINE(HAVE_NANOSLEEP))
fi
dnl AC_CHECK_FUNCS(gettimeofday)
AC_MSG_CHECKING(how to call gettimeofday)
AC_CACHE_VAL(ac_cv_gettimeofday_args,
[AC_TRY_COMPILE([#include <stdlib.h>
#include <sys/time.h>],
[struct timeval tv; struct timezone tzp;
gettimeofday(&tv, &tzp);],
[ac_gettimeofday_args=2],
[AC_TRY_COMPILE([#include <stdlib.h>
#include <sys/time.h>],
[struct timeval tv; gettimeofday(&tv);],
[ac_gettimeofday_args=1],
[ac_gettimeofday_args=0])])
ac_cv_gettimeofday_args=$ac_gettimeofday_args])
ac_gettimeofday_args=$ac_cv_gettimeofday_args
if test $ac_gettimeofday_args = 2 ; then
AC_DEFINE(HAVE_GETTIMEOFDAY)
AC_DEFINE(GETTIMEOFDAY_TWO_ARGS)
AC_MSG_RESULT(two arguments)
elif test $ac_gettimeofday_args = 1 ; then
AC_DEFINE(HAVE_GETTIMEOFDAY)
AC_MSG_RESULT(one argument)
else
AC_MSG_RESULT(unknown)
fi
AC_CHECK_FUNCS(tzset timelocal)
AC_C_INLINE
srand=no
dnl AC_CHECK_FUNC(srand48, AC_DEFINE(SRAND,srand48) AC_DEFINE(LRAND,lrand48)
dnl AC_DEFINE(MAXRAND,2147483648.0),
dnl [AC_CHECK_FUNC(srandom, AC_DEFINE(SRAND,srandom) AC_DEFINE(LRAND,random)
dnl AC_DEFINE(MAXRAND,2147483648.0),
dnl AC_CHECK_FUNC(srand, AC_DEFINE(SRAND,srand) AC_DEFINE(LRAND,rand) srand=yes))])
AC_CHECK_FUNC(srand48,
[AC_DEFINE(HAVE_RAND48)
AC_MSG_CHECKING([for srand48 declaration])
AC_EGREP_HEADER(srand48, stdlib.h,
AC_DEFINE(DECLARED_SRAND48) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))])
if test $ac_cv_func_srand48 = no; then
AC_CHECK_FUNC(srandom, AC_DEFINE(HAVE_RANDOM))
if test $ac_cv_func_srandom = no; then
AC_CHECK_FUNC(random, AC_DEFINE(HAVE_RAND) srand=yes)
fi
fi
if test "$srand" = yes; then
if test "$aixv3" = yes; then
AC_DEFINE(MAXRAND,2147483648.0)
else
AC_DEFINE(MAXRAND,32768.0)
fi
fi
AC_MSG_CHECKING([matherr support])
AC_CACHE_VAL(ac_cv_c_matherr,[
AC_TRY_COMPILE([#define _XOPEN_SOURCE 1
#include <math.h>], [
struct exception x;
x.type = DOMAIN;
x.type = SING;
], ac_cv_c_matherr=yes, ac_cv_c_matherr=no)])
if test x"$ac_cv_c_matherr" = xyes; then
AC_DEFINE(USE_MATHERR)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
dnl Problems here if -I/usr/include used with gcc on Solaris
AC_MSG_CHECKING([struct sigset_t])
AC_CACHE_VAL(ac_cv_c_sigset_t,[
AC_TRY_COMPILE([/*#define _XOPEN_SOURCE 1*/
#include <signal.h>], [
typedef struct {unsigned long __sigbits[4];} sigset_t;
sigset_t sigmask;
], ac_cv_c_sigset_t=yes, ac_cv_c_sigset_t=no)])
if test x"$ac_cv_c_sigset_t" = xyes; then
case "${canonical}" in
*-*-solaris2.0* | *-*-solaris2.1* | *-*-solaris2.2* | *-*-solaris2.3* | *-*-solaris2.4* | *-*-solaris2.5*)
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_STRUCT_SIGSET_T)
;;
*)
AC_MSG_RESULT(no)
;;
esac
else
AC_MSG_RESULT(no)
fi
dnl Problems here if -I/usr/include/stddef.h used with g++ on Solaris
AC_LANG_CPLUSPLUS
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I/usr/include"
AC_MSG_CHECKING([whether wchar_t is defined internal to C++])
AC_CACHE_VAL(ac_cv_c_wchar_t,[
AC_TRY_COMPILE([
#include <stddef.h>], [
], ac_cv_c_wchar_t=no, ac_cv_c_wchar_t=yes)])
if test x"$ac_cv_c_wchar_t" = xyes; then
AC_DEFINE(_WCHAR_T)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
CPPFLAGS="$ac_save_CPPFLAGS"
AC_LANG_C
AC_ARG_ENABLE(bitmapdir, [ --enable-bitmapdir=DIR set directory for bitmaps, default is ./bitmaps],bitmap_dir=$enableval,bitmap_dir=no)
case "x$bitmap_dir" in
x/*|x.*)
AC_MSG_RESULT([setting BITMAPDIR = $enableval])
BITMAPDIR=$enableval
if test ! -d $bitmap_dir; then
AC_MSG_RESULT([Warning: Directory $enableval does not exist])
fi
;;
*)
BITMAPDIR='$(top_srcdir)/bitmaps'
bitmap_dir='$top_srcdir/bitmaps'
;;
esac
AC_ARG_ENABLE(bitmaptype, [ --enable-bitmaptype=name
set name for bitmap type],bitmap_type=$enableval,bitmap_type=no)
case "x$bitmap_type" in
xyes*|xno*)
;;
*)
AC_MSG_RESULT([setting BITMAPTYPE = $enableval])
BITMAPTYPE=$enableval
if test ! -f $bitmap_dir/l-$BITMAPTYPE.xbm; then
AC_MSG_RESULT([Warning: Bitmap $BITMAPDIR/l-$BITMAPTYPE.xbm does not exist])
fi
;;
esac
AC_ARG_ENABLE(pixmapdir, [ --enable-pixmapdir=DIR set directory for pixmaps, default is ./pixmaps],pixmap_dir=$enableval,pixmap_dir=no)
case "x$pixmap_dir" in
x/*|x.*)
AC_MSG_RESULT([setting PIXMAPDIR = $enableval])
PIXMAPDIR=$enableval
if test ! -d $pixmap_dir; then
AC_MSG_RESULT([Warning: Directory $enableval does not exist])
fi
;;
*)
PIXMAPDIR='$(top_srcdir)/pixmaps'
pixmap_dir='$top_srcdir/pixmaps'
;;
esac
AC_ARG_ENABLE(pixmaptype, [ --enable-pixmaptype=name
set name for pixmap type],pixmap_type=$enableval,pixmap_type=no)
case "x$pixmap_type" in
xyes*|xno*)
;;
*)
AC_MSG_RESULT([setting PIXMAPTYPE = $enableval])
PIXMAPTYPE=$enableval
if test ! -f $pixmap_dir/m-$PIXMAPTYPE.xpm; then
AC_MSG_RESULT([Warning: Pixmap $PIXMAPDIR/m-$PIXMAPTYPE.xpm does not exist])
fi
;;
esac
AC_ARG_ENABLE(mapdir, [ --enable-mapdir=DIR set directory for bitmaps and pixmaps],map_dir=$enableval,map_dir=no)
case "x$map_dir" in
x/*|x.*)
AC_MSG_RESULT([setting BITMAPDIR = $enableval])
BITMAPDIR=$enableval
AC_MSG_RESULT([setting PIXMAPDIR = $enableval])
PIXMAPDIR=$enableval
if test ! -d $map_dir; then
AC_MSG_RESULT([Warning: Directory $enableval does not exist])
fi
;;
*)
BITMAPDIR='$(top_srcdir)/bitmaps'
bitmap_dir='$top_srcdir/bitmaps'
PIXMAPDIR='$(top_srcdir)/pixmaps'
pixmap_dir='$top_srcdir/pixmaps'
;;
esac
AC_ARG_ENABLE(maptype, [ --enable-maptype=name set name for bitmap and pixmap type],map_type=$enableval,map_type=no)
case "x$map_type" in
xyes*|xno*)
;;
*)
AC_MSG_RESULT([setting BITMAPTYPE = $enableval])
BITMAPTYPE=$enableval
if test ! -f $map_dir/l-$BITMAPTYPE.xbm; then
AC_MSG_RESULT([Warning: Bitmap $BITMAPDIR/l-$BITMAPTYPE.xbm does not exist])
fi
AC_MSG_RESULT([setting PIXMAPTYPE = $enableval])
PIXMAPTYPE=$enableval
if test ! -f $map_dir/m-$PIXMAPTYPE.xpm; then
AC_MSG_RESULT([Warning: Pixmap $PIXMAPDIR/m-$PIXMAPTYPE.xpm does not exist])
fi
;;
esac
if test "$sound" = none; then
AC_ARG_ENABLE(def_play, [ --enable-def-play=program
set def-play to program that plays sounds],def_play=$enableval,def_play=no)
if test "$def_play" != no; then
AC_MSG_RESULT([defining option DEF_PLAY = "$enableval"])
AC_DEFINE_UNQUOTED(DEF_PLAY,"$enableval")
fi
fi
AC_ARG_ENABLE(vroot, [ --disable-vroot disables xlock from being able to run in root window
(some window managers have problems)],use_vroot=$enableval,use_vroot=yes)
if test "$use_vroot" = yes; then
AC_MSG_RESULT([defining option USE_VROOT])
AC_DEFINE(USE_VROOT)
fi
AC_ARG_ENABLE(allow-root, [ --disable-allow-root allows users to turn off allowroot (default is to
always allow root to be able to unlock xlock)],allow_root=$enableval,allow_root=yes)
if test "$allow_root" = yes; then
AC_MSG_RESULT([defining option ALWAYS_ALLOW_ROOT])
AC_DEFINE(ALWAYS_ALLOW_ROOT)
fi
case ${canonical} in
*-*-linux* | *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | *-*-dragonfly* )
AC_ARG_ENABLE(vtlock, [ --enable-vtlock allows to turn on VT switch lock (default is to be
able to switch to another VT)],vtlock=$enableval,vtlock=no)
if test "$vtlock" = yes; then
AC_MSG_RESULT([defining option USE_VTLOCK])
AC_DEFINE(USE_VTLOCK)
fi
;;
*)
;;
esac
AC_ARG_ENABLE(syslog, [ --enable-syslog enable syslog logging],use_syslog=$enableval,use_syslog=no)
if test "$use_syslog" = yes; then
AC_MSG_RESULT([defining option USE_SYSLOG])
AC_DEFINE(USE_SYSLOG)
fi
AC_ARG_ENABLE(multiple-user, [ --enable-multiple-user enable multiple users],use_multiple_user=$enableval,use_multiple_user=no)
if test "$use_multiple_user" = yes; then
AC_MSG_RESULT([defining option USE_MULTIPLE_USER])
AC_DEFINE(USE_MULTIPLE_USER)
fi
AC_ARG_ENABLE(multiple-root, [ --enable-multiple-root enable multiple root users],use_multiple_root=$enableval,use_multiple_root=no)
if test "$use_multiple_root" = yes; then
AC_MSG_RESULT([defining option USE_MULTIPLE_ROOT])
AC_DEFINE(USE_MULTIPLE_ROOT)
fi
AC_ARG_ENABLE(xlock-group, [ --enable-xlock-group enable all in xlock group to unlock],use_xlock_group=$enableval,use_xlock_group=no)
if test "$use_xlock_group" = yes; then
AC_MSG_RESULT([defining option USE_XLOCK_GROUP])
AC_DEFINE(USE_XLOCK_GROUP)
fi
AC_ARG_ENABLE(window-visibility, [ --enable-window-visibility
allow a window to be displayed over xlock],use_window_visiblity=$enableval,use_window_visibility=no)
if test "$use_window_visibility" = yes; then
AC_MSG_RESULT([defining option USE_WINDOW_VISIBILITY])
AC_DEFINE(USE_WINDOW_VISIBLITY)
fi
AC_ARG_ENABLE(old-event-loop, [ --enable-old-event-loop some machines may still need this
(fd_set errors may be a sign)],use_old_event_loop=$enableval,use_old_event_loop=no)
if test "$use_old_event_loop" = yes; then
AC_MSG_RESULT([defining option USE_OLD_EVENT_LOOP])
AC_DEFINE(USE_OLD_EVENT_LOOP)
fi
dnl AC_ARG_ENABLE(vmsutils, [ --enable-vmsutils patches up old __VMS_VER < 70000000],use_vmsutils=$enableval,use_vmsutils=no)
dnl if test "$use_vmsutils" = yes; then
dnl AC_MSG_RESULT([defining option USE_VMSUTILS])
dnl AC_DEFINE(USE_VMSUTILS)
dnl fi
AC_ARG_ENABLE(xlockrc, [ --enable-xlockrc for unknown shadow passwd algorithm],use_xlockrc=$enableval,use_xlockrc=no)
if test "$use_xlockrc" = yes; then
AC_MSG_RESULT([defining option USE_XLOCKRC])
AC_DEFINE(USE_XLOCKRC)
else
who_am_i=`whoami`
if cat /etc/passwd | grep "unused_by_nt/2000/xp" | grep $who_am_i > /dev/null 2>&1
then
case "${canonical}" in
*-*-cygwin* )
AC_MSG_RESULT([*** For cygwin, use --enable-xlockrc or write an encrypted password])
AC_MSG_RESULT([*** to /etc/passwd replacing "unused_by_nt/2000/xp for $who_am_i"])
;;
esac
fi
fi
AC_ARG_ENABLE(auto-logout, [ --enable-auto-logout=time
enable auto-logout code for lab use (time in minutes)],use_auto_logout=$enableval,use_auto_logout=no)
case "x$use_auto_logout" in
x|xyes*)
AC_MSG_RESULT([defining option USE_AUTO_LOGOUT = 240 minutes])
AC_DEFINE(USE_AUTO_LOGOUT,240)
;;
x[[0-9]]*)
AC_MSG_RESULT([defining option USE_AUTO_LOGOUT = $enableval minutes])
AC_DEFINE_UNQUOTED(USE_AUTO_LOGOUT,$enableval)
;;
xno*)
;;
*)
AC_MSG_RESULT([Warning: Illegal time value "$use_auto_logout" given])
AC_MSG_RESULT([defining option USE_AUTO_LOGOUT = 240 minutes])
AC_DEFINE(USE_AUTO_LOGOUT,240)
;;
esac
AC_ARG_ENABLE(default-auto-logout, [ --enable-default-auto-logout=time
set default-auto-logout (time in minutes)],
def_auto_logout=$enableval,
def_auto_logout=no)
case "x$def_auto_logout" in
x|xyes*)
AC_MSG_RESULT([defining option DEF_AUTO_LOGOUT = 120 minutes])
AC_DEFINE(DEF_AUTO_LOGOUT,"120")
;;
x[[0-9]]*)
AC_MSG_RESULT([defining option DEF_AUTO_LOGOUT = $enableval minutes])
AC_DEFINE_UNQUOTED(DEF_AUTO_LOGOUT,"$enableval")
;;
xno*)
;;
*)
AC_MSG_RESULT([Warning: Illegal time value "$def_auto_logout" given])
AC_MSG_RESULT([defining option DEF_AUTO_LOGOUT = 120 minutes])
AC_DEFINE(DEF_AUTO_LOGOUT,"120")
;;
esac
AC_ARG_ENABLE(button-logout, [ --enable-button-logout=time
enable button logout for lab use (time in minutes)],
use_button_logout=$enableval,
use_button_logout=no)
case "x$use_button_logout" in
x|xyes*)
AC_MSG_RESULT([defining option USE_BUTTON_LOGOUT = 10 minutes])
AC_DEFINE(USE_BUTTON_LOGOUT,10)
;;
x[[0-9]]*|x-[0-9]*)
AC_MSG_RESULT([defining option USE_BUTTON_LOGOUT = $enableval minutes])
AC_DEFINE_UNQUOTED(USE_BUTTON_LOGOUT,$enableval)
;;
xno*)
;;
*)
AC_MSG_RESULT([Warning: Illegal time value "$use_button_logout" given])
AC_MSG_RESULT([defining option USE_BUTTON_LOGOUT = 10 minutes])
AC_DEFINE(USE_BUTTON_LOGOUT,10)
;;
esac
AC_ARG_ENABLE(default-button-logout, [ --enable-default-button-logout=time
set default-button-logout (time in minutes)],
def_button_logout=$enableval,
def_button_logout=no)
case "x$def_button_logout" in
x|xyes*)
AC_MSG_RESULT([defining option DEF_BUTTON_LOGOUT = 5 minutes])
AC_DEFINE(DEF_BUTTON_LOGOUT,"5")
;;
x[[0-9]]*)
AC_MSG_RESULT([defining option DEF_BUTTON_LOGOUT = $enableval minutes])
AC_DEFINE_UNQUOTED(DEF_BUTTON_LOGOUT,"$enableval")
;;
xno*)
;;
*)
AC_MSG_RESULT([Warning: Illegal time value "$def_button_logout" given])
AC_MSG_RESULT([defining option DEF_BUTTON_LOGOUT = 5 minutes])
AC_DEFINE(DEF_BUTTON_LOGOUT,"5")
;;
esac
dnl Maybe soon
dnl AC_ARG_ENABLE(button-up, [ --enable-button-up force button password screen to stay up],
dnl use_button_up=$enableval,
dnl use_button_up=no)
dnl if test "$use_button_up" = yes; then
dnl AC_MSG_RESULT([defining option USE_BUTTON_UP])
dnl AC_DEFINE(USE_BUTTON_UP)
dnl fi
AC_ARG_ENABLE(bomb, [ --disable-bomb disable automatic logout mode],
use_bomb=$enableval,
use_bomb=yes)
if test "$use_bomb" = yes; then
AC_MSG_RESULT([defining option USE_BOMB])
AC_DEFINE(USE_BOMB)
BOMB=""
else
BOMB="#"
fi
AC_ARG_ENABLE(interactive, [ --disable-interactive disables interactive modes (useful for prod env)],
no_interactive=$enableval,
no_interactive=yes)
if test "$no_interactive" = no; then
AC_MSG_RESULT([defining option DISABLE_INTERACTIVE])
AC_DEFINE(DISABLE_INTERACTIVE)
INTERACTIVE=""
else
INTERACTIVE="#"
fi
AC_ARG_ENABLE(unstable, [ --enable-unstable enables unstable (alpha) modes],
use_unstable=$enableval,
use_unstable=no)
if test "$use_unstable" = yes; then
AC_MSG_RESULT([defining option USE_UNSTABLE])
AC_DEFINE(USE_UNSTABLE)
UNSTABLE=""
else
UNSTABLE="#"
fi
AC_ARG_ENABLE(negative-logout, [ --disable-negative-logout
allows users to deny logout button and autologout],
negative-logout=$enableval,
negative_logout=yes)
if test "$negative_logout" = no; then
AC_MSG_RESULT([defining option NO_NEGATIVE_LOGOUT])
AC_DEFINE(NO_NEGATIVE_LOGOUT)
fi
AC_ARG_ENABLE(closedown-logout, [ --enable-closedown-logout
define this one or next, with enable-auto-logout],
closedown_logout=$enableval,
closedown_logout=no)
if test "$closedown_logout" = yes; then
AC_MSG_RESULT([defining option CLOSEDOWN_LOGOUT])
AC_DEFINE(CLOSEDOWN_LOGOUT)
fi
AC_ARG_ENABLE(session-logout, [ --enable-session-logout enable-button-logout, and/or enable-bomb, for xdm],
session_logout=$enableval,
session_logout=no)
if test "$session_logout" = yes; then
AC_MSG_RESULT([defining option SESSION_LOGOUT])
AC_DEFINE(SESSION_LOGOUT)
fi
AC_ARG_ENABLE(staff-file, [ --enable-staff-file=filename
set file of staff who are exempt from auto-logout],
use_staff_file=$enableval,
use_staff_file=no)
case "x$use_staff_file" in
x|xyes*)
AC_MSG_RESULT([defining option STAFF_FILE = "/usr/remote/etc/xlock.staff"])
AC_DEFINE_UNQUOTED(STAFF_FILE,"/usr/remote/etc/xlock.staff")
if test ! -f /usr/remote/etc/xlock.staff; then
AC_MSG_RESULT([Warning: File /usr/remote/etc/xlock.staff does not exist])
fi
;;
x/*)
AC_MSG_RESULT([defining option STAFF_FILE = "$enableval"])
AC_DEFINE_UNQUOTED(STAFF_FILE,"$enableval")
if test ! -f $use_staff_file; then
AC_MSG_RESULT([Warning: File $enableval does not exist])
fi
;;
esac
AC_ARG_ENABLE(staff-netgroup, [ --enable-staff-netgroup=netgroup
set netgroup of staff who are exempt from auto-logout],use_staff_netgroup=$enableval,use_staff_netgroup=no)
if test "$use_staff_netgroup" != no; then
AC_MSG_RESULT([defining option STAFF_NETGROUP = "$enableval"])
AC_DEFINE_UNQUOTED(STAFF_NETGROUP,"$enableval")
fi
AC_ARG_ENABLE(kerberos4, [ --enable-kerberos4 enable Kerberos 4],kerberos4=$enableval,kerberos4=no)
if test "$kerberos4" = yes; then
AC_MSG_RESULT([defining option HAVE_KRB4])
AC_DEFINE(HAVE_KRB4)
XLOCKINC="${XLOCKINC} -I/usr/athena/include"
XLOCKLIBS="${XLOCKLIBS} -L/usr/athena/lib -lkrb -ldes"
fi
AC_ARG_ENABLE(kerberos5, [ --enable-kerberos5 enable Kerberos 5],kerberos5=$enableval,kerberos5=no)
if test "$kerberos5" = yes; then
AC_MSG_RESULT([defining option HAVE_KRB5])
AC_DEFINE(HAVE_KRB5)
fi
AC_ARG_WITH(krb5-config, [ --with-krb5-config=PATH Location of krb5-config script],[
if test $withval = yes; then
AC_PATH_PROG(krb5_config, krb5-config, not_found)
if test X$krb5_config = Xnot_found; then
AC_MSG_ERROR(unable to find krb5-config)
fi
else
krb5_config=$withval
if test ! -x $krb5_config; then
AC_MSG_ERROR([unable to find krb5-config at $krb5_config])
fi
fi
krb5_cflags=`$krb5_config --cflags krb5`
retval=$?
if test $retval -ne 0; then
AC_MSG_ERROR($krb5_config failed with error code of $retval)
fi
krb5_libs=`$krb5_config --libs krb5`
retval=$?
if test $retval -ne 0; then
AC_MSG_ERROR($krb5_config failed with error code of $retval)
fi
AC_MSG_RESULT(Adding $krb5_cflags to XLOCKINC)
AC_MSG_RESULT(Adding $krb5_libs to XLOCKLIBS)
XLOCKINC="$XLOCKINC $krb5_cflags"
XLOCKLIBS="$XLOCKLIBS $krb5_libs"
])dnl
AC_ARG_ENABLE(write_krb5, [ --enable-write-krb5 write new krb5 credentials to credential cache], write_krb5=$enableval, write_krb5=no)
if test "$write_krb5" = yes; then
AC_MSG_RESULT(Will write out krb5 credentials to credential cache)
AC_DEFINE(KRB5_WRITE_NEW_CCACHE)
fi
AC_ARG_ENABLE(dce_passwd, [ --enable-dce-passwd enable DCE passwording],dce_passwd=$enableval,dce_passwd=no)
if test "$dce_passwd" = yes; then
AC_MSG_RESULT([defining option DCE_PASSWD])
AC_DEFINE(DCE_PASSWD)
XLOCKINC="${XLOCKINC} -I/usr/include/reentrant"
XLOCKLIBS="${XLOCKLIBS} -ldce -lc_r"
fi
AC_ARG_ENABLE(pam, [ --enable-pam enable PAM], pam=$enableval,pam=no)
if test "$pam" = yes; then
if test "$use_xlockrc" = yes; then
AC_MSG_RESULT([not defining option USE_PAM (mutually exclusive with xlockrc)])
else
AC_MSG_RESULT([defining option USE_PAM])
AC_DEFINE(USE_PAM)
AC_CHECK_FUNC(dlsym, [ XLOCKLIBS="${XLOCKLIBS} -lpam" ], [ XLOCKLIBS="${XLOCKLIBS} -lpam -ldl"])
fi
fi
AC_ARG_ENABLE(bad_pam, [ --enable-bad-pam enable BAD_PAM], bad_pam=$enableval,bad_pam=no)
if test "$bad_pam" = yes; then
if test "$pam" = no; then
AC_MSG_RESULT([not defining option BAD_PAM (need PAM)])
else
AC_MSG_RESULT([defining option BAD_PAM])
AC_DEFINE(BAD_PAM)
fi
fi
AC_ARG_ENABLE(good_pam, [ --enable-good-pam enable GOOD_PAM], good_pam=$enableval,good_pam=no)
if test "$good_pam" = yes; then
if test "$pam" = no; then
AC_MSG_RESULT([not defining option GOOD_PAM (need PAM)])
else
AC_MSG_RESULT([defining option GOOD_PAM])
AC_DEFINE(GOOD_PAM)
fi
fi
AC_ARG_ENABLE(afs, [ --enable-afs enable AFS],afs=$enableval,afs=no)
if test "$afs" = yes; then
AC_MSG_RESULT([defining option AFS])
AC_DEFINE(AFS)
XLOCKINC="${XLOCKINC} -I/usr/afsws/include"
case "${canonical}" in
*-*-solaris2.* )
XLOCKLIBS="${XLOCKLIBS} -lucb -L/usr/afsws/lib -L/usr/afsws/lib/afs -lkauth.krb -lprot -lubik -lauth.krb -lrxkad -lsys -ldes -lrx -llwp -lcom_err -lcmd /usr/afsws/lib/afs/util.a -laudit -lsys"
;;
*-*-osf* )
XLOCKLIBS="${XLOCKLIBS} -L/usr/afsws/lib -L/usr/afsws/lib/afs -laudit -lkauth -lafsrpc -lrxkad -lubik -lprot -lrxkad -lrx -llwp -lauth -lsys -ldes -lcmd -lcom_err /usr/afsws/lib/afs/util.a -lpthread -laudit -llwp"
;;
* )
XLOCKLIBS="${XLOCKLIBS} -L/usr/afsws/lib -L/usr/afsws/lib/afs -lkauth -lubik -lprot -lrxkad -lrx -llwp -lauth -lsys -ldes -lcmd -lcom_err /usr/afsws/lib/afs/util.a -laudit"
;;
esac
fi
AC_ARG_ENABLE(sia, [ --enable-sia enable SIA],sia=$enableval,sia=no)
if test "$sia" = yes; then
AC_MSG_RESULT([defining option SIA])
AC_DEFINE(SIA)
XLOCKLIBS="${XLOCKLIBS} -lsecurity"
fi
AC_ARG_ENABLE(sunos_adjunct_passwd, [ --enable-sunos-adjunct-passwd
enable SUNOS Adjunct passwording],sunos_adjunct_passwd=$enableval,sunos_adjunct_passwd=no)
if test "$sunos_adjunct_passwd" = yes; then
AC_MSG_RESULT([defining option SUNOS_ADJUNCT_PASSWD])
AC_DEFINE(SUNOS_ADJUNCT_PASSWD)
fi
AC_ARG_WITH(passwd-helper,
[ --with-passwd-helper=/path Use external helper program for authentication],
passwd_helper=$withval)
if test "$passwd_helper" != ""; then
AC_MSG_RESULT([using password helper $passwd_helper])
AC_DEFINE_UNQUOTED(PASSWD_HELPER_PROGRAM, "$passwd_helper")
fi
AC_ARG_ENABLE(use_mb, [ --enable-use-mb enable Xmb function series],use_mb=$enableval,use_mb=no)
if test "$use_mb" = yes; then
AC_MSG_RESULT([defining option USE_MB])
AC_DEFINE(USE_MB)
fi
AC_ARG_ENABLE(customization, [ --enable-customization enable customization of XResource],customization=$enableval,customization=no)
if test "$customization" = yes; then
AC_MSG_RESULT([defining option CUSTOMIZATION])
AC_DEFINE(CUSTOMIZATION)
fi
AC_ARG_ENABLE(modules, [ --enable-modules enable modules (better to use xmkmf for this)],modules=$enableval,modules=no)
if test "$modules" = yes; then
AC_MSG_RESULT([enabling xlk modules])
MODULES=""
NOMODULES="#"
AC_DEFINE(USE_MODULES)
case ${canonical} in
*-*-linux* )
MODULEFLAGS="-rdynamic"
;;
*)
MODULEFLAGS=""
;;
esac
else
MODULES="#"
NOMODULES=""
MODULEFLAGS=""
fi
AC_ARG_ENABLE(blank_only, [ --enable-blank-only enable blank mode only (boring)],
blank_only=$enableval,
blank_only=no)
if test "$blank_only" = "yes"; then
AC_MSG_RESULT([enabling blank mode only])
AC_DEFINE(BLANK_ONLY)
else
AC_ARG_ENABLE(nice_only, [ --enable-nice-only enable only low cpu modes ],
nice_only=$enableval,
nice_only=no)
if test "$nice_only" = "yes"; then
AC_MSG_RESULT([enabling nice modes only])
AC_DEFINE(NICE_ONLY)
fi
fi
AC_ARG_ENABLE(magick, [ --enable-magick enable ImageMagick (experimental)],magick=$enableval,magick=no)
if test "$magick" = yes; then
AC_MSG_RESULT([enabling ImageMagick])
XLOCKLIBS="${XLOCKLIBS} `Magick-config --libs`"
AC_DEFINE(USE_MAGICK)
fi
AC_ARG_ENABLE(check, [ --enable-check enable check (experimental)],check=$enableval,check=no)
if test "$check" = yes; then
AC_MSG_RESULT([enabling memory debug checking])
CHECK=""
else
CHECK="#"
fi
AC_ARG_WITH(lang, [ --with-lang=lang use a foreign language (nl/fr/de/ja)],lang=$withval,lang=none)
case "$lang" in
nl|NL|Nl)
AC_MSG_RESULT([enabling some reporting in Dutch])
AC_DEFINE(NL)
;;
fr|FR|Fr)
AC_MSG_RESULT([enabling some reporting in French])
AC_DEFINE(FR)
;;
de|DE|De)
AC_MSG_RESULT([enabling some reporting in German])
AC_DEFINE(DE)
;;
ja|JA|Ja)
AC_MSG_RESULT([enabling some reporting in Japanese])
AC_DEFINE(JA)
;;
none)
AC_MSG_RESULT([using default language (English)])
;;
*)
AC_MSG_RESULT([unknown language $lang. using default language (English)])
;;
esac
AC_ARG_ENABLE(orig_xpm_patch, [ --enable-orig-xpm-patch use the original pixmap patch for mail icon
(have colormap problems in 8 bits depth visuals)],
orig_xpm_patch=$enableval,
orig_xpm_patch=no)
if test "$orig_xpm_patch" = "yes"; then
AC_MSG_RESULT([enabling original mail icon xpm patch])
AC_DEFINE(ORIGINAL_XPM_PATCH)
fi
AC_ARG_ENABLE(appdefaultdir, [ --enable-appdefaultdir=DIR
set directory installation of appdefaults,
default is where X is installed],appdefault_dir=$enableval,appdefault_dir=no)
case "x$appdefault_dir" in
x/*|x.*)
AC_MSG_RESULT([setting APPDEFAULTS = $enableval])
APPDEFAULTS=$enableval
if test ! -d $appdefault_dir; then
AC_MSG_RESULT([Warning: Directory $enableval does not exist])
fi
;;
esac
if test "x$INSTPGMFLAGS" != x; then
AC_ARG_ENABLE(setuid, [ --disable-setuid disables setuid installation if automatically chosen],setuid=$enableval,setuid=yes)
case "x$setuid" in
xno*)
case ${canonical} in
*-*-linux*)
if test "$vtlock" = "yes"; then
INSTPGMFLAGS="-s -o root -g bin -m 4111"
AC_MSG_RESULT([defining install options (setuid/setgid) = "$INSTPGMFLAGS" for vtlock])
echo "experimental: Big buffer overrun security risk"
else
INSTPGMFLAGS=""
AC_MSG_RESULT([no setuid/setgid install])
fi
;;
*)
INSTPGMFLAGS=""
AC_MSG_RESULT([no setuid/setgid install])
;;
esac
;;
x|xyes*)
case ${canonical} in
*-*-linux*)
if test "$vtlock" = "yes"; then
INSTPGMFLAGS="-s -o root -g bin -m 4111"
AC_MSG_RESULT([defining install options (setuid/setgid) = "$INSTPGMFLAGS" for vtlock])
else
AC_MSG_RESULT([defining install options (setuid/setgid) = "$INSTPGMFLAGS"])
fi
;;
*)
AC_MSG_RESULT([defining install options (setuid/setgid) = "$INSTPGMFLAGS"])
;;
esac
;;
x*)
INSTPGMFLAGS=$enableval
AC_MSG_RESULT([defining install options (setuid/setgid) = "$enableval"])
;;
esac
else
AC_MSG_RESULT([no setuid/setgid install])
fi
DEPEND=makedepend
DEPEND_FLAGS=
DEPEND_DEFINES=
case "${canonical}" in
*-*-irix5* | *-*-irix6* )
XLOCKLIBPATHS="-L/usr/lib32 ${XLOCKLIBPATHS}"
XMLOCKLIBPATHS="-L/usr/lib32 ${XMLOCKLIBPATHS}"
XGLOCKLIBPATHS="-L/usr/lib32 ${XGLOCKLIBPATHS}"
;;
esac
XLOCKLIBS="${XLOCKLIBPATHS} ${XLOCKLIBS} -lX11 ${LIBXCB} -lXext -lXau -lXdmcp -lm"
XMLOCKLIBS="${XMLOCKLIBPATHS} ${XMLOCKLIBS} -lX11"
XGLOCKLIBS="${XGLOCKLIBPATHS} ${XGLOCKLIBS} ${GTK_LIBS}"
AC_SUBST(XLOCKLDFLAGS)
AC_SUBST(XMLOCKLDFLAGS)
AC_SUBST(XGLOCKLDFLAGS)
AC_SUBST(INSTPGMFLAGS)
AC_SUBST(MODULEFLAGS)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(XLOCKINC)
AC_SUBST(XMLOCKINC)
AC_SUBST(XGLOCKINC)
AC_SUBST(GTK_LIBS)
AC_SUBST(XLIBS)
AC_SUBST(BITMAPTYPE)
AC_SUBST(PIXMAPTYPE)
AC_SUBST(BITMAPDIR)
AC_SUBST(PIXMAPDIR)
AC_SUBST(XLOCKLIBS)
AC_SUBST(XMLOCKLIBS)
AC_SUBST(XGLOCKLIBS)
AC_SUBST(XMLOCK)
AC_SUBST(XGLOCK)
AC_SUBST(XGLOCKDIR)
AC_SUBST(INSTALL_XMLOCK)
AC_SUBST(INSTALL_XGLOCK)
AC_SUBST(UNINSTALL_XMLOCK)
AC_SUBST(UNINSTALL_XGLOCK)
AC_SUBST(APPDEFAULTS)
AC_SUBST(LINT)
AC_SUBST(CHECK)
AC_SUBST(PURIFY)
AC_SUBST(XPM)
AC_SUBST(GL)
AC_SUBST(GLTT)
AC_SUBST(FTGL)
AC_SUBST(BOMB)
AC_SUBST(INTERACTIVE)
AC_SUBST(UNSTABLE)
AC_SUBST(DEPEND)
AC_SUBST(DEPEND_FLAGS)
AC_SUBST(DEPEND_DEFINES)
AC_SUBST(CXX)
AC_SUBST(CCC)
AC_SUBST(MODULES)
AC_SUBST(NOMODULES)
AC_CONFIG_HEADER(config.h)
AC_OUTPUT(Makefile
xlock/Makefile
modes/Makefile
modes/glx/Makefile
xmlock/Makefile
xglock/Makefile
)
|