1 ?RCS: $Id: d_PORTAR.U 1 2006-08-24 12:32:52Z rmanfredi $
3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
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.
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
15 ?RCS: Revision 3.0 1993/08/18 12:05:40 ram
16 ?RCS: Baseline for dist 3.0 netwide release.
18 ?MAKE:d_PORTAR: cat +cc rm Setvar
19 ?MAKE: -pick add $@ %<
21 ?S: This variable conditionally handles definition of PORTAR,
22 ?S: a creation of greater minds than I can imagine.
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.
31 ?H:#$d_PORTAR PORTAR 1 /**/
35 : see if we need to define PORTAR
37 echo 'Checking to see if we need to define PORTAR for portable archives...' >&4
38 $cat >portar.c <<'EOCP'
41 char *arfmag = ARFMAG;
45 strncpy(arh.ar_fmag, arfmag, 2);
54 if $cc -o portar portar.c >/dev/null 2>&1 || \
55 $cc -DPORTAR=1 -o portar portar.c >/dev/null 2>&1 ; then
59 echo "We'll be defining PORTAR for you."
63 echo "We don't seem to need PORTAR defined here."
67 echo "(My test program gave me an unexpected value!)"
68 echo "I'll just define PORTAR to be sure."
72 echo "(Strange, I couldn't get my test program to compile.)"
73 echo "We'll just define PORTAR in this case."