Commit | Line | Data |
---|---|---|
d8875586 MBT |
1 | ?RCS: $Id: d_regcmp.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_regcmp.U,v $ | |
12 | ?RCS: Revision 3.0.1.1 1995/01/30 14:34:45 ram | |
13 | ?RCS: patch49: now looks for POSIX regcomp() routine | |
14 | ?RCS: | |
15 | ?RCS: Revision 3.0 1993/08/18 12:06:53 ram | |
16 | ?RCS: Baseline for dist 3.0 netwide release. | |
17 | ?RCS: | |
18 | ?MAKE:d_regcmp d_re_comp d_regcomp: Csym cat | |
19 | ?MAKE: -pick add $@ %< | |
20 | ?S:d_regcomp: | |
21 | ?S: This variable conditionally defines the HAS_REGCOMP symbol, which | |
22 | ?S: indicates to the C program that the regcomp() routine is available | |
23 | ?S: for regular patern matching (usally on POSIX.2 conforming systems). | |
24 | ?S:. | |
25 | ?S:d_regcmp: | |
26 | ?S: This variable conditionally defines the HAS_REGCMP symbol, which | |
27 | ?S: indicates to the C program that the regcmp() routine is available | |
28 | ?S: for regular patern matching (usally on System V). | |
29 | ?S:. | |
30 | ?S:d_re_comp: | |
31 | ?S: This variable conditionally defines the HAS_RECOMP symbol, which | |
32 | ?S: indicates to the C program that the re_comp() routine is available | |
33 | ?S: for regular patern matching (usally on BSD). If so, it is likely that | |
34 | ?S: re_exec() exists. | |
35 | ?S:. | |
36 | ?C:HAS_REGCOMP (REGCOMP): | |
37 | ?C: This symbol, if defined, indicates that the regcomp() routine is | |
38 | ?C: available to do some regular patern matching (usually on POSIX.2 | |
39 | ?C: conforming systems). | |
40 | ?C:. | |
41 | ?C:HAS_REGCMP (REGCMP): | |
42 | ?C: This symbol, if defined, indicates that the regcmp() routine is | |
43 | ?C: available to do some regular patern matching (usually on System V). | |
44 | ?C:. | |
45 | ?C:HAS_RECOMP (RECOMP): | |
46 | ?C: This symbol, if defined, indicates that the re_comp() routine is | |
47 | ?C: available to do some regular patern matching (usually on BSD). If so, | |
48 | ?C: it is likely that re_exec() be available. | |
49 | ?C:. | |
50 | ?H:#$d_regcomp HAS_REGCOMP /* POSIX.2 */ | |
51 | ?H:#$d_regcmp HAS_REGCMP /* sysV */ | |
52 | ?H:#$d_re_comp HAS_RECOMP /* BSD */ | |
53 | ?H:. | |
54 | ?T:val | |
55 | : see if regcomp, regcmp, or re_comp exist, for regular pattern matching | |
56 | echo " " | |
57 | if set regcomp val -f d_regcomp; eval $csym; $val; then | |
58 | echo 'regcomp() found.' >&4 | |
59 | d_regcomp="$define" | |
60 | d_regcmp="$undef" | |
61 | d_re_comp="$undef" | |
62 | elif set regcmp val -f d_regcmp; eval $csym; $val; then | |
63 | echo 'regcmp() found.' >&4 | |
64 | d_regcmp="$define" | |
65 | d_regcomp="$undef" | |
66 | d_re_comp="$undef" | |
67 | elif set re_comp val -f d_re_comp; eval $csym; $val; then | |
68 | echo 're_comp() found, assuming re_exec() also exists.' >&4 | |
69 | d_re_comp="$define" | |
70 | d_regcomp="$undef" | |
71 | d_regcmp="$undef" | |
72 | else | |
73 | $cat >&4 <<EOM | |
74 | No regcomp(), regcmp() nor re_comp() found !! No regular pattern matching. | |
75 | EOM | |
76 | d_regcmp="$undef" | |
77 | d_re_comp="$undef" | |
78 | d_regcomp="$undef" | |
79 | fi | |
80 |