Commit | Line | Data |
---|---|---|
d8875586 MBT |
1 | ?RCS: $Id: d_isascii.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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu> | |
12 | ?RCS: | |
13 | ?RCS: $Log: d_isascii.U,v $ | |
14 | ?RCS: Revision 3.0.1.2 1994/10/29 16:13:39 ram | |
15 | ?RCS: patch36: added 'ldflags' to the test compile line (ADO) | |
16 | ?RCS: | |
17 | ?RCS: Revision 3.0.1.1 1994/08/29 16:09:32 ram | |
18 | ?RCS: patch32: created by ADO | |
19 | ?RCS: | |
20 | ?MAKE:d_isascii: cc cat ccflags ldflags rm libs Setvar | |
21 | ?MAKE: -pick add $@ %< | |
22 | ?S:d_isascii: | |
23 | ?S: This variable conditionally defines the HAS_ISASCII constant, | |
24 | ?S: which indicates to the C program that isascii() is available. | |
25 | ?S:. | |
26 | ?C:HAS_ISASCII: | |
27 | ?C: This manifest constant lets the C program know that isascii | |
28 | ?C: is available. | |
29 | ?C:. | |
30 | ?H:#$d_isascii HAS_ISASCII /**/ | |
31 | ?H:. | |
32 | ?LINT:set d_isascii | |
33 | ?X: Can't use Inlibc because isascii() might be a macro. | |
34 | : Look for isascii | |
35 | echo " " | |
36 | $cat >isascii.c <<'EOCP' | |
37 | #include <stdio.h> | |
38 | #include <ctype.h> | |
39 | int main() { | |
40 | int c = 'A'; | |
41 | if (isascii(c)) | |
42 | exit(0); | |
43 | else | |
44 | exit(1); | |
45 | } | |
46 | EOCP | |
47 | if $cc $ccflags $ldflags -o isascii isascii.c $libs >/dev/null 2>&1 ; then | |
48 | echo "isascii() found." >&4 | |
49 | val="$define" | |
50 | else | |
51 | echo "isascii() NOT found." >&4 | |
52 | val="$undef" | |
53 | fi | |
54 | set d_isascii | |
55 | eval $setvar | |
56 | $rm -f isascii* | |
57 |