Commit | Line | Data |
---|---|---|
d8875586 MBT |
1 | ?RCS: $Id: d_usendir.U 1 2006-08-24 12:32:52Z rmanfredi $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi | |
4 | ?RCS: | |
5 | ?RCS: You may redistribute only under the terms of the Artistic Licence, | |
6 | ?RCS: as specified in the README file that comes with the distribution. | |
7 | ?RCS: You may reuse parts of this distribution only within the terms of | |
8 | ?RCS: that same Artistic Licence; a copy of which may be found at the root | |
9 | ?RCS: of the source tree for dist 4.0. | |
10 | ?RCS: | |
11 | ?RCS: $Log: d_usendir.U,v $ | |
12 | ?RCS: Revision 3.0.1.1 1997/02/28 15:47:34 ram | |
13 | ?RCS: patch61: replaced .a with $_a all over the place | |
14 | ?RCS: patch61: likewise for .o replaced by $_o | |
15 | ?RCS: | |
16 | ?RCS: Revision 3.0 1993/08/18 12:07:52 ram | |
17 | ?RCS: Baseline for dist 3.0 netwide release. | |
18 | ?RCS: | |
19 | ?MAKE:d_usendir i_ndir ndirlib: test Setvar Findhdr d_readdir _a | |
20 | ?MAKE: -pick add $@ %< | |
21 | ?S:d_usendir: | |
22 | ?S: This variable conditionally defines the EMULATE_NDIR symbol, which | |
23 | ?S: indicates to the C program that it should compile the ndir.c code | |
24 | ?S: provided with the package. | |
25 | ?S:. | |
26 | ?S:i_ndir (d_libndir): | |
27 | ?S: This variable conditionally defines the I_NDIR symbol, which | |
28 | ?S: indicates to the C program that it should include the system's | |
29 | ?S: version of ndir.h, rather than the one with this package. | |
30 | ?S:. | |
31 | ?S:ndirlib: | |
32 | ?S: The name of the library to include at linking stage to resolve ndir | |
33 | ?S: symbols. It is up to the makefile to use this value. | |
34 | ?S:. | |
35 | ?C:EMULATE_NDIR (USENDIR): | |
36 | ?C: This symbol, if defined, indicates that the program should compile | |
37 | ?C: the ndir.c code provided with the package. | |
38 | ?C:. | |
39 | ?C:I_NDIR (LIBNDIR): | |
40 | ?C: This symbol, if defined, indicates that the program should include the | |
41 | ?C: system's version of ndir.h, rather than the one with this package. | |
42 | ?C:. | |
43 | ?H:#$d_usendir EMULATE_NDIR /**/ | |
44 | ?H:#$i_ndir I_NDIR /**/ | |
45 | ?H:. | |
46 | ?T:val2 | |
47 | ?LINT: set d_usendir i_ndir | |
48 | : see if there are directory access routines out there | |
49 | echo " " | |
50 | if $test `./findhdr ndir.h` && \ | |
51 | ( $test -r /usr/lib/libndir$_a || $test -r /usr/local/lib/libndir$_a ); then | |
52 | echo "Ndir library found." >&4 | |
53 | if $test -r /usr/lib/libndir$_a; then | |
54 | ndirlib='-lndir' | |
55 | else | |
56 | ndirlib="/usr/local/lib/libndir$_a" | |
57 | fi | |
58 | val2="$define" | |
59 | val="$undef" | |
60 | else | |
61 | ndirlib='' | |
62 | val2="$undef" | |
63 | case "$d_readdir" in | |
64 | "$define") | |
65 | echo "No ndir library found, but you have readdir() so we'll use that." >&4 | |
66 | val="$undef"; | |
67 | ;; | |
68 | *) | |
69 | echo "No ndir library found." >&4 | |
70 | val="$define" | |
71 | ;; | |
72 | esac | |
73 | fi | |
74 | set d_usendir | |
75 | eval $setvar | |
76 | val="$val2" | |
77 | set i_ndir | |
78 | eval $setvar | |
79 |