aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorWesley W. Terpstra <wesley@sifive.com>2017-03-03 18:50:37 -0800
committerWesley W. Terpstra <wesley@sifive.com>2017-03-21 15:03:38 -0700
commitc71db7787b63fc1ab0c57672c9e469711748bda9 (patch)
tree3cb751447378bcb2046bf169746cde5279666ff0 /configure
parentee80f2851aef29f8744b5a73afe45a1927c82b37 (diff)
downloadspike-c71db7787b63fc1ab0c57672c9e469711748bda9.zip
spike-c71db7787b63fc1ab0c57672c9e469711748bda9.tar.gz
spike-c71db7787b63fc1ab0c57672c9e469711748bda9.tar.bz2
autoconf: put location of 'dtc' into config.h
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure46
1 files changed, 46 insertions, 0 deletions
diff --git a/configure b/configure
index 4c272b3..eddc147 100755
--- a/configure
+++ b/configure
@@ -636,6 +636,7 @@ enable_stow
EGREP
GREP
CXXCPP
+DTC
RANLIB
AR
ac_ct_CXX
@@ -3378,6 +3379,51 @@ else
RANLIB="$ac_cv_prog_RANLIB"
fi
+# Extract the first word of "dtc", so it can be a program name with args.
+set dummy dtc; 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_DTC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $DTC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DTC="$DTC" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+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_DTC="$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
+
+ ;;
+esac
+fi
+DTC=$ac_cv_path_DTC
+if test -n "$DTC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTC" >&5
+$as_echo "$DTC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define DTC "$DTC"
+_ACEOF
+
ac_ext=cpp