[119421] trunk/base

eborisch at macports.org eborisch at macports.org
Thu Apr 24 22:29:21 PDT 2014


Revision: 119421
          https://trac.macports.org/changeset/119421
Author:   eborisch at macports.org
Date:     2014-04-24 22:29:21 -0700 (Thu, 24 Apr 2014)
Log Message:
-----------
Change optional tool settings from environment variables to --with-foo=/bin/foo style. Resolves issues with bzip2 and BZIP2. See #43204. Still needs regen.

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

Modified: trunk/base/aclocal.m4
===================================================================
--- trunk/base/aclocal.m4	2014-04-25 05:28:31 UTC (rev 119420)
+++ trunk/base/aclocal.m4	2014-04-25 05:29:21 UTC (rev 119421)
@@ -96,6 +96,15 @@
 	$1=$(AS_ECHO([$2]) | sed -E 's/^--?([[^=]]+)=.*$/\1/')dnl
 ])
 
+dnl Similar to AC_ARG_VAR, but implemented with --with-pkg=PATH for PKG.
+dnl
+dnl Parameters: Similar to AC_ARG_VAR ($2 gets some boiler plate around it)
+AC_DEFUN([MP_TOOL_PATH], [dnl
+	AC_ARG_WITH([m4_tolower($1)], [AS_HELP_STRING([--with-m4_tolower($1)=PATH],
+			[Path to alternate $2 command])], [$1=$withval],dnl
+		[])dnl
+])
+
 dnl Configure a project contained in a .tar.gz, .tgz or .tar.bz2 tarball,
 dnl extracting it previously, if necessary. Different from AC_CONFIG_SUBDIRS
 dnl (on which this macro is based), you can pass parameters to the

Modified: trunk/base/configure.ac
===================================================================
--- trunk/base/configure.ac	2014-04-25 05:28:31 UTC (rev 119420)
+++ trunk/base/configure.ac	2014-04-25 05:29:21 UTC (rev 119421)
@@ -101,6 +101,26 @@
 AC_PROG_MAKE_SET
 AC_PROG_OBJC([clang cc gcc])
 
+# Check for user-supplied paths before searching
+MP_TOOL_PATH(BSDMAKE, [bsdmake/pmake])
+MP_TOOL_PATH(BZIP2, [bzip2])
+MP_TOOL_PATH(CVS, [cvs])
+MP_TOOL_PATH(GNUMAKE, [gnumake])
+MP_TOOL_PATH(GNUTAR, [gnutar])
+MP_TOOL_PATH(LZMA, [lzma])
+MP_TOOL_PATH(MAKE, [make])
+MP_TOOL_PATH(MTREE, [mtree])
+MP_TOOL_PATH(OPEN, [open])
+MP_TOOL_PATH(OPENSSL, [openssl])
+MP_TOOL_PATH(RSYNC, [rsync])
+MP_TOOL_PATH(SED, [sed])
+MP_TOOL_PATH(SVN, [svn])
+MP_TOOL_PATH(SWIG, [swig])
+MP_TOOL_PATH(TAR, [tar])
+MP_TOOL_PATH(XAR, [xar])
+MP_TOOL_PATH(XZ, [xz])
+
+# Search for tool paths. Any set above (via --with-pkg=PATH) will be retained
 AC_PATH_PROGS(BSDMAKE, [bsdmake pmake], [])
 AC_PATH_PROG(BZIP2, [bzip2], [])
 AC_PATH_PROG(BZR, [bzr], [])
@@ -149,24 +169,6 @@
 
 AC_CHECK_PROG(HAVE_LAUNCHD, [launchd], [yes], [], [/sbin])
 
-# Define some precious variables allowing user to override PATH for some programs
-AC_ARG_VAR(BSDMAKE, [path to bsdmake/pmake command])
-AC_ARG_VAR(BZIP2, [path to bzip2 command])
-AC_ARG_VAR(CVS, [path to cvs command])
-AC_ARG_VAR(GNUMAKE, [path to gnumake command])
-AC_ARG_VAR(GNUTAR, [path to gnutar command])
-AC_ARG_VAR(LZMA, [path to lzma command])
-AC_ARG_VAR(MAKE, [path to make command])
-AC_ARG_VAR(MTREE, [path to mtree command])
-AC_ARG_VAR(OPEN, [path to open command])
-AC_ARG_VAR(OPENSSL, [path to openssl command])
-AC_ARG_VAR(RSYNC, [path to rsync command])
-AC_ARG_VAR(SED, [path to sed command])
-AC_ARG_VAR(SVN, [path to svn command])
-AC_ARG_VAR(SWIG, [path to swig command])
-AC_ARG_VAR(TAR, [path to tar command])
-AC_ARG_VAR(XAR, [path to xar command])
-AC_ARG_VAR(XZ, [path to xz command])
 
 if test "x$MTREE" = "x"; then
     AC_MSG_ERROR([mtree not found])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140424/7508bc2a/attachment.html>


More information about the macports-changes mailing list