diff --git a/config/cuda.m4 b/config/cuda.m4 index 2d52d8e6c..33abc53a1 100644 --- a/config/cuda.m4 +++ b/config/cuda.m4 @@ -8,13 +8,7 @@ AC_DEFUN([AX_CHECK_CUDA], [with_cuda_home=/usr/local/cuda]) AC_SUBST(CUDA_HOME, $with_cuda_home) - AC_ARG_ENABLE([cuda], - [AS_HELP_STRING([--disable-cuda], - [disable cuda support (default=no)])], - [enable_cuda=no], - [enable_cuda=yes]) - - AC_SUBST([HAVE_CUDA], [0]) + AC_SUBST([HAVE_CUDA], [1]) AC_SUBST([CUDA_VERSION], [0]) AC_SUBST([CUDA_HAVE_CXX20], [0]) AC_SUBST([CUDA_HAVE_CXX17], [0]) @@ -23,7 +17,7 @@ AC_DEFUN([AX_CHECK_CUDA], AC_SUBST([GPU_MIN_ARCH], [0]) AC_SUBST([GPU_MAX_ARCH], [0]) AC_SUBST([GPU_SHAREDMEM], [0]) - AC_SUBST([GPU_PASCAL_MANAGEDMEM], [0]) + AC_SUBST([GPU_MANAGEDMEM], [0]) AC_SUBST([GPU_EXP_PINNED_ALLOC], [1]) if test "$enable_cuda" != "no"; then AC_SUBST([HAVE_CUDA], [1]) @@ -40,7 +34,7 @@ AC_DEFUN([AX_CHECK_CUDA], LDFLAGS_save="$LDFLAGS" LIBS_save="$LIBS" - ac_compile='$NVCC -c $NVCCFLAGS conftest.$ac_ext >&5' + ac_compile='$NVCC -c $HIPCCFLAGS conftest.$ac_ext >&5' AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #include @@ -51,9 +45,9 @@ AC_DEFUN([AX_CHECK_CUDA], if test "$HAVE_CUDA" = "1"; then LDFLAGS="-L$CUDA_HOME/lib64 -L$CUDA_HOME/lib" - LIBS="$LIBS -lcuda -lcudart" + LIBS="-lcuda -lcudart" - ac_link='$NVCC -o conftest$ac_exeext $NVCCFLAGS $LDFLAGS $LIBS conftest.$ac_ext >&5' + ac_link='$NVCC -o conftest$ac_exeext $HIPCCFLAGS $LDFLAGS $LIBS conftest.$ac_ext >&5' AC_LINK_IFELSE([ AC_LANG_PROGRAM([[ #include @@ -105,7 +99,7 @@ AC_DEFUN([AX_CHECK_CUDA], [flags to pass to NVCC (default='-O3 -Xcompiler "-Wall"')])], [], [with_nvcc_flags='-O3 -Xcompiler "-Wall"']) - AC_SUBST(NVCCFLAGS, $with_nvcc_flags) + HIPCCFLAGS="$with_nvcc_flags $HIPCCFLAGS" AC_ARG_WITH([stream_model], [AS_HELP_STRING([--with-stream-model], @@ -119,11 +113,11 @@ AC_DEFUN([AX_CHECK_CUDA], dsm_supported=$( ${NVCC} -h | ${GREP} -Po -e "--default-stream" ) if test "$dsm_supported" = "--default-stream"; then if test "$with_stream_model" = "per-thread"; then - NVCCFLAGS="$NVCCFLAGS -default-stream per-thread" + HIPCCFLAGS="$HIPCCFLAGS -default-stream per-thread" AC_MSG_RESULT([yes, using 'per-thread']) else if test "$with_stream_model" = "legacy"; then - NVCCFLAGS="$NVCCFLAGS -default-stream legacy" + HIPCCFLAGS="$HIPCCFLAGS -default-stream legacy" AC_MSG_RESULT([yes, using 'legacy']) else AC_MSG_ERROR(Invalid CUDA stream model: '$with_stream_model') @@ -137,9 +131,9 @@ AC_DEFUN([AX_CHECK_CUDA], if test "$HAVE_CUDA" = "1"; then CPPFLAGS="$CPPFLAGS -DBF_CUDA_ENABLED=1" CXXFLAGS="$CXXFLAGS -DBF_CUDA_ENABLED=1" - NVCCFLAGS="$NVCCFLAGS -DBF_CUDA_ENABLED=1" + HIPCCFLAGS="$HIPCCFLAGS -DBF_CUDA_ENABLED=1" LDFLAGS="$LDFLAGS -L$CUDA_HOME/lib64 -L$CUDA_HOME/lib" - LIBS="$LIBS -lcuda -lcudart -lnvrtc -lcublas -lcudadevrt -L. -lcufft_static_pruned -lculibos -lnvToolsExt" + LIBS="$LIBS -lcuda -lcudart -lnvrtc -lcublas -lcudadevrt -L. -lnvToolsExt -Wl,--no-as-needed -lcufft_static_pruned -lculibos" fi AC_ARG_WITH([gpu_archs], @@ -291,10 +285,10 @@ AC_DEFUN([AX_CHECK_CUDA], AC_MSG_CHECKING([for Pascal-style CUDA managed memory]) cm_invalid=$( echo $GPU_ARCHS | ${SED} -e 's/\b[[1-5]][[0-9]]\b/PRE/g;' ) if ! echo $cm_invalid | ${GREP} -q PRE; then - AC_SUBST([GPU_PASCAL_MANAGEDMEM], [1]) + AC_SUBST([GPU_MANAGEDMEM], [1]) AC_MSG_RESULT([yes]) else - AC_SUBST([GPU_PASCAL_MANAGEDMEM], [0]) + AC_SUBST([GPU_MANAGEDMEM], [0]) AC_MSG_RESULT([no]) fi diff --git a/config/hip.m4 b/config/hip.m4 new file mode 100644 index 000000000..431fefe55 --- /dev/null +++ b/config/hip.m4 @@ -0,0 +1,121 @@ +AC_DEFUN([AX_CHECK_HIP], +[ + AC_PROVIDE([AX_CHECK_HIP]) + + AC_ARG_ENABLE( + [gpu], + [AS_HELP_STRING( + [--enable-gpu], + [enable GPU support (default=no)]) + ], + [AC_SUBST([ENABLE_GPU], [1])], + [AC_SUBST([ENABLE_GPU], [0])] + ) + + AC_MSG_CHECKING([if gpu is enabled]) + AC_MSG_RESULT([$ENABLE_GPU]) + + AC_SUBST([GPU_SHAREDMEM], 0) + AC_ARG_WITH([shared_mem], + [AS_HELP_STRING([--with-shared-mem=N], + [default GPU shared memory per block in bytes (default=detect)])], + [AC_SUBST([GPU_SHAREDMEM], [$withval])], + [with_shared_mem='auto']) + AC_MSG_NOTICE([-with-shared-mem=$GPU_SHAREDMEM]) + + AS_IF([test "x$ENABLE_GPU" = "x1"], [ + AC_PATH_PROG(HIPCONFIG, hipconfig, no) + AS_IF([test "x$HIPCONFIG" = "xno"], [ + AC_MSG_ERROR("could not find hipconfig in path") + ]) + + AC_PATH_PROG(HIPCC, hipcc, no) + AS_IF([test "x$HIPCC" = "xno"], [ + AC_MSG_ERROR("could not find hipcc in path") + ]) + + AC_MSG_CHECKING([for GPU platform]) + AC_SUBST([GPU_PLATFORM], [`hipconfig -P`]) + AC_MSG_RESULT([$GPU_PLATFORM]) + + AC_MSG_CHECKING([for hip path]) + AC_SUBST([HIP_PATH], [`hipconfig -p`]) + AC_MSG_RESULT([$HIP_PATH]) + + AC_MSG_CHECKING([for rocm path]) + AC_SUBST([ROCM_PATH], [`hipconfig -R`]) + AC_MSG_RESULT([$ROCM_PATH]) + + AC_MSG_CHECKING([for hipcc C++ config]) + AC_SUBST([HIP_CPPCONF], [`hipconfig -C`]) + AC_MSG_RESULT([$HIP_CPPCONF]) + ]) + + AC_SUBST([HIPCCFLAGS]) + + AS_IF([test "x$GPU_PLATFORM" = "xnvidia"], [ + CXXFLAGS="$CXXFLAGS -DBF_CUDA_ENABLED=1 $HIP_CPPCONF" + HIPCCFLAGS="$HIPCCFLAGS --std=c++17 -DBF_CUDA_ENABLED=1 $HIP_CPPCONF" + LDFLAGS="$LDFLAGS -L$HIP_PATH/lib -L$ROCM_PATH/lib" + LIBS="$LIBS -lhipfft -lhipblas" + ]) + + AS_IF([test "x$GPU_PLATFORM" = "xamd"], [ + CXXFLAGS="$CXXFLAGS -DBF_CUDA_ENABLED=1 $HIP_CPPCONF " + HIPCCFLAGS="$HIPCCFLAGS -std=c++17 -Wall -O3 -DBF_CUDA_ENABLED=1 $HIP_CPPCONF" + LDFLAGS="$LDFLAGS -L$HIP_PATH/lib -L$ROCM_PATH/lib" + LIBS="$LIBS -lamdhip64 -lhipfft -lhipblas -lhiprtc" + + # AMD Constants + AC_SUBST([GPU_MANAGEDMEM], [1]) + AC_SUBST([GPU_MIN_ARCH], [0]) + AC_SUBST([GPU_MAX_ARCH], [0]) + AC_SUBST([GPU_EXP_PINNED_ALLOC], [0]) + AC_SUBST([CUDA_VERSION], [0]) + + AS_IF([test "x$with_shared_mem" = "xauto"], [ + AC_MSG_CHECKING([GPU shared memory using automatic method]) + + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[ + #include + #include + #include + #include + #include + ]], [[ + int count {}; + auto hiperr = hipGetDeviceCount(&count); + if (hiperr != hipSuccess) { + std::cerr << "Error detecting devices" << std::endl; + return 1; + } + if (count == 0) { + std::cerr << "No devices detected" << std::endl; + return 1; + } + size_t mem {std::numeric_limits::max()}; + for (int device = 0; device < count; ++device) { + hipDeviceProp_t prop; + hiperr = hipGetDeviceProperties(&prop, device); + if (hiperr != hipSuccess) { + std::cerr << "Failed to query shared memory for device " << device << std::endl; + return 1; + } + mem = std::min(mem, prop.sharedMemPerBlock); + } + std::ofstream fd; + fd.open("confmem.out"); + fd << mem; + fd.close(); + return 0; + ]]) + ], [ + AC_SUBST([GPU_SHAREDMEM], [$(cat confmem.out)]) + AC_MSG_RESULT([$GPU_SHAREDMEM bytes]) + ], [ + AC_MSG_FAILURE([automatic shared memory detection failed (error code: $?)]) + ]) + ]) + ]) +]) \ No newline at end of file diff --git a/configure b/configure index f050ceb99..469f27973 100755 --- a/configure +++ b/configure @@ -1,10 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for bifrost 0.10.0. +# Generated by GNU Autoconf 2.69 for bifrost 0.10.0. # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -15,16 +14,14 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -34,46 +31,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -82,6 +79,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -90,12 +94,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -107,10 +107,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -132,22 +152,20 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop +else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -167,15 +185,12 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -else \$as_nop +else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO @@ -190,38 +205,30 @@ test -x / || exit 1" test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null -then : + if (eval "$as_required") 2>/dev/null; then : as_have_required=yes -else $as_nop +else as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -else $as_nop +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base + as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi @@ -229,21 +236,14 @@ fi esac as_found=false done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi +fi; } +IFS=$as_save_IFS - if test "x$CONFIG_SHELL" != x -then : + if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -261,19 +261,18 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system, + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." @@ -300,7 +299,6 @@ as_fn_unset () } as_unset=as_fn_unset - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -318,14 +316,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -340,7 +330,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -349,7 +339,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -388,13 +378,12 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -406,27 +395,18 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -438,9 +418,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -467,7 +447,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -511,7 +491,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -525,10 +505,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -542,13 +518,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -626,39 +595,42 @@ PACKAGE_URL='https://github.com/ledatelescope/bifrost/' ac_unique_file="src/cuda.cpp" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include +#include +#ifdef HAVE_SYS_TYPES_H +# include #endif -#ifdef HAVE_STDLIB_H +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS # include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif #ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif #ifdef HAVE_UNISTD_H # include #endif" -ac_header_c_list= ac_subst_vars='OPTIONS LTLIBOBJS -STDCXX_IS_SET MAP_KERNEL_STDCXX PACKAGE_VERSION_MICRO PACKAGE_VERSION_MINOR @@ -717,22 +689,29 @@ HAVE_DEBUG HAVE_TMPFS ALIGNMENT GPU_ARCHS -NVCCFLAGS CUOBJDUMP NVPRUNE NVCC -GPU_EXP_PINNED_ALLOC -GPU_PASCAL_MANAGEDMEM -GPU_SHAREDMEM -GPU_MAX_ARCH -GPU_MIN_ARCH CUDA_HAVE_CXX11 CUDA_HAVE_CXX14 CUDA_HAVE_CXX17 CUDA_HAVE_CXX20 -CUDA_VERSION HAVE_CUDA CUDA_HOME +CUDA_VERSION +GPU_EXP_PINNED_ALLOC +GPU_MAX_ARCH +GPU_MIN_ARCH +GPU_MANAGEDMEM +HIPCCFLAGS +HIP_CPPCONF +ROCM_PATH +HIP_PATH +GPU_PLATFORM +HIPCC +HIPCONFIG +GPU_SHAREDMEM +ENABLE_GPU HAVE_VMA HAVE_HWLOC HAVE_NUMA @@ -753,6 +732,7 @@ INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM CXXCPP +CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL @@ -850,12 +830,12 @@ with_ctags enable_numa enable_hwloc enable_vma +enable_gpu +with_shared_mem with_cuda_home -enable_cuda with_nvcc_flags with_stream_model with_gpu_archs -with_shared_mem with_alignment with_logging_dir enable_debug @@ -891,6 +871,7 @@ CXX CXXFLAGS CCC LT_SYS_LIBRARY_PATH +CPP CXXCPP CTAGS PYTHON @@ -964,6 +945,8 @@ do *) ac_optarg=yes ;; esac + # Accept the important Cygnus configure options, so we can diagnose typos. + case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1004,9 +987,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1030,9 +1013,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1243,9 +1226,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1259,9 +1242,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1305,9 +1288,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1323,7 +1306,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1387,7 +1370,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1526,7 +1509,8 @@ Optional Features: --disable-numa disable numa support (default=no) --disable-hwloc disable hwloc support (default=no) --enable-vma enable vma support (default=no) - --disable-cuda disable cuda support (default=no) + --enable-gpu enable GPU support (default=no) + --enable-debug enable debugging mode (default=no) --enable-trace enable tracing mode for nvprof/nvvp (default=no) --disable-native-arch disable native architecture compilation (default=no) @@ -1557,14 +1541,14 @@ Optional Packages: --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-ctags=[PATH] absolute path to ctags executable + --with-shared-mem=N default GPU shared memory per block in bytes + (default=detect) --with-cuda-home CUDA install path (default=/usr/local/cuda) --with-nvcc-flags flags to pass to NVCC (default='-O3 -Xcompiler "-Wall"') --with-stream-model CUDA default stream model to use: 'legacy' or 'per-thread' (default='per-thread') --with-gpu-archs=... default GPU architectures (default=detect) - --with-shared-mem=N default GPU shared memory per block in bytes - (default=detect) --with-alignment=N default memory alignment in bytes (default=4096) --with-logging-dir=DIR directory for Bifrost proclog logging (default=autodetect) @@ -1585,6 +1569,7 @@ Some influential environment variables: CXXFLAGS C++ compiler flags LT_SYS_LIBRARY_PATH User-defined run-time library search path. + CPP C preprocessor CXXCPP C++ preprocessor CTAGS Absolute path to ctags executable PYTHON Absolute path to python executable @@ -1612,9 +1597,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1642,8 +1627,7 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. + # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1651,7 +1635,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1661,9 +1645,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF bifrost configure 0.10.0 -generated by GNU Autoconf 2.71 +generated by GNU Autoconf 2.69 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1680,14 +1664,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1695,15 +1679,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1719,14 +1702,14 @@ fi ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1734,15 +1717,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1758,14 +1740,14 @@ fi ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1773,18 +1755,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1806,44 +1787,120 @@ fi ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. @@ -1851,9 +1908,16 @@ else $as_nop #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif -#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -1871,25 +1935,24 @@ choke me #endif int -main (void) +main () { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -1906,7 +1969,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1914,15 +1977,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1938,14 +2000,14 @@ fi ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1953,18 +2015,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1985,12 +2046,11 @@ fi ac_fn_cxx_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. @@ -1998,9 +2058,16 @@ else $as_nop #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif -#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -2018,61 +2085,114 @@ choke me #endif int -main (void) +main () { return $2 (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_func -# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES +# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_cxx_check_header_compile () +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_cxx_check_header_compile +} # ac_fn_cxx_check_header_mongrel # ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES # --------------------------------------------- @@ -2081,18 +2201,17 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_cxx_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof ($2)) return 0; @@ -2100,13 +2219,12 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof (($2))) return 0; @@ -2114,27 +2232,26 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : -else $as_nop +else eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_type # ac_fn_cxx_try_run LINENO # ------------------------ -# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that -# executables *can* be run. +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack @@ -2144,26 +2261,25 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status @@ -2181,12 +2297,11 @@ fi ac_fn_c_find_intX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 -printf %s "checking for int$2_t... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 +$as_echo_n "checking for int$2_t... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. @@ -2197,7 +2312,7 @@ else $as_nop $ac_includes_default enum { N = $2 / 2 - 1 }; int -main (void) +main () { static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; test_array [0] = 0; @@ -2207,14 +2322,13 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int -main (void) +main () { static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; @@ -2225,10 +2339,9 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : -else $as_nop +else case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( @@ -2236,20 +2349,19 @@ else $as_nop eval "$3=\$ac_type" ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - if eval test \"x\$"$3"\" = x"no" -then : +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if eval test \"x\$"$3"\" = x"no"; then : -else $as_nop +else break fi done fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_intX_t @@ -2261,12 +2373,11 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_find_uintX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 -printf %s "checking for uint$2_t... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 +$as_echo_n "checking for uint$2_t... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. @@ -2276,7 +2387,7 @@ else $as_nop /* end confdefs.h. */ $ac_includes_default int -main (void) +main () { static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; test_array [0] = 0; @@ -2286,8 +2397,7 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : case $ac_type in #( uint$2_t) : eval "$3=yes" ;; #( @@ -2295,49 +2405,28 @@ then : eval "$3=\$ac_type" ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - if eval test \"x\$"$3"\" = x"no" -then : +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if eval test \"x\$"$3"\" = x"no"; then : -else $as_nop +else break fi done fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_uintX_t -ac_configure_args_raw= -for ac_arg -do - case $ac_arg in - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_configure_args_raw " '$ac_arg'" -done - -case $ac_configure_args_raw in - *$as_nl*) - ac_safe_unquote= ;; - *) - ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. - ac_unsafe_a="$ac_unsafe_z#~" - ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" - ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; -esac - cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by bifrost $as_me 0.10.0, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was - $ $0$ac_configure_args_raw + $ $0 $@ _ACEOF exec 5>>config.log @@ -2370,12 +2459,8 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -2410,7 +2495,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2445,13 +2530,11 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - printf "%s\n" "## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2462,8 +2545,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2487,7 +2570,7 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ) echo - printf "%s\n" "## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2495,14 +2578,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2510,15 +2593,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - printf "%s\n" "## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2526,8 +2609,8 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} echo fi test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2541,48 +2624,63 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -printf "%s\n" "/* confdefs.h */" > confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi - -for ac_site_file in $ac_site_files +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2592,650 +2690,19 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Test code for whether the C compiler supports C89 (global declarations) -ac_c_conftest_c89_globals=' -/* Does the compiler advertise C89 conformance? - Do not test the value of __STDC__, because some compilers set it to 0 - while being otherwise adequately conformant. */ -#if !defined __STDC__ -# error "Compiler does not advertise C89 conformance" -#endif - -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ -struct buf { int x; }; -struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not \xHH hex character constants. - These do not provoke an error unfortunately, instead are silently treated - as an "x". The following induces an error, until -std is added to get - proper ANSI mode. Curiously \x00 != x always comes out true, for an - array size at least. It is necessary to write \x00 == 0 to get something - that is true only with -std. */ -int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) '\''x'\'' -int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), - int, int);' - -# Test code for whether the C compiler supports C89 (body of main). -ac_c_conftest_c89_main=' -ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); -' - -# Test code for whether the C compiler supports C99 (global declarations) -ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L -# error "Compiler does not advertise C99 conformance" -#endif - -#include -extern int puts (const char *); -extern int printf (const char *, ...); -extern int dprintf (int, const char *, ...); -extern void *malloc (size_t); - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -// dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. -#define debug(...) dprintf (2, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - #error "your preprocessor is broken" -#endif -#if BIG_OK -#else - #error "your preprocessor is broken" -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case '\''s'\'': // string - str = va_arg (args_copy, const char *); - break; - case '\''d'\'': // int - number = va_arg (args_copy, int); - break; - case '\''f'\'': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -} -' - -# Test code for whether the C compiler supports C99 (body of main). -ac_c_conftest_c99_main=' - // Check bool. - _Bool success = false; - success |= (argc != 0); - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[0] = argv[0][0]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' - || dynamic_array[ni.number - 1] != 543); -' - -# Test code for whether the C compiler supports C11 (global declarations) -ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "Compiler does not advertise C11 conformance" -#endif - -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -' - -# Test code for whether the C compiler supports C11 (body of main). -ac_c_conftest_c11_main=' - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - v1.i = 2; - v1.w.k = 5; - ok |= v1.i != 5; -' - -# Test code for whether the C compiler supports C11 (complete). -ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} -${ac_c_conftest_c11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - ${ac_c_conftest_c11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C99 (complete). -ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - return ok; -} -" - -# Test code for whether the C compiler supports C89 (complete). -ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - return ok; -} -" - -# Test code for whether the C++ compiler supports C++98 (global declarations) -ac_cxx_conftest_cxx98_globals=' -// Does the compiler advertise C++98 conformance? -#if !defined __cplusplus || __cplusplus < 199711L -# error "Compiler does not advertise C++98 conformance" -#endif - -// These inclusions are to reject old compilers that -// lack the unsuffixed header files. -#include -#include - -// and are *not* freestanding headers in C++98. -extern void assert (int); -namespace std { - extern int strcmp (const char *, const char *); -} - -// Namespaces, exceptions, and templates were all added after "C++ 2.0". -using std::exception; -using std::strcmp; - -namespace { - -void test_exception_syntax() -{ - try { - throw "test"; - } catch (const char *s) { - // Extra parentheses suppress a warning when building autoconf itself, - // due to lint rules shared with more typical C programs. - assert (!(strcmp) (s, "test")); - } -} - -template struct test_template -{ - T const val; - explicit test_template(T t) : val(t) {} - template T add(U u) { return static_cast(u) + val; } -}; - -} // anonymous namespace -' - -# Test code for whether the C++ compiler supports C++98 (body of main) -ac_cxx_conftest_cxx98_main=' - assert (argc); - assert (! argv[0]); -{ - test_exception_syntax (); - test_template tt (2.0); - assert (tt.add (4) == 6.0); - assert (true && !false); -} -' - -# Test code for whether the C++ compiler supports C++11 (global declarations) -ac_cxx_conftest_cxx11_globals=' -// Does the compiler advertise C++ 2011 conformance? -#if !defined __cplusplus || __cplusplus < 201103L -# error "Compiler does not advertise C++11 conformance" -#endif - -namespace cxx11test -{ - constexpr int get_val() { return 20; } - - struct testinit - { - int i; - double d; - }; - - class delegate - { - public: - delegate(int n) : n(n) {} - delegate(): delegate(2354) {} - - virtual int getval() { return this->n; }; - protected: - int n; - }; - - class overridden : public delegate - { - public: - overridden(int n): delegate(n) {} - virtual int getval() override final { return this->n * 2; } - }; - - class nocopy - { - public: - nocopy(int i): i(i) {} - nocopy() = default; - nocopy(const nocopy&) = delete; - nocopy & operator=(const nocopy&) = delete; - private: - int i; - }; - - // for testing lambda expressions - template Ret eval(Fn f, Ret v) - { - return f(v); - } - - // for testing variadic templates and trailing return types - template auto sum(V first) -> V - { - return first; - } - template auto sum(V first, Args... rest) -> V - { - return first + sum(rest...); - } -} -' - -# Test code for whether the C++ compiler supports C++11 (body of main) -ac_cxx_conftest_cxx11_main=' -{ - // Test auto and decltype - auto a1 = 6538; - auto a2 = 48573953.4; - auto a3 = "String literal"; - - int total = 0; - for (auto i = a3; *i; ++i) { total += *i; } - - decltype(a2) a4 = 34895.034; -} -{ - // Test constexpr - short sa[cxx11test::get_val()] = { 0 }; -} -{ - // Test initializer lists - cxx11test::testinit il = { 4323, 435234.23544 }; -} -{ - // Test range-based for - int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, - 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; - for (auto &x : array) { x += 23; } -} -{ - // Test lambda expressions - using cxx11test::eval; - assert (eval ([](int x) { return x*2; }, 21) == 42); - double d = 2.0; - assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0); - assert (d == 5.0); - assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0); - assert (d == 5.0); -} -{ - // Test use of variadic templates - using cxx11test::sum; - auto a = sum(1); - auto b = sum(1, 2); - auto c = sum(1.0, 2.0, 3.0); -} -{ - // Test constructor delegation - cxx11test::delegate d1; - cxx11test::delegate d2(); - cxx11test::delegate d3(45); -} -{ - // Test override and final - cxx11test::overridden o1(55464); -} -{ - // Test nullptr - char *c = nullptr; -} -{ - // Test template brackets - test_template<::test_template> v(test_template(12)); -} -{ - // Unicode literals - char const *utf8 = u8"UTF-8 string \u2500"; - char16_t const *utf16 = u"UTF-8 string \u2500"; - char32_t const *utf32 = U"UTF-32 string \u2500"; -} -' - -# Test code for whether the C compiler supports C++11 (complete). -ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals} -${ac_cxx_conftest_cxx11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_cxx_conftest_cxx98_main} - ${ac_cxx_conftest_cxx11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C++98 (complete). -ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals} -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_cxx_conftest_cxx98_main} - return ok; -} -" - -as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" -as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" -as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" -as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" -as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" -as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" -as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" -as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" -as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" - -# Auxiliary files required by this configure script. -ac_aux_files="install-sh config.guess config.sub ltmain.sh" - -# Locations in which to look for auxiliary files. -ac_aux_dir_candidates="${srcdir}/config" - -# Search for a directory containing all of the required auxiliary files, -# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. -# If we don't find one directory that contains all the files we need, -# we report the set of missing files from the *first* directory in -# $ac_aux_dir_candidates and give up. -ac_missing_aux_files="" -ac_first_candidate=: -printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in $ac_aux_dir_candidates -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - - printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 - ac_aux_dir_found=yes - ac_install_sh= - for ac_aux in $ac_aux_files - do - # As a special case, if "install-sh" is required, that requirement - # can be satisfied by any of "install-sh", "install.sh", or "shtool", - # and $ac_install_sh is set appropriately for whichever one is found. - if test x"$ac_aux" = x"install-sh" - then - if test -f "${as_dir}install-sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 - ac_install_sh="${as_dir}install-sh -c" - elif test -f "${as_dir}install.sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 - ac_install_sh="${as_dir}install.sh -c" - elif test -f "${as_dir}shtool"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 - ac_install_sh="${as_dir}shtool install -c" - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} install-sh" - else - break - fi - fi - else - if test -f "${as_dir}${ac_aux}"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" - else - break - fi - fi - fi - done - if test "$ac_aux_dir_found" = yes; then - ac_aux_dir="$as_dir" - break - fi - ac_first_candidate=false - - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 -fi - - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -if test -f "${ac_aux_dir}config.guess"; then - ac_config_guess="$SHELL ${ac_aux_dir}config.guess" -fi -if test -f "${ac_aux_dir}config.sub"; then - ac_config_sub="$SHELL ${ac_aux_dir}config.sub" -fi -if test -f "$ac_aux_dir/configure"; then - ac_configure="$SHELL ${ac_aux_dir}configure" -fi - # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -3246,12 +2713,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -3260,24 +2727,24 @@ printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -3287,12 +2754,11 @@ printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' - and start over" "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -3313,6 +2779,34 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +ac_aux_dir= +for ac_dir in config "$srcdir"/config; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + @@ -3325,12 +2819,10 @@ AM_DEFAULT_VERBOSITY=1 # Programs # - - case `pwd` in *\ * | *\ *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac @@ -3350,32 +2842,28 @@ macro_revision='2.4.6' - ltmain=$ac_aux_dir/ltmain.sh +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - - # Make sure we can run config.sub. -$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -printf %s "checking build system type... " >&6; } -if test ${ac_cv_build+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -printf "%s\n" "$ac_cv_build" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -3394,22 +2882,21 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -printf %s "checking host system type... " >&6; } -if test ${ac_cv_host+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -printf "%s\n" "$ac_cv_host" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -3449,8 +2936,8 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -printf %s "checking how to print strings... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -3476,12 +2963,12 @@ func_echo_all () } case $ECHO in - printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -printf "%s\n" "printf" >&6; } ;; - print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -printf "%s\n" "print -r" >&6; } ;; - *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -printf "%s\n" "cat" >&6; } ;; + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; esac @@ -3494,15 +2981,6 @@ esac - - - - - - - - - @@ -3514,12 +2992,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3527,15 +3004,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3546,11 +3019,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3559,12 +3032,11 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3572,15 +3044,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3591,11 +3059,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3603,8 +3071,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3617,12 +3085,11 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3630,15 +3097,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3649,11 +3112,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3662,12 +3125,11 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3676,19 +3138,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3704,18 +3162,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3726,12 +3184,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3739,15 +3196,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3758,11 +3211,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3775,12 +3228,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3788,15 +3240,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3807,11 +3255,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3823,8 +3271,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3832,129 +3280,25 @@ esac fi fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -fi - - -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -3964,7 +3308,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -3972,7 +3316,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -3984,9 +3328,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -4007,12 +3351,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -4029,7 +3372,7 @@ do # certainly right. break;; *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -4045,46 +3388,44 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop +else ac_file='' fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -4098,15 +3439,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -4115,7 +3456,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -4127,8 +3468,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -4136,10 +3477,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -4147,40 +3488,39 @@ printf "%s\n" "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4194,12 +3534,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -4208,32 +3547,31 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -4243,33 +3581,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -4278,60 +3612,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -4346,144 +3677,94 @@ else CFLAGS= fi fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC -fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi ac_ext=cpp @@ -4492,12 +3773,11 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -printf %s "checking for a sed that does not truncate output... " >&6; } -if test ${ac_cv_path_SED+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" @@ -4511,15 +3791,10 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in sed gsed - do + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED @@ -4528,13 +3803,13 @@ case `"$ac_path_SED" --version 2>&1` in ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" '' >> "conftest.nl" + $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -4562,8 +3837,8 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -printf "%s\n" "$ac_cv_path_SED" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -4580,12 +3855,11 @@ Xsed="$SED -e 1s/^X//" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -printf %s "checking for grep that handles long lines and -e... " >&6; } -if test ${ac_cv_path_GREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -4593,15 +3867,10 @@ else $as_nop for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in grep ggrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP @@ -4610,13 +3879,13 @@ case `"$ac_path_GREP" --version 2>&1` in ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'GREP' >> "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -4644,17 +3913,16 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -printf "%s\n" "$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -printf %s "checking for egrep... " >&6; } -if test ${ac_cv_path_EGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else @@ -4665,15 +3933,10 @@ else $as_nop for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in egrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP @@ -4682,13 +3945,13 @@ case `"$ac_path_EGREP" --version 2>&1` in ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -4717,17 +3980,16 @@ fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -printf "%s\n" "$ac_cv_path_EGREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -printf %s "checking for fgrep... " >&6; } -if test ${ac_cv_path_FGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else @@ -4738,15 +4000,10 @@ else $as_nop for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in fgrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP @@ -4755,13 +4012,13 @@ case `"$ac_path_FGREP" --version 2>&1` in ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'FGREP' >> "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -4790,8 +4047,8 @@ fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -printf "%s\n" "$ac_cv_path_FGREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -4816,18 +4073,17 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} -then : +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else $as_nop +else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw @@ -4856,16 +4112,15 @@ printf %s "checking for ld used by $CC... " >&6; } ;; esac elif test yes = "$with_gnu_ld"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi -if test ${lt_cv_path_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do @@ -4894,19 +4149,18 @@ fi LD=$lt_cv_path_LD if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -printf "%s\n" "$LD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${lt_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 -printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -4929,12 +4183,11 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test ${lt_cv_path_NM+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM @@ -4984,8 +4237,8 @@ else : ${lt_cv_path_NM=no} fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -printf "%s\n" "$lt_cv_path_NM" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else @@ -4998,12 +4251,11 @@ else do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else @@ -5011,15 +4263,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5030,11 +4278,11 @@ fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -printf "%s\n" "$DUMPBIN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5047,12 +4295,11 @@ if test -z "$DUMPBIN"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else @@ -5060,15 +4307,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5079,11 +4322,11 @@ fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -printf "%s\n" "$ac_ct_DUMPBIN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5095,8 +4338,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN @@ -5124,12 +4367,11 @@ test -z "$NM" && NM=nm -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -printf %s "checking the name lister ($NM) interface... " >&6; } -if test ${lt_cv_nm_interface+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) @@ -5145,27 +4387,26 @@ else $as_nop fi rm -f conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -printf "%s\n" "$lt_cv_nm_interface" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -printf %s "checking whether ln -s works... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -printf "%s\n" "no, using $LN_S" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -printf %s "checking the maximum length of command line arguments... " >&6; } -if test ${lt_cv_sys_max_cmd_len+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else i=0 teststring=ABCD @@ -5292,11 +4533,11 @@ else $as_nop fi if test -n "$lt_cv_sys_max_cmd_len"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 -printf "%s\n" "none" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -5340,12 +4581,11 @@ esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -printf %s "checking how to convert $build file names to $host format... " >&6; } -if test ${lt_cv_to_host_file_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else case $host in *-*-mingw* ) case $build in @@ -5381,19 +4621,18 @@ esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -printf %s "checking how to convert $build file names to toolchain format... " >&6; } -if test ${lt_cv_to_tool_file_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in @@ -5409,23 +4648,22 @@ esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -printf %s "checking for $LD option to reload object files... " >&6; } -if test ${lt_cv_ld_reload_flag+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ld_reload_flag='-r' fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; @@ -5458,12 +4696,11 @@ esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else @@ -5471,15 +4708,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5490,11 +4723,11 @@ fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -printf "%s\n" "$OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5503,12 +4736,11 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else @@ -5516,15 +4748,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5535,11 +4763,11 @@ fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -printf "%s\n" "$ac_ct_OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -5547,8 +4775,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -5567,12 +4795,11 @@ test -z "$OBJDUMP" && OBJDUMP=objdump -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -printf %s "checking how to recognize dependent libraries... " >&6; } -if test ${lt_cv_deplibs_check_method+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' @@ -5768,8 +4995,8 @@ os2*) esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no @@ -5813,12 +5040,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else @@ -5826,15 +5052,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5845,11 +5067,11 @@ fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -printf "%s\n" "$DLLTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5858,12 +5080,11 @@ if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else @@ -5871,15 +5092,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5890,11 +5107,11 @@ fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -printf "%s\n" "$ac_ct_DLLTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then @@ -5902,8 +5119,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL @@ -5923,12 +5140,11 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -printf %s "checking how to associate runtime and link libraries... " >&6; } -if test ${lt_cv_sharedlib_from_linklib_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in @@ -5951,8 +5167,8 @@ cygwin* | mingw* | pw32* | cegcc*) esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -5962,12 +5178,6 @@ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5978,16 +5188,15 @@ if test -z "$CXX"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else @@ -5995,15 +5204,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6014,11 +5219,11 @@ fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -printf "%s\n" "$CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6027,16 +5232,15 @@ fi fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else @@ -6044,15 +5248,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6063,11 +5263,11 @@ fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -printf "%s\n" "$ac_ct_CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6079,8 +5279,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX @@ -6090,7 +5290,7 @@ fi fi fi # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -6100,7 +5300,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -6110,21 +5310,20 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5 -printf %s "checking whether the compiler supports GNU C++... " >&6; } -if test ${ac_cv_cxx_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -6134,33 +5333,29 @@ main (void) return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi -ac_test_CXXFLAGS=${CXXFLAGS+y} +ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -printf %s "checking whether $CXX accepts -g... " >&6; } -if test ${ac_cv_prog_cxx_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no @@ -6169,60 +5364,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes -else $as_nop +else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : -else $as_nop +else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } -if test $ac_test_CXXFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then @@ -6237,100 +5429,6 @@ else CXXFLAGS= fi fi -ac_prog_cxx_stdcxx=no -if test x$ac_prog_cxx_stdcxx = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 -printf %s "checking for $CXX option to enable C++11 features... " >&6; } -if test ${ac_cv_prog_cxx_11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cxx_11=no -ac_save_CXX=$CXX -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_cxx_conftest_cxx11_program -_ACEOF -for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA -do - CXX="$ac_save_CXX $ac_arg" - if ac_fn_cxx_try_compile "$LINENO" -then : - ac_cv_prog_cxx_cxx11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cxx_cxx11" != "xno" && break -done -rm -f conftest.$ac_ext -CXX=$ac_save_CXX -fi - -if test "x$ac_cv_prog_cxx_cxx11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cxx_cxx11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 -printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } - CXX="$CXX $ac_cv_prog_cxx_cxx11" -fi - ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 - ac_prog_cxx_stdcxx=cxx11 -fi -fi -if test x$ac_prog_cxx_stdcxx = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 -printf %s "checking for $CXX option to enable C++98 features... " >&6; } -if test ${ac_cv_prog_cxx_98+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cxx_98=no -ac_save_CXX=$CXX -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_cxx_conftest_cxx98_program -_ACEOF -for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA -do - CXX="$ac_save_CXX $ac_arg" - if ac_fn_cxx_try_compile "$LINENO" -then : - ac_cv_prog_cxx_cxx98=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cxx_cxx98" != "xno" && break -done -rm -f conftest.$ac_ext -CXX=$ac_save_CXX -fi - -if test "x$ac_cv_prog_cxx_cxx98" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cxx_cxx98" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 -printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } - CXX="$CXX $ac_cv_prog_cxx_cxx98" -fi - ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 - ac_prog_cxx_stdcxx=cxx98 -fi -fi - ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6343,12 +5441,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -6356,15 +5453,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6375,11 +5468,11 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6392,12 +5485,11 @@ if test -z "$AR"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -6405,15 +5497,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6424,11 +5512,11 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -printf "%s\n" "$ac_ct_AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6440,8 +5528,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -6461,32 +5549,30 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -printf %s "checking for archiver @FILE support... " >&6; } -if test ${lt_cv_ar_at_file+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. @@ -6494,7 +5580,7 @@ then : { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ @@ -6503,11 +5589,11 @@ then : rm -f conftest.* libconftest.a fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -printf "%s\n" "$lt_cv_ar_at_file" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= @@ -6524,12 +5610,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -6537,15 +5622,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6556,11 +5637,11 @@ fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6569,12 +5650,11 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -6582,15 +5662,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6601,11 +5677,11 @@ fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -6613,8 +5689,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -6633,12 +5709,11 @@ test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_RANLIB+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else @@ -6646,15 +5721,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6665,11 +5736,11 @@ fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -printf "%s\n" "$RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6678,12 +5749,11 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_RANLIB+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else @@ -6691,15 +5761,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6710,11 +5776,11 @@ fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -printf "%s\n" "$ac_ct_RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -6722,8 +5788,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -6787,12 +5853,11 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AWK+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else @@ -6800,15 +5865,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6819,11 +5880,11 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -printf "%s\n" "$AWK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6859,12 +5920,11 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -printf %s "checking command to parse $NM output from $compiler object... " >&6; } -if test ${lt_cv_sys_global_symbol_pipe+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] @@ -7016,14 +6076,14 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then @@ -7092,7 +6152,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi @@ -7127,11 +6187,11 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -printf "%s\n" "ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi # Response file support. @@ -7177,14 +6237,13 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -printf %s "checking for sysroot... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. -if test ${with_sysroot+y} -then : +if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; -else $as_nop +else with_sysroot=no fi @@ -7202,25 +6261,24 @@ case $with_sysroot in #( no|'') ;; #( *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -printf "%s\n" "$with_sysroot" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -printf "%s\n" "${lt_sysroot:-no}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -printf %s "checking for a working dd... " >&6; } -if test ${ac_cv_path_lt_DD+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} @@ -7231,15 +6289,10 @@ if test -z "$lt_DD"; then for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in dd - do + test -z "$as_dir" && as_dir=. + for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ @@ -7259,16 +6312,15 @@ fi rm -f conftest.i conftest2.i conftest.out fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -printf "%s\n" "$ac_cv_path_lt_DD" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -printf %s "checking how to truncate binary pipes... " >&6; } -if test ${lt_cv_truncate_bin+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= @@ -7279,8 +6331,8 @@ fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -printf "%s\n" "$lt_cv_truncate_bin" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } @@ -7304,8 +6356,7 @@ func_cc_basename () # Check whether --enable-libtool-lock was given. -if test ${enable_libtool_lock+y} -then : +if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi @@ -7321,7 +6372,7 @@ ia64-*-hpux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) @@ -7341,7 +6392,7 @@ ia64-*-hpux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in @@ -7379,7 +6430,7 @@ mips64*-*linux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in @@ -7420,7 +6471,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) @@ -7483,12 +6534,11 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -printf %s "checking whether the C compiler needs -belf... " >&6; } -if test ${lt_cv_cc_needs_belf+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7499,20 +6549,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes -else $as_nop +else lt_cv_cc_needs_belf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7521,8 +6570,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS @@ -7535,7 +6584,7 @@ printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) @@ -7572,12 +6621,11 @@ need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else @@ -7585,15 +6633,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7604,11 +6648,11 @@ fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -printf "%s\n" "$MANIFEST_TOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7617,12 +6661,11 @@ if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else @@ -7630,15 +6673,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7649,11 +6688,11 @@ fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then @@ -7661,8 +6700,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL @@ -7672,12 +6711,11 @@ else fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if test ${lt_cv_path_mainfest_tool+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out @@ -7687,8 +6725,8 @@ else $as_nop fi rm -f conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -7703,12 +6741,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else @@ -7716,15 +6753,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7735,11 +6768,11 @@ fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -printf "%s\n" "$DSYMUTIL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7748,12 +6781,11 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else @@ -7761,15 +6793,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7780,11 +6808,11 @@ fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then @@ -7792,8 +6820,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL @@ -7805,12 +6833,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_NMEDIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else @@ -7818,15 +6845,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7837,11 +6860,11 @@ fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -printf "%s\n" "$NMEDIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7850,12 +6873,11 @@ if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_NMEDIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else @@ -7863,15 +6885,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7882,11 +6900,11 @@ fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -printf "%s\n" "$ac_ct_NMEDIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then @@ -7894,8 +6912,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT @@ -7907,12 +6925,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_LIPO+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else @@ -7920,15 +6937,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7939,11 +6952,11 @@ fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -printf "%s\n" "$LIPO" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7952,12 +6965,11 @@ if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_LIPO+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else @@ -7965,15 +6977,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7984,11 +6992,11 @@ fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -printf "%s\n" "$ac_ct_LIPO" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then @@ -7996,8 +7004,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO @@ -8009,12 +7017,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else @@ -8022,15 +7029,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8041,11 +7044,11 @@ fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -printf "%s\n" "$OTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8054,12 +7057,11 @@ if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else @@ -8067,15 +7069,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8086,11 +7084,11 @@ fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -printf "%s\n" "$ac_ct_OTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then @@ -8098,8 +7096,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL @@ -8111,12 +7109,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL64+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else @@ -8124,15 +7121,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8143,11 +7136,11 @@ fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -printf "%s\n" "$OTOOL64" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8156,12 +7149,11 @@ if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL64+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else @@ -8169,15 +7161,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8188,11 +7176,11 @@ fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -printf "%s\n" "$ac_ct_OTOOL64" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then @@ -8200,8 +7188,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 @@ -8236,12 +7224,11 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -printf %s "checking for -single_module linker flag... " >&6; } -if test ${lt_cv_apple_cc_single_mod+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override @@ -8270,15 +7257,14 @@ else $as_nop rm -f conftest.* fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -printf %s "checking for -exported_symbols_list linker flag... " >&6; } -if test ${lt_cv_ld_exported_symbols_list+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym @@ -8287,33 +7273,31 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes -else $as_nop +else lt_cv_ld_exported_symbols_list=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -printf %s "checking for -force_load linker flag... " >&6; } -if test ${lt_cv_ld_force_load+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} @@ -8341,8 +7325,8 @@ _LT_EOF rm -rf conftest.dSYM fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -printf "%s\n" "$lt_cv_ld_force_load" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; @@ -8408,43 +7392,286 @@ func_munge_path_list () esac } -ac_header= ac_cache= -for ac_item in $ac_header_c_list +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h - fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi -done - - - + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then +$as_echo "#define STDC_HEADERS 1" >>confdefs.h -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : +fi -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = xyes -then : - printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF fi +done + func_stripname_cnf () @@ -8470,8 +7697,7 @@ func_stripname_cnf () # Check whether --enable-shared was given. -if test ${enable_shared+y} -then : +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -8489,7 +7715,7 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop +else enable_shared=yes fi @@ -8502,8 +7728,7 @@ fi # Check whether --enable-static was given. -if test ${enable_static+y} -then : +if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -8521,7 +7746,7 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop +else enable_static=yes fi @@ -8535,8 +7760,7 @@ fi # Check whether --with-pic was given. -if test ${with_pic+y} -then : +if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; @@ -8553,7 +7777,7 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop +else pic_mode=default fi @@ -8565,8 +7789,7 @@ fi # Check whether --enable-fast-install was given. -if test ${enable_fast_install+y} -then : +if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -8584,7 +7807,7 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop +else enable_fast_install=yes fi @@ -8598,12 +7821,11 @@ fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -printf %s "checking which variant of shared library versioning to provide... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. -if test ${with_aix_soname+y} -then : +if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; @@ -8612,19 +7834,18 @@ then : ;; esac lt_cv_with_aix_soname=$with_aix_soname -else $as_nop - if test ${lt_cv_with_aix_soname+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -printf "%s\n" "$with_aix_soname" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', @@ -8706,12 +7927,11 @@ if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -printf %s "checking for objdir... " >&6; } -if test ${lt_cv_objdir+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then @@ -8722,15 +7942,17 @@ else fi rmdir .libs 2>/dev/null fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -printf "%s\n" "$lt_cv_objdir" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir -printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF @@ -8776,12 +7998,11 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -printf %s "checking for ${ac_tool_prefix}file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -8830,11 +8051,11 @@ fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8843,12 +8064,11 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -printf %s "checking for file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -8897,11 +8117,11 @@ fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8986,12 +8206,11 @@ if test yes = "$GCC"; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test ${lt_cv_prog_compiler_rtti_exceptions+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -9022,8 +8241,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" @@ -9380,28 +8599,26 @@ case $host_os in ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -9432,8 +8649,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in @@ -9461,12 +8678,11 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" @@ -9490,8 +8706,8 @@ else $as_nop LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : @@ -9505,12 +8721,11 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -9553,20 +8768,19 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -9609,8 +8823,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -9618,19 +8832,19 @@ printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -printf %s "checking if we can lock with hard links... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -printf "%s\n" "$hard_links" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } if test no = "$hard_links"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -9642,8 +8856,8 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= @@ -10198,23 +9412,21 @@ _LT_EOF if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10229,7 +9441,7 @@ then : lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -10253,23 +9465,21 @@ fi if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10284,7 +9494,7 @@ then : lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -10535,12 +9745,11 @@ fi # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -printf %s "checking if $CC understands -b... " >&6; } -if test ${lt_cv_prog_compiler__b+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" @@ -10564,8 +9773,8 @@ else $as_nop LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -10605,30 +9814,28 @@ fi # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test ${lt_cv_irix_exported_symbol+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes -else $as_nop +else lt_cv_irix_exported_symbol=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi @@ -10908,8 +10115,8 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -printf "%s\n" "$ld_shlibs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -10945,19 +10152,18 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -printf %s "checking whether -lc should be explicitly linked in... " >&6; } -if test ${lt_cv_archive_cmds_need_lc+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -10975,7 +10181,7 @@ else $as_nop if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no @@ -10989,8 +10195,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac @@ -11149,8 +10355,8 @@ esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -printf %s "checking dynamic linker characteristics... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in @@ -11711,10 +10917,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if test ${lt_cv_shlibpath_overrides_runpath+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir @@ -11724,21 +10929,19 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null -then : +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -11970,8 +11173,8 @@ uts4*) dynamic_linker=no ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -printf "%s\n" "$dynamic_linker" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -12092,8 +11295,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -printf %s "checking how to hardcode library paths into programs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || @@ -12117,8 +11320,8 @@ else # directories. hardcode_action=unsupported fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -printf "%s\n" "$hardcode_action" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then @@ -12162,12 +11365,11 @@ else darwin*) # if libdl is installed we need to link against it - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12176,31 +11378,32 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else $as_nop +else lt_cv_dlopen=dyld lt_cv_dlopen_libs= @@ -12220,16 +11423,14 @@ fi *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes -then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -printf %s "checking for shl_load in -ldld... " >&6; } -if test ${ac_cv_lib_dld_shl_load+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12238,42 +11439,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char shl_load (); int -main (void) +main () { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes -else $as_nop +else ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else $as_nop +else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes -then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12282,37 +11482,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -printf %s "checking for dlopen in -lsvld... " >&6; } -if test ${ac_cv_lib_svld_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12321,37 +11521,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes -else $as_nop +else ac_cv_lib_svld_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -printf %s "checking for dld_link in -ldld... " >&6; } -if test ${ac_cv_lib_dld_dld_link+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12360,29 +11560,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dld_link (); int -main (void) +main () { return dld_link (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes -else $as_nop +else ac_cv_lib_dld_dld_link=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -12421,12 +11622,11 @@ fi save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -printf %s "checking whether a program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else @@ -12505,7 +11705,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -12523,17 +11723,16 @@ rm -fr conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -printf "%s\n" "$lt_cv_dlopen_self" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -printf %s "checking whether a statically linked program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self_static+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else @@ -12612,7 +11811,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -12630,8 +11829,8 @@ rm -fr conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS @@ -12669,13 +11868,13 @@ fi striplib= old_striplib= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -printf %s "checking whether stripping libraries is possible... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in @@ -12683,16 +11882,16 @@ else if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; esac fi @@ -12709,13 +11908,13 @@ fi # Report what library types will actually be built - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -printf %s "checking if libtool supports shared libraries... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -printf "%s\n" "$can_build_shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -printf %s "checking whether to build shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -12739,15 +11938,15 @@ printf %s "checking whether to build shared libraries... " >&6; } fi ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -printf "%s\n" "$enable_shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -printf %s "checking whether to build static libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -printf "%s\n" "$enable_static" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } @@ -12769,32 +11968,36 @@ ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -printf %s "checking how to run the C++ preprocessor... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then - if test ${ac_cv_prog_CXXCPP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CXX needs to be expanded - for CXXCPP in "$CXX -E" cpp /lib/cpp + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF -if ac_fn_cxx_try_cpp "$LINENO" -then : +if ac_fn_cxx_try_cpp "$LINENO"; then : -else $as_nop +else # Broken: fails on valid input. continue fi @@ -12806,11 +12009,10 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_cxx_try_cpp "$LINENO" -then : +if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue -else $as_nop +else # Passes both tests. ac_preproc_ok=: break @@ -12820,8 +12022,7 @@ rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : +if $ac_preproc_ok; then : break fi @@ -12833,24 +12034,29 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -printf "%s\n" "$CXXCPP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF -if ac_fn_cxx_try_cpp "$LINENO" -then : +if ac_fn_cxx_try_cpp "$LINENO"; then : -else $as_nop +else # Broken: fails on valid input. continue fi @@ -12862,11 +12068,10 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_cxx_try_cpp "$LINENO" -then : +if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue -else $as_nop +else # Passes both tests. ac_preproc_ok=: break @@ -12876,12 +12081,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : +if $ac_preproc_ok; then : -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi @@ -13017,18 +12221,17 @@ cc_basename=$func_cc_basename_result # Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} -then : +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else $as_nop +else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw @@ -13057,16 +12260,15 @@ printf %s "checking for ld used by $CC... " >&6; } ;; esac elif test yes = "$with_gnu_ld"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi -if test ${lt_cv_path_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do @@ -13095,19 +12297,18 @@ fi LD=$lt_cv_path_LD if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -printf "%s\n" "$LD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${lt_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 -printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -13173,8 +12374,8 @@ with_gnu_ld=$lt_cv_prog_gnu_ld fi # PORTME: fill in a description of your system's C++ link characteristics - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) @@ -13312,23 +12513,21 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath__CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -13343,7 +12542,7 @@ then : lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib @@ -13368,23 +12567,21 @@ fi if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath__CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -13399,7 +12596,7 @@ then : lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib @@ -14250,8 +13447,8 @@ fi ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -printf "%s\n" "$ld_shlibs_CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no GCC_CXX=$GXX @@ -14289,7 +13486,7 @@ esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. @@ -14770,28 +13967,26 @@ case $host_os in ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -14822,8 +14017,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in @@ -14845,12 +14040,11 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" @@ -14874,8 +14068,8 @@ else $as_nop LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : @@ -14886,12 +14080,11 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest @@ -14934,17 +14127,16 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest @@ -14987,8 +14179,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } @@ -14996,19 +14188,19 @@ printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -printf %s "checking if we can lock with hard links... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -printf "%s\n" "$hard_links" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } if test no = "$hard_links"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -15017,8 +14209,8 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' @@ -15057,8 +14249,8 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -printf "%s\n" "$ld_shlibs_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld @@ -15085,19 +14277,18 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -printf %s "checking whether -lc should be explicitly linked in... " >&6; } -if test ${lt_cv_archive_cmds_need_lc_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -15115,7 +14306,7 @@ else $as_nop if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no @@ -15129,8 +14320,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 -printf "%s\n" "$lt_cv_archive_cmds_need_lc_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac @@ -15199,8 +14390,8 @@ esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -printf %s "checking dynamic linker characteristics... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' @@ -15688,10 +14879,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if test ${lt_cv_shlibpath_overrides_runpath+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir @@ -15701,21 +14891,19 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null -then : +if ac_fn_cxx_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -15947,8 +15135,8 @@ uts4*) dynamic_linker=no ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -printf "%s\n" "$dynamic_linker" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -16012,8 +15200,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -printf %s "checking how to hardcode library paths into programs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || @@ -16037,8 +15225,8 @@ else # directories. hardcode_action_CXX=unsupported fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -printf "%s\n" "$hardcode_action_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 +$as_echo "$hardcode_action_CXX" >&6; } if test relink = "$hardcode_action_CXX" || test yes = "$inherit_rpath_CXX"; then @@ -16106,12 +15294,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -16119,15 +15306,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -16138,11 +15321,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -16151,12 +15334,11 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -16164,15 +15346,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -16183,11 +15361,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -16195,8 +15373,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -16209,12 +15387,11 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -16222,15 +15399,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -16241,11 +15414,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -16254,12 +15427,11 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -16268,19 +15440,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -16296,18 +15464,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -16318,12 +15486,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -16331,15 +15498,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -16350,11 +15513,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -16367,12 +15530,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -16380,15 +15542,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -16399,11 +15557,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -16415,138 +15573,34 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi -fi - - -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -16556,21 +15610,20 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -16580,33 +15633,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -16615,60 +15664,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -16683,144 +15729,94 @@ else CFLAGS= fi fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC -fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi ac_ext=cpp @@ -16839,16 +15835,15 @@ if test -z "$CXX"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else @@ -16856,15 +15851,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -16875,11 +15866,11 @@ fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -printf "%s\n" "$CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -16888,16 +15879,15 @@ fi fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else @@ -16905,15 +15895,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -16924,11 +15910,11 @@ fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -printf "%s\n" "$ac_ct_CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -16940,8 +15926,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX @@ -16951,7 +15937,7 @@ fi fi fi # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -16961,7 +15947,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -16971,21 +15957,20 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5 -printf %s "checking whether the compiler supports GNU C++... " >&6; } -if test ${ac_cv_cxx_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -16995,33 +15980,29 @@ main (void) return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi -ac_test_CXXFLAGS=${CXXFLAGS+y} +ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -printf %s "checking whether $CXX accepts -g... " >&6; } -if test ${ac_cv_prog_cxx_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no @@ -17030,60 +16011,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes -else $as_nop +else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : -else $as_nop +else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } -if test $ac_test_CXXFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then @@ -17098,100 +16076,6 @@ else CXXFLAGS= fi fi -ac_prog_cxx_stdcxx=no -if test x$ac_prog_cxx_stdcxx = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 -printf %s "checking for $CXX option to enable C++11 features... " >&6; } -if test ${ac_cv_prog_cxx_11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cxx_11=no -ac_save_CXX=$CXX -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_cxx_conftest_cxx11_program -_ACEOF -for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA -do - CXX="$ac_save_CXX $ac_arg" - if ac_fn_cxx_try_compile "$LINENO" -then : - ac_cv_prog_cxx_cxx11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cxx_cxx11" != "xno" && break -done -rm -f conftest.$ac_ext -CXX=$ac_save_CXX -fi - -if test "x$ac_cv_prog_cxx_cxx11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cxx_cxx11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 -printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } - CXX="$CXX $ac_cv_prog_cxx_cxx11" -fi - ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 - ac_prog_cxx_stdcxx=cxx11 -fi -fi -if test x$ac_prog_cxx_stdcxx = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 -printf %s "checking for $CXX option to enable C++98 features... " >&6; } -if test ${ac_cv_prog_cxx_98+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cxx_98=no -ac_save_CXX=$CXX -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_cxx_conftest_cxx98_program -_ACEOF -for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA -do - CXX="$ac_save_CXX $ac_arg" - if ac_fn_cxx_try_compile "$LINENO" -then : - ac_cv_prog_cxx_cxx98=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cxx_cxx98" != "xno" && break -done -rm -f conftest.$ac_ext -CXX=$ac_save_CXX -fi - -if test "x$ac_cv_prog_cxx_cxx98" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cxx_cxx98" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 -printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } - CXX="$CXX $ac_cv_prog_cxx_cxx98" -fi - ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 - ac_prog_cxx_stdcxx=cxx98 -fi -fi - ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -17202,12 +16086,11 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AWK+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else @@ -17215,15 +16098,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -17234,23 +16113,22 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -printf "%s\n" "$AWK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -n "$AWK" && break done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -printf %s "checking for a sed that does not truncate output... " >&6; } -if test ${ac_cv_path_SED+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" @@ -17264,15 +16142,10 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in sed gsed - do + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED @@ -17281,13 +16154,13 @@ case `"$ac_path_SED" --version 2>&1` in ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" '' >> "conftest.nl" + $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -17315,13 +16188,12 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -printf "%s\n" "$ac_cv_path_SED" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed - - # Find a good install program. We prefer a C program (faster), +# Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install @@ -17335,25 +16207,20 @@ printf "%s\n" "$ac_cv_path_SED" >&6; } # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -printf %s "checking for a BSD-compatible install... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test ${ac_cv_path_install+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - # Account for fact that we put trailing slashes in our PATH walk. -case $as_dir in #(( - ./ | /[cC]/* | \ + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; @@ -17363,13 +16230,13 @@ case $as_dir in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && - grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && - grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else @@ -17377,12 +16244,12 @@ case $as_dir in #(( echo one > conftest.one echo two > conftest.two mkdir conftest.dir - if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then - ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi @@ -17398,7 +16265,7 @@ IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi - if test ${ac_cv_path_install+y}; then + if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a @@ -17408,8 +16275,8 @@ fi INSTALL=$ac_install_sh fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -printf "%s\n" "$INSTALL" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -17420,25 +16287,24 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -printf %s "checking whether ln -s works... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -printf "%s\n" "no, using $LN_S" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval test \${ac_cv_prog_make_${ac_make}_set+y} -then : - printf %s "(cached) " >&6 -else $as_nop +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -17454,12 +16320,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -17473,39 +16339,34 @@ fi - if test -z "$CTAGS" -then : + if test -z "$CTAGS"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ctags executable path has been provided" >&5 -printf %s "checking whether ctags executable path has been provided... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ctags executable path has been provided" >&5 +$as_echo_n "checking whether ctags executable path has been provided... " >&6; } # Check whether --with-ctags was given. -if test ${with_ctags+y} -then : +if test "${with_ctags+set}" = set; then : withval=$with_ctags; - if test "$withval" != yes && test "$withval" != no -then : + if test "$withval" != yes && test "$withval" != no; then : CTAGS="$withval" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CTAGS" >&5 -printf "%s\n" "$CTAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CTAGS" >&5 +$as_echo "$CTAGS" >&6; } -else $as_nop +else CTAGS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - if test "$withval" != no -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test "$withval" != no; then : # Extract the first word of "ctags", so it can be a program name with args. set dummy ctags; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_CTAGS+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_CTAGS+:} false; then : + $as_echo_n "(cached) " >&6 +else case $CTAGS in [\\/]* | ?:[\\/]*) ac_cv_path_CTAGS="$CTAGS" # Let the user override the test with a path. @@ -17515,15 +16376,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_CTAGS="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_CTAGS="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -17535,11 +16392,11 @@ esac fi CTAGS=$ac_cv_path_CTAGS if test -n "$CTAGS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CTAGS" >&5 -printf "%s\n" "$CTAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CTAGS" >&5 +$as_echo "$CTAGS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -17548,18 +16405,17 @@ fi fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } # Extract the first word of "ctags", so it can be a program name with args. set dummy ctags; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_CTAGS+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_CTAGS+:} false; then : + $as_echo_n "(cached) " >&6 +else case $CTAGS in [\\/]* | ?:[\\/]*) ac_cv_path_CTAGS="$CTAGS" # Let the user override the test with a path. @@ -17569,15 +16425,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_CTAGS="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_CTAGS="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -17589,11 +16441,11 @@ esac fi CTAGS=$ac_cv_path_CTAGS if test -n "$CTAGS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CTAGS" >&5 -printf "%s\n" "$CTAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CTAGS" >&5 +$as_echo "$CTAGS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -17608,20 +16460,18 @@ fi -if test x${CTAGS} = x -then : +if test x${CTAGS} = x; then : as_fn_error $? "Required program ctags was not found" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${CTAGS} is exuberant" >&5 -printf %s "checking whether ${CTAGS} is exuberant... " >&6; } -if ! ${CTAGS} --version | grep -q Exuberant -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CTAGS} is exuberant" >&5 +$as_echo_n "checking whether ${CTAGS} is exuberant... " >&6; } +if ! ${CTAGS} --version | grep -q Exuberant; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? "exuberant ctags is required, but ${CTAGS} is a different version" "$LINENO" 5 -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi SO_EXT=$shrext_cmds @@ -17631,34 +16481,32 @@ SO_EXT=$shrext_cmds # System/Compiler Features # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -printf %s "checking for inline... " >&6; } -if test ${ac_cv_c_inline+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; -static $ac_kw foo_t static_foo (void) {return 0; } -$ac_kw foo_t foo (void) {return 0; } +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } #endif _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -printf "%s\n" "$ac_cv_c_inline" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; @@ -17688,15 +16536,19 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do - cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx20_$switch" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++20 features with $switch" >&5 -printf %s "checking whether $CXX supports C++20 features with $switch... " >&6; } -if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do + if test x"$switch" = xMSVC; then + switch=-std:c++${alternative} + cachevar=`$as_echo "ax_cv_cxx_compile_cxx20_${switch}_MSVC" | $as_tr_sh` + else + cachevar=`$as_echo "ax_cv_cxx_compile_cxx20_$switch" | $as_tr_sh` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++20 features with $switch" >&5 +$as_echo_n "checking whether $CXX supports C++20 features with $switch... " >&6; } +if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_CXX="$CXX" CXX="$CXX $switch" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17710,7 +16562,11 @@ else $as_nop #error "This is not a C++ compiler" -#elif __cplusplus < 201103L +// MSVC always sets __cplusplus to 199711L in older versions; newer versions +// only set it correctly if /Zc:__cplusplus is specified as well as a +// /std:c++NN switch: +// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ +#elif __cplusplus < 201103L && !defined _MSC_VER #error "This is not a C++11 compiler" @@ -17997,7 +16853,7 @@ namespace cxx11 #error "This is not a C++ compiler" -#elif __cplusplus < 201402L +#elif __cplusplus < 201402L && !defined _MSC_VER #error "This is not a C++14 compiler" @@ -18117,7 +16973,7 @@ namespace cxx14 #error "This is not a C++ compiler" -#elif __cplusplus < 201703L +#elif __cplusplus < 201703L && !defined _MSC_VER #error "This is not a C++17 compiler" @@ -18483,7 +17339,7 @@ namespace cxx17 } // namespace cxx17 -#endif // __cplusplus < 201703L +#endif // __cplusplus < 201703L && !defined _MSC_VER @@ -18492,7 +17348,7 @@ namespace cxx17 #error "This is not a C++ compiler" -#elif __cplusplus < 202002L +#elif __cplusplus < 202002L && !defined _MSC_VER #error "This is not a C++20 compiler" @@ -18509,23 +17365,22 @@ namespace cxx20 } // namespace cxx20 -#endif // __cplusplus < 202002L +#endif // __cplusplus < 202002L && !defined _MSC_VER _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : eval $cachevar=yes -else $as_nop +else eval $cachevar=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXX="$ac_save_CXX" fi eval ac_res=\$$cachevar - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } if eval test x\$$cachevar = xyes; then CXX="$CXX $switch" if test -n "$CXXCPP" ; then @@ -18553,18 +17408,17 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi if test x$ac_success = xno; then HAVE_CXX20=0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++20 support was found" >&5 -printf "%s\n" "$as_me: No compiler with C++20 support was found" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++20 support was found" >&5 +$as_echo "$as_me: No compiler with C++20 support was found" >&6;} else HAVE_CXX20=1 -printf "%s\n" "#define HAVE_CXX20 1" >>confdefs.h +$as_echo "#define HAVE_CXX20 1" >>confdefs.h fi -if test x$HAVE_CXX20 != x1 -then : +if test x$HAVE_CXX20 != x1; then : ax_cxx_compile_alternatives="17 1z" ax_cxx_compile_cxx17_required=false ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -18578,15 +17432,19 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do - cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5 -printf %s "checking whether $CXX supports C++17 features with $switch... " >&6; } -if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do + if test x"$switch" = xMSVC; then + switch=-std:c++${alternative} + cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_${switch}_MSVC" | $as_tr_sh` + else + cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5 +$as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; } +if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_CXX="$CXX" CXX="$CXX $switch" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18600,7 +17458,11 @@ else $as_nop #error "This is not a C++ compiler" -#elif __cplusplus < 201103L +// MSVC always sets __cplusplus to 199711L in older versions; newer versions +// only set it correctly if /Zc:__cplusplus is specified as well as a +// /std:c++NN switch: +// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ +#elif __cplusplus < 201103L && !defined _MSC_VER #error "This is not a C++11 compiler" @@ -18887,7 +17749,7 @@ namespace cxx11 #error "This is not a C++ compiler" -#elif __cplusplus < 201402L +#elif __cplusplus < 201402L && !defined _MSC_VER #error "This is not a C++14 compiler" @@ -19007,7 +17869,7 @@ namespace cxx14 #error "This is not a C++ compiler" -#elif __cplusplus < 201703L +#elif __cplusplus < 201703L && !defined _MSC_VER #error "This is not a C++17 compiler" @@ -19373,23 +18235,22 @@ namespace cxx17 } // namespace cxx17 -#endif // __cplusplus < 201703L +#endif // __cplusplus < 201703L && !defined _MSC_VER _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : eval $cachevar=yes -else $as_nop +else eval $cachevar=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXX="$ac_save_CXX" fi eval ac_res=\$$cachevar - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } if eval test x\$$cachevar = xyes; then CXX="$CXX $switch" if test -n "$CXXCPP" ; then @@ -19417,18 +18278,17 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi if test x$ac_success = xno; then HAVE_CXX17=0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++17 support was found" >&5 -printf "%s\n" "$as_me: No compiler with C++17 support was found" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++17 support was found" >&5 +$as_echo "$as_me: No compiler with C++17 support was found" >&6;} else HAVE_CXX17=1 -printf "%s\n" "#define HAVE_CXX17 1" >>confdefs.h +$as_echo "#define HAVE_CXX17 1" >>confdefs.h fi - if test x$HAVE_CXX17 != x1 -then : + if test x$HAVE_CXX17 != x1; then : ax_cxx_compile_alternatives="14 1y" ax_cxx_compile_cxx14_required=false ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -19442,15 +18302,19 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do - cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx14_$switch" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++14 features with $switch" >&5 -printf %s "checking whether $CXX supports C++14 features with $switch... " >&6; } -if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do + if test x"$switch" = xMSVC; then + switch=-std:c++${alternative} + cachevar=`$as_echo "ax_cv_cxx_compile_cxx14_${switch}_MSVC" | $as_tr_sh` + else + cachevar=`$as_echo "ax_cv_cxx_compile_cxx14_$switch" | $as_tr_sh` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++14 features with $switch" >&5 +$as_echo_n "checking whether $CXX supports C++14 features with $switch... " >&6; } +if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_CXX="$CXX" CXX="$CXX $switch" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19464,7 +18328,11 @@ else $as_nop #error "This is not a C++ compiler" -#elif __cplusplus < 201103L +// MSVC always sets __cplusplus to 199711L in older versions; newer versions +// only set it correctly if /Zc:__cplusplus is specified as well as a +// /std:c++NN switch: +// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ +#elif __cplusplus < 201103L && !defined _MSC_VER #error "This is not a C++11 compiler" @@ -19751,7 +18619,7 @@ namespace cxx11 #error "This is not a C++ compiler" -#elif __cplusplus < 201402L +#elif __cplusplus < 201402L && !defined _MSC_VER #error "This is not a C++14 compiler" @@ -19864,18 +18732,17 @@ namespace cxx14 _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : eval $cachevar=yes -else $as_nop +else eval $cachevar=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXX="$ac_save_CXX" fi eval ac_res=\$$cachevar - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } if eval test x\$$cachevar = xyes; then CXX="$CXX $switch" if test -n "$CXXCPP" ; then @@ -19903,18 +18770,17 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi if test x$ac_success = xno; then HAVE_CXX14=0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++14 support was found" >&5 -printf "%s\n" "$as_me: No compiler with C++14 support was found" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++14 support was found" >&5 +$as_echo "$as_me: No compiler with C++14 support was found" >&6;} else HAVE_CXX14=1 -printf "%s\n" "#define HAVE_CXX14 1" >>confdefs.h +$as_echo "#define HAVE_CXX14 1" >>confdefs.h fi - if test x$HAVE_CXX14 != x1 -then : + if test x$HAVE_CXX14 != x1; then : ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -19928,15 +18794,19 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do - cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 -printf %s "checking whether $CXX supports C++11 features with $switch... " >&6; } -if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do + if test x"$switch" = xMSVC; then + switch=-std:c++${alternative} + cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_${switch}_MSVC" | $as_tr_sh` + else + cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 +$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } +if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_CXX="$CXX" CXX="$CXX $switch" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19950,7 +18820,11 @@ else $as_nop #error "This is not a C++ compiler" -#elif __cplusplus < 201103L +// MSVC always sets __cplusplus to 199711L in older versions; newer versions +// only set it correctly if /Zc:__cplusplus is specified as well as a +// /std:c++NN switch: +// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ +#elif __cplusplus < 201103L && !defined _MSC_VER #error "This is not a C++11 compiler" @@ -20230,18 +19104,17 @@ namespace cxx11 _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : eval $cachevar=yes -else $as_nop +else eval $cachevar=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXX="$ac_save_CXX" fi eval ac_res=\$$cachevar - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } if eval test x\$$cachevar = xyes; then CXX="$CXX $switch" if test -n "$CXXCPP" ; then @@ -20269,12 +19142,12 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi if test x$ac_success = xno; then HAVE_CXX11=0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 -printf "%s\n" "$as_me: No compiler with C++11 support was found" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 +$as_echo "$as_me: No compiler with C++11 support was found" >&6;} else HAVE_CXX11=1 -printf "%s\n" "#define HAVE_CXX11 1" >>confdefs.h +$as_echo "#define HAVE_CXX11 1" >>confdefs.h fi @@ -20288,8 +19161,8 @@ fi HAVE_CXX_FILESYSTEM=0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ std::filesystem support" >&5 -printf %s "checking for C++ std::filesystem support... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ std::filesystem support" >&5 +$as_echo_n "checking for C++ std::filesystem support... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20297,22 +19170,21 @@ printf %s "checking for C++ std::filesystem support... " >&6; } #include int -main (void) +main () { std::filesystem::exists("/") ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : HAVE_CXX_FILESYSTEM=1 -else $as_nop +else HAVE_CXX_FILESYSTEM=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$HAVE_CXX_FILESYSTEM" = "1"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20321,32 +19193,31 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #include int -main (void) +main () { std::filesystem::exists("/") ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : HAVE_CXX_FILESYSTEM=1 -else $as_nop +else HAVE_CXX_FILESYSTEM=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test "$HAVE_CXX_FILESYSTEM" = "1"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } CXXFLAGS="-DHAVE_CXX_FILESYSTEM=1 $CXXFLAGS" else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -20355,8 +19226,8 @@ printf "%s\n" "no" >&6; } HAVE_CXX_ENDS_WITH=0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ std::string::ends_with support" >&5 -printf %s "checking for C++ std::string::ends_with support... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ std::string::ends_with support" >&5 +$as_echo_n "checking for C++ std::string::ends_with support... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20364,22 +19235,21 @@ printf %s "checking for C++ std::string::ends_with support... " >&6; } #include int -main (void) +main () { (std::string("This is a message")).ends_with("suffix") ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : HAVE_CXX_ENDS_WITH=1 -else $as_nop +else HAVE_CXX_ENDS_WITH=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$HAVE_CXX_ENDS_WITH" = "1"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20388,298 +19258,302 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #include int -main (void) +main () { (std::string("This is a message")).ends_with("suffix") ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : HAVE_CXX_ENDS_WITH=1 -else $as_nop +else HAVE_CXX_ENDS_WITH=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test "$HAVE_CXX_ENDS_WITH" = "1"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } CXXFLAGS="-DHAVE_CXX_ENDS_WITH=1 $CXXFLAGS" else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -ac_fn_cxx_check_func "$LINENO" "memset" "ac_cv_func_memset" -if test "x$ac_cv_func_memset" = xyes -then : - printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h +for ac_func in memset +do : + ac_fn_cxx_check_func "$LINENO" "memset" "ac_cv_func_memset" +if test "x$ac_cv_func_memset" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MEMSET 1 +_ACEOF fi +done -ac_fn_cxx_check_func "$LINENO" "rint" "ac_cv_func_rint" -if test "x$ac_cv_func_rint" = xyes -then : - printf "%s\n" "#define HAVE_RINT 1" >>confdefs.h +for ac_func in rint +do : + ac_fn_cxx_check_func "$LINENO" "rint" "ac_cv_func_rint" +if test "x$ac_cv_func_rint" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_RINT 1 +_ACEOF fi +done -ac_fn_cxx_check_func "$LINENO" "socket" "ac_cv_func_socket" -if test "x$ac_cv_func_socket" = xyes -then : - printf "%s\n" "#define HAVE_SOCKET 1" >>confdefs.h +for ac_func in socket +do : + ac_fn_cxx_check_func "$LINENO" "socket" "ac_cv_func_socket" +if test "x$ac_cv_func_socket" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SOCKET 1 +_ACEOF fi +done - - for ac_func in recvmsg +for ac_func in recvmsg do : ac_fn_cxx_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg" -if test "x$ac_cv_func_recvmsg" = xyes -then : - printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h +if test "x$ac_cv_func_recvmsg" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_RECVMSG 1 +_ACEOF HAVE_RECVMSG=1 -else $as_nop +else HAVE_RECVMSG=0 fi - done -ac_fn_cxx_check_func "$LINENO" "sqrt" "ac_cv_func_sqrt" -if test "x$ac_cv_func_sqrt" = xyes -then : - printf "%s\n" "#define HAVE_SQRT 1" >>confdefs.h - -fi -ac_fn_cxx_check_func "$LINENO" "strerror" "ac_cv_func_strerror" -if test "x$ac_cv_func_strerror" = xyes -then : - printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h +for ac_func in sqrt +do : + ac_fn_cxx_check_func "$LINENO" "sqrt" "ac_cv_func_sqrt" +if test "x$ac_cv_func_sqrt" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SQRT 1 +_ACEOF fi +done -ac_fn_cxx_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" -if test "x$ac_cv_header_arpa_inet_h" = xyes -then : - printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h +for ac_func in strerror +do : + ac_fn_cxx_check_func "$LINENO" "strerror" "ac_cv_func_strerror" +if test "x$ac_cv_func_strerror" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRERROR 1 +_ACEOF fi +done -ac_fn_cxx_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" -if test "x$ac_cv_header_netdb_h" = xyes -then : - printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h + +for ac_header in arpa/inet.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" +if test "x$ac_cv_header_arpa_inet_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ARPA_INET_H 1 +_ACEOF fi -ac_fn_cxx_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" -if test "x$ac_cv_header_netinet_in_h" = xyes -then : - printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h +done + +for ac_header in netdb.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" +if test "x$ac_cv_header_netdb_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETDB_H 1 +_ACEOF fi -ac_fn_cxx_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_file_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h +done + +for ac_header in netinet/in.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" +if test "x$ac_cv_header_netinet_in_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETINET_IN_H 1 +_ACEOF fi -ac_fn_cxx_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_ioctl_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h +done + +for ac_header in sys/file.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_file_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_FILE_H 1 +_ACEOF fi -ac_fn_cxx_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_socket_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h +done -fi +for ac_header in sys/ioctl.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_ioctl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_IOCTL_H 1 +_ACEOF -ac_fn_cxx_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" -if test "x$ac_cv_type__Bool" = xyes -then : +fi -printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h +done +for ac_header in sys/socket.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_socket_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_SOCKET_H 1 +_ACEOF fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 -printf %s "checking for stdbool.h that conforms to C99... " >&6; } -if test ${ac_cv_header_stdbool_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 +$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } +if ${ac_cv_header_stdbool_h+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - - #ifndef __bool_true_false_are_defined - #error "__bool_true_false_are_defined is not defined" - #endif - char a[__bool_true_false_are_defined == 1 ? 1 : -1]; - - /* Regardless of whether this is C++ or "_Bool" is a - valid type name, "true" and "false" should be usable - in #if expressions and integer constant expressions, - and "bool" should be a valid type name. */ - #if !true - #error "'true' is not true" + #include + #ifndef bool + "error: bool is not defined" #endif - #if true != 1 - #error "'true' is not equal to 1" + #ifndef false + "error: false is not defined" #endif - char b[true == 1 ? 1 : -1]; - char c[true]; - #if false - #error "'false' is not false" + "error: false is not 0" #endif - #if false != 0 - #error "'false' is not equal to 0" + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" #endif - char d[false == 0 ? 1 : -1]; - - enum { e = false, f = true, g = false * true, h = true * 256 }; - - char i[(bool) 0.5 == true ? 1 : -1]; - char j[(bool) 0.0 == false ? 1 : -1]; - char k[sizeof (bool) > 0 ? 1 : -1]; - - struct sb { bool s: 1; bool t; } s; - char l[sizeof s.t > 0 ? 1 : -1]; + struct s { _Bool s: 1; _Bool t; } s; + + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - bool m[h]; - char n[sizeof m == h * sizeof m[0] ? 1 : -1]; - char o[-1 - (bool) 0 < 0 ? 1 : -1]; + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See - https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - https://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ - bool p = true; - bool *pp = &p; - - /* C 1999 specifies that bool, true, and false are to be - macros, but C++ 2011 and later overrule this. */ - #if __cplusplus < 201103 - #ifndef bool - #error "bool is not defined" - #endif - #ifndef false - #error "false is not defined" - #endif - #ifndef true - #error "true is not defined" - #endif - #endif - - /* If _Bool is available, repeat with it all the tests - above that used bool. */ - #ifdef HAVE__BOOL - struct sB { _Bool s: 1; _Bool t; } t; - - char q[(_Bool) 0.5 == true ? 1 : -1]; - char r[(_Bool) 0.0 == false ? 1 : -1]; - char u[sizeof (_Bool) > 0 ? 1 : -1]; - char v[sizeof t.t > 0 ? 1 : -1]; - - _Bool w[h]; - char x[sizeof m == h * sizeof m[0] ? 1 : -1]; - char y[-1 - (_Bool) 0 < 0 ? 1 : -1]; - _Bool z = true; - _Bool *pz = &p; - #endif + _Bool q = true; + _Bool *pq = &q; int -main (void) +main () { - bool ps = &s; - *pp |= p; - *pp |= ! p; - - #ifdef HAVE__BOOL - _Bool pt = &t; - *pz |= z; - *pz |= ! z; - #endif - - /* Refer to every declared value, so they cannot be - discarded as unused. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k - + !l + !m + !n + !o + !p + !pp + !ps - #ifdef HAVE__BOOL - + !q + !r + !u + !v + !w + !x + !y + !z + !pt - #endif - ); + bool e = &s; + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes -else $as_nop +else ac_cv_header_stdbool_h=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 -printf "%s\n" "$ac_cv_header_stdbool_h" >&6; } - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -printf %s "checking for GNU libc compatible malloc... " >&6; } -if test ${ac_cv_func_malloc_0_nonnull+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : - case "$host_os" in # (( - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) - ac_cv_func_malloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_malloc_0_nonnull=no ;; - esac -else $as_nop +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 +$as_echo "$ac_cv_header_stdbool_h" >&6; } + ac_fn_cxx_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" +if test "x$ac_cv_type__Bool" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE__BOOL 1 +_ACEOF + + +fi + + +for ac_header in stdlib.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF + +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +$as_echo_n "checking for GNU libc compatible malloc... " >&6; } +if ${ac_cv_func_malloc_0_nonnull+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_malloc_0_nonnull=no +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *malloc (); +#endif int -main (void) +main () { -void *p = malloc (0); - int result = !p; - free (p); - return result; +return ! malloc (0); ; return 0; } _ACEOF -if ac_fn_cxx_try_run "$LINENO" -then : +if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes -else $as_nop +else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -20687,15 +19561,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes; then : -printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h +$as_echo "#define HAVE_MALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h +else + $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; @@ -20704,7 +19577,7 @@ else $as_nop esac -printf "%s\n" "#define malloc rpl_malloc" >>confdefs.h +$as_echo "#define malloc rpl_malloc" >>confdefs.h fi @@ -20714,12 +19587,11 @@ HAVE_OPENMP=0 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of C++ compiler" >&5 -printf %s "checking for OpenMP flag of C++ compiler... " >&6; } -if test ${ax_cv_cxx_openmp+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of C++ compiler" >&5 +$as_echo_n "checking for OpenMP flag of C++ compiler... " >&6; } +if ${ax_cv_cxx_openmp+:} false; then : + $as_echo_n "(cached) " >&6 +else saveCXXFLAGS=$CXXFLAGS ax_cv_cxx_openmp=unknown # Flags to try: -fopenmp (gcc), -mp (SGI & PGI), @@ -20760,18 +19632,17 @@ main() } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ax_cv_cxx_openmp=$ax_openmp_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done CXXFLAGS=$saveCXXFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_openmp" >&5 -printf "%s\n" "$ax_cv_cxx_openmp" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_openmp" >&5 +$as_echo "$ax_cv_cxx_openmp" >&6; } if test "x$ax_cv_cxx_openmp" = "xunknown"; then : else @@ -20779,28 +19650,27 @@ else OPENMP_CXXFLAGS=$ax_cv_cxx_openmp fi -printf "%s\n" "#define HAVE_OPENMP 1" >>confdefs.h +$as_echo "#define HAVE_OPENMP 1" >>confdefs.h fi -if test x$OPENMP_CXXFLAGS != x -then : +if test x$OPENMP_CXXFLAGS != x; then : HAVE_OPENMP=1 fi -if test x$HAVE_OPENMP != x1 -then : +if test x$HAVE_OPENMP != x1; then : -else $as_nop +else CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS" LDFLAGS="$LDFLAGS $OPENMP_CXXFLAGS" fi ac_fn_cxx_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = xyes -then : +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : -printf "%s\n" "#define HAVE_PTRDIFF_T 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_PTRDIFF_T 1 +_ACEOF fi @@ -20810,7 +19680,9 @@ case $ac_cv_c_int16_t in #( no|yes) ;; #( *) -printf "%s\n" "#define int16_t $ac_cv_c_int16_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define int16_t $ac_cv_c_int16_t +_ACEOF ;; esac @@ -20819,7 +19691,9 @@ case $ac_cv_c_int32_t in #( no|yes) ;; #( *) -printf "%s\n" "#define int32_t $ac_cv_c_int32_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define int32_t $ac_cv_c_int32_t +_ACEOF ;; esac @@ -20828,7 +19702,9 @@ case $ac_cv_c_int64_t in #( no|yes) ;; #( *) -printf "%s\n" "#define int64_t $ac_cv_c_int64_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define int64_t $ac_cv_c_int64_t +_ACEOF ;; esac @@ -20837,64 +19713,42 @@ case $ac_cv_c_int8_t in #( no|yes) ;; #( *) -printf "%s\n" "#define int8_t $ac_cv_c_int8_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define int8_t $ac_cv_c_int8_t +_ACEOF ;; esac +ac_fn_cxx_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = xyes; then : - ac_fn_cxx_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default -" -if test "x$ac_cv_type_pid_t" = xyes -then : - -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #if defined _WIN64 && !defined __CYGWIN__ - LLP64 - #endif - -int -main (void) -{ - - ; - return 0; -} +else +cat >>confdefs.h <<_ACEOF +#define pid_t int _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_pid_type='int' -else $as_nop - ac_pid_type='__int64' -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h - fi - ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes -then : +if test "x$ac_cv_type_size_t" = xyes; then : -else $as_nop +else -printf "%s\n" "#define size_t unsigned int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF fi ac_fn_cxx_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes -then : +if test "x$ac_cv_type_ssize_t" = xyes; then : -else $as_nop +else -printf "%s\n" "#define ssize_t int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ssize_t int +_ACEOF fi @@ -20904,7 +19758,9 @@ case $ac_cv_c_uint16_t in #( *) -printf "%s\n" "#define uint16_t $ac_cv_c_uint16_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define uint16_t $ac_cv_c_uint16_t +_ACEOF ;; esac @@ -20913,10 +19769,12 @@ case $ac_cv_c_uint32_t in #( no|yes) ;; #( *) -printf "%s\n" "#define _UINT32_T 1" >>confdefs.h +$as_echo "#define _UINT32_T 1" >>confdefs.h -printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define uint32_t $ac_cv_c_uint32_t +_ACEOF ;; esac @@ -20925,10 +19783,12 @@ case $ac_cv_c_uint64_t in #( no|yes) ;; #( *) -printf "%s\n" "#define _UINT64_T 1" >>confdefs.h +$as_echo "#define _UINT64_T 1" >>confdefs.h -printf "%s\n" "#define uint64_t $ac_cv_c_uint64_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define uint64_t $ac_cv_c_uint64_t +_ACEOF ;; esac @@ -20937,20 +19797,21 @@ case $ac_cv_c_uint8_t in #( no|yes) ;; #( *) -printf "%s\n" "#define _UINT8_T 1" >>confdefs.h +$as_echo "#define _UINT8_T 1" >>confdefs.h -printf "%s\n" "#define uint8_t $ac_cv_c_uint8_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define uint8_t $ac_cv_c_uint8_t +_ACEOF ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double with more range or precision than double" >&5 -printf %s "checking for long double with more range or precision than double... " >&6; } -if test ${ac_cv_type_long_double_wider+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double with more range or precision than double" >&5 +$as_echo_n "checking for long double with more range or precision than double... " >&6; } +if ${ac_cv_type_long_double_wider+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -20967,7 +19828,7 @@ else $as_nop } int -main (void) +main () { static int test_array [1 - 2 * !((0 < ((DBL_MAX_EXP < LDBL_MAX_EXP) + (DBL_MANT_DIG < LDBL_MANT_DIG) @@ -20982,26 +19843,24 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_type_long_double_wider=yes -else $as_nop +else ac_cv_type_long_double_wider=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double_wider" >&5 -printf "%s\n" "$ac_cv_type_long_double_wider" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double_wider" >&5 +$as_echo "$ac_cv_type_long_double_wider" >&6; } if test $ac_cv_type_long_double_wider = yes; then -printf "%s\n" "#define HAVE_LONG_DOUBLE_WIDER 1" >>confdefs.h +$as_echo "#define HAVE_LONG_DOUBLE_WIDER 1" >>confdefs.h fi HAVE_FLOAT128=0 -if test x$HAVE_HAVE_LONG_DOUBLE_WIDER = x1 -then : +if test x$HAVE_HAVE_LONG_DOUBLE_WIDER = x1; then : HAVE_FLOAT128=0 fi @@ -21011,53 +19870,52 @@ fi # # Check whether --enable-numa was given. -if test ${enable_numa+y} -then : +if test "${enable_numa+set}" = set; then : enableval=$enable_numa; enable_numa=no -else $as_nop +else enable_numa=yes fi HAVE_NUMA=0 -if test x$enable_numa != xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for numa_node_of_cpu in -lnuma" >&5 -printf %s "checking for numa_node_of_cpu in -lnuma... " >&6; } -if test ${ac_cv_lib_numa_numa_node_of_cpu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if test x$enable_numa != xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for numa_node_of_cpu in -lnuma" >&5 +$as_echo_n "checking for numa_node_of_cpu in -lnuma... " >&6; } +if ${ac_cv_lib_numa_numa_node_of_cpu+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lnuma $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int numa_node_of_cpu (); -} +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char numa_node_of_cpu (); int -main (void) +main () { -return conftest::numa_node_of_cpu (); +return numa_node_of_cpu (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_numa_numa_node_of_cpu=yes -else $as_nop +else ac_cv_lib_numa_numa_node_of_cpu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_numa_numa_node_of_cpu" >&5 -printf "%s\n" "$ac_cv_lib_numa_numa_node_of_cpu" >&6; } -if test "x$ac_cv_lib_numa_numa_node_of_cpu" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_numa_numa_node_of_cpu" >&5 +$as_echo "$ac_cv_lib_numa_numa_node_of_cpu" >&6; } +if test "x$ac_cv_lib_numa_numa_node_of_cpu" = xyes; then : HAVE_NUMA=1 LIBS="$LIBS -lnuma" @@ -21070,53 +19928,52 @@ fi # # Check whether --enable-hwloc was given. -if test ${enable_hwloc+y} -then : +if test "${enable_hwloc+set}" = set; then : enableval=$enable_hwloc; enable_hwloc=no -else $as_nop +else enable_hwloc=yes fi HAVE_HWLOC=0 -if test x$enable_hwloc != xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hwloc_topology_init in -lhwloc" >&5 -printf %s "checking for hwloc_topology_init in -lhwloc... " >&6; } -if test ${ac_cv_lib_hwloc_hwloc_topology_init+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if test x$enable_hwloc != xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hwloc_topology_init in -lhwloc" >&5 +$as_echo_n "checking for hwloc_topology_init in -lhwloc... " >&6; } +if ${ac_cv_lib_hwloc_hwloc_topology_init+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lhwloc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int hwloc_topology_init (); -} +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char hwloc_topology_init (); int -main (void) +main () { -return conftest::hwloc_topology_init (); +return hwloc_topology_init (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_hwloc_hwloc_topology_init=yes -else $as_nop +else ac_cv_lib_hwloc_hwloc_topology_init=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hwloc_hwloc_topology_init" >&5 -printf "%s\n" "$ac_cv_lib_hwloc_hwloc_topology_init" >&6; } -if test "x$ac_cv_lib_hwloc_hwloc_topology_init" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hwloc_hwloc_topology_init" >&5 +$as_echo "$ac_cv_lib_hwloc_hwloc_topology_init" >&6; } +if test "x$ac_cv_lib_hwloc_hwloc_topology_init" = xyes; then : HAVE_HWLOC=1 LIBS="$LIBS -lhwloc" @@ -21129,94 +19986,94 @@ fi # # Check whether --enable-vma was given. -if test ${enable_vma+y} -then : +if test "${enable_vma+set}" = set; then : enableval=$enable_vma; enable_vma=yes -else $as_nop +else enable_vma=no fi HAVE_VMA=0 -if test x$enable_vma != xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for recvfrom_zcopy in -lvma" >&5 -printf %s "checking for recvfrom_zcopy in -lvma... " >&6; } -if test ${ac_cv_lib_vma_recvfrom_zcopy+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if test x$enable_vma != xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recvfrom_zcopy in -lvma" >&5 +$as_echo_n "checking for recvfrom_zcopy in -lvma... " >&6; } +if ${ac_cv_lib_vma_recvfrom_zcopy+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lvma $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int recvfrom_zcopy (); -} +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char recvfrom_zcopy (); int -main (void) +main () { -return conftest::recvfrom_zcopy (); +return recvfrom_zcopy (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_vma_recvfrom_zcopy=yes -else $as_nop +else ac_cv_lib_vma_recvfrom_zcopy=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vma_recvfrom_zcopy" >&5 -printf "%s\n" "$ac_cv_lib_vma_recvfrom_zcopy" >&6; } -if test "x$ac_cv_lib_vma_recvfrom_zcopy" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vma_recvfrom_zcopy" >&5 +$as_echo "$ac_cv_lib_vma_recvfrom_zcopy" >&6; } +if test "x$ac_cv_lib_vma_recvfrom_zcopy" = xyes; then : HAVE_VMA=1 LIBS="$LIBS -lvma" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for vma_recvfrom_zcopy in -lvma" >&5 -printf %s "checking for vma_recvfrom_zcopy in -lvma... " >&6; } -if test ${ac_cv_lib_vma_vma_recvfrom_zcopy+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vma_recvfrom_zcopy in -lvma" >&5 +$as_echo_n "checking for vma_recvfrom_zcopy in -lvma... " >&6; } +if ${ac_cv_lib_vma_vma_recvfrom_zcopy+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lvma $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int vma_recvfrom_zcopy (); -} +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char vma_recvfrom_zcopy (); int -main (void) +main () { -return conftest::vma_recvfrom_zcopy (); +return vma_recvfrom_zcopy (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_vma_vma_recvfrom_zcopy=yes -else $as_nop +else ac_cv_lib_vma_vma_recvfrom_zcopy=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vma_vma_recvfrom_zcopy" >&5 -printf "%s\n" "$ac_cv_lib_vma_vma_recvfrom_zcopy" >&6; } -if test "x$ac_cv_lib_vma_vma_recvfrom_zcopy" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vma_vma_recvfrom_zcopy" >&5 +$as_echo "$ac_cv_lib_vma_vma_recvfrom_zcopy" >&6; } +if test "x$ac_cv_lib_vma_vma_recvfrom_zcopy" = xyes; then : HAVE_VMA=1 LIBS="$LIBS -lvma" @@ -21228,38 +20085,300 @@ fi # CUDA # -################################# -# NOTE # -# This needs to come after all # -# other compiler/library tests # -# since it changes LIB to # -# include CUDA-specific entries # -################################# +################################# +# NOTE # +# This needs to come after all # +# other compiler/library tests # +# since it changes LIB to # +# include CUDA-specific entries # +################################# + + + + + # Check whether --enable-gpu was given. +if test "${enable_gpu+set}" = set; then : + enableval=$enable_gpu; ENABLE_GPU=1 + +else + ENABLE_GPU=0 + + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gpu is enabled" >&5 +$as_echo_n "checking if gpu is enabled... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_GPU" >&5 +$as_echo "$ENABLE_GPU" >&6; } + + GPU_SHAREDMEM=0 + + +# Check whether --with-shared_mem was given. +if test "${with_shared_mem+set}" = set; then : + withval=$with_shared_mem; GPU_SHAREDMEM=$withval + +else + with_shared_mem='auto' +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: -with-shared-mem=$GPU_SHAREDMEM" >&5 +$as_echo "$as_me: -with-shared-mem=$GPU_SHAREDMEM" >&6;} + + if test "x$ENABLE_GPU" = "x1"; then : + + # Extract the first word of "hipconfig", so it can be a program name with args. +set dummy hipconfig; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_HIPCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $HIPCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_HIPCONFIG="$HIPCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_HIPCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_HIPCONFIG" && ac_cv_path_HIPCONFIG="no" + ;; +esac +fi +HIPCONFIG=$ac_cv_path_HIPCONFIG +if test -n "$HIPCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HIPCONFIG" >&5 +$as_echo "$HIPCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$HIPCONFIG" = "xno"; then : + + as_fn_error $? "\"could not find hipconfig in path\"" "$LINENO" 5 + +fi + + # Extract the first word of "hipcc", so it can be a program name with args. +set dummy hipcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_HIPCC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $HIPCC in + [\\/]* | ?:[\\/]*) + ac_cv_path_HIPCC="$HIPCC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_HIPCC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_HIPCC" && ac_cv_path_HIPCC="no" + ;; +esac +fi +HIPCC=$ac_cv_path_HIPCC +if test -n "$HIPCC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HIPCC" >&5 +$as_echo "$HIPCC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$HIPCC" = "xno"; then : + + as_fn_error $? "\"could not find hipcc in path\"" "$LINENO" 5 + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GPU platform" >&5 +$as_echo_n "checking for GPU platform... " >&6; } + GPU_PLATFORM=`hipconfig -P` + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GPU_PLATFORM" >&5 +$as_echo "$GPU_PLATFORM" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hip path" >&5 +$as_echo_n "checking for hip path... " >&6; } + HIP_PATH=`hipconfig -p` + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HIP_PATH" >&5 +$as_echo "$HIP_PATH" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rocm path" >&5 +$as_echo_n "checking for rocm path... " >&6; } + ROCM_PATH=`hipconfig -R` + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ROCM_PATH" >&5 +$as_echo "$ROCM_PATH" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hipcc C++ config" >&5 +$as_echo_n "checking for hipcc C++ config... " >&6; } + HIP_CPPCONF=`hipconfig -C` + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HIP_CPPCONF" >&5 +$as_echo "$HIP_CPPCONF" >&6; } + +fi + + + + if test "x$GPU_PLATFORM" = "xnvidia"; then : + + CXXFLAGS="$CXXFLAGS -DBF_CUDA_ENABLED=1 $HIP_CPPCONF" + HIPCCFLAGS="$HIPCCFLAGS --std=c++17 -DBF_CUDA_ENABLED=1 $HIP_CPPCONF" + LDFLAGS="$LDFLAGS -L$HIP_PATH/lib -L$ROCM_PATH/lib" + LIBS="$LIBS -lhipfft -lhipblas" + +fi + + if test "x$GPU_PLATFORM" = "xamd"; then : + + CXXFLAGS="$CXXFLAGS -DBF_CUDA_ENABLED=1 $HIP_CPPCONF " + HIPCCFLAGS="$HIPCCFLAGS -std=c++17 -Wall -O3 -DBF_CUDA_ENABLED=1 $HIP_CPPCONF" + LDFLAGS="$LDFLAGS -L$HIP_PATH/lib -L$ROCM_PATH/lib" + LIBS="$LIBS -lamdhip64 -lhipfft -lhipblas -lhiprtc" + + # AMD Constants + GPU_MANAGEDMEM=1 + + GPU_MIN_ARCH=0 + + GPU_MAX_ARCH=0 + + GPU_EXP_PINNED_ALLOC=0 + + CUDA_VERSION=0 + + + if test "x$with_shared_mem" = "xauto"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GPU shared memory using automatic method" >&5 +$as_echo_n "checking GPU shared memory using automatic method... " >&6; } + + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + #include + #include + #include + #include + +int +main () +{ + + int count {}; + auto hiperr = hipGetDeviceCount(&count); + if (hiperr != hipSuccess) { + std::cerr << "Error detecting devices" << std::endl; + return 1; + } + if (count == 0) { + std::cerr << "No devices detected" << std::endl; + return 1; + } + size_t mem {std::numeric_limits::max()}; + for (int device = 0; device < count; ++device) { + hipDeviceProp_t prop; + hiperr = hipGetDeviceProperties(&prop, device); + if (hiperr != hipSuccess) { + std::cerr << "Failed to query shared memory for device " << device << std::endl; + return 1; + } + mem = std::min(mem, prop.sharedMemPerBlock); + } + std::ofstream fd; + fd.open("confmem.out"); + fd << mem; + fd.close(); + return 0; + + ; + return 0; +} + +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + + GPU_SHAREDMEM=$(cat confmem.out) + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GPU_SHAREDMEM bytes" >&5 +$as_echo "$GPU_SHAREDMEM bytes" >&6; } + +else + + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "automatic shared memory detection failed (error code: $?) +See \`config.log' for more details" "$LINENO" 5; } + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi + +fi + + +if test "x$ENABLE_GPU" = "x1" && test "x$GPU_PLATFORM" = "xnvidia"; then : # Check whether --with-cuda_home was given. -if test ${with_cuda_home+y} -then : +if test "${with_cuda_home+set}" = set; then : withval=$with_cuda_home; -else $as_nop +else with_cuda_home=/usr/local/cuda fi CUDA_HOME=$with_cuda_home - # Check whether --enable-cuda was given. -if test ${enable_cuda+y} -then : - enableval=$enable_cuda; enable_cuda=no -else $as_nop - enable_cuda=yes -fi - - - HAVE_CUDA=0 + HAVE_CUDA=1 CUDA_VERSION=0 @@ -21277,7 +20396,7 @@ fi GPU_SHAREDMEM=0 - GPU_PASCAL_MANAGEDMEM=0 + GPU_MANAGEDMEM=0 GPU_EXP_PINNED_ALLOC=1 @@ -21287,12 +20406,11 @@ fi # Extract the first word of "nvcc", so it can be a program name with args. set dummy nvcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_NVCC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_NVCC+:} false; then : + $as_echo_n "(cached) " >&6 +else case $NVCC in [\\/]* | ?:[\\/]*) ac_cv_path_NVCC="$NVCC" # Let the user override the test with a path. @@ -21303,15 +20421,11 @@ as_dummy="$CUDA_HOME/bin:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_NVCC="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_NVCC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -21324,22 +20438,21 @@ esac fi NVCC=$ac_cv_path_NVCC if test -n "$NVCC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NVCC" >&5 -printf "%s\n" "$NVCC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NVCC" >&5 +$as_echo "$NVCC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "nvprune", so it can be a program name with args. set dummy nvprune; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_NVPRUNE+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_NVPRUNE+:} false; then : + $as_echo_n "(cached) " >&6 +else case $NVPRUNE in [\\/]* | ?:[\\/]*) ac_cv_path_NVPRUNE="$NVPRUNE" # Let the user override the test with a path. @@ -21350,15 +20463,11 @@ as_dummy="$CUDA_HOME/bin:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_NVPRUNE="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_NVPRUNE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -21371,22 +20480,21 @@ esac fi NVPRUNE=$ac_cv_path_NVPRUNE if test -n "$NVPRUNE"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NVPRUNE" >&5 -printf "%s\n" "$NVPRUNE" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NVPRUNE" >&5 +$as_echo "$NVPRUNE" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "cuobjdump", so it can be a program name with args. set dummy cuobjdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_CUOBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_CUOBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else case $CUOBJDUMP in [\\/]* | ?:[\\/]*) ac_cv_path_CUOBJDUMP="$CUOBJDUMP" # Let the user override the test with a path. @@ -21397,15 +20505,11 @@ as_dummy="$CUDA_HOME/bin:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_CUOBJDUMP="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_CUOBJDUMP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -21418,25 +20522,25 @@ esac fi CUOBJDUMP=$ac_cv_path_CUOBJDUMP if test -n "$CUOBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUOBJDUMP" >&5 -printf "%s\n" "$CUOBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUOBJDUMP" >&5 +$as_echo "$CUOBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi if test "$HAVE_CUDA" = "1"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working CUDA installation" >&5 -printf %s "checking for a working CUDA installation... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working CUDA installation" >&5 +$as_echo_n "checking for a working CUDA installation... " >&6; } CXXFLAGS_save="$CXXFLAGS" LDFLAGS_save="$LDFLAGS" LIBS_save="$LIBS" - ac_compile='$NVCC -c $NVCCFLAGS conftest.$ac_ext >&5' + ac_compile='$NVCC -c $HIPCCFLAGS conftest.$ac_ext >&5' cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -21444,27 +20548,26 @@ printf %s "checking for a working CUDA installation... " >&6; } #include #include int -main (void) +main () { cudaMalloc(0, 0); ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : -else $as_nop +else HAVE_CUDA=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$HAVE_CUDA" = "1"; then LDFLAGS="-L$CUDA_HOME/lib64 -L$CUDA_HOME/lib" - LIBS="$LIBS -lcuda -lcudart" + LIBS="-lcuda -lcudart" - ac_link='$NVCC -o conftest$ac_exeext $NVCCFLAGS $LDFLAGS $LIBS conftest.$ac_ext >&5' + ac_link='$NVCC -o conftest$ac_exeext $HIPCCFLAGS $LDFLAGS $LIBS conftest.$ac_ext >&5' cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -21472,29 +20575,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #include #include int -main (void) +main () { cudaMalloc(0, 0); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : CUDA_VERSION=$( ${NVCC} --version | ${GREP} -Po -e "release.*," | cut -d, -f1 | cut -d\ -f2 ) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - v$CUDA_VERSION" >&5 -printf "%s\n" "yes - v$CUDA_VERSION" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - v$CUDA_VERSION" >&5 +$as_echo "yes - v$CUDA_VERSION" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } HAVE_CUDA=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } HAVE_CUDA=0 fi @@ -21505,31 +20607,31 @@ printf "%s\n" "no" >&6; } fi if test "$HAVE_CUDA" = "1"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CUDA CXX standard support" >&5 -printf %s "checking for CUDA CXX standard support... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA CXX standard support" >&5 +$as_echo_n "checking for CUDA CXX standard support... " >&6; } CUDA_STDCXX=$( ${NVCC} --help | ${GREP} -Po -e "--std.*}" | ${SED} 's/.*|//;s/}//;' ) if test "$CUDA_STDCXX" = "c++20"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: C++20" >&5 -printf "%s\n" "C++20" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: C++20" >&5 +$as_echo "C++20" >&6; } CUDA_HAVE_CXX20=1 else if test "$CUDA_STDCXX" = "c++17"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: C++17" >&5 -printf "%s\n" "C++17" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: C++17" >&5 +$as_echo "C++17" >&6; } CUDA_HAVE_CXX17=1 else if test "$CUDA_STDCXX" = "c++14"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: C++14" >&5 -printf "%s\n" "C++14" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: C++14" >&5 +$as_echo "C++14" >&6; } CUDA_HAVE_CXX14=1 else if test "$CUDA_STDCXX" = "c++11"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: C++11" >&5 -printf "%s\n" "C++11" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: C++11" >&5 +$as_echo "C++11" >&6; } CUDA_HAVE_CXX11=1 else @@ -21542,79 +20644,75 @@ printf "%s\n" "C++11" >&6; } # Check whether --with-nvcc_flags was given. -if test ${with_nvcc_flags+y} -then : +if test "${with_nvcc_flags+set}" = set; then : withval=$with_nvcc_flags; -else $as_nop +else with_nvcc_flags='-O3 -Xcompiler "-Wall"' fi - NVCCFLAGS=$with_nvcc_flags - + HIPCCFLAGS="$with_nvcc_flags $HIPCCFLAGS" # Check whether --with-stream_model was given. -if test ${with_stream_model+y} -then : +if test "${with_stream_model+set}" = set; then : withval=$with_stream_model; -else $as_nop +else with_stream_model='per-thread' fi if test "$HAVE_CUDA" = "1"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for different CUDA default stream models" >&5 -printf %s "checking for different CUDA default stream models... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for different CUDA default stream models" >&5 +$as_echo_n "checking for different CUDA default stream models... " >&6; } dsm_supported=$( ${NVCC} -h | ${GREP} -Po -e "--default-stream" ) if test "$dsm_supported" = "--default-stream"; then if test "$with_stream_model" = "per-thread"; then - NVCCFLAGS="$NVCCFLAGS -default-stream per-thread" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, using 'per-thread'" >&5 -printf "%s\n" "yes, using 'per-thread'" >&6; } + HIPCCFLAGS="$HIPCCFLAGS -default-stream per-thread" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, using 'per-thread'" >&5 +$as_echo "yes, using 'per-thread'" >&6; } else if test "$with_stream_model" = "legacy"; then - NVCCFLAGS="$NVCCFLAGS -default-stream legacy" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, using 'legacy'" >&5 -printf "%s\n" "yes, using 'legacy'" >&6; } + HIPCCFLAGS="$HIPCCFLAGS -default-stream legacy" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, using 'legacy'" >&5 +$as_echo "yes, using 'legacy'" >&6; } else as_fn_error $? "Invalid CUDA stream model: '$with_stream_model'" "$LINENO" 5 fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, only the 'legacy' stream model is supported" >&5 -printf "%s\n" "no, only the 'legacy' stream model is supported" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, only the 'legacy' stream model is supported" >&5 +$as_echo "no, only the 'legacy' stream model is supported" >&6; } fi fi if test "$HAVE_CUDA" = "1"; then CPPFLAGS="$CPPFLAGS -DBF_CUDA_ENABLED=1" CXXFLAGS="$CXXFLAGS -DBF_CUDA_ENABLED=1" - NVCCFLAGS="$NVCCFLAGS -DBF_CUDA_ENABLED=1" + HIPCCFLAGS="$HIPCCFLAGS -DBF_CUDA_ENABLED=1" LDFLAGS="$LDFLAGS -L$CUDA_HOME/lib64 -L$CUDA_HOME/lib" - LIBS="$LIBS -lcuda -lcudart -lnvrtc -lcublas -lcudadevrt -L. -lcufft_static_pruned -lculibos -lnvToolsExt" + LIBS="$LIBS -lcuda -lcudart -lnvrtc -lcublas -lcudadevrt -L. -lnvToolsExt -Wl,--no-as-needed -lcufft_static_pruned -lculibos" fi # Check whether --with-gpu_archs was given. -if test ${with_gpu_archs+y} -then : +if test "${with_gpu_archs+set}" = set; then : withval=$with_gpu_archs; -else $as_nop +else with_gpu_archs='auto' fi if test "$HAVE_CUDA" = "1"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for valid CUDA architectures" >&5 -printf %s "checking for valid CUDA architectures... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for valid CUDA architectures" >&5 +$as_echo_n "checking for valid CUDA architectures... " >&6; } ar_supported=$( ${NVCC} -h | ${GREP} -Po "'compute_[0-9]{2,3}" | cut -d_ -f2 | sort | uniq ) ar_supported_flat=$( echo $ar_supported | xargs ) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found: $ar_supported_flat" >&5 -printf "%s\n" "found: $ar_supported_flat" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found: $ar_supported_flat" >&5 +$as_echo "found: $ar_supported_flat" >&6; } if test "$with_gpu_archs" = "auto"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which CUDA architectures to target" >&5 -printf %s "checking which CUDA architectures to target... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CUDA architectures to target" >&5 +$as_echo_n "checking which CUDA architectures to target... " >&6; } CXXFLAGS_save="$CXXFLAGS" LDFLAGS_save="$LDFLAGS" @@ -21623,13 +20721,12 @@ printf %s "checking which CUDA architectures to target... " >&6; } LDFLAGS="-L$CUDA_HOME/lib64 -L$CUDA_HOME/lib" LIBS="-lcuda -lcudart" ac_run='$NVCC -o conftest$ac_ext $LDFLAGS $LIBS conftest.$ac_ext>&5' - if test "$cross_compiling" = yes -then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -21640,7 +20737,7 @@ else $as_nop #include #include int -main (void) +main () { std::set archs; @@ -21675,8 +20772,7 @@ main (void) return 0; } _ACEOF -if ac_fn_cxx_try_run "$LINENO" -then : +if ac_fn_cxx_try_run "$LINENO"; then : GPU_ARCHS=`cat confarchs.out` ar_supported=$( ${NVCC} -h | ${GREP} -Po "'compute_[0-9]{2,3}" | cut -d_ -f2 | sort | uniq ) @@ -21686,10 +20782,10 @@ then : else GPU_ARCHS=$ar_valid - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GPU_ARCHS" >&5 -printf "%s\n" "$GPU_ARCHS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GPU_ARCHS" >&5 +$as_echo "$GPU_ARCHS" >&6; } fi -else $as_nop +else as_fn_error $? "failed to find any" "$LINENO" 5 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -21705,14 +20801,14 @@ fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for valid requested CUDA architectures" >&5 -printf %s "checking for valid requested CUDA architectures... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for valid requested CUDA architectures" >&5 +$as_echo_n "checking for valid requested CUDA architectures... " >&6; } ar_requested=$( echo "$GPU_ARCHS" | wc -w ) ar_valid=$( echo $GPU_ARCHS $ar_supported | xargs -n1 | sort | uniq -d | xargs ) ar_found=$( echo $ar_valid | wc -w ) if test "$ar_requested" = "$ar_found"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else as_fn_error $? "only '$ar_valid' are supported" "$LINENO" 5 fi @@ -21724,111 +20820,23 @@ printf "%s\n" "yes" >&6; } GPU_MAX_ARCH=$ar_max_valid - -# Check whether --with-shared_mem was given. -if test ${with_shared_mem+y} -then : - withval=$with_shared_mem; -else $as_nop - with_shared_mem='auto' -fi - - if test "$with_gpu_archs" = "auto"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for minimum shared memory per block" >&5 -printf %s "checking for minimum shared memory per block... " >&6; } - - CXXFLAGS_save="$CXXFLAGS" - LDFLAGS_save="$LDFLAGS" - LIBS_save="$LIBS" - - LDFLAGS="-L$CUDA_HOME/lib64 -L$CUDA_HOME/lib" - LIBS="-lcuda -lcudart" - ac_run='$NVCC -o conftest$ac_ext $LDFLAGS $LIBS conftest.$ac_ext>&5' - if test "$cross_compiling" = yes -then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - #include - #include - #include - #include - #include -int -main (void) -{ - - std::set smem; - int smemSize; - int deviceCount = 0; - cudaGetDeviceCount(&deviceCount); - if( deviceCount == 0 ) { - return 1; - } - for(int dev=0; dev&5 -printf "%s\n" "$GPU_SHAREDMEM B" >&6; } -else $as_nop - as_fn_error $? "failed to determine a value" "$LINENO" 5 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - CXXFLAGS="$CXXFLAGS_save" - LDFLAGS="$LDFLAGS_save" - LIBS="$LIBS_save" - else - GPU_SHAREDMEM=$with_shared_mem - - fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Pascal-style CUDA managed memory" >&5 -printf %s "checking for Pascal-style CUDA managed memory... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Pascal-style CUDA managed memory" >&5 +$as_echo_n "checking for Pascal-style CUDA managed memory... " >&6; } cm_invalid=$( echo $GPU_ARCHS | ${SED} -e 's/\b[1-5][0-9]\b/PRE/g;' ) if ! echo $cm_invalid | ${GREP} -q PRE; then - GPU_PASCAL_MANAGEDMEM=1 + GPU_MANAGEDMEM=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - GPU_PASCAL_MANAGEDMEM=0 + GPU_MANAGEDMEM=0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrust pinned allocated support" >&5 -printf %s "checking for thrust pinned allocated support... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrust pinned allocated support" >&5 +$as_echo_n "checking for thrust pinned allocated support... " >&6; } CXXFLAGS_save="$CXXFLAGS" LDFLAGS_save="$LDFLAGS" LIBS_save="$LIBS" @@ -21836,13 +20844,12 @@ printf %s "checking for thrust pinned allocated support... " >&6; } LDFLAGS="-L$CUDA_HOME/lib64 -L$CUDA_HOME/lib" LIBS="-lcuda -lcudart" ac_run='$NVCC -o conftest$ac_ext $LDFLAGS $LIBS conftest.$ac_ext>&5' - if test "$cross_compiling" = yes -then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -21851,24 +20858,23 @@ else $as_nop #include #include int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_run "$LINENO" -then : +if ac_fn_cxx_try_run "$LINENO"; then : GPU_EXP_PINNED_ALLOC=0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: full" >&5 -printf "%s\n" "full" >&6; } -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: full" >&5 +$as_echo "full" >&6; } +else GPU_EXP_PINNED_ALLOC=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: experimental" >&5 -printf "%s\n" "experimental" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: experimental" >&5 +$as_echo "experimental" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -21881,16 +20887,17 @@ fi fi +fi + # # Bifrost memory alignment # # Check whether --with-alignment was given. -if test ${with_alignment+y} -then : +if test "${with_alignment+set}" = set; then : withval=$with_alignment; -else $as_nop +else with_alignment=4096 fi @@ -21906,23 +20913,21 @@ ALIGNMENT=$with_alignment # Check whether --with-logging_dir was given. -if test ${with_logging_dir+y} -then : +if test "${with_logging_dir+set}" = set; then : withval=$with_logging_dir; HAVE_TMPFS=$with_logging_dir -else $as_nop +else HAVE_TMPFS=/tmp fi if test "$HAVE_TMPFS" = "/tmp"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/shm" >&5 -printf %s "checking for /dev/shm... " >&6; } -if test ${ac_cv_file__dev_shm+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/shm" >&5 +$as_echo_n "checking for /dev/shm... " >&6; } +if ${ac_cv_file__dev_shm+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/dev/shm"; then @@ -21931,10 +20936,9 @@ else ac_cv_file__dev_shm=no fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_shm" >&5 -printf "%s\n" "$ac_cv_file__dev_shm" >&6; } -if test "x$ac_cv_file__dev_shm" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_shm" >&5 +$as_echo "$ac_cv_file__dev_shm" >&6; } +if test "x$ac_cv_file__dev_shm" = xyes; then : HAVE_TMPFS=/dev/shm/bifrost fi @@ -21942,12 +20946,11 @@ fi fi if test "$HAVE_TMPFS" = "/tmp"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /Volumes/RAMDisk" >&5 -printf %s "checking for /Volumes/RAMDisk... " >&6; } -if test ${ac_cv_file__Volumes_RAMDisk+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /Volumes/RAMDisk" >&5 +$as_echo_n "checking for /Volumes/RAMDisk... " >&6; } +if ${ac_cv_file__Volumes_RAMDisk+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/Volumes/RAMDisk"; then @@ -21956,10 +20959,9 @@ else ac_cv_file__Volumes_RAMDisk=no fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__Volumes_RAMDisk" >&5 -printf "%s\n" "$ac_cv_file__Volumes_RAMDisk" >&6; } -if test "x$ac_cv_file__Volumes_RAMDisk" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__Volumes_RAMDisk" >&5 +$as_echo "$ac_cv_file__Volumes_RAMDisk" >&6; } +if test "x$ac_cv_file__Volumes_RAMDisk" = xyes; then : HAVE_TMPFS=/Volumes/RAMDisk/bifrost fi @@ -21967,12 +20969,11 @@ fi fi if test "$HAVE_TMPFS" = "/tmp"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /tmp" >&5 -printf %s "checking for /tmp... " >&6; } -if test ${ac_cv_file__tmp+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /tmp" >&5 +$as_echo_n "checking for /tmp... " >&6; } +if ${ac_cv_file__tmp+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/tmp"; then @@ -21981,16 +20982,15 @@ else ac_cv_file__tmp=no fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__tmp" >&5 -printf "%s\n" "$ac_cv_file__tmp" >&6; } -if test "x$ac_cv_file__tmp" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__tmp" >&5 +$as_echo "$ac_cv_file__tmp" >&6; } +if test "x$ac_cv_file__tmp" = xyes; then : HAVE_TMPFS=/tmp fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $HAVE_TMPFS may have performance problems for logging" >&5 -printf "%s\n" "$as_me: WARNING: $HAVE_TMPFS may have performance problems for logging" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAVE_TMPFS may have performance problems for logging" >&5 +$as_echo "$as_me: WARNING: $HAVE_TMPFS may have performance problems for logging" >&2;} HAVE_TMPFS=/tmp/bifrost fi @@ -22001,35 +21001,31 @@ printf "%s\n" "$as_me: WARNING: $HAVE_TMPFS may have performance problems for lo # # Check whether --enable-debug was given. -if test ${enable_debug+y} -then : +if test "${enable_debug+set}" = set; then : enableval=$enable_debug; enable_debug=yes -else $as_nop +else enable_debug=no fi HAVE_DEBUG=0 -if test x$enable_debug != xno -then : +if test x$enable_debug != xno; then : HAVE_DEBUG=1 CXXFLAGS="$CXXFLAGS -g" - NVCCFLAGS="$NVCCFLAGS -g" + HIPCCFLAGS="$HIPCCFLAGS -g" fi # Check whether --enable-trace was given. -if test ${enable_trace+y} -then : +if test "${enable_trace+set}" = set; then : enableval=$enable_trace; enable_trace=yes -else $as_nop +else enable_trace=no fi HAVE_TRACE=0 -if test x$enable_trace != xno -then : +if test x$enable_trace != xno; then : HAVE_TRACE=1 fi @@ -22037,17 +21033,16 @@ fi # Check whether --enable-native_arch was given. -if test ${enable_native_arch+y} -then : +if test "${enable_native_arch+set}" = set; then : enableval=$enable_native_arch; enable_native_arch=no -else $as_nop +else enable_native_arch=yes fi if test "$enable_native_arch" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler accepts '-march=native'" >&5 -printf %s "checking if the compiler accepts '-march=native'... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler accepts '-march=native'" >&5 +$as_echo_n "checking if the compiler accepts '-march=native'... " >&6; } CXXFLAGS_temp="$CXXFLAGS -march=native" @@ -22058,7 +21053,7 @@ printf %s "checking if the compiler accepts '-march=native'... " >&6; } int -main (void) +main () { int i = 5; @@ -22066,52 +21061,47 @@ main (void) return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : CXXFLAGS="$CXXFLAGS -march=native" NVCCFLAGS="$NVCCFLAGS -Xcompiler \"-march=native\"" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else enable_native_arch=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # Check whether --enable-cuda_debug was given. -if test ${enable_cuda_debug+y} -then : +if test "${enable_cuda_debug+set}" = set; then : enableval=$enable_cuda_debug; enable_cuda_debug=yes -else $as_nop +else enable_cuda_debug=no fi HAVE_CUDA_DEBUG=0 -if test x$enable_cuda_debug != xno -then : +if test x$enable_cuda_debug != xno; then : HAVE_CUDA_DEBUG=1 - NVCCFLAGS="$NVCCFLAGS -G" + HIPCCFLAGS="$HIPCCFLAGS -G" fi # Check whether --enable-map_cache was given. -if test ${enable_map_cache+y} -then : +if test "${enable_map_cache+set}" = set; then : enableval=$enable_map_cache; enable_map_cache=no -else $as_nop +else enable_map_cache=yes fi HAVE_MAP_CACHE=0 -if test x$enable_map_cache != xno -then : - HAVE_MAP_CACHE=$HAVE_CUDA +if test x$enable_map_cache != xno; then : + HAVE_MAP_CACHE=test "x$GPU_PLATFORM" = "xnvidia" fi @@ -22120,17 +21110,15 @@ fi # # Check whether --enable-python was given. -if test ${enable_python+y} -then : +if test "${enable_python+set}" = set; then : enableval=$enable_python; enable_python=no -else $as_nop +else enable_python=yes fi HAVE_PYTHON=0 -if test x$enable_python != xno -then : +if test x$enable_python != xno; then : @@ -22141,39 +21129,34 @@ then : - if test -z "$PYTHON" -then : + if test -z "$PYTHON"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether python executable path has been provided" >&5 -printf %s "checking whether python executable path has been provided... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python executable path has been provided" >&5 +$as_echo_n "checking whether python executable path has been provided... " >&6; } # Check whether --with-python was given. -if test ${with_python+y} -then : +if test "${with_python+set}" = set; then : withval=$with_python; - if test "$withval" != yes && test "$withval" != no -then : + if test "$withval" != yes && test "$withval" != no; then : PYTHON="$withval" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -printf "%s\n" "$PYTHON" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } -else $as_nop +else PYTHON="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - if test "$withval" != no -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test "$withval" != no; then : # Extract the first word of "python", so it can be a program name with args. set dummy python; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PYTHON+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. @@ -22183,15 +21166,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -22204,11 +21183,11 @@ esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -printf "%s\n" "$PYTHON" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -22217,18 +21196,17 @@ fi fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } # Extract the first word of "python", so it can be a program name with args. set dummy python; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PYTHON+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. @@ -22238,15 +21216,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -22259,11 +21233,11 @@ esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -printf "%s\n" "$PYTHON" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -22278,16 +21252,14 @@ fi - if test x${PYTHON} = xno -then : + if test x${PYTHON} = xno; then : # Extract the first word of "python3", so it can be a program name with args. set dummy python3; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PYTHON3+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON3+:} false; then : + $as_echo_n "(cached) " >&6 +else case $PYTHON3 in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON3="$PYTHON3" # Let the user override the test with a path. @@ -22297,15 +21269,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PYTHON3="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON3="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -22318,33 +21286,30 @@ esac fi PYTHON3=$ac_cv_path_PYTHON3 if test -n "$PYTHON3"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5 -printf "%s\n" "$PYTHON3" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5 +$as_echo "$PYTHON3" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - if test x${PYTHON3} != xno -then : + if test x${PYTHON3} != xno; then : PYTHON=$PYTHON3 fi fi - if test x${PYTHON} != xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON as ctypesgen" >&5 -printf %s "checking whether $PYTHON as ctypesgen... " >&6; } - if ! ${PYTHON} -c "import ctypesgen" 2>/dev/null -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: python module will not be built" >&5 -printf "%s\n" "$as_me: WARNING: python module will not be built" >&2;} -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + if test x${PYTHON} != xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON as ctypesgen" >&5 +$as_echo_n "checking whether $PYTHON as ctypesgen... " >&6; } + if ! ${PYTHON} -c "import ctypesgen" 2>/dev/null; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python module will not be built" >&5 +$as_echo "$as_me: WARNING: python module will not be built" >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } HAVE_PYTHON=1 fi @@ -22352,8 +21317,7 @@ fi fi # Check whether --with-pybuild_flags was given. -if test ${with_pybuild_flags+y} -then : +if test "${with_pybuild_flags+set}" = set; then : withval=$with_pybuild_flags; fi @@ -22362,8 +21326,7 @@ PYBUILDFLAGS=$with_pybuild_flags # Check whether --with-pyinstall_flags was given. -if test ${with_pyinstall_flags+y} -then : +if test "${with_pyinstall_flags+set}" = set; then : withval=$with_pyinstall_flags; fi @@ -22384,39 +21347,34 @@ PYINSTALLFLAGS=$with_pyinstall_flags - if test -z "$DOCKER" -then : + if test -z "$DOCKER"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether docker executable path has been provided" >&5 -printf %s "checking whether docker executable path has been provided... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether docker executable path has been provided" >&5 +$as_echo_n "checking whether docker executable path has been provided... " >&6; } # Check whether --with-docker was given. -if test ${with_docker+y} -then : +if test "${with_docker+set}" = set; then : withval=$with_docker; - if test "$withval" != yes && test "$withval" != no -then : + if test "$withval" != yes && test "$withval" != no; then : DOCKER="$withval" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOCKER" >&5 -printf "%s\n" "$DOCKER" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCKER" >&5 +$as_echo "$DOCKER" >&6; } -else $as_nop +else DOCKER="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - if test "$withval" != no -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test "$withval" != no; then : # Extract the first word of "docker", so it can be a program name with args. set dummy docker; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DOCKER+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DOCKER+:} false; then : + $as_echo_n "(cached) " >&6 +else case $DOCKER in [\\/]* | ?:[\\/]*) ac_cv_path_DOCKER="$DOCKER" # Let the user override the test with a path. @@ -22426,15 +21384,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DOCKER="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DOCKER="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -22447,11 +21401,11 @@ esac fi DOCKER=$ac_cv_path_DOCKER if test -n "$DOCKER"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOCKER" >&5 -printf "%s\n" "$DOCKER" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCKER" >&5 +$as_echo "$DOCKER" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -22460,18 +21414,17 @@ fi fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } # Extract the first word of "docker", so it can be a program name with args. set dummy docker; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DOCKER+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DOCKER+:} false; then : + $as_echo_n "(cached) " >&6 +else case $DOCKER in [\\/]* | ?:[\\/]*) ac_cv_path_DOCKER="$DOCKER" # Let the user override the test with a path. @@ -22481,15 +21434,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DOCKER="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DOCKER="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -22502,11 +21451,11 @@ esac fi DOCKER=$ac_cv_path_DOCKER if test -n "$DOCKER"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOCKER" >&5 -printf "%s\n" "$DOCKER" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCKER" >&5 +$as_echo "$DOCKER" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -22521,8 +21470,7 @@ fi -if test x${DOCKER} != xno -then : +if test x${DOCKER} != xno; then : HAVE_DOCKER=1 fi @@ -22565,8 +21513,7 @@ DX_ENV="$DX_ENV VERSION='$PACKAGE_VERSION'" # Check whether --enable-doxygen-doc was given. -if test ${enable_doxygen_doc+y} -then : +if test "${enable_doxygen_doc+set}" = set; then : enableval=$enable_doxygen_doc; case "$enableval" in #( @@ -22584,7 +21531,7 @@ n|N|no|No|NO) ;; esac -else $as_nop +else DX_FLAG_doc=1 @@ -22597,12 +21544,11 @@ if test "$DX_FLAG_doc" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}doxygen", so it can be a program name with args. set dummy ${ac_tool_prefix}doxygen; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DX_DOXYGEN+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DX_DOXYGEN+:} false; then : + $as_echo_n "(cached) " >&6 +else case $DX_DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DOXYGEN="$DX_DOXYGEN" # Let the user override the test with a path. @@ -22612,15 +21558,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DX_DOXYGEN="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DX_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -22632,11 +21574,11 @@ esac fi DX_DOXYGEN=$ac_cv_path_DX_DOXYGEN if test -n "$DX_DOXYGEN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_DOXYGEN" >&5 -printf "%s\n" "$DX_DOXYGEN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_DOXYGEN" >&5 +$as_echo "$DX_DOXYGEN" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -22645,12 +21587,11 @@ if test -z "$ac_cv_path_DX_DOXYGEN"; then ac_pt_DX_DOXYGEN=$DX_DOXYGEN # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_DX_DOXYGEN+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_DX_DOXYGEN+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_DX_DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DOXYGEN="$ac_pt_DX_DOXYGEN" # Let the user override the test with a path. @@ -22660,15 +21601,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_DX_DOXYGEN="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_DX_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -22680,11 +21617,11 @@ esac fi ac_pt_DX_DOXYGEN=$ac_cv_path_ac_pt_DX_DOXYGEN if test -n "$ac_pt_DX_DOXYGEN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DOXYGEN" >&5 -printf "%s\n" "$ac_pt_DX_DOXYGEN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DOXYGEN" >&5 +$as_echo "$ac_pt_DX_DOXYGEN" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_DX_DOXYGEN" = x; then @@ -22692,8 +21629,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_DOXYGEN=$ac_pt_DX_DOXYGEN @@ -22703,8 +21640,8 @@ else fi if test "$DX_FLAG_doc$DX_DOXYGEN" = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: doxygen not found - will not generate any doxygen documentation" >&5 -printf "%s\n" "$as_me: WARNING: doxygen not found - will not generate any doxygen documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: doxygen not found - will not generate any doxygen documentation" >&5 +$as_echo "$as_me: WARNING: doxygen not found - will not generate any doxygen documentation" >&2;} DX_FLAG_doc=0 fi @@ -22713,12 +21650,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}perl", so it can be a program name with args. set dummy ${ac_tool_prefix}perl; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DX_PERL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DX_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else case $DX_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_DX_PERL="$DX_PERL" # Let the user override the test with a path. @@ -22728,15 +21664,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DX_PERL="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DX_PERL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -22748,11 +21680,11 @@ esac fi DX_PERL=$ac_cv_path_DX_PERL if test -n "$DX_PERL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_PERL" >&5 -printf "%s\n" "$DX_PERL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_PERL" >&5 +$as_echo "$DX_PERL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -22761,12 +21693,11 @@ if test -z "$ac_cv_path_DX_PERL"; then ac_pt_DX_PERL=$DX_PERL # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_DX_PERL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_DX_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_DX_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_PERL="$ac_pt_DX_PERL" # Let the user override the test with a path. @@ -22776,15 +21707,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_DX_PERL="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_DX_PERL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -22796,11 +21723,11 @@ esac fi ac_pt_DX_PERL=$ac_cv_path_ac_pt_DX_PERL if test -n "$ac_pt_DX_PERL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_PERL" >&5 -printf "%s\n" "$ac_pt_DX_PERL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_PERL" >&5 +$as_echo "$ac_pt_DX_PERL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_DX_PERL" = x; then @@ -22808,8 +21735,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_PERL=$ac_pt_DX_PERL @@ -22819,8 +21746,8 @@ else fi if test "$DX_FLAG_doc$DX_PERL" = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: perl not found - will not generate any doxygen documentation" >&5 -printf "%s\n" "$as_me: WARNING: perl not found - will not generate any doxygen documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl not found - will not generate any doxygen documentation" >&5 +$as_echo "$as_me: WARNING: perl not found - will not generate any doxygen documentation" >&2;} DX_FLAG_doc=0 fi @@ -22843,8 +21770,7 @@ fi # Check whether --enable-doxygen-dot was given. -if test ${enable_doxygen_dot+y} -then : +if test "${enable_doxygen_dot+set}" = set; then : enableval=$enable_doxygen_dot; case "$enableval" in #( @@ -22865,7 +21791,7 @@ n|N|no|No|NO) ;; esac -else $as_nop +else DX_FLAG_dot=0 @@ -22881,12 +21807,11 @@ if test "$DX_FLAG_dot" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dot", so it can be a program name with args. set dummy ${ac_tool_prefix}dot; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DX_DOT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DX_DOT+:} false; then : + $as_echo_n "(cached) " >&6 +else case $DX_DOT in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DOT="$DX_DOT" # Let the user override the test with a path. @@ -22896,15 +21821,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DX_DOT="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DX_DOT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -22916,11 +21837,11 @@ esac fi DX_DOT=$ac_cv_path_DX_DOT if test -n "$DX_DOT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_DOT" >&5 -printf "%s\n" "$DX_DOT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_DOT" >&5 +$as_echo "$DX_DOT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -22929,12 +21850,11 @@ if test -z "$ac_cv_path_DX_DOT"; then ac_pt_DX_DOT=$DX_DOT # Extract the first word of "dot", so it can be a program name with args. set dummy dot; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_DX_DOT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_DX_DOT+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_DX_DOT in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DOT="$ac_pt_DX_DOT" # Let the user override the test with a path. @@ -22944,15 +21864,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_DX_DOT="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_DX_DOT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -22964,11 +21880,11 @@ esac fi ac_pt_DX_DOT=$ac_cv_path_ac_pt_DX_DOT if test -n "$ac_pt_DX_DOT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DOT" >&5 -printf "%s\n" "$ac_pt_DX_DOT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DOT" >&5 +$as_echo "$ac_pt_DX_DOT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_DX_DOT" = x; then @@ -22976,8 +21892,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_DOT=$ac_pt_DX_DOT @@ -22987,8 +21903,8 @@ else fi if test "$DX_FLAG_dot$DX_DOT" = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: dot not found - will not generate graphics for doxygen documentation" >&5 -printf "%s\n" "$as_me: WARNING: dot not found - will not generate graphics for doxygen documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dot not found - will not generate graphics for doxygen documentation" >&5 +$as_echo "$as_me: WARNING: dot not found - will not generate graphics for doxygen documentation" >&2;} DX_FLAG_dot=0 fi @@ -23016,8 +21932,7 @@ fi # Check whether --enable-doxygen-man was given. -if test ${enable_doxygen_man+y} -then : +if test "${enable_doxygen_man+set}" = set; then : enableval=$enable_doxygen_man; case "$enableval" in #( @@ -23038,7 +21953,7 @@ n|N|no|No|NO) ;; esac -else $as_nop +else DX_FLAG_man=1 @@ -23071,8 +21986,7 @@ fi # Check whether --enable-doxygen-rtf was given. -if test ${enable_doxygen_rtf+y} -then : +if test "${enable_doxygen_rtf+set}" = set; then : enableval=$enable_doxygen_rtf; case "$enableval" in #( @@ -23093,7 +22007,7 @@ n|N|no|No|NO) ;; esac -else $as_nop +else DX_FLAG_rtf=0 @@ -23126,8 +22040,7 @@ fi # Check whether --enable-doxygen-xml was given. -if test ${enable_doxygen_xml+y} -then : +if test "${enable_doxygen_xml+set}" = set; then : enableval=$enable_doxygen_xml; case "$enableval" in #( @@ -23148,7 +22061,7 @@ n|N|no|No|NO) ;; esac -else $as_nop +else DX_FLAG_xml=0 @@ -23181,8 +22094,7 @@ fi # Check whether --enable-doxygen-chm was given. -if test ${enable_doxygen_chm+y} -then : +if test "${enable_doxygen_chm+set}" = set; then : enableval=$enable_doxygen_chm; case "$enableval" in #( @@ -23203,7 +22115,7 @@ n|N|no|No|NO) ;; esac -else $as_nop +else DX_FLAG_chm=0 @@ -23219,12 +22131,11 @@ if test "$DX_FLAG_chm" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}hhc", so it can be a program name with args. set dummy ${ac_tool_prefix}hhc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DX_HHC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DX_HHC+:} false; then : + $as_echo_n "(cached) " >&6 +else case $DX_HHC in [\\/]* | ?:[\\/]*) ac_cv_path_DX_HHC="$DX_HHC" # Let the user override the test with a path. @@ -23234,15 +22145,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DX_HHC="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DX_HHC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -23254,11 +22161,11 @@ esac fi DX_HHC=$ac_cv_path_DX_HHC if test -n "$DX_HHC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_HHC" >&5 -printf "%s\n" "$DX_HHC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_HHC" >&5 +$as_echo "$DX_HHC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -23267,12 +22174,11 @@ if test -z "$ac_cv_path_DX_HHC"; then ac_pt_DX_HHC=$DX_HHC # Extract the first word of "hhc", so it can be a program name with args. set dummy hhc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_DX_HHC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_DX_HHC+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_DX_HHC in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_HHC="$ac_pt_DX_HHC" # Let the user override the test with a path. @@ -23282,15 +22188,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_DX_HHC="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_DX_HHC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -23302,11 +22204,11 @@ esac fi ac_pt_DX_HHC=$ac_cv_path_ac_pt_DX_HHC if test -n "$ac_pt_DX_HHC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_HHC" >&5 -printf "%s\n" "$ac_pt_DX_HHC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_HHC" >&5 +$as_echo "$ac_pt_DX_HHC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_DX_HHC" = x; then @@ -23314,8 +22216,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_HHC=$ac_pt_DX_HHC @@ -23325,8 +22227,8 @@ else fi if test "$DX_FLAG_chm$DX_HHC" = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&5 -printf "%s\n" "$as_me: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&5 +$as_echo "$as_me: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&2;} DX_FLAG_chm=0 fi @@ -23357,8 +22259,7 @@ fi # Check whether --enable-doxygen-chi was given. -if test ${enable_doxygen_chi+y} -then : +if test "${enable_doxygen_chi+set}" = set; then : enableval=$enable_doxygen_chi; case "$enableval" in #( @@ -23379,7 +22280,7 @@ n|N|no|No|NO) ;; esac -else $as_nop +else DX_FLAG_chi=0 @@ -23412,8 +22313,7 @@ fi # Check whether --enable-doxygen-html was given. -if test ${enable_doxygen_html+y} -then : +if test "${enable_doxygen_html+set}" = set; then : enableval=$enable_doxygen_html; case "$enableval" in #( @@ -23437,7 +22337,7 @@ n|N|no|No|NO) ;; esac -else $as_nop +else DX_FLAG_html=1 @@ -23473,8 +22373,7 @@ fi # Check whether --enable-doxygen-ps was given. -if test ${enable_doxygen_ps+y} -then : +if test "${enable_doxygen_ps+set}" = set; then : enableval=$enable_doxygen_ps; case "$enableval" in #( @@ -23495,7 +22394,7 @@ n|N|no|No|NO) ;; esac -else $as_nop +else DX_FLAG_ps=1 @@ -23511,12 +22410,11 @@ if test "$DX_FLAG_ps" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}latex", so it can be a program name with args. set dummy ${ac_tool_prefix}latex; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DX_LATEX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DX_LATEX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $DX_LATEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_LATEX="$DX_LATEX" # Let the user override the test with a path. @@ -23526,15 +22424,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DX_LATEX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DX_LATEX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -23546,11 +22440,11 @@ esac fi DX_LATEX=$ac_cv_path_DX_LATEX if test -n "$DX_LATEX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_LATEX" >&5 -printf "%s\n" "$DX_LATEX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_LATEX" >&5 +$as_echo "$DX_LATEX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -23559,12 +22453,11 @@ if test -z "$ac_cv_path_DX_LATEX"; then ac_pt_DX_LATEX=$DX_LATEX # Extract the first word of "latex", so it can be a program name with args. set dummy latex; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_DX_LATEX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_DX_LATEX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_DX_LATEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_LATEX="$ac_pt_DX_LATEX" # Let the user override the test with a path. @@ -23574,15 +22467,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_DX_LATEX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_DX_LATEX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -23594,11 +22483,11 @@ esac fi ac_pt_DX_LATEX=$ac_cv_path_ac_pt_DX_LATEX if test -n "$ac_pt_DX_LATEX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_LATEX" >&5 -printf "%s\n" "$ac_pt_DX_LATEX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_LATEX" >&5 +$as_echo "$ac_pt_DX_LATEX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_DX_LATEX" = x; then @@ -23606,8 +22495,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_LATEX=$ac_pt_DX_LATEX @@ -23617,8 +22506,8 @@ else fi if test "$DX_FLAG_ps$DX_LATEX" = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: latex not found - will not generate doxygen PostScript documentation" >&5 -printf "%s\n" "$as_me: WARNING: latex not found - will not generate doxygen PostScript documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: latex not found - will not generate doxygen PostScript documentation" >&5 +$as_echo "$as_me: WARNING: latex not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi @@ -23627,12 +22516,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args. set dummy ${ac_tool_prefix}makeindex; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DX_MAKEINDEX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DX_MAKEINDEX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_MAKEINDEX="$DX_MAKEINDEX" # Let the user override the test with a path. @@ -23642,15 +22530,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DX_MAKEINDEX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -23662,11 +22546,11 @@ esac fi DX_MAKEINDEX=$ac_cv_path_DX_MAKEINDEX if test -n "$DX_MAKEINDEX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_MAKEINDEX" >&5 -printf "%s\n" "$DX_MAKEINDEX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_MAKEINDEX" >&5 +$as_echo "$DX_MAKEINDEX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -23675,12 +22559,11 @@ if test -z "$ac_cv_path_DX_MAKEINDEX"; then ac_pt_DX_MAKEINDEX=$DX_MAKEINDEX # Extract the first word of "makeindex", so it can be a program name with args. set dummy makeindex; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_DX_MAKEINDEX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_DX_MAKEINDEX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_MAKEINDEX="$ac_pt_DX_MAKEINDEX" # Let the user override the test with a path. @@ -23690,15 +22573,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_DX_MAKEINDEX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -23710,11 +22589,11 @@ esac fi ac_pt_DX_MAKEINDEX=$ac_cv_path_ac_pt_DX_MAKEINDEX if test -n "$ac_pt_DX_MAKEINDEX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_MAKEINDEX" >&5 -printf "%s\n" "$ac_pt_DX_MAKEINDEX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_MAKEINDEX" >&5 +$as_echo "$ac_pt_DX_MAKEINDEX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_DX_MAKEINDEX" = x; then @@ -23722,8 +22601,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_MAKEINDEX=$ac_pt_DX_MAKEINDEX @@ -23733,8 +22612,8 @@ else fi if test "$DX_FLAG_ps$DX_MAKEINDEX" = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&5 -printf "%s\n" "$as_me: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&5 +$as_echo "$as_me: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi @@ -23743,12 +22622,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dvips", so it can be a program name with args. set dummy ${ac_tool_prefix}dvips; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DX_DVIPS+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DX_DVIPS+:} false; then : + $as_echo_n "(cached) " >&6 +else case $DX_DVIPS in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DVIPS="$DX_DVIPS" # Let the user override the test with a path. @@ -23758,15 +22636,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DX_DVIPS="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DX_DVIPS="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -23778,11 +22652,11 @@ esac fi DX_DVIPS=$ac_cv_path_DX_DVIPS if test -n "$DX_DVIPS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_DVIPS" >&5 -printf "%s\n" "$DX_DVIPS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_DVIPS" >&5 +$as_echo "$DX_DVIPS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -23791,12 +22665,11 @@ if test -z "$ac_cv_path_DX_DVIPS"; then ac_pt_DX_DVIPS=$DX_DVIPS # Extract the first word of "dvips", so it can be a program name with args. set dummy dvips; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_DX_DVIPS+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_DX_DVIPS+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_DX_DVIPS in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DVIPS="$ac_pt_DX_DVIPS" # Let the user override the test with a path. @@ -23806,15 +22679,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_DX_DVIPS="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_DX_DVIPS="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -23826,11 +22695,11 @@ esac fi ac_pt_DX_DVIPS=$ac_cv_path_ac_pt_DX_DVIPS if test -n "$ac_pt_DX_DVIPS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DVIPS" >&5 -printf "%s\n" "$ac_pt_DX_DVIPS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DVIPS" >&5 +$as_echo "$ac_pt_DX_DVIPS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_DX_DVIPS" = x; then @@ -23838,8 +22707,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_DVIPS=$ac_pt_DX_DVIPS @@ -23849,8 +22718,8 @@ else fi if test "$DX_FLAG_ps$DX_DVIPS" = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&5 -printf "%s\n" "$as_me: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&5 +$as_echo "$as_me: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi @@ -23859,12 +22728,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}egrep", so it can be a program name with args. set dummy ${ac_tool_prefix}egrep; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DX_EGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DX_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else case $DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_DX_EGREP="$DX_EGREP" # Let the user override the test with a path. @@ -23874,15 +22742,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DX_EGREP="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -23894,11 +22758,11 @@ esac fi DX_EGREP=$ac_cv_path_DX_EGREP if test -n "$DX_EGREP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_EGREP" >&5 -printf "%s\n" "$DX_EGREP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_EGREP" >&5 +$as_echo "$DX_EGREP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -23907,12 +22771,11 @@ if test -z "$ac_cv_path_DX_EGREP"; then ac_pt_DX_EGREP=$DX_EGREP # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_DX_EGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_DX_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_EGREP="$ac_pt_DX_EGREP" # Let the user override the test with a path. @@ -23922,15 +22785,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_DX_EGREP="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -23942,11 +22801,11 @@ esac fi ac_pt_DX_EGREP=$ac_cv_path_ac_pt_DX_EGREP if test -n "$ac_pt_DX_EGREP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_EGREP" >&5 -printf "%s\n" "$ac_pt_DX_EGREP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_EGREP" >&5 +$as_echo "$ac_pt_DX_EGREP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_DX_EGREP" = x; then @@ -23954,8 +22813,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_EGREP=$ac_pt_DX_EGREP @@ -23965,8 +22824,8 @@ else fi if test "$DX_FLAG_ps$DX_EGREP" = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&5 -printf "%s\n" "$as_me: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&5 +$as_echo "$as_me: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi @@ -23987,8 +22846,7 @@ fi # Check whether --enable-doxygen-pdf was given. -if test ${enable_doxygen_pdf+y} -then : +if test "${enable_doxygen_pdf+set}" = set; then : enableval=$enable_doxygen_pdf; case "$enableval" in #( @@ -24009,7 +22867,7 @@ n|N|no|No|NO) ;; esac -else $as_nop +else DX_FLAG_pdf=1 @@ -24025,12 +22883,11 @@ if test "$DX_FLAG_pdf" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pdflatex", so it can be a program name with args. set dummy ${ac_tool_prefix}pdflatex; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DX_PDFLATEX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DX_PDFLATEX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $DX_PDFLATEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_PDFLATEX="$DX_PDFLATEX" # Let the user override the test with a path. @@ -24040,15 +22897,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DX_PDFLATEX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DX_PDFLATEX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -24060,11 +22913,11 @@ esac fi DX_PDFLATEX=$ac_cv_path_DX_PDFLATEX if test -n "$DX_PDFLATEX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_PDFLATEX" >&5 -printf "%s\n" "$DX_PDFLATEX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_PDFLATEX" >&5 +$as_echo "$DX_PDFLATEX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -24073,12 +22926,11 @@ if test -z "$ac_cv_path_DX_PDFLATEX"; then ac_pt_DX_PDFLATEX=$DX_PDFLATEX # Extract the first word of "pdflatex", so it can be a program name with args. set dummy pdflatex; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_DX_PDFLATEX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_DX_PDFLATEX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_DX_PDFLATEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_PDFLATEX="$ac_pt_DX_PDFLATEX" # Let the user override the test with a path. @@ -24088,15 +22940,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_DX_PDFLATEX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_DX_PDFLATEX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -24108,11 +22956,11 @@ esac fi ac_pt_DX_PDFLATEX=$ac_cv_path_ac_pt_DX_PDFLATEX if test -n "$ac_pt_DX_PDFLATEX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_PDFLATEX" >&5 -printf "%s\n" "$ac_pt_DX_PDFLATEX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_PDFLATEX" >&5 +$as_echo "$ac_pt_DX_PDFLATEX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_DX_PDFLATEX" = x; then @@ -24120,8 +22968,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_PDFLATEX=$ac_pt_DX_PDFLATEX @@ -24131,8 +22979,8 @@ else fi if test "$DX_FLAG_pdf$DX_PDFLATEX" = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&5 -printf "%s\n" "$as_me: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&5 +$as_echo "$as_me: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi @@ -24141,12 +22989,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args. set dummy ${ac_tool_prefix}makeindex; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DX_MAKEINDEX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DX_MAKEINDEX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_MAKEINDEX="$DX_MAKEINDEX" # Let the user override the test with a path. @@ -24156,15 +23003,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DX_MAKEINDEX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -24176,11 +23019,11 @@ esac fi DX_MAKEINDEX=$ac_cv_path_DX_MAKEINDEX if test -n "$DX_MAKEINDEX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_MAKEINDEX" >&5 -printf "%s\n" "$DX_MAKEINDEX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_MAKEINDEX" >&5 +$as_echo "$DX_MAKEINDEX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -24189,12 +23032,11 @@ if test -z "$ac_cv_path_DX_MAKEINDEX"; then ac_pt_DX_MAKEINDEX=$DX_MAKEINDEX # Extract the first word of "makeindex", so it can be a program name with args. set dummy makeindex; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_DX_MAKEINDEX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_DX_MAKEINDEX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_MAKEINDEX="$ac_pt_DX_MAKEINDEX" # Let the user override the test with a path. @@ -24204,15 +23046,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_DX_MAKEINDEX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -24224,11 +23062,11 @@ esac fi ac_pt_DX_MAKEINDEX=$ac_cv_path_ac_pt_DX_MAKEINDEX if test -n "$ac_pt_DX_MAKEINDEX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_MAKEINDEX" >&5 -printf "%s\n" "$ac_pt_DX_MAKEINDEX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_MAKEINDEX" >&5 +$as_echo "$ac_pt_DX_MAKEINDEX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_DX_MAKEINDEX" = x; then @@ -24236,8 +23074,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_MAKEINDEX=$ac_pt_DX_MAKEINDEX @@ -24247,8 +23085,8 @@ else fi if test "$DX_FLAG_pdf$DX_MAKEINDEX" = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&5 -printf "%s\n" "$as_me: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&5 +$as_echo "$as_me: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi @@ -24257,12 +23095,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}egrep", so it can be a program name with args. set dummy ${ac_tool_prefix}egrep; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DX_EGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DX_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else case $DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_DX_EGREP="$DX_EGREP" # Let the user override the test with a path. @@ -24272,15 +23109,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DX_EGREP="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -24292,11 +23125,11 @@ esac fi DX_EGREP=$ac_cv_path_DX_EGREP if test -n "$DX_EGREP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_EGREP" >&5 -printf "%s\n" "$DX_EGREP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_EGREP" >&5 +$as_echo "$DX_EGREP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -24305,12 +23138,11 @@ if test -z "$ac_cv_path_DX_EGREP"; then ac_pt_DX_EGREP=$DX_EGREP # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_DX_EGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_DX_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_EGREP="$ac_pt_DX_EGREP" # Let the user override the test with a path. @@ -24320,15 +23152,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_DX_EGREP="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -24340,11 +23168,11 @@ esac fi ac_pt_DX_EGREP=$ac_cv_path_ac_pt_DX_EGREP if test -n "$ac_pt_DX_EGREP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_EGREP" >&5 -printf "%s\n" "$ac_pt_DX_EGREP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_EGREP" >&5 +$as_echo "$ac_pt_DX_EGREP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_DX_EGREP" = x; then @@ -24352,8 +23180,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_EGREP=$ac_pt_DX_EGREP @@ -24363,8 +23191,8 @@ else fi if test "$DX_FLAG_pdf$DX_EGREP" = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: egrep not found - will not generate doxygen PDF documentation" >&5 -printf "%s\n" "$as_me: WARNING: egrep not found - will not generate doxygen PDF documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: egrep not found - will not generate doxygen PDF documentation" >&5 +$as_echo "$as_me: WARNING: egrep not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi @@ -24410,8 +23238,7 @@ PAPER_SIZE=$DOXYGEN_PAPER_SIZE esac # Rules: -if test $DX_FLAG_html -eq 1 -then : +if test $DX_FLAG_html -eq 1; then : DX_SNIPPET_html="## ------------------------------- ## ## Rules specific for HTML output. ## ## ------------------------------- ## @@ -24420,19 +23247,17 @@ DX_CLEAN_HTML = \$(DX_DOCDIR)/html\\ \$(DX_DOCDIR)/html " -else $as_nop +else DX_SNIPPET_html="" fi -if test $DX_FLAG_chi -eq 1 -then : +if test $DX_FLAG_chi -eq 1; then : DX_SNIPPET_chi=" DX_CLEAN_CHI = \$(DX_DOCDIR)/\$(PACKAGE).chi\\ \$(DX_DOCDIR)/\$(PACKAGE).chi" -else $as_nop +else DX_SNIPPET_chi="" fi -if test $DX_FLAG_chm -eq 1 -then : +if test $DX_FLAG_chm -eq 1; then : DX_SNIPPET_chm="## ------------------------------ ## ## Rules specific for CHM output. ## ## ------------------------------ ## @@ -24442,11 +23267,10 @@ DX_CLEAN_CHM = \$(DX_DOCDIR)/chm\\ ${DX_SNIPPET_chi} " -else $as_nop +else DX_SNIPPET_chm="" fi -if test $DX_FLAG_man -eq 1 -then : +if test $DX_FLAG_man -eq 1; then : DX_SNIPPET_man="## ------------------------------ ## ## Rules specific for MAN output. ## ## ------------------------------ ## @@ -24455,11 +23279,10 @@ DX_CLEAN_MAN = \$(DX_DOCDIR)/man\\ \$(DX_DOCDIR)/man " -else $as_nop +else DX_SNIPPET_man="" fi -if test $DX_FLAG_rtf -eq 1 -then : +if test $DX_FLAG_rtf -eq 1; then : DX_SNIPPET_rtf="## ------------------------------ ## ## Rules specific for RTF output. ## ## ------------------------------ ## @@ -24468,11 +23291,10 @@ DX_CLEAN_RTF = \$(DX_DOCDIR)/rtf\\ \$(DX_DOCDIR)/rtf " -else $as_nop +else DX_SNIPPET_rtf="" fi -if test $DX_FLAG_xml -eq 1 -then : +if test $DX_FLAG_xml -eq 1; then : DX_SNIPPET_xml="## ------------------------------ ## ## Rules specific for XML output. ## ## ------------------------------ ## @@ -24481,11 +23303,10 @@ DX_CLEAN_XML = \$(DX_DOCDIR)/xml\\ \$(DX_DOCDIR)/xml " -else $as_nop +else DX_SNIPPET_xml="" fi -if test $DX_FLAG_ps -eq 1 -then : +if test $DX_FLAG_ps -eq 1; then : DX_SNIPPET_ps="## ----------------------------- ## ## Rules specific for PS output. ## ## ----------------------------- ## @@ -24513,11 +23334,10 @@ doxygen-ps: \$(DX_CLEAN_PS) \$(DX_DVIPS) -o ../\$(PACKAGE).ps refman.dvi " -else $as_nop +else DX_SNIPPET_ps="" fi -if test $DX_FLAG_pdf -eq 1 -then : +if test $DX_FLAG_pdf -eq 1; then : DX_SNIPPET_pdf="## ------------------------------ ## ## Rules specific for PDF output. ## ## ------------------------------ ## @@ -24545,11 +23365,10 @@ doxygen-pdf: \$(DX_CLEAN_PDF) mv refman.pdf ../\$(PACKAGE).pdf " -else $as_nop +else DX_SNIPPET_pdf="" fi -if test $DX_FLAG_ps -eq 1 -o $DX_FLAG_pdf -eq 1 -then : +if test $DX_FLAG_ps -eq 1 -o $DX_FLAG_pdf -eq 1; then : DX_SNIPPET_latex="## ------------------------------------------------- ## ## Rules specific for LaTeX (shared for PS and PDF). ## ## ------------------------------------------------- ## @@ -24562,12 +23381,11 @@ DX_CLEAN_LATEX = \$(DX_DOCDIR)/latex\\ \$(DX_DOCDIR)/latex " -else $as_nop +else DX_SNIPPET_latex="" fi -if test $DX_FLAG_doc -eq 1 -then : +if test $DX_FLAG_doc -eq 1; then : DX_SNIPPET_doc="## --------------------------------- ## ## Format-independent Doxygen rules. ## ## --------------------------------- ## @@ -24610,7 +23428,7 @@ DX_CLEANFILES = \\ \$(DX_CLEAN_PS) \\ \$(DX_CLEAN_PDF) \\ \$(DX_CLEAN_LATEX)" -else $as_nop +else DX_SNIPPET_doc="" fi DX_RULES="${DX_SNIPPET_doc}" @@ -24645,109 +23463,34 @@ PACKAGE_VERSION_MICRO=`echo $PACKAGE_VERSION | $AWK -F. '{print $3}'` # C++20/C++17/C++14/C++11 toggling # -MAP_KERNEL_STDCXX=c++11 +MAP_KERNEL_STDCXX=c++17 -STDCXX_IS_SET=0 +if test "x$HAVE_CXX17" = "x1"; then : -if test x$HAVE_CXX20 = x1 -then : - STDCXX_IS_SET=1 + CXXFLAGS="-std=c++17 $CXXFLAGS" - CXXFLAGS="-std=c++20 $CXXFLAGS" - if test x$CUDA_HAVE_CXX20 = x1 -then : - NVCCFLAGS="-std=c++20 $NVCCFLAGS" - MAP_KERNEL_STDCXX=c++20 - -else $as_nop - if test x$CUDA_HAVE_CXX17 = x1 -then : - NVCCFLAGS="-std=c++17 $NVCCFLAGS" - MAP_KERNEL_STDCXX=c++17 +else -else $as_nop - if test x$CUDA_HAVE_CXX14 = x1 -then : - NVCCFLAGS="-std=c++14 $NVCCFLAGS" - MAP_KERNEL_STDCXX=c++14 + as_fn_error $? "\"requires a c++17 compiler\"" "$LINENO" 5 -else $as_nop - NVCCFLAGS="-std=c++11 $NVCCFLAGS" fi -fi -fi -fi -if test x$HAVE_CXX17 = x1 -then : - STDCXX_IS_SET=1 - CXXFLAGS="-std=c++17 $CXXFLAGS" - if test x$CUDA_HAVE_CXX20 = x1 -then : - NVCCFLAGS="-std=c++17 $NVCCFLAGS" - MAP_KERNEL_STDCXX=c++17 +# +# Linking flags +# -else $as_nop - if test x$CUDA_HAVE_CXX17 = x1 -then : - NVCCFLAGS="-std=c++17 $NVCCFLAGS" - MAP_KERNEL_STDCXX=c++17 +CXXFLAGS="$CXXFLAGS $lt_prog_compiler_pic_CXX" +if test "x$GPU_PLATFORM" = "xnvidia"; then : -else $as_nop - if test x$CUDA_HAVE_CXX14 = x1 -then : - NVCCFLAGS="-std=c++14 $NVCCFLAGS" - MAP_KERNEL_STDCXX=c++14 + HIPCCFLAGS="$HIPCCFLAGS -Xcompiler \"$lt_prog_compiler_pic_CXX\"" -else $as_nop - NVCCFLAGS="-std=c++11 $NVCCFLAGS" -fi fi -fi -fi -if test x$HAVE_CXX14 = x1 -then : - STDCXX_IS_SET=1 - - CXXFLAGS="-std=c++14 $CXXFLAGS" - if test x$CUDA_HAVE_CXX20 = x1 -then : - NVCCFLAGS="-std=c++14 $NVCCFLAGS" - MAP_KERNEL_STDCXX=c++14 - -else $as_nop - if test x$CUDA_HAVE_CXX17 = x1 -then : - NVCCFLAGS="-std=c++14 $NVCCFLAGS" - MAP_KERNEL_STDCXX=c++14 +if test "x$GPU_PLATFORM" = "xamd"; then : -else $as_nop - if test x$CUDA_HAVE_CXX14 = x1 -then : - NVCCFLAGS="-std=c++14 $NVCCFLAGS" - MAP_KERNEL_STDCXX=c++14 - -else $as_nop - NVCCFLAGS="-std=c++11 $NVCCFLAGS" -fi -fi -fi -fi -if test x$STDCXX_IS_SET != x1 -then : - STDCXX_IS_SET=1 + HIPCCFLAGS="$HIPCCFLAGS $lt_prog_compiler_pic_CXX" - CXXFLAGS="-std=c++11 $CXXFLAGS" - NVCCFLAGS="-std=c++11 -Xcompiler \"-DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT\" $NVCCFLAGS" fi -# -# Linking flags -# - -CXXFLAGS="$CXXFLAGS $lt_prog_compiler_pic_CXX" -NVCCFLAGS="$NVCCFLAGS -Xcompiler \"$lt_prog_compiler_pic_CXX\"" - ac_config_files="$ac_config_files config.mk Makefile src/Makefile python/Makefile share/bifrost.pc src/bifrost/config.h" @@ -24778,8 +23521,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -24809,15 +23552,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -24831,8 +23574,8 @@ printf "%s\n" "$as_me: updating cache $cache_file" >&6;} fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -24885,7 +23628,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -24901,8 +23644,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -24925,16 +23668,14 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -24944,46 +23685,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -24992,6 +23733,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -25000,12 +23748,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -25017,10 +23761,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -25033,14 +23797,13 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -25067,20 +23830,18 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset - # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -25092,13 +23853,12 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -25129,7 +23889,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -25151,10 +23911,6 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -25168,12 +23924,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -25215,7 +23965,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -25224,7 +23974,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -25287,7 +24037,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by bifrost $as_me 0.10.0, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -25341,16 +24091,14 @@ Report bugs to the package provider. bifrost home page: ." _ACEOF -ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` -ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config='$ac_cs_config_escaped' +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ bifrost config.status 0.10.0 -configured by $0, generated by GNU Autoconf 2.71, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -25389,21 +24137,21 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -25431,7 +24179,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -25445,7 +24193,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - printf "%s\n" "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF @@ -25861,8 +24609,8 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -26090,7 +24838,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -26098,17 +24846,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | + ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -26125,7 +24873,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -26149,9 +24897,9 @@ printf "%s\n" X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -26208,8 +24956,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -26252,9 +25000,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -26266,8 +25014,8 @@ which seems to be undefined. Please make sure it is defined" >&2;} ;; - :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -printf "%s\n" "$as_me: executing $ac_file commands" >&6;} + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -26815,7 +25563,6 @@ _LT_EOF esac - ltmain=$ac_aux_dir/ltmain.sh @@ -27018,8 +25765,8 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi @@ -27033,92 +25780,80 @@ fi echo "" -if test x$HAVE_CUDA = x1 -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: cuda: yes - v$CUDA_VERSION - $GPU_ARCHS - $with_stream_model streams" >&5 -printf "%s\n" "$as_me: cuda: yes - v$CUDA_VERSION - $GPU_ARCHS - $with_stream_model streams" >&6;} -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: cuda: no" >&5 -printf "%s\n" "$as_me: cuda: no" >&6;} +if test x$HAVE_CUDA = x1; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: cuda: yes - v$CUDA_VERSION - $GPU_ARCHS - $with_stream_model streams" >&5 +$as_echo "$as_me: cuda: yes - v$CUDA_VERSION - $GPU_ARCHS - $with_stream_model streams" >&6;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: cuda: no" >&5 +$as_echo "$as_me: cuda: no" >&6;} fi -if test x$HAVE_NUMA = x1 -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: numa: yes" >&5 -printf "%s\n" "$as_me: numa: yes" >&6;} -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: numa: no" >&5 -printf "%s\n" "$as_me: numa: no" >&6;} +if test x$HAVE_NUMA = x1; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: numa: yes" >&5 +$as_echo "$as_me: numa: yes" >&6;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: numa: no" >&5 +$as_echo "$as_me: numa: no" >&6;} fi -if test x$HAVE_HWLOC = x1 -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: hwloc: yes" >&5 -printf "%s\n" "$as_me: hwloc: yes" >&6;} -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: hwloc: no" >&5 -printf "%s\n" "$as_me: hwloc: no" >&6;} +if test x$HAVE_HWLOC = x1; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: hwloc: yes" >&5 +$as_echo "$as_me: hwloc: yes" >&6;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: hwloc: no" >&5 +$as_echo "$as_me: hwloc: no" >&6;} fi -if test x$HAVE_VMA = x1 -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: libvma: yes" >&5 -printf "%s\n" "$as_me: libvma: yes" >&6;} -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: libvma: no" >&5 -printf "%s\n" "$as_me: libvma: no" >&6;} +if test x$HAVE_VMA = x1; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: libvma: yes" >&5 +$as_echo "$as_me: libvma: yes" >&6;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: libvma: no" >&5 +$as_echo "$as_me: libvma: no" >&6;} fi -if test x$HAVE_PYTHON = x1 -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: python bindings: yes" >&5 -printf "%s\n" "$as_me: python bindings: yes" >&6;} -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: python bindings: no" >&5 -printf "%s\n" "$as_me: python bindings: no" >&6;} +if test x$HAVE_PYTHON = x1; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: python bindings: yes" >&5 +$as_echo "$as_me: python bindings: yes" >&6;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: python bindings: no" >&5 +$as_echo "$as_me: python bindings: no" >&6;} fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: memory alignment: $ALIGNMENT" >&5 -printf "%s\n" "$as_me: memory alignment: $ALIGNMENT" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: memory alignment: $ALIGNMENT" >&5 +$as_echo "$as_me: memory alignment: $ALIGNMENT" >&6;} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: logging directory: $HAVE_TMPFS" >&5 -printf "%s\n" "$as_me: logging directory: $HAVE_TMPFS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: logging directory: $HAVE_TMPFS" >&5 +$as_echo "$as_me: logging directory: $HAVE_TMPFS" >&6;} -if test x$enable_debug != xno -then : +if test x$enable_debug != xno; then : OPTIONS="$OPTIONS debug" fi -if test x$enable_trace != xno -then : +if test x$enable_trace != xno; then : OPTIONS="$OPTIONS trace" fi -if test x$enable_cuda_debug != xno -then : +if test x$enable_cuda_debug != xno; then : OPTIONS="$OPTIONS cuda_debug" fi -if test x$enable_native_arch != xno -then : +if test x$enable_native_arch != xno; then : OPTIONS="$OPTIONS native" fi -if test x$HAVE_FLOAT128 != x0 -then : +if test x$HAVE_FLOAT128 != x0; then : OPTIONS="$OPTIONS float128" fi -if test x$enable_map_cache != xno -then : +if test x$enable_map_cache != xno; then : OPTIONS="$OPTIONS map_cache" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: options:$OPTIONS" >&5 -printf "%s\n" "$as_me: options:$OPTIONS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: options:$OPTIONS" >&5 +$as_echo "$as_me: options:$OPTIONS" >&6;} echo "" echo "Bifrost is now ready to be compiled. Please run 'make'" echo "" - diff --git a/configure.ac b/configure.ac index 9aebfd263..0c5866069 100644 --- a/configure.ac +++ b/configure.ac @@ -151,7 +151,11 @@ AS_IF([test x$enable_vma != xno], # include CUDA-specific entries # ################################# -AX_CHECK_CUDA +AX_CHECK_HIP + +AS_IF([test "x$ENABLE_GPU" = "x1" && test "x$GPU_PLATFORM" = "xnvidia"], [ + AX_CHECK_CUDA +]) # # Bifrost memory alignment @@ -183,7 +187,7 @@ AC_SUBST([HAVE_DEBUG], [0]) AS_IF([test x$enable_debug != xno], [AC_SUBST([HAVE_DEBUG], [1]) CXXFLAGS="$CXXFLAGS -g" - NVCCFLAGS="$NVCCFLAGS -g"]) + HIPCCFLAGS="$HIPCCFLAGS -g"]) AC_ARG_ENABLE([trace], [AS_HELP_STRING([--enable-trace], @@ -204,7 +208,7 @@ AC_ARG_ENABLE([cuda_debug], AC_SUBST([HAVE_CUDA_DEBUG], [0]) AS_IF([test x$enable_cuda_debug != xno], [AC_SUBST([HAVE_CUDA_DEBUG], [1]) - NVCCFLAGS="$NVCCFLAGS -G"]) + HIPCCFLAGS="$HIPCCFLAGS -G"]) AC_ARG_ENABLE([map_cache], [AS_HELP_STRING([--disable-map-cache], @@ -213,7 +217,7 @@ AC_ARG_ENABLE([map_cache], [enable_map_cache=yes]) AC_SUBST([HAVE_MAP_CACHE], [0]) AS_IF([test x$enable_map_cache != xno], - [AC_SUBST([HAVE_MAP_CACHE], [$HAVE_CUDA])]) + [AC_SUBST([HAVE_MAP_CACHE], [test "x$GPU_PLATFORM" = "xnvidia"])]) # # Python @@ -287,58 +291,24 @@ AC_SUBST([PACKAGE_VERSION_MICRO], [`echo $PACKAGE_VERSION | $AWK -F. '{print $3} # C++20/C++17/C++14/C++11 toggling # -AC_SUBST([MAP_KERNEL_STDCXX], [c++11]) -AC_SUBST([STDCXX_IS_SET], [0]) -AS_IF([test x$HAVE_CXX20 = x1], - [AC_SUBST([STDCXX_IS_SET], [1]) - CXXFLAGS="-std=c++20 $CXXFLAGS" - AS_IF([test x$CUDA_HAVE_CXX20 = x1], - [NVCCFLAGS="-std=c++20 $NVCCFLAGS" - AC_SUBST([MAP_KERNEL_STDCXX], [c++20])], - [AS_IF([test x$CUDA_HAVE_CXX17 = x1], - [NVCCFLAGS="-std=c++17 $NVCCFLAGS" - AC_SUBST([MAP_KERNEL_STDCXX], [c++17])], - [AS_IF([test x$CUDA_HAVE_CXX14 = x1], - [NVCCFLAGS="-std=c++14 $NVCCFLAGS" - AC_SUBST([MAP_KERNEL_STDCXX], [c++14])], - [NVCCFLAGS="-std=c++11 $NVCCFLAGS"])])])]) -AS_IF([test x$HAVE_CXX17 = x1], - [AC_SUBST([STDCXX_IS_SET], [1]) - CXXFLAGS="-std=c++17 $CXXFLAGS" - AS_IF([test x$CUDA_HAVE_CXX20 = x1], - [NVCCFLAGS="-std=c++17 $NVCCFLAGS" - AC_SUBST([MAP_KERNEL_STDCXX], [c++17])], - [AS_IF([test x$CUDA_HAVE_CXX17 = x1], - [NVCCFLAGS="-std=c++17 $NVCCFLAGS" - AC_SUBST([MAP_KERNEL_STDCXX], [c++17])], - [AS_IF([test x$CUDA_HAVE_CXX14 = x1], - [NVCCFLAGS="-std=c++14 $NVCCFLAGS" - AC_SUBST([MAP_KERNEL_STDCXX], [c++14])], - [NVCCFLAGS="-std=c++11 $NVCCFLAGS"])])])]) -AS_IF([test x$HAVE_CXX14 = x1], - [AC_SUBST([STDCXX_IS_SET], [1]) - CXXFLAGS="-std=c++14 $CXXFLAGS" - AS_IF([test x$CUDA_HAVE_CXX20 = x1], - [NVCCFLAGS="-std=c++14 $NVCCFLAGS" - AC_SUBST([MAP_KERNEL_STDCXX], [c++14])], - [AS_IF([test x$CUDA_HAVE_CXX17 = x1], - [NVCCFLAGS="-std=c++14 $NVCCFLAGS" - AC_SUBST([MAP_KERNEL_STDCXX], [c++14])], - [AS_IF([test x$CUDA_HAVE_CXX14 = x1], - [NVCCFLAGS="-std=c++14 $NVCCFLAGS" - AC_SUBST([MAP_KERNEL_STDCXX], [c++14])], - [NVCCFLAGS="-std=c++11 $NVCCFLAGS"])])])]) -AS_IF([test x$STDCXX_IS_SET != x1], - [AC_SUBST([STDCXX_IS_SET], [1]) - CXXFLAGS="-std=c++11 $CXXFLAGS" - NVCCFLAGS="-std=c++11 -Xcompiler \"-DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT\" $NVCCFLAGS"]) +AC_SUBST([MAP_KERNEL_STDCXX], [c++17]) +AS_IF([test "x$HAVE_CXX17" = "x1"], [ + CXXFLAGS="-std=c++17 $CXXFLAGS" +], [ + AC_MSG_ERROR("requires a c++17 compiler") +]) # # Linking flags # CXXFLAGS="$CXXFLAGS $lt_prog_compiler_pic_CXX" -NVCCFLAGS="$NVCCFLAGS -Xcompiler \"$lt_prog_compiler_pic_CXX\"" +AS_IF([test "x$GPU_PLATFORM" = "xnvidia"], [ + HIPCCFLAGS="$HIPCCFLAGS -Xcompiler \"$lt_prog_compiler_pic_CXX\"" +]) +AS_IF([test "x$GPU_PLATFORM" = "xamd"], [ + HIPCCFLAGS="$HIPCCFLAGS $lt_prog_compiler_pic_CXX" +]) AC_CONFIG_FILES([config.mk Makefile src/Makefile python/Makefile share/bifrost.pc src/bifrost/config.h]) diff --git a/src/ArrayIndexer.cuh b/src/ArrayIndexer.cuh index 2831a0fb9..8b6651bb7 100644 --- a/src/ArrayIndexer.cuh +++ b/src/ArrayIndexer.cuh @@ -31,7 +31,10 @@ #include "IndexArray.cuh" // TODO: It's annoying that we have to do this; any better way? -#ifndef __CUDACC__ +// HIP conversion: Normally we would just check for __HIPCC__, but we want to avoid +// including hip_runtime_api.h (which causes a chain of includes we'd have to handle), +// so we check for both, either of which would be defined by the respective compiler. +#if !(defined(__HIPCC__) || defined(__CUDACC__)) using std::min; using std::max; #endif @@ -63,9 +66,10 @@ protected: I _default_offset; template + __host__ __device__ inline T& at(IndexArray const& inds) const { I offset = 0; -#ifdef __CUDA_ARCH__ +#ifdef __HIP_DEVICE_COMPILE__ #pragma unroll #endif for( int d=0; d::value; ++d ) { @@ -116,10 +120,10 @@ public: (T&)*this = val; return *this; } - inline T* operator->() { return &(T&)*this; } - inline T const* operator->() const { return &(T&)*this; } - inline T& operator*() { return (T&)*this; } - inline T const& operator*() const { return (T&)*this; } + __device__ __host__ inline T* operator->() { return &(T&)*this; } + __device__ __host__ inline T const* operator->() const { return &(T&)*this; } + __device__ __host__ inline T& operator*() { return (T&)*this; } + __device__ __host__ inline T const& operator*() const { return (T&)*this; } }; template @@ -171,6 +175,7 @@ public: } */ template + __host__ __device__ typename ArrayIndexer_detail::enable_if< (sizeof...(IndsEnd) > 0), reference_type>::type @@ -252,7 +257,7 @@ public: reference_type at(IndexArray inds) const { int offset = 0; -#ifdef __CUDA_ARCH__ +#ifdef __HIP_DEVICE_COMPILE__ #pragma unroll #endif for( int d=0; d::value; ++d ) { @@ -304,7 +309,7 @@ public: __host__ __device__ inline IndexArray shape() const { IndexArray shp; -#ifdef __CUDA_ARCH__ +#ifdef __HIP_DEVICE_COMPILE__ #pragma unroll #endif for( int d=0; d +#include #endif -#ifndef __CUDACC_RTC__ +#ifndef __HIPRTC__ #include using std::atan2; -#endif // __CUDACC_RTC__ +#endif // __HIPRTC__ template struct Complex; @@ -127,7 +127,7 @@ template<> struct is_storage_type { enum { value = true }; }; //template<> struct is_storage_type { enum { value = true }; }; #endif -#ifdef __CUDACC_VER_MAJOR__ +#ifdef __HIPCC__ template struct cuda_vector2_type {}; template<> struct cuda_vector2_type { typedef float2 type; }; template<> struct cuda_vector2_type { typedef double2 type; }; @@ -187,7 +187,7 @@ Complex= 9 //inline __device__ Complex(Complex c) : x(__half2float(c.x)), y(__half2float(c.y)) {} #endif -#ifdef __CUDACC_VER_MAJOR__ +#ifdef __HIPCC__ // Note: Use float2 to ensure vectorized load/store inline __host__ __device__ Complex(typename Complex_detail::cuda_vector2_type::type c) : x(c.x), y(c.y) {} inline __host__ __device__ operator typename Complex_detail::cuda_vector2_type::type() const { return make_float2(x,y); } @@ -286,7 +286,7 @@ DEFINE_BINARY_OPERATOR(/) namespace detail { template -#if BF_CUDA_ENABLED +#ifdef __HIPCC__ __host__ __device__ #endif inline T type_pun(U x) { @@ -303,7 +303,7 @@ inline T type_pun(U x) { } -#ifdef __CUDA_ARCH__ +#ifdef __HIPCC__ #if defined(__CUDACC_VER_MAJOR__) && __CUDACC_VER_MAJOR__ >= 9 __device__ inline Complex __shfl_sync(unsigned mask, Complex const& c, @@ -314,14 +314,14 @@ inline Complex __shfl_sync(unsigned mask, Complex const& c, } #else __device__ -inline Complex __shfl(Complex const& c, +inline Complex __shfl(Complex const c, int index, int width=warpSize) { typedef unsigned long long shfl_type; return detail::type_pun >( __shfl(detail::type_pun(c), index, width)); } #endif -#endif // __CUDA_ARCH__ +#endif // __HIPCC__ __host__ __device__ inline Complex rintf(Complex const& c) { diff --git a/src/IndexArray.cuh b/src/IndexArray.cuh index 35caf3ab3..8b225277a 100644 --- a/src/IndexArray.cuh +++ b/src/IndexArray.cuh @@ -42,7 +42,7 @@ struct StaticIndexArray { typedef I type; static constexpr int size = sizeof...(VALS); //const I values[sizeof...(VALS...)] = {VALS...}; - static const I values[sizeof...(VALS)]; + static constexpr I values[sizeof...(VALS)] = {VALS...}; //inline static const I at(int i) { return values[i]; } /* private: @@ -53,8 +53,6 @@ public: }; //template //static constexpr I StaticIndexArray::values[] = {Vals...}; -template -const I StaticIndexArray::values[sizeof...(VALS)] = {VALS...}; // TODO: Can only align this when N is a power of 2 template @@ -93,6 +91,7 @@ public: reference operator[](int i) { return vals_[i]; } template + __host__ __device__ IndexArray join(IndexArray const& other) { T vals[N+M]; for( int i=0; i #include "Complex.hpp" @@ -69,7 +70,7 @@ struct __attribute__((aligned(sizeof(R)*4))) JonesVec_ : public JonesVec typedef Complex complex_type; inline __host__ __device__ JonesVec_() : JonesVecBase() {} inline __host__ __device__ JonesVec_(complex_type x_, complex_type y_) : JonesVecBase(x_, y_) {} -#ifdef __CUDACC__ +#ifdef __HIPCC__ // Note: Use float4 to ensure vectorized load/store inline __host__ __device__ JonesVec_(float4 v) : JonesVecBase(complex_type(v.x,v.y), complex_type(v.z,v.w)) {} inline __host__ __device__ operator float4() const { return make_float4(this->x.x,this->x.y,this->y.x,this->y.y); } @@ -96,7 +97,7 @@ struct __attribute__((aligned(sizeof(R)*4))) JonesVec_ : public JonesVe typedef Complex complex_type; inline __host__ __device__ JonesVec_() : JonesVecBase() {} inline __host__ __device__ JonesVec_(complex_type x_, complex_type y_) : JonesVecBase(x_, y_) {} -#ifdef __CUDACC__ +#ifdef __HIPCC__ // Note: Use float4 to ensure vectorized load/store inline __host__ __device__ JonesVec_(float4 v) : JonesVecBase(complex_type(v.x,v.y), complex_type(v.z,v.w)) {} inline __host__ __device__ operator float4() const { return make_float4(this->x.x,this->x.y,this->y.x,this->y.y); } @@ -122,7 +123,7 @@ struct __attribute__((packed,aligned(2))) JonesVec_ : public Jones typedef signed char real_type; typedef FourBit complex_type; inline __host__ __device__ JonesVec_() : JonesVecBase() {} -#ifdef __CUDACC__ +#ifdef __HIPCC__ // Note: Use float4 to ensure vectorized load/store // Note: This assumes that the real component is stored in the high 4 bits (big endian) inline __host__ __device__ operator float4() const { return make_float4(this->x.real_imag>>4,(this->x.real_imag<<4)>>4, @@ -134,7 +135,7 @@ struct __attribute__((packed,aligned(2))) JonesVec_ : public Jone typedef signed char real_type; typedef FourBit complex_type; inline __host__ __device__ JonesVec_() : JonesVecBase() {} -#ifdef __CUDACC__ +#ifdef __HIPCC__ // Note: Use float4 to ensure vectorized load/store // Note: This assumes that the real component is stored in the high 4 bits (big endian) inline __host__ __device__ operator float4() const { return make_float4(this->x.real_imag>>4,(this->x.real_imag<<4)>>4, diff --git a/src/Makefile.in b/src/Makefile.in index df7edc97d..1a4011697 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -4,11 +4,11 @@ include ../config.mk CXX ?= @CXX@ -NVCC ?= @NVCC@ +HIPCC ?= @HIPCC@ LINKER ?= @CXX@ CPPFLAGS ?= @CPPFLAGS@ CXXFLAGS ?= @CXXFLAGS@ -NVCCFLAGS ?= @NVCCFLAGS@ +HIPCCFLAGS ?= @HIPCCFLAGS@ LDFLAGS ?= @LDFLAGS@ @LIBS@ DOXYGEN ?= @DX_DOXYGEN@ PYBUILDFLAGS ?= @PYBUILDFLAGS@ @@ -16,7 +16,8 @@ PYINSTALLFLAGS ?= @PYINSTALLFLAGS@ HAVE_RECVMSG ?= @HAVE_RECVMSG@ -HAVE_CUDA ?= @HAVE_CUDA@ +ENABLE_GPU ?= @ENABLE_GPU@ +GPU_PLATFORM ?= @GPU_PLATFORM@ GPU_ARCHS ?= @GPU_ARCHS@ @@ -47,7 +48,7 @@ ifeq ($(HAVE_RECVMSG),1) udp_capture.o \ udp_transmit.o endif -ifeq ($(HAVE_CUDA),1) +ifeq ($(ENABLE_GPU),1) # These files require the CUDA Toolkit to compile LIBBIFROST_OBJS += \ transpose.o \ @@ -55,7 +56,6 @@ ifeq ($(HAVE_CUDA),1) fft_kernels.o \ fdmt.o \ map.o \ - trace.o \ linalg.o \ linalg_kernels.o \ romein.o \ @@ -66,6 +66,10 @@ ifeq ($(HAVE_CUDA),1) gunpack.o endif +ifeq ($(ENABLE_GPU)$(HAVE_TRACE),11) +LIBBIFROST_OBJS += trace.o +endif + JIT_SOURCES ?= \ Complex.hpp.jit \ Vector.hpp.jit \ @@ -76,9 +80,9 @@ JIT_SOURCES ?= \ MAKEFILES = ../config.mk Makefile -ifeq ($(HAVE_CUDA),1) +ifeq ($(GPU_PLATFORM),nvidia) # All CUDA archs supported by this version of nvcc -GPU_ARCHS_SUPPORTED := $(shell $(NVCC) -h | grep -Po "compute_[0-9]{2}" | cut -d_ -f2 | sort | uniq) +GPU_ARCHS_SUPPORTED := $(shell $(HIPCC) -h | grep -Po "compute_[0-9]{2}" | cut -d_ -f2 | sort | uniq) # Intersection of user-specified archs and supported archs GPU_ARCHS_VALID := $(shell echo $(GPU_ARCHS) $(GPU_ARCHS_SUPPORTED) | xargs -n1 | sort | uniq -d | xargs) # Latest valid arch @@ -90,7 +94,7 @@ NVCC_GENCODE ?= $(foreach arch, $(GPU_ARCHS_VALID), \ -gencode arch=compute_$(GPU_ARCH_LATEST),\"code=compute_$(GPU_ARCH_LATEST)\" endif -NVCCFLAGS += $(NVCC_GENCODE) +HIPCCFLAGS += $(NVCC_GENCODE) #NVCCFLAGS += -Xcudafe "--diag_suppress=unrecognized_gcc_pragma" #NVCCFLAGS += --expt-relaxed-constexpr @@ -116,7 +120,7 @@ $(LIBBIFROST_VERSION_FILE): $(INC_DIR)/bifrost/*.h echo " *;" >> $@ echo "};" >> $@ -ifeq ($(HAVE_CUDA),1) +ifeq ($(GPU_PLATFORM),nvidia) # TODO: Need to deal with 32/64 detection here LIBCUFFT_STATIC = $(CUDA_LIBDIR64)/libcufft_static.a # All PTX archs included in the lib (typically only one) @@ -133,12 +137,12 @@ libcufft_static_pruned.a: $(LIBCUFFT_STATIC) Makefile @NVPRUNE@ -o $@ $(NVCC_GENCODE) $(CUFFT_STATIC_GENCODE) $< fft_kernels.o: fft_kernels.cu fft_kernels.h Makefile # Note: This needs to be compiled with "-dc" to make CUFFT callbacks work - $(NVCC) $(NVCCFLAGS) $(CPPFLAGS) -Xcompiler "$(GCCFLAGS)" -dc $(OUTPUT_OPTION) $< + $(HIPCC) $(HIPCCFLAGS) $(CPPFLAGS) -Xcompiler "$(GCCFLAGS)" -dc $(OUTPUT_OPTION) $< _cuda_device_link.o: Makefile fft_kernels.o libcufft_static_pruned.a @echo "Linking _cuda_device_link.o" # TODO: "nvcc -dlink ..." does not error or warn when a -lblah is not found @ls ./libcufft_static_pruned.a > /dev/null - $(NVCC) -dlink -o $@ $(NVCCFLAGS) fft_kernels.o -L. -lcufft_static_pruned + $(HIPCC) -dlink -o $@ $(HIPCCFLAGS) fft_kernels.o -L. -lcufft_static_pruned CUDA_DEVICE_LINK_OBJ = _cuda_device_link.o else CUDA_DEVICE_LINK_OBJ = @@ -158,6 +162,9 @@ $(LIBBIFROST_SO): $(LIBBIFROST_OBJS) $(LIBBIFROST_VERSION_FILE) $(CUDA_DEVICE_LI ln -s -f $(LIBBIFROST_SO_NAME) $(LIBBIFROST_SO_STEM) @echo "Successfully built $(LIBBIFROST_SO_NAME)" +%.o: %.cu $(MAKEFILES) + $(HIPCC) $(HIPCCFLAGS) -c -I. $< -o $@ + *.o: $(MAKEFILES) map.o: $(JIT_SOURCES) diff --git a/src/ShapeIndexer.cuh b/src/ShapeIndexer.cuh index 65e7a59f6..7df469dbc 100644 --- a/src/ShapeIndexer.cuh +++ b/src/ShapeIndexer.cuh @@ -139,7 +139,7 @@ public: __host__ __device__ inline static IndexArray lift(I index) { IndexArray inds; -#ifdef __CUDA_ARCH__ +#ifdef __HIP_DEVICE_COMPILE__ #pragma unroll #endif for( int d=0; d inds; -#ifdef __CUDA_ARCH__ +#ifdef __HIP_DEVICE_COMPILE__ #pragma unroll #endif for( int d=0; d + __host__ __device__ Vector(U... u) : _v{u...} {} __host__ __device__ inline constexpr T const& operator[](int i) const { diff --git a/src/bifrost/Common.hpp b/src/bifrost/Common.hpp index eda52d60a..89a1ce887 100644 --- a/src/bifrost/Common.hpp +++ b/src/bifrost/Common.hpp @@ -28,6 +28,7 @@ #pragma once +#include #include #include diff --git a/src/bifrost/cuda.h b/src/bifrost/bfcuda.h similarity index 100% rename from src/bifrost/cuda.h rename to src/bifrost/bfcuda.h diff --git a/src/bifrost/config.h.in b/src/bifrost/config.h.in index 5e58f1c95..0169fc939 100644 --- a/src/bifrost/config.h.in +++ b/src/bifrost/config.h.in @@ -42,13 +42,13 @@ extern "C" { #define BF_ALIGNMENT @ALIGNMENT@ // CUDA support -#define BF_CUDA_ENABLED @HAVE_CUDA@ +#define BF_CUDA_ENABLED @ENABLE_GPU@ #define BF_CUDA_VERSION @CUDA_VERSION@ #define BF_GPU_ARCHS "@GPU_ARCHS@" #define BF_GPU_MIN_ARCH @GPU_MIN_ARCH@ #define BF_GPU_MAX_ARCH @GPU_MAX_ARCH@ #define BF_GPU_SHAREDMEM @GPU_SHAREDMEM@ -#define BF_GPU_MANAGEDMEM @GPU_PASCAL_MANAGEDMEM@ +#define BF_GPU_MANAGEDMEM @GPU_MANAGEDMEM@ #define BF_GPU_EXP_PINNED_ALLOC @GPU_EXP_PINNED_ALLOC@ #define BF_MAP_KERNEL_STDCXX "@MAP_KERNEL_STDCXX@" #define BF_MAP_KERNEL_DISK_CACHE @HAVE_MAP_CACHE@ diff --git a/src/cuda.cpp b/src/cuda.cpp index 0bc8a9464..bafb68284 100644 --- a/src/cuda.cpp +++ b/src/cuda.cpp @@ -26,18 +26,20 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include + +#include +#include #include "cuda.hpp" #include "assert.hpp" #if BF_CUDA_ENABLED -thread_local cudaStream_t g_cuda_stream = cudaStreamPerThread; +thread_local hipStream_t g_cuda_stream = hipStreamPerThread; #endif BFstatus bfStreamGet(void* stream) { BF_ASSERT(stream, BF_STATUS_INVALID_POINTER); #if BF_CUDA_ENABLED - *(cudaStream_t*)stream = g_cuda_stream; + *(hipStream_t*)stream = g_cuda_stream; #else BF_FAIL("Built without CUDA support (bfStreamGet)", BF_STATUS_INVALID_STATE); #endif @@ -46,14 +48,14 @@ BFstatus bfStreamGet(void* stream) { BFstatus bfStreamSet(void const* stream) { BF_ASSERT(stream, BF_STATUS_INVALID_POINTER); #if BF_CUDA_ENABLED - g_cuda_stream = *(cudaStream_t*)stream; + g_cuda_stream = *(hipStream_t*)stream; #endif return BF_STATUS_SUCCESS; } BFstatus bfDeviceGet(int* device) { BF_ASSERT(device, BF_STATUS_INVALID_POINTER); #if BF_CUDA_ENABLED - BF_CHECK_CUDA(cudaGetDevice(device), BF_STATUS_DEVICE_ERROR); + BF_CHECK_HIP(hipGetDevice(device), BF_STATUS_DEVICE_ERROR); #else *device = -1; #endif @@ -61,14 +63,14 @@ BFstatus bfDeviceGet(int* device) { } BFstatus bfDeviceSet(int device) { #if BF_CUDA_ENABLED - BF_CHECK_CUDA(cudaSetDevice(device), BF_STATUS_DEVICE_ERROR); + BF_CHECK_HIP(hipSetDevice(device), BF_STATUS_DEVICE_ERROR); #endif return BF_STATUS_SUCCESS; } BFstatus bfDeviceSetById(const char* pci_bus_id) { #if BF_CUDA_ENABLED int device; - BF_CHECK_CUDA(cudaDeviceGetByPCIBusId(&device, pci_bus_id), + BF_CHECK_HIP(hipDeviceGetByPCIBusId(&device, pci_bus_id), BF_STATUS_DEVICE_ERROR); return bfDeviceSet(device); #else @@ -77,7 +79,7 @@ BFstatus bfDeviceSetById(const char* pci_bus_id) { } BFstatus bfStreamSynchronize() { #if BF_CUDA_ENABLED - BF_CHECK_CUDA(cudaStreamSynchronize(g_cuda_stream), + BF_CHECK_HIP(hipStreamSynchronize(g_cuda_stream), BF_STATUS_DEVICE_ERROR); #endif return BF_STATUS_SUCCESS; @@ -85,15 +87,15 @@ BFstatus bfStreamSynchronize() { BFstatus bfDevicesSetNoSpinCPU() { #if BF_CUDA_ENABLED int old_device; - BF_CHECK_CUDA(cudaGetDevice(&old_device), BF_STATUS_DEVICE_ERROR); + BF_CHECK_HIP(hipGetDevice(&old_device), BF_STATUS_DEVICE_ERROR); int ndevices; - BF_CHECK_CUDA(cudaGetDeviceCount(&ndevices), BF_STATUS_DEVICE_ERROR); + BF_CHECK_HIP(hipGetDeviceCount(&ndevices), BF_STATUS_DEVICE_ERROR); for( int d=0; d -#include +#include #include -extern thread_local cudaStream_t g_cuda_stream; +extern thread_local hipStream_t g_cuda_stream; // TODO: BFstatus bfSetStream(void const* stream) { cuda_stream = *(cudaStream_t*)stream; } #if THRUST_VERSION >= 100800 // WAR for old Thrust version (e.g., on TK1) @@ -58,11 +57,11 @@ extern thread_local cudaStream_t g_cuda_stream; inline int get_cuda_device_cc() { int device, cc; - cudaGetDevice(&device); + hipGetDevice(&device); int cc_major; - cudaDeviceGetAttribute(&cc_major, cudaDevAttrComputeCapabilityMajor, device); + hipDeviceGetAttribute(&cc_major, hipDeviceAttributeComputeCapabilityMajor, device); int cc_minor; - cudaDeviceGetAttribute(&cc_minor, cudaDevAttrComputeCapabilityMinor, device); + hipDeviceGetAttribute(&cc_minor, hipDeviceAttributeComputeCapabilityMinor, device); cc = cc_major*10 + cc_minor; if( cc > BF_GPU_MAX_ARCH ) { cc = BF_GPU_MAX_ARCH; @@ -89,29 +88,48 @@ inline int get_cuda_device_cc() { BF_ASSERT(cuda_ret == cudaSuccess, err); \ } while(0) +#define BF_CHECK_HIP_EXCEPTION(call, err) \ + do { \ + hipError_t hip_ret = call; \ + if( hip_ret != hipSuccess ) { \ + BF_DEBUG_PRINT(hipGetErrorString(hip_ret)); \ + } \ + /*BF_ASSERT(hip_ret == hipSuccess, err);*/ \ + BF_ASSERT_EXCEPTION(hip_ret == hipSuccess, err); \ + } while(0) + +#define BF_CHECK_HIP(call, err) \ + do { \ + hipError_t hip_ret = call; \ + if( hip_ret != hipSuccess ) { \ + BF_DEBUG_PRINT(hipGetErrorString(hip_ret)); \ + } \ + BF_ASSERT(hip_ret == hipSuccess, err); \ + } while(0) + + class CUDAKernel { - CUmodule _module; - CUfunction _kernel; + hipModule_t _module; + hipFunction_t _kernel; std::string _func_name; std::string _ptx; - std::vector _opts; + std::vector _opts; - inline void cuda_safe_call(CUresult res) { - if( res != CUDA_SUCCESS ) { + inline void cuda_safe_call(hipError_t res) { + if( res != hipSuccess ) { const char* msg; - cuGetErrorName(res, &msg); + hipDrvGetErrorName(res, &msg); throw std::runtime_error(msg); } } inline void create_module(void** optvals=0) { - cuda_safe_call(cuModuleLoadDataEx(&_module, _ptx.c_str(), - _opts.size(), &_opts[0], optvals)); - cuda_safe_call(cuModuleGetFunction(&_kernel, _module, + cuda_safe_call(hipModuleLoadData(&_module, _ptx.c_str())); + cuda_safe_call(hipModuleGetFunction(&_kernel, _module, _func_name.c_str())); } inline void destroy_module() { if( _module ) { - cuModuleUnload(_module); + hipModuleUnload(_module); } } public: @@ -124,20 +142,20 @@ class CUDAKernel { this->create_module(); } } - inline CUDAKernel(const char* func_name, - const char* ptx, + inline CUDAKernel(const std::string func_name, + const std::string ptx, unsigned int nopts=0, - CUjit_option* opts=0, + hipJitOption* opts=0, void** optvals=0) { _func_name = func_name; _ptx = ptx; _opts.assign(opts, opts + nopts); this->create_module(optvals); } - inline CUDAKernel& set(const char* func_name, - const char* ptx, + inline CUDAKernel& set(const std::string func_name, + const std::string ptx, unsigned int nopts=0, - CUjit_option* opts=0, + hipJitOption* opts=0, void** optvals=0) { this->destroy_module(); _func_name = func_name; @@ -161,23 +179,23 @@ class CUDAKernel { inline ~CUDAKernel() { this->destroy_module(); } - inline operator CUfunction() const { return _kernel; } + inline operator hipFunction_t() const { return _kernel; } - inline CUresult launch(dim3 grid, dim3 block, - unsigned int smem, CUstream stream, + inline hipError_t launch(dim3 grid, dim3 block, + unsigned int smem, hipStream_t stream, std::vector arg_ptrs) { //void* arg_ptrs[]) { // Note: This returns "INVALID_ARGUMENT" if 'args' do not match what is // expected (e.g., too few args, wrong types) - return cuLaunchKernel(_kernel, + return hipModuleLaunchKernel(_kernel, grid.x, grid.y, grid.z, block.x, block.y, block.z, smem, stream, &arg_ptrs[0], NULL); } template - inline CUresult launch(dim3 grid, dim3 block, - unsigned int smem, CUstream stream, + inline hipError_t launch(dim3 grid, dim3 block, + unsigned int smem, hipStream_t stream, Args... args) { return this->launch(grid, block, smem, stream, {(void*)&args...}); } diff --git a/src/cuda/stream.hpp b/src/cuda/stream.hpp index 88a41c7a3..225950991 100644 --- a/src/cuda/stream.hpp +++ b/src/cuda/stream.hpp @@ -74,20 +74,19 @@ int main() { */ #pragma once - -#include +#include #include namespace cuda { -inline void check_error(cudaError_t ret) { - if( ret != cudaSuccess ) { - throw ::std::runtime_error(cudaGetErrorString(ret)); +inline void check_error(hipError_t ret) { + if( ret != hipSuccess ) { + throw ::std::runtime_error(hipGetErrorString(ret)); } } class stream { - cudaStream_t _obj; + hipStream_t _obj; // Not copy-assignable #if __cplusplus >= 201103L stream(const cuda::stream& other) = delete; @@ -96,7 +95,7 @@ class stream { stream(const cuda::stream& other); stream& operator=(const cuda::stream& other); #endif - void destroy() { if( _obj ) { cudaStreamDestroy(_obj); _obj = 0; } } + void destroy() { if( _obj ) { hipStreamDestroy(_obj); _obj = 0; } } public: #if __cplusplus >= 201103L // Move semantics @@ -108,35 +107,35 @@ class stream { } #endif inline explicit stream(int priority=0, - unsigned flags=cudaStreamDefault) : _obj(0) { + unsigned flags=hipStreamDefault) : _obj(0) { if( priority > 0 ) { int least_priority; int greatest_priority; - cudaDeviceGetStreamPriorityRange(&least_priority, + hipDeviceGetStreamPriorityRange(&least_priority, &greatest_priority); - check_error( cudaStreamCreateWithPriority(&_obj, + check_error( hipStreamCreateWithPriority(&_obj, flags, greatest_priority) ); } else { - check_error( cudaStreamCreateWithFlags(&_obj, flags) ); + check_error( hipStreamCreateWithFlags(&_obj, flags) ); } } inline ~stream() { this->destroy(); } inline void swap(cuda::stream& other) { std::swap(_obj, other._obj); } inline int priority() const { int val; - check_error( cudaStreamGetPriority(_obj, &val) ); + check_error( hipStreamGetPriority(_obj, &val) ); return val; } inline unsigned flags() const { unsigned val; - check_error( cudaStreamGetFlags(_obj, &val) ); + check_error( hipStreamGetFlags(_obj, &val) ); return val; } inline bool query() const { - cudaError_t ret = cudaStreamQuery(_obj); - if( ret == cudaErrorNotReady ) { + hipError_t ret = hipStreamQuery(_obj); + if( ret == hipErrorNotReady ) { return false; } else { @@ -145,46 +144,46 @@ class stream { } } inline void synchronize() const { - cudaStreamSynchronize(_obj); - check_error( cudaGetLastError() ); + hipStreamSynchronize(_obj); + check_error( hipGetLastError() ); } - inline void wait(cudaEvent_t event, unsigned flags=0) const { - check_error( cudaStreamWaitEvent(_obj, event, flags) ); + inline void wait(hipEvent_t event, unsigned flags=0) const { + check_error( hipStreamWaitEvent(_obj, event, flags) ); } - inline void addCallback(cudaStreamCallback_t callback, + inline void addCallback(hipStreamCallback_t callback, void* userData=0, unsigned flags=0) { - check_error( cudaStreamAddCallback(_obj, callback, userData, flags) ); + check_error( hipStreamAddCallback(_obj, callback, userData, flags) ); } - inline void attachMemAsync(void* devPtr, size_t length, unsigned flags) { - check_error( cudaStreamAttachMemAsync(_obj, devPtr, length, flags) ); + inline void attachMemAsync(hipDeviceptr_t* devPtr, size_t length, unsigned flags) { + check_error( hipStreamAttachMemAsync(_obj, devPtr, length, flags) ); } - inline operator const cudaStream_t&() const { return _obj; } + inline operator const hipStream_t&() const { return _obj; } }; // This version automatically calls synchronize() before destruction class scoped_stream : public cuda::stream { typedef cuda::stream super_type; public: inline explicit scoped_stream(int priority=0, - unsigned flags=cudaStreamNonBlocking) + unsigned flags=hipStreamNonBlocking) : super_type(priority, flags) {} inline ~scoped_stream() { this->synchronize(); } }; // This version automatically syncs with a parent stream on construct/destruct class child_stream : public cuda::stream { typedef cuda::stream super_type; - cudaStream_t _parent; - void sync_streams(cudaStream_t dependent, cudaStream_t dependee) { + hipStream_t _parent; + void sync_streams(hipStream_t dependent, hipStream_t dependee) { // Record event in dependee and make dependent wait for it - cudaEvent_t event; - check_error(cudaEventCreateWithFlags(&event, cudaEventDisableTiming)); - check_error(cudaEventRecord(event, dependee)); - check_error(cudaStreamWaitEvent(dependent, event, 0)); - check_error(cudaEventDestroy(event)); + hipEvent_t event; + check_error(hipEventCreateWithFlags(&event, hipEventDisableTiming)); + check_error(hipEventRecord(event, dependee)); + check_error(hipStreamWaitEvent(dependent, event, 0)); + check_error(hipEventDestroy(event)); } public: - inline explicit child_stream(cudaStream_t parent, + inline explicit child_stream(hipStream_t parent, int priority=0, - unsigned flags=cudaStreamNonBlocking) + unsigned flags=hipStreamNonBlocking) : super_type(priority, flags), _parent(parent) { sync_streams(*this, _parent); } diff --git a/src/fdmt.cu b/src/fdmt.cu index 831015001..422ca18a8 100644 --- a/src/fdmt.cu +++ b/src/fdmt.cu @@ -26,6 +26,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include #include #include "assert.hpp" #include "utils.hpp" @@ -35,7 +37,7 @@ //#include -#include // For CUDART_NAN_F +#include // For HIP_NAN_F #include #include @@ -74,7 +76,7 @@ void fdmt_init_kernel(int ntime, OutType tmp(0); for( int d=0; d::quiet_NaN()); + OutType outval(HIP_NAN_F);//std::numeric_limits::quiet_NaN()); if( t >= d ) { int c_ = reverse_band ? nchan-1 - c : c; int t_ = reverse_time ? ntime-1 - t : t; @@ -119,17 +121,17 @@ void fdmt_exec_kernel(int ntime, // Avoid elements that go unused due to diagonal reindexing if( is_final_step && t < r ) { //int ostride_ = ostride - reverse_time; - //d_out[t + ostride_*r] = CUDART_NAN_F; + //d_out[t + ostride_*r] = HIP_NAN_F; continue; } // HACK TESTING ////if( ostride < ntime && t >= ntime-1 - r ) { //if( ostride != ntime && t < r ) { // int ostride_ = ostride - (ostride > ntime); - // d_out[t + ostride_*r] = CUDART_NAN_F; + // d_out[t + ostride_*r] = HIP_NAN_F; // continue; //}// else if( ostride > ntime && t >= ntime - r ) { - // //d_out[t - (ntime-1) + ostride*r] = CUDART_NAN_F; + // //d_out[t - (ntime-1) + ostride*r] = HIP_NAN_F; // continue; //} @@ -169,7 +171,7 @@ void launch_fdmt_init_kernel(int ntime, OutType* d_out, int ostride, int obatchstride, - cudaStream_t stream=0) { + hipStream_t stream=0) { dim3 block(256, 1); // TODO: Tune this dim3 grid(std::min((ntime-1)/block.x+1, 65535u), std::min((nchan-1)/block.y+1, 65535u)); @@ -185,8 +187,8 @@ void launch_fdmt_init_kernel(int ntime, &d_out, &ostride, &obatchstride}; - BF_CHECK_CUDA_EXCEPTION( - cudaLaunchKernel((void*)fdmt_init_kernel, + BF_CHECK_HIP_EXCEPTION( + hipLaunchKernel((void*)fdmt_init_kernel, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); @@ -207,7 +209,7 @@ void launch_fdmt_exec_kernel(int ntime, DType* d_out, int ostride, int obatchstride, - cudaStream_t stream=0) { + hipStream_t stream=0) { //cout << "LAUNCH " << d_in << ", " << d_out << endl; dim3 block(256, 1); // TODO: Tune this dim3 grid(std::min((ntime-1)/block.x+1, 65535u), @@ -225,8 +227,8 @@ void launch_fdmt_exec_kernel(int ntime, &d_out, &ostride, &obatchstride}; - BF_CHECK_CUDA_EXCEPTION( - cudaLaunchKernel((void*)fdmt_exec_kernel, + BF_CHECK_HIP_EXCEPTION( + hipLaunchKernel((void*)fdmt_exec_kernel, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); @@ -292,7 +294,7 @@ private: // TODO: Use something other than Thrust thrust::device_vector _dv_plan_storage; thrust::device_vector _dv_exec_storage; - cudaStream_t _stream; + hipStream_t _stream; bool _reverse_band; FType cfreq(IType chan) { @@ -563,27 +565,27 @@ public: //std::cout << "storage_ptr = " << storage_ptr << std::endl; workspace.commit(storage_ptr); //std::cout << "_d_offsets = " << _d_offsets << std::endl; - BF_CHECK_CUDA_EXCEPTION( cudaMemcpyAsync(_d_offsets, + BF_CHECK_HIP_EXCEPTION( hipMemcpyAsync(_d_offsets, &_offsets[0], sizeof(int )*_offsets.size(), - cudaMemcpyHostToDevice, + hipMemcpyHostToDevice, _stream), BF_STATUS_MEM_OP_FAILED ); for( int step=0; stepstrides[in->ndim-1] < 0); bool reverse_time = negative_delays; - BF_CHECK_CUDA_EXCEPTION(cudaGetLastError(), BF_STATUS_INTERNAL_ERROR); + BF_CHECK_HIP_EXCEPTION(hipGetLastError(), BF_STATUS_INTERNAL_ERROR); #define LAUNCH_FDMT_INIT_KERNEL(IterType) \ launch_fdmt_init_kernel(ntime, _nchan, nbatch, \ _reverse_band, reverse_time, \ @@ -689,7 +691,7 @@ public: default: BF_ASSERT_EXCEPTION(false, BF_STATUS_UNSUPPORTED_DTYPE); } #undef LAUNCH_FDMT_INIT_KERNEL - BF_CHECK_CUDA_EXCEPTION(cudaGetLastError(), BF_STATUS_INTERNAL_ERROR); + BF_CHECK_HIP_EXCEPTION(hipGetLastError(), BF_STATUS_INTERNAL_ERROR); std::swap(d_ibuf, d_obuf); size_t ostride_cur = _buffer_stride; @@ -714,9 +716,9 @@ public: _stream); std::swap(d_ibuf, d_obuf); } - BF_CHECK_CUDA_EXCEPTION(cudaGetLastError(), BF_STATUS_INTERNAL_ERROR); + BF_CHECK_HIP_EXCEPTION(hipGetLastError(), BF_STATUS_INTERNAL_ERROR); } - void set_stream(cudaStream_t stream) { + void set_stream(hipStream_t stream) { _stream = stream; } }; @@ -754,7 +756,7 @@ BFstatus bfFdmtSetStream(BFfdmt plan, BF_TRACE(); BF_ASSERT(plan, BF_STATUS_INVALID_HANDLE); BF_ASSERT(stream, BF_STATUS_INVALID_POINTER); - BF_TRY_RETURN(plan->set_stream(*(cudaStream_t*)stream)); + BF_TRY_RETURN(plan->set_stream(*(hipStream_t*)stream)); } BFstatus bfFdmtExecute(BFfdmt plan, BFarray const* in, diff --git a/src/fft.cu b/src/fft.cu index b10f229de..0b6860cf8 100644 --- a/src/fft.cu +++ b/src/fft.cu @@ -43,19 +43,20 @@ #include "fft_kernels.h" #include "ShapeIndexer.cuh" #include "ArrayIndexer.cuh" +#include #include #include #if defined(BF_GPU_EXP_PINNED_ALLOC) && BF_GPU_EXP_PINNED_ALLOC #include #else -#include +#include #endif -#include -#include +#include +#include class BFfft_impl { - cufftHandle _handle; + hipfftHandle _handle; bool _real_in; bool _real_out; int _nbit; @@ -74,6 +75,7 @@ class BFfft_impl { using pinned_allocator_type = thrust::mr::stateless_resource_allocator; #endif thrust::host_vector _hv_callback_data; + BFstatus execute_impl(BFarray const* in, BFarray const* out, @@ -100,10 +102,10 @@ public: }; BFfft_impl::BFfft_impl() { - BF_CHECK_CUFFT_EXCEPTION( cufftCreate(&_handle) ); + BF_CHECK_HIPFFT_EXCEPTION( hipfftCreate(&_handle) ); } BFfft_impl::~BFfft_impl() { - cufftDestroy(_handle); + hipfftDestroy(_handle); } BFstatus BFfft_impl::init(BFarray const* in, @@ -211,17 +213,17 @@ BFstatus BFfft_impl::init(BFarray const* in, _nbit = fp64 ? 64 : 32; _itype = in->dtype; _otype = out->dtype; - cufftType type; - if( !_real_in && !_real_out ) { type = fp64 ? CUFFT_Z2Z : CUFFT_C2C; } - else if( _real_in && !_real_out ) { type = fp64 ? CUFFT_D2Z : CUFFT_R2C; } - else if( !_real_in && _real_out ) { type = fp64 ? CUFFT_Z2D : CUFFT_C2R; } + hipfftType type; + if( !_real_in && !_real_out ) { type = fp64 ? HIPFFT_Z2Z : HIPFFT_C2C; } + else if( _real_in && !_real_out ) { type = fp64 ? HIPFFT_D2Z : HIPFFT_R2C; } + else if( !_real_in && _real_out ) { type = fp64 ? HIPFFT_Z2D : HIPFFT_C2R; } else { BF_FAIL("Complex input and/or output", BF_STATUS_INVALID_DTYPE); } - BF_CHECK_CUFFT( cufftSetAutoAllocation(_handle, false) ); + BF_CHECK_HIPFFT( hipfftSetAutoAllocation(_handle, false) ); #if CUDA_VERSION >= 7500 - BF_CHECK_CUFFT( cufftMakePlanMany64(_handle, + BF_CHECK_HIPFFT( hipfftMakePlanMany64(_handle, rank, shape, inembed, istride, idist, onembed, ostride, odist, @@ -229,7 +231,7 @@ BFstatus BFfft_impl::init(BFarray const* in, batch, &_workspace_size) ); #else - BF_CHECK_CUFFT( cufftMakePlanMany (_handle, + BF_CHECK_HIPFFT( hipfftMakePlanMany (_handle, rank, shape, inembed, istride, idist, onembed, ostride, odist, @@ -266,7 +268,7 @@ BFstatus BFfft_impl::execute_impl(BFarray const* in, BF_ASSERT(tmp_storage_size >= _workspace_size, BF_STATUS_INSUFFICIENT_STORAGE); } - BF_CHECK_CUFFT( cufftSetWorkArea(_handle, tmp_storage) ); + BF_CHECK_HIPFFT( hipfftSetWorkArea(_handle, tmp_storage) ); void* idata = in->data; void* odata = out->data; @@ -274,18 +276,18 @@ BFstatus BFfft_impl::execute_impl(BFarray const* in, // h_callback_data has finished before we overwrite it. // We could potentially use a CUDA event as a lighter-weight // solution. - cudaStreamSynchronize(g_cuda_stream); + hipStreamSynchronize(g_cuda_stream); CallbackData* h_callback_data = &_hv_callback_data[0]; // WAR for CUFFT insisting that pointer be aligned to sizeof(cufftComplex) int alignment = (_nbit == 32 ? - sizeof(cufftComplex) : - sizeof(cufftDoubleComplex)); + sizeof(hipfftComplex) : + sizeof(hipfftDoubleComplex)); // TODO: To support f32 input that is not aligned to 8 bytes, we need to // use a load callback. However, we don't know this during init, // so we really need to set the callback here instead. Not sure // how expensive it is to set the callback. if( _using_load_callback ) { - h_callback_data->ptr_offset = (uintptr_t)idata % sizeof(cufftComplex); + h_callback_data->ptr_offset = (uintptr_t)idata % sizeof(hipfftComplex); *(char**)&idata -= h_callback_data->ptr_offset; } @@ -304,34 +306,34 @@ BFstatus BFfft_impl::execute_impl(BFarray const* in, } CallbackData* d_callback_data = thrust::raw_pointer_cast(&_dv_callback_data[0]); - cudaMemcpyAsync(d_callback_data, h_callback_data, sizeof(CallbackData), - cudaMemcpyHostToDevice, g_cuda_stream); + hipMemcpyAsync(d_callback_data, h_callback_data, sizeof(CallbackData), + hipMemcpyHostToDevice, g_cuda_stream); BF_ASSERT((uintptr_t)idata % alignment == 0, BF_STATUS_UNSUPPORTED_STRIDE); BF_ASSERT((uintptr_t)odata % alignment == 0, BF_STATUS_UNSUPPORTED_STRIDE); if( !_real_in && !_real_out ) { - int direction = inverse ? CUFFT_INVERSE : CUFFT_FORWARD; + int direction = inverse ? HIPFFT_BACKWARD : HIPFFT_FORWARD; if( _nbit == 32 ) { - BF_CHECK_CUFFT( cufftExecC2C(_handle, (cufftComplex*)idata, (cufftComplex*)odata, direction) ); + BF_CHECK_HIPFFT( hipfftExecC2C(_handle, (hipfftComplex*)idata, (hipfftComplex*)odata, direction) ); } else if( _nbit == 64 ) { - BF_CHECK_CUFFT( cufftExecZ2Z(_handle, (cufftDoubleComplex*)idata, (cufftDoubleComplex*)odata, direction) ); + BF_CHECK_HIPFFT( hipfftExecZ2Z(_handle, (hipfftDoubleComplex*)idata, (hipfftDoubleComplex*)odata, direction) ); } else { BF_FAIL("Supported data types", BF_STATUS_UNSUPPORTED_DTYPE); } } else if( _real_in && !_real_out ) { if( _nbit == 32 ) { - BF_CHECK_CUFFT( cufftExecR2C(_handle, (cufftReal*)idata, (cufftComplex*)odata) ); + BF_CHECK_HIPFFT( hipfftExecR2C(_handle, (hipfftReal*)idata, (hipfftComplex*)odata) ); } else if( _nbit == 64 ) { - BF_CHECK_CUFFT( cufftExecD2Z(_handle, (cufftDoubleReal*)idata, (cufftDoubleComplex*)odata) ); + BF_CHECK_HIPFFT( hipfftExecD2Z(_handle, (hipfftDoubleReal*)idata, (hipfftDoubleComplex*)odata) ); } else { BF_FAIL("Supported data types", BF_STATUS_UNSUPPORTED_DTYPE); } } else if( !_real_in && _real_out ) { if( _nbit == 32 ) { - BF_CHECK_CUFFT( cufftExecC2R(_handle, (cufftComplex*)idata, (cufftReal*)odata) ); + BF_CHECK_HIPFFT( hipfftExecC2R(_handle, (hipfftComplex*)idata, (hipfftReal*)odata) ); } else if( _nbit == 64 ) { - BF_CHECK_CUFFT( cufftExecZ2D(_handle, (cufftDoubleComplex*)idata, (cufftDoubleReal*)odata) ); + BF_CHECK_HIPFFT( hipfftExecZ2D(_handle, (hipfftDoubleComplex*)idata, (hipfftDoubleReal*)odata) ); } else { BF_FAIL("Supported data types", BF_STATUS_UNSUPPORTED_DTYPE); } @@ -352,10 +354,10 @@ BFstatus BFfft_impl::execute(BFarray const* in, BF_ASSERT(space_accessible_from(out->space, BF_SPACE_CUDA), BF_STATUS_UNSUPPORTED_SPACE); // TODO: More assertions - cudaStream_t stream = g_cuda_stream; + hipStream_t stream = g_cuda_stream; // Note: It appears that all transforms from the same plan must be executed // on the same stream to avoid race conditions (use of workspace?). - BF_CHECK_CUFFT( cufftSetStream(_handle, stream) ); + BF_CHECK_HIPFFT( hipfftSetStream(_handle, stream) ); ShapeIndexer shape_indexer(_batch_shape, in->ndim); for( long i=0; i #include "fft_kernels.h" #include "cuda.hpp" @@ -93,7 +94,7 @@ inline Complex post_fftshift(size_t offset, return value; } __device__ -cufftComplex callback_load_ci4(void* dataIn, +hipfftComplex callback_load_ci4(void* dataIn, size_t offset, void* callerInfo, void* sharedPointer) { @@ -104,13 +105,13 @@ cufftComplex callback_load_ci4(void* dataIn, int8_t packed = ((int8_t*)dataIn)[offset]; int8_t real = packed & 0xF0; int8_t imag = packed << 4; - cufftComplex result = make_float2(real * (1.f/128), + hipfftComplex result = make_float2(real * (1.f/128), imag * (1.f/128)); result = post_fftshift(offset, result, callback_data); return result; } __device__ -cufftComplex callback_load_ci8(void* dataIn, +hipfftComplex callback_load_ci8(void* dataIn, size_t offset, void* callerInfo, void* sharedPointer) { @@ -119,14 +120,14 @@ cufftComplex callback_load_ci8(void* dataIn, *(char**)&dataIn += callback_data->ptr_offset; offset = pre_fftshift(offset, callback_data); char2 val = ((char2*)dataIn)[offset]; - cufftComplex result = make_float2(val.x * (1.f/128), + hipfftComplex result = make_float2(val.x * (1.f/128), val.y * (1.f/128)); result = post_fftshift(offset, result, callback_data); return result; } __device__ -cufftComplex callback_load_ci16(void* dataIn, +hipfftComplex callback_load_ci16(void* dataIn, size_t offset, void* callerInfo, void* sharedPointer) { @@ -135,40 +136,40 @@ cufftComplex callback_load_ci16(void* dataIn, *(char**)&dataIn += callback_data->ptr_offset; offset = pre_fftshift(offset, callback_data); short2 val = ((short2*)dataIn)[offset]; - cufftComplex result = make_float2(val.x * (1.f/32768), + hipfftComplex result = make_float2(val.x * (1.f/32768), val.y * (1.f/32768)); result = post_fftshift(offset, result, callback_data); return result; } __device__ -cufftComplex callback_load_cf32(void* dataIn, +hipfftComplex callback_load_cf32(void* dataIn, size_t offset, void* callerInfo, void* sharedPointer) { CallbackData* callback_data = (CallbackData*)callerInfo; // Note: cufftComplex loads must be aligned offset = pre_fftshift(offset, callback_data); - cufftComplex result = ((cufftComplex*)dataIn)[offset]; + hipfftComplex result = ((hipfftComplex*)dataIn)[offset]; result = post_fftshift(offset, result, callback_data); return result; } __device__ -cufftDoubleComplex callback_load_cf64(void* dataIn, +hipfftDoubleComplex callback_load_cf64(void* dataIn, size_t offset, void* callerInfo, void* sharedPointer) { CallbackData* callback_data = (CallbackData*)callerInfo; // Note: cufftDoubleComplex loads must be aligned offset = pre_fftshift(offset, callback_data); - cufftDoubleComplex result = ((cufftDoubleComplex*)dataIn)[offset]; + hipfftDoubleComplex result = ((hipfftDoubleComplex*)dataIn)[offset]; result = post_fftshift(offset, result, callback_data); return result; } -static __device__ cufftCallbackLoadC callback_load_ci4_dptr = callback_load_ci4; -static __device__ cufftCallbackLoadC callback_load_ci8_dptr = callback_load_ci8; -static __device__ cufftCallbackLoadC callback_load_ci16_dptr = callback_load_ci16; -static __device__ cufftCallbackLoadC callback_load_cf32_dptr = callback_load_cf32; -static __device__ cufftCallbackLoadZ callback_load_cf64_dptr = callback_load_cf64; +static __device__ hipfftCallbackLoadC callback_load_ci4_dptr = callback_load_ci4; +static __device__ hipfftCallbackLoadC callback_load_ci8_dptr = callback_load_ci8; +static __device__ hipfftCallbackLoadC callback_load_ci16_dptr = callback_load_ci16; +static __device__ hipfftCallbackLoadC callback_load_cf32_dptr = callback_load_cf32; +static __device__ hipfftCallbackLoadZ callback_load_cf64_dptr = callback_load_cf64; template struct is_signed { enum { value = (((T)(-1)) < 0) }; }; @@ -179,7 +180,7 @@ inline T maxval(T x=T()) { return (1<<(sizeof(T)*8-is_signed::value)) - 1; } template __device__ -cufftReal callback_load_real(void* dataIn, +hipfftReal callback_load_real(void* dataIn, size_t offset, void* callerInfo, void* sharedPointer) { @@ -188,116 +189,116 @@ cufftReal callback_load_real(void* dataIn, *(char**)&dataIn += callback_data->ptr_offset; T val = ((T*)dataIn)[offset]; - cufftReal result = val * (1.f/(maxval()+1)); + hipfftReal result = val * (1.f/(maxval()+1)); return result; } -static __device__ cufftCallbackLoadR callback_load_i8_dptr = callback_load_real; -static __device__ cufftCallbackLoadR callback_load_i16_dptr = callback_load_real; -static __device__ cufftCallbackLoadR callback_load_u8_dptr = callback_load_real; -static __device__ cufftCallbackLoadR callback_load_u16_dptr = callback_load_real; +static __device__ hipfftCallbackLoadR callback_load_i8_dptr = callback_load_real; +static __device__ hipfftCallbackLoadR callback_load_i16_dptr = callback_load_real; +static __device__ hipfftCallbackLoadR callback_load_u8_dptr = callback_load_real; +static __device__ hipfftCallbackLoadR callback_load_u16_dptr = callback_load_real; BFstatus set_fft_load_callback(BFdtype dtype, int nbit, - cufftHandle handle, + hipfftHandle handle, bool do_fftshift, CallbackData* callerInfo, bool* using_callback) { - cufftCallbackLoadC callback_load_c_hptr; - cufftCallbackLoadR callback_load_r_hptr; - cufftCallbackLoadZ callback_load_z_hptr; + hipfftCallbackLoadC callback_load_c_hptr; + hipfftCallbackLoadR callback_load_r_hptr; + hipfftCallbackLoadZ callback_load_z_hptr; *using_callback = true; // TODO: Try to reduce repetition here switch( dtype ) { case BF_DTYPE_CI4: { - BF_CHECK_CUDA( cudaMemcpyFromSymbol(&callback_load_c_hptr, - callback_load_ci4_dptr, - sizeof(cufftCallbackLoadC)), + BF_CHECK_HIP( hipMemcpyFromSymbol(&callback_load_c_hptr, + HIP_SYMBOL(callback_load_ci4_dptr), + sizeof(hipfftCallbackLoadC)), BF_STATUS_DEVICE_ERROR ); - BF_CHECK_CUFFT( cufftXtSetCallback(handle, + BF_CHECK_HIPFFT( hipfftXtSetCallback(handle, (void**)&callback_load_c_hptr, - CUFFT_CB_LD_COMPLEX, + HIPFFT_CB_LD_COMPLEX, (void**)&callerInfo) ); break; } case BF_DTYPE_CI8: { - BF_CHECK_CUDA( cudaMemcpyFromSymbol(&callback_load_c_hptr, - callback_load_ci8_dptr, - sizeof(cufftCallbackLoadC)), + BF_CHECK_HIP( hipMemcpyFromSymbol(&callback_load_c_hptr, + HIP_SYMBOL(callback_load_ci8_dptr), + sizeof(hipfftCallbackLoadC)), BF_STATUS_DEVICE_ERROR ); - BF_CHECK_CUFFT( cufftXtSetCallback(handle, + BF_CHECK_HIPFFT( hipfftXtSetCallback(handle, (void**)&callback_load_c_hptr, - CUFFT_CB_LD_COMPLEX, + HIPFFT_CB_LD_COMPLEX, (void**)&callerInfo) ); break; } case BF_DTYPE_CI16: { - BF_CHECK_CUDA( cudaMemcpyFromSymbol(&callback_load_c_hptr, - callback_load_ci16_dptr, - sizeof(cufftCallbackLoadC)), + BF_CHECK_HIP( hipMemcpyFromSymbol(&callback_load_c_hptr, + HIP_SYMBOL(callback_load_ci16_dptr), + sizeof(hipfftCallbackLoadC)), BF_STATUS_DEVICE_ERROR ); - BF_CHECK_CUFFT( cufftXtSetCallback(handle, + BF_CHECK_HIPFFT( hipfftXtSetCallback(handle, (void**)&callback_load_c_hptr, - CUFFT_CB_LD_COMPLEX, + HIPFFT_CB_LD_COMPLEX, (void**)&callerInfo) ); break; } case BF_DTYPE_I8: { BF_ASSERT(!do_fftshift, BF_STATUS_UNSUPPORTED); - BF_CHECK_CUDA( cudaMemcpyFromSymbol(&callback_load_r_hptr, - callback_load_i8_dptr, - sizeof(cufftCallbackLoadR)), + BF_CHECK_HIP( hipMemcpyFromSymbol(&callback_load_r_hptr, + HIP_SYMBOL(callback_load_i8_dptr), + sizeof(hipfftCallbackLoadR)), BF_STATUS_DEVICE_ERROR ); - BF_CHECK_CUFFT( cufftXtSetCallback(handle, + BF_CHECK_HIPFFT( hipfftXtSetCallback(handle, (void**)&callback_load_r_hptr, - CUFFT_CB_LD_REAL, + HIPFFT_CB_LD_REAL, (void**)&callerInfo) ); break; } case BF_DTYPE_I16: { BF_ASSERT(!do_fftshift, BF_STATUS_UNSUPPORTED); - BF_CHECK_CUDA( cudaMemcpyFromSymbol(&callback_load_r_hptr, - callback_load_i16_dptr, - sizeof(cufftCallbackLoadR)), + BF_CHECK_HIP( hipMemcpyFromSymbol(&callback_load_r_hptr, + HIP_SYMBOL(callback_load_i16_dptr), + sizeof(hipfftCallbackLoadR)), BF_STATUS_DEVICE_ERROR ); - BF_CHECK_CUFFT( cufftXtSetCallback(handle, + BF_CHECK_HIPFFT( hipfftXtSetCallback(handle, (void**)&callback_load_r_hptr, - CUFFT_CB_LD_REAL, + HIPFFT_CB_LD_REAL, (void**)&callerInfo) ); break; } case BF_DTYPE_U8: { BF_ASSERT(!do_fftshift, BF_STATUS_UNSUPPORTED); - BF_CHECK_CUDA( cudaMemcpyFromSymbol(&callback_load_r_hptr, - callback_load_u8_dptr, - sizeof(cufftCallbackLoadR)), + BF_CHECK_HIP( hipMemcpyFromSymbol(&callback_load_r_hptr, + HIP_SYMBOL(callback_load_u8_dptr), + sizeof(hipfftCallbackLoadR)), BF_STATUS_DEVICE_ERROR ); - BF_CHECK_CUFFT( cufftXtSetCallback(handle, + BF_CHECK_HIPFFT( hipfftXtSetCallback(handle, (void**)&callback_load_r_hptr, - CUFFT_CB_LD_REAL, + HIPFFT_CB_LD_REAL, (void**)&callerInfo) ); break; } case BF_DTYPE_U16: { BF_ASSERT(!do_fftshift, BF_STATUS_UNSUPPORTED); - BF_CHECK_CUDA( cudaMemcpyFromSymbol(&callback_load_r_hptr, - callback_load_u16_dptr, - sizeof(cufftCallbackLoadR)), + BF_CHECK_HIP( hipMemcpyFromSymbol(&callback_load_r_hptr, + HIP_SYMBOL(callback_load_u16_dptr), + sizeof(hipfftCallbackLoadR)), BF_STATUS_DEVICE_ERROR ); - BF_CHECK_CUFFT( cufftXtSetCallback(handle, + BF_CHECK_HIPFFT( hipfftXtSetCallback(handle, (void**)&callback_load_r_hptr, - CUFFT_CB_LD_REAL, + HIPFFT_CB_LD_REAL, (void**)&callerInfo) ); break; } case BF_DTYPE_CF32: { if( do_fftshift ) { - BF_CHECK_CUDA( cudaMemcpyFromSymbol(&callback_load_c_hptr, - callback_load_cf32_dptr, - sizeof(cufftCallbackLoadC)), + BF_CHECK_HIP( hipMemcpyFromSymbol(&callback_load_c_hptr, + HIP_SYMBOL(callback_load_cf32_dptr), + sizeof(hipfftCallbackLoadC)), BF_STATUS_DEVICE_ERROR ); - BF_CHECK_CUFFT( cufftXtSetCallback(handle, + BF_CHECK_HIPFFT( hipfftXtSetCallback(handle, (void**)&callback_load_c_hptr, - CUFFT_CB_LD_COMPLEX, + HIPFFT_CB_LD_COMPLEX, (void**)&callerInfo) ); break; } else { @@ -313,13 +314,13 @@ BFstatus set_fft_load_callback(BFdtype dtype, } case BF_DTYPE_CF64: { if( do_fftshift ) { - BF_CHECK_CUDA( cudaMemcpyFromSymbol(&callback_load_z_hptr, - callback_load_cf64_dptr, - sizeof(cufftCallbackLoadZ)), + BF_CHECK_HIP( hipMemcpyFromSymbol(&callback_load_z_hptr, + HIP_SYMBOL(callback_load_cf64_dptr), + sizeof(hipfftCallbackLoadZ)), BF_STATUS_DEVICE_ERROR ); - BF_CHECK_CUFFT( cufftXtSetCallback(handle, + BF_CHECK_HIPFFT( hipfftXtSetCallback(handle, (void**)&callback_load_z_hptr, - CUFFT_CB_LD_COMPLEX_DOUBLE, + HIPFFT_CB_LD_COMPLEX_DOUBLE, (void**)&callerInfo) ); break; } else { diff --git a/src/fft_kernels.h b/src/fft_kernels.h index 0dad4f916..48cd9962a 100644 --- a/src/fft_kernels.h +++ b/src/fft_kernels.h @@ -27,72 +27,76 @@ */ #pragma once +#include + +#include + #include #include #include "int_fastdiv.h" -#include -#include +#include +#include -inline const char* _cufftGetErrorString(cufftResult status) { +inline const char* _hipfftGetErrorString(hipfftResult status) { #define DEFINE_CUFFT_RESULT_CASE(x) case x: return #x switch( status ) { - DEFINE_CUFFT_RESULT_CASE(CUFFT_SUCCESS); - DEFINE_CUFFT_RESULT_CASE(CUFFT_INVALID_PLAN); - DEFINE_CUFFT_RESULT_CASE(CUFFT_ALLOC_FAILED); - DEFINE_CUFFT_RESULT_CASE(CUFFT_INVALID_TYPE); - DEFINE_CUFFT_RESULT_CASE(CUFFT_INVALID_VALUE); - DEFINE_CUFFT_RESULT_CASE(CUFFT_INTERNAL_ERROR); - DEFINE_CUFFT_RESULT_CASE(CUFFT_EXEC_FAILED); - DEFINE_CUFFT_RESULT_CASE(CUFFT_SETUP_FAILED); - DEFINE_CUFFT_RESULT_CASE(CUFFT_INVALID_SIZE); - DEFINE_CUFFT_RESULT_CASE(CUFFT_UNALIGNED_DATA); - DEFINE_CUFFT_RESULT_CASE(CUFFT_INCOMPLETE_PARAMETER_LIST); - DEFINE_CUFFT_RESULT_CASE(CUFFT_INVALID_DEVICE); - DEFINE_CUFFT_RESULT_CASE(CUFFT_PARSE_ERROR); - DEFINE_CUFFT_RESULT_CASE(CUFFT_NO_WORKSPACE); - DEFINE_CUFFT_RESULT_CASE(CUFFT_NOT_IMPLEMENTED); - DEFINE_CUFFT_RESULT_CASE(CUFFT_LICENSE_ERROR); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_SUCCESS); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_INVALID_PLAN); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_ALLOC_FAILED); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_INVALID_TYPE); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_INVALID_VALUE); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_INTERNAL_ERROR); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_EXEC_FAILED); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_SETUP_FAILED); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_INVALID_SIZE); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_UNALIGNED_DATA); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_INCOMPLETE_PARAMETER_LIST); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_INVALID_DEVICE); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_PARSE_ERROR); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_NO_WORKSPACE); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_NOT_IMPLEMENTED); + // DEFINE_CUFFT_RESULT_CASE(CUFFT_LICENSE_ERROR); #if CUDA_VERSION >= 7500 - DEFINE_CUFFT_RESULT_CASE(CUFFT_NOT_SUPPORTED); + DEFINE_CUFFT_RESULT_CASE(HIPFFT_NOT_SUPPORTED); #endif default: return "Unknown CUBLAS error"; } #undef DEFINE_CUFFT_RESULT_CASE } -inline BFstatus bifrost_status(cufftResult status) { +inline BFstatus bifrost_status(hipfftResult status) { switch(status) { - case CUFFT_SUCCESS: return BF_STATUS_SUCCESS; - case CUFFT_ALLOC_FAILED: return BF_STATUS_MEM_ALLOC_FAILED; - case CUFFT_EXEC_FAILED: return BF_STATUS_DEVICE_ERROR; - case CUFFT_NOT_IMPLEMENTED: return BF_STATUS_UNSUPPORTED; + case HIPFFT_SUCCESS: return BF_STATUS_SUCCESS; + case HIPFFT_ALLOC_FAILED: return BF_STATUS_MEM_ALLOC_FAILED; + case HIPFFT_EXEC_FAILED: return BF_STATUS_DEVICE_ERROR; + case HIPFFT_NOT_IMPLEMENTED: return BF_STATUS_UNSUPPORTED; #if CUDA_VERSION >= 7500 - case CUFFT_NOT_SUPPORTED: return BF_STATUS_UNSUPPORTED; + case HIPFFT_NOT_SUPPORTED: return BF_STATUS_UNSUPPORTED; #endif default: return BF_STATUS_INTERNAL_ERROR; } } -#define BF_CHECK_CUFFT_EXCEPTION(call) \ +#define BF_CHECK_HIPFFT_EXCEPTION(call) \ do { \ - cufftResult cufft_ret = call; \ - if( cufft_ret != CUFFT_SUCCESS ) { \ - BF_DEBUG_PRINT(_cufftGetErrorString(cufft_ret)); \ + hipfftResult hipfft_ret = call; \ + if( hipfft_ret != HIPFFT_SUCCESS ) { \ + BF_DEBUG_PRINT(_hipfftGetErrorString(hipfft_ret)); \ } \ - BF_ASSERT_EXCEPTION(cufft_ret == CUFFT_SUCCESS, \ - bifrost_status(cufft_ret)); \ + BF_ASSERT_EXCEPTION(hipfft_ret == HIPFFT_SUCCESS, \ + bifrost_status(hipfft_ret)); \ } while(0) -#define BF_CHECK_CUFFT(call) \ +#define BF_CHECK_HIPFFT(call) \ do { \ - cufftResult cufft_ret = call; \ - if( cufft_ret != CUFFT_SUCCESS ) { \ - BF_DEBUG_PRINT(_cufftGetErrorString(cufft_ret)); \ + hipfftResult hipfft_ret = call; \ + if( hipfft_ret != HIPFFT_SUCCESS ) { \ + BF_DEBUG_PRINT(_hipfftGetErrorString(hipfft_ret)); \ } \ - BF_ASSERT(cufft_ret == CUFFT_SUCCESS, \ - bifrost_status(cufft_ret)); \ + BF_ASSERT(hipfft_ret == HIPFFT_SUCCESS, \ + bifrost_status(hipfft_ret)); \ } while(0) struct __attribute__((packed,aligned(4))) CallbackData { @@ -109,7 +113,7 @@ struct __attribute__((packed,aligned(4))) CallbackData { BFstatus set_fft_load_callback(BFdtype dtype, int nbit, - cufftHandle handle, + hipfftHandle handle, bool do_fftshift, CallbackData* callback_data, bool* using_callback); diff --git a/src/fir.cu b/src/fir.cu index dda36c954..7fd803c3d 100644 --- a/src/fir.cu +++ b/src/fir.cu @@ -27,6 +27,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include #include #include "assert.hpp" #include "utils.hpp" @@ -37,7 +39,6 @@ //#include -#include // For CUDART_NAN_F #include #include @@ -105,7 +106,7 @@ inline void launch_fir_kernel(unsigned int ncoeff, Complex64* state1, InType* d_in, OutType* d_out, - cudaStream_t stream=0) { + hipStream_t stream=0) { //cout << "LAUNCH for " << nelement << endl; dim3 block(std::min(256u, nantpol), 256u/std::min(256u, nantpol)); int first = std::min((nantpol-1)/block.x+1, 65535u); @@ -134,7 +135,7 @@ inline void launch_fir_kernel(unsigned int ncoeff, &state1, &d_in, &d_out}; - BF_CHECK_CUDA_EXCEPTION(cudaLaunchKernel((void*)fir_kernel, + BF_CHECK_HIP_EXCEPTION(hipLaunchKernel((void*)fir_kernel, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); @@ -157,7 +158,7 @@ private: Workspace _plan_storage; // TODO: Use something other than Thrust thrust::device_vector _dv_plan_storage; - cudaStream_t _stream; + hipStream_t _stream; public: BFfir_impl() : _coeffs(NULL), _decim(1), _stream(g_cuda_stream) {} inline UType ncoeff() const { return _ncoeff; } @@ -217,23 +218,23 @@ public: BF_ASSERT_EXCEPTION(_state0 != NULL, BF_STATUS_INVALID_STATE); BF_ASSERT_EXCEPTION(_state1 != NULL, BF_STATUS_INVALID_STATE); - BF_CHECK_CUDA_EXCEPTION(cudaGetLastError(), BF_STATUS_INTERNAL_ERROR); + BF_CHECK_HIP_EXCEPTION(hipGetLastError(), BF_STATUS_INTERNAL_ERROR); // Reset the state - BF_CHECK_CUDA_EXCEPTION( cudaMemsetAsync(_state0, + BF_CHECK_HIP_EXCEPTION( hipMemsetAsync(_state0, 0, sizeof(Complex64)*_ncoeff*_nantpol, _stream), BF_STATUS_MEM_OP_FAILED ); - BF_CHECK_CUDA_EXCEPTION( cudaMemsetAsync(_state1, + BF_CHECK_HIP_EXCEPTION( hipMemsetAsync(_state1, 0, sizeof(Complex64)*_ncoeff*_nantpol, _stream), BF_STATUS_MEM_OP_FAILED ); - BF_CHECK_CUDA_EXCEPTION( cudaStreamSynchronize(_stream), + BF_CHECK_HIP_EXCEPTION( hipStreamSynchronize(_stream), BF_STATUS_DEVICE_ERROR ); - BF_CHECK_CUDA_EXCEPTION(cudaGetLastError(), BF_STATUS_INTERNAL_ERROR); + BF_CHECK_HIP_EXCEPTION(hipGetLastError(), BF_STATUS_INTERNAL_ERROR); } void execute(BFarray const* in, BFarray const* out) { @@ -245,7 +246,7 @@ public: BF_ASSERT_EXCEPTION(out->dtype == BF_DTYPE_CF32 || \ out->dtype == BF_DTYPE_CF64, BF_STATUS_UNSUPPORTED_DTYPE); - BF_CHECK_CUDA_EXCEPTION(cudaGetLastError(), BF_STATUS_INTERNAL_ERROR); + BF_CHECK_HIP_EXCEPTION(hipGetLastError(), BF_STATUS_INTERNAL_ERROR); #define LAUNCH_FIR_KERNEL(IterType,OterType) \ launch_fir_kernel(_ncoeff, _decim, in->shape[0], _nantpol, \ @@ -300,16 +301,16 @@ public: } #undef LAUNCH_FIR_KERNEL - BF_CHECK_CUDA_EXCEPTION( cudaMemcpyAsync(_state0, + BF_CHECK_HIP_EXCEPTION( hipMemcpyAsync(_state0, _state1, sizeof(Complex64)*_ncoeff*_nantpol, - cudaMemcpyDeviceToDevice, + hipMemcpyDeviceToDevice, _stream), BF_STATUS_MEM_OP_FAILED ); - BF_CHECK_CUDA_EXCEPTION(cudaGetLastError(), BF_STATUS_INTERNAL_ERROR); + BF_CHECK_HIP_EXCEPTION(hipGetLastError(), BF_STATUS_INTERNAL_ERROR); } - void set_stream(cudaStream_t stream) { + void set_stream(hipStream_t stream) { _stream = stream; } }; @@ -353,7 +354,7 @@ BFstatus bfFirSetStream(BFfir plan, BF_TRACE(); BF_ASSERT(plan, BF_STATUS_INVALID_HANDLE); BF_ASSERT(stream, BF_STATUS_INVALID_POINTER); - BF_TRY_RETURN(plan->set_stream(*(cudaStream_t*)stream)); + BF_TRY_RETURN(plan->set_stream(*(hipStream_t*)stream)); } BFstatus bfFirSetCoeffs(BFfir plan, BFarray const* coeffs) { diff --git a/src/guantize.cu b/src/guantize.cu index fc5dd5637..38431cfb5 100644 --- a/src/guantize.cu +++ b/src/guantize.cu @@ -28,6 +28,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include "assert.hpp" #include "cuda.hpp" #include "utils.hu" @@ -108,7 +109,7 @@ inline void launch_foreach_simple_gpu(T const* in, U* out, Size nelement, Func func, - cudaStream_t stream=0) { + hipStream_t stream=0) { dim3 block(512, 1); // TODO: Tune this Size first = std::min((nelement-1)/block.x+1, 65535ul); Size secnd = std::min((nelement - first*block.x) / first + 1, 65535ul); @@ -130,7 +131,7 @@ inline void launch_foreach_simple_gpu(T const* in, &out, &nelement, &func}; - BF_CHECK_CUDA_EXCEPTION(cudaLaunchKernel((void*)foreach_simple_gpu, + BF_CHECK_HIP_EXCEPTION(hipLaunchKernel((void*)foreach_simple_gpu, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); @@ -168,7 +169,7 @@ inline void launch_foreach_simple_gpu_4bit(T const* in, int8_t* out, Size nelement, Func func, - cudaStream_t stream=0) { + hipStream_t stream=0) { nelement /= 2; dim3 block(512, 1); // TODO: Tune this Size first = std::min((nelement-1)/block.x+1, 65535ul); @@ -191,7 +192,7 @@ inline void launch_foreach_simple_gpu_4bit(T const* in, &out, &nelement, &func}; - BF_CHECK_CUDA_EXCEPTION(cudaLaunchKernel((void*)foreach_simple_gpu_4bit, + BF_CHECK_HIP_EXCEPTION(hipLaunchKernel((void*)foreach_simple_gpu_4bit, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); @@ -237,7 +238,7 @@ inline void launch_foreach_simple_gpu_2bit(T const* in, int8_t* out, Size nelement, Func func, - cudaStream_t stream=0) { + hipStream_t stream=0) { nelement /= 4; dim3 block(512, 1); // TODO: Tune this Size first = std::min((nelement-1)/block.x+1, 65535ul); @@ -260,7 +261,7 @@ inline void launch_foreach_simple_gpu_2bit(T const* in, &out, &nelement, &func}; - BF_CHECK_CUDA_EXCEPTION(cudaLaunchKernel((void*)foreach_simple_gpu_2bit, + BF_CHECK_HIP_EXCEPTION(hipLaunchKernel((void*)foreach_simple_gpu_2bit, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); @@ -322,7 +323,7 @@ inline void launch_foreach_simple_gpu_1bit(T const* in, int8_t* out, Size nelement, Func func, - cudaStream_t stream=0) { + hipStream_t stream=0) { nelement /= 8; dim3 block(512, 1); // TODO: Tune this Size first = std::min((nelement-1)/block.x+1, 65535ul); @@ -345,7 +346,7 @@ inline void launch_foreach_simple_gpu_1bit(T const* in, &out, &nelement, &func}; - BF_CHECK_CUDA_EXCEPTION(cudaLaunchKernel((void*)foreach_simple_gpu_1bit, + BF_CHECK_HIP_EXCEPTION(hipLaunchKernel((void*)foreach_simple_gpu_1bit, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); @@ -372,36 +373,36 @@ template void launch_foreach_simple_gpu_1bit func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu_1bit,size_t>(float const* in, int8_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); // Instantiation - launch_foreach_simple_gpu_2bit calls used in quantize.cpp template void launch_foreach_simple_gpu_2bit,size_t>(float const* in, int8_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu_2bit,size_t>(float const* in, int8_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); // Instantiation - launch_foreach_simple_gpu_4bit calls used in quantize.cpp template void launch_foreach_simple_gpu_4bit,size_t>(float const* in, int8_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu_4bit,size_t>(float const* in, int8_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); // Instantiation - launch_foreach_simple_gpu calls used in quantize.cpp //// unsigned @@ -409,61 +410,60 @@ template void launch_foreach_simple_gpu func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu,size_t>(float const* in, uint8_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu,size_t>(float const* in, uint16_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu,size_t>(float const* in, uint16_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu,size_t>(float const* in, uint32_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu,size_t>(float const* in, uint32_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); //// signed template void launch_foreach_simple_gpu,size_t>(float const* in, int8_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu,size_t>(float const* in, int8_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu,size_t>(float const* in, int16_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu,size_t>(float const* in, int16_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu,size_t>(float const* in, int32_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu,size_t>(float const* in, int32_t* out, size_t nelement, GuantizeFunctor func, - cudaStream_t stream); - + hipStream_t stream); diff --git a/src/guantize.hu b/src/guantize.hu index 7327da032..353be6ad2 100644 --- a/src/guantize.hu +++ b/src/guantize.hu @@ -31,6 +31,8 @@ #ifndef BF_GUANTIZE_HU_INCLUDE_GUARD_ #define BF_GUANTIZE_HU_INCLUDE_GUARD_ +#include + template struct GuantizeFunctor { SType scale; @@ -45,28 +47,27 @@ void launch_foreach_simple_gpu(T const* in, U* out, Size nelement, Func func, - cudaStream_t stream=0); + hipStream_t stream=0); template void launch_foreach_simple_gpu_4bit(T const* in, int8_t* out, Size nelement, Func func, - cudaStream_t stream=0); + hipStream_t stream=0); template void launch_foreach_simple_gpu_2bit(T const* in, int8_t* out, Size nelement, Func func, - cudaStream_t stream=0); + hipStream_t stream=0); template void launch_foreach_simple_gpu_1bit(T const* in, int8_t* out, Size nelement, Func func, - cudaStream_t stream=0); + hipStream_t stream=0); #endif // BF_GUANTIZE_HU_INCLUDE_GUARD_ - diff --git a/src/gunpack.cu b/src/gunpack.cu index 02694533d..c8fc813db 100644 --- a/src/gunpack.cu +++ b/src/gunpack.cu @@ -28,6 +28,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include "assert.hpp" #include "cuda.hpp" #include "utils.hu" @@ -215,7 +216,7 @@ inline void launch_foreach_simple_gpu(T const* in, U* out, Size nelement, Func func, - cudaStream_t stream) { + hipStream_t stream) { dim3 block(512, 1); // TODO: Tune this Size first = std::min((nelement-1)/block.x+1, 65535ul); Size secnd = std::min((nelement - first*block.x) / first + 1, 65535ul); @@ -237,7 +238,7 @@ inline void launch_foreach_simple_gpu(T const* in, &out, &nelement, &func}; - BF_CHECK_CUDA_EXCEPTION(cudaLaunchKernel((void*)foreach_simple_gpu, + BF_CHECK_HIP_EXCEPTION(hipLaunchKernel((void*)foreach_simple_gpu, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); @@ -265,7 +266,7 @@ inline void launch_foreach_promote_gpu(T const* in, V* out, Size nelement, Func func, - cudaStream_t stream) { + hipStream_t stream) { dim3 block(512, 1); // TODO: Tune this Size first = std::min((nelement-1)/block.x+1, 65535ul); Size secnd = std::min((nelement - first*block.x) / first + 1, 65535ul); @@ -287,7 +288,7 @@ inline void launch_foreach_promote_gpu(T const* in, &out, &nelement, &func}; - BF_CHECK_CUDA_EXCEPTION(cudaLaunchKernel((void*)foreach_promote_gpu, + BF_CHECK_HIP_EXCEPTION(hipLaunchKernel((void*)foreach_promote_gpu, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); @@ -309,33 +310,33 @@ template void launch_foreach_simple_gpu func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu,size_t>(uint8_t const* in, uint32_t* out, size_t nelement, GunpackFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu,size_t>(uint8_t const* in, uint64_t* out, size_t nelement, GunpackFunctor func, - cudaStream_t stream); + hipStream_t stream); //// signed template void launch_foreach_simple_gpu,size_t>(uint8_t const* in, int16_t* out, size_t nelement, GunpackFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu,size_t>(uint8_t const* in, int32_t* out, size_t nelement, GunpackFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_simple_gpu,size_t>(uint8_t const *in, int64_t* out, size_t nelement, GunpackFunctor func, - cudaStream_t stream); + hipStream_t stream); // Instantiation - launch_foreach_promote_gpu calls used in unpack.cpp //// promote to float @@ -344,36 +345,35 @@ template void launch_foreach_promote_gpu func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_promote_gpu,size_t>(uint8_t const* in, int32_t* tmp, float* out, size_t nelement, GunpackFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_promote_gpu,size_t>(uint8_t const* in, int64_t* tmp, float* out, size_t nelement, GunpackFunctor func, - cudaStream_t stream); + hipStream_t stream); //// promote to double template void launch_foreach_promote_gpu,size_t>(uint8_t const* in, int16_t* tmp, double* out, size_t nelement, GunpackFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_promote_gpu,size_t>(uint8_t const* in, int32_t* tmp, double* out, size_t nelement, GunpackFunctor func, - cudaStream_t stream); + hipStream_t stream); template void launch_foreach_promote_gpu,size_t>(uint8_t const* in, int64_t* tmp, double* out, size_t nelement, GunpackFunctor func, - cudaStream_t stream); - + hipStream_t stream); diff --git a/src/gunpack.hu b/src/gunpack.hu index f6179bdfd..6ac9feae2 100644 --- a/src/gunpack.hu +++ b/src/gunpack.hu @@ -45,7 +45,7 @@ void launch_foreach_simple_gpu(T const* in, U* out, Size nelement, Func func, - cudaStream_t stream=0); + hipStream_t stream=0); template void launch_foreach_promote_gpu(T const* in, @@ -53,7 +53,7 @@ void launch_foreach_promote_gpu(T const* in, V* out, Size nelement, Func func, - cudaStream_t stream=0); + hipStream_t stream=0); #endif // BF_GUNPACK_HU_INCLUDE_GUARD_ diff --git a/src/linalg.cu b/src/linalg.cu index 5f2fc0078..5e77ba48f 100644 --- a/src/linalg.cu +++ b/src/linalg.cu @@ -55,7 +55,11 @@ Eventually it will probably be worth integrating the xGPU kernel, given the lack of cublasHerkEx (particularly the small-N problem). */ +#ifndef ROCM_MATHLIBS_API_USE_HIP_COMPLEX +#define ROCM_MATHLIBS_API_USE_HIP_COMPLEX 1 +#endif +#include #include #include "linalg_kernels.h" #include "assert.hpp" @@ -65,27 +69,28 @@ #include "ShapeIndexer.cuh" #include "trace.hpp" #include "Complex.hpp" +#include class BFlinalg_impl { - cublasHandle_t _cublas; + hipblasHandle_t _cublas; // No copy-assign BFlinalg_impl(BFlinalg_impl const& ); BFlinalg_impl& operator=(BFlinalg_impl const& ); public: BFlinalg_impl() { - BF_CHECK_CUBLAS_EXCEPTION(cublasCreate(&_cublas)); + BF_CHECK_HIPBLAS_EXCEPTION(hipblasCreate(&_cublas)); } ~BFlinalg_impl() { if( _cublas ) { - cublasDestroy(_cublas); + hipblasDestroy(_cublas); } } - cublasHandle_t cublas() const { return _cublas; } + hipblasHandle_t cublas() const { return _cublas; } }; BFstatus bfMatMul_aa_exec_nobatch(BFlinalg handle, - cudaStream_t stream, - cublasOperation_t trans, + hipStream_t stream, + hipblasOperation_t trans, long n, long k, double alpha, @@ -97,11 +102,11 @@ BFstatus bfMatMul_aa_exec_nobatch(BFlinalg handle, BFdtype c_type, long c_stride) { BF_TRACE_STREAM(stream); - BF_CHECK_CUBLAS(cublasSetStream(handle->cublas(), stream)); + BF_CHECK_HIPBLAS(hipblasSetStream(handle->cublas(), stream)); // Note: UPPER here means lower for row-major ordering - cublasFillMode_t uplo = CUBLAS_FILL_MODE_UPPER; - BF_CHECK_CUBLAS(cublasSetPointerMode(handle->cublas(), - CUBLAS_POINTER_MODE_HOST)); + hipblasFillMode_t uplo = HIPBLAS_FILL_MODE_UPPER; + BF_CHECK_HIPBLAS(hipblasSetPointerMode(handle->cublas(), + HIPBLAS_POINTER_MODE_HOST)); BF_ASSERT(a_data, BF_STATUS_INVALID_POINTER); BF_ASSERT(c_data, BF_STATUS_INVALID_POINTER); switch( a_type ) { @@ -109,22 +114,22 @@ BFstatus bfMatMul_aa_exec_nobatch(BFlinalg handle, BF_ASSERT(c_type == BF_DTYPE_F32, BF_STATUS_UNSUPPORTED_DTYPE); float alpha_f = (float)alpha; float beta_f = (float)beta; - BF_CHECK_CUBLAS(cublasSsyrk(handle->cublas(), uplo, trans, - n, k, - &alpha_f, - (float*)a_data, a_stride, - &beta_f, - (float*)c_data, c_stride)); + BF_CHECK_HIPBLAS(hipblasSsyrk(handle->cublas(), uplo, trans, + n, k, + &alpha_f, + (float*)a_data, a_stride, + &beta_f, + (float*)c_data, c_stride)); break; } case BF_DTYPE_F64: { BF_ASSERT(c_type == BF_DTYPE_F64, BF_STATUS_UNSUPPORTED_DTYPE); - BF_CHECK_CUBLAS(cublasDsyrk(handle->cublas(), uplo, trans, - n, k, - &alpha, - (double*)a_data, a_stride, - &beta, - (double*)c_data, c_stride)); + BF_CHECK_HIPBLAS(hipblasDsyrk(handle->cublas(), uplo, trans, + n, k, + &alpha, + (double*)a_data, a_stride, + &beta, + (double*)c_data, c_stride)); break; } #if CUDART_VERSION >= 8000 @@ -132,19 +137,20 @@ BFstatus bfMatMul_aa_exec_nobatch(BFlinalg handle, BF_ASSERT(c_type == BF_DTYPE_CF32, BF_STATUS_UNSUPPORTED_DTYPE); float alpha_f = (float)alpha; float beta_f = (float)beta; - if( get_cuda_device_cc() >= 50 ) { - BF_CHECK_CUBLAS(cublasCherk3mEx(handle->cublas(), uplo, trans, - n, k, - &alpha_f, - (cuComplex*)a_data, - CUDA_C_8I, - a_stride, - &beta_f, - (cuComplex*)c_data, - CUDA_C_32F, - c_stride)); - break; - } + // No HIP equivalent yet. See: https://github.com/ROCmSoftwarePlatform/rocBLAS/issues/1320 + // if( get_cuda_device_cc() >= 50 ) { + // BF_CHECK_CUBLAS(cublasCherk3mEx(handle->cublas(), uplo, trans, + // n, k, + // &alpha_f, + // (hipComplex*)a_data, + // HIPBLAS_C_8I, + // a_stride, + // &beta_f, + // (hipComplex*)c_data, + // HIPBLAS_C_32F, + // c_stride)); + // break; + // } BF_FAIL("Supported dtype for array a", BF_STATUS_UNSUPPORTED_DTYPE); } #endif @@ -152,37 +158,22 @@ BFstatus bfMatMul_aa_exec_nobatch(BFlinalg handle, BF_ASSERT(c_type == BF_DTYPE_CF32, BF_STATUS_UNSUPPORTED_DTYPE); float alpha_f = (float)alpha; float beta_f = (float)beta; -#if CUDART_VERSION >= 8000 - if( get_cuda_device_cc() >= 50 ) { - BF_CHECK_CUBLAS(cublasCherk3mEx(handle->cublas(), uplo, trans, - n, k, - &alpha_f, - (cuComplex*)a_data, - CUDA_C_32F, - a_stride, - &beta_f, - (cuComplex*)c_data, - CUDA_C_32F, - c_stride)); - break; - } -#endif - BF_CHECK_CUBLAS(cublasCherk(handle->cublas(), uplo, trans, - n, k, - &alpha_f, - (cuComplex*)a_data, a_stride, - &beta_f, - (cuComplex*)c_data, c_stride)); + BF_CHECK_HIPBLAS(hipblasCherk(handle->cublas(), uplo, trans, + n, k, + &alpha_f, + (hipComplex*)a_data, a_stride, + &beta_f, + (hipComplex*)c_data, c_stride)); break; } case BF_DTYPE_CF64: { BF_ASSERT(c_type == BF_DTYPE_CF64, BF_STATUS_UNSUPPORTED_DTYPE); - BF_CHECK_CUBLAS(cublasZherk(handle->cublas(), uplo, trans, - n, k, - &alpha, - (cuDoubleComplex*)a_data, a_stride, - &beta, - (cuDoubleComplex*)c_data, c_stride)); + BF_CHECK_HIPBLAS(hipblasZherk(handle->cublas(), uplo, trans, + n, k, + &alpha, + (hipDoubleComplex*)a_data, a_stride, + &beta, + (hipDoubleComplex*)c_data, c_stride)); break; } default: @@ -192,8 +183,8 @@ BFstatus bfMatMul_aa_exec_nobatch(BFlinalg handle, } BFstatus bfMatMul_aa_exec(BFlinalg handle, - cudaStream_t stream, - cublasOperation_t trans, + hipStream_t stream, + hipblasOperation_t trans, long n, long k, long nbatch, @@ -213,8 +204,10 @@ BFstatus bfMatMul_aa_exec(BFlinalg handle, //bool use_bf_cherk = use_bf_cherk_str && atoi(use_bf_cherk_str); enum { BF_CUBLAS_CHERK_THRESHOLD = 896 }; if( //use_bf_cherk && - (CUDART_VERSION < 8000 || n < BF_CUBLAS_CHERK_THRESHOLD) && - trans == CUBLAS_OP_N && +#if !defined(CUDART_VERSION) || CUDART_VERSION >= 8000 + n < BF_CUBLAS_CHERK_THRESHOLD && +#endif + trans == HIPBLAS_OP_N && n % 2 == 0 && a_stride % 2 == 0 && a_batchstride % 2 == 0 && c_stride % 2 == 0 && c_batchstride % 2 == 0 && @@ -312,7 +305,7 @@ BFstatus bfMatMul_aa(BFlinalg handle, cstrides[d] /= BF_DTYPE_NBYTE(c->dtype); } // Determine transposition based on strides, and update strides - cublasOperation_t trans; + hipblasOperation_t trans; if( astrides[ndim-1] < astrides[ndim-2] ) { // Note: The fastest dim cannot be a batch dim BF_ASSERT(astrides[ndim-1] == 1, BF_STATUS_UNSUPPORTED_STRIDE); @@ -320,9 +313,9 @@ BFstatus bfMatMul_aa(BFlinalg handle, // Note: Because BLAS uses col-major ordering, we can only support // the non-conjugated case here. BF_ASSERT(!a->conjugated, BF_STATUS_UNSUPPORTED); - trans = CUBLAS_OP_C; + trans = HIPBLAS_OP_C; } else { - trans = CUBLAS_OP_T; + trans = HIPBLAS_OP_T; } } else if( astrides[ndim-1] > astrides[ndim-2] ) { // Note: The fastest dim cannot be a batch dim @@ -332,7 +325,7 @@ BFstatus bfMatMul_aa(BFlinalg handle, if( BF_DTYPE_IS_COMPLEX(a->dtype) ) { BF_ASSERT(a->conjugated, BF_STATUS_UNSUPPORTED); } - trans = CUBLAS_OP_N; + trans = HIPBLAS_OP_N; std::swap(astrides[ndim-1], astrides[ndim-2]); } else { // TODO: I think this actually occurs legitimately when shape[-1] = 1 @@ -361,9 +354,9 @@ BFstatus bfMatMul_aa(BFlinalg handle, } BFstatus bfMatMul_ab_exec_nobatch(BFlinalg handle, - cudaStream_t stream, - cublasOperation_t trans_a, - cublasOperation_t trans_b, + hipStream_t stream, + hipblasOperation_t trans_a, + hipblasOperation_t trans_b, long m, long n, long k, @@ -379,9 +372,9 @@ BFstatus bfMatMul_ab_exec_nobatch(BFlinalg handle, BFdtype c_type, long c_stride) { BF_TRACE_STREAM(stream); - BF_CHECK_CUBLAS(cublasSetStream(handle->cublas(), stream)); - BF_CHECK_CUBLAS(cublasSetPointerMode(handle->cublas(), - CUBLAS_POINTER_MODE_HOST)); + BF_CHECK_HIPBLAS(hipblasSetStream(handle->cublas(), stream)); + BF_CHECK_HIPBLAS(hipblasSetPointerMode(handle->cublas(), + HIPBLAS_POINTER_MODE_HOST)); BF_ASSERT(a_data, BF_STATUS_INVALID_POINTER); BF_ASSERT(b_data, BF_STATUS_INVALID_POINTER); BF_ASSERT(c_data, BF_STATUS_INVALID_POINTER); @@ -393,89 +386,74 @@ BFstatus bfMatMul_ab_exec_nobatch(BFlinalg handle, BF_ASSERT(c_type == BF_DTYPE_F32, BF_STATUS_UNSUPPORTED_DTYPE); float alpha_f = (float)alpha; float beta_f = (float)beta; - BF_CHECK_CUBLAS(cublasSgemm(handle->cublas(), trans_a, trans_b, - m, n, k, - &alpha_f, - (float*)a_data, a_stride, - (float*)b_data, b_stride, - &beta_f, - (float*)c_data, c_stride)); + BF_CHECK_HIPBLAS(hipblasSgemm(handle->cublas(), trans_a, trans_b, + m, n, k, + &alpha_f, + (float*)a_data, a_stride, + (float*)b_data, b_stride, + &beta_f, + (float*)c_data, c_stride)); break; } case BF_DTYPE_F64: { BF_ASSERT(c_type == BF_DTYPE_F64, BF_STATUS_UNSUPPORTED_DTYPE); - BF_CHECK_CUBLAS(cublasDgemm(handle->cublas(), trans_a, trans_b, - m, n, k, - &alpha, - (double*)a_data, a_stride, - (double*)b_data, b_stride, - &beta, - (double*)c_data, c_stride)); + BF_CHECK_HIPBLAS(hipblasDgemm(handle->cublas(), trans_a, trans_b, + m, n, k, + &alpha, + (double*)a_data, a_stride, + (double*)b_data, b_stride, + &beta, + (double*)c_data, c_stride)); break; } #if CUDART_VERSION >= 8000 case BF_DTYPE_CI8: { BF_ASSERT(c_type == BF_DTYPE_CF32, BF_STATUS_UNSUPPORTED_DTYPE); - cuComplex alpha_cf = make_cuComplex(alpha, 0); - cuComplex beta_cf = make_cuComplex(beta, 0); - if( get_cuda_device_cc() >= 50 ) { - BF_CHECK_CUBLAS(cublasCgemmEx(handle->cublas(), trans_a, trans_b, - m, n, k, - &alpha_cf, - (cuComplex*)a_data, - CUDA_C_8I, - a_stride, - (cuComplex*)b_data, - CUDA_C_8I, - b_stride, - &beta_cf, - (cuComplex*)c_data, - CUDA_C_32F, - c_stride)); - break; - } + hipComplex alpha_cf = make_hipComplex(alpha, 0); + hipComplex beta_cf = make_hipComplex(beta, 0); + BF_CHECK_HIPBLAS(hipblasGemmEx(handle->cublas(), trans_a, trans_b, + m, n, k, + &alpha_cf, + (hipComplex*)a_data, + HIPBLAS_C_8I, + a_stride, + (hipComplex*)b_data, + HIPBLAS_C_8I, + b_stride, + &beta_cf, + (hipComplex*)c_data, + HIPBLAS_C_32F, + c_stride, + HIPBLAS_C_32F, + HIPBLAS_GEMM_DEFAULT)); + break; BF_FAIL("Supported dtype for input array", BF_STATUS_UNSUPPORTED_DTYPE); } #endif case BF_DTYPE_CF32: { BF_ASSERT(c_type == BF_DTYPE_CF32, BF_STATUS_UNSUPPORTED_DTYPE); - cuComplex alpha_cf = make_cuComplex(alpha, 0); - cuComplex beta_cf = make_cuComplex(beta, 0); -#if CUDART_VERSION >= 8000 - if( get_cuda_device_cc() >= 50 ) { - BF_CHECK_CUBLAS(cublasCgemm3m(handle->cublas(), trans_a, trans_b, - m, n, k, - &alpha_cf, - (cuComplex*)a_data, - a_stride, - (cuComplex*)b_data, - b_stride, - &beta_cf, - (cuComplex*)c_data, - c_stride)); - break; - } -#endif - BF_CHECK_CUBLAS(cublasCgemm(handle->cublas(), trans_a, trans_b, - m, n, k, - &alpha_cf, - (cuComplex*)a_data, a_stride, - (cuComplex*)b_data, b_stride, - &beta_cf, - (cuComplex*)c_data, c_stride)); + hipComplex alpha_cf = make_hipComplex(alpha, 0); + hipComplex beta_cf = make_hipComplex(beta, 0); + BF_CHECK_HIPBLAS(hipblasCgemm(handle->cublas(), trans_a, trans_b, + m, n, k, + &alpha_cf, + (hipComplex*)a_data, a_stride, + (hipComplex*)b_data, b_stride, + &beta_cf, + (hipComplex*)c_data, c_stride)); break; } case BF_DTYPE_CF64: { - cuDoubleComplex alpha_cd = make_cuDoubleComplex(alpha, 0); - cuDoubleComplex beta_cd = make_cuDoubleComplex(beta, 0); + hipDoubleComplex alpha_cd = make_hipDoubleComplex(alpha, 0); + hipDoubleComplex beta_cd = make_hipDoubleComplex(beta, 0); BF_ASSERT(c_type == BF_DTYPE_CF64, BF_STATUS_UNSUPPORTED_DTYPE); - BF_CHECK_CUBLAS(cublasZgemm(handle->cublas(), trans_a, trans_b, - m, n, k, - &alpha_cd, - (cuDoubleComplex*)a_data, a_stride, - (cuDoubleComplex*)b_data, b_stride, - &beta_cd, - (cuDoubleComplex*)c_data, c_stride)); + BF_CHECK_HIPBLAS(hipblasZgemm(handle->cublas(), trans_a, trans_b, + m, n, k, + &alpha_cd, + (hipDoubleComplex*)a_data, a_stride, + (hipDoubleComplex*)b_data, b_stride, + &beta_cd, + (hipDoubleComplex*)c_data, c_stride)); break; } default: @@ -485,9 +463,9 @@ BFstatus bfMatMul_ab_exec_nobatch(BFlinalg handle, } BFstatus bfMatMul_ab_exec(BFlinalg handle, - cudaStream_t stream, - cublasOperation_t trans_a, - cublasOperation_t trans_b, + hipStream_t stream, + hipblasOperation_t trans_a, + hipblasOperation_t trans_b, long m, long n, long k, @@ -512,7 +490,7 @@ BFstatus bfMatMul_ab_exec(BFlinalg handle, //bool use_bf_cgemm = use_bf_cgemm_str && atoi(use_bf_cgemm_str); if( //use_bf_cgemm && n <= 12 && - trans_a == CUBLAS_OP_T && trans_b == CUBLAS_OP_N && + trans_a == HIPBLAS_OP_T && trans_b == HIPBLAS_OP_N && (a_type == BF_DTYPE_CI4 || a_type == BF_DTYPE_CI8) && (b_type == BF_DTYPE_CI16 || b_type == BF_DTYPE_CF16 || b_type == BF_DTYPE_CF32) && c_type == BF_DTYPE_CF32 ) { @@ -615,21 +593,21 @@ BFstatus bfMatMul_ab(BFlinalg handle, cstrides[d] /= BF_DTYPE_NBYTE(c->dtype); } // Determine transposition based on strides, and update strides - cublasOperation_t trans_a; - cublasOperation_t trans_b; + hipblasOperation_t trans_a; + hipblasOperation_t trans_b; if( astrides[ndim-1] < astrides[ndim-2] ) { // Note: The fastest dim cannot be a batch dim BF_ASSERT(astrides[ndim-1] == 1, BF_STATUS_UNSUPPORTED_STRIDE); // TODO: Check behaviour with conjugated arrays BF_ASSERT(!BF_DTYPE_IS_COMPLEX(a->dtype) || !a->conjugated, BF_STATUS_UNSUPPORTED); - trans_a = CUBLAS_OP_N; + trans_a = HIPBLAS_OP_N; } else if( astrides[ndim-1] > astrides[ndim-2] ) { // Note: The fastest dim cannot be a batch dim BF_ASSERT(astrides[ndim-2] == 1, BF_STATUS_UNSUPPORTED_STRIDE); trans_a = (BF_DTYPE_IS_COMPLEX(a->dtype) && a->conjugated ? - CUBLAS_OP_C : - CUBLAS_OP_T); + HIPBLAS_OP_C : + HIPBLAS_OP_T); std::swap(astrides[ndim-1], astrides[ndim-2]); } else { // TODO: I think this actually occurs legitimately when shape[-1] = 1 @@ -641,13 +619,13 @@ BFstatus bfMatMul_ab(BFlinalg handle, // TODO: Check behaviour with conjugated arrays BF_ASSERT(!BF_DTYPE_IS_COMPLEX(b->dtype) || !b->conjugated, BF_STATUS_UNSUPPORTED); - trans_b = CUBLAS_OP_N; + trans_b = HIPBLAS_OP_N; } else if( bstrides[ndim-1] > bstrides[ndim-2] ) { // Note: The fastest dim cannot be a batch dim BF_ASSERT(bstrides[ndim-2] == 1, BF_STATUS_UNSUPPORTED_STRIDE); trans_b = (BF_DTYPE_IS_COMPLEX(b->dtype) && b->conjugated ? - CUBLAS_OP_C : - CUBLAS_OP_T); + HIPBLAS_OP_C : + HIPBLAS_OP_T); std::swap(bstrides[ndim-1], bstrides[ndim-2]); } else { BF_ASSERT(false, BF_STATUS_INVALID_STRIDE); diff --git a/src/linalg_kernels.cu b/src/linalg_kernels.cu index 50b568685..c92570b40 100644 --- a/src/linalg_kernels.cu +++ b/src/linalg_kernels.cu @@ -60,6 +60,8 @@ public: Complex& mad( }; */ + +#include #include "utils.hpp" #include "Complex.hpp" #include "Jones.hpp" @@ -162,7 +164,7 @@ void bf_cherk_N_diagonal_kernel(int N, int K, int nbatch, float alpha, - cudaTextureObject_t A_tex, + hipTextureObject_t A_tex, int A_nbit, int A_stride, int A_batchstride, @@ -342,7 +344,7 @@ void bf_cherk_N_offdiagonal_kernel(int N, int K, int nbatch, float alpha, - cudaTextureObject_t A_tex, + hipTextureObject_t A_tex, int A_nbit, int A_stride, int A_batchstride, @@ -485,7 +487,7 @@ void bf_cherk_N(int N, int K, int nbatch, BFdtype C_type, int C_stride, int C_batchstride, - cudaStream_t stream) { + hipStream_t stream) { // Note: The kernel operates on 2 elements at a time and requires alignment BF_ASSERT_EXCEPTION(N % 2 == 0, BF_STATUS_UNSUPPORTED_SHAPE); BF_ASSERT_EXCEPTION(A_stride % 2 == 0, BF_STATUS_UNSUPPORTED_STRIDE); @@ -512,17 +514,17 @@ void bf_cherk_N(int N, int K, int nbatch, C_stride /= 2; C_batchstride /= 2; - cudaChannelFormatKind channel_format; - cudaTextureReadMode tex_read_mode; + hipChannelFormatKind channel_format; + hipTextureReadMode tex_read_mode; switch( A_type ) { case BF_DTYPE_CI8: // Fall-through case BF_DTYPE_CI16: - channel_format = cudaChannelFormatKindSigned; - tex_read_mode = cudaReadModeNormalizedFloat; + channel_format = hipChannelFormatKindSigned; + tex_read_mode = hipReadModeNormalizedFloat; break; case BF_DTYPE_CF32: - channel_format = cudaChannelFormatKindFloat; - tex_read_mode = cudaReadModeElementType; + channel_format = hipChannelFormatKindFloat; + tex_read_mode = hipReadModeElementType; break; default: BF_FAIL_EXCEPTION("Supported input dtype", @@ -537,15 +539,17 @@ void bf_cherk_N(int N, int K, int nbatch, int A_offset = A_byte_offset / element_bytes; size_t A_nelement_total = - std::max(A_stride * K, A_batchstride * nbatch) + A_offset; + (A_offset + N) // the element in the first row of first batch + + (K - 1) * A_stride // the elements in the rest of the first batch + + (nbatch - 1) * A_batchstride; // the elements for the remaining batches size_t texture_element_limit = 1 << 27; BF_ASSERT_EXCEPTION(A_nelement_total <= texture_element_limit, BF_STATUS_UNSUPPORTED_SHAPE); // Create texture object - cudaResourceDesc resDesc; + hipResourceDesc resDesc; memset(&resDesc, 0, sizeof(resDesc)); - resDesc.resType = cudaResourceTypeLinear; + resDesc.resType = hipResourceTypeLinear; resDesc.res.linear.devPtr = const_cast(A_ptr); resDesc.res.linear.desc.f = channel_format; resDesc.res.linear.desc.x = A_nbit; @@ -554,12 +558,12 @@ void bf_cherk_N(int N, int K, int nbatch, resDesc.res.linear.desc.w = A_nbit; resDesc.res.linear.sizeInBytes = A_nelement_total * 4 * (A_nbit / 8); - cudaTextureDesc texDesc; + hipTextureDesc texDesc; memset(&texDesc, 0, sizeof(texDesc)); texDesc.readMode = tex_read_mode; - cudaTextureObject_t A_tex = 0; - BF_CHECK_CUDA_EXCEPTION( - cudaCreateTextureObject(&A_tex, &resDesc, &texDesc, NULL), + hipTextureObject_t A_tex = 0; + BF_CHECK_HIP_EXCEPTION( + hipCreateTextureObject(&A_tex, &resDesc, &texDesc, NULL), BF_STATUS_INTERNAL_ERROR); enum { @@ -589,11 +593,11 @@ void bf_cherk_N(int N, int K, int nbatch, A_tex, A_nbit, A_stride, A_batchstride, A_offset, beta, (float4*)C_ptr, C_stride, C_batchstride); - BF_CHECK_CUDA_EXCEPTION(cudaGetLastError(), BF_STATUS_INTERNAL_ERROR); + BF_CHECK_HIP_EXCEPTION(hipGetLastError(), BF_STATUS_INTERNAL_ERROR); } - BF_CHECK_CUDA_EXCEPTION( - cudaDestroyTextureObject(A_tex), + BF_CHECK_HIP_EXCEPTION( + hipDestroyTextureObject(A_tex), BF_STATUS_INTERNAL_ERROR); #if BF_USE_DIAGONAL_KERNEL @@ -607,9 +611,9 @@ void bf_cherk_N(int N, int K, int nbatch, BF_STATUS_UNSUPPORTED_SHAPE); A_offset *= 2; // Create texture object - cudaResourceDesc resDesc2; + hipResourceDesc resDesc2; memset(&resDesc2, 0, sizeof(resDesc2)); - resDesc2.resType = cudaResourceTypeLinear; + resDesc2.resType = hipResourceTypeLinear; resDesc2.res.linear.devPtr = const_cast(A_ptr); resDesc2.res.linear.desc.f = channel_format; resDesc2.res.linear.desc.x = A_nbit; @@ -617,12 +621,12 @@ void bf_cherk_N(int N, int K, int nbatch, resDesc2.res.linear.desc.z = 0; resDesc2.res.linear.desc.w = 0; resDesc2.res.linear.sizeInBytes = (A_nelement_total*2) * 2 * (A_nbit / 8); - cudaTextureDesc texDesc2; + hipTextureDesc texDesc2; memset(&texDesc2, 0, sizeof(texDesc2)); texDesc2.readMode = tex_read_mode; - cudaTextureObject_t A_tex2 = 0; - BF_CHECK_CUDA_EXCEPTION( - cudaCreateTextureObject(&A_tex2, &resDesc2, &texDesc2, NULL), + hipTextureObject_t A_tex2 = 0; + BF_CHECK_HIP_EXCEPTION( + hipCreateTextureObject(&A_tex2, &resDesc2, &texDesc2, NULL), BF_STATUS_INTERNAL_ERROR); // TODO: Clean this up a bit @@ -636,10 +640,10 @@ void bf_cherk_N(int N, int K, int nbatch, A_tex2, A_nbit, A_stride, A_batchstride, A_offset, beta, (float4*)C_ptr, C_stride, C_batchstride); - BF_CHECK_CUDA_EXCEPTION(cudaGetLastError(), BF_STATUS_INTERNAL_ERROR); + BF_CHECK_HIP_EXCEPTION(hipGetLastError(), BF_STATUS_INTERNAL_ERROR); - BF_CHECK_CUDA_EXCEPTION( - cudaDestroyTextureObject(A_tex2), + BF_CHECK_HIP_EXCEPTION( + hipDestroyTextureObject(A_tex2), BF_STATUS_INTERNAL_ERROR); #endif // BF_USE_DIAGONAL_KERNEL } @@ -812,7 +816,7 @@ void bf_cgemm_TN_smallM_staticN_v2(int M, BFdtype C_type, int C_stride, int C_batchstride, - cudaStream_t stream) { + hipStream_t stream) { enum { BLOCK_X = 32, // Must be warpSize (32) BLOCK_Y = 16, // Can be tuned @@ -935,7 +939,7 @@ void bf_cgemm_TN_smallM(int M, BFdtype C_type, int C_stride, int C_batchstride, - cudaStream_t stream) { + hipStream_t stream) { #define CALL_BF_CGEMM_TN_SMALLM_STATICN(N_MAX) \ /*bf_cgemm_TN_smallM_staticN*/ \ bf_cgemm_TN_smallM_staticN_v2 \ diff --git a/src/linalg_kernels.h b/src/linalg_kernels.h index ffd4698d5..a603a0fe8 100644 --- a/src/linalg_kernels.h +++ b/src/linalg_kernels.h @@ -28,63 +28,66 @@ #pragma once -#include "cuda.hpp" - -#include +#ifndef ROCM_MATHLIBS_API_USE_HIP_COMPLEX +#define ROCM_MATHLIBS_API_USE_HIP_COMPLEX 1 +#endif +#include "cuda.hpp" #include #include +#include +#include -inline const char* _cublasGetErrorString(cublasStatus_t status) { +inline const char* _hipblasGetErrorString(hipblasStatus_t status) { switch(status) { - case CUBLAS_STATUS_SUCCESS: return "CUBLAS_STATUS_SUCCESS"; - case CUBLAS_STATUS_NOT_INITIALIZED: return "CUBLAS_STATUS_NOT_INITIALIZED"; - case CUBLAS_STATUS_ALLOC_FAILED: return "CUBLAS_STATUS_ALLOC_FAILED"; - case CUBLAS_STATUS_INVALID_VALUE: return "CUBLAS_STATUS_INVALID_VALUE"; - case CUBLAS_STATUS_ARCH_MISMATCH: return "CUBLAS_STATUS_ARCH_MISMATCH"; - case CUBLAS_STATUS_MAPPING_ERROR: return "CUBLAS_STATUS_MAPPING_ERROR"; - case CUBLAS_STATUS_EXECUTION_FAILED: return "CUBLAS_STATUS_EXECUTION_FAILED"; - case CUBLAS_STATUS_INTERNAL_ERROR: return "CUBLAS_STATUS_INTERNAL_ERROR"; - case CUBLAS_STATUS_NOT_SUPPORTED: return "CUBLAS_STATUS_NOT_SUPPORTED"; - case CUBLAS_STATUS_LICENSE_ERROR: return "CUBLAS_STATUS_LICENSE_ERROR"; + case HIPBLAS_STATUS_SUCCESS: return "HIPBLAS_STATUS_SUCCESS"; + case HIPBLAS_STATUS_NOT_INITIALIZED: return "HIPBLAS_STATUS_NOT_INITIALIZED"; + case HIPBLAS_STATUS_ALLOC_FAILED: return "HIPBLAS_STATUS_ALLOC_FAILED"; + case HIPBLAS_STATUS_INVALID_VALUE: return "HIPBLAS_STATUS_INVALID_VALUE"; + case HIPBLAS_STATUS_ARCH_MISMATCH: return "HIPBLAS_STATUS_ARCH_MISMATCH"; + case HIPBLAS_STATUS_MAPPING_ERROR: return "HIPBLAS_STATUS_MAPPING_ERROR"; + case HIPBLAS_STATUS_EXECUTION_FAILED: return "HIPBLAS_STATUS_EXECUTION_FAILED"; + case HIPBLAS_STATUS_INTERNAL_ERROR: return "HIPBLAS_STATUS_INTERNAL_ERROR"; + case HIPBLAS_STATUS_NOT_SUPPORTED: return "HIPBLAS_STATUS_NOT_SUPPORTED"; + case HIPBLAS_STATUS_UNKNOWN: return "HIPBLAS_STATUS_UNKNOWN"; default: return "Unknown CUBLAS error"; } } -inline BFstatus bifrost_status(cublasStatus_t status) { +inline BFstatus bifrost_status(hipblasStatus_t status) { switch(status) { - case CUBLAS_STATUS_SUCCESS: return BF_STATUS_SUCCESS; - case CUBLAS_STATUS_NOT_INITIALIZED: return BF_STATUS_DEVICE_ERROR; - case CUBLAS_STATUS_ALLOC_FAILED: return BF_STATUS_MEM_ALLOC_FAILED; - case CUBLAS_STATUS_INVALID_VALUE: return BF_STATUS_INTERNAL_ERROR; - case CUBLAS_STATUS_ARCH_MISMATCH: return BF_STATUS_INTERNAL_ERROR; - case CUBLAS_STATUS_MAPPING_ERROR: return BF_STATUS_DEVICE_ERROR; - case CUBLAS_STATUS_EXECUTION_FAILED: return BF_STATUS_DEVICE_ERROR; - case CUBLAS_STATUS_INTERNAL_ERROR: return BF_STATUS_DEVICE_ERROR; - case CUBLAS_STATUS_NOT_SUPPORTED: return BF_STATUS_UNSUPPORTED; - case CUBLAS_STATUS_LICENSE_ERROR: return BF_STATUS_DEVICE_ERROR; + case HIPBLAS_STATUS_SUCCESS: return BF_STATUS_SUCCESS; + case HIPBLAS_STATUS_NOT_INITIALIZED: return BF_STATUS_DEVICE_ERROR; + case HIPBLAS_STATUS_ALLOC_FAILED: return BF_STATUS_MEM_ALLOC_FAILED; + case HIPBLAS_STATUS_INVALID_VALUE: return BF_STATUS_INTERNAL_ERROR; + case HIPBLAS_STATUS_ARCH_MISMATCH: return BF_STATUS_INTERNAL_ERROR; + case HIPBLAS_STATUS_MAPPING_ERROR: return BF_STATUS_DEVICE_ERROR; + case HIPBLAS_STATUS_EXECUTION_FAILED: return BF_STATUS_DEVICE_ERROR; + case HIPBLAS_STATUS_INTERNAL_ERROR: return BF_STATUS_DEVICE_ERROR; + case HIPBLAS_STATUS_NOT_SUPPORTED: return BF_STATUS_UNSUPPORTED; + case HIPBLAS_STATUS_UNKNOWN: return BF_STATUS_DEVICE_ERROR; default: return BF_STATUS_INTERNAL_ERROR; } } -#define BF_CHECK_CUBLAS_EXCEPTION(call) \ +#define BF_CHECK_HIPBLAS_EXCEPTION(call) \ do { \ - cublasStatus_t cublas_ret = call; \ - if( cublas_ret != CUBLAS_STATUS_SUCCESS ) { \ - BF_DEBUG_PRINT(_cublasGetErrorString(cublas_ret)); \ + hipblasStatus_t hipblas_ret = call; \ + if( hipblas_ret != HIPBLAS_STATUS_SUCCESS ) { \ + BF_DEBUG_PRINT(_hipblasGetErrorString(hipblas_ret)); \ } \ - BF_ASSERT_EXCEPTION(cublas_ret == CUBLAS_STATUS_SUCCESS, \ - bifrost_status(cublas_ret)); \ + BF_ASSERT_EXCEPTION(hipblas_ret == HIPBLAS_STATUS_SUCCESS, \ + bifrost_status(hipblas_ret)); \ } while(0) -#define BF_CHECK_CUBLAS(call) \ +#define BF_CHECK_HIPBLAS(call) \ do { \ - cublasStatus_t cublas_ret = call; \ - if( cublas_ret != CUBLAS_STATUS_SUCCESS ) { \ - BF_DEBUG_PRINT(_cublasGetErrorString(cublas_ret)); \ + hipblasStatus_t hipblas_ret = call; \ + if( hipblas_ret != HIPBLAS_STATUS_SUCCESS ) { \ + BF_DEBUG_PRINT(_hipblasGetErrorString(hipblas_ret)); \ } \ - BF_ASSERT(cublas_ret == CUBLAS_STATUS_SUCCESS, \ - bifrost_status(cublas_ret)); \ + BF_ASSERT(hipblas_ret == HIPBLAS_STATUS_SUCCESS, \ + bifrost_status(hipblas_ret)); \ } while(0) void bf_cherk_N(int N, int K, int nbatch, @@ -98,7 +101,7 @@ void bf_cherk_N(int N, int K, int nbatch, BFdtype C_type, int C_stride, int C_batchstride, - cudaStream_t stream); + hipStream_t stream); void bf_cgemm_TN_smallM(int M, int N, @@ -118,4 +121,4 @@ void bf_cgemm_TN_smallM(int M, BFdtype C_type, int C_stride, int C_batchstride, - cudaStream_t stream); + hipStream_t stream); diff --git a/src/map.cpp b/src/map.cpp index ca6a30cd6..307cd34b9 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -49,8 +49,8 @@ bfMap(3, c.shape, {"dm", "t"}, #include "ObjectCache.hpp" #include "EnvVars.hpp" -#include -#include +#include +#include #include "IndexArray.cuh.jit" #include "ArrayIndexer.cuh" @@ -82,26 +82,26 @@ using std::endl; #define BF_CHECK_NVRTC(call) \ do { \ - nvrtcResult ret = call; \ - if( ret != NVRTC_SUCCESS ) { \ - BF_DEBUG_PRINT(nvrtcGetErrorString(ret)); \ + hiprtcResult ret = call; \ + if( ret != HIPRTC_SUCCESS ) { \ + BF_DEBUG_PRINT(hiprtcGetErrorString(ret)); \ } \ - BF_ASSERT(ret == NVRTC_SUCCESS, \ + BF_ASSERT(ret == HIPRTC_SUCCESS, \ bifrost_status(ret)); \ } while(0) -BFstatus bifrost_status(nvrtcResult status) { +BFstatus bifrost_status(hiprtcResult status) { switch(status) { - case NVRTC_SUCCESS: return BF_STATUS_SUCCESS; - case NVRTC_ERROR_OUT_OF_MEMORY: return BF_STATUS_MEM_ALLOC_FAILED; - case NVRTC_ERROR_PROGRAM_CREATION_FAILURE: return BF_STATUS_INTERNAL_ERROR; - case NVRTC_ERROR_INVALID_INPUT: return BF_STATUS_INTERNAL_ERROR; - case NVRTC_ERROR_INVALID_PROGRAM: return BF_STATUS_INTERNAL_ERROR; - case NVRTC_ERROR_INVALID_OPTION: return BF_STATUS_INTERNAL_ERROR; - case NVRTC_ERROR_COMPILATION: return BF_STATUS_INTERNAL_ERROR; - case NVRTC_ERROR_BUILTIN_OPERATION_FAILURE: return BF_STATUS_INTERNAL_ERROR; + case HIPRTC_SUCCESS: return BF_STATUS_SUCCESS; + case HIPRTC_ERROR_OUT_OF_MEMORY: return BF_STATUS_MEM_ALLOC_FAILED; + case HIPRTC_ERROR_PROGRAM_CREATION_FAILURE: return BF_STATUS_INTERNAL_ERROR; + case HIPRTC_ERROR_INVALID_INPUT: return BF_STATUS_INTERNAL_ERROR; + case HIPRTC_ERROR_INVALID_PROGRAM: return BF_STATUS_INTERNAL_ERROR; + case HIPRTC_ERROR_INVALID_OPTION: return BF_STATUS_INTERNAL_ERROR; + case HIPRTC_ERROR_COMPILATION: return BF_STATUS_INTERNAL_ERROR; + case HIPRTC_ERROR_BUILTIN_OPERATION_FAILURE: return BF_STATUS_INTERNAL_ERROR; #if CUDA_VERSION >= 7500 - case NVRTC_ERROR_INTERNAL_ERROR: return BF_STATUS_DEVICE_ERROR; + case HIPRTC_ERROR_INTERNAL_ERROR: return BF_STATUS_DEVICE_ERROR; #endif default: return BF_STATUS_INTERNAL_ERROR; } @@ -168,6 +168,9 @@ BFstatus build_map_kernel(int* external_ndim, } kernel_name += "map_kernel"; std::stringstream code; + code << "#ifndef __HIPRTC__" << endl; + code << "#define __HIPRTC__ 1" << endl; + code << "#endif" << endl; code << "#include \"Complex.hpp\"" << endl; code << "#include \"Vector.hpp\"" << endl; code << "#include \"ArrayIndexer.cuh\"" << endl; @@ -329,8 +332,8 @@ BFstatus build_map_kernel(int* external_ndim, }; size_t nheader = sizeof(header_codes) / sizeof(const char*); - nvrtcProgram program; - BF_CHECK_NVRTC( nvrtcCreateProgram(&program, + hiprtcProgram program; + BF_CHECK_NVRTC( hiprtcCreateProgram(&program, code.str().c_str(), program_name, nheader, header_codes, header_names) ); @@ -339,9 +342,13 @@ BFstatus build_map_kernel(int* external_ndim, #if defined(BF_MAP_KERNEL_STDCXX) cs_ss << BF_MAP_KERNEL_STDCXX; #else - cs_ss << "c++11"; + cs_ss << "c++17"; #endif options.push_back("--std="+cs_ss.str()); +#ifdef __HIP_PLATFORM_AMD__ + options.push_back("-ffast-math"); +#endif // __HIP_PLATFORM_AMD__ +#ifdef __HIP_PLATFORM_NVIDIA__ options.push_back("--device-as-default-execution-space"); options.push_back("--use_fast_math"); std::stringstream cc_ss; @@ -352,21 +359,22 @@ BFstatus build_map_kernel(int* external_ndim, #endif options.push_back("-arch="+cc_ss.str()); options.push_back("--restrict"); +#endif // __HIP_PLATFORM_NVIDIA__ std::vector options_c; for( int i=0; i<(int)options.size(); ++i ) { options_c.push_back(options[i].c_str()); } - nvrtcResult ret = nvrtcCompileProgram(program, + hiprtcResult ret = hiprtcCompileProgram(program, options_c.size(), &options_c[0]); #if BF_DEBUG_ENABLED size_t logsize; // Note: Includes the trailing NULL - BF_CHECK_NVRTC( nvrtcGetProgramLogSize(program, &logsize) ); + BF_CHECK_NVRTC( hiprtcGetProgramLogSize(program, &logsize) ); if( (logsize > 1 || EnvVars::get("BF_PRINT_MAP_KERNELS", "0") != "0") && !basic_indexing_only ) { std::vector log(logsize, 0); - BF_CHECK_NVRTC( nvrtcGetProgramLog(program, &log[0]) ); + BF_CHECK_NVRTC( hiprtcGetProgramLog(program, &log[0]) ); int i = 1; for( std::string line; std::getline(code, line); ++i ) { std::cout << std::setfill(' ') << std::setw(3) << i << " " << line << endl; @@ -378,24 +386,23 @@ BFstatus build_map_kernel(int* external_ndim, std::cout << "---------------------------------------------------" << std::endl; } #endif // BIFROST_DEBUG - if( ret != NVRTC_SUCCESS ) { + if( ret != HIPRTC_SUCCESS ) { // Note: Don't print debug msg here, failure may not be expected return BF_STATUS_INVALID_ARGUMENT; } size_t ptxsize; - BF_CHECK_NVRTC( nvrtcGetPTXSize(program, &ptxsize) ); + BF_CHECK_NVRTC( hiprtcGetCodeSize(program, &ptxsize) ); std::vector vptx(ptxsize); - char* ptx = &vptx[0]; - BF_CHECK_NVRTC( nvrtcGetPTX(program, &ptx[0]) ); - BF_CHECK_NVRTC( nvrtcDestroyProgram(&program) ); + BF_CHECK_NVRTC( hiprtcGetCode(program, vptx.data()) ); + BF_CHECK_NVRTC( hiprtcDestroyProgram(&program) ); #if BF_DEBUG_ENABLED if( EnvVars::get("BF_PRINT_MAP_KERNELS_PTX", "0") != "0" ) { - std::cout << ptx << std::endl; + std::cout << vptx.data() << std::endl; } #endif - *ptx_string = ptx; - *kernel_name_ptr = kernel_name; + *ptx_string = {vptx.begin(), vptx.end()}; + *kernel_name_ptr = {kernel_name.begin(), kernel_name.end()}; // TODO: Can't do this, because this function may be cached // **Clean this up! //*external_ndim = ndim; @@ -418,8 +425,8 @@ class DiskCacheMgr { void tag_cache(void) { // NOTE: Must be called from within a LockFile lock int rt, drv; - cudaRuntimeGetVersion(&rt); - cudaDriverGetVersion(&drv); + hipRuntimeGetVersion(&rt); + hipDriverGetVersion(&drv); std::ofstream info; @@ -436,8 +443,8 @@ class DiskCacheMgr { // NOTE: Must be called from within a LockFile lock bool status = true; int rt, drv, cached_mc, cached_rt, cached_drv; - cudaRuntimeGetVersion(&rt); - cudaDriverGetVersion(&drv); + hipRuntimeGetVersion(&rt); + hipDriverGetVersion(&drv); std::ifstream info; try { @@ -728,7 +735,7 @@ BFstatus bfMap(int ndim, &ptx, &kernel_name)); } CUDAKernel kernel; - BF_TRY(kernel.set(kernel_name.c_str(), ptx.c_str())); + BF_TRY(kernel.set(kernel_name, ptx)); kernel_cache.insert(cache_key, std::make_pair(kernel, basic_indexing_only)); #if defined(BF_MAP_KERNEL_DISK_CACHE) && BF_MAP_KERNEL_DISK_CACHE @@ -790,7 +797,7 @@ BFstatus bfMap(int ndim, BF_ASSERT(kernel.launch(grid, block, 0, g_cuda_stream, - kernel_args) == CUDA_SUCCESS, + kernel_args) == hipSuccess, BF_STATUS_DEVICE_ERROR); return BF_STATUS_SUCCESS; diff --git a/src/memory.cpp b/src/memory.cpp index 415847802..d9a09a974 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -27,6 +27,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include #include "utils.hpp" @@ -47,11 +48,11 @@ BFstatus bfGetSpace(const void* ptr, BFspace* space) { #if !defined BF_CUDA_ENABLED || !BF_CUDA_ENABLED *space = BF_SPACE_SYSTEM; #else - cudaPointerAttributes ptr_attrs; - cudaError_t ret = cudaPointerGetAttributes(&ptr_attrs, ptr); - BF_ASSERT(ret == cudaSuccess || ret == cudaErrorInvalidValue, + hipPointerAttribute_t ptr_attrs; + hipError_t ret = hipPointerGetAttributes(&ptr_attrs, ptr); + BF_ASSERT(ret == hipSuccess || ret == hipErrorInvalidValue, BF_STATUS_DEVICE_ERROR); - if( ret == cudaErrorInvalidValue ) { + if( ret == hipErrorInvalidValue ) { // TODO: Is there a better way to find out how a pointer was allocated? // Alternatively, is there a way to prevent this from showing // up in cuda-memcheck? @@ -59,13 +60,13 @@ BFstatus bfGetSpace(const void* ptr, BFspace* space) { // CUDA API functions, so if it fails we just assume sysmem. *space = BF_SPACE_SYSTEM; // WAR to avoid the ignored failure showing up later - cudaGetLastError(); + hipGetLastError(); #if defined(CUDA_VERSION) && CUDA_VERSION >= 10000 } else { switch( ptr_attrs.type ) { - case cudaMemoryTypeHost: *space = BF_SPACE_SYSTEM; break; - case cudaMemoryTypeDevice: *space = BF_SPACE_CUDA; break; - case cudaMemoryTypeManaged: *space = BF_SPACE_CUDA_MANAGED; break; + case hipMemoryTypeHost: *space = BF_SPACE_SYSTEM; break; + case hipMemoryTypeDevice: *space = BF_SPACE_CUDA; break; + case hipMemoryTypeManaged: *space = BF_SPACE_CUDA_MANAGED; break; default: { // This should never be reached BF_FAIL("Valid memoryType", BF_STATUS_INTERNAL_ERROR); @@ -77,8 +78,8 @@ BFstatus bfGetSpace(const void* ptr, BFspace* space) { *space = BF_SPACE_CUDA_MANAGED; } else { switch( ptr_attrs.memoryType ) { - case cudaMemoryTypeHost: *space = BF_SPACE_SYSTEM; break; - case cudaMemoryTypeDevice: *space = BF_SPACE_CUDA; break; + case hipMemoryTypeHost: *space = BF_SPACE_SYSTEM; break; + case hipMemoryTypeDevice: *space = BF_SPACE_CUDA; break; default: { // This should never be reached BF_FAIL("Valid memoryType", BF_STATUS_INTERNAL_ERROR); @@ -120,19 +121,19 @@ BFstatus bfMalloc(void** ptr, BFsize size, BFspace space) { } #if defined BF_CUDA_ENABLED && BF_CUDA_ENABLED case BF_SPACE_CUDA: { - BF_CHECK_CUDA(cudaMalloc((void**)&data, size), + BF_CHECK_HIP(hipMalloc((void**)&data, size), BF_STATUS_MEM_ALLOC_FAILED); break; } case BF_SPACE_CUDA_HOST: { - unsigned flags = cudaHostAllocDefault; - BF_CHECK_CUDA(cudaHostAlloc((void**)&data, size, flags), + unsigned flags = hipHostMallocDefault; + BF_CHECK_HIP(hipHostMalloc((void**)&data, size, flags), BF_STATUS_MEM_ALLOC_FAILED); break; } case BF_SPACE_CUDA_MANAGED: { - unsigned flags = cudaMemAttachGlobal; - BF_CHECK_CUDA(cudaMallocManaged((void**)&data, size, flags), + unsigned flags = hipMemAttachGlobal; + BF_CHECK_HIP(hipMallocManaged((void**)&data, size, flags), BF_STATUS_MEM_ALLOC_FAILED); break; } @@ -151,9 +152,9 @@ BFstatus bfFree(void* ptr, BFspace space) { switch( space ) { case BF_SPACE_SYSTEM: ::free(ptr); break; #if defined BF_CUDA_ENABLED && BF_CUDA_ENABLED - case BF_SPACE_CUDA: cudaFree(ptr); break; - case BF_SPACE_CUDA_HOST: cudaFreeHost(ptr); break; - case BF_SPACE_CUDA_MANAGED: cudaFree(ptr); break; + case BF_SPACE_CUDA: hipFree(ptr); break; + case BF_SPACE_CUDA_HOST: hipHostFree(ptr); break; + case BF_SPACE_CUDA_MANAGED: hipFree(ptr); break; #endif default: BF_FAIL("Valid bfFree() space", BF_STATUS_INVALID_ARGUMENT); } @@ -174,16 +175,16 @@ BFstatus bfMemcpy(void* dst, // than using cudaMemcpyDefault. if( src_space == BF_SPACE_AUTO ) bfGetSpace(src, &src_space); if( dst_space == BF_SPACE_AUTO ) bfGetSpace(dst, &dst_space); - cudaMemcpyKind kind = cudaMemcpyDefault; + hipMemcpyKind kind = hipMemcpyDefault; switch( src_space ) { case BF_SPACE_CUDA_HOST: // fall-through case BF_SPACE_SYSTEM: { switch( dst_space ) { case BF_SPACE_CUDA_HOST: // fall-through case BF_SPACE_SYSTEM: ::memcpy(dst, src, count); return BF_STATUS_SUCCESS; - case BF_SPACE_CUDA: kind = cudaMemcpyHostToDevice; break; + case BF_SPACE_CUDA: kind = hipMemcpyHostToDevice; break; // Is this the right thing to do? - case BF_SPACE_CUDA_MANAGED: kind = cudaMemcpyDefault; break; + case BF_SPACE_CUDA_MANAGED: kind = hipMemcpyDefault; break; default: BF_FAIL("Valid bfMemcpy dst space", BF_STATUS_INVALID_ARGUMENT); } break; @@ -191,19 +192,19 @@ BFstatus bfMemcpy(void* dst, case BF_SPACE_CUDA: { switch( dst_space ) { case BF_SPACE_CUDA_HOST: // fall-through - case BF_SPACE_SYSTEM: kind = cudaMemcpyDeviceToHost; break; - case BF_SPACE_CUDA: kind = cudaMemcpyDeviceToDevice; break; - case BF_SPACE_CUDA_MANAGED: kind = cudaMemcpyDefault; break; + case BF_SPACE_SYSTEM: kind = hipMemcpyDeviceToHost; break; + case BF_SPACE_CUDA: kind = hipMemcpyDeviceToDevice; break; + case BF_SPACE_CUDA_MANAGED: kind = hipMemcpyDefault; break; default: BF_FAIL("Valid bfMemcpy dst space", BF_STATUS_INVALID_ARGUMENT); } break; } // Is this the right thing to do? - case BF_SPACE_CUDA_MANAGED: kind = cudaMemcpyDefault; break; + case BF_SPACE_CUDA_MANAGED: kind = hipMemcpyDefault; break; default: BF_FAIL("Valid bfMemcpy src space", BF_STATUS_INVALID_ARGUMENT); } BF_TRACE_STREAM(g_cuda_stream); - BF_CHECK_CUDA(cudaMemcpyAsync(dst, src, count, kind, g_cuda_stream), + BF_CHECK_HIP(hipMemcpyAsync(dst, src, count, kind, g_cuda_stream), BF_STATUS_MEM_OP_FAILED); #endif } @@ -242,16 +243,16 @@ BFstatus bfMemcpy2D(void* dst, // than using cudaMemcpyDefault. if( src_space == BF_SPACE_AUTO ) bfGetSpace(src, &src_space); if( dst_space == BF_SPACE_AUTO ) bfGetSpace(dst, &dst_space); - cudaMemcpyKind kind = cudaMemcpyDefault; + hipMemcpyKind kind = hipMemcpyDefault; switch( src_space ) { case BF_SPACE_CUDA_HOST: // fall-through case BF_SPACE_SYSTEM: { switch( dst_space ) { case BF_SPACE_CUDA_HOST: // fall-through case BF_SPACE_SYSTEM: memcpy2D(dst, dst_stride, src, src_stride, width, height); return BF_STATUS_SUCCESS; - case BF_SPACE_CUDA: kind = cudaMemcpyHostToDevice; break; + case BF_SPACE_CUDA: kind = hipMemcpyHostToDevice; break; // TODO: Is this the right thing to do? - case BF_SPACE_CUDA_MANAGED: kind = cudaMemcpyDefault; break; + case BF_SPACE_CUDA_MANAGED: kind = hipMemcpyDefault; break; default: BF_FAIL("Valid bfMemcpy2D dst space", BF_STATUS_INVALID_ARGUMENT); } break; @@ -259,20 +260,20 @@ BFstatus bfMemcpy2D(void* dst, case BF_SPACE_CUDA: { switch( dst_space ) { case BF_SPACE_CUDA_HOST: // fall-through - case BF_SPACE_SYSTEM: kind = cudaMemcpyDeviceToHost; break; - case BF_SPACE_CUDA: kind = cudaMemcpyDeviceToDevice; break; + case BF_SPACE_SYSTEM: kind = hipMemcpyDeviceToHost; break; + case BF_SPACE_CUDA: kind = hipMemcpyDeviceToDevice; break; // TODO: Is this the right thing to do? - case BF_SPACE_CUDA_MANAGED: kind = cudaMemcpyDefault; break; + case BF_SPACE_CUDA_MANAGED: kind = hipMemcpyDefault; break; default: BF_FAIL("Valid bfMemcpy2D dst space", BF_STATUS_INVALID_ARGUMENT); } break; } // Is this the right thing to do? - case BF_SPACE_CUDA_MANAGED: kind = cudaMemcpyDefault; break; + case BF_SPACE_CUDA_MANAGED: kind = hipMemcpyDefault; break; default: BF_FAIL("Valid bfMemcpy2D src space", BF_STATUS_INVALID_ARGUMENT); } BF_TRACE_STREAM(g_cuda_stream); - BF_CHECK_CUDA(cudaMemcpy2DAsync(dst, dst_stride, + BF_CHECK_HIP(hipMemcpy2DAsync(dst, dst_stride, src, src_stride, width, height, kind, g_cuda_stream), @@ -298,7 +299,7 @@ BFstatus bfMemset(void* ptr, case BF_SPACE_CUDA: // Fall-through case BF_SPACE_CUDA_MANAGED: { BF_TRACE_STREAM(g_cuda_stream); - BF_CHECK_CUDA(cudaMemsetAsync(ptr, value, count, g_cuda_stream), + BF_CHECK_HIP(hipMemsetAsync(ptr, value, count, g_cuda_stream), BF_STATUS_MEM_OP_FAILED); break; } @@ -335,7 +336,7 @@ BFstatus bfMemset2D(void* ptr, case BF_SPACE_CUDA: // Fall-through case BF_SPACE_CUDA_MANAGED: { BF_TRACE_STREAM(g_cuda_stream); - BF_CHECK_CUDA(cudaMemset2DAsync(ptr, stride, value, width, height, g_cuda_stream), + BF_CHECK_HIP(hipMemset2DAsync(ptr, stride, value, width, height, g_cuda_stream), BF_STATUS_MEM_OP_FAILED); break; } diff --git a/src/reduce.cu b/src/reduce.cu index 7fc03d983..fdf4d4a7c 100644 --- a/src/reduce.cu +++ b/src/reduce.cu @@ -32,6 +32,7 @@ // Consider using the beamformer kernel approach of using looped warp // reductions. +#include #include #include "assert.hpp" #include "utils.hpp" @@ -127,7 +128,7 @@ void launch_reduce_vector_kernel(IType const* in, int4 istrides, int4 ostrides, BFreduce_op op, - cudaStream_t stream) { + hipStream_t stream) { dim3 block(128); // TODO: Tune this dim3 grid(std::min((shape.x - 1) / block.x + 1, 65535u), std::min(shape.y, 65535), @@ -140,8 +141,8 @@ void launch_reduce_vector_kernel(IType const* in, &ostrides, &op }; - BF_CHECK_CUDA_EXCEPTION( - cudaLaunchKernel((void*)reduce_vector_kernel, + BF_CHECK_HIP_EXCEPTION( + hipLaunchKernel((void*)reduce_vector_kernel, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); } @@ -218,7 +219,7 @@ void launch_reduce_loop_kernel(IType const* in, int4 istrides, int4 ostrides, BFreduce_op op, - cudaStream_t stream) { + hipStream_t stream) { dim3 block(128); if( istrides.w == 1 && shape.w > 16 ) { // This gives better perf when reducing along the fastest-changing axis @@ -237,8 +238,8 @@ void launch_reduce_loop_kernel(IType const* in, &ostrides, &op }; - BF_CHECK_CUDA_EXCEPTION( - cudaLaunchKernel((void*)reduce_loop_kernel, + BF_CHECK_HIP_EXCEPTION( + hipLaunchKernel((void*)reduce_loop_kernel, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); } @@ -415,7 +416,7 @@ void launch_reduce_complex_standard_vector_kernel(IType const* in, int4 istrides, int4 ostrides, BFreduce_op op, - cudaStream_t stream) { + hipStream_t stream) { dim3 block(128); // TODO: Tune this dim3 grid(std::min((shape.x - 1) / block.x + 1, 65535u), std::min(shape.y, 65535), @@ -428,8 +429,8 @@ void launch_reduce_complex_standard_vector_kernel(IType const* in, &ostrides, &op }; - BF_CHECK_CUDA_EXCEPTION( - cudaLaunchKernel((void*)reduce_complex_standard_vector_kernel, + BF_CHECK_HIP_EXCEPTION( + hipLaunchKernel((void*)reduce_complex_standard_vector_kernel, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); } @@ -490,7 +491,7 @@ void launch_reduce_complex_standard_loop_kernel(IType const* in, int4 istrides, int4 ostrides, BFreduce_op op, - cudaStream_t stream) { + hipStream_t stream) { dim3 block(128); if( istrides.w == 1 && shape.w > 16 ) { // This gives better perf when reducing along the fastest-changing axis @@ -509,8 +510,8 @@ void launch_reduce_complex_standard_loop_kernel(IType const* in, &ostrides, &op }; - BF_CHECK_CUDA_EXCEPTION( - cudaLaunchKernel((void*)reduce_complex_standard_loop_kernel, + BF_CHECK_HIP_EXCEPTION( + hipLaunchKernel((void*)reduce_complex_standard_loop_kernel, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); } @@ -660,7 +661,7 @@ void launch_reduce_complex_power_vector_kernel(IType const* in, int4 istrides, int4 ostrides, BFreduce_op op, - cudaStream_t stream) { + hipStream_t stream) { dim3 block(128); // TODO: Tune this dim3 grid(std::min((shape.x - 1) / block.x + 1, 65535u), std::min(shape.y, 65535), @@ -673,8 +674,8 @@ void launch_reduce_complex_power_vector_kernel(IType const* in, &ostrides, &op }; - BF_CHECK_CUDA_EXCEPTION( - cudaLaunchKernel((void*)reduce_complex_power_vector_kernel, + BF_CHECK_HIP_EXCEPTION( + hipLaunchKernel((void*)reduce_complex_power_vector_kernel, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); } @@ -736,7 +737,7 @@ void launch_reduce_complex_power_loop_kernel(IType const* in, int4 istrides, int4 ostrides, BFreduce_op op, - cudaStream_t stream) { + hipStream_t stream) { dim3 block(128); if( istrides.w == 1 && shape.w > 16 ) { // This gives better perf when reducing along the fastest-changing axis @@ -755,8 +756,8 @@ void launch_reduce_complex_power_loop_kernel(IType const* in, &ostrides, &op }; - BF_CHECK_CUDA_EXCEPTION( - cudaLaunchKernel((void*)reduce_complex_power_loop_kernel, + BF_CHECK_HIP_EXCEPTION( + hipLaunchKernel((void*)reduce_complex_power_loop_kernel, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); } diff --git a/src/ring_impl.cpp b/src/ring_impl.cpp index e0471b7ab..afae74095 100644 --- a/src/ring_impl.cpp +++ b/src/ring_impl.cpp @@ -51,7 +51,7 @@ #include #include -#include +#include #include "cuda.hpp" #if BF_NUMA_ENABLED diff --git a/src/romein.cu b/src/romein.cu index 68d45575d..3a8fe85ce 100644 --- a/src/romein.cu +++ b/src/romein.cu @@ -31,6 +31,8 @@ Implements the Romein convolutional algorithm onto a GPU using CUDA. */ + +#include #include #include #include @@ -262,7 +264,7 @@ inline void launch_romein_kernel(int nbaseline, OutType* kernels, InType* d_in, OutType* d_out, - cudaStream_t stream=0) { + hipStream_t stream=0) { //cout << "LAUNCH for " << nelement << endl; dim3 block(8,1); dim3 grid(nbatch*npol,1); @@ -290,12 +292,12 @@ inline void launch_romein_kernel(int nbaseline, &d_out}; size_t loc_size = 2 * nbaseline * npol * sizeof(int); if(loc_size <= BF_GPU_SHAREDMEM) { - BF_CHECK_CUDA_EXCEPTION(cudaLaunchKernel((void*)romein_kernel_sloc, + BF_CHECK_HIP_EXCEPTION(hipLaunchKernel((void*)romein_kernel_sloc, grid, block, &args[0], 2*nbaseline*npol*sizeof(int), stream), BF_STATUS_INTERNAL_ERROR); } else { - BF_CHECK_CUDA_EXCEPTION(cudaLaunchKernel((void*)romein_kernel, + BF_CHECK_HIP_EXCEPTION(hipLaunchKernel((void*)romein_kernel, grid, block, &args[0], 0, stream), BF_STATUS_INTERNAL_ERROR); @@ -321,7 +323,7 @@ private: IType _nkernels = 0; BFdtype _tkernels = BF_DTYPE_INT_TYPE; void* _kernels = NULL; - cudaStream_t _stream; + hipStream_t _stream; public: BFromein_impl() : _nbaseline(1), _npol(1), _polmajor(true), \ _maxsupport(1), _stream(g_cuda_stream) {} @@ -388,7 +390,7 @@ public: BF_ASSERT_EXCEPTION(out->dtype == BF_DTYPE_CF32 \ || out->dtype == BF_DTYPE_CF64, BF_STATUS_UNSUPPORTED_DTYPE); - BF_CHECK_CUDA_EXCEPTION(cudaGetLastError(), BF_STATUS_INTERNAL_ERROR); + BF_CHECK_HIP_EXCEPTION(hipGetLastError(), BF_STATUS_INTERNAL_ERROR); int nbatch = in->shape[0]; @@ -460,9 +462,9 @@ public: } #undef LAUNCH_ROMEIN_KERNEL - BF_CHECK_CUDA_EXCEPTION(cudaGetLastError(), BF_STATUS_INTERNAL_ERROR); + BF_CHECK_HIP_EXCEPTION(hipGetLastError(), BF_STATUS_INTERNAL_ERROR); } - void set_stream(cudaStream_t stream) { + void set_stream(hipStream_t stream) { _stream = stream; } }; @@ -528,7 +530,7 @@ BFstatus bfRomeinSetStream(BFromein plan, BF_TRACE(); BF_ASSERT(plan, BF_STATUS_INVALID_HANDLE); BF_ASSERT(stream, BF_STATUS_INVALID_POINTER); - BF_TRY_RETURN(plan->set_stream(*(cudaStream_t*)stream)); + BF_TRY_RETURN(plan->set_stream(*(hipStream_t*)stream)); } BFstatus bfRomeinSetPositions(BFromein plan, BFarray const* positions) { diff --git a/src/romein_kernels.cu b/src/romein_kernels.cu index 339f8c023..2d3e16221 100644 --- a/src/romein_kernels.cu +++ b/src/romein_kernels.cu @@ -1,3 +1,5 @@ +#include +#include #include "romein_kernels.cuh" /***************************** @@ -5,12 +7,12 @@ *****************************/ //From Kyrills implementation in SKA/RC -__device__ void scatter_grid_add(cuComplex *uvgrid, +__device__ void scatter_grid_add(hipComplex *uvgrid, int grid_size, int grid_pitch, int grid_point_u, int grid_point_v, - cuComplex sum){ + hipComplex sum){ if (grid_point_u < 0 || grid_point_u >= grid_size || grid_point_v < 0 || grid_point_v >= grid_size) @@ -22,9 +24,9 @@ __device__ void scatter_grid_add(cuComplex *uvgrid, } #ifdef __COUNT_VIS__ -__device__ void scatter_grid_point(cuComplex* fdata, - cuComplex* uvgrid, // Our main UV Grid - cuComplex* illum, //Our W-Kernel +__device__ void scatter_grid_point(hipComplex* fdata, + hipComplex* uvgrid, // Our main UV Grid + hipComplex* illum, //Our W-Kernel int* x, int* y, int* z, @@ -36,9 +38,9 @@ __device__ void scatter_grid_point(cuComplex* fdata, int batch_no, unsigned long long int *visc_reg){ #else -__device__ void scatter_grid_point(cuComplex* fdata, //Our fourier data - cuComplex* uvgrid, // Our main UV Grid - cuComplex* illum, //Our W-Kernel +__device__ void scatter_grid_point(hipComplex* fdata, //Our fourier data + hipComplex* uvgrid, // Our main UV Grid + hipComplex* illum, //Our W-Kernel int* x, // Ant x location data int* y, // Ant y location data int* z, // Ant z location data @@ -51,7 +53,7 @@ __device__ void scatter_grid_point(cuComplex* fdata, //Our fourier data #endif int grid_point_u = myU, grid_point_v = myV; - cuComplex sum = make_cuComplex(0.0,0.0); + hipComplex sum = make_hipComplex(0.0,0.0); short supp = max_supp; int vi_s = batch_no * data_size; int grid_s = grid_size * grid_size * batch_no; @@ -81,17 +83,17 @@ __device__ void scatter_grid_point(cuComplex* fdata, //Our fourier data // Atomically add to grid. This is the bottleneck of this kernel. scatter_grid_add(uvgrid+grid_s, grid_size, grid_size, grid_point_u, grid_point_v, sum); // Switch to new point - sum = make_cuComplex(0.0, 0.0); + sum = make_hipComplex(0.0, 0.0); grid_point_u = myGridU; grid_point_v = myGridV; } //TODO: Re-do the w-kernel/gcf for our data. // cuDoubleComplex px; - cuComplex px = illum[myConvV * supp + myConvU];// ?? + hipComplex px = illum[myConvV * supp + myConvU];// ?? //cuComplex px = *(cuComplex*)&wkern->kern_by_w[w_plane].data[sub_offset + myConvV * supp + myConvU]; // Sum up - cuComplex vi_v = fdata[vi]; - sum = cuCfmaf(cuConjf(px), vi_v, sum); + hipComplex vi_v = fdata[vi]; + sum = hipCfmaf(hipConjf(px), vi_v, sum); } // Add remaining sum to grid @@ -107,9 +109,9 @@ __device__ void scatter_grid_point(cuComplex* fdata, //Our fourier data ******************/ #ifdef __COUNT_VIS__ - __global__ void scatter_grid_kernel(cuComplex* fdata, //Our fourier data - cuComplex* uvgrid, // Our main UV Grid - cuComplex* illum, //Our W-Kernel + __global__ void scatter_grid_kernel(hipComplex* fdata, //Our fourier data + hipComplex* uvgrid, // Our main UV Grid + hipComplex* illum, //Our W-Kernel int* x, // Ant x location data int* y, // Ant y location data int* z, // Ant z location data @@ -118,9 +120,9 @@ __device__ void scatter_grid_point(cuComplex* fdata, //Our fourier data int data_size, unsigned long long int* visc_reg){ #else -__global__ void scatter_grid_kernel(cuComplex* fdata, //Our fourier data - cuComplex* uvgrid, // Our main UV Grid - cuComplex* illum, //Our W-Kernel +__global__ void scatter_grid_kernel(hipComplex* fdata, //Our fourier data + hipComplex* uvgrid, // Our main UV Grid + hipComplex* illum, //Our W-Kernel int* x, // Ant x location data int* y, // Ant y location data int* z, // Ant z location data @@ -143,4 +145,3 @@ __global__ void scatter_grid_kernel(cuComplex* fdata, //Our fourier data #endif } } - diff --git a/src/romein_kernels.cuh b/src/romein_kernels.cuh index c89b09b72..5249ba015 100644 --- a/src/romein_kernels.cuh +++ b/src/romein_kernels.cuh @@ -1,9 +1,8 @@ //CUDA Includes -#include -#include "cuda.h" -#include "cuda_runtime_api.h" +#include +#include "hip/hip_runtime.h" +#include "hip/hip_runtime_api.h" #include "math.h" -#include //Romein Include #include "bifrost/romein.h" @@ -31,9 +30,9 @@ __device__ inline double atomicAdd(double* address, double val) #endif -__global__ void scatter_grid_kernel(cuComplex* fdata, - cuComplex* uvgrid, //Our UV-Grid - cuComplex* illum, // Illumination Pattern +__global__ void scatter_grid_kernel(hipComplex* fdata, + hipComplex* uvgrid, //Our UV-Grid + hipComplex* illum, // Illumination Pattern int* x, int* y, int* z, diff --git a/src/trace.hpp b/src/trace.hpp index 13a127d0a..e4861c5c4 100644 --- a/src/trace.hpp +++ b/src/trace.hpp @@ -31,7 +31,7 @@ #include #include "cuda.hpp" -#if BF_CUDA_ENABLED +#if BF_CUDA_ENABLED && BF_TRACE_ENABLED #include #endif @@ -74,7 +74,7 @@ inline uint32_t get_color(unsigned hash) { } } // namespace profile_detail -#if BF_CUDA_ENABLED +#if BF_CUDA_ENABLED && BF_TRACE_ENABLED namespace nvtx { @@ -116,19 +116,19 @@ extern thread_local TracerStreamMap g_nvtx_streams; } // namespace nvtx -#endif // BF_CUDA_ENABLED +#endif // BF_CUDA_ENABLED && BF_TRACE_ENABLED class ScopedTracer { std::string _name; uint32_t _color; uint32_t _category; -#if BF_CUDA_ENABLED +#if BF_CUDA_ENABLED && BF_TRACE_ENABLED cudaStream_t _stream; #endif // Not copy-assignable ScopedTracer(ScopedTracer const& ); ScopedTracer& operator=(ScopedTracer const& ); -#if BF_CUDA_ENABLED +#if BF_CUDA_ENABLED && BF_TRACE_ENABLED void build_attrs(nvtxEventAttributes_t* attrs) { ::memset(attrs, 0, sizeof(*attrs)); attrs->version = NVTX_VERSION; @@ -141,7 +141,7 @@ class ScopedTracer { } #endif public: -#if BF_CUDA_ENABLED +#if BF_CUDA_ENABLED && BF_TRACE_ENABLED inline ScopedTracer(std::string name, cudaStream_t stream=0) : _name(name), _color(profile_detail::get_color(profile_detail::simple_hash(name.c_str()))), diff --git a/src/transpose.cu b/src/transpose.cu index 67baecfc7..4519ce41d 100644 --- a/src/transpose.cu +++ b/src/transpose.cu @@ -27,6 +27,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include #include @@ -38,7 +39,7 @@ #include "transpose_gpu_kernel.cuh" #include "cuda.hpp" #else - typedef int cudaStream_t; // WAR + typedef int hipStream_t; // WAR #endif #include @@ -71,7 +72,7 @@ BFstatus transpose(int ndim, long const* in_strides, // bytes T * out, long const* out_strides, // bytes - cudaStream_t stream) { + hipStream_t stream) { enum { ELEMENT_SIZE = sizeof(T) }; // TODO: This is currently all tuned for a GTX Titan (sm_35) enum { @@ -150,10 +151,10 @@ BFstatus transpose(int ndim, ELEMENT_SIZE == 8 || ELEMENT_SIZE == 16 ) { // TODO: Doing this here might be a bad idea - cudaDeviceSetSharedMemConfig(cudaSharedMemBankSizeEightByte); + hipDeviceSetSharedMemConfig(hipSharedMemBankSizeEightByte); } else { - cudaDeviceSetSharedMemConfig(cudaSharedMemBankSizeFourByte); + hipDeviceSetSharedMemConfig(hipSharedMemBankSizeFourByte); } if( can_use_int ) { kernel::transpose @@ -218,11 +219,11 @@ BFstatus transpose(int ndim, //outer_depth_istride, //outer_depth_ostride); } - cudaError_t error = cudaGetLastError(); - if( error != cudaSuccess ) { - std::printf("CUDA ERROR: %s\n", cudaGetErrorString(error)); + hipError_t error = hipGetLastError(); + if( error != hipSuccess ) { + std::printf("CUDA ERROR: %s\n", hipGetErrorString(error)); } - BF_ASSERT(error == cudaSuccess, BF_STATUS_INTERNAL_ERROR); + BF_ASSERT(error == hipSuccess, BF_STATUS_INTERNAL_ERROR); #endif /* // TODO: Implement CPU version too @@ -252,7 +253,7 @@ BFstatus transpose(int ndim, long const* in_strides, // bytes T * out, long const* out_strides, // bytes - cudaStream_t stream) { + hipStream_t stream) { unsigned long out_alignment = (unsigned long)out; for( int d=0; d #include "int_fastdiv.h" enum { MAX_NDIM = 8 };