Changeset 9841 for trunk/base/aclocal.m4


Ignore:
Timestamp:
Dec 18, 2004, 2:34:55 AM (16 years ago)
Author:
rshaw
Message:

Fixes problem with configure finding binaries from ports that were installed
prior to re-installation of port code. Configure now properly ignores the DP
$prefix/bin and $prefix/sbin paths to prevent potential bootstrapping problems
and base/ update problems.

Reviewed by: landonf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/aclocal.m4

    r9806 r9841  
    401401       
    402402])
     403
     404dnl This macro ensures DP installation prefix bin/sbin paths are NOT in PATH
     405dnl for configure to prevent potential problems when base/ code is updated
     406dnl and ports are installed that would match needed items.
     407AC_DEFUN([OD_PATH_SCAN],[
     408        oldprefix=$prefix
     409        if test "x$prefix" = "xNONE" ; then
     410                prefix=$ac_default_prefix
     411        fi
     412        oldPATH=$PATH
     413        newPATH=
     414        as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     415        for as_dir in $oldPATH
     416        do
     417                IFS=$as_save_IFS
     418                if test "x$as_dir" != "x$prefix/bin" &&
     419                        test "x$as_dir" != "x$prefix/sbin"; then
     420                        if test -z "$newPATH"; then
     421                                newPATH=$as_dir
     422                        else
     423                                newPATH=$newPATH$PATH_SEPARATOR$as_dir
     424                        fi
     425                fi
     426        done
     427        PATH=$newPATH; export PATH
     428        prefix=$oldprefix
     429])
     430
Note: See TracChangeset for help on using the changeset viewer.