This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
metaconfig units changes for #13174.
[metaconfig.git] / U / perl / d_procselfexe.U
1 ?MAKE:d_procselfexe: Oldconfig Setvar rm ls contains issymlink d_readlink
2 ?MAKE:  -pick add $@ %<
3 ?S:d_procselfexe:
4 ?S:     Defined if /proc/self/exe is symlink to executing program.
5 ?S:.
6 ?C:HAS_PROCSELFEXE:
7 ?C:     This symbol is defined if /proc/self/exe is a symlink
8 ?C:     to the executing program.
9 ?C:.
10 ?H:#$d_procselfexe HAS_PROCSELFEXE      /**/
11 ?H:.
12 ?LINT: set d_procselfexe
13 echo " "
14 echo "Checking for /proc/self/exe..." >&4
15 val="$undef"
16 case "$d_readlink" in
17 "$define")
18         if $issymlink /proc/self/exe ; then
19                 $ls -l /proc/self/exe > reflect
20                 if $contains $ls reflect >/dev/null 2>&1; then
21                         val="$define"
22                         echo "You have Linux-like /proc/self/exe."
23                 fi
24                 $rm reflect
25         fi
26         ;;
27 esac
28 set d_procselfexe
29 eval $setvar
30