Ignore:
Timestamp:
Mar 2, 2014, 4:00:30 PM (6 years ago)
Author:
cal@…
Message:

configure.ac: Reset $PATH to the default before configuring

... and remove some references to /usr/local that we really don't want. Also
make sure all binaries that are in /sbin or /usr/sbin have an appropriate PATH
hint in AC_CHECK_PROG, just in case somebody doesn't have the sbin directories
in his $PATH (which should never happen now that configure resets the PATH, but
better be safe than sorry).

This avoids MacPorts thinking this was a SystemStarter-system because it can't
find /sbin/launchd during configure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/aclocal.m4

    r113877 r117518  
    896896dnl for configure to prevent potential problems when base/ code is updated
    897897dnl and ports are installed that would match needed items.
    898 AC_DEFUN([MP_PATH_SCAN],[
    899         oldprefix=$prefix
    900         if test "x$prefix" = "xNONE" ; then
    901                 prefix=$ac_default_prefix
    902         fi
    903         oldPATH=$PATH
    904         newPATH=
    905         as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    906         for as_dir in $oldPATH
    907         do
    908                 IFS=$as_save_IFS
    909                 case "$as_dir" in
    910                         $prefix/*)
    911                                 ;;
    912                         *)
    913                                 if test -z "$newPATH"; then
    914                                         newPATH=$as_dir
    915                                 else
    916                                         newPATH=$newPATH$PATH_SEPARATOR$as_dir
    917                                 fi
    918                                 ;;
    919                 esac
    920         done
    921         PATH=$newPATH; export PATH
    922         AC_SUBST(PATH_CLEANED,$newPATH)
    923         prefix=$oldprefix
     898dnl This macro also resets the PATH to a standard value for this system; some
     899dnl checks might fail if e.g. /sbin was missing.
     900AC_DEFUN([MP_PATH_RESET],[
     901        AC_MSG_CHECKING([for a clean \$PATH])
     902        PATH="/usr/bin:/bin:/usr/sbin:/sbin"
     903        export PATH
     904        AC_SUBST(PATH_CLEANED,$PATH)
     905        AC_MSG_RESULT([$PATH])
    924906])
    925907
Note: See TracChangeset for help on using the changeset viewer.