This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[UTIL] Perl system does not default to $_
[metaconfig.git] / dist / U / sunscanf.U
1 ?RCS: $Id$
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 License,
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 License; 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: sunscanf.U,v $
12 ?RCS: Revision 3.0  1993/08/18  12:09:54  ram
13 ?RCS: Baseline for dist 3.0 netwide release.
14 ?RCS:
15 ?MAKE:sunscanf: cat rm Myread +cc +ccflags test Setvar
16 ?MAKE:  -pick add $@ %<
17 ?S:sunscanf:
18 ?S:     This variable is set if this system runs with the Sun version
19 ?S:     of scanf.
20 ?S:.
21 ?C:SUNSCANF:
22 ?C:     This variable is set if this system runs with the Sun version
23 ?C:     of scanf.
24 ?C:.
25 ?H:#$sunscanf   SUNSCANF  /**/
26 ?H:.
27 ?LINT:set sunscanf
28 : check to see what kinda scanf your using.
29 echo " "
30 echo "Checking to see what flavor of scanf you have..." >&4
31 $cat >scanf.c <<'EOCP'
32 int main()
33 {
34         float value;
35
36         sscanf("4.5","%g",&value);
37         printf("%d\n", value == 4.5);
38 }
39 EOCP
40 if $cc $ccflags -o scanf scanf.c >/dev/null 2>&1 ; then
41         if $test `scanf` = 0; then
42                 echo "Hmm.. seems your not running the USG flavor.."
43                 val="$undef"
44         else
45                 echo "Uh... your running the USG flavor of scanf."
46                 val="$define"
47         fi
48 else
49         echo "(I can't seem to compile the test program... Guessing)"
50         val="$undef"
51 fi
52 set sunscanf
53 eval $setvar
54 $rm -f scanf*
55