├── .gitmodules ├── Makefile.in ├── README.md ├── clang-wrapper ├── configure ├── configure.ac └── install-sh /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "riscv-clang"] 2 | path = riscv-clang 3 | url = ../riscv-clang 4 | [submodule "riscv-llvm"] 5 | path = riscv-llvm 6 | url = ../riscv-llvm 7 | [submodule "riscv-compiler-rt"] 8 | path = riscv-compiler-rt 9 | url = ../riscv-compiler-rt/ 10 | [submodule "riscv-gnu-toolchain"] 11 | path = riscv-gnu-toolchain 12 | url = https://github.com/riscv/riscv-gnu-toolchain.git 13 | [submodule "extern-gcc-testsuite"] 14 | path = extern-gcc-testsuite 15 | url = ../extern-gcc-testsuite 16 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | srcdir := @abs_top_srcdir@ 2 | builddir := @abs_top_builddir@ 3 | INSTALL_DIR := @prefix@ 4 | 5 | WITH_ARCH ?= @WITH_ARCH@ 6 | BUILD_TYPE ?= @WITH_BUILD_TYPE@ 7 | SYSROOT := $(INSTALL_DIR)/sysroot 8 | CMAKE := @CMAKE@ 9 | BUILD_CLANG_ONLY := @BUILD_CLANG_ONLY@ 10 | 11 | XLEN := $(shell echo $(WITH_ARCH) | tr A-Z a-z | sed 's/.*rv\([0-9]*\).*/\1/') 12 | ifneq ($(XLEN),32) 13 | XLEN := 64 14 | endif 15 | 16 | ifeq ($(BUILD_CLANG_ONLY),no) 17 | LLVM_BUILD_TARGET :=all 18 | LLVM_INSTALL_TARGET :=install 19 | else 20 | LLVM_BUILD_TARGET :=clang 21 | LLVM_INSTALL_TARGET := install-clang 22 | endif 23 | 24 | make_tuple = riscv$(1)-unknown-$(2) 25 | NEWLIB_TUPLE ?= $(call make_tuple,$(XLEN),elf) 26 | 27 | CLANG_WRAPPERS := $(addprefix $(INSTALL_DIR)/bin/$(NEWLIB_TUPLE)-, clang clang++) 28 | 29 | install: install-llvm install-riscv-gnu-toolchain 30 | 31 | all: all-llvm stamps/build-riscv-gnu-toolchain 32 | 33 | $(INSTALL_DIR)/bin/$(NEWLIB_TUPLE)-%: build-llvm/bin/% 34 | cp $(srcdir)/clang-wrapper $@ 35 | sed -i 's/@CLANG@/$(notdir $<)/' $@ 36 | sed -i 's/@TARGET@/$(NEWLIB_TUPLE)/' $@ 37 | sed -i 's/@ARCH@/$(WITH_ARCH)/' $@ 38 | 39 | build-llvm/bin/clang: all-llvm 40 | build-llvm/bin/clang++: all-llvm 41 | 42 | stamps/configure-llvm: $(srcdir)/riscv-llvm $(srcdir)/riscv-clang 43 | mkdir -p build-llvm 44 | cd build-llvm && \ 45 | $(CMAKE) $(srcdir)/riscv-llvm \ 46 | -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) \ 47 | -DLLVM_EXTERNAL_CLANG_SOURCE_DIR=$(srcdir)/riscv-clang \ 48 | -DLLVM_BINUTILS_INCDIR=$(srcdir)/riscv-gnu-toolchain/riscv-binutils-gdb/include \ 49 | -DLLVM_TARGETS_TO_BUILD=RISCV \ 50 | -DLLVM_DEFAULT_TARGET_TRIPLE=$(NEWLIB_TUPLE) \ 51 | -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) 52 | mkdir -p $(dir $@) && touch $@ 53 | 54 | all-llvm: stamps/configure-llvm 55 | cd build-llvm && $(MAKE) $(LLVM_BUILD_TARGET) 56 | 57 | install-llvm: all-llvm $(SYSROOT) $(CLANG_WRAPPERS) 58 | cd build-llvm && $(MAKE) $(LLVM_INSTALL_TARGET) 59 | 60 | $(SYSROOT): stamps/build-riscv-gnu-toolchain 61 | mkdir -p $(SYSROOT) 62 | ln -s -r $(INSTALL_DIR)/$(NEWLIB_TUPLE)/ $(SYSROOT)/usr 63 | 64 | stamps/build-riscv-gnu-toolchain: 65 | $(MAKE) -C riscv-gnu-toolchain 66 | mkdir -p $(dir $@) && touch $@ 67 | 68 | install-riscv-gnu-toolchain: stamps/build-riscv-gnu-toolchain 69 | $(MAKE) -C riscv-gnu-toolchain install 70 | 71 | clean: 72 | cd riscv-gnu-toolchain && $(MAKE) clean 73 | rm -rf stamps build-llvm 74 | 75 | riscv-gnu-toolchain/stamps/build-qemu: 76 | $(MAKE) -C riscv-gnu-toolchain stamps/build-qemu 77 | 78 | gcc-testsuite/Makefile: riscv-gnu-toolchain/stamps/build-qemu 79 | mkdir -p $(dir $@) 80 | cd $(dir $@) && \ 81 | $(srcdir)/extern-gcc-testsuite/configure \ 82 | --with-target-cc=$(INSTALL_DIR)/bin/$(NEWLIB_TUPLE)-clang \ 83 | --with-target-cxx=$(INSTALL_DIR)/bin/$(NEWLIB_TUPLE)-clang++ \ 84 | --target=$(NEWLIB_TUPLE) \ 85 | --with-target-sim=$(INSTALL_DIR)/bin/qemu-riscv$(XLEN) \ 86 | --with-target-board=riscv-sim 87 | 88 | check: gcc-testsuite/Makefile 89 | cd gcc-testsuite && $(MAKE) all-parallel 90 | cd gcc-testsuite && $(MAKE) filter 91 | cp gcc-testsuite/gcc.log gcc-testsuite/gcc.log.filtered \ 92 | gcc-testsuite/gcc.sum gcc-testsuite/gcc.sum.filtered \ 93 | . 94 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | RISC-V LLVM Toolchain 2 | ============================= 3 | 4 | This is the RISC-V LLVM C and C++ cross-compiler. It supports ELF/Newlib toolchain only in this moment. 5 | 6 | ### Getting the sources 7 | 8 | This repository uses submodules. You need the --recursive option to fetch the submodules automatically 9 | 10 | $ git clone --recursive https://github.com/andestech/riscv-llvm-toolchain.git 11 | 12 | ### Installation 13 | 14 | To build the Newlib cross-compiler, pick an install path. If you choose, 15 | say, `/opt/riscv`, then add `/opt/riscv/bin` to your `PATH` now. Then, simply 16 | run the following command: 17 | 18 | ./configure --prefix=/opt/riscv 19 | make 20 | 21 | You should now be able to use riscv-llvm and its cousins. 22 | 23 | The build defaults to targetting RV64IMC (64-bit), even on a 32-bit build 24 | environment. To build the 32-bit RV32IMC toolchain, use: 25 | 26 | ./configure --prefix=/opt/riscv --with-arch=rv32imc 27 | make 28 | 29 | Supported architectures are rv32i or rv64i plus standard extensions (a)tomics, 30 | (m)ultiplication and division. 31 | 32 | ### Usage 33 | 34 | You can found a LLVM toolchain in your install path, we recommand you use `riscv32-elf-unknown-clang` (or `riscv64-elf-unknown-clang` for RV64) to compile program just like `riscv32-elf-unknown-gcc` instead of use clang directly. 35 | 36 | ### Advanced Options 37 | 38 | There are a number of additional options that may be passed to 39 | configure. See './configure --help' for more details. 40 | -------------------------------------------------------------------------------- /clang-wrapper: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SYSROOT=`dirname $0`/../sysroot 4 | CLANG=`dirname $0`/@CLANG@ 5 | TARGET=@TARGET@ 6 | ARCH=@ARCH@ 7 | 8 | $CLANG --sysroot=$SYSROOT --target=$TARGET -march=$ARCH "$@" 9 | -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Guess values for system-dependent variables and create Makefiles. 3 | # Generated by GNU Autoconf 2.69 for riscv-llvm-toolchain 1.0. 4 | # 5 | # 6 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. 7 | # 8 | # 9 | # This configure script is free software; the Free Software Foundation 10 | # gives unlimited permission to copy, distribute and modify it. 11 | ## -------------------- ## 12 | ## M4sh Initialization. ## 13 | ## -------------------- ## 14 | 15 | # Be more Bourne compatible 16 | DUALCASE=1; export DUALCASE # for MKS sh 17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 18 | emulate sh 19 | NULLCMD=: 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 21 | # is contrary to our usage. Disable this feature. 22 | alias -g '${1+"$@"}'='"$@"' 23 | setopt NO_GLOB_SUBST 24 | else 25 | case `(set -o) 2>/dev/null` in #( 26 | *posix*) : 27 | set -o posix ;; #( 28 | *) : 29 | ;; 30 | esac 31 | fi 32 | 33 | 34 | as_nl=' 35 | ' 36 | export as_nl 37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. 38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 41 | # Prefer a ksh shell builtin over an external printf program on Solaris, 42 | # but without wasting forks for bash or zsh. 43 | if test -z "$BASH_VERSION$ZSH_VERSION" \ 44 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 45 | as_echo='print -r --' 46 | as_echo_n='print -rn --' 47 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 48 | as_echo='printf %s\n' 49 | as_echo_n='printf %s' 50 | else 51 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 52 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 53 | as_echo_n='/usr/ucb/echo -n' 54 | else 55 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 56 | as_echo_n_body='eval 57 | arg=$1; 58 | case $arg in #( 59 | *"$as_nl"*) 60 | expr "X$arg" : "X\\(.*\\)$as_nl"; 61 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 62 | esac; 63 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 64 | ' 65 | export as_echo_n_body 66 | as_echo_n='sh -c $as_echo_n_body as_echo' 67 | fi 68 | export as_echo_body 69 | as_echo='sh -c $as_echo_body as_echo' 70 | fi 71 | 72 | # The user is always right. 73 | if test "${PATH_SEPARATOR+set}" != set; then 74 | PATH_SEPARATOR=: 75 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 76 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 77 | PATH_SEPARATOR=';' 78 | } 79 | fi 80 | 81 | 82 | # IFS 83 | # We need space, tab and new line, in precisely that order. Quoting is 84 | # there to prevent editors from complaining about space-tab. 85 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word 86 | # splitting by setting IFS to empty value.) 87 | IFS=" "" $as_nl" 88 | 89 | # Find who we are. Look in the path if we contain no directory separator. 90 | as_myself= 91 | case $0 in #(( 92 | *[\\/]* ) as_myself=$0 ;; 93 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 94 | for as_dir in $PATH 95 | do 96 | IFS=$as_save_IFS 97 | test -z "$as_dir" && as_dir=. 98 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 99 | done 100 | IFS=$as_save_IFS 101 | 102 | ;; 103 | esac 104 | # We did not find ourselves, most probably we were run as `sh COMMAND' 105 | # in which case we are not to be found in the path. 106 | if test "x$as_myself" = x; then 107 | as_myself=$0 108 | fi 109 | if test ! -f "$as_myself"; then 110 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 111 | exit 1 112 | fi 113 | 114 | # Unset variables that we do not need and which cause bugs (e.g. in 115 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 116 | # suppresses any "Segmentation fault" message there. '((' could 117 | # trigger a bug in pdksh 5.2.14. 118 | for as_var in BASH_ENV ENV MAIL MAILPATH 119 | do eval test x\${$as_var+set} = xset \ 120 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 121 | done 122 | PS1='$ ' 123 | PS2='> ' 124 | PS4='+ ' 125 | 126 | # NLS nuisances. 127 | LC_ALL=C 128 | export LC_ALL 129 | LANGUAGE=C 130 | export LANGUAGE 131 | 132 | # CDPATH. 133 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 134 | 135 | # Use a proper internal environment variable to ensure we don't fall 136 | # into an infinite loop, continuously re-executing ourselves. 137 | if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then 138 | _as_can_reexec=no; export _as_can_reexec; 139 | # We cannot yet assume a decent shell, so we have to provide a 140 | # neutralization value for shells without unset; and this also 141 | # works around shells that cannot unset nonexistent variables. 142 | # Preserve -v and -x to the replacement shell. 143 | BASH_ENV=/dev/null 144 | ENV=/dev/null 145 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 146 | case $- in # (((( 147 | *v*x* | *x*v* ) as_opts=-vx ;; 148 | *v* ) as_opts=-v ;; 149 | *x* ) as_opts=-x ;; 150 | * ) as_opts= ;; 151 | esac 152 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 153 | # Admittedly, this is quite paranoid, since all the known shells bail 154 | # out after a failed `exec'. 155 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 156 | as_fn_exit 255 157 | fi 158 | # We don't want this to propagate to other subprocesses. 159 | { _as_can_reexec=; unset _as_can_reexec;} 160 | if test "x$CONFIG_SHELL" = x; then 161 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : 162 | emulate sh 163 | NULLCMD=: 164 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which 165 | # is contrary to our usage. Disable this feature. 166 | alias -g '\${1+\"\$@\"}'='\"\$@\"' 167 | setopt NO_GLOB_SUBST 168 | else 169 | case \`(set -o) 2>/dev/null\` in #( 170 | *posix*) : 171 | set -o posix ;; #( 172 | *) : 173 | ;; 174 | esac 175 | fi 176 | " 177 | as_required="as_fn_return () { (exit \$1); } 178 | as_fn_success () { as_fn_return 0; } 179 | as_fn_failure () { as_fn_return 1; } 180 | as_fn_ret_success () { return 0; } 181 | as_fn_ret_failure () { return 1; } 182 | 183 | exitcode=0 184 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } 185 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 186 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 187 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 188 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : 189 | 190 | else 191 | exitcode=1; echo positional parameters were not saved. 192 | fi 193 | test x\$exitcode = x0 || exit 1 194 | test -x / || exit 1" 195 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 196 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 197 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 198 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" 199 | if (eval "$as_required") 2>/dev/null; then : 200 | as_have_required=yes 201 | else 202 | as_have_required=no 203 | fi 204 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : 205 | 206 | else 207 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 208 | as_found=false 209 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 210 | do 211 | IFS=$as_save_IFS 212 | test -z "$as_dir" && as_dir=. 213 | as_found=: 214 | case $as_dir in #( 215 | /*) 216 | for as_base in sh bash ksh sh5; do 217 | # Try only shells that exist, to save several forks. 218 | as_shell=$as_dir/$as_base 219 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 220 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : 221 | CONFIG_SHELL=$as_shell as_have_required=yes 222 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : 223 | break 2 224 | fi 225 | fi 226 | done;; 227 | esac 228 | as_found=false 229 | done 230 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && 231 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : 232 | CONFIG_SHELL=$SHELL as_have_required=yes 233 | fi; } 234 | IFS=$as_save_IFS 235 | 236 | 237 | if test "x$CONFIG_SHELL" != x; then : 238 | export CONFIG_SHELL 239 | # We cannot yet assume a decent shell, so we have to provide a 240 | # neutralization value for shells without unset; and this also 241 | # works around shells that cannot unset nonexistent variables. 242 | # Preserve -v and -x to the replacement shell. 243 | BASH_ENV=/dev/null 244 | ENV=/dev/null 245 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 246 | case $- in # (((( 247 | *v*x* | *x*v* ) as_opts=-vx ;; 248 | *v* ) as_opts=-v ;; 249 | *x* ) as_opts=-x ;; 250 | * ) as_opts= ;; 251 | esac 252 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 253 | # Admittedly, this is quite paranoid, since all the known shells bail 254 | # out after a failed `exec'. 255 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 256 | exit 255 257 | fi 258 | 259 | if test x$as_have_required = xno; then : 260 | $as_echo "$0: This script requires a shell more modern than all" 261 | $as_echo "$0: the shells that I found on your system." 262 | if test x${ZSH_VERSION+set} = xset ; then 263 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" 264 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." 265 | else 266 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, 267 | $0: including any error possibly output before this 268 | $0: message. Then install a modern shell, or manually run 269 | $0: the script under such a shell if you do have one." 270 | fi 271 | exit 1 272 | fi 273 | fi 274 | fi 275 | SHELL=${CONFIG_SHELL-/bin/sh} 276 | export SHELL 277 | # Unset more variables known to interfere with behavior of common tools. 278 | CLICOLOR_FORCE= GREP_OPTIONS= 279 | unset CLICOLOR_FORCE GREP_OPTIONS 280 | 281 | ## --------------------- ## 282 | ## M4sh Shell Functions. ## 283 | ## --------------------- ## 284 | # as_fn_unset VAR 285 | # --------------- 286 | # Portably unset VAR. 287 | as_fn_unset () 288 | { 289 | { eval $1=; unset $1;} 290 | } 291 | as_unset=as_fn_unset 292 | 293 | # as_fn_set_status STATUS 294 | # ----------------------- 295 | # Set $? to STATUS, without forking. 296 | as_fn_set_status () 297 | { 298 | return $1 299 | } # as_fn_set_status 300 | 301 | # as_fn_exit STATUS 302 | # ----------------- 303 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 304 | as_fn_exit () 305 | { 306 | set +e 307 | as_fn_set_status $1 308 | exit $1 309 | } # as_fn_exit 310 | 311 | # as_fn_mkdir_p 312 | # ------------- 313 | # Create "$as_dir" as a directory, including parents if necessary. 314 | as_fn_mkdir_p () 315 | { 316 | 317 | case $as_dir in #( 318 | -*) as_dir=./$as_dir;; 319 | esac 320 | test -d "$as_dir" || eval $as_mkdir_p || { 321 | as_dirs= 322 | while :; do 323 | case $as_dir in #( 324 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 325 | *) as_qdir=$as_dir;; 326 | esac 327 | as_dirs="'$as_qdir' $as_dirs" 328 | as_dir=`$as_dirname -- "$as_dir" || 329 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 330 | X"$as_dir" : 'X\(//\)[^/]' \| \ 331 | X"$as_dir" : 'X\(//\)$' \| \ 332 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 333 | $as_echo X"$as_dir" | 334 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 335 | s//\1/ 336 | q 337 | } 338 | /^X\(\/\/\)[^/].*/{ 339 | s//\1/ 340 | q 341 | } 342 | /^X\(\/\/\)$/{ 343 | s//\1/ 344 | q 345 | } 346 | /^X\(\/\).*/{ 347 | s//\1/ 348 | q 349 | } 350 | s/.*/./; q'` 351 | test -d "$as_dir" && break 352 | done 353 | test -z "$as_dirs" || eval "mkdir $as_dirs" 354 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 355 | 356 | 357 | } # as_fn_mkdir_p 358 | 359 | # as_fn_executable_p FILE 360 | # ----------------------- 361 | # Test if FILE is an executable regular file. 362 | as_fn_executable_p () 363 | { 364 | test -f "$1" && test -x "$1" 365 | } # as_fn_executable_p 366 | # as_fn_append VAR VALUE 367 | # ---------------------- 368 | # Append the text in VALUE to the end of the definition contained in VAR. Take 369 | # advantage of any shell optimizations that allow amortized linear growth over 370 | # repeated appends, instead of the typical quadratic growth present in naive 371 | # implementations. 372 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 373 | eval 'as_fn_append () 374 | { 375 | eval $1+=\$2 376 | }' 377 | else 378 | as_fn_append () 379 | { 380 | eval $1=\$$1\$2 381 | } 382 | fi # as_fn_append 383 | 384 | # as_fn_arith ARG... 385 | # ------------------ 386 | # Perform arithmetic evaluation on the ARGs, and store the result in the 387 | # global $as_val. Take advantage of shells that can avoid forks. The arguments 388 | # must be portable across $(()) and expr. 389 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 390 | eval 'as_fn_arith () 391 | { 392 | as_val=$(( $* )) 393 | }' 394 | else 395 | as_fn_arith () 396 | { 397 | as_val=`expr "$@" || test $? -eq 1` 398 | } 399 | fi # as_fn_arith 400 | 401 | 402 | # as_fn_error STATUS ERROR [LINENO LOG_FD] 403 | # ---------------------------------------- 404 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 405 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 406 | # script with STATUS, using 1 if that was 0. 407 | as_fn_error () 408 | { 409 | as_status=$1; test $as_status -eq 0 && as_status=1 410 | if test "$4"; then 411 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 412 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 413 | fi 414 | $as_echo "$as_me: error: $2" >&2 415 | as_fn_exit $as_status 416 | } # as_fn_error 417 | 418 | if expr a : '\(a\)' >/dev/null 2>&1 && 419 | test "X`expr 00001 : '.*\(...\)'`" = X001; then 420 | as_expr=expr 421 | else 422 | as_expr=false 423 | fi 424 | 425 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 426 | as_basename=basename 427 | else 428 | as_basename=false 429 | fi 430 | 431 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 432 | as_dirname=dirname 433 | else 434 | as_dirname=false 435 | fi 436 | 437 | as_me=`$as_basename -- "$0" || 438 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 439 | X"$0" : 'X\(//\)$' \| \ 440 | X"$0" : 'X\(/\)' \| . 2>/dev/null || 441 | $as_echo X/"$0" | 442 | sed '/^.*\/\([^/][^/]*\)\/*$/{ 443 | s//\1/ 444 | q 445 | } 446 | /^X\/\(\/\/\)$/{ 447 | s//\1/ 448 | q 449 | } 450 | /^X\/\(\/\).*/{ 451 | s//\1/ 452 | q 453 | } 454 | s/.*/./; q'` 455 | 456 | # Avoid depending upon Character Ranges. 457 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' 458 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 459 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS 460 | as_cr_digits='0123456789' 461 | as_cr_alnum=$as_cr_Letters$as_cr_digits 462 | 463 | 464 | as_lineno_1=$LINENO as_lineno_1a=$LINENO 465 | as_lineno_2=$LINENO as_lineno_2a=$LINENO 466 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && 467 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { 468 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) 469 | sed -n ' 470 | p 471 | /[$]LINENO/= 472 | ' <$as_myself | 473 | sed ' 474 | s/[$]LINENO.*/&-/ 475 | t lineno 476 | b 477 | :lineno 478 | N 479 | :loop 480 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 481 | t loop 482 | s/-\n.*// 483 | ' >$as_me.lineno && 484 | chmod +x "$as_me.lineno" || 485 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 486 | 487 | # If we had to re-execute with $CONFIG_SHELL, we're ensured to have 488 | # already done that, so ensure we don't try to do so again and fall 489 | # in an infinite loop. This has already happened in practice. 490 | _as_can_reexec=no; export _as_can_reexec 491 | # Don't try to exec as it changes $[0], causing all sort of problems 492 | # (the dirname of $[0] is not the place where we might find the 493 | # original and so on. Autoconf is especially sensitive to this). 494 | . "./$as_me.lineno" 495 | # Exit status is that of the last command. 496 | exit 497 | } 498 | 499 | ECHO_C= ECHO_N= ECHO_T= 500 | case `echo -n x` in #((((( 501 | -n*) 502 | case `echo 'xy\c'` in 503 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. 504 | xy) ECHO_C='\c';; 505 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 506 | ECHO_T=' ';; 507 | esac;; 508 | *) 509 | ECHO_N='-n';; 510 | esac 511 | 512 | rm -f conf$$ conf$$.exe conf$$.file 513 | if test -d conf$$.dir; then 514 | rm -f conf$$.dir/conf$$.file 515 | else 516 | rm -f conf$$.dir 517 | mkdir conf$$.dir 2>/dev/null 518 | fi 519 | if (echo >conf$$.file) 2>/dev/null; then 520 | if ln -s conf$$.file conf$$ 2>/dev/null; then 521 | as_ln_s='ln -s' 522 | # ... but there are two gotchas: 523 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 524 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 525 | # In both cases, we have to default to `cp -pR'. 526 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 527 | as_ln_s='cp -pR' 528 | elif ln conf$$.file conf$$ 2>/dev/null; then 529 | as_ln_s=ln 530 | else 531 | as_ln_s='cp -pR' 532 | fi 533 | else 534 | as_ln_s='cp -pR' 535 | fi 536 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 537 | rmdir conf$$.dir 2>/dev/null 538 | 539 | if mkdir -p . 2>/dev/null; then 540 | as_mkdir_p='mkdir -p "$as_dir"' 541 | else 542 | test -d ./-p && rmdir ./-p 543 | as_mkdir_p=false 544 | fi 545 | 546 | as_test_x='test -x' 547 | as_executable_p=as_fn_executable_p 548 | 549 | # Sed expression to map a string onto a valid CPP name. 550 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 551 | 552 | # Sed expression to map a string onto a valid variable name. 553 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 554 | 555 | 556 | test -n "$DJDIR" || exec 7<&0 &1 558 | 559 | # Name of the host. 560 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 561 | # so uname gets run too. 562 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 563 | 564 | # 565 | # Initializations. 566 | # 567 | ac_default_prefix=/usr/local 568 | ac_clean_files= 569 | ac_config_libobj_dir=. 570 | LIBOBJS= 571 | cross_compiling=no 572 | subdirs= 573 | MFLAGS= 574 | MAKEFLAGS= 575 | 576 | # Identity of this package. 577 | PACKAGE_NAME='riscv-llvm-toolchain' 578 | PACKAGE_TARNAME='riscv-llvm-toolchain' 579 | PACKAGE_VERSION='1.0' 580 | PACKAGE_STRING='riscv-llvm-toolchain 1.0' 581 | PACKAGE_BUGREPORT='' 582 | PACKAGE_URL='' 583 | 584 | enable_option_checking=no 585 | ac_subst_vars='LTLIBOBJS 586 | LIBOBJS 587 | subdirs 588 | BUILD_CLANG_ONLY 589 | WITH_BUILD_TYPE 590 | WITH_ARCH 591 | CMAKE 592 | target_alias 593 | host_alias 594 | build_alias 595 | LIBS 596 | ECHO_T 597 | ECHO_N 598 | ECHO_C 599 | DEFS 600 | mandir 601 | localedir 602 | libdir 603 | psdir 604 | pdfdir 605 | dvidir 606 | htmldir 607 | infodir 608 | docdir 609 | oldincludedir 610 | includedir 611 | runstatedir 612 | localstatedir 613 | sharedstatedir 614 | sysconfdir 615 | datadir 616 | datarootdir 617 | libexecdir 618 | sbindir 619 | bindir 620 | program_transform_name 621 | prefix 622 | exec_prefix 623 | PACKAGE_URL 624 | PACKAGE_BUGREPORT 625 | PACKAGE_STRING 626 | PACKAGE_VERSION 627 | PACKAGE_TARNAME 628 | PACKAGE_NAME 629 | PATH_SEPARATOR 630 | SHELL' 631 | ac_subst_files='' 632 | ac_user_opts=' 633 | enable_option_checking 634 | with_arch 635 | with_build_type 636 | enable_clang_only 637 | ' 638 | ac_precious_vars='build_alias 639 | host_alias 640 | target_alias' 641 | ac_subdirs_all='riscv-gnu-toolchain' 642 | 643 | # Initialize some variables set by options. 644 | ac_init_help= 645 | ac_init_version=false 646 | ac_unrecognized_opts= 647 | ac_unrecognized_sep= 648 | # The variables have the same names as the options, with 649 | # dashes changed to underlines. 650 | cache_file=/dev/null 651 | exec_prefix=NONE 652 | no_create= 653 | no_recursion= 654 | prefix=NONE 655 | program_prefix=NONE 656 | program_suffix=NONE 657 | program_transform_name=s,x,x, 658 | silent= 659 | site= 660 | srcdir= 661 | verbose= 662 | x_includes=NONE 663 | x_libraries=NONE 664 | 665 | # Installation directory options. 666 | # These are left unexpanded so users can "make install exec_prefix=/foo" 667 | # and all the variables that are supposed to be based on exec_prefix 668 | # by default will actually change. 669 | # Use braces instead of parens because sh, perl, etc. also accept them. 670 | # (The list follows the same order as the GNU Coding Standards.) 671 | bindir='${exec_prefix}/bin' 672 | sbindir='${exec_prefix}/sbin' 673 | libexecdir='${exec_prefix}/libexec' 674 | datarootdir='${prefix}/share' 675 | datadir='${datarootdir}' 676 | sysconfdir='${prefix}/etc' 677 | sharedstatedir='${prefix}/com' 678 | localstatedir='${prefix}/var' 679 | runstatedir='${localstatedir}/run' 680 | includedir='${prefix}/include' 681 | oldincludedir='/usr/include' 682 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 683 | infodir='${datarootdir}/info' 684 | htmldir='${docdir}' 685 | dvidir='${docdir}' 686 | pdfdir='${docdir}' 687 | psdir='${docdir}' 688 | libdir='${exec_prefix}/lib' 689 | localedir='${datarootdir}/locale' 690 | mandir='${datarootdir}/man' 691 | 692 | ac_prev= 693 | ac_dashdash= 694 | for ac_option 695 | do 696 | # If the previous option needs an argument, assign it. 697 | if test -n "$ac_prev"; then 698 | eval $ac_prev=\$ac_option 699 | ac_prev= 700 | continue 701 | fi 702 | 703 | case $ac_option in 704 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 705 | *=) ac_optarg= ;; 706 | *) ac_optarg=yes ;; 707 | esac 708 | 709 | # Accept the important Cygnus configure options, so we can diagnose typos. 710 | 711 | case $ac_dashdash$ac_option in 712 | --) 713 | ac_dashdash=yes ;; 714 | 715 | -bindir | --bindir | --bindi | --bind | --bin | --bi) 716 | ac_prev=bindir ;; 717 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 718 | bindir=$ac_optarg ;; 719 | 720 | -build | --build | --buil | --bui | --bu) 721 | ac_prev=build_alias ;; 722 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) 723 | build_alias=$ac_optarg ;; 724 | 725 | -cache-file | --cache-file | --cache-fil | --cache-fi \ 726 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 727 | ac_prev=cache_file ;; 728 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 729 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 730 | cache_file=$ac_optarg ;; 731 | 732 | --config-cache | -C) 733 | cache_file=config.cache ;; 734 | 735 | -datadir | --datadir | --datadi | --datad) 736 | ac_prev=datadir ;; 737 | -datadir=* | --datadir=* | --datadi=* | --datad=*) 738 | datadir=$ac_optarg ;; 739 | 740 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ 741 | | --dataroo | --dataro | --datar) 742 | ac_prev=datarootdir ;; 743 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ 744 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) 745 | datarootdir=$ac_optarg ;; 746 | 747 | -disable-* | --disable-*) 748 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 749 | # Reject names that are not valid shell variable names. 750 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 751 | as_fn_error $? "invalid feature name: $ac_useropt" 752 | ac_useropt_orig=$ac_useropt 753 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 754 | case $ac_user_opts in 755 | *" 756 | "enable_$ac_useropt" 757 | "*) ;; 758 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" 759 | ac_unrecognized_sep=', ';; 760 | esac 761 | eval enable_$ac_useropt=no ;; 762 | 763 | -docdir | --docdir | --docdi | --doc | --do) 764 | ac_prev=docdir ;; 765 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) 766 | docdir=$ac_optarg ;; 767 | 768 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) 769 | ac_prev=dvidir ;; 770 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) 771 | dvidir=$ac_optarg ;; 772 | 773 | -enable-* | --enable-*) 774 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 775 | # Reject names that are not valid shell variable names. 776 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 777 | as_fn_error $? "invalid feature name: $ac_useropt" 778 | ac_useropt_orig=$ac_useropt 779 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 780 | case $ac_user_opts in 781 | *" 782 | "enable_$ac_useropt" 783 | "*) ;; 784 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" 785 | ac_unrecognized_sep=', ';; 786 | esac 787 | eval enable_$ac_useropt=\$ac_optarg ;; 788 | 789 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 790 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 791 | | --exec | --exe | --ex) 792 | ac_prev=exec_prefix ;; 793 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 794 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 795 | | --exec=* | --exe=* | --ex=*) 796 | exec_prefix=$ac_optarg ;; 797 | 798 | -gas | --gas | --ga | --g) 799 | # Obsolete; use --with-gas. 800 | with_gas=yes ;; 801 | 802 | -help | --help | --hel | --he | -h) 803 | ac_init_help=long ;; 804 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) 805 | ac_init_help=recursive ;; 806 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) 807 | ac_init_help=short ;; 808 | 809 | -host | --host | --hos | --ho) 810 | ac_prev=host_alias ;; 811 | -host=* | --host=* | --hos=* | --ho=*) 812 | host_alias=$ac_optarg ;; 813 | 814 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) 815 | ac_prev=htmldir ;; 816 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ 817 | | --ht=*) 818 | htmldir=$ac_optarg ;; 819 | 820 | -includedir | --includedir | --includedi | --included | --include \ 821 | | --includ | --inclu | --incl | --inc) 822 | ac_prev=includedir ;; 823 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 824 | | --includ=* | --inclu=* | --incl=* | --inc=*) 825 | includedir=$ac_optarg ;; 826 | 827 | -infodir | --infodir | --infodi | --infod | --info | --inf) 828 | ac_prev=infodir ;; 829 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 830 | infodir=$ac_optarg ;; 831 | 832 | -libdir | --libdir | --libdi | --libd) 833 | ac_prev=libdir ;; 834 | -libdir=* | --libdir=* | --libdi=* | --libd=*) 835 | libdir=$ac_optarg ;; 836 | 837 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 838 | | --libexe | --libex | --libe) 839 | ac_prev=libexecdir ;; 840 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 841 | | --libexe=* | --libex=* | --libe=*) 842 | libexecdir=$ac_optarg ;; 843 | 844 | -localedir | --localedir | --localedi | --localed | --locale) 845 | ac_prev=localedir ;; 846 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) 847 | localedir=$ac_optarg ;; 848 | 849 | -localstatedir | --localstatedir | --localstatedi | --localstated \ 850 | | --localstate | --localstat | --localsta | --localst | --locals) 851 | ac_prev=localstatedir ;; 852 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 853 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 854 | localstatedir=$ac_optarg ;; 855 | 856 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 857 | ac_prev=mandir ;; 858 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 859 | mandir=$ac_optarg ;; 860 | 861 | -nfp | --nfp | --nf) 862 | # Obsolete; use --without-fp. 863 | with_fp=no ;; 864 | 865 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 866 | | --no-cr | --no-c | -n) 867 | no_create=yes ;; 868 | 869 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 870 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 871 | no_recursion=yes ;; 872 | 873 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 874 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 875 | | --oldin | --oldi | --old | --ol | --o) 876 | ac_prev=oldincludedir ;; 877 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 878 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 879 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 880 | oldincludedir=$ac_optarg ;; 881 | 882 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 883 | ac_prev=prefix ;; 884 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 885 | prefix=$ac_optarg ;; 886 | 887 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ 888 | | --program-pre | --program-pr | --program-p) 889 | ac_prev=program_prefix ;; 890 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ 891 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 892 | program_prefix=$ac_optarg ;; 893 | 894 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ 895 | | --program-suf | --program-su | --program-s) 896 | ac_prev=program_suffix ;; 897 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ 898 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 899 | program_suffix=$ac_optarg ;; 900 | 901 | -program-transform-name | --program-transform-name \ 902 | | --program-transform-nam | --program-transform-na \ 903 | | --program-transform-n | --program-transform- \ 904 | | --program-transform | --program-transfor \ 905 | | --program-transfo | --program-transf \ 906 | | --program-trans | --program-tran \ 907 | | --progr-tra | --program-tr | --program-t) 908 | ac_prev=program_transform_name ;; 909 | -program-transform-name=* | --program-transform-name=* \ 910 | | --program-transform-nam=* | --program-transform-na=* \ 911 | | --program-transform-n=* | --program-transform-=* \ 912 | | --program-transform=* | --program-transfor=* \ 913 | | --program-transfo=* | --program-transf=* \ 914 | | --program-trans=* | --program-tran=* \ 915 | | --progr-tra=* | --program-tr=* | --program-t=*) 916 | program_transform_name=$ac_optarg ;; 917 | 918 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) 919 | ac_prev=pdfdir ;; 920 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) 921 | pdfdir=$ac_optarg ;; 922 | 923 | -psdir | --psdir | --psdi | --psd | --ps) 924 | ac_prev=psdir ;; 925 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) 926 | psdir=$ac_optarg ;; 927 | 928 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 929 | | -silent | --silent | --silen | --sile | --sil) 930 | silent=yes ;; 931 | 932 | -runstatedir | --runstatedir | --runstatedi | --runstated \ 933 | | --runstate | --runstat | --runsta | --runst | --runs \ 934 | | --run | --ru | --r) 935 | ac_prev=runstatedir ;; 936 | -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ 937 | | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ 938 | | --run=* | --ru=* | --r=*) 939 | runstatedir=$ac_optarg ;; 940 | 941 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 942 | ac_prev=sbindir ;; 943 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 944 | | --sbi=* | --sb=*) 945 | sbindir=$ac_optarg ;; 946 | 947 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ 948 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 949 | | --sharedst | --shareds | --shared | --share | --shar \ 950 | | --sha | --sh) 951 | ac_prev=sharedstatedir ;; 952 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 953 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 954 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 955 | | --sha=* | --sh=*) 956 | sharedstatedir=$ac_optarg ;; 957 | 958 | -site | --site | --sit) 959 | ac_prev=site ;; 960 | -site=* | --site=* | --sit=*) 961 | site=$ac_optarg ;; 962 | 963 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 964 | ac_prev=srcdir ;; 965 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 966 | srcdir=$ac_optarg ;; 967 | 968 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 969 | | --syscon | --sysco | --sysc | --sys | --sy) 970 | ac_prev=sysconfdir ;; 971 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 972 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 973 | sysconfdir=$ac_optarg ;; 974 | 975 | -target | --target | --targe | --targ | --tar | --ta | --t) 976 | ac_prev=target_alias ;; 977 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 978 | target_alias=$ac_optarg ;; 979 | 980 | -v | -verbose | --verbose | --verbos | --verbo | --verb) 981 | verbose=yes ;; 982 | 983 | -version | --version | --versio | --versi | --vers | -V) 984 | ac_init_version=: ;; 985 | 986 | -with-* | --with-*) 987 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 988 | # Reject names that are not valid shell variable names. 989 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 990 | as_fn_error $? "invalid package name: $ac_useropt" 991 | ac_useropt_orig=$ac_useropt 992 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 993 | case $ac_user_opts in 994 | *" 995 | "with_$ac_useropt" 996 | "*) ;; 997 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" 998 | ac_unrecognized_sep=', ';; 999 | esac 1000 | eval with_$ac_useropt=\$ac_optarg ;; 1001 | 1002 | -without-* | --without-*) 1003 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 1004 | # Reject names that are not valid shell variable names. 1005 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1006 | as_fn_error $? "invalid package name: $ac_useropt" 1007 | ac_useropt_orig=$ac_useropt 1008 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1009 | case $ac_user_opts in 1010 | *" 1011 | "with_$ac_useropt" 1012 | "*) ;; 1013 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" 1014 | ac_unrecognized_sep=', ';; 1015 | esac 1016 | eval with_$ac_useropt=no ;; 1017 | 1018 | --x) 1019 | # Obsolete; use --with-x. 1020 | with_x=yes ;; 1021 | 1022 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 1023 | | --x-incl | --x-inc | --x-in | --x-i) 1024 | ac_prev=x_includes ;; 1025 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 1026 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 1027 | x_includes=$ac_optarg ;; 1028 | 1029 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ 1030 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 1031 | ac_prev=x_libraries ;; 1032 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 1033 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 1034 | x_libraries=$ac_optarg ;; 1035 | 1036 | -*) as_fn_error $? "unrecognized option: \`$ac_option' 1037 | Try \`$0 --help' for more information" 1038 | ;; 1039 | 1040 | *=*) 1041 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 1042 | # Reject names that are not valid shell variable names. 1043 | case $ac_envvar in #( 1044 | '' | [0-9]* | *[!_$as_cr_alnum]* ) 1045 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 1046 | esac 1047 | eval $ac_envvar=\$ac_optarg 1048 | export $ac_envvar ;; 1049 | 1050 | *) 1051 | # FIXME: should be removed in autoconf 3.0. 1052 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 1053 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 1054 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 1055 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" 1056 | ;; 1057 | 1058 | esac 1059 | done 1060 | 1061 | if test -n "$ac_prev"; then 1062 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1063 | as_fn_error $? "missing argument to $ac_option" 1064 | fi 1065 | 1066 | if test -n "$ac_unrecognized_opts"; then 1067 | case $enable_option_checking in 1068 | no) ;; 1069 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 1070 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 1071 | esac 1072 | fi 1073 | 1074 | # Check all directory arguments for consistency. 1075 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1076 | datadir sysconfdir sharedstatedir localstatedir includedir \ 1077 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1078 | libdir localedir mandir runstatedir 1079 | do 1080 | eval ac_val=\$$ac_var 1081 | # Remove trailing slashes. 1082 | case $ac_val in 1083 | */ ) 1084 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` 1085 | eval $ac_var=\$ac_val;; 1086 | esac 1087 | # Be sure to have absolute directory names. 1088 | case $ac_val in 1089 | [\\/$]* | ?:[\\/]* ) continue;; 1090 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1091 | esac 1092 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 1093 | done 1094 | 1095 | # There might be people who depend on the old broken behavior: `$host' 1096 | # used to hold the argument of --host etc. 1097 | # FIXME: To remove some day. 1098 | build=$build_alias 1099 | host=$host_alias 1100 | target=$target_alias 1101 | 1102 | # FIXME: To remove some day. 1103 | if test "x$host_alias" != x; then 1104 | if test "x$build_alias" = x; then 1105 | cross_compiling=maybe 1106 | elif test "x$build_alias" != "x$host_alias"; then 1107 | cross_compiling=yes 1108 | fi 1109 | fi 1110 | 1111 | ac_tool_prefix= 1112 | test -n "$host_alias" && ac_tool_prefix=$host_alias- 1113 | 1114 | test "$silent" = yes && exec 6>/dev/null 1115 | 1116 | 1117 | ac_pwd=`pwd` && test -n "$ac_pwd" && 1118 | ac_ls_di=`ls -di .` && 1119 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1120 | as_fn_error $? "working directory cannot be determined" 1121 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1122 | as_fn_error $? "pwd does not report name of working directory" 1123 | 1124 | 1125 | # Find the source files, if location was not specified. 1126 | if test -z "$srcdir"; then 1127 | ac_srcdir_defaulted=yes 1128 | # Try the directory containing this script, then the parent directory. 1129 | ac_confdir=`$as_dirname -- "$as_myself" || 1130 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1131 | X"$as_myself" : 'X\(//\)[^/]' \| \ 1132 | X"$as_myself" : 'X\(//\)$' \| \ 1133 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || 1134 | $as_echo X"$as_myself" | 1135 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1136 | s//\1/ 1137 | q 1138 | } 1139 | /^X\(\/\/\)[^/].*/{ 1140 | s//\1/ 1141 | q 1142 | } 1143 | /^X\(\/\/\)$/{ 1144 | s//\1/ 1145 | q 1146 | } 1147 | /^X\(\/\).*/{ 1148 | s//\1/ 1149 | q 1150 | } 1151 | s/.*/./; q'` 1152 | srcdir=$ac_confdir 1153 | if test ! -r "$srcdir/$ac_unique_file"; then 1154 | srcdir=.. 1155 | fi 1156 | else 1157 | ac_srcdir_defaulted=no 1158 | fi 1159 | if test ! -r "$srcdir/$ac_unique_file"; then 1160 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1161 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 1162 | fi 1163 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1164 | ac_abs_confdir=`( 1165 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 1166 | pwd)` 1167 | # When building in place, set srcdir=. 1168 | if test "$ac_abs_confdir" = "$ac_pwd"; then 1169 | srcdir=. 1170 | fi 1171 | # Remove unnecessary trailing slashes from srcdir. 1172 | # Double slashes in file names in object file debugging info 1173 | # mess up M-x gdb in Emacs. 1174 | case $srcdir in 1175 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; 1176 | esac 1177 | for ac_var in $ac_precious_vars; do 1178 | eval ac_env_${ac_var}_set=\${${ac_var}+set} 1179 | eval ac_env_${ac_var}_value=\$${ac_var} 1180 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} 1181 | eval ac_cv_env_${ac_var}_value=\$${ac_var} 1182 | done 1183 | 1184 | # 1185 | # Report the --help message. 1186 | # 1187 | if test "$ac_init_help" = "long"; then 1188 | # Omit some internal or obsolete options to make the list less imposing. 1189 | # This message is too long to be a string in the A/UX 3.1 sh. 1190 | cat <<_ACEOF 1191 | \`configure' configures riscv-llvm-toolchain 1.0 to adapt to many kinds of systems. 1192 | 1193 | Usage: $0 [OPTION]... [VAR=VALUE]... 1194 | 1195 | To assign environment variables (e.g., CC, CFLAGS...), specify them as 1196 | VAR=VALUE. See below for descriptions of some of the useful variables. 1197 | 1198 | Defaults for the options are specified in brackets. 1199 | 1200 | Configuration: 1201 | -h, --help display this help and exit 1202 | --help=short display options specific to this package 1203 | --help=recursive display the short help of all the included packages 1204 | -V, --version display version information and exit 1205 | -q, --quiet, --silent do not print \`checking ...' messages 1206 | --cache-file=FILE cache test results in FILE [disabled] 1207 | -C, --config-cache alias for \`--cache-file=config.cache' 1208 | -n, --no-create do not create output files 1209 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] 1210 | 1211 | Installation directories: 1212 | --prefix=PREFIX install architecture-independent files in PREFIX 1213 | [$ac_default_prefix] 1214 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 1215 | [PREFIX] 1216 | 1217 | By default, \`make install' will install all the files in 1218 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 1219 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', 1220 | for instance \`--prefix=\$HOME'. 1221 | 1222 | For better control, use the options below. 1223 | 1224 | Fine tuning of the installation directories: 1225 | --bindir=DIR user executables [EPREFIX/bin] 1226 | --sbindir=DIR system admin executables [EPREFIX/sbin] 1227 | --libexecdir=DIR program executables [EPREFIX/libexec] 1228 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1229 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1230 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1231 | --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] 1232 | --libdir=DIR object code libraries [EPREFIX/lib] 1233 | --includedir=DIR C header files [PREFIX/include] 1234 | --oldincludedir=DIR C header files for non-gcc [/usr/include] 1235 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1236 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1237 | --infodir=DIR info documentation [DATAROOTDIR/info] 1238 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1239 | --mandir=DIR man documentation [DATAROOTDIR/man] 1240 | --docdir=DIR documentation root 1241 | [DATAROOTDIR/doc/riscv-llvm-toolchain] 1242 | --htmldir=DIR html documentation [DOCDIR] 1243 | --dvidir=DIR dvi documentation [DOCDIR] 1244 | --pdfdir=DIR pdf documentation [DOCDIR] 1245 | --psdir=DIR ps documentation [DOCDIR] 1246 | _ACEOF 1247 | 1248 | cat <<\_ACEOF 1249 | _ACEOF 1250 | fi 1251 | 1252 | if test -n "$ac_init_help"; then 1253 | case $ac_init_help in 1254 | short | recursive ) echo "Configuration of riscv-llvm-toolchain 1.0:";; 1255 | esac 1256 | cat <<\_ACEOF 1257 | 1258 | Optional Features: 1259 | --disable-option-checking ignore unrecognized --enable/--with options 1260 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 1261 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 1262 | --enable-clang-only=no Install clang only, and do not install another llvm 1263 | tool and libraries 1264 | 1265 | Optional Packages: 1266 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 1267 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1268 | --with-arch=rv64ima Sets the base RISC-V ISA, defaults to rv64ima 1269 | --with-build-type=Release 1270 | Set the build type for LLVM, defaults to Release, 1271 | Possible values are Release, Debug, RelWithDebInfo 1272 | and MinSizeRel. 1273 | 1274 | Report bugs to the package provider. 1275 | _ACEOF 1276 | ac_status=$? 1277 | fi 1278 | 1279 | if test "$ac_init_help" = "recursive"; then 1280 | # If there are subdirs, report their specific --help. 1281 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1282 | test -d "$ac_dir" || 1283 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || 1284 | continue 1285 | ac_builddir=. 1286 | 1287 | case "$ac_dir" in 1288 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 1289 | *) 1290 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 1291 | # A ".." for each directory in $ac_dir_suffix. 1292 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 1293 | case $ac_top_builddir_sub in 1294 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 1295 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 1296 | esac ;; 1297 | esac 1298 | ac_abs_top_builddir=$ac_pwd 1299 | ac_abs_builddir=$ac_pwd$ac_dir_suffix 1300 | # for backward compatibility: 1301 | ac_top_builddir=$ac_top_build_prefix 1302 | 1303 | case $srcdir in 1304 | .) # We are building in place. 1305 | ac_srcdir=. 1306 | ac_top_srcdir=$ac_top_builddir_sub 1307 | ac_abs_top_srcdir=$ac_pwd ;; 1308 | [\\/]* | ?:[\\/]* ) # Absolute name. 1309 | ac_srcdir=$srcdir$ac_dir_suffix; 1310 | ac_top_srcdir=$srcdir 1311 | ac_abs_top_srcdir=$srcdir ;; 1312 | *) # Relative name. 1313 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 1314 | ac_top_srcdir=$ac_top_build_prefix$srcdir 1315 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 1316 | esac 1317 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 1318 | 1319 | cd "$ac_dir" || { ac_status=$?; continue; } 1320 | # Check for guested configure. 1321 | if test -f "$ac_srcdir/configure.gnu"; then 1322 | echo && 1323 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive 1324 | elif test -f "$ac_srcdir/configure"; then 1325 | echo && 1326 | $SHELL "$ac_srcdir/configure" --help=recursive 1327 | else 1328 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1329 | fi || ac_status=$? 1330 | cd "$ac_pwd" || { ac_status=$?; break; } 1331 | done 1332 | fi 1333 | 1334 | test -n "$ac_init_help" && exit $ac_status 1335 | if $ac_init_version; then 1336 | cat <<\_ACEOF 1337 | riscv-llvm-toolchain configure 1.0 1338 | generated by GNU Autoconf 2.69 1339 | 1340 | Copyright (C) 2012 Free Software Foundation, Inc. 1341 | This configure script is free software; the Free Software Foundation 1342 | gives unlimited permission to copy, distribute and modify it. 1343 | _ACEOF 1344 | exit 1345 | fi 1346 | 1347 | ## ------------------------ ## 1348 | ## Autoconf initialization. ## 1349 | ## ------------------------ ## 1350 | cat >config.log <<_ACEOF 1351 | This file contains any messages produced by compilers while 1352 | running configure, to aid debugging if configure makes a mistake. 1353 | 1354 | It was created by riscv-llvm-toolchain $as_me 1.0, which was 1355 | generated by GNU Autoconf 2.69. Invocation command line was 1356 | 1357 | $ $0 $@ 1358 | 1359 | _ACEOF 1360 | exec 5>>config.log 1361 | { 1362 | cat <<_ASUNAME 1363 | ## --------- ## 1364 | ## Platform. ## 1365 | ## --------- ## 1366 | 1367 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 1368 | uname -m = `(uname -m) 2>/dev/null || echo unknown` 1369 | uname -r = `(uname -r) 2>/dev/null || echo unknown` 1370 | uname -s = `(uname -s) 2>/dev/null || echo unknown` 1371 | uname -v = `(uname -v) 2>/dev/null || echo unknown` 1372 | 1373 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 1374 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 1375 | 1376 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 1377 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 1378 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 1379 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 1380 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 1381 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 1382 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 1383 | 1384 | _ASUNAME 1385 | 1386 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1387 | for as_dir in $PATH 1388 | do 1389 | IFS=$as_save_IFS 1390 | test -z "$as_dir" && as_dir=. 1391 | $as_echo "PATH: $as_dir" 1392 | done 1393 | IFS=$as_save_IFS 1394 | 1395 | } >&5 1396 | 1397 | cat >&5 <<_ACEOF 1398 | 1399 | 1400 | ## ----------- ## 1401 | ## Core tests. ## 1402 | ## ----------- ## 1403 | 1404 | _ACEOF 1405 | 1406 | 1407 | # Keep a trace of the command line. 1408 | # Strip out --no-create and --no-recursion so they do not pile up. 1409 | # Strip out --silent because we don't want to record it for future runs. 1410 | # Also quote any args containing shell meta-characters. 1411 | # Make two passes to allow for proper duplicate-argument suppression. 1412 | ac_configure_args= 1413 | ac_configure_args0= 1414 | ac_configure_args1= 1415 | ac_must_keep_next=false 1416 | for ac_pass in 1 2 1417 | do 1418 | for ac_arg 1419 | do 1420 | case $ac_arg in 1421 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 1422 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 1423 | | -silent | --silent | --silen | --sile | --sil) 1424 | continue ;; 1425 | *\'*) 1426 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 1427 | esac 1428 | case $ac_pass in 1429 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 1430 | 2) 1431 | as_fn_append ac_configure_args1 " '$ac_arg'" 1432 | if test $ac_must_keep_next = true; then 1433 | ac_must_keep_next=false # Got value, back to normal. 1434 | else 1435 | case $ac_arg in 1436 | *=* | --config-cache | -C | -disable-* | --disable-* \ 1437 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 1438 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 1439 | | -with-* | --with-* | -without-* | --without-* | --x) 1440 | case "$ac_configure_args0 " in 1441 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 1442 | esac 1443 | ;; 1444 | -* ) ac_must_keep_next=true ;; 1445 | esac 1446 | fi 1447 | as_fn_append ac_configure_args " '$ac_arg'" 1448 | ;; 1449 | esac 1450 | done 1451 | done 1452 | { ac_configure_args0=; unset ac_configure_args0;} 1453 | { ac_configure_args1=; unset ac_configure_args1;} 1454 | 1455 | # When interrupted or exit'd, cleanup temporary files, and complete 1456 | # config.log. We remove comments because anyway the quotes in there 1457 | # would cause problems or look ugly. 1458 | # WARNING: Use '\'' to represent an apostrophe within the trap. 1459 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 1460 | trap 'exit_status=$? 1461 | # Save into config.log some information that might help in debugging. 1462 | { 1463 | echo 1464 | 1465 | $as_echo "## ---------------- ## 1466 | ## Cache variables. ## 1467 | ## ---------------- ##" 1468 | echo 1469 | # The following way of writing the cache mishandles newlines in values, 1470 | ( 1471 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 1472 | eval ac_val=\$$ac_var 1473 | case $ac_val in #( 1474 | *${as_nl}*) 1475 | case $ac_var in #( 1476 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 1477 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 1478 | esac 1479 | case $ac_var in #( 1480 | _ | IFS | as_nl) ;; #( 1481 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 1482 | *) { eval $ac_var=; unset $ac_var;} ;; 1483 | esac ;; 1484 | esac 1485 | done 1486 | (set) 2>&1 | 1487 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 1488 | *${as_nl}ac_space=\ *) 1489 | sed -n \ 1490 | "s/'\''/'\''\\\\'\'''\''/g; 1491 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 1492 | ;; #( 1493 | *) 1494 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 1495 | ;; 1496 | esac | 1497 | sort 1498 | ) 1499 | echo 1500 | 1501 | $as_echo "## ----------------- ## 1502 | ## Output variables. ## 1503 | ## ----------------- ##" 1504 | echo 1505 | for ac_var in $ac_subst_vars 1506 | do 1507 | eval ac_val=\$$ac_var 1508 | case $ac_val in 1509 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 1510 | esac 1511 | $as_echo "$ac_var='\''$ac_val'\''" 1512 | done | sort 1513 | echo 1514 | 1515 | if test -n "$ac_subst_files"; then 1516 | $as_echo "## ------------------- ## 1517 | ## File substitutions. ## 1518 | ## ------------------- ##" 1519 | echo 1520 | for ac_var in $ac_subst_files 1521 | do 1522 | eval ac_val=\$$ac_var 1523 | case $ac_val in 1524 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 1525 | esac 1526 | $as_echo "$ac_var='\''$ac_val'\''" 1527 | done | sort 1528 | echo 1529 | fi 1530 | 1531 | if test -s confdefs.h; then 1532 | $as_echo "## ----------- ## 1533 | ## confdefs.h. ## 1534 | ## ----------- ##" 1535 | echo 1536 | cat confdefs.h 1537 | echo 1538 | fi 1539 | test "$ac_signal" != 0 && 1540 | $as_echo "$as_me: caught signal $ac_signal" 1541 | $as_echo "$as_me: exit $exit_status" 1542 | } >&5 1543 | rm -f core *.core core.conftest.* && 1544 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 1545 | exit $exit_status 1546 | ' 0 1547 | for ac_signal in 1 2 13 15; do 1548 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal 1549 | done 1550 | ac_signal=0 1551 | 1552 | # confdefs.h avoids OS command line length limits that DEFS can exceed. 1553 | rm -f -r conftest* confdefs.h 1554 | 1555 | $as_echo "/* confdefs.h */" > confdefs.h 1556 | 1557 | # Predefined preprocessor variables. 1558 | 1559 | cat >>confdefs.h <<_ACEOF 1560 | #define PACKAGE_NAME "$PACKAGE_NAME" 1561 | _ACEOF 1562 | 1563 | cat >>confdefs.h <<_ACEOF 1564 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" 1565 | _ACEOF 1566 | 1567 | cat >>confdefs.h <<_ACEOF 1568 | #define PACKAGE_VERSION "$PACKAGE_VERSION" 1569 | _ACEOF 1570 | 1571 | cat >>confdefs.h <<_ACEOF 1572 | #define PACKAGE_STRING "$PACKAGE_STRING" 1573 | _ACEOF 1574 | 1575 | cat >>confdefs.h <<_ACEOF 1576 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" 1577 | _ACEOF 1578 | 1579 | cat >>confdefs.h <<_ACEOF 1580 | #define PACKAGE_URL "$PACKAGE_URL" 1581 | _ACEOF 1582 | 1583 | 1584 | # Let the site file select an alternate cache file if it wants to. 1585 | # Prefer an explicitly selected file to automatically selected ones. 1586 | ac_site_file1=NONE 1587 | ac_site_file2=NONE 1588 | if test -n "$CONFIG_SITE"; then 1589 | # We do not want a PATH search for config.site. 1590 | case $CONFIG_SITE in #(( 1591 | -*) ac_site_file1=./$CONFIG_SITE;; 1592 | */*) ac_site_file1=$CONFIG_SITE;; 1593 | *) ac_site_file1=./$CONFIG_SITE;; 1594 | esac 1595 | elif test "x$prefix" != xNONE; then 1596 | ac_site_file1=$prefix/share/config.site 1597 | ac_site_file2=$prefix/etc/config.site 1598 | else 1599 | ac_site_file1=$ac_default_prefix/share/config.site 1600 | ac_site_file2=$ac_default_prefix/etc/config.site 1601 | fi 1602 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" 1603 | do 1604 | test "x$ac_site_file" = xNONE && continue 1605 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then 1606 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 1607 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} 1608 | sed 's/^/| /' "$ac_site_file" >&5 1609 | . "$ac_site_file" \ 1610 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 1611 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 1612 | as_fn_error $? "failed to load site script $ac_site_file 1613 | See \`config.log' for more details" "$LINENO" 5; } 1614 | fi 1615 | done 1616 | 1617 | if test -r "$cache_file"; then 1618 | # Some versions of bash will fail to source /dev/null (special files 1619 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. 1620 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then 1621 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 1622 | $as_echo "$as_me: loading cache $cache_file" >&6;} 1623 | case $cache_file in 1624 | [\\/]* | ?:[\\/]* ) . "$cache_file";; 1625 | *) . "./$cache_file";; 1626 | esac 1627 | fi 1628 | else 1629 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 1630 | $as_echo "$as_me: creating cache $cache_file" >&6;} 1631 | >$cache_file 1632 | fi 1633 | 1634 | # Check that the precious variables saved in the cache have kept the same 1635 | # value. 1636 | ac_cache_corrupted=false 1637 | for ac_var in $ac_precious_vars; do 1638 | eval ac_old_set=\$ac_cv_env_${ac_var}_set 1639 | eval ac_new_set=\$ac_env_${ac_var}_set 1640 | eval ac_old_val=\$ac_cv_env_${ac_var}_value 1641 | eval ac_new_val=\$ac_env_${ac_var}_value 1642 | case $ac_old_set,$ac_new_set in 1643 | set,) 1644 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 1645 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 1646 | ac_cache_corrupted=: ;; 1647 | ,set) 1648 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 1649 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 1650 | ac_cache_corrupted=: ;; 1651 | ,);; 1652 | *) 1653 | if test "x$ac_old_val" != "x$ac_new_val"; then 1654 | # differences in whitespace do not lead to failure. 1655 | ac_old_val_w=`echo x $ac_old_val` 1656 | ac_new_val_w=`echo x $ac_new_val` 1657 | if test "$ac_old_val_w" != "$ac_new_val_w"; then 1658 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 1659 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 1660 | ac_cache_corrupted=: 1661 | else 1662 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 1663 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} 1664 | eval $ac_var=\$ac_old_val 1665 | fi 1666 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 1667 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} 1668 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 1669 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} 1670 | fi;; 1671 | esac 1672 | # Pass precious variables to config.status. 1673 | if test "$ac_new_set" = set; then 1674 | case $ac_new_val in 1675 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 1676 | *) ac_arg=$ac_var=$ac_new_val ;; 1677 | esac 1678 | case " $ac_configure_args " in 1679 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 1680 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; 1681 | esac 1682 | fi 1683 | done 1684 | if $ac_cache_corrupted; then 1685 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 1686 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 1687 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 1688 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 1689 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 1690 | fi 1691 | ## -------------------- ## 1692 | ## Main body of script. ## 1693 | ## -------------------- ## 1694 | 1695 | ac_ext=c 1696 | ac_cpp='$CPP $CPPFLAGS' 1697 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 1698 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 1699 | ac_compiler_gnu=$ac_cv_c_compiler_gnu 1700 | 1701 | 1702 | 1703 | #AC_PROG_CC 1704 | 1705 | # Extract the first word of "cmake", so it can be a program name with args. 1706 | set dummy cmake; ac_word=$2 1707 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 1708 | $as_echo_n "checking for $ac_word... " >&6; } 1709 | if ${ac_cv_path_CMAKE+:} false; then : 1710 | $as_echo_n "(cached) " >&6 1711 | else 1712 | case $CMAKE in 1713 | [\\/]* | ?:[\\/]*) 1714 | ac_cv_path_CMAKE="$CMAKE" # Let the user override the test with a path. 1715 | ;; 1716 | *) 1717 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1718 | for as_dir in $PATH 1719 | do 1720 | IFS=$as_save_IFS 1721 | test -z "$as_dir" && as_dir=. 1722 | for ac_exec_ext in '' $ac_executable_extensions; do 1723 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1724 | ac_cv_path_CMAKE="$as_dir/$ac_word$ac_exec_ext" 1725 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 1726 | break 2 1727 | fi 1728 | done 1729 | done 1730 | IFS=$as_save_IFS 1731 | 1732 | test -z "$ac_cv_path_CMAKE" && ac_cv_path_CMAKE="as_fn_error $? "cmake not found" "$LINENO" 5" 1733 | ;; 1734 | esac 1735 | fi 1736 | CMAKE=$ac_cv_path_CMAKE 1737 | if test -n "$CMAKE"; then 1738 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMAKE" >&5 1739 | $as_echo "$CMAKE" >&6; } 1740 | else 1741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 1742 | $as_echo "no" >&6; } 1743 | fi 1744 | 1745 | 1746 | 1747 | 1748 | 1749 | 1750 | # Check whether --with-arch was given. 1751 | if test "${with_arch+set}" = set; then : 1752 | withval=$with_arch; case $with_arch in #( 1753 | *rv*g* | *rv*d* | *rv*f*) : 1754 | as_fn_error $? "Unsupport F/D yet" "$LINENO" 5 ;; #( 1755 | *rv32* | *rv64*) : 1756 | ;; #( 1757 | *) : 1758 | as_fn_error $? "Unknown arch" "$LINENO" 5 ;; 1759 | esac 1760 | else 1761 | with_arch=rv64ima 1762 | 1763 | fi 1764 | 1765 | 1766 | WITH_ARCH=$with_arch 1767 | 1768 | 1769 | 1770 | # Check whether --with-build_type was given. 1771 | if test "${with_build_type+set}" = set; then : 1772 | withval=$with_build_type; case $with_build_type in #( 1773 | Release | Debug | RelWithDebInfo | MinSizeRel) : 1774 | ;; #( 1775 | *) : 1776 | as_fn_error $? "Unknown build type, Possible values are Release, Debug, RelWithDebInfo and MinSizeRel." "$LINENO" 5 ;; 1777 | esac 1778 | else 1779 | with_build_type=Release 1780 | 1781 | fi 1782 | 1783 | 1784 | WITH_BUILD_TYPE=$with_build_type 1785 | 1786 | 1787 | # Check whether --enable-clang_only was given. 1788 | if test "${enable_clang_only+set}" = set; then : 1789 | enableval=$enable_clang_only; 1790 | fi 1791 | 1792 | 1793 | if test "x$enable_clang_only" != "xyes"; then : 1794 | BUILD_CLANG_ONLY=no 1795 | 1796 | else 1797 | BUILD_CLANG_ONLY=yes 1798 | 1799 | fi 1800 | 1801 | ac_configure_args="$ac_configure_args --with-arch=$with_arch" 1802 | ac_aux_dir= 1803 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do 1804 | if test -f "$ac_dir/install-sh"; then 1805 | ac_aux_dir=$ac_dir 1806 | ac_install_sh="$ac_aux_dir/install-sh -c" 1807 | break 1808 | elif test -f "$ac_dir/install.sh"; then 1809 | ac_aux_dir=$ac_dir 1810 | ac_install_sh="$ac_aux_dir/install.sh -c" 1811 | break 1812 | elif test -f "$ac_dir/shtool"; then 1813 | ac_aux_dir=$ac_dir 1814 | ac_install_sh="$ac_aux_dir/shtool install -c" 1815 | break 1816 | fi 1817 | done 1818 | if test -z "$ac_aux_dir"; then 1819 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 1820 | fi 1821 | 1822 | # These three variables are undocumented and unsupported, 1823 | # and are intended to be withdrawn in a future Autoconf release. 1824 | # They can cause serious problems if a builder's source tree is in a directory 1825 | # whose full name contains unusual characters. 1826 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. 1827 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. 1828 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 1829 | 1830 | 1831 | 1832 | 1833 | subdirs="$subdirs riscv-gnu-toolchain" 1834 | 1835 | 1836 | ac_config_files="$ac_config_files Makefile" 1837 | 1838 | 1839 | cat >confcache <<\_ACEOF 1840 | # This file is a shell script that caches the results of configure 1841 | # tests run on this system so they can be shared between configure 1842 | # scripts and configure runs, see configure's option --config-cache. 1843 | # It is not useful on other systems. If it contains results you don't 1844 | # want to keep, you may remove or edit it. 1845 | # 1846 | # config.status only pays attention to the cache file if you give it 1847 | # the --recheck option to rerun configure. 1848 | # 1849 | # `ac_cv_env_foo' variables (set or unset) will be overridden when 1850 | # loading this file, other *unset* `ac_cv_foo' will be assigned the 1851 | # following values. 1852 | 1853 | _ACEOF 1854 | 1855 | # The following way of writing the cache mishandles newlines in values, 1856 | # but we know of no workaround that is simple, portable, and efficient. 1857 | # So, we kill variables containing newlines. 1858 | # Ultrix sh set writes to stderr and can't be redirected directly, 1859 | # and sets the high bit in the cache file unless we assign to the vars. 1860 | ( 1861 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 1862 | eval ac_val=\$$ac_var 1863 | case $ac_val in #( 1864 | *${as_nl}*) 1865 | case $ac_var in #( 1866 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 1867 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 1868 | esac 1869 | case $ac_var in #( 1870 | _ | IFS | as_nl) ;; #( 1871 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 1872 | *) { eval $ac_var=; unset $ac_var;} ;; 1873 | esac ;; 1874 | esac 1875 | done 1876 | 1877 | (set) 2>&1 | 1878 | case $as_nl`(ac_space=' '; set) 2>&1` in #( 1879 | *${as_nl}ac_space=\ *) 1880 | # `set' does not quote correctly, so add quotes: double-quote 1881 | # substitution turns \\\\ into \\, and sed turns \\ into \. 1882 | sed -n \ 1883 | "s/'/'\\\\''/g; 1884 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 1885 | ;; #( 1886 | *) 1887 | # `set' quotes correctly as required by POSIX, so do not add quotes. 1888 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 1889 | ;; 1890 | esac | 1891 | sort 1892 | ) | 1893 | sed ' 1894 | /^ac_cv_env_/b end 1895 | t clear 1896 | :clear 1897 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ 1898 | t end 1899 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 1900 | :end' >>confcache 1901 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 1902 | if test -w "$cache_file"; then 1903 | if test "x$cache_file" != "x/dev/null"; then 1904 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 1905 | $as_echo "$as_me: updating cache $cache_file" >&6;} 1906 | if test ! -f "$cache_file" || test -h "$cache_file"; then 1907 | cat confcache >"$cache_file" 1908 | else 1909 | case $cache_file in #( 1910 | */* | ?:*) 1911 | mv -f confcache "$cache_file"$$ && 1912 | mv -f "$cache_file"$$ "$cache_file" ;; #( 1913 | *) 1914 | mv -f confcache "$cache_file" ;; 1915 | esac 1916 | fi 1917 | fi 1918 | else 1919 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 1920 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 1921 | fi 1922 | fi 1923 | rm -f confcache 1924 | 1925 | test "x$prefix" = xNONE && prefix=$ac_default_prefix 1926 | # Let make expand exec_prefix. 1927 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 1928 | 1929 | # Transform confdefs.h into DEFS. 1930 | # Protect against shell expansion while executing Makefile rules. 1931 | # Protect against Makefile macro expansion. 1932 | # 1933 | # If the first sed substitution is executed (which looks for macros that 1934 | # take arguments), then branch to the quote section. Otherwise, 1935 | # look for a macro that doesn't take arguments. 1936 | ac_script=' 1937 | :mline 1938 | /\\$/{ 1939 | N 1940 | s,\\\n,, 1941 | b mline 1942 | } 1943 | t clear 1944 | :clear 1945 | s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g 1946 | t quote 1947 | s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g 1948 | t quote 1949 | b any 1950 | :quote 1951 | s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g 1952 | s/\[/\\&/g 1953 | s/\]/\\&/g 1954 | s/\$/$$/g 1955 | H 1956 | :any 1957 | ${ 1958 | g 1959 | s/^\n// 1960 | s/\n/ /g 1961 | p 1962 | } 1963 | ' 1964 | DEFS=`sed -n "$ac_script" confdefs.h` 1965 | 1966 | 1967 | ac_libobjs= 1968 | ac_ltlibobjs= 1969 | U= 1970 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 1971 | # 1. Remove the extension, and $U if already installed. 1972 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 1973 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` 1974 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 1975 | # will be set to the directory where LIBOBJS objects are built. 1976 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" 1977 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' 1978 | done 1979 | LIBOBJS=$ac_libobjs 1980 | 1981 | LTLIBOBJS=$ac_ltlibobjs 1982 | 1983 | 1984 | 1985 | : "${CONFIG_STATUS=./config.status}" 1986 | ac_write_fail=0 1987 | ac_clean_files_save=$ac_clean_files 1988 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" 1989 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 1990 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} 1991 | as_write_fail=0 1992 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 1993 | #! $SHELL 1994 | # Generated by $as_me. 1995 | # Run this file to recreate the current configuration. 1996 | # Compiler output produced by configure, useful for debugging 1997 | # configure, is in config.log if it exists. 1998 | 1999 | debug=false 2000 | ac_cs_recheck=false 2001 | ac_cs_silent=false 2002 | 2003 | SHELL=\${CONFIG_SHELL-$SHELL} 2004 | export SHELL 2005 | _ASEOF 2006 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 2007 | ## -------------------- ## 2008 | ## M4sh Initialization. ## 2009 | ## -------------------- ## 2010 | 2011 | # Be more Bourne compatible 2012 | DUALCASE=1; export DUALCASE # for MKS sh 2013 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 2014 | emulate sh 2015 | NULLCMD=: 2016 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 2017 | # is contrary to our usage. Disable this feature. 2018 | alias -g '${1+"$@"}'='"$@"' 2019 | setopt NO_GLOB_SUBST 2020 | else 2021 | case `(set -o) 2>/dev/null` in #( 2022 | *posix*) : 2023 | set -o posix ;; #( 2024 | *) : 2025 | ;; 2026 | esac 2027 | fi 2028 | 2029 | 2030 | as_nl=' 2031 | ' 2032 | export as_nl 2033 | # Printing a long string crashes Solaris 7 /usr/bin/printf. 2034 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2035 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 2036 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 2037 | # Prefer a ksh shell builtin over an external printf program on Solaris, 2038 | # but without wasting forks for bash or zsh. 2039 | if test -z "$BASH_VERSION$ZSH_VERSION" \ 2040 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 2041 | as_echo='print -r --' 2042 | as_echo_n='print -rn --' 2043 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 2044 | as_echo='printf %s\n' 2045 | as_echo_n='printf %s' 2046 | else 2047 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 2048 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 2049 | as_echo_n='/usr/ucb/echo -n' 2050 | else 2051 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 2052 | as_echo_n_body='eval 2053 | arg=$1; 2054 | case $arg in #( 2055 | *"$as_nl"*) 2056 | expr "X$arg" : "X\\(.*\\)$as_nl"; 2057 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 2058 | esac; 2059 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 2060 | ' 2061 | export as_echo_n_body 2062 | as_echo_n='sh -c $as_echo_n_body as_echo' 2063 | fi 2064 | export as_echo_body 2065 | as_echo='sh -c $as_echo_body as_echo' 2066 | fi 2067 | 2068 | # The user is always right. 2069 | if test "${PATH_SEPARATOR+set}" != set; then 2070 | PATH_SEPARATOR=: 2071 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 2072 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 2073 | PATH_SEPARATOR=';' 2074 | } 2075 | fi 2076 | 2077 | 2078 | # IFS 2079 | # We need space, tab and new line, in precisely that order. Quoting is 2080 | # there to prevent editors from complaining about space-tab. 2081 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word 2082 | # splitting by setting IFS to empty value.) 2083 | IFS=" "" $as_nl" 2084 | 2085 | # Find who we are. Look in the path if we contain no directory separator. 2086 | as_myself= 2087 | case $0 in #(( 2088 | *[\\/]* ) as_myself=$0 ;; 2089 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2090 | for as_dir in $PATH 2091 | do 2092 | IFS=$as_save_IFS 2093 | test -z "$as_dir" && as_dir=. 2094 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 2095 | done 2096 | IFS=$as_save_IFS 2097 | 2098 | ;; 2099 | esac 2100 | # We did not find ourselves, most probably we were run as `sh COMMAND' 2101 | # in which case we are not to be found in the path. 2102 | if test "x$as_myself" = x; then 2103 | as_myself=$0 2104 | fi 2105 | if test ! -f "$as_myself"; then 2106 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 2107 | exit 1 2108 | fi 2109 | 2110 | # Unset variables that we do not need and which cause bugs (e.g. in 2111 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 2112 | # suppresses any "Segmentation fault" message there. '((' could 2113 | # trigger a bug in pdksh 5.2.14. 2114 | for as_var in BASH_ENV ENV MAIL MAILPATH 2115 | do eval test x\${$as_var+set} = xset \ 2116 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 2117 | done 2118 | PS1='$ ' 2119 | PS2='> ' 2120 | PS4='+ ' 2121 | 2122 | # NLS nuisances. 2123 | LC_ALL=C 2124 | export LC_ALL 2125 | LANGUAGE=C 2126 | export LANGUAGE 2127 | 2128 | # CDPATH. 2129 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 2130 | 2131 | 2132 | # as_fn_error STATUS ERROR [LINENO LOG_FD] 2133 | # ---------------------------------------- 2134 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 2135 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 2136 | # script with STATUS, using 1 if that was 0. 2137 | as_fn_error () 2138 | { 2139 | as_status=$1; test $as_status -eq 0 && as_status=1 2140 | if test "$4"; then 2141 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2142 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 2143 | fi 2144 | $as_echo "$as_me: error: $2" >&2 2145 | as_fn_exit $as_status 2146 | } # as_fn_error 2147 | 2148 | 2149 | # as_fn_set_status STATUS 2150 | # ----------------------- 2151 | # Set $? to STATUS, without forking. 2152 | as_fn_set_status () 2153 | { 2154 | return $1 2155 | } # as_fn_set_status 2156 | 2157 | # as_fn_exit STATUS 2158 | # ----------------- 2159 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 2160 | as_fn_exit () 2161 | { 2162 | set +e 2163 | as_fn_set_status $1 2164 | exit $1 2165 | } # as_fn_exit 2166 | 2167 | # as_fn_unset VAR 2168 | # --------------- 2169 | # Portably unset VAR. 2170 | as_fn_unset () 2171 | { 2172 | { eval $1=; unset $1;} 2173 | } 2174 | as_unset=as_fn_unset 2175 | # as_fn_append VAR VALUE 2176 | # ---------------------- 2177 | # Append the text in VALUE to the end of the definition contained in VAR. Take 2178 | # advantage of any shell optimizations that allow amortized linear growth over 2179 | # repeated appends, instead of the typical quadratic growth present in naive 2180 | # implementations. 2181 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 2182 | eval 'as_fn_append () 2183 | { 2184 | eval $1+=\$2 2185 | }' 2186 | else 2187 | as_fn_append () 2188 | { 2189 | eval $1=\$$1\$2 2190 | } 2191 | fi # as_fn_append 2192 | 2193 | # as_fn_arith ARG... 2194 | # ------------------ 2195 | # Perform arithmetic evaluation on the ARGs, and store the result in the 2196 | # global $as_val. Take advantage of shells that can avoid forks. The arguments 2197 | # must be portable across $(()) and expr. 2198 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 2199 | eval 'as_fn_arith () 2200 | { 2201 | as_val=$(( $* )) 2202 | }' 2203 | else 2204 | as_fn_arith () 2205 | { 2206 | as_val=`expr "$@" || test $? -eq 1` 2207 | } 2208 | fi # as_fn_arith 2209 | 2210 | 2211 | if expr a : '\(a\)' >/dev/null 2>&1 && 2212 | test "X`expr 00001 : '.*\(...\)'`" = X001; then 2213 | as_expr=expr 2214 | else 2215 | as_expr=false 2216 | fi 2217 | 2218 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 2219 | as_basename=basename 2220 | else 2221 | as_basename=false 2222 | fi 2223 | 2224 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 2225 | as_dirname=dirname 2226 | else 2227 | as_dirname=false 2228 | fi 2229 | 2230 | as_me=`$as_basename -- "$0" || 2231 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 2232 | X"$0" : 'X\(//\)$' \| \ 2233 | X"$0" : 'X\(/\)' \| . 2>/dev/null || 2234 | $as_echo X/"$0" | 2235 | sed '/^.*\/\([^/][^/]*\)\/*$/{ 2236 | s//\1/ 2237 | q 2238 | } 2239 | /^X\/\(\/\/\)$/{ 2240 | s//\1/ 2241 | q 2242 | } 2243 | /^X\/\(\/\).*/{ 2244 | s//\1/ 2245 | q 2246 | } 2247 | s/.*/./; q'` 2248 | 2249 | # Avoid depending upon Character Ranges. 2250 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' 2251 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 2252 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS 2253 | as_cr_digits='0123456789' 2254 | as_cr_alnum=$as_cr_Letters$as_cr_digits 2255 | 2256 | ECHO_C= ECHO_N= ECHO_T= 2257 | case `echo -n x` in #((((( 2258 | -n*) 2259 | case `echo 'xy\c'` in 2260 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. 2261 | xy) ECHO_C='\c';; 2262 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 2263 | ECHO_T=' ';; 2264 | esac;; 2265 | *) 2266 | ECHO_N='-n';; 2267 | esac 2268 | 2269 | rm -f conf$$ conf$$.exe conf$$.file 2270 | if test -d conf$$.dir; then 2271 | rm -f conf$$.dir/conf$$.file 2272 | else 2273 | rm -f conf$$.dir 2274 | mkdir conf$$.dir 2>/dev/null 2275 | fi 2276 | if (echo >conf$$.file) 2>/dev/null; then 2277 | if ln -s conf$$.file conf$$ 2>/dev/null; then 2278 | as_ln_s='ln -s' 2279 | # ... but there are two gotchas: 2280 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 2281 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 2282 | # In both cases, we have to default to `cp -pR'. 2283 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 2284 | as_ln_s='cp -pR' 2285 | elif ln conf$$.file conf$$ 2>/dev/null; then 2286 | as_ln_s=ln 2287 | else 2288 | as_ln_s='cp -pR' 2289 | fi 2290 | else 2291 | as_ln_s='cp -pR' 2292 | fi 2293 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 2294 | rmdir conf$$.dir 2>/dev/null 2295 | 2296 | 2297 | # as_fn_mkdir_p 2298 | # ------------- 2299 | # Create "$as_dir" as a directory, including parents if necessary. 2300 | as_fn_mkdir_p () 2301 | { 2302 | 2303 | case $as_dir in #( 2304 | -*) as_dir=./$as_dir;; 2305 | esac 2306 | test -d "$as_dir" || eval $as_mkdir_p || { 2307 | as_dirs= 2308 | while :; do 2309 | case $as_dir in #( 2310 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 2311 | *) as_qdir=$as_dir;; 2312 | esac 2313 | as_dirs="'$as_qdir' $as_dirs" 2314 | as_dir=`$as_dirname -- "$as_dir" || 2315 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 2316 | X"$as_dir" : 'X\(//\)[^/]' \| \ 2317 | X"$as_dir" : 'X\(//\)$' \| \ 2318 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 2319 | $as_echo X"$as_dir" | 2320 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 2321 | s//\1/ 2322 | q 2323 | } 2324 | /^X\(\/\/\)[^/].*/{ 2325 | s//\1/ 2326 | q 2327 | } 2328 | /^X\(\/\/\)$/{ 2329 | s//\1/ 2330 | q 2331 | } 2332 | /^X\(\/\).*/{ 2333 | s//\1/ 2334 | q 2335 | } 2336 | s/.*/./; q'` 2337 | test -d "$as_dir" && break 2338 | done 2339 | test -z "$as_dirs" || eval "mkdir $as_dirs" 2340 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 2341 | 2342 | 2343 | } # as_fn_mkdir_p 2344 | if mkdir -p . 2>/dev/null; then 2345 | as_mkdir_p='mkdir -p "$as_dir"' 2346 | else 2347 | test -d ./-p && rmdir ./-p 2348 | as_mkdir_p=false 2349 | fi 2350 | 2351 | 2352 | # as_fn_executable_p FILE 2353 | # ----------------------- 2354 | # Test if FILE is an executable regular file. 2355 | as_fn_executable_p () 2356 | { 2357 | test -f "$1" && test -x "$1" 2358 | } # as_fn_executable_p 2359 | as_test_x='test -x' 2360 | as_executable_p=as_fn_executable_p 2361 | 2362 | # Sed expression to map a string onto a valid CPP name. 2363 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 2364 | 2365 | # Sed expression to map a string onto a valid variable name. 2366 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 2367 | 2368 | 2369 | exec 6>&1 2370 | ## ----------------------------------- ## 2371 | ## Main body of $CONFIG_STATUS script. ## 2372 | ## ----------------------------------- ## 2373 | _ASEOF 2374 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 2375 | 2376 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2377 | # Save the log message, to keep $0 and so on meaningful, and to 2378 | # report actual input values of CONFIG_FILES etc. instead of their 2379 | # values after options handling. 2380 | ac_log=" 2381 | This file was extended by riscv-llvm-toolchain $as_me 1.0, which was 2382 | generated by GNU Autoconf 2.69. Invocation command line was 2383 | 2384 | CONFIG_FILES = $CONFIG_FILES 2385 | CONFIG_HEADERS = $CONFIG_HEADERS 2386 | CONFIG_LINKS = $CONFIG_LINKS 2387 | CONFIG_COMMANDS = $CONFIG_COMMANDS 2388 | $ $0 $@ 2389 | 2390 | on `(hostname || uname -n) 2>/dev/null | sed 1q` 2391 | " 2392 | 2393 | _ACEOF 2394 | 2395 | case $ac_config_files in *" 2396 | "*) set x $ac_config_files; shift; ac_config_files=$*;; 2397 | esac 2398 | 2399 | 2400 | 2401 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2402 | # Files that config.status was made for. 2403 | config_files="$ac_config_files" 2404 | 2405 | _ACEOF 2406 | 2407 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2408 | ac_cs_usage="\ 2409 | \`$as_me' instantiates files and other configuration actions 2410 | from templates according to the current configuration. Unless the files 2411 | and actions are specified as TAGs, all are instantiated by default. 2412 | 2413 | Usage: $0 [OPTION]... [TAG]... 2414 | 2415 | -h, --help print this help, then exit 2416 | -V, --version print version number and configuration settings, then exit 2417 | --config print configuration, then exit 2418 | -q, --quiet, --silent 2419 | do not print progress messages 2420 | -d, --debug don't remove temporary files 2421 | --recheck update $as_me by reconfiguring in the same conditions 2422 | --file=FILE[:TEMPLATE] 2423 | instantiate the configuration file FILE 2424 | 2425 | Configuration files: 2426 | $config_files 2427 | 2428 | Report bugs to the package provider." 2429 | 2430 | _ACEOF 2431 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2432 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 2433 | ac_cs_version="\\ 2434 | riscv-llvm-toolchain config.status 1.0 2435 | configured by $0, generated by GNU Autoconf 2.69, 2436 | with options \\"\$ac_cs_config\\" 2437 | 2438 | Copyright (C) 2012 Free Software Foundation, Inc. 2439 | This config.status script is free software; the Free Software Foundation 2440 | gives unlimited permission to copy, distribute and modify it." 2441 | 2442 | ac_pwd='$ac_pwd' 2443 | srcdir='$srcdir' 2444 | test -n "\$AWK" || AWK=awk 2445 | _ACEOF 2446 | 2447 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2448 | # The default lists apply if the user does not specify any file. 2449 | ac_need_defaults=: 2450 | while test $# != 0 2451 | do 2452 | case $1 in 2453 | --*=?*) 2454 | ac_option=`expr "X$1" : 'X\([^=]*\)='` 2455 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 2456 | ac_shift=: 2457 | ;; 2458 | --*=) 2459 | ac_option=`expr "X$1" : 'X\([^=]*\)='` 2460 | ac_optarg= 2461 | ac_shift=: 2462 | ;; 2463 | *) 2464 | ac_option=$1 2465 | ac_optarg=$2 2466 | ac_shift=shift 2467 | ;; 2468 | esac 2469 | 2470 | case $ac_option in 2471 | # Handling of the options. 2472 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 2473 | ac_cs_recheck=: ;; 2474 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 2475 | $as_echo "$ac_cs_version"; exit ;; 2476 | --config | --confi | --conf | --con | --co | --c ) 2477 | $as_echo "$ac_cs_config"; exit ;; 2478 | --debug | --debu | --deb | --de | --d | -d ) 2479 | debug=: ;; 2480 | --file | --fil | --fi | --f ) 2481 | $ac_shift 2482 | case $ac_optarg in 2483 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 2484 | '') as_fn_error $? "missing file argument" ;; 2485 | esac 2486 | as_fn_append CONFIG_FILES " '$ac_optarg'" 2487 | ac_need_defaults=false;; 2488 | --he | --h | --help | --hel | -h ) 2489 | $as_echo "$ac_cs_usage"; exit ;; 2490 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 2491 | | -silent | --silent | --silen | --sile | --sil | --si | --s) 2492 | ac_cs_silent=: ;; 2493 | 2494 | # This is an error. 2495 | -*) as_fn_error $? "unrecognized option: \`$1' 2496 | Try \`$0 --help' for more information." ;; 2497 | 2498 | *) as_fn_append ac_config_targets " $1" 2499 | ac_need_defaults=false ;; 2500 | 2501 | esac 2502 | shift 2503 | done 2504 | 2505 | ac_configure_extra_args= 2506 | 2507 | if $ac_cs_silent; then 2508 | exec 6>/dev/null 2509 | ac_configure_extra_args="$ac_configure_extra_args --silent" 2510 | fi 2511 | 2512 | _ACEOF 2513 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2514 | if \$ac_cs_recheck; then 2515 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 2516 | shift 2517 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 2518 | CONFIG_SHELL='$SHELL' 2519 | export CONFIG_SHELL 2520 | exec "\$@" 2521 | fi 2522 | 2523 | _ACEOF 2524 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2525 | exec 5>>config.log 2526 | { 2527 | echo 2528 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 2529 | ## Running $as_me. ## 2530 | _ASBOX 2531 | $as_echo "$ac_log" 2532 | } >&5 2533 | 2534 | _ACEOF 2535 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2536 | _ACEOF 2537 | 2538 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2539 | 2540 | # Handling of arguments. 2541 | for ac_config_target in $ac_config_targets 2542 | do 2543 | case $ac_config_target in 2544 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; 2545 | 2546 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 2547 | esac 2548 | done 2549 | 2550 | 2551 | # If the user did not use the arguments to specify the items to instantiate, 2552 | # then the envvar interface is used. Set only those that are not. 2553 | # We use the long form for the default assignment because of an extremely 2554 | # bizarre bug on SunOS 4.1.3. 2555 | if $ac_need_defaults; then 2556 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 2557 | fi 2558 | 2559 | # Have a temporary directory for convenience. Make it in the build tree 2560 | # simply because there is no reason against having it here, and in addition, 2561 | # creating and moving files from /tmp can sometimes cause problems. 2562 | # Hook for its removal unless debugging. 2563 | # Note that there is a small window in which the directory will not be cleaned: 2564 | # after its creation but before its name has been assigned to `$tmp'. 2565 | $debug || 2566 | { 2567 | tmp= ac_tmp= 2568 | trap 'exit_status=$? 2569 | : "${ac_tmp:=$tmp}" 2570 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status 2571 | ' 0 2572 | trap 'as_fn_exit 1' 1 2 13 15 2573 | } 2574 | # Create a (secure) tmp directory for tmp files. 2575 | 2576 | { 2577 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 2578 | test -d "$tmp" 2579 | } || 2580 | { 2581 | tmp=./conf$$-$RANDOM 2582 | (umask 077 && mkdir "$tmp") 2583 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 2584 | ac_tmp=$tmp 2585 | 2586 | # Set up the scripts for CONFIG_FILES section. 2587 | # No need to generate them if there are no CONFIG_FILES. 2588 | # This happens for instance with `./config.status config.h'. 2589 | if test -n "$CONFIG_FILES"; then 2590 | 2591 | 2592 | ac_cr=`echo X | tr X '\015'` 2593 | # On cygwin, bash can eat \r inside `` if the user requested igncr. 2594 | # But we know of no other shell where ac_cr would be empty at this 2595 | # point, so we can use a bashism as a fallback. 2596 | if test "x$ac_cr" = x; then 2597 | eval ac_cr=\$\'\\r\' 2598 | fi 2599 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` 2600 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 2601 | ac_cs_awk_cr='\\r' 2602 | else 2603 | ac_cs_awk_cr=$ac_cr 2604 | fi 2605 | 2606 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && 2607 | _ACEOF 2608 | 2609 | 2610 | { 2611 | echo "cat >conf$$subs.awk <<_ACEOF" && 2612 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 2613 | echo "_ACEOF" 2614 | } >conf$$subs.sh || 2615 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 2616 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 2617 | ac_delim='%!_!# ' 2618 | for ac_last_try in false false false false false :; do 2619 | . ./conf$$subs.sh || 2620 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 2621 | 2622 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 2623 | if test $ac_delim_n = $ac_delim_num; then 2624 | break 2625 | elif $ac_last_try; then 2626 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 2627 | else 2628 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 2629 | fi 2630 | done 2631 | rm -f conf$$subs.sh 2632 | 2633 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2634 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && 2635 | _ACEOF 2636 | sed -n ' 2637 | h 2638 | s/^/S["/; s/!.*/"]=/ 2639 | p 2640 | g 2641 | s/^[^!]*!// 2642 | :repl 2643 | t repl 2644 | s/'"$ac_delim"'$// 2645 | t delim 2646 | :nl 2647 | h 2648 | s/\(.\{148\}\)..*/\1/ 2649 | t more1 2650 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 2651 | p 2652 | n 2653 | b repl 2654 | :more1 2655 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 2656 | p 2657 | g 2658 | s/.\{148\}// 2659 | t nl 2660 | :delim 2661 | h 2662 | s/\(.\{148\}\)..*/\1/ 2663 | t more2 2664 | s/["\\]/\\&/g; s/^/"/; s/$/"/ 2665 | p 2666 | b 2667 | :more2 2668 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 2669 | p 2670 | g 2671 | s/.\{148\}// 2672 | t delim 2673 | ' >$CONFIG_STATUS || ac_write_fail=1 2679 | rm -f conf$$subs.awk 2680 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2681 | _ACAWK 2682 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && 2683 | for (key in S) S_is_set[key] = 1 2684 | FS = "" 2685 | 2686 | } 2687 | { 2688 | line = $ 0 2689 | nfields = split(line, field, "@") 2690 | substed = 0 2691 | len = length(field[1]) 2692 | for (i = 2; i < nfields; i++) { 2693 | key = field[i] 2694 | keylen = length(key) 2695 | if (S_is_set[key]) { 2696 | value = S[key] 2697 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 2698 | len += length(value) + length(field[++i]) 2699 | substed = 1 2700 | } else 2701 | len += 1 + keylen 2702 | } 2703 | 2704 | print line 2705 | } 2706 | 2707 | _ACAWK 2708 | _ACEOF 2709 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2710 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 2711 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 2712 | else 2713 | cat 2714 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ 2715 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 2716 | _ACEOF 2717 | 2718 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), 2719 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 2720 | # trailing colons and then remove the whole line if VPATH becomes empty 2721 | # (actually we leave an empty line to preserve line numbers). 2722 | if test "x$srcdir" = x.; then 2723 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 2724 | h 2725 | s/// 2726 | s/^/:/ 2727 | s/[ ]*$/:/ 2728 | s/:\$(srcdir):/:/g 2729 | s/:\${srcdir}:/:/g 2730 | s/:@srcdir@:/:/g 2731 | s/^:*// 2732 | s/:*$// 2733 | x 2734 | s/\(=[ ]*\).*/\1/ 2735 | G 2736 | s/\n// 2737 | s/^[^=]*=[ ]*$// 2738 | }' 2739 | fi 2740 | 2741 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2742 | fi # test -n "$CONFIG_FILES" 2743 | 2744 | 2745 | eval set X " :F $CONFIG_FILES " 2746 | shift 2747 | for ac_tag 2748 | do 2749 | case $ac_tag in 2750 | :[FHLC]) ac_mode=$ac_tag; continue;; 2751 | esac 2752 | case $ac_mode$ac_tag in 2753 | :[FHL]*:*);; 2754 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; 2755 | :[FH]-) ac_tag=-:-;; 2756 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 2757 | esac 2758 | ac_save_IFS=$IFS 2759 | IFS=: 2760 | set x $ac_tag 2761 | IFS=$ac_save_IFS 2762 | shift 2763 | ac_file=$1 2764 | shift 2765 | 2766 | case $ac_mode in 2767 | :L) ac_source=$1;; 2768 | :[FH]) 2769 | ac_file_inputs= 2770 | for ac_f 2771 | do 2772 | case $ac_f in 2773 | -) ac_f="$ac_tmp/stdin";; 2774 | *) # Look for the file first in the build tree, then in the source tree 2775 | # (if the path is not absolute). The absolute path cannot be DOS-style, 2776 | # because $ac_f cannot contain `:'. 2777 | test -f "$ac_f" || 2778 | case $ac_f in 2779 | [\\/$]*) false;; 2780 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 2781 | esac || 2782 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; 2783 | esac 2784 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 2785 | as_fn_append ac_file_inputs " '$ac_f'" 2786 | done 2787 | 2788 | # Let's still pretend it is `configure' which instantiates (i.e., don't 2789 | # use $as_me), people would be surprised to read: 2790 | # /* config.h. Generated by config.status. */ 2791 | configure_input='Generated from '` 2792 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 2793 | `' by configure.' 2794 | if test x"$ac_file" != x-; then 2795 | configure_input="$ac_file. $configure_input" 2796 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 2797 | $as_echo "$as_me: creating $ac_file" >&6;} 2798 | fi 2799 | # Neutralize special characters interpreted by sed in replacement strings. 2800 | case $configure_input in #( 2801 | *\&* | *\|* | *\\* ) 2802 | ac_sed_conf_input=`$as_echo "$configure_input" | 2803 | sed 's/[\\\\&|]/\\\\&/g'`;; #( 2804 | *) ac_sed_conf_input=$configure_input;; 2805 | esac 2806 | 2807 | case $ac_tag in 2808 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ 2809 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 2810 | esac 2811 | ;; 2812 | esac 2813 | 2814 | ac_dir=`$as_dirname -- "$ac_file" || 2815 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 2816 | X"$ac_file" : 'X\(//\)[^/]' \| \ 2817 | X"$ac_file" : 'X\(//\)$' \| \ 2818 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 2819 | $as_echo X"$ac_file" | 2820 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 2821 | s//\1/ 2822 | q 2823 | } 2824 | /^X\(\/\/\)[^/].*/{ 2825 | s//\1/ 2826 | q 2827 | } 2828 | /^X\(\/\/\)$/{ 2829 | s//\1/ 2830 | q 2831 | } 2832 | /^X\(\/\).*/{ 2833 | s//\1/ 2834 | q 2835 | } 2836 | s/.*/./; q'` 2837 | as_dir="$ac_dir"; as_fn_mkdir_p 2838 | ac_builddir=. 2839 | 2840 | case "$ac_dir" in 2841 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 2842 | *) 2843 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 2844 | # A ".." for each directory in $ac_dir_suffix. 2845 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 2846 | case $ac_top_builddir_sub in 2847 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 2848 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 2849 | esac ;; 2850 | esac 2851 | ac_abs_top_builddir=$ac_pwd 2852 | ac_abs_builddir=$ac_pwd$ac_dir_suffix 2853 | # for backward compatibility: 2854 | ac_top_builddir=$ac_top_build_prefix 2855 | 2856 | case $srcdir in 2857 | .) # We are building in place. 2858 | ac_srcdir=. 2859 | ac_top_srcdir=$ac_top_builddir_sub 2860 | ac_abs_top_srcdir=$ac_pwd ;; 2861 | [\\/]* | ?:[\\/]* ) # Absolute name. 2862 | ac_srcdir=$srcdir$ac_dir_suffix; 2863 | ac_top_srcdir=$srcdir 2864 | ac_abs_top_srcdir=$srcdir ;; 2865 | *) # Relative name. 2866 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 2867 | ac_top_srcdir=$ac_top_build_prefix$srcdir 2868 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 2869 | esac 2870 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 2871 | 2872 | 2873 | case $ac_mode in 2874 | :F) 2875 | # 2876 | # CONFIG_FILE 2877 | # 2878 | 2879 | _ACEOF 2880 | 2881 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2882 | # If the template does not know about datarootdir, expand it. 2883 | # FIXME: This hack should be removed a few years after 2.60. 2884 | ac_datarootdir_hack=; ac_datarootdir_seen= 2885 | ac_sed_dataroot=' 2886 | /datarootdir/ { 2887 | p 2888 | q 2889 | } 2890 | /@datadir@/p 2891 | /@docdir@/p 2892 | /@infodir@/p 2893 | /@localedir@/p 2894 | /@mandir@/p' 2895 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in 2896 | *datarootdir*) ac_datarootdir_seen=yes;; 2897 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 2898 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 2899 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 2900 | _ACEOF 2901 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2902 | ac_datarootdir_hack=' 2903 | s&@datadir@&$datadir&g 2904 | s&@docdir@&$docdir&g 2905 | s&@infodir@&$infodir&g 2906 | s&@localedir@&$localedir&g 2907 | s&@mandir@&$mandir&g 2908 | s&\\\${datarootdir}&$datarootdir&g' ;; 2909 | esac 2910 | _ACEOF 2911 | 2912 | # Neutralize VPATH when `$srcdir' = `.'. 2913 | # Shell code in configure.ac might set extrasub. 2914 | # FIXME: do we really want to maintain this feature? 2915 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2916 | ac_sed_extra="$ac_vpsub 2917 | $extrasub 2918 | _ACEOF 2919 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2920 | :t 2921 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b 2922 | s|@configure_input@|$ac_sed_conf_input|;t t 2923 | s&@top_builddir@&$ac_top_builddir_sub&;t t 2924 | s&@top_build_prefix@&$ac_top_build_prefix&;t t 2925 | s&@srcdir@&$ac_srcdir&;t t 2926 | s&@abs_srcdir@&$ac_abs_srcdir&;t t 2927 | s&@top_srcdir@&$ac_top_srcdir&;t t 2928 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 2929 | s&@builddir@&$ac_builddir&;t t 2930 | s&@abs_builddir@&$ac_abs_builddir&;t t 2931 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 2932 | $ac_datarootdir_hack 2933 | " 2934 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ 2935 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 2936 | 2937 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 2938 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && 2939 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ 2940 | "$ac_tmp/out"`; test -z "$ac_out"; } && 2941 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 2942 | which seems to be undefined. Please make sure it is defined" >&5 2943 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 2944 | which seems to be undefined. Please make sure it is defined" >&2;} 2945 | 2946 | rm -f "$ac_tmp/stdin" 2947 | case $ac_file in 2948 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; 2949 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; 2950 | esac \ 2951 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 2952 | ;; 2953 | 2954 | 2955 | 2956 | esac 2957 | 2958 | done # for ac_tag 2959 | 2960 | 2961 | as_fn_exit 0 2962 | _ACEOF 2963 | ac_clean_files=$ac_clean_files_save 2964 | 2965 | test $ac_write_fail = 0 || 2966 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 2967 | 2968 | 2969 | # configure is writing to config.log, and then calls config.status. 2970 | # config.status does its own redirection, appending to config.log. 2971 | # Unfortunately, on DOS this fails, as config.log is still kept open 2972 | # by configure, so config.status won't be able to write to it; its 2973 | # output is simply discarded. So we exec the FD to /dev/null, 2974 | # effectively closing config.log, so it can be properly (re)opened and 2975 | # appended to by config.status. When coming back to configure, we 2976 | # need to make the FD available again. 2977 | if test "$no_create" != yes; then 2978 | ac_cs_success=: 2979 | ac_config_status_args= 2980 | test "$silent" = yes && 2981 | ac_config_status_args="$ac_config_status_args --quiet" 2982 | exec 5>/dev/null 2983 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 2984 | exec 5>>config.log 2985 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which 2986 | # would make configure fail if this is the last instruction. 2987 | $ac_cs_success || as_fn_exit 1 2988 | fi 2989 | 2990 | # 2991 | # CONFIG_SUBDIRS section. 2992 | # 2993 | if test "$no_recursion" != yes; then 2994 | 2995 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments 2996 | # so they do not pile up. 2997 | ac_sub_configure_args= 2998 | ac_prev= 2999 | eval "set x $ac_configure_args" 3000 | shift 3001 | for ac_arg 3002 | do 3003 | if test -n "$ac_prev"; then 3004 | ac_prev= 3005 | continue 3006 | fi 3007 | case $ac_arg in 3008 | -cache-file | --cache-file | --cache-fil | --cache-fi \ 3009 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 3010 | ac_prev=cache_file ;; 3011 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 3012 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ 3013 | | --c=*) 3014 | ;; 3015 | --config-cache | -C) 3016 | ;; 3017 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 3018 | ac_prev=srcdir ;; 3019 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 3020 | ;; 3021 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 3022 | ac_prev=prefix ;; 3023 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 3024 | ;; 3025 | --disable-option-checking) 3026 | ;; 3027 | *) 3028 | case $ac_arg in 3029 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 3030 | esac 3031 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; 3032 | esac 3033 | done 3034 | 3035 | # Always prepend --prefix to ensure using the same prefix 3036 | # in subdir configurations. 3037 | ac_arg="--prefix=$prefix" 3038 | case $ac_arg in 3039 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 3040 | esac 3041 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" 3042 | 3043 | # Pass --silent 3044 | if test "$silent" = yes; then 3045 | ac_sub_configure_args="--silent $ac_sub_configure_args" 3046 | fi 3047 | 3048 | # Always prepend --disable-option-checking to silence warnings, since 3049 | # different subdirs can have different --enable and --with options. 3050 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" 3051 | 3052 | ac_popdir=`pwd` 3053 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue 3054 | 3055 | # Do not complain, so a configure script can configure whichever 3056 | # parts of a large source tree are present. 3057 | test -d "$srcdir/$ac_dir" || continue 3058 | 3059 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" 3060 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 3061 | $as_echo "$ac_msg" >&6 3062 | as_dir="$ac_dir"; as_fn_mkdir_p 3063 | ac_builddir=. 3064 | 3065 | case "$ac_dir" in 3066 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 3067 | *) 3068 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 3069 | # A ".." for each directory in $ac_dir_suffix. 3070 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 3071 | case $ac_top_builddir_sub in 3072 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 3073 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 3074 | esac ;; 3075 | esac 3076 | ac_abs_top_builddir=$ac_pwd 3077 | ac_abs_builddir=$ac_pwd$ac_dir_suffix 3078 | # for backward compatibility: 3079 | ac_top_builddir=$ac_top_build_prefix 3080 | 3081 | case $srcdir in 3082 | .) # We are building in place. 3083 | ac_srcdir=. 3084 | ac_top_srcdir=$ac_top_builddir_sub 3085 | ac_abs_top_srcdir=$ac_pwd ;; 3086 | [\\/]* | ?:[\\/]* ) # Absolute name. 3087 | ac_srcdir=$srcdir$ac_dir_suffix; 3088 | ac_top_srcdir=$srcdir 3089 | ac_abs_top_srcdir=$srcdir ;; 3090 | *) # Relative name. 3091 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 3092 | ac_top_srcdir=$ac_top_build_prefix$srcdir 3093 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 3094 | esac 3095 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 3096 | 3097 | 3098 | cd "$ac_dir" 3099 | 3100 | # Check for guested configure; otherwise get Cygnus style configure. 3101 | if test -f "$ac_srcdir/configure.gnu"; then 3102 | ac_sub_configure=$ac_srcdir/configure.gnu 3103 | elif test -f "$ac_srcdir/configure"; then 3104 | ac_sub_configure=$ac_srcdir/configure 3105 | elif test -f "$ac_srcdir/configure.in"; then 3106 | # This should be Cygnus configure. 3107 | ac_sub_configure=$ac_aux_dir/configure 3108 | else 3109 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 3110 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} 3111 | ac_sub_configure= 3112 | fi 3113 | 3114 | # The recursion is here. 3115 | if test -n "$ac_sub_configure"; then 3116 | # Make the cache file name correct relative to the subdirectory. 3117 | case $cache_file in 3118 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; 3119 | *) # Relative name. 3120 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; 3121 | esac 3122 | 3123 | { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 3124 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} 3125 | # The eval makes quoting arguments work. 3126 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ 3127 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || 3128 | as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 3129 | fi 3130 | 3131 | cd "$ac_popdir" 3132 | done 3133 | fi 3134 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 3135 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 3136 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 3137 | fi 3138 | 3139 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT(riscv-llvm-toolchain, 1.0) 2 | 3 | #AC_PROG_CC 4 | 5 | AC_PATH_PROG([CMAKE], [cmake], 6 | [AC_MSG_ERROR([cmake not found])]) 7 | 8 | AC_SUBST(CMAKE) 9 | 10 | AC_ARG_WITH(arch, 11 | [AS_HELP_STRING([--with-arch=rv64ima], 12 | [Sets the base RISC-V ISA, defaults to rv64ima])], 13 | [AS_CASE([$with_arch], 14 | [*rv*g* | *rv*d* | *rv*f*], [AC_MSG_ERROR([Unsupport F/D yet])], 15 | [*rv32* | *rv64*], [], 16 | [AC_MSG_ERROR([Unknown arch])])], 17 | [with_arch=rv64ima] 18 | ) 19 | 20 | AC_SUBST(WITH_ARCH, $with_arch) 21 | 22 | AC_ARG_WITH(build_type, 23 | [AS_HELP_STRING([--with-build-type=Release], 24 | [Set the build type for LLVM, defaults to Release, Possible values are Release, Debug, RelWithDebInfo and MinSizeRel.])], 25 | [AS_CASE([$with_build_type], 26 | [Release | Debug | RelWithDebInfo | MinSizeRel], [], 27 | [AC_MSG_ERROR([Unknown build type, Possible values are Release, Debug, RelWithDebInfo and MinSizeRel.])])], 28 | [with_build_type=Release] 29 | ) 30 | 31 | AC_SUBST(WITH_BUILD_TYPE, $with_build_type) 32 | 33 | AC_ARG_ENABLE(clang_only, 34 | [AS_HELP_STRING([--enable-clang-only=no], 35 | [Install clang only, and do not install another llvm tool and libraries])]) 36 | 37 | AS_IF([test "x$enable_clang_only" != "xyes"], 38 | AC_SUBST(BUILD_CLANG_ONLY, no), 39 | AC_SUBST(BUILD_CLANG_ONLY, yes)) 40 | 41 | ac_configure_args="$ac_configure_args --with-arch=$with_arch" 42 | AC_CONFIG_SUBDIRS(riscv-gnu-toolchain) 43 | 44 | AC_CONFIG_FILES([Makefile]) 45 | 46 | AC_OUTPUT 47 | -------------------------------------------------------------------------------- /install-sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andestech/riscv-llvm-toolchain/8648625a42822048700ba0048edea7c69f00da93/install-sh --------------------------------------------------------------------------------