common/autoconf/toolchain.m4

changeset 532
2795874efd16
parent 519
7d7dd520ebfd
child 542
6b93e7a4401d
equal deleted inserted replaced
531:6b96b7744913 532:2795874efd16
112 # $3 = list of compiler names to search for 112 # $3 = list of compiler names to search for
113 AC_DEFUN([TOOLCHAIN_FIND_COMPILER], 113 AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
114 [ 114 [
115 COMPILER_NAME=$2 115 COMPILER_NAME=$2
116 116
117 # Do a first initial attempt at searching the list of compiler names. 117 $1=
118 # If TOOLS_DIR is set, check for all compiler names in there first
119 # before checking the rest of the PATH.
120 if test -n "$TOOLS_DIR"; then
121 PATH_save="$PATH"
122 PATH="$TOOLS_DIR"
123 AC_PATH_PROGS(TOOLS_DIR_$1, $3)
124 $1=$TOOLS_DIR_$1
125 PATH="$PATH_save"
126 fi
127
118 # AC_PATH_PROGS can't be run multiple times with the same variable, 128 # AC_PATH_PROGS can't be run multiple times with the same variable,
119 # so create a new name for this run. 129 # so create a new name for this run.
120 AC_PATH_PROGS(POTENTIAL_$1, $3) 130 if test "x[$]$1" = x; then
121 $1=$POTENTIAL_$1 131 AC_PATH_PROGS(POTENTIAL_$1, $3)
122 132 $1=$POTENTIAL_$1
123 if test "x$[$]$1" = x; then 133 fi
134
135 if test "x[$]$1" = x; then
124 HELP_MSG_MISSING_DEPENDENCY([devkit]) 136 HELP_MSG_MISSING_DEPENDENCY([devkit])
125 AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG]) 137 AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
126 fi 138 fi
127 BASIC_FIXUP_EXECUTABLE($1) 139 BASIC_FIXUP_EXECUTABLE($1)
128 AC_MSG_CHECKING([resolved symbolic links for $1]) 140 AC_MSG_CHECKING([resolved symbolic links for $1])

mercurial