mirror of
https://github.com/nasa/trick.git
synced 2025-06-24 01:28:46 +00:00
configure script does not check for clang/llvm
Added a configure check for clang and llvm-config. If llvm-config exists then we check for the libraries in the libdir returned by llvm-config. All of these must be present for configure to pass. refs #130
This commit is contained in:
107
configure
vendored
107
configure
vendored
@ -626,6 +626,8 @@ BC635_HOME
|
||||
TPROCTE_HOME
|
||||
DMTCP_HOME
|
||||
HDF5_HOME
|
||||
LLVM_CONFIG
|
||||
CLANG
|
||||
LLVM_HOME
|
||||
PYTHON_EXTRA_LDFLAGS
|
||||
PYTHON_EXTRA_LIBS
|
||||
@ -3592,7 +3594,7 @@ else
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
as_dummy="path="/bin:/usr/bin:/usr/local/bin:/sw/bin""
|
||||
as_dummy=""/bin:/usr/bin:/usr/local/bin:/sw/bin""
|
||||
for as_dir in $as_dummy
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
@ -5368,15 +5370,108 @@ else
|
||||
|
||||
fi
|
||||
|
||||
as_ac_File=`$as_echo "ac_cv_file_$LLVM_HOME/bin/llvm-config" | $as_tr_sh`
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LLVM_HOME/bin/llvm-config" >&5
|
||||
$as_echo_n "checking for $LLVM_HOME/bin/llvm-config... " >&6; }
|
||||
|
||||
|
||||
# Extract the first word of "clang", so it can be a program name with args.
|
||||
set dummy clang; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_CLANG+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $CLANG in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
as_dummy=""$LLVM_HOME/bin:/bin:/usr/bin:/usr/local/bin:/sw/bin""
|
||||
for as_dir in $as_dummy
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
test -z "$ac_cv_path_CLANG" && ac_cv_path_CLANG="noclang"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
CLANG=$ac_cv_path_CLANG
|
||||
if test -n "$CLANG"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
|
||||
$as_echo "$CLANG" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
if test "$ac_cv_path_CLANG" = "noclang"; then :
|
||||
as_fn_error $? "could not find clang" "$LINENO" 5
|
||||
fi
|
||||
# Extract the first word of "llvm-config", so it can be a program name with args.
|
||||
set dummy llvm-config; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_LLVM_CONFIG+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $LLVM_CONFIG in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
as_dummy=""$LLVM_HOME/bin:/bin:/usr/bin:/usr/local/bin:/sw/bin""
|
||||
for as_dir in $as_dummy
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
test -z "$ac_cv_path_LLVM_CONFIG" && ac_cv_path_LLVM_CONFIG="no-llvm-config"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
|
||||
if test -n "$LLVM_CONFIG"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
|
||||
$as_echo "$LLVM_CONFIG" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
if test "$ac_cv_path_LLVM_CONFIG" = "no-llvm-config"; then :
|
||||
as_fn_error $? "could not find clang" "$LINENO" 5
|
||||
fi
|
||||
LLVM_LIB_DIR=`$LLVM_CONFIG --libdir`
|
||||
as_ac_File=`$as_echo "ac_cv_file_$LLVM_LIB_DIR/libLLVMSupport.a" | $as_tr_sh`
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LLVM_LIB_DIR/libLLVMSupport.a" >&5
|
||||
$as_echo_n "checking for $LLVM_LIB_DIR/libLLVMSupport.a... " >&6; }
|
||||
if eval \${$as_ac_File+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
test "$cross_compiling" = yes &&
|
||||
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
|
||||
if test -r "$LLVM_HOME/bin/llvm-config"; then
|
||||
if test -r "$LLVM_LIB_DIR/libLLVMSupport.a"; then
|
||||
eval "$as_ac_File=yes"
|
||||
else
|
||||
eval "$as_ac_File=no"
|
||||
@ -5388,7 +5483,7 @@ $as_echo "$ac_res" >&6; }
|
||||
if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
|
||||
|
||||
else
|
||||
as_fn_error $? "could not find $LLVM_HOME/bin/llvm-config" "$LINENO" 5
|
||||
as_fn_error $? "could not find clang library files in $LLVM_LIB_DIR" "$LINENO" 5
|
||||
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user