172 TOOLCHAIN_SETUP_FILENAME_PATTERNS 173 174 if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then 175 AC_MSG_NOTICE([Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)]) 176 else 177 AC_MSG_NOTICE([Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN.]) 178 fi 179 ]) 180 181 # Before we start detecting the toolchain executables, we might need some 182 # special setup, e.g. additional paths etc. 183 AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION], 184 [ 185 # FIXME: Is this needed? 186 AC_LANG(C++) 187 188 # Store the CFLAGS etc passed to the configure script. 189 ORG_CFLAGS="$CFLAGS" 190 ORG_CXXFLAGS="$CXXFLAGS" 191 192 # On Windows, we need to detect the visual studio installation first. 193 # This will change the PATH, but we need to keep that new PATH even 194 # after toolchain detection is done, since the compiler (on x86) uses 195 # it for DLL resolution in runtime. 196 if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then 197 TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV 198 # Reset path to VS_PATH. It will include everything that was on PATH at the time we 199 # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV. 200 PATH="$VS_PATH" 201 # The microsoft toolchain also requires INCLUDE and LIB to be set. 202 export INCLUDE="$VS_INCLUDE" 203 export LIB="$VS_LIB" 204 fi 205 206 # autoconf magic only relies on PATH, so update it if tools dir is specified 207 OLD_PATH="$PATH" 208 209 # For solaris we really need solaris tools, and not the GNU equivalent. 210 # The build tools on Solaris reside in /usr/ccs (C Compilation System), 211 # so add that to path before starting to probe. 212 # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP. 213 if test "x$OPENJDK_BUILD_OS" = xsolaris; then 214 PATH="/usr/ccs/bin:$PATH" 215 fi 216 217 # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to 218 # override all other locations. 219 if test "x$TOOLCHAIN_PATH" != x; then 220 PATH=$TOOLCHAIN_PATH:$PATH 221 fi 222 ]) 223 224 # Restore path, etc 225 AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION], 226 [ 227 # Restore old path. | 172 TOOLCHAIN_SETUP_FILENAME_PATTERNS 173 174 if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then 175 AC_MSG_NOTICE([Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)]) 176 else 177 AC_MSG_NOTICE([Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN.]) 178 fi 179 ]) 180 181 # Before we start detecting the toolchain executables, we might need some 182 # special setup, e.g. additional paths etc. 183 AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION], 184 [ 185 # FIXME: Is this needed? 186 AC_LANG(C++) 187 188 # Store the CFLAGS etc passed to the configure script. 189 ORG_CFLAGS="$CFLAGS" 190 ORG_CXXFLAGS="$CXXFLAGS" 191 192 # autoconf magic only relies on PATH, so update it if tools dir is specified 193 OLD_PATH="$PATH" 194 195 # On Windows, we need to detect the visual studio installation first. 196 # This will change the PATH, but we need to keep that new PATH even 197 # after toolchain detection is done, since the compiler (on x86) uses 198 # it for DLL resolution in runtime. 199 if test "x$OPENJDK_BUILD_OS" = "xwindows" \ 200 && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then 201 TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV 202 # Reset path to VS_PATH. It will include everything that was on PATH at the time we 203 # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV. 204 PATH="$VS_PATH" 205 # The microsoft toolchain also requires INCLUDE and LIB to be set. 206 export INCLUDE="$VS_INCLUDE" 207 export LIB="$VS_LIB" 208 fi 209 210 # For solaris we really need solaris tools, and not the GNU equivalent. 211 # The build tools on Solaris reside in /usr/ccs (C Compilation System), 212 # so add that to path before starting to probe. 213 # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP. 214 if test "x$OPENJDK_BUILD_OS" = xsolaris; then 215 PATH="/usr/ccs/bin:$PATH" 216 fi 217 218 # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to 219 # override all other locations. 220 if test "x$TOOLCHAIN_PATH" != x; then 221 PATH=$TOOLCHAIN_PATH:$PATH 222 fi 223 ]) 224 225 # Restore path, etc 226 AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION], 227 [ 228 # Restore old path. |