Index: aclocal.m4
===================================================================
--- aclocal.m4	(révision 30095)
+++ aclocal.m4	(copie de travail)
@@ -563,33 +563,8 @@
 		echo "tclpackagedir"
 		ac_cv_c_tclpkgd=${with_tclpackagedir}
 	    else
-		# On darwin we can do some intelligent guessing
-		case $host_os in
-		    darwin*)
-		    	tcl_autopath=`echo 'puts -nonewline \$auto_path' | $TCLSH`
-			for path in $tcl_autopath; do
-			    if test "$path" = "/Library/Tcl"; then
-				ac_cv_c_tclpkgd="$path"
-				break
-			    fi
-			    if test "$path" = "/System/Library/Tcl"; then
-				if test -d "$path"; then
-				    ac_cv_c_tclpkgd="$path"
-				    break
-			        fi
-			    fi
-			done
-		    ;;
-		esac
-    		if test x"${ac_cv_c_tclpkgd}" = x ; then
-		    # Fudge a path from the first entry in the auto_path
-		    tcl_pkgpath=`echo 'puts -nonewline [[lindex \$auto_path 0]]' | $TCLSH`
-		    if test -d "$tcl_pkgpath"; then
-			ac_cv_c_tclpkgd="$tcl_pkgpath"
-		    fi
-		    # If the first entry does not exist, do nothing
+        ac_cv_c_tclpkgd=${datarootdir}/tcl
 		fi
-	    fi
 	])
     fi
 
Index: Makefile.in
===================================================================
--- Makefile.in	(révision 30095)
+++ Makefile.in	(copie de travail)
@@ -30,9 +30,9 @@
 upgrade:
 	@echo ""; echo "Upgrading your existing MacPorts installation to the new namespace if necessary:"; echo ""
 
-# We can safely delete the ${TCL_PACKAGE_DIR}/darwinports1.0 dir as files in it are always overwritten and will now be installed onto
-# ${TCL_PACKAGE_DIR}/macports1.0 with new names:
-	[ ! -d ${TCL_PACKAGE_DIR}/darwinports1.0 ] || rm -rf ${TCL_PACKAGE_DIR}/darwinports1.0
+# We can safely delete /Library/Tcl/{darwin,mac}port1.0 dir as files in it are not used anymore:
+	[ ! -d /Library/Tcl/darwinports1.0 ] || rm -rf /Library/Tcl/darwinports1.0
+	[ ! -d /Library/Tcl/macports1.0 ] || rm -rf /Library/Tcl/macports1.0
 
 # MacPorts base files in ${datadir} are also safely removed as new ones are always installed, and onto a their new location in this case too:
 	[ ! -d ${datadir}/darwinports ] || rm -rf ${datadir}/darwinports
Index: configure
===================================================================
--- configure	(révision 30095)
+++ configure	(copie de travail)
@@ -11509,33 +11509,8 @@
 		echo "tclpackagedir"
 		ac_cv_c_tclpkgd=${with_tclpackagedir}
 	    else
-		# On darwin we can do some intelligent guessing
-		case $host_os in
-		    darwin*)
-		    	tcl_autopath=`echo 'puts -nonewline \$auto_path' | $TCLSH`
-			for path in $tcl_autopath; do
-			    if test "$path" = "/Library/Tcl"; then
-				ac_cv_c_tclpkgd="$path"
-				break
-			    fi
-			    if test "$path" = "/System/Library/Tcl"; then
-				if test -d "$path"; then
-				    ac_cv_c_tclpkgd="$path"
-				    break
-			        fi
-			    fi
-			done
-		    ;;
-		esac
-    		if test x"${ac_cv_c_tclpkgd}" = x ; then
-		    # Fudge a path from the first entry in the auto_path
-		    tcl_pkgpath=`echo 'puts -nonewline [lindex \$auto_path 0]' | $TCLSH`
-		    if test -d "$tcl_pkgpath"; then
-			ac_cv_c_tclpkgd="$tcl_pkgpath"
-		    fi
-		    # If the first entry does not exist, do nothing
+        ac_cv_c_tclpkgd=${datarootdir}/tcl
 		fi
-	    fi
 
 fi
 
Index: src/port/port.tcl
===================================================================
--- src/port/port.tcl	(révision 30099)
+++ src/port/port.tcl	(copie de travail)
@@ -33,6 +33,9 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
+# MacPorts TCL library files are in @TCL_PACKAGE_DIR@
+set auto_path [eval list [linsert $auto_path 0 "@TCL_PACKAGE_DIR@"]]
+
 #
 # TODO:
 #

