Have the configure script look in devtools for gcc/g++ in RHEL6 #270

Added /opt/rh/devtoolset-3/root/bin to the PATH environment variable
in the configure script.
This commit is contained in:
Alex Lin 2016-07-25 16:43:10 -05:00
parent f7d1ff6376
commit 2112dac2e0
2 changed files with 2 additions and 24 deletions

View File

@ -22,24 +22,6 @@ AC_DEFUN([AX_LLVM_HOME],[
) )
]) ])
dnl Test if clang will link successfully. Some systems like Ubuntu 16.04 shipping with clang that does not work.
AC_DEFUN([AX_TEST_CLANG],[
LLVM_INCLUDE_DIR=`$LLVM_CONFIG --includedir`
LLVM_ALL_LD_FLAGS=`$LLVM_CONFIG --ldflags --libs`
AS_IF([LLVM_SYSTEM_LD_FLAGS=`$LLVM_CONFIG --system-libs 2>/dev/null`],[],[])
AC_LANG(C++)
AC_DEFINE([__STDC_CONSTANT_MACROS])
AC_DEFINE([__STDC_FORMAT_MACROS])
AC_DEFINE([__STDC_LIMIT_MACROS])
AC_LANG_CONFTEST([AC_LANG_PROGRAM([[#include "llvm/Support/Host.h"]],[[llvm::sys::getDefaultTargetTriple(); return 0; ]])])
AC_MSG_CHECKING([if clang works properly])
${CLANG}++ conftest.cpp --std=c++11 -I${LLVM_INCLUDE_DIR} ${LLVM_ALL_LD_FLAGS} ${LLVM_SYSTEM_LD_FLAGS} >&AS_MESSAGE_LOG_FD
AS_IF([test $? == 0 ],AC_MSG_RESULT([yes]),
[AC_MSG_ERROR([cannot use ${CLANG}. Download clang/llvm directly from http://llvm.org])
])
/bin/rm -f a.out
])
AC_DEFUN([AX_HDF5_HOME],[ AC_DEFUN([AX_HDF5_HOME],[
AC_ARG_WITH([hdf5], AC_ARG_WITH([hdf5],
AS_HELP_STRING([--with-hdf5@<:@=DIR@:>@], [HDF5 root directory]), AS_HELP_STRING([--with-hdf5@<:@=DIR@:>@], [HDF5 root directory]),
@ -173,6 +155,7 @@ AC_DEFUN([AX_JSC_DIRS],[
]) ])
dnl add extra paths to find xml headers and X headers on the mac. dnl add extra paths to find xml headers and X headers on the mac.
PATH="/opt/rh/devtoolset-3/root/usr/bin:${PATH}"
XTRAINCPATHS="-I/usr/include/libxml2/ -I/usr/X11/include" XTRAINCPATHS="-I/usr/include/libxml2/ -I/usr/X11/include"
CFLAGS="$CFLAGS $XTRAINCPATHS" CFLAGS="$CFLAGS $XTRAINCPATHS"
CPPFLAGS="$CPPFLAGS $XTRAINCPATHS" CPPFLAGS="$CPPFLAGS $XTRAINCPATHS"
@ -248,9 +231,6 @@ AC_PATH_PROG(CLANG, clang, noclang, "$LLVM_BIN_DIR:/bin:/usr/bin:/usr/local/bin:
AS_IF([test "$ac_cv_path_CLANG" = "noclang"],AC_MSG_ERROR([could not find clang]),[]) AS_IF([test "$ac_cv_path_CLANG" = "noclang"],AC_MSG_ERROR([could not find clang]),[])
AC_SUBST([LLVM_HOME]) AC_SUBST([LLVM_HOME])
dnl does not work under RedHat 6
dnl AX_TEST_CLANG
dnl look for udunits in /usr/include and /usr/include/udunits2 dnl look for udunits in /usr/include and /usr/include/udunits2
AX_UDUNITS_HOME([]) AX_UDUNITS_HOME([])
AS_IF([test "$UDUNITS_HOME" = ""], AS_IF([test "$UDUNITS_HOME" = ""],

4
configure vendored
View File

@ -2483,8 +2483,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
PATH="/opt/rh/devtoolset-3/root/usr/bin:${PATH}"
XTRAINCPATHS="-I/usr/include/libxml2/ -I/usr/X11/include" XTRAINCPATHS="-I/usr/include/libxml2/ -I/usr/X11/include"
CFLAGS="$CFLAGS $XTRAINCPATHS" CFLAGS="$CFLAGS $XTRAINCPATHS"
CPPFLAGS="$CPPFLAGS $XTRAINCPATHS" CPPFLAGS="$CPPFLAGS $XTRAINCPATHS"
@ -7233,7 +7232,6 @@ fi
# Check whether --with-udunits was given. # Check whether --with-udunits was given.
if test "${with_udunits+set}" = set; then : if test "${with_udunits+set}" = set; then :
withval=$with_udunits; UDUNITS_HOME="$withval" withval=$with_udunits; UDUNITS_HOME="$withval"