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 / d_crypt.U
1 ?RCS: $Id: d_crypt.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_crypt.U,v $
12 ?RCS: Revision 3.0.1.1  1997/02/28  15:31:47  ram
13 ?RCS: patch61: replaced .a with $_a all over the place
14 ?RCS:
15 ?RCS: Revision 3.0  1993/08/18  12:05:52  ram
16 ?RCS: Baseline for dist 3.0 netwide release.
17 ?RCS:
18 ?MAKE:d_crypt cryptlib: Loc test xlibpth libpth Csym Setvar _a Inlibc
19 ?MAKE:  -pick add $@ %<
20 ?S:d_crypt:
21 ?S:     This variable conditionally defines the CRYPT symbol, which
22 ?S:     indicates to the C program that the crypt() routine is available
23 ?S:     to encrypt passwords and the like.
24 ?S:.
25 ?S:cryptlib:
26 ?S:     This variable holds -lcrypt or the path to a libcrypt.a archive if
27 ?S:     the crypt() function is not defined in the standard C library. It is
28 ?S:     up to the Makefile to use this.
29 ?S:.
30 ?C:HAS_CRYPT (CRYPT):
31 ?C:     This symbol, if defined, indicates that the crypt routine is available
32 ?C:     to encrypt passwords and the like.
33 ?C:.
34 ?H:#$d_crypt HAS_CRYPT          /**/
35 ?H:.
36 ?LINT:set d_crypt
37 ?T:val
38 : see if crypt exists
39 echo " "
40 set crypt d_crypt
41 eval $inlibc
42 case "$d_crypt" in
43 $define) cryptlib='' ;;
44 *)      if set crypt val -f d_crypt; eval $csym; $val; then
45                 echo 'crypt() found.' >&4
46                 val="$define"
47                 cryptlib=''
48         else
49                 cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
50                 if $test -z "$cryptlib"; then
51                         cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
52                 else
53                         cryptlib=-lcrypt
54                 fi
55                 if $test -z "$cryptlib"; then
56                         cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
57                 else
58                         cryptlib=-lcrypt
59                 fi
60                 if $test -z "$cryptlib"; then
61                         cryptlib=`./loc libcrypt$_a "" $libpth`
62                 else
63                         cryptlib=-lcrypt
64                 fi
65                 if $test -z "$cryptlib"; then
66                         echo 'crypt() NOT found.' >&4
67                         val="$undef"
68                 else
69                         val="$define"
70                 fi
71         fi
72         set d_crypt
73         eval $setvar
74         ;;
75 esac
76