[79516] trunk/base

jmr at macports.org jmr at macports.org
Thu Jun 16 04:28:13 PDT 2011


Revision: 79516
          http://trac.macports.org/changeset/79516
Author:   jmr at macports.org
Date:     2011-06-16 04:28:13 -0700 (Thu, 16 Jun 2011)
Log Message:
-----------
add a configure arg to allow using an unsupported prefix (see #18602)

Modified Paths:
--------------
    trunk/base/configure
    trunk/base/configure.ac

Modified: trunk/base/configure
===================================================================
--- trunk/base/configure	2011-06-16 07:56:52 UTC (rev 79515)
+++ trunk/base/configure	2011-06-16 11:28:13 UTC (rev 79516)
@@ -793,6 +793,7 @@
 enable_werror
 with_objc_runtime
 with_objc_foundation
+with_unsupported_prefix
 with_ports_dir
 with_no_root_privileges
 with_install_user
@@ -1466,6 +1467,9 @@
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-objc-runtime     Specify either "GNU" or "apple"
   --with-objc-foundation  Specify either "GNUstep" or "apple"
+  --with-unsupported-prefix
+                          Acknowledge that you accept the consequences of
+                          using an unsupported prefix.
   --with-ports-dir=DIR    Specify alternate ports directory
   --with-no-root-privileges
                           Specify that MacPorts should be installed in your
@@ -7633,13 +7637,23 @@
 
 # Check for paths
 
-if test x$prefix = x/usr/local; then
-    as_fn_error $? "Installing MacPorts into /usr/local is not supported" "$LINENO" 5
+
+# Check whether --with-unsupported-prefix was given.
+if test "${with_unsupported_prefix+set}" = set; then :
+  withval=$with_unsupported_prefix; with_unsupported_prefix=$withval
+else
+  with_unsupported_prefix=no
 fi
 
+if test x$prefix = x/usr/local -a x$with_unsupported_prefix != xyes; then
+    as_fn_error $? "Installing MacPorts into /usr/local is not supported. If \
+you understand this and wish to do so anyway, pass --with-unsupported-prefix \
+to configure." "$LINENO" 5
+fi
 
 
 
+
 # Check whether --with-ports-dir was given.
 if test "${with_ports_dir+set}" = set; then :
   withval=$with_ports_dir;  portsdir="$withval"

Modified: trunk/base/configure.ac
===================================================================
--- trunk/base/configure.ac	2011-06-16 07:56:52 UTC (rev 79515)
+++ trunk/base/configure.ac	2011-06-16 11:28:13 UTC (rev 79516)
@@ -170,8 +170,16 @@
 
 # Check for paths
 AC_PREFIX_DEFAULT(/opt/local)
-if test x$prefix = x/usr/local; then
-    AC_MSG_ERROR([Installing MacPorts into /usr/local is not supported])
+AC_ARG_WITH(
+		unsupported-prefix,
+		AS_HELP_STRING([--with-unsupported-prefix],
+		[Acknowledge that you accept the consequences of using an unsupported prefix.]),
+		[with_unsupported_prefix=$withval],
+		[with_unsupported_prefix=no])
+if test x$prefix = x/usr/local -a x$with_unsupported_prefix != xyes; then
+    AC_MSG_ERROR([Installing MacPorts into /usr/local is not supported. If \
+you understand this and wish to do so anyway, pass --with-unsupported-prefix \
+to configure.])
 fi
 MP_PATH_PORTSDIR([$PORTS_DIR_DEFAULT])
 MP_PATH_MPCONFIGDIR
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110616/2a173abd/attachment.html>


More information about the macports-changes mailing list