Changeset 9841


Ignore:
Timestamp:
Dec 18, 2004, 2:34:55 AM (15 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

Location:
trunk/base
Files:
4 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
  • trunk/base/configure

    r9806 r9841  
    14091409  program_prefix=${target_alias}-
    14101410
     1411# Check user PATH for DP paths, and remove as necessary.
     1412
     1413        oldprefix=$prefix
     1414        if test "x$prefix" = "xNONE" ; then
     1415                prefix=$ac_default_prefix
     1416        fi
     1417        oldPATH=$PATH
     1418        newPATH=
     1419        as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     1420        for as_dir in $oldPATH
     1421        do
     1422                IFS=$as_save_IFS
     1423                if test "x$as_dir" != "x$prefix/bin" &&
     1424                        test "x$as_dir" != "x$prefix/sbin"; then
     1425                        if test -z "$newPATH"; then
     1426                                newPATH=$as_dir
     1427                        else
     1428                                newPATH=$newPATH$PATH_SEPARATOR$as_dir
     1429                        fi
     1430                fi
     1431        done
     1432        PATH=$newPATH; export PATH
     1433        prefix=$oldprefix
     1434
     1435
    14111436# Checks for programs.
    14121437ac_ext=c
     
    66826707                ac_cv_c_tclh=${with_tclinclude}
    66836708            else
    6684                 # Check in the includedir, if --prefix was specified
    6685 
    6686                 eval "temp_includedir=${includedir}"
     6709                # Do NOT check in $includedir, we need to prevent automatic
     6710                # location of Tcl headers in $prefix/include unless explicitly
     6711                # specified with the --with-tclinclude option. But go ahead and
     6712                # check some other possible local system locations.
     6713
    66876714                for i in \
    6688                         `ls -d ${temp_includedir} 2>/dev/null` \
    66896715                        /usr/local/include /usr/include /usr/local/include/tcl${TCL_VERSION} /usr/include/tcl${TCL_VERSION}; do
    66906716                    if test -f "$i/tcl.h" ; then
  • trunk/base/configure.ac

    r9806 r9841  
    55AC_CONFIG_HEADERS([src/config.h])
    66AC_CANONICAL_SYSTEM
     7
     8# Check user PATH for DP paths, and remove as necessary.
     9OD_PATH_SCAN
    710
    811# Checks for programs.
  • trunk/base/tcl.m4

    r7296 r9841  
    25402540                ac_cv_c_tclh=${with_tclinclude}
    25412541            else
    2542                 # Check in the includedir, if --prefix was specified
    2543 
    2544                 eval "temp_includedir=${includedir}"
     2542                # Do NOT check in $includedir, we need to prevent automatic
     2543                # location of Tcl headers in $prefix/include unless explicitly
     2544                # specified with the --with-tclinclude option. But go ahead and
     2545                # check some other possible local system locations.
     2546
    25452547                for i in \
    2546                         `ls -d ${temp_includedir} 2>/dev/null` \
    25472548                        /usr/local/include /usr/include /usr/local/include/tcl${TCL_VERSION} /usr/include/tcl${TCL_VERSION}; do
    25482549                    if test -f "$i/tcl.h" ; then
Note: See TracChangeset for help on using the changeset viewer.