summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-03-31 21:45:18 (GMT)
committerGeorg Brandl <georg@python.org>2009-03-31 21:45:18 (GMT)
commitbcd64a3fc727e773d4efac3995faa44cc973bb3d (patch)
treedcf7381dae1c512309748575a77c94bdcf5c09d9
parent690362183af0755a990f7d43dad93eb0c9e38a81 (diff)
downloadcpython-bcd64a3fc727e773d4efac3995faa44cc973bb3d.zip
cpython-bcd64a3fc727e773d4efac3995faa44cc973bb3d.tar.gz
cpython-bcd64a3fc727e773d4efac3995faa44cc973bb3d.tar.bz2
#1676135: remove trailing slashes from --prefix argument.
-rwxr-xr-xconfigure7
-rw-r--r--configure.in9
2 files changed, 15 insertions, 1 deletions
diff --git a/configure b/configure
index 328629d..82542b3 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 70479 .
+# From configure.in Revision: 70730 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for python 2.7.
#
@@ -1807,6 +1807,11 @@ ac_config_headers="$ac_config_headers pyconfig.h"
+if test "$prefix" != "/"; then
+ prefix=`echo "$prefix" | sed -e 's/\/$//g'`
+fi
+
+
diff --git a/configure.in b/configure.in
index acfec69..69ae036 100644
--- a/configure.in
+++ b/configure.in
@@ -12,6 +12,15 @@ AC_INIT(python, PYTHON_VERSION, http://www.python.org/python-bugs)
AC_CONFIG_SRCDIR([Include/object.h])
AC_CONFIG_HEADER(pyconfig.h)
+dnl Ensure that if prefix is specified, it does not end in a slash. If
+dnl it does, we get path names containing '//' which is both ugly and
+dnl can cause trouble.
+
+dnl Last slash shouldn't be stripped if prefix=/
+if test "$prefix" != "/"; then
+ prefix=`echo "$prefix" | sed -e 's/\/$//g'`
+fi
+
dnl This is for stuff that absolutely must end up in pyconfig.h.
dnl Please use pyport.h instead, if possible.
AH_TOP([