This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use /proc/self/exe to set $^X on linux (or anywhere new
authorNick Ing-Simmons <nik@tiuk.ti.com>
Mon, 19 Nov 2001 22:01:45 +0000 (22:01 +0000)
committerNick Ing-Simmons <nik@tiuk.ti.com>
Mon, 19 Nov 2001 22:01:45 +0000 (22:01 +0000)
Configure unit detects the feature).

p4raw-id: //depot/metaconfig@13109

U/perl/procselfexe.U [new file with mode: 0644]

diff --git a/U/perl/procselfexe.U b/U/perl/procselfexe.U
new file mode 100644 (file)
index 0000000..2632bcf
--- /dev/null
@@ -0,0 +1,29 @@
+?MAKE:d_procselfexe: Oldconfig Setvar rm ls test contains issymlink d_readlink
+?MAKE: -pick add $@ %<
+?S:d_procselfexe:
+?S:    Defined if /proc/self/exe is symlink to executing program
+?S:.
+?C:HAS_PROCSELFEXE:
+?C:    This symbol is defined if /proc/self/exe is a symlink
+?C:    to the executing program
+?C:.
+?H:#$d_procselfexe HAS_PROCSELFEXE     /**/
+?H:.
+?LINT: set d_procselfexe
+echo " "
+echo "Checking for /proc/self/exe ..." >&4
+val="$undef"
+if $test "$d_readlink" = "$define" ; then
+       if $issymlink /proc/self/exe ; then
+               $ls -l /proc/self/exe > reflect
+               if $contains $ls reflect >/dev/null; then
+                       val="$define"
+                       echo "You have linux-like /proc/self/exe"
+               fi
+               $rm reflect
+       fi
+fi
+set d_procselfexe
+eval $setvar
+
+