common/autoconf/toolchain.m4
changeset 43918 6d31a727d6c1
parent 42297 ebbd32ba8997
child 45104 b8a6cd8674d1
child 46197 9233f69fbd49
equal deleted inserted replaced
43917:18750661e660 43918:6d31a727d6c1
   438 
   438 
   439 # Try to locate the given C or C++ compiler in the path, or otherwise.
   439 # Try to locate the given C or C++ compiler in the path, or otherwise.
   440 #
   440 #
   441 # $1 = compiler to test (CC or CXX)
   441 # $1 = compiler to test (CC or CXX)
   442 # $2 = human readable name of compiler (C or C++)
   442 # $2 = human readable name of compiler (C or C++)
   443 # $3 = list of compiler names to search for
   443 # $3 = compiler name to search for
   444 AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
   444 AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
   445 [
   445 [
   446   COMPILER_NAME=$2
   446   COMPILER_NAME=$2
   447   SEARCH_LIST="$3"
   447   SEARCH_LIST="$3"
   448 
   448 
   480     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
   480     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
   481     # step, this should not be necessary.
   481     # step, this should not be necessary.
   482     if test -n "$TOOLCHAIN_PATH"; then
   482     if test -n "$TOOLCHAIN_PATH"; then
   483       PATH_save="$PATH"
   483       PATH_save="$PATH"
   484       PATH="$TOOLCHAIN_PATH"
   484       PATH="$TOOLCHAIN_PATH"
   485       AC_PATH_PROGS(TOOLCHAIN_PATH_$1, $SEARCH_LIST)
   485       AC_PATH_TOOL(TOOLCHAIN_PATH_$1, $SEARCH_LIST)
   486       $1=$TOOLCHAIN_PATH_$1
   486       $1=$TOOLCHAIN_PATH_$1
   487       PATH="$PATH_save"
   487       PATH="$PATH_save"
   488     fi
   488     fi
   489 
   489 
   490     # AC_PATH_PROGS can't be run multiple times with the same variable,
   490     # AC_PATH_TOOL can't be run multiple times with the same variable,
   491     # so create a new name for this run.
   491     # so create a new name for this run.
   492     if test "x[$]$1" = x; then
   492     if test "x[$]$1" = x; then
   493       AC_PATH_PROGS(POTENTIAL_$1, $SEARCH_LIST)
   493       AC_PATH_TOOL(POTENTIAL_$1, $SEARCH_LIST)
   494       $1=$POTENTIAL_$1
   494       $1=$POTENTIAL_$1
   495     fi
   495     fi
   496 
   496 
   497     if test "x[$]$1" = x; then
   497     if test "x[$]$1" = x; then
   498       HELP_MSG_MISSING_DEPENDENCY([devkit])
   498       HELP_MSG_MISSING_DEPENDENCY([devkit])