common/autoconf/toolchain.m4

Print this page




 209 AC_SUBST(BUILD_CXX)
 210 AC_SUBST(BUILD_LD)
 211 
 212 # If a devkit is found on the builddeps server, then prepend its path to the
 213 # PATH variable. If there are cross compilers available in the devkit, these
 214 # will be found by AC_PROG_CC et al.
 215 DEVKIT=
 216 BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
 217                     [# Found devkit
 218                      PATH="$DEVKIT/bin:$PATH"
 219                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
 220                      if test "x$x_includes" = "xNONE"; then
 221                          x_includes="$SYS_ROOT/usr/include/X11"
 222                      fi
 223                      if test "x$x_libraries" = "xNONE"; then
 224                          x_libraries="$SYS_ROOT/usr/lib"
 225                      fi
 226                     ],
 227                     [])
 228 
 229 if test "x$SYS_ROOT" != "x/" ; then
 230     CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
 231     CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
 232     OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
 233     OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
 234     CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
 235     LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
 236 fi
 237 
 238 # Store the CFLAGS etal passed to the configure script.
 239 ORG_CFLAGS="$CFLAGS"
 240 ORG_CXXFLAGS="$CXXFLAGS"
 241 ORG_OBJCFLAGS="$OBJCFLAGS"
 242 
 243 # autoconf magic only relies on PATH, so update it if tools dir is specified
 244 OLD_PATH="$PATH"
 245 if test "x$TOOLS_DIR" != x; then
 246   PATH=$TOOLS_DIR:$PATH
 247 fi
 248 
 249 
 250 ### Locate C compiler (CC)
 251 
 252 # On windows, only cl.exe is supported.
 253 # On Solaris, cc is preferred to gcc.
 254 # Elsewhere, gcc is preferred to cc.
 255 
 256 if test "x$CC" != x; then
 257   COMPILER_CHECK_LIST="$CC"




 209 AC_SUBST(BUILD_CXX)
 210 AC_SUBST(BUILD_LD)
 211 
 212 # If a devkit is found on the builddeps server, then prepend its path to the
 213 # PATH variable. If there are cross compilers available in the devkit, these
 214 # will be found by AC_PROG_CC et al.
 215 DEVKIT=
 216 BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
 217                     [# Found devkit
 218                      PATH="$DEVKIT/bin:$PATH"
 219                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
 220                      if test "x$x_includes" = "xNONE"; then
 221                          x_includes="$SYS_ROOT/usr/include/X11"
 222                      fi
 223                      if test "x$x_libraries" = "xNONE"; then
 224                          x_libraries="$SYS_ROOT/usr/lib"
 225                      fi
 226                     ],
 227                     [])
 228 









 229 # Store the CFLAGS etal passed to the configure script.
 230 ORG_CFLAGS="$CFLAGS"
 231 ORG_CXXFLAGS="$CXXFLAGS"
 232 ORG_OBJCFLAGS="$OBJCFLAGS"
 233 
 234 # autoconf magic only relies on PATH, so update it if tools dir is specified
 235 OLD_PATH="$PATH"
 236 if test "x$TOOLS_DIR" != x; then
 237   PATH=$TOOLS_DIR:$PATH
 238 fi
 239 
 240 
 241 ### Locate C compiler (CC)
 242 
 243 # On windows, only cl.exe is supported.
 244 # On Solaris, cc is preferred to gcc.
 245 # Elsewhere, gcc is preferred to cc.
 246 
 247 if test "x$CC" != x; then
 248   COMPILER_CHECK_LIST="$CC"