< prev index next >

common/autoconf/toolchain.m4

Print this page




 200 
 201   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
 202     AC_MSG_NOTICE([Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)])
 203   else
 204     AC_MSG_NOTICE([Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN.])
 205   fi 
 206 ])
 207 
 208 # Before we start detecting the toolchain executables, we might need some 
 209 # special setup, e.g. additional paths etc.
 210 AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
 211 [
 212   # FIXME: Is this needed?
 213   AC_LANG(C++)
 214 
 215   # Store the CFLAGS etal passed to the configure script.
 216   ORG_CFLAGS="$CFLAGS"
 217   ORG_CXXFLAGS="$CXXFLAGS"
 218   ORG_OBJCFLAGS="$OBJCFLAGS"
 219 



 220   # On Windows, we need to detect the visual studio installation first.
 221   # This will change the PATH, but we need to keep that new PATH even 
 222   # after toolchain detection is done, since the compiler (on x86) uses
 223   # it for DLL resolution in runtime.
 224   if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then

 225     TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
 226     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
 227     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
 228     PATH="$VS_PATH"
 229     # The microsoft toolchain also requires INCLUDE and LIB to be set.
 230     export INCLUDE="$VS_INCLUDE"
 231     export LIB="$VS_LIB"
 232   fi
 233 
 234   # autoconf magic only relies on PATH, so update it if tools dir is specified
 235   OLD_PATH="$PATH"
 236 
 237   # Before we locate the compilers, we need to sanitize the Xcode build environment
 238   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
 239     # determine path to Xcode developer directory
 240     # can be empty in which case all the tools will rely on a sane Xcode 4 installation
 241     SET_DEVELOPER_DIR=
 242 
 243     if test -n "$XCODE_PATH"; then
 244       DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
 245     fi
 246 
 247     # DEVELOPER_DIR could also be provided directly
 248     AC_MSG_CHECKING([Determining if we need to set DEVELOPER_DIR])
 249     if test -n "$DEVELOPER_DIR"; then
 250       if test ! -d "$DEVELOPER_DIR"; then
 251         AC_MSG_ERROR([Xcode Developer path does not exist: $DEVELOPER_DIR, please provide a path to the Xcode 4 application bundle using --with-xcode-path])
 252       fi
 253       if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
 254         AC_MSG_ERROR([Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle])
 255       fi




 200 
 201   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
 202     AC_MSG_NOTICE([Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)])
 203   else
 204     AC_MSG_NOTICE([Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN.])
 205   fi 
 206 ])
 207 
 208 # Before we start detecting the toolchain executables, we might need some 
 209 # special setup, e.g. additional paths etc.
 210 AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
 211 [
 212   # FIXME: Is this needed?
 213   AC_LANG(C++)
 214 
 215   # Store the CFLAGS etal passed to the configure script.
 216   ORG_CFLAGS="$CFLAGS"
 217   ORG_CXXFLAGS="$CXXFLAGS"
 218   ORG_OBJCFLAGS="$OBJCFLAGS"
 219 
 220   # autoconf magic only relies on PATH, so update it if tools dir is specified
 221   OLD_PATH="$PATH"
 222 
 223   # On Windows, we need to detect the visual studio installation first.
 224   # This will change the PATH, but we need to keep that new PATH even 
 225   # after toolchain detection is done, since the compiler (on x86) uses
 226   # it for DLL resolution in runtime.
 227   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
 228       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
 229     TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
 230     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
 231     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
 232     PATH="$VS_PATH"
 233     # The microsoft toolchain also requires INCLUDE and LIB to be set.
 234     export INCLUDE="$VS_INCLUDE"
 235     export LIB="$VS_LIB"
 236   fi



 237 
 238   # Before we locate the compilers, we need to sanitize the Xcode build environment
 239   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
 240     # determine path to Xcode developer directory
 241     # can be empty in which case all the tools will rely on a sane Xcode 4 installation
 242     SET_DEVELOPER_DIR=
 243 
 244     if test -n "$XCODE_PATH"; then
 245       DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
 246     fi
 247 
 248     # DEVELOPER_DIR could also be provided directly
 249     AC_MSG_CHECKING([Determining if we need to set DEVELOPER_DIR])
 250     if test -n "$DEVELOPER_DIR"; then
 251       if test ! -d "$DEVELOPER_DIR"; then
 252         AC_MSG_ERROR([Xcode Developer path does not exist: $DEVELOPER_DIR, please provide a path to the Xcode 4 application bundle using --with-xcode-path])
 253       fi
 254       if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
 255         AC_MSG_ERROR([Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle])
 256       fi


< prev index next >