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

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@9841 d073be05-634f-4543-b044-5fe20cf6d1d6
This commit is contained in:
Robert Shaw
2004-12-18 02:34:55 +00:00
parent 98bf44666e
commit 2e689647a0
4 changed files with 64 additions and 6 deletions
Vendored
+28
View File
@@ -400,3 +400,31 @@ AC_DEFUN([OD_COMPILER_ATTRIBUTE_UNUSED], [
AC_MSG_RESULT([])
])
dnl This macro ensures DP installation prefix bin/sbin paths are NOT in PATH
dnl for configure to prevent potential problems when base/ code is updated
dnl and ports are installed that would match needed items.
AC_DEFUN([OD_PATH_SCAN],[
oldprefix=$prefix
if test "x$prefix" = "xNONE" ; then
prefix=$ac_default_prefix
fi
oldPATH=$PATH
newPATH=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $oldPATH
do
IFS=$as_save_IFS
if test "x$as_dir" != "x$prefix/bin" &&
test "x$as_dir" != "x$prefix/sbin"; then
if test -z "$newPATH"; then
newPATH=$as_dir
else
newPATH=$newPATH$PATH_SEPARATOR$as_dir
fi
fi
done
PATH=$newPATH; export PATH
prefix=$oldprefix
])
Vendored
+29 -3
View File
@@ -1408,6 +1408,31 @@ test -n "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
# Check user PATH for DP paths, and remove as necessary.
oldprefix=$prefix
if test "x$prefix" = "xNONE" ; then
prefix=$ac_default_prefix
fi
oldPATH=$PATH
newPATH=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $oldPATH
do
IFS=$as_save_IFS
if test "x$as_dir" != "x$prefix/bin" &&
test "x$as_dir" != "x$prefix/sbin"; then
if test -z "$newPATH"; then
newPATH=$as_dir
else
newPATH=$newPATH$PATH_SEPARATOR$as_dir
fi
fi
done
PATH=$newPATH; export PATH
prefix=$oldprefix
# Checks for programs.
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -6681,11 +6706,12 @@ else
if test x"${with_tclinclude}" != x ; then
ac_cv_c_tclh=${with_tclinclude}
else
# Check in the includedir, if --prefix was specified
# Do NOT check in $includedir, we need to prevent automatic
# location of Tcl headers in $prefix/include unless explicitly
# specified with the --with-tclinclude option. But go ahead and
# check some other possible local system locations.
eval "temp_includedir=${includedir}"
for i in \
`ls -d ${temp_includedir} 2>/dev/null` \
/usr/local/include /usr/include /usr/local/include/tcl${TCL_VERSION} /usr/include/tcl${TCL_VERSION}; do
if test -f "$i/tcl.h" ; then
ac_cv_c_tclh=$i
+3
View File
@@ -5,6 +5,9 @@ AC_CONFIG_SRCDIR([src/pextlib1.0/Pextlib.c])
AC_CONFIG_HEADERS([src/config.h])
AC_CANONICAL_SYSTEM
# Check user PATH for DP paths, and remove as necessary.
OD_PATH_SCAN
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
+4 -3
View File
@@ -2539,11 +2539,12 @@ AC_DEFUN(SC_PUBLIC_TCL_HEADERS, [
if test x"${with_tclinclude}" != x ; then
ac_cv_c_tclh=${with_tclinclude}
else
# Check in the includedir, if --prefix was specified
# Do NOT check in $includedir, we need to prevent automatic
# location of Tcl headers in $prefix/include unless explicitly
# specified with the --with-tclinclude option. But go ahead and
# check some other possible local system locations.
eval "temp_includedir=${includedir}"
for i in \
`ls -d ${temp_includedir} 2>/dev/null` \
/usr/local/include /usr/include /usr/local/include/tcl${TCL_VERSION} /usr/include/tcl${TCL_VERSION}; do
if test -f "$i/tcl.h" ; then
ac_cv_c_tclh=$i