This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove trailing whitespace on meta-lines in unit files
[metaconfig.git] / dist / U / d_PORTAR.U
1 ?RCS: $Id: d_PORTAR.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_PORTAR.U,v $
12 ?RCS: Revision 3.0.1.1  1994/10/29  16:08:42  ram
13 ?RCS: patch36: added ?F: line for metalint file checking
14 ?RCS:
15 ?RCS: Revision 3.0  1993/08/18  12:05:40  ram
16 ?RCS: Baseline for dist 3.0 netwide release.
17 ?RCS:
18 ?MAKE:d_PORTAR: cat +cc rm Setvar
19 ?MAKE:  -pick add $@ %<
20 ?S:d_PORTAR:
21 ?S:     This variable conditionally handles definition of PORTAR,
22 ?S:     a creation of greater minds than I can imagine.
23 ?S:.
24 ?C:PORTAR:
25 ?C:     This manifest constant must be defined to 1 for some implementations
26 ?C:     of ar.h to get the portable ar most everybody uses.
27 ?C:.
28 ?L:ar_fmag:
29 ?L:ARFMAG:
30 ?L:SARMAG:
31 ?H:#$d_PORTAR PORTAR 1  /**/
32 ?H:.
33 ?F:!portar
34 ?LINT:set d_PORTAR
35 : see if we need to define PORTAR
36 echo " "
37 echo 'Checking to see if we need to define PORTAR for portable archives...' >&4
38 $cat >portar.c <<'EOCP'
39 #include <ar.h>
40 int main() {
41         char *arfmag = ARFMAG;
42         int sarmag = SARMAG;
43         struct ar_hdr arh;
44
45         strncpy(arh.ar_fmag, arfmag, 2);
46
47 #ifdef PORTAR
48         printf("D\n");
49 #else
50         printf("U\n");
51 #endif
52         exit(0);}
53 EOCP
54 if $cc -o portar portar.c >/dev/null 2>&1 || \
55         $cc -DPORTAR=1 -o portar portar.c >/dev/null 2>&1 ; then
56         case "`./portar`" in
57         D)
58                 val="$define"
59                 echo "We'll be defining PORTAR for you."
60                 ;;
61         U)
62                 val="$undef"
63                 echo "We don't seem to need PORTAR defined here."
64                 ;;
65         *)
66                 val="$define"
67                 echo "(My test program gave me an unexpected value!)"
68                 echo "I'll just define PORTAR to be sure."
69                 ;;
70         esac
71 else
72         echo "(Strange, I couldn't get my test program to compile.)"
73         echo "We'll just define PORTAR in this case."
74         val="$define"
75 fi
76 set d_PORTAR
77 eval $setvar
78 $rm -f portar*
79