This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
RE: [perl #26136] localtime(3) calls tzset(3), but localtime_r(3) may not.
[metaconfig.git] / U / modified / Loc.U
index 86459f4..c399bd7 100644 (file)
        make mkdir more mv nm nroff perl pg pmake pr rm rmail sed sendmail \
        shar sleep smail sort submit tail tar tbl tee test touch tr troff \
        uname uniq uuname vi zcat zip
-?LINT:extern _exe
 ?V::pth loclist trylist
 ?F:./loc test_h
 ?T:thisthing thing xxx dir file say _test DJGPP
 ?LINT:change PATH
+?LINT:extern _exe
+?LINT:change _egrep
+?LINT:change _ln
+?LINT:change _make
 : find out where common programs are
 echo " "
 echo "Locating common programs..." >&4
@@ -109,8 +112,8 @@ for dir in \$*; do
 ?X:    permission.  A -r test would handle that, but since ./loc is
 ?X:    also used to find executables (which are installed w/o read
 ?X:    permission on SCO ODT 3.0, we can't include the -r test.
-?X: If you need to use _exe (different from .exe)
-?X: you need to set it on comand line: -D_exe=...
+?X: If you need to use an _exe that is different from .exe
+?X: you need to set it in Head.U.
        for thisthing in \$dir/\$thing; do
                : just loop through to pick last item
        done
@@ -123,9 +126,10 @@ for dir in \$*; do
        elif test -f \$dir/\$thing.exe; then
                if test -n "$DJGPP"; then
                        echo \$dir/\$thing.exe
-               else
+               elif test "$eunicefix" != ":"; then
                        : on Eunice apparently
                        echo \$dir/\$thing
+                       exit 0
                fi
                exit 0
        fi
@@ -275,7 +279,7 @@ for file in $trylist; do
        '') xxx=`./loc $file $file $pth`;;
        *) xxx=`./loc $xxx $xxx $pth`;;
        esac
-       eval $file=$xxx
+       eval $file=$xxx$_exe
        eval _$file=$xxx
        case "$xxx" in
        /*)
@@ -292,27 +296,43 @@ for file in $trylist; do
        esac
 done
 case "$egrep" in
-egrep$_exe)
+egrep)
        echo "Substituting grep for egrep."
        egrep=$grep
+       _egrep=$grep
        ;;
 esac
 @if ln
 case "$ln" in
-ln$_exe)
+ln)
        echo "Substituting cp for ln."
        ln=$cp
+       _ln=$cp
        ;;
 esac
 @end
-case "$make$gmake" in
-*make$_exe)
-       ;;
-*)
+case "$make" in
+make)  
+       case "$gmake" in
+       gmake)
        echo "I can't find make or gmake, and my life depends on it." >&4
        echo "Go find a public domain implementation or fix your PATH setting!" >&4
        exit 1
        ;;
+       esac
+       ;;
+esac   
+case "$gmake" in
+gmake) ;;
+*)     # We can't have osname yet.
+       if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
+               # Assume that gmake, if found, is definitely GNU make
+               # and prefer it over the system make.
+               echo "Substituting gmake for make."
+               make=$gmake
+               _make=$gmake
+       fi
+       ;;
 esac
 case "$test" in
 test)