From cadcc868df663836123713c511b62ae54fc64951 Mon Sep 17 00:00:00 2001 From: hxj5 Date: Tue, 7 Sep 2021 17:44:20 +0800 Subject: [PATCH 1/8] add guidance for new release --- new_release.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 new_release.md diff --git a/new_release.md b/new_release.md new file mode 100644 index 0000000..279cbfa --- /dev/null +++ b/new_release.md @@ -0,0 +1,6 @@ +Before releasing a new version (e.g., v100.0.1), +- update CSP_VERSION in src/config.h +- update doc/release.rst +- update doc/manual.rst if needed +- update AC_INIT in configure.ac + From 8ab76facd07a994bc589e8dd34837d8b9d199a2f Mon Sep 17 00:00:00 2001 From: hxj5 Date: Tue, 7 Sep 2021 18:23:36 +0800 Subject: [PATCH 2/8] minor update --- .gitignore | 4 + autom4te.cache/output.0 | 6786 --------------------------------------- autom4te.cache/output.1 | 6786 --------------------------------------- autom4te.cache/requests | 152 - autom4te.cache/traces.0 | 1034 ------ autom4te.cache/traces.1 | 530 --- new_release.md | 10 + 7 files changed, 14 insertions(+), 15288 deletions(-) delete mode 100644 autom4te.cache/output.0 delete mode 100644 autom4te.cache/output.1 delete mode 100644 autom4te.cache/requests delete mode 100644 autom4te.cache/traces.0 delete mode 100644 autom4te.cache/traces.1 diff --git a/.gitignore b/.gitignore index a733e9a..eb851a0 100644 --- a/.gitignore +++ b/.gitignore @@ -108,3 +108,7 @@ venv.bak/ # mypy .mypy_cache/ + +# autotools +autom4te.cache + diff --git a/autom4te.cache/output.0 b/autom4te.cache/output.0 deleted file mode 100644 index f31ea91..0000000 --- a/autom4te.cache/output.0 +++ /dev/null @@ -1,6786 +0,0 @@ -@%:@! /bin/sh -@%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for cellsnp-lite 1.2.1. -@%:@ -@%:@ Report bugs to . -@%:@ -@%:@ -@%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -@%:@ -@%:@ -@%:@ This configure script is free software; the Free Software Foundation -@%:@ gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -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 - case `(set -o) 2>/dev/null` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# 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 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 || - PATH_SEPARATOR=';' - } -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 @%:@(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $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. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in @%:@ (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -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'. -$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="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 - case \`(set -o) 2>/dev/null\` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -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 : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || 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 - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -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 - 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 - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $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_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$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; } -IFS=$as_save_IFS - - - 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 -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in @%:@ (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -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'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - 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 - $as_echo "$0: Please tell bug-autoconf@gnu.org and hxj5@hku.hk about -$0: your system, including any error possibly output before -$0: this message. Then install a modern shell, or manually -$0: run the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -@%:@ as_fn_unset VAR -@%:@ --------------- -@%:@ Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -@%:@ as_fn_set_status STATUS -@%:@ ----------------------- -@%:@ Set @S|@? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} @%:@ as_fn_set_status - -@%:@ as_fn_exit STATUS -@%:@ ----------------- -@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} @%:@ as_fn_exit - -@%:@ as_fn_mkdir_p -@%:@ ------------- -@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} @%:@ as_fn_mkdir_p - -@%:@ as_fn_executable_p FILE -@%:@ ----------------------- -@%:@ Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} @%:@ as_fn_executable_p -@%:@ 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 : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -@%:@ as_fn_arith ARG... -@%:@ ------------------ -@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the -@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments -@%:@ must be portable across @S|@(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] -@%:@ ---------------------------------------- -@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are -@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with STATUS, using 1 if that was 0. -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 - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} @%:@ as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $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 - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in @%:@((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIB@&t@OBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='cellsnp-lite' -PACKAGE_TARNAME='cellsnp-lite' -PACKAGE_VERSION='1.2.1' -PACKAGE_STRING='cellsnp-lite 1.2.1' -PACKAGE_BUGREPORT='hxj5@hku.hk' -PACKAGE_URL='' - -ac_unique_file="src/cellsnp.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#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_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIB@&t@OBJS -EGREP -GREP -CPP -HTSLIB_LIB -HTSLIB_LDFLAGS -HTSLIB_CPPFLAGS -HTSDIR -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_dependency_tracking -with_htslib -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - 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" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - 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" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - 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" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - 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" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures cellsnp-lite 1.2.1 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - @<:@@S|@ac_default_prefix@:>@ - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - @<:@PREFIX@:>@ - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root @<:@DATAROOTDIR/doc/cellsnp-lite@:>@ - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of cellsnp-lite 1.2.1:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-htslib=DIR use the HTSlib installation in DIR - --with-htslib=system use only a system HTSlib installation - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - 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/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -cellsnp-lite configure 1.2.1 -generated by GNU Autoconf 2.69 - -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 - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -@%:@ ac_fn_c_try_compile LINENO -@%:@ -------------------------- -@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 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; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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_compile - -@%:@ ac_fn_c_check_header_compile 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_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $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 : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $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_link LINENO -@%:@ ----------------------- -@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. -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$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\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 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; } && { - 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 : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - 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_link - -@%:@ ac_fn_c_try_cpp LINENO -@%:@ ---------------------- -@%:@ Try to preprocess conftest.@S|@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_check_header_mongrel LINENO HEADER VAR INCLUDES -@%:@ ------------------------------------------------------- -@%:@ 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_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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_c_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_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -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_c_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;} -( $as_echo "## -------------------------- ## -## Report this to hxj5@hku.hk ## -## -------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&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 - { $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_c_check_header_mongrel - -@%:@ ac_fn_c_try_run LINENO -@%:@ ---------------------- -@%:@ Try to link conftest.@S|@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_find_intX_t LINENO BITS VAR -@%:@ ----------------------------------- -@%:@ Finds a signed integer type with width BITS, setting cache variable VAR -@%:@ accordingly. -ac_fn_c_find_intX_t () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $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. - for ac_type in int$2_t 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default - enum { N = $2 / 2 - 1 }; -int -main () -{ -static int test_array @<:@1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default - enum { N = $2 / 2 - 1 }; -int -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))@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - case $ac_type in @%:@( - int$2_t) : - eval "$3=yes" ;; @%:@( - *) : - eval "$3=\$ac_type" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if eval test \"x\$"$3"\" = x"no"; then : - -else - break -fi - done -fi -eval ac_res=\$$3 - { $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 - -@%:@ ac_fn_c_check_type LINENO TYPE VAR INCLUDES -@%:@ ------------------------------------------- -@%:@ Tests whether TYPE exists after having included INCLUDES, setting cache -@%:@ variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $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 () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $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_type - -@%:@ ac_fn_c_find_uintX_t LINENO BITS VAR -@%:@ ------------------------------------ -@%:@ Finds an unsigned integer type with width BITS, setting cache variable VAR -@%:@ accordingly. -ac_fn_c_find_uintX_t () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $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. - for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - case $ac_type in @%:@( - uint$2_t) : - eval "$3=yes" ;; @%:@( - *) : - eval "$3=\$ac_type" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if eval test \"x\$"$3"\" = x"no"; then : - -else - break -fi - done -fi -eval ac_res=\$$3 - { $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_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 - { $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. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - 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 - -#undef $2 - -/* 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 $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $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 -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 cellsnp-lite $as_me 1.2.1, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# 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=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_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) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $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 && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -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 - # 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_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - 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_file1" "$ac_site_file2" -do - 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" \ - || { { $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 -done - -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 - { $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 - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $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) - { $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=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - 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 - { $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 - { $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 - { $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=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $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. ## -## -------------------- ## - -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 - - - -am__api_version='1.13' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; 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 \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$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. - - -# 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 -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# 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. -{ $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 ${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 - 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/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # 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 test $ac_prog = install && - 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 - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - 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" && - 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" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - 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 - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $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. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - 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 -{ $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 -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_prog_STRIP="${ac_tool_prefix}strip" - $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 - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -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 -{ $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 -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_prog_ac_ct_STRIP="strip" - $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 - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $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 - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -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 -{ $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 -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_prog_AWK="$ac_prog" - $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 - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $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=`$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: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -@%:@ Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='cellsnp-lite' - VERSION='1.2.1' - - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -@%:@define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar pax cpio none' - -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - - - - - - - -ac_config_headers="$ac_config_headers conf.h" - - -# modified from github:samtools -# Link: https://github.com/samtools/samtools/blob/develop/m4/ax_with_htslib.m4 -# -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_with_htslib.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_WITH_HTSLIB -# -# DESCRIPTION -# -# This macro checks whether HTSlib is installed -# or nearby, and adds a --with-htslib=DIR option to the configure script -# for specifying the location. It locates either an installation prefix -# (with 'include' and 'lib' subdirectories) or an HTSlib source tree, as -# HTSlib is fast-moving and users may wish to use an in-development tree. -# -# Different checks occur depending on the --with-htslib argument given: -# -# With --with-htslib=DIR, checks whether DIR is a source tree or contains -# a working installation. -# By default, searches for a source tree (with a name matching htslib*) -# within or alongside $srcdir. Produces AC_MSG_ERROR if there are -# several equally-likely candidates. If there are none, checks for -# a working default installation. -# With --with-htslib=system, checks for a working default installation. -# Perfer compling with libhts.a than libhts.so -# -# The following output variables are set by this macro: -# -# HTSDIR Root directory of HTSlib -# HTSLIB_CPPFLAGS Preprocessor flags for compiling with HTSlib -# HTSLIB_LDFLAGS Linker flags for linking with HTSlib -# HTSLIB_LIB HTSLib library file -# -# The following shell variables may be defined: -# -# ax_cv_htslib Set to "yes" if HTSlib was found -# ax_cv_htslib_which Set to "source", "system", "install", or "none" -# ax_cv_htslib_type Set to "static", "shared", or "none" -# ax_cv_htslib_msg Set to for missing or old HTSlib -# -# LICENSE -# -# Copyright (C) 2015,2017 Genome Research Ltd -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 1 - - - - - -# Checks for programs. -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 -{ $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 -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_prog_AWK="$ac_prog" - $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 - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -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 -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 -{ $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 -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_prog_CC="${ac_tool_prefix}gcc" - $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 - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -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 -{ $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 -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_prog_ac_ct_CC="gcc" - $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 - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $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 -else - CC="$ac_cv_prog_CC" -fi - -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 -{ $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 -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_prog_CC="${ac_tool_prefix}cc" - $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 - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -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 -{ $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 - ac_prog_rejected=no -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 - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $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 - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $@%:@ != 0; then - # We chose a different compiler from the bogus one. - # 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+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - 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 -{ $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 -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_prog_CC="$ac_tool_prefix$ac_prog" - $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 - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; 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_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 -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_prog_ac_ct_CC="$ac_prog" - $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 - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $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 - - -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. -$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 - { { 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\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -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. -{ $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.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -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_default") 2>&5 - ac_status=$? - $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, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -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 - -{ { $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_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 -{ $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\"" -$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; }; 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 -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -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 -{ $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 -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_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. -{ $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 - *\"* | *\`* | *\\*) 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; } - if { ac_try='./conftest$ac_cv_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 - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - 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 run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $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 -{ $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 () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -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\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $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 - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $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 -{ $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 -{ $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 () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $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+set} -ac_save_CFLAGS=$CFLAGS -{ $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 - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $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 - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $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. */ -#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; -} - -/* 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]; - -/* 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__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -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 -# 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=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 -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -@%:@ Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - -# Checks for libraries. - -libm_devel=ok - -ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "; -" -if test "x$ac_cv_header_math_h" = xyes; then : - -else - libm_devel=missing -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for log in -lm" >&5 -$as_echo_n "checking for log in -lm... " >&6; } -if ${ac_cv_lib_m_log+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 log (); -int -main () -{ -return log (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_log=yes -else - ac_cv_lib_m_log=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log" >&5 -$as_echo "$ac_cv_lib_m_log" >&6; } -if test "x$ac_cv_lib_m_log" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -else - libm_devel=missing -fi - -if test $libm_devel != ok; then - as_fn_error $? "log() not found -Cellsnp-lite requires a working floating-point math library. - -FAILED. This error must be resolved in order to build cellsnp-lite successfully." "$LINENO" 5 -fi - -zlib_devel=ok -ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "; -" -if test "x$ac_cv_header_zlib_h" = xyes; then : - -else - zlib_devel=missing -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 -$as_echo_n "checking for inflate in -lz... " >&6; } -if ${ac_cv_lib_z_inflate+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 inflate (); -int -main () -{ -return inflate (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_inflate=yes -else - ac_cv_lib_z_inflate=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5 -$as_echo "$ac_cv_lib_z_inflate" >&6; } -if test "x$ac_cv_lib_z_inflate" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBZ 1 -_ACEOF - - LIBS="-lz $LIBS" - -else - zlib_devel=missing -fi - -if test $zlib_devel != ok; then - as_fn_error $? "zlib development files not found - -Cellsnp-lite uses compression routines from the zlib library . -Building HTSlib requires zlib development files to be installed on the build -machine; you may need to ensure a package such as zlib1g-dev (on Debian or -Ubuntu Linux) or zlib-devel (on RPM-based Linux distributions or Cygwin) -is installed. - -FAILED. This error must be resolved in order to build cellsnp-lite successfully." "$LINENO" 5 -fi - -bz2_devel=ok -ac_fn_c_check_header_compile "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "; -" -if test "x$ac_cv_header_bzlib_h" = xyes; then : - -else - bz2_devel=missing -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzBuffToBuffCompress in -lbz2" >&5 -$as_echo_n "checking for BZ2_bzBuffToBuffCompress in -lbz2... " >&6; } -if ${ac_cv_lib_bz2_BZ2_bzBuffToBuffCompress+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbz2 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 BZ2_bzBuffToBuffCompress (); -int -main () -{ -return BZ2_bzBuffToBuffCompress (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_bz2_BZ2_bzBuffToBuffCompress=yes -else - ac_cv_lib_bz2_BZ2_bzBuffToBuffCompress=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzBuffToBuffCompress" >&5 -$as_echo "$ac_cv_lib_bz2_BZ2_bzBuffToBuffCompress" >&6; } -if test "x$ac_cv_lib_bz2_BZ2_bzBuffToBuffCompress" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBBZ2 1 -_ACEOF - - LIBS="-lbz2 $LIBS" - -else - bz2_devel=missing -fi - -if test $bz2_devel != ok; then - as_fn_error $? "libbzip2 development files not found - -The CRAM format may use bzip2 compression, which is implemented in HTSlib -by using compression routines from libbzip2 . -Linking HTSlib requires libbzip2 development files to be installed on the -build machine; you may need to ensure a package such as libbz2-dev (on Debian -or Ubuntu Linux) or bzip2-devel (on RPM-based Linux distributions or Cygwin) -is installed. - -FAILED. Please resolve this error to build cellsnp-lite." "$LINENO" 5 -fi - -lzma_devel=ok -for ac_header in lzma.h -do : - ac_fn_c_check_header_compile "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "; -" -if test "x$ac_cv_header_lzma_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LZMA_H 1 -_ACEOF - -else - lzma_devel=header-missing -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_easy_buffer_encode in -llzma" >&5 -$as_echo_n "checking for lzma_easy_buffer_encode in -llzma... " >&6; } -if ${ac_cv_lib_lzma_lzma_easy_buffer_encode+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llzma $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 lzma_easy_buffer_encode (); -int -main () -{ -return lzma_easy_buffer_encode (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lzma_lzma_easy_buffer_encode=yes -else - ac_cv_lib_lzma_lzma_easy_buffer_encode=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_easy_buffer_encode" >&5 -$as_echo "$ac_cv_lib_lzma_lzma_easy_buffer_encode" >&6; } -if test "x$ac_cv_lib_lzma_lzma_easy_buffer_encode" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBLZMA 1 -_ACEOF - - LIBS="-llzma $LIBS" - -else - lzma_devel=missing -fi - -if test $lzma_devel != ok; then - as_fn_error $? "liblzma development files not found - -The CRAM format may use LZMA2 compression, which is implemented in HTSlib -by using compression routines from liblzma . -Linking HTSlib requires liblzma development files to be installed on the -build machine; you may need to ensure a package such as liblzma-dev (on Debian -or Ubuntu Linux), xz-devel (on RPM-based Linux distributions or Cygwin), or -xz (via Homebrew on macOS) is installed; or build XZ Utils from source. - -FAILED. Please resolve this error to build cellsnp-lite." "$LINENO" 5 -fi - -curl_devel=ok -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_pause in -lcurl" >&5 -$as_echo_n "checking for curl_easy_pause in -lcurl... " >&6; } -if ${ac_cv_lib_curl_curl_easy_pause+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcurl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 curl_easy_pause (); -int -main () -{ -return curl_easy_pause (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_curl_curl_easy_pause=yes -else - ac_cv_lib_curl_curl_easy_pause=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_pause" >&5 -$as_echo "$ac_cv_lib_curl_curl_easy_pause" >&6; } -if test "x$ac_cv_lib_curl_curl_easy_pause" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBCURL 1 -_ACEOF - - LIBS="-lcurl $LIBS" - -else - curl_devel=missing - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_init in -lcurl" >&5 -$as_echo_n "checking for curl_easy_init in -lcurl... " >&6; } -if ${ac_cv_lib_curl_curl_easy_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcurl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 curl_easy_init (); -int -main () -{ -return curl_easy_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_curl_curl_easy_init=yes -else - ac_cv_lib_curl_curl_easy_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_init" >&5 -$as_echo "$ac_cv_lib_curl_curl_easy_init" >&6; } -if test "x$ac_cv_lib_curl_curl_easy_init" = xyes; then : - message="library is too old (7.18+ required)" -else - message="library not found" -fi - -fi - -if test $curl_devel != ok; then - as_fn_error $? "libcurl $message - -Support for HTTPS and other SSL-based URLs requires routines from the libcurl -library . Linking HTSlib requires libcurl -development files to be installed on the build machine; you may need to ensure -a package such as libcurl4-{gnutls,nss,openssl}-dev (on Debian or Ubuntu Linux) -or libcurl-devel (on RPM-based Linux distributions or Cygwin) is installed. - -FAILED. Please resolve this error to build cellsnp-lite." "$LINENO" 5 -fi - -crypto_devel=ok -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC in -lcrypto" >&5 -$as_echo_n "checking for HMAC in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_HMAC+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 HMAC (); -int -main () -{ -return HMAC (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_crypto_HMAC=yes -else - ac_cv_lib_crypto_HMAC=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_HMAC" >&5 -$as_echo "$ac_cv_lib_crypto_HMAC" >&6; } -if test "x$ac_cv_lib_crypto_HMAC" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBCRYPTO 1 -_ACEOF - - LIBS="-lcrypto $LIBS" - -else - crypto_devel=missing -fi - -if test $crypto_devel != ok; then - as_fn_error $? "SSL development files not found - -Support for AWS S3 URLs requires routines from an SSL library. Building -HTSlib with libcurl enabled requires SSL development files to be installed -on the build machine; you may need to ensure a package such as libgnutls-dev, -libnss3-dev, or libssl-dev (on Debian or Ubuntu Linux, corresponding to the -libcurl4-*-dev package installed), or openssl-devel (on RPM-based Linux -distributions or Cygwin) is installed. - -FAILED. Please resolve this error to build cellsnp-lite." "$LINENO" 5 -fi - - -@%:@ Check whether --with-htslib was given. -if test "${with_htslib+set}" = set; then : - withval=$with_htslib; -else - with_htslib=search -fi - - -ax_cv_htslib_type=none - -case $with_htslib in -yes|search) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking location of HTSlib installation" >&5 -$as_echo_n "checking location of HTSlib installation... " >&6; } - case $srcdir in - .) srcp= ;; - *) srcp=$srcdir/ ;; - esac - found= - for dir in ${srcp}htslib* -- ${srcp}../htslib -- ${srcp}../htslib* - do - if test "$dir" = "--"; then - test -n "$found" && break - elif test -f "$dir/libhts.a" || test -f "$dir/libhts.so"; then - found="${found}1" - HTSDIR=$dir - fi - done - if test -z "$found"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none found" >&5 -$as_echo "none found" >&6; } - ax_cv_htslib_which=system - HTSDIR= - elif test "$found" = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HTSDIR" >&5 -$as_echo "$HTSDIR" >&6; } - ax_cv_htslib_which=source - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: several directories found" >&5 -$as_echo "several directories found" >&6; } - as_fn_error $? "use --with-htslib=DIR to select which HTSlib to use" "$LINENO" 5 - fi - ;; -no) ax_cv_htslib_which=none ;; -system) - ax_cv_htslib_which=system - HTSDIR= - ;; -*) - HTSDIR=$with_htslib - if test -f "$HTSDIR/libhts.a" || test -f "$HTSDIR/libhts.so"; then - ax_cv_htslib_which=source - elif test -f "$HTSDIR/lib/libhts.a" || test -f "$HTSDIR/lib/libhts.so"; then - ax_cv_htslib_which=install - else - ax_cv_htslib_which=none - fi - ;; -esac - -case $ax_cv_htslib_which in -source) - HTSLIB_CPPFLAGS="-I$HTSDIR" - HTSLIB_LDFLAGS="-L$HTSDIR" - if test -f "$HTSDIR/libhts.a"; then - ax_cv_htslib_type=static - HTSLIB_LIB=$HTSDIR/libhts.a - else - ax_cv_htslib_type=shared - HTSLIB_LIB="-lhts" - fi - ;; -system) - HTSLIB_CPPFLAGS= - HTSLIB_LDFLAGS= - HTSLIB_LIB="-lhts" - ax_cv_htslib_type=shared - ;; -install) - HTSLIB_CPPFLAGS="-I$HTSDIR/include" - HTSLIB_LDFLAGS="-L$HTSDIR/lib" - if test -f "$HTSDIR/lib/libhts.a"; then - ax_cv_htslib_type=static - HTSLIB_LIB=$HTSDIR/lib/libhts.a - else - ax_cv_htslib_type=shared - HTSLIB_LIB="-lhts" - fi - ;; -none) - ax_cv_htslib=no - ;; -esac - -if test "$ax_cv_htslib" != no; then - ax_saved_CPPFLAGS=$CPPFLAGS - ax_saved_LDFLAGS=$LDFLAGS - CPPFLAGS="$CPPFLAGS $HTSLIB_CPPFLAGS" - LDFLAGS="$LDFLAGS $HTSLIB_LDFLAGS" - ac_fn_c_check_header_compile "$LINENO" "htslib/sam.h" "ac_cv_header_htslib_sam_h" "; -" -if test "x$ac_cv_header_htslib_sam_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sam_hdr_init in -lhts" >&5 -$as_echo_n "checking for sam_hdr_init in -lhts... " >&6; } -if ${ac_cv_lib_hts_sam_hdr_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lhts $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 sam_hdr_init (); -int -main () -{ -return sam_hdr_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_hts_sam_hdr_init=yes -else - ac_cv_lib_hts_sam_hdr_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hts_sam_hdr_init" >&5 -$as_echo "$ac_cv_lib_hts_sam_hdr_init" >&6; } -if test "x$ac_cv_lib_hts_sam_hdr_init" = xyes; then : - ax_cv_htslib=yes -else - ax_cv_htslib=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hts_version in -lhts" >&5 -$as_echo_n "checking for hts_version in -lhts... " >&6; } -if ${ac_cv_lib_hts_hts_version+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lhts $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 hts_version (); -int -main () -{ -return hts_version (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_hts_hts_version=yes -else - ac_cv_lib_hts_hts_version=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hts_hts_version" >&5 -$as_echo "$ac_cv_lib_hts_hts_version" >&6; } -if test "x$ac_cv_lib_hts_hts_version" = xyes; then : - ax_cv_htslib_msg="library is too old (1.10.2+ required)" -else - ax_cv_htslib_msg="library not found" -fi - -fi - -else - ax_cv_htslib=no - ax_cv_htslib_msg="library not found" -fi - - - CPPFLAGS=$ax_saved_CPPFLAGS - LDFLAGS=$ax_saved_LDFLAGS -else - ax_cv_htslib_msg="library not found" -fi - - - - - - - -if test "$ax_cv_htslib" != yes; then - as_fn_error $? "HTSlib $ax_cv_htslib_msg - -Cellsnp-lite uses HTSlib to parse bioinformatics file formats etc. Building it -requires a previously-installed HTSlib. You may need to configure ---with-htslib=DIR to locate the appropriate HTSlib. - -FAILED. You must supply an HTSlib in order to build cellsnp-lite successfully." "$LINENO" 5 -fi - -# Checks for header files. -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 - # 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 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 - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - 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" - 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 -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $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" - $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 - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $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" - - -{ $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 - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - 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" - 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 -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $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" - $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 - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $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" - - -{ $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 - -fi - -# 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 - -done - - -for ac_header in stdlib.h string.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$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 - -done - - -# Checks for typedefs, structures, and compiler characteristics. -{ $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 () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $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) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" -case $ac_cv_c_int32_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<_ACEOF -@%:@define int32_t $ac_cv_c_int32_t -_ACEOF -;; -esac - -ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" -case $ac_cv_c_int8_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<_ACEOF -@%:@define int8_t $ac_cv_c_int8_t -_ACEOF -;; -esac - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -@%:@define size_t unsigned int -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -@%:@define ssize_t int -_ACEOF - -fi - -ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" -case $ac_cv_c_uint32_t in #( - no|yes) ;; #( - *) - -$as_echo "@%:@define _UINT32_T 1" >>confdefs.h - - -cat >>confdefs.h <<_ACEOF -@%:@define uint32_t $ac_cv_c_uint32_t -_ACEOF -;; - esac - -ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" -case $ac_cv_c_uint8_t in #( - no|yes) ;; #( - *) - -$as_echo "@%:@define _UINT8_T 1" >>confdefs.h - - -cat >>confdefs.h <<_ACEOF -@%:@define uint8_t $ac_cv_c_uint8_t -_ACEOF -;; - esac - - -# Checks for library functions. -for ac_header in stdlib.h -do : - ac_fn_c_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. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif - -int -main () -{ -return ! malloc (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_malloc_0_nonnull=yes -else - ac_cv_func_malloc_0_nonnull=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 -{ $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 : - -$as_echo "@%:@define HAVE_MALLOC 1" >>confdefs.h - -else - $as_echo "@%:@define HAVE_MALLOC 0" >>confdefs.h - - case " $LIB@&t@OBJS " in - *" malloc.$ac_objext "* ) ;; - *) LIB@&t@OBJS="$LIB@&t@OBJS malloc.$ac_objext" - ;; -esac - - -$as_echo "@%:@define malloc rpl_malloc" >>confdefs.h - -fi - - -for ac_header in stdlib.h -do : - ac_fn_c_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 realloc" >&5 -$as_echo_n "checking for GNU libc compatible realloc... " >&6; } -if ${ac_cv_func_realloc_0_nonnull+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_realloc_0_nonnull=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *realloc (); -#endif - -int -main () -{ -return ! realloc (0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_realloc_0_nonnull=yes -else - ac_cv_func_realloc_0_nonnull=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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } -if test $ac_cv_func_realloc_0_nonnull = yes; then : - -$as_echo "@%:@define HAVE_REALLOC 1" >>confdefs.h - -else - $as_echo "@%:@define HAVE_REALLOC 0" >>confdefs.h - - case " $LIB@&t@OBJS " in - *" realloc.$ac_objext "* ) ;; - *) LIB@&t@OBJS="$LIB@&t@OBJS realloc.$ac_objext" - ;; -esac - - -$as_echo "@%:@define realloc rpl_realloc" >>confdefs.h - -fi - - -for ac_func in memset mkdir pow strdup -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -ac_config_files="$ac_config_files Makefile" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_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) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - 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 - { $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 - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $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 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIB@&t@OBJS; 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=`$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" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIB@&t@OBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $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 -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -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 - case `(set -o) 2>/dev/null` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# 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 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 || - PATH_SEPARATOR=';' - } -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 @%:@(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $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] -@%:@ ---------------------------------------- -@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are -@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with STATUS, using 1 if that was 0. -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 - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} @%:@ as_fn_error - - -@%:@ as_fn_set_status STATUS -@%:@ ----------------------- -@%:@ Set @S|@? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} @%:@ as_fn_set_status - -@%:@ as_fn_exit STATUS -@%:@ ----------------- -@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} @%:@ as_fn_exit - -@%:@ as_fn_unset VAR -@%:@ --------------- -@%:@ Portably unset VAR. -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 : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -@%:@ as_fn_arith ARG... -@%:@ ------------------ -@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the -@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments -@%:@ must be portable across @S|@(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in @%:@((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -@%:@ as_fn_mkdir_p -@%:@ ------------- -@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} @%:@ as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -@%:@ as_fn_executable_p FILE -@%:@ ----------------------- -@%:@ Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} @%:@ as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by cellsnp-lite $as_me 1.2.1, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -cellsnp-lite config.status 1.2.1 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -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." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $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=`$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;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -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 - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX -@%:@@%:@ Running $as_me. @%:@@%:@ -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "conf.h") CONFIG_HEADERS="$CONFIG_HEADERS conf.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# 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+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $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=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - 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/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $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=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -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"; } && - { $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 -$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" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $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 - - diff --git a/autom4te.cache/output.1 b/autom4te.cache/output.1 deleted file mode 100644 index f31ea91..0000000 --- a/autom4te.cache/output.1 +++ /dev/null @@ -1,6786 +0,0 @@ -@%:@! /bin/sh -@%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for cellsnp-lite 1.2.1. -@%:@ -@%:@ Report bugs to . -@%:@ -@%:@ -@%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -@%:@ -@%:@ -@%:@ This configure script is free software; the Free Software Foundation -@%:@ gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -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 - case `(set -o) 2>/dev/null` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# 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 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 || - PATH_SEPARATOR=';' - } -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 @%:@(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $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. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in @%:@ (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -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'. -$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="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 - case \`(set -o) 2>/dev/null\` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -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 : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || 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 - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -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 - 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 - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $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_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$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; } -IFS=$as_save_IFS - - - 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 -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in @%:@ (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -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'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - 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 - $as_echo "$0: Please tell bug-autoconf@gnu.org and hxj5@hku.hk about -$0: your system, including any error possibly output before -$0: this message. Then install a modern shell, or manually -$0: run the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -@%:@ as_fn_unset VAR -@%:@ --------------- -@%:@ Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -@%:@ as_fn_set_status STATUS -@%:@ ----------------------- -@%:@ Set @S|@? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} @%:@ as_fn_set_status - -@%:@ as_fn_exit STATUS -@%:@ ----------------- -@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} @%:@ as_fn_exit - -@%:@ as_fn_mkdir_p -@%:@ ------------- -@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} @%:@ as_fn_mkdir_p - -@%:@ as_fn_executable_p FILE -@%:@ ----------------------- -@%:@ Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} @%:@ as_fn_executable_p -@%:@ 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 : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -@%:@ as_fn_arith ARG... -@%:@ ------------------ -@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the -@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments -@%:@ must be portable across @S|@(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] -@%:@ ---------------------------------------- -@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are -@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with STATUS, using 1 if that was 0. -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 - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} @%:@ as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $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 - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in @%:@((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIB@&t@OBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='cellsnp-lite' -PACKAGE_TARNAME='cellsnp-lite' -PACKAGE_VERSION='1.2.1' -PACKAGE_STRING='cellsnp-lite 1.2.1' -PACKAGE_BUGREPORT='hxj5@hku.hk' -PACKAGE_URL='' - -ac_unique_file="src/cellsnp.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#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_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIB@&t@OBJS -EGREP -GREP -CPP -HTSLIB_LIB -HTSLIB_LDFLAGS -HTSLIB_CPPFLAGS -HTSDIR -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_dependency_tracking -with_htslib -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - 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" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - 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" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - 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" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - 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" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures cellsnp-lite 1.2.1 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - @<:@@S|@ac_default_prefix@:>@ - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - @<:@PREFIX@:>@ - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root @<:@DATAROOTDIR/doc/cellsnp-lite@:>@ - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of cellsnp-lite 1.2.1:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-htslib=DIR use the HTSlib installation in DIR - --with-htslib=system use only a system HTSlib installation - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - 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/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -cellsnp-lite configure 1.2.1 -generated by GNU Autoconf 2.69 - -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 - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -@%:@ ac_fn_c_try_compile LINENO -@%:@ -------------------------- -@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 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; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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_compile - -@%:@ ac_fn_c_check_header_compile 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_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $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 : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $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_link LINENO -@%:@ ----------------------- -@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. -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$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\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 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; } && { - 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 : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - 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_link - -@%:@ ac_fn_c_try_cpp LINENO -@%:@ ---------------------- -@%:@ Try to preprocess conftest.@S|@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_check_header_mongrel LINENO HEADER VAR INCLUDES -@%:@ ------------------------------------------------------- -@%:@ 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_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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_c_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_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -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_c_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;} -( $as_echo "## -------------------------- ## -## Report this to hxj5@hku.hk ## -## -------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&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 - { $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_c_check_header_mongrel - -@%:@ ac_fn_c_try_run LINENO -@%:@ ---------------------- -@%:@ Try to link conftest.@S|@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_find_intX_t LINENO BITS VAR -@%:@ ----------------------------------- -@%:@ Finds a signed integer type with width BITS, setting cache variable VAR -@%:@ accordingly. -ac_fn_c_find_intX_t () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $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. - for ac_type in int$2_t 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default - enum { N = $2 / 2 - 1 }; -int -main () -{ -static int test_array @<:@1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default - enum { N = $2 / 2 - 1 }; -int -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))@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - case $ac_type in @%:@( - int$2_t) : - eval "$3=yes" ;; @%:@( - *) : - eval "$3=\$ac_type" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if eval test \"x\$"$3"\" = x"no"; then : - -else - break -fi - done -fi -eval ac_res=\$$3 - { $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 - -@%:@ ac_fn_c_check_type LINENO TYPE VAR INCLUDES -@%:@ ------------------------------------------- -@%:@ Tests whether TYPE exists after having included INCLUDES, setting cache -@%:@ variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $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 () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $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_type - -@%:@ ac_fn_c_find_uintX_t LINENO BITS VAR -@%:@ ------------------------------------ -@%:@ Finds an unsigned integer type with width BITS, setting cache variable VAR -@%:@ accordingly. -ac_fn_c_find_uintX_t () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $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. - for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array @<:@1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - case $ac_type in @%:@( - uint$2_t) : - eval "$3=yes" ;; @%:@( - *) : - eval "$3=\$ac_type" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if eval test \"x\$"$3"\" = x"no"; then : - -else - break -fi - done -fi -eval ac_res=\$$3 - { $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_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 - { $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. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - 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 - -#undef $2 - -/* 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 $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $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 -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 cellsnp-lite $as_me 1.2.1, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# 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=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_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) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $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 && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -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 - # 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_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - 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_file1" "$ac_site_file2" -do - 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" \ - || { { $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 -done - -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 - { $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 - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $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) - { $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=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - 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 - { $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 - { $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 - { $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=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $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. ## -## -------------------- ## - -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 - - - -am__api_version='1.13' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; 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 \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$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. - - -# 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 -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# 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. -{ $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 ${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 - 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/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # 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 test $ac_prog = install && - 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 - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - 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" && - 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" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - 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 - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $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. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - 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 -{ $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 -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_prog_STRIP="${ac_tool_prefix}strip" - $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 - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -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 -{ $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 -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_prog_ac_ct_STRIP="strip" - $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 - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $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 - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -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 -{ $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 -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_prog_AWK="$ac_prog" - $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 - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $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=`$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: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -@%:@ Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='cellsnp-lite' - VERSION='1.2.1' - - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -@%:@define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar pax cpio none' - -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - - - - - - - -ac_config_headers="$ac_config_headers conf.h" - - -# modified from github:samtools -# Link: https://github.com/samtools/samtools/blob/develop/m4/ax_with_htslib.m4 -# -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_with_htslib.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_WITH_HTSLIB -# -# DESCRIPTION -# -# This macro checks whether HTSlib is installed -# or nearby, and adds a --with-htslib=DIR option to the configure script -# for specifying the location. It locates either an installation prefix -# (with 'include' and 'lib' subdirectories) or an HTSlib source tree, as -# HTSlib is fast-moving and users may wish to use an in-development tree. -# -# Different checks occur depending on the --with-htslib argument given: -# -# With --with-htslib=DIR, checks whether DIR is a source tree or contains -# a working installation. -# By default, searches for a source tree (with a name matching htslib*) -# within or alongside $srcdir. Produces AC_MSG_ERROR if there are -# several equally-likely candidates. If there are none, checks for -# a working default installation. -# With --with-htslib=system, checks for a working default installation. -# Perfer compling with libhts.a than libhts.so -# -# The following output variables are set by this macro: -# -# HTSDIR Root directory of HTSlib -# HTSLIB_CPPFLAGS Preprocessor flags for compiling with HTSlib -# HTSLIB_LDFLAGS Linker flags for linking with HTSlib -# HTSLIB_LIB HTSLib library file -# -# The following shell variables may be defined: -# -# ax_cv_htslib Set to "yes" if HTSlib was found -# ax_cv_htslib_which Set to "source", "system", "install", or "none" -# ax_cv_htslib_type Set to "static", "shared", or "none" -# ax_cv_htslib_msg Set to for missing or old HTSlib -# -# LICENSE -# -# Copyright (C) 2015,2017 Genome Research Ltd -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 1 - - - - - -# Checks for programs. -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 -{ $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 -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_prog_AWK="$ac_prog" - $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 - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -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 -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 -{ $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 -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_prog_CC="${ac_tool_prefix}gcc" - $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 - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -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 -{ $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 -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_prog_ac_ct_CC="gcc" - $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 - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $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 -else - CC="$ac_cv_prog_CC" -fi - -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 -{ $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 -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_prog_CC="${ac_tool_prefix}cc" - $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 - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -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 -{ $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 - ac_prog_rejected=no -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 - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $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 - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $@%:@ != 0; then - # We chose a different compiler from the bogus one. - # 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+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - 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 -{ $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 -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_prog_CC="$ac_tool_prefix$ac_prog" - $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 - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; 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_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 -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_prog_ac_ct_CC="$ac_prog" - $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 - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $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 - - -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. -$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 - { { 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\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -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. -{ $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.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -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_default") 2>&5 - ac_status=$? - $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, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -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 - -{ { $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_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 -{ $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\"" -$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; }; 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 -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -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 -{ $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 -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_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. -{ $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 - *\"* | *\`* | *\\*) 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; } - if { ac_try='./conftest$ac_cv_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 - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - 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 run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $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 -{ $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 () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -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\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $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 - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $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 -{ $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 -{ $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 () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $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+set} -ac_save_CFLAGS=$CFLAGS -{ $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 - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $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 - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $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. */ -#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; -} - -/* 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]; - -/* 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__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -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 -# 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=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 -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -@%:@ Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - -# Checks for libraries. - -libm_devel=ok - -ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "; -" -if test "x$ac_cv_header_math_h" = xyes; then : - -else - libm_devel=missing -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for log in -lm" >&5 -$as_echo_n "checking for log in -lm... " >&6; } -if ${ac_cv_lib_m_log+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 log (); -int -main () -{ -return log (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_log=yes -else - ac_cv_lib_m_log=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log" >&5 -$as_echo "$ac_cv_lib_m_log" >&6; } -if test "x$ac_cv_lib_m_log" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -else - libm_devel=missing -fi - -if test $libm_devel != ok; then - as_fn_error $? "log() not found -Cellsnp-lite requires a working floating-point math library. - -FAILED. This error must be resolved in order to build cellsnp-lite successfully." "$LINENO" 5 -fi - -zlib_devel=ok -ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "; -" -if test "x$ac_cv_header_zlib_h" = xyes; then : - -else - zlib_devel=missing -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 -$as_echo_n "checking for inflate in -lz... " >&6; } -if ${ac_cv_lib_z_inflate+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 inflate (); -int -main () -{ -return inflate (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_inflate=yes -else - ac_cv_lib_z_inflate=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5 -$as_echo "$ac_cv_lib_z_inflate" >&6; } -if test "x$ac_cv_lib_z_inflate" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBZ 1 -_ACEOF - - LIBS="-lz $LIBS" - -else - zlib_devel=missing -fi - -if test $zlib_devel != ok; then - as_fn_error $? "zlib development files not found - -Cellsnp-lite uses compression routines from the zlib library . -Building HTSlib requires zlib development files to be installed on the build -machine; you may need to ensure a package such as zlib1g-dev (on Debian or -Ubuntu Linux) or zlib-devel (on RPM-based Linux distributions or Cygwin) -is installed. - -FAILED. This error must be resolved in order to build cellsnp-lite successfully." "$LINENO" 5 -fi - -bz2_devel=ok -ac_fn_c_check_header_compile "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "; -" -if test "x$ac_cv_header_bzlib_h" = xyes; then : - -else - bz2_devel=missing -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzBuffToBuffCompress in -lbz2" >&5 -$as_echo_n "checking for BZ2_bzBuffToBuffCompress in -lbz2... " >&6; } -if ${ac_cv_lib_bz2_BZ2_bzBuffToBuffCompress+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbz2 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 BZ2_bzBuffToBuffCompress (); -int -main () -{ -return BZ2_bzBuffToBuffCompress (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_bz2_BZ2_bzBuffToBuffCompress=yes -else - ac_cv_lib_bz2_BZ2_bzBuffToBuffCompress=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzBuffToBuffCompress" >&5 -$as_echo "$ac_cv_lib_bz2_BZ2_bzBuffToBuffCompress" >&6; } -if test "x$ac_cv_lib_bz2_BZ2_bzBuffToBuffCompress" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBBZ2 1 -_ACEOF - - LIBS="-lbz2 $LIBS" - -else - bz2_devel=missing -fi - -if test $bz2_devel != ok; then - as_fn_error $? "libbzip2 development files not found - -The CRAM format may use bzip2 compression, which is implemented in HTSlib -by using compression routines from libbzip2 . -Linking HTSlib requires libbzip2 development files to be installed on the -build machine; you may need to ensure a package such as libbz2-dev (on Debian -or Ubuntu Linux) or bzip2-devel (on RPM-based Linux distributions or Cygwin) -is installed. - -FAILED. Please resolve this error to build cellsnp-lite." "$LINENO" 5 -fi - -lzma_devel=ok -for ac_header in lzma.h -do : - ac_fn_c_check_header_compile "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "; -" -if test "x$ac_cv_header_lzma_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LZMA_H 1 -_ACEOF - -else - lzma_devel=header-missing -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_easy_buffer_encode in -llzma" >&5 -$as_echo_n "checking for lzma_easy_buffer_encode in -llzma... " >&6; } -if ${ac_cv_lib_lzma_lzma_easy_buffer_encode+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llzma $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 lzma_easy_buffer_encode (); -int -main () -{ -return lzma_easy_buffer_encode (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lzma_lzma_easy_buffer_encode=yes -else - ac_cv_lib_lzma_lzma_easy_buffer_encode=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_easy_buffer_encode" >&5 -$as_echo "$ac_cv_lib_lzma_lzma_easy_buffer_encode" >&6; } -if test "x$ac_cv_lib_lzma_lzma_easy_buffer_encode" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBLZMA 1 -_ACEOF - - LIBS="-llzma $LIBS" - -else - lzma_devel=missing -fi - -if test $lzma_devel != ok; then - as_fn_error $? "liblzma development files not found - -The CRAM format may use LZMA2 compression, which is implemented in HTSlib -by using compression routines from liblzma . -Linking HTSlib requires liblzma development files to be installed on the -build machine; you may need to ensure a package such as liblzma-dev (on Debian -or Ubuntu Linux), xz-devel (on RPM-based Linux distributions or Cygwin), or -xz (via Homebrew on macOS) is installed; or build XZ Utils from source. - -FAILED. Please resolve this error to build cellsnp-lite." "$LINENO" 5 -fi - -curl_devel=ok -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_pause in -lcurl" >&5 -$as_echo_n "checking for curl_easy_pause in -lcurl... " >&6; } -if ${ac_cv_lib_curl_curl_easy_pause+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcurl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 curl_easy_pause (); -int -main () -{ -return curl_easy_pause (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_curl_curl_easy_pause=yes -else - ac_cv_lib_curl_curl_easy_pause=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_pause" >&5 -$as_echo "$ac_cv_lib_curl_curl_easy_pause" >&6; } -if test "x$ac_cv_lib_curl_curl_easy_pause" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBCURL 1 -_ACEOF - - LIBS="-lcurl $LIBS" - -else - curl_devel=missing - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_init in -lcurl" >&5 -$as_echo_n "checking for curl_easy_init in -lcurl... " >&6; } -if ${ac_cv_lib_curl_curl_easy_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcurl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 curl_easy_init (); -int -main () -{ -return curl_easy_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_curl_curl_easy_init=yes -else - ac_cv_lib_curl_curl_easy_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_init" >&5 -$as_echo "$ac_cv_lib_curl_curl_easy_init" >&6; } -if test "x$ac_cv_lib_curl_curl_easy_init" = xyes; then : - message="library is too old (7.18+ required)" -else - message="library not found" -fi - -fi - -if test $curl_devel != ok; then - as_fn_error $? "libcurl $message - -Support for HTTPS and other SSL-based URLs requires routines from the libcurl -library . Linking HTSlib requires libcurl -development files to be installed on the build machine; you may need to ensure -a package such as libcurl4-{gnutls,nss,openssl}-dev (on Debian or Ubuntu Linux) -or libcurl-devel (on RPM-based Linux distributions or Cygwin) is installed. - -FAILED. Please resolve this error to build cellsnp-lite." "$LINENO" 5 -fi - -crypto_devel=ok -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC in -lcrypto" >&5 -$as_echo_n "checking for HMAC in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_HMAC+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 HMAC (); -int -main () -{ -return HMAC (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_crypto_HMAC=yes -else - ac_cv_lib_crypto_HMAC=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_HMAC" >&5 -$as_echo "$ac_cv_lib_crypto_HMAC" >&6; } -if test "x$ac_cv_lib_crypto_HMAC" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBCRYPTO 1 -_ACEOF - - LIBS="-lcrypto $LIBS" - -else - crypto_devel=missing -fi - -if test $crypto_devel != ok; then - as_fn_error $? "SSL development files not found - -Support for AWS S3 URLs requires routines from an SSL library. Building -HTSlib with libcurl enabled requires SSL development files to be installed -on the build machine; you may need to ensure a package such as libgnutls-dev, -libnss3-dev, or libssl-dev (on Debian or Ubuntu Linux, corresponding to the -libcurl4-*-dev package installed), or openssl-devel (on RPM-based Linux -distributions or Cygwin) is installed. - -FAILED. Please resolve this error to build cellsnp-lite." "$LINENO" 5 -fi - - -@%:@ Check whether --with-htslib was given. -if test "${with_htslib+set}" = set; then : - withval=$with_htslib; -else - with_htslib=search -fi - - -ax_cv_htslib_type=none - -case $with_htslib in -yes|search) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking location of HTSlib installation" >&5 -$as_echo_n "checking location of HTSlib installation... " >&6; } - case $srcdir in - .) srcp= ;; - *) srcp=$srcdir/ ;; - esac - found= - for dir in ${srcp}htslib* -- ${srcp}../htslib -- ${srcp}../htslib* - do - if test "$dir" = "--"; then - test -n "$found" && break - elif test -f "$dir/libhts.a" || test -f "$dir/libhts.so"; then - found="${found}1" - HTSDIR=$dir - fi - done - if test -z "$found"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none found" >&5 -$as_echo "none found" >&6; } - ax_cv_htslib_which=system - HTSDIR= - elif test "$found" = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HTSDIR" >&5 -$as_echo "$HTSDIR" >&6; } - ax_cv_htslib_which=source - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: several directories found" >&5 -$as_echo "several directories found" >&6; } - as_fn_error $? "use --with-htslib=DIR to select which HTSlib to use" "$LINENO" 5 - fi - ;; -no) ax_cv_htslib_which=none ;; -system) - ax_cv_htslib_which=system - HTSDIR= - ;; -*) - HTSDIR=$with_htslib - if test -f "$HTSDIR/libhts.a" || test -f "$HTSDIR/libhts.so"; then - ax_cv_htslib_which=source - elif test -f "$HTSDIR/lib/libhts.a" || test -f "$HTSDIR/lib/libhts.so"; then - ax_cv_htslib_which=install - else - ax_cv_htslib_which=none - fi - ;; -esac - -case $ax_cv_htslib_which in -source) - HTSLIB_CPPFLAGS="-I$HTSDIR" - HTSLIB_LDFLAGS="-L$HTSDIR" - if test -f "$HTSDIR/libhts.a"; then - ax_cv_htslib_type=static - HTSLIB_LIB=$HTSDIR/libhts.a - else - ax_cv_htslib_type=shared - HTSLIB_LIB="-lhts" - fi - ;; -system) - HTSLIB_CPPFLAGS= - HTSLIB_LDFLAGS= - HTSLIB_LIB="-lhts" - ax_cv_htslib_type=shared - ;; -install) - HTSLIB_CPPFLAGS="-I$HTSDIR/include" - HTSLIB_LDFLAGS="-L$HTSDIR/lib" - if test -f "$HTSDIR/lib/libhts.a"; then - ax_cv_htslib_type=static - HTSLIB_LIB=$HTSDIR/lib/libhts.a - else - ax_cv_htslib_type=shared - HTSLIB_LIB="-lhts" - fi - ;; -none) - ax_cv_htslib=no - ;; -esac - -if test "$ax_cv_htslib" != no; then - ax_saved_CPPFLAGS=$CPPFLAGS - ax_saved_LDFLAGS=$LDFLAGS - CPPFLAGS="$CPPFLAGS $HTSLIB_CPPFLAGS" - LDFLAGS="$LDFLAGS $HTSLIB_LDFLAGS" - ac_fn_c_check_header_compile "$LINENO" "htslib/sam.h" "ac_cv_header_htslib_sam_h" "; -" -if test "x$ac_cv_header_htslib_sam_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sam_hdr_init in -lhts" >&5 -$as_echo_n "checking for sam_hdr_init in -lhts... " >&6; } -if ${ac_cv_lib_hts_sam_hdr_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lhts $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 sam_hdr_init (); -int -main () -{ -return sam_hdr_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_hts_sam_hdr_init=yes -else - ac_cv_lib_hts_sam_hdr_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hts_sam_hdr_init" >&5 -$as_echo "$ac_cv_lib_hts_sam_hdr_init" >&6; } -if test "x$ac_cv_lib_hts_sam_hdr_init" = xyes; then : - ax_cv_htslib=yes -else - ax_cv_htslib=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hts_version in -lhts" >&5 -$as_echo_n "checking for hts_version in -lhts... " >&6; } -if ${ac_cv_lib_hts_hts_version+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lhts $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 hts_version (); -int -main () -{ -return hts_version (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_hts_hts_version=yes -else - ac_cv_lib_hts_hts_version=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hts_hts_version" >&5 -$as_echo "$ac_cv_lib_hts_hts_version" >&6; } -if test "x$ac_cv_lib_hts_hts_version" = xyes; then : - ax_cv_htslib_msg="library is too old (1.10.2+ required)" -else - ax_cv_htslib_msg="library not found" -fi - -fi - -else - ax_cv_htslib=no - ax_cv_htslib_msg="library not found" -fi - - - CPPFLAGS=$ax_saved_CPPFLAGS - LDFLAGS=$ax_saved_LDFLAGS -else - ax_cv_htslib_msg="library not found" -fi - - - - - - - -if test "$ax_cv_htslib" != yes; then - as_fn_error $? "HTSlib $ax_cv_htslib_msg - -Cellsnp-lite uses HTSlib to parse bioinformatics file formats etc. Building it -requires a previously-installed HTSlib. You may need to configure ---with-htslib=DIR to locate the appropriate HTSlib. - -FAILED. You must supply an HTSlib in order to build cellsnp-lite successfully." "$LINENO" 5 -fi - -# Checks for header files. -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 - # 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 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 - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - 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" - 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 -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $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" - $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 - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $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" - - -{ $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 - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - 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" - 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 -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $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" - $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 - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $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" - - -{ $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 - -fi - -# 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 - -done - - -for ac_header in stdlib.h string.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$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 - -done - - -# Checks for typedefs, structures, and compiler characteristics. -{ $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 () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $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) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" -case $ac_cv_c_int32_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<_ACEOF -@%:@define int32_t $ac_cv_c_int32_t -_ACEOF -;; -esac - -ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" -case $ac_cv_c_int8_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<_ACEOF -@%:@define int8_t $ac_cv_c_int8_t -_ACEOF -;; -esac - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -@%:@define size_t unsigned int -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -@%:@define ssize_t int -_ACEOF - -fi - -ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" -case $ac_cv_c_uint32_t in #( - no|yes) ;; #( - *) - -$as_echo "@%:@define _UINT32_T 1" >>confdefs.h - - -cat >>confdefs.h <<_ACEOF -@%:@define uint32_t $ac_cv_c_uint32_t -_ACEOF -;; - esac - -ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" -case $ac_cv_c_uint8_t in #( - no|yes) ;; #( - *) - -$as_echo "@%:@define _UINT8_T 1" >>confdefs.h - - -cat >>confdefs.h <<_ACEOF -@%:@define uint8_t $ac_cv_c_uint8_t -_ACEOF -;; - esac - - -# Checks for library functions. -for ac_header in stdlib.h -do : - ac_fn_c_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. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif - -int -main () -{ -return ! malloc (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_malloc_0_nonnull=yes -else - ac_cv_func_malloc_0_nonnull=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 -{ $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 : - -$as_echo "@%:@define HAVE_MALLOC 1" >>confdefs.h - -else - $as_echo "@%:@define HAVE_MALLOC 0" >>confdefs.h - - case " $LIB@&t@OBJS " in - *" malloc.$ac_objext "* ) ;; - *) LIB@&t@OBJS="$LIB@&t@OBJS malloc.$ac_objext" - ;; -esac - - -$as_echo "@%:@define malloc rpl_malloc" >>confdefs.h - -fi - - -for ac_header in stdlib.h -do : - ac_fn_c_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 realloc" >&5 -$as_echo_n "checking for GNU libc compatible realloc... " >&6; } -if ${ac_cv_func_realloc_0_nonnull+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_realloc_0_nonnull=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *realloc (); -#endif - -int -main () -{ -return ! realloc (0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_realloc_0_nonnull=yes -else - ac_cv_func_realloc_0_nonnull=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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } -if test $ac_cv_func_realloc_0_nonnull = yes; then : - -$as_echo "@%:@define HAVE_REALLOC 1" >>confdefs.h - -else - $as_echo "@%:@define HAVE_REALLOC 0" >>confdefs.h - - case " $LIB@&t@OBJS " in - *" realloc.$ac_objext "* ) ;; - *) LIB@&t@OBJS="$LIB@&t@OBJS realloc.$ac_objext" - ;; -esac - - -$as_echo "@%:@define realloc rpl_realloc" >>confdefs.h - -fi - - -for ac_func in memset mkdir pow strdup -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -ac_config_files="$ac_config_files Makefile" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_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) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - 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 - { $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 - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $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 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIB@&t@OBJS; 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=`$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" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIB@&t@OBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $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 -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -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 - case `(set -o) 2>/dev/null` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# 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 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 || - PATH_SEPARATOR=';' - } -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 @%:@(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $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] -@%:@ ---------------------------------------- -@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are -@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with STATUS, using 1 if that was 0. -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 - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} @%:@ as_fn_error - - -@%:@ as_fn_set_status STATUS -@%:@ ----------------------- -@%:@ Set @S|@? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} @%:@ as_fn_set_status - -@%:@ as_fn_exit STATUS -@%:@ ----------------- -@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} @%:@ as_fn_exit - -@%:@ as_fn_unset VAR -@%:@ --------------- -@%:@ Portably unset VAR. -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 : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -@%:@ as_fn_arith ARG... -@%:@ ------------------ -@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the -@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments -@%:@ must be portable across @S|@(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in @%:@((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -@%:@ as_fn_mkdir_p -@%:@ ------------- -@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} @%:@ as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -@%:@ as_fn_executable_p FILE -@%:@ ----------------------- -@%:@ Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} @%:@ as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by cellsnp-lite $as_me 1.2.1, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -cellsnp-lite config.status 1.2.1 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -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." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $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=`$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;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -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 - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX -@%:@@%:@ Running $as_me. @%:@@%:@ -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "conf.h") CONFIG_HEADERS="$CONFIG_HEADERS conf.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# 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+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $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=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - 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/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $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=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -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"; } && - { $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 -$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" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $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 - - diff --git a/autom4te.cache/requests b/autom4te.cache/requests deleted file mode 100644 index 45031af..0000000 --- a/autom4te.cache/requests +++ /dev/null @@ -1,152 +0,0 @@ -# This file was generated. -# It contains the lists of macros which have been traced. -# It can be safely removed. - -@request = ( - bless( [ - '0', - 1, - [ - '/usr/share/autoconf' - ], - [ - '/usr/share/autoconf/autoconf/autoconf.m4f', - '-', - '/usr/share/aclocal-1.13/internal/ac-config-macro-dirs.m4', - '/usr/share/aclocal-1.13/amversion.m4', - '/usr/share/aclocal-1.13/auxdir.m4', - '/usr/share/aclocal-1.13/cond.m4', - '/usr/share/aclocal-1.13/depend.m4', - '/usr/share/aclocal-1.13/depout.m4', - '/usr/share/aclocal-1.13/init.m4', - '/usr/share/aclocal-1.13/install-sh.m4', - '/usr/share/aclocal-1.13/lead-dot.m4', - '/usr/share/aclocal-1.13/make.m4', - '/usr/share/aclocal-1.13/missing.m4', - '/usr/share/aclocal-1.13/options.m4', - '/usr/share/aclocal-1.13/runlog.m4', - '/usr/share/aclocal-1.13/sanity.m4', - '/usr/share/aclocal-1.13/silent.m4', - '/usr/share/aclocal-1.13/strip.m4', - '/usr/share/aclocal-1.13/substnot.m4', - '/usr/share/aclocal-1.13/tar.m4', - 'configure.ac' - ], - { - 'm4_pattern_forbid' => 1, - 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, - '_AM_SET_OPTION' => 1, - 'AC_DEFUN' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'AM_MISSING_HAS_RUN' => 1, - 'AM_SUBST_NOTMAKE' => 1, - 'AM_MISSING_PROG' => 1, - 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'AC_DEFUN_ONCE' => 1, - '_AM_CONFIG_MACRO_DIRS' => 1, - 'AM_PROG_INSTALL_STRIP' => 1, - '_m4_warn' => 1, - 'AM_SANITY_CHECK' => 1, - 'AM_SILENT_RULES' => 1, - 'include' => 1, - '_AM_PROG_TAR' => 1, - 'AX_WITH_HTSLIB' => 1, - 'AM_AUX_DIR_EXPAND' => 1, - 'AM_DEP_TRACK' => 1, - '_AM_SET_OPTIONS' => 1, - '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'AM_RUN_LOG' => 1, - 'AC_CONFIG_MACRO_DIR' => 1, - '_AM_IF_OPTION' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'm4_pattern_allow' => 1, - '_AM_AUTOCONF_VERSION' => 1, - '_AM_MANGLE_OPTION' => 1, - 'AM_CONDITIONAL' => 1, - 'AM_SET_LEADING_DOT' => 1, - 'AC_CONFIG_MACRO_DIR_TRACE' => 1, - 'AM_SET_DEPDIR' => 1, - '_AM_DEPENDENCIES' => 1, - 'AM_PROG_INSTALL_SH' => 1, - 'm4_include' => 1, - '_AC_AM_CONFIG_HEADER_HOOK' => 1, - 'AU_DEFUN' => 1, - 'AM_MAKE_INCLUDE' => 1 - } - ], 'Autom4te::Request' ), - bless( [ - '1', - 1, - [ - '/usr/share/autoconf' - ], - [ - '/usr/share/autoconf/autoconf/autoconf.m4f', - 'aclocal.m4', - 'configure.ac' - ], - { - '_LT_AC_TAGCONFIG' => 1, - 'AM_PROG_F77_C_O' => 1, - 'm4_pattern_forbid' => 1, - 'AC_INIT' => 1, - '_AM_COND_IF' => 1, - 'AC_CANONICAL_TARGET' => 1, - 'AC_SUBST' => 1, - 'AC_CONFIG_LIBOBJ_DIR' => 1, - 'AM_EXTRA_RECURSIVE_TARGETS' => 1, - 'AC_FC_SRCEXT' => 1, - 'AC_CANONICAL_HOST' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AM_PROG_MKDIR_P' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AM_PATH_GUILE' => 1, - 'AC_CONFIG_SUBDIRS' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'LT_CONFIG_LTDL_DIR' => 1, - 'AC_REQUIRE_AUX_FILE' => 1, - 'AC_CONFIG_LINKS' => 1, - 'm4_sinclude' => 1, - 'LT_SUPPORTED_TAG' => 1, - 'AM_MAINTAINER_MODE' => 1, - 'AM_NLS' => 1, - 'AC_FC_PP_DEFINE' => 1, - 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, - 'AM_MAKEFILE_INCLUDE' => 1, - '_m4_warn' => 1, - 'AM_PROG_CXX_C_O' => 1, - '_AM_COND_ENDIF' => 1, - '_AM_MAKEFILE_INCLUDE' => 1, - 'AM_ENABLE_MULTILIB' => 1, - 'AM_PROG_MOC' => 1, - 'AM_SILENT_RULES' => 1, - 'AC_CONFIG_FILES' => 1, - 'LT_INIT' => 1, - 'include' => 1, - 'AM_PROG_AR' => 1, - 'AM_GNU_GETTEXT' => 1, - 'AC_LIBSOURCE' => 1, - 'AM_PROG_FC_C_O' => 1, - 'AC_CANONICAL_BUILD' => 1, - 'AC_FC_FREEFORM' => 1, - 'AH_OUTPUT' => 1, - 'AC_FC_PP_SRCEXT' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'AC_CONFIG_AUX_DIR' => 1, - 'sinclude' => 1, - 'AM_PROG_CC_C_O' => 1, - 'm4_pattern_allow' => 1, - 'AM_XGETTEXT_OPTION' => 1, - 'AC_CANONICAL_SYSTEM' => 1, - 'AM_CONDITIONAL' => 1, - 'AC_CONFIG_HEADERS' => 1, - 'AC_DEFINE_TRACE_LITERAL' => 1, - 'AM_POT_TOOLS' => 1, - 'm4_include' => 1, - '_AM_COND_ELSE' => 1, - 'AC_SUBST_TRACE' => 1 - } - ], 'Autom4te::Request' ) - ); - diff --git a/autom4te.cache/traces.0 b/autom4te.cache/traces.0 deleted file mode 100644 index f5cd77d..0000000 --- a/autom4te.cache/traces.0 +++ /dev/null @@ -1,1034 +0,0 @@ -m4trace:/usr/share/aclocal-1.13/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.13' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.13.4], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) -m4trace:/usr/share/aclocal-1.13/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.13.4])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -m4trace:/usr/share/aclocal-1.13/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) -m4trace:/usr/share/aclocal-1.13/cond.m4:12: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl - m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) -m4trace:/usr/share/aclocal-1.13/depend.m4:26: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], - [$1], [CXX], [depcc="$CXX" am_compiler_list=], - [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], - [$1], [UPC], [depcc="$UPC" am_compiler_list=], - [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) -m4trace:/usr/share/aclocal-1.13/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) -m4trace:/usr/share/aclocal-1.13/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl -AS_HELP_STRING( - [--enable-dependency-tracking], - [do not reject slow dependency extractors]) -AS_HELP_STRING( - [--disable-dependency-tracking], - [speeds up one-time build])]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -AC_SUBST([am__nodep])dnl -_AM_SUBST_NOTMAKE([am__nodep])dnl -]) -m4trace:/usr/share/aclocal-1.13/depout.m4:12: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -]) -m4trace:/usr/share/aclocal-1.13/depout.m4:71: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) -m4trace:/usr/share/aclocal-1.13/init.m4:23: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[AC_DIAGNOSE([obsolete], - [$0: two- and three-arguments forms are deprecated.]) -m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), - [ok:ok],, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) - AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) -AM_MISSING_PROG([AUTOCONF], [autoconf]) -AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) -AM_MISSING_PROG([AUTOHEADER], [autoheader]) -AM_MISSING_PROG([MAKEINFO], [makeinfo]) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES([CC])], - [m4_define([AC_PROG_CC], - m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES([CXX])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES([OBJC])], - [m4_define([AC_PROG_OBJC], - m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], - [_AM_DEPENDENCIES([OBJCXX])], - [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl -]) -AC_REQUIRE([AM_SILENT_RULES])dnl -dnl The testsuite driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This -dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) -m4trace:/usr/share/aclocal-1.13/init.m4:136: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -m4trace:/usr/share/aclocal-1.13/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST([install_sh])]) -m4trace:/usr/share/aclocal-1.13/lead-dot.m4:10: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) -m4trace:/usr/share/aclocal-1.13/make.m4:12: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) -m4trace:/usr/share/aclocal-1.13/missing.m4:11: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) -m4trace:/usr/share/aclocal-1.13/missing.m4:20: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - AC_MSG_WARN(['missing' script is too old or missing]) -fi -]) -m4trace:/usr/share/aclocal-1.13/options.m4:11: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) -m4trace:/usr/share/aclocal-1.13/options.m4:17: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) -m4trace:/usr/share/aclocal-1.13/options.m4:23: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) -m4trace:/usr/share/aclocal-1.13/options.m4:29: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -m4trace:/usr/share/aclocal-1.13/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) -m4trace:/usr/share/aclocal-1.13/sanity.m4:11: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken - alias in your environment]) - fi - if test "$[2]" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT([yes]) -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi -AC_CONFIG_COMMANDS_PRE( - [AC_MSG_CHECKING([that generated files are newer than configure]) - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - AC_MSG_RESULT([done])]) -rm -f conftest.file -]) -m4trace:/usr/share/aclocal-1.13/silent.m4:12: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl -AS_HELP_STRING( - [--enable-silent-rules], - [less verbose build output (undo: "make V=1")]) -AS_HELP_STRING( - [--disable-silent-rules], - [verbose build output (undo: "make V=0")])dnl -]) -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -dnl -dnl A few 'make' implementations (e.g., NonStop OS and NextStep) -dnl do not support nested variable expansions. -dnl See automake bug#9928 and bug#10237. -am_make=${MAKE-make} -AC_CACHE_CHECK([whether $am_make supports nested variables], - [am_cv_make_support_nested_variables], - [if AS_ECHO([['TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi]) -if test $am_cv_make_support_nested_variables = yes; then - dnl Using '$V' instead of '$(V)' breaks IRIX make. - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AC_SUBST([AM_V])dnl -AM_SUBST_NOTMAKE([AM_V])dnl -AC_SUBST([AM_DEFAULT_V])dnl -AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) -m4trace:/usr/share/aclocal-1.13/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) -m4trace:/usr/share/aclocal-1.13/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) -m4trace:/usr/share/aclocal-1.13/substnot.m4:17: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) -m4trace:/usr/share/aclocal-1.13/tar.m4:23: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AC_SUBST([AMTAR], ['$${TAR-tar}']) - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' - -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - - [m4_case([$1], - [ustar], - [# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi - AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi], - - [pax], - [], - - [m4_fatal([Unknown tar format])]) - - AC_MSG_CHECKING([how to create a $1 tar archive]) - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_$1-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - - AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) - AC_MSG_RESULT([$am_cv_prog_tar_$1])]) - -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) -m4trace:configure.ac:10: -1- m4_pattern_forbid([^_?A[CHUM]_]) -m4trace:configure.ac:10: -1- m4_pattern_forbid([_AC_]) -m4trace:configure.ac:10: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) -m4trace:configure.ac:10: -1- m4_pattern_allow([^AS_FLAGS$]) -m4trace:configure.ac:10: -1- m4_pattern_forbid([^_?m4_]) -m4trace:configure.ac:10: -1- m4_pattern_forbid([^dnl$]) -m4trace:configure.ac:10: -1- m4_pattern_forbid([^_?AS_]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^SHELL$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PATH_SEPARATOR$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_NAME$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_VERSION$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_STRING$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_URL$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^exec_prefix$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^prefix$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^program_transform_name$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^bindir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^sbindir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^libexecdir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^datarootdir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^datadir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^sysconfdir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^sharedstatedir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^localstatedir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^includedir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^oldincludedir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^docdir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^infodir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^htmldir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^dvidir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^pdfdir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^psdir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^libdir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^localedir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^mandir$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_NAME$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_VERSION$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_STRING$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_URL$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^DEFS$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^ECHO_C$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^ECHO_N$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^ECHO_T$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^build_alias$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^host_alias$]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^target_alias$]) -m4trace:configure.ac:14: -1- AM_INIT_AUTOMAKE([subdir-objects foreign]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) -m4trace:configure.ac:14: -1- AM_SET_CURRENT_AUTOMAKE_VERSION -m4trace:configure.ac:14: -1- AM_AUTOMAKE_VERSION([1.13.4]) -m4trace:configure.ac:14: -1- _AM_AUTOCONF_VERSION([2.69]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^INSTALL_DATA$]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^am__isrc$]) -m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__isrc]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^CYGPATH_W$]) -m4trace:configure.ac:14: -1- _AM_SET_OPTIONS([subdir-objects foreign]) -m4trace:configure.ac:14: -1- _AM_SET_OPTION([subdir-objects]) -m4trace:configure.ac:14: -2- _AM_MANGLE_OPTION([subdir-objects]) -m4trace:configure.ac:14: -1- _AM_SET_OPTION([foreign]) -m4trace:configure.ac:14: -2- _AM_MANGLE_OPTION([foreign]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^PACKAGE$]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^VERSION$]) -m4trace:configure.ac:14: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) - AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])]) -m4trace:configure.ac:14: -2- _AM_MANGLE_OPTION([no-define]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^PACKAGE$]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^VERSION$]) -m4trace:configure.ac:14: -1- AM_SANITY_CHECK -m4trace:configure.ac:14: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) -m4trace:configure.ac:14: -1- AM_MISSING_HAS_RUN -m4trace:configure.ac:14: -1- AM_AUX_DIR_EXPAND -m4trace:configure.ac:14: -1- m4_pattern_allow([^ACLOCAL$]) -m4trace:configure.ac:14: -1- AM_MISSING_PROG([AUTOCONF], [autoconf]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AUTOCONF$]) -m4trace:configure.ac:14: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AUTOMAKE$]) -m4trace:configure.ac:14: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AUTOHEADER$]) -m4trace:configure.ac:14: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^MAKEINFO$]) -m4trace:configure.ac:14: -1- AM_PROG_INSTALL_SH -m4trace:configure.ac:14: -1- m4_pattern_allow([^install_sh$]) -m4trace:configure.ac:14: -1- AM_PROG_INSTALL_STRIP -m4trace:configure.ac:14: -1- m4_pattern_allow([^STRIP$]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^MKDIR_P$]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^mkdir_p$]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AWK$]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^SET_MAKE$]) -m4trace:configure.ac:14: -1- AM_SET_LEADING_DOT -m4trace:configure.ac:14: -1- m4_pattern_allow([^am__leading_dot$]) -m4trace:configure.ac:14: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -m4trace:configure.ac:14: -2- _AM_MANGLE_OPTION([tar-ustar]) -m4trace:configure.ac:14: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])]) -m4trace:configure.ac:14: -2- _AM_MANGLE_OPTION([tar-pax]) -m4trace:configure.ac:14: -1- _AM_PROG_TAR([v7]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AMTAR$]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^am__tar$]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^am__untar$]) -m4trace:configure.ac:14: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES([CC])], - [m4_define([AC_PROG_CC], - m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES([CXX])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES([OBJC])], - [m4_define([AC_PROG_OBJC], - m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], - [_AM_DEPENDENCIES([OBJCXX])], - [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl -]) -m4trace:configure.ac:14: -2- _AM_MANGLE_OPTION([no-dependencies]) -m4trace:configure.ac:14: -1- AM_SILENT_RULES -m4trace:configure.ac:14: -1- m4_pattern_allow([^AM_V$]) -m4trace:configure.ac:14: -1- AM_SUBST_NOTMAKE([AM_V]) -m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AM_V]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AM_DEFAULT_V$]) -m4trace:configure.ac:14: -1- AM_SUBST_NOTMAKE([AM_DEFAULT_V]) -m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AM_BACKSLASH$]) -m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) -m4trace:configure.ac:22: -1- m4_include([ax_with_htslib.m4]) -m4trace:ax_with_htslib.m4:56: -1- AC_DEFUN([AX_WITH_HTSLIB], [AC_ARG_WITH([htslib], - [AS_HELP_STRING([--with-htslib=DIR], - [use the HTSlib installation in DIR]) -dnl Not indented, to avoid extra whitespace outwith AS_HELP_STRING() -AS_HELP_STRING([--with-htslib=system], - [use only a system HTSlib installation])], - [], [with_htslib=search]) - -ax_cv_htslib_type=none - -dnl In this step, determine HTSDIR and ax_cv_htslib_which -dnl ax_cv_htslib_which has four possible values: -dnl - source: -dnl the installation is in a source tree dir (mostly installed -dnl from the github repo) -dnl - system: -dnl the installation is system-wide and library should be in the -dnl system search path -dnl - install: -dnl the installation is in a dir containing `include` and `lib` -dnl subdirs -dnl - none: -dnl when missing or old library -case $with_htslib in -yes|search) - AC_MSG_CHECKING([location of HTSlib installation]) - case $srcdir in - .) srcp= ;; - *) srcp=$srcdir/ ;; - esac - found= - for dir in ${srcp}htslib* -- ${srcp}../htslib -- ${srcp}../htslib* - do - if test "$dir" = "--"; then - test -n "$found" && break - elif test -f "$dir/libhts.a" || test -f "$dir/libhts.so"; then - found="${found}1" - HTSDIR=$dir - fi - done - if test -z "$found"; then - AC_MSG_RESULT([none found]) - ax_cv_htslib_which=system - HTSDIR= - elif test "$found" = 1; then - AC_MSG_RESULT([$HTSDIR]) - ax_cv_htslib_which=source - else - AC_MSG_RESULT([several directories found]) - AC_MSG_ERROR([use --with-htslib=DIR to select which HTSlib to use]) - fi - ;; -no) ax_cv_htslib_which=none ;; -system) - ax_cv_htslib_which=system - HTSDIR= - ;; -*) - HTSDIR=$with_htslib - if test -f "$HTSDIR/libhts.a" || test -f "$HTSDIR/libhts.so"; then - ax_cv_htslib_which=source - elif test -f "$HTSDIR/lib/libhts.a" || test -f "$HTSDIR/lib/libhts.so"; then - ax_cv_htslib_which=install - else - ax_cv_htslib_which=none - fi - ;; -esac - -dnl In this step, determine ax_cv_htslib_type and HTSLIB_LIB, HTSLIB_CPPFLAGS, -dnl HTSLIB_LDFLAGS. The dependencies of htslib.a would be added to $LIBS after -dnl calling AC_CHECK_LIB(). -case $ax_cv_htslib_which in -source) - HTSLIB_CPPFLAGS="-I$HTSDIR" - HTSLIB_LDFLAGS="-L$HTSDIR" - if test -f "$HTSDIR/libhts.a"; then - ax_cv_htslib_type=static - HTSLIB_LIB=$HTSDIR/libhts.a - else - ax_cv_htslib_type=shared - HTSLIB_LIB="-lhts" - fi - ;; -system) - HTSLIB_CPPFLAGS= - HTSLIB_LDFLAGS= - HTSLIB_LIB="-lhts" - ax_cv_htslib_type=shared - ;; -install) - HTSLIB_CPPFLAGS="-I$HTSDIR/include" - HTSLIB_LDFLAGS="-L$HTSDIR/lib" - if test -f "$HTSDIR/lib/libhts.a"; then - ax_cv_htslib_type=static - HTSLIB_LIB=$HTSDIR/lib/libhts.a - else - ax_cv_htslib_type=shared - HTSLIB_LIB="-lhts" - fi - ;; -none) - ax_cv_htslib=no - ;; -esac - -dnl Check HTSlib and determine ax_cv_htslib, ax_cv_htslib_msg -dnl NOTE: -dnl - AC_CHECK_LIB tends to? check the shared library (ie. the libhts.so). -dnl In this case, it's probably safe to use either libhts.a or libhts.so as -dnl the libhts.a and libhts.so are usually built simultaneously, though we -dnl prefer using libhts.a -dnl - Cellsnp-lite requires HTSlib >= 1.10.2 as it at least uses the -dnl KS_INITIALIZE which was added to HTSlib since v1.10. We use function -dnl sam_hdr_init, which was added to HTSlib since v1.10, to test version. -if test "$ax_cv_htslib" != no; then - ax_saved_CPPFLAGS=$CPPFLAGS - ax_saved_LDFLAGS=$LDFLAGS - CPPFLAGS="$CPPFLAGS $HTSLIB_CPPFLAGS" - LDFLAGS="$LDFLAGS $HTSLIB_LDFLAGS" - AC_CHECK_HEADER([htslib/sam.h], - [AC_CHECK_LIB(hts, sam_hdr_init, [ax_cv_htslib=yes], - [ax_cv_htslib=no - AC_CHECK_LIB(hts, hts_version, - [ax_cv_htslib_msg="library is too old (1.10.2+ required)"], - [ax_cv_htslib_msg="library not found"])])], - [ax_cv_htslib=no - ax_cv_htslib_msg="library not found"], [;]) - CPPFLAGS=$ax_saved_CPPFLAGS - LDFLAGS=$ax_saved_LDFLAGS -else - ax_cv_htslib_msg="library not found" -fi - -AC_SUBST([HTSDIR]) -AC_SUBST([HTSLIB_CPPFLAGS]) -AC_SUBST([HTSLIB_LDFLAGS]) -AC_SUBST([HTSLIB_LIB]) - -]) -m4trace:configure.ac:25: -1- m4_pattern_allow([^AWK$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CFLAGS$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^ac_ct_CC$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^EXEEXT$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^OBJEXT$]) -m4trace:configure.ac:26: -1- _AM_DEPENDENCIES([CC]) -m4trace:configure.ac:26: -1- AM_SET_DEPDIR -m4trace:configure.ac:26: -1- m4_pattern_allow([^DEPDIR$]) -m4trace:configure.ac:26: -1- AM_OUTPUT_DEPENDENCY_COMMANDS -m4trace:configure.ac:26: -1- AM_MAKE_INCLUDE -m4trace:configure.ac:26: -1- m4_pattern_allow([^am__include$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^am__quote$]) -m4trace:configure.ac:26: -1- AM_DEP_TRACK -m4trace:configure.ac:26: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^AMDEP_TRUE$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^AMDEP_FALSE$]) -m4trace:configure.ac:26: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) -m4trace:configure.ac:26: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) -m4trace:configure.ac:26: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^am__nodep$]) -m4trace:configure.ac:26: -1- _AM_SUBST_NOTMAKE([am__nodep]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CCDEPMODE$]) -m4trace:configure.ac:26: -1- AM_CONDITIONAL([am__fastdepCC], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) -m4trace:configure.ac:26: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) -m4trace:configure.ac:26: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) -m4trace:configure.ac:36: -1- m4_pattern_allow([^HAVE_LIBM$]) -m4trace:configure.ac:48: -1- m4_pattern_allow([^HAVE_LIBZ$]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^HAVE_LIBBZ2$]) -m4trace:configure.ac:82: -1- m4_pattern_allow([^HAVE_LZMA_H$]) -m4trace:configure.ac:83: -1- m4_pattern_allow([^HAVE_LIBLZMA$]) -m4trace:configure.ac:100: -1- m4_pattern_allow([^HAVE_LIBCURL$]) -m4trace:configure.ac:120: -1- m4_pattern_allow([^HAVE_LIBCRYPTO$]) -m4trace:configure.ac:135: -1- AX_WITH_HTSLIB -m4trace:configure.ac:135: -1- m4_pattern_allow([^HTSDIR$]) -m4trace:configure.ac:135: -1- m4_pattern_allow([^HTSLIB_CPPFLAGS$]) -m4trace:configure.ac:135: -1- m4_pattern_allow([^HTSLIB_LDFLAGS$]) -m4trace:configure.ac:135: -1- m4_pattern_allow([^HTSLIB_LIB$]) -m4trace:configure.ac:147: -1- m4_pattern_allow([^CPP$]) -m4trace:configure.ac:147: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:147: -1- m4_pattern_allow([^CPP$]) -m4trace:configure.ac:147: -1- m4_pattern_allow([^GREP$]) -m4trace:configure.ac:147: -1- m4_pattern_allow([^EGREP$]) -m4trace:configure.ac:147: -1- m4_pattern_allow([^STDC_HEADERS$]) -m4trace:configure.ac:151: -1- m4_pattern_allow([^int32_t$]) -m4trace:configure.ac:152: -1- m4_pattern_allow([^int8_t$]) -m4trace:configure.ac:153: -1- m4_pattern_allow([^size_t$]) -m4trace:configure.ac:154: -1- m4_pattern_allow([^ssize_t$]) -m4trace:configure.ac:155: -1- m4_pattern_allow([^_UINT32_T$]) -m4trace:configure.ac:155: -1- m4_pattern_allow([^uint32_t$]) -m4trace:configure.ac:156: -1- m4_pattern_allow([^_UINT8_T$]) -m4trace:configure.ac:156: -1- m4_pattern_allow([^uint8_t$]) -m4trace:configure.ac:159: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) -m4trace:configure.ac:159: -1- m4_pattern_allow([^HAVE_MALLOC$]) -m4trace:configure.ac:159: -1- m4_pattern_allow([^HAVE_MALLOC$]) -m4trace:configure.ac:159: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:159: -1- m4_pattern_allow([^malloc$]) -m4trace:configure.ac:160: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) -m4trace:configure.ac:160: -1- m4_pattern_allow([^HAVE_REALLOC$]) -m4trace:configure.ac:160: -1- m4_pattern_allow([^HAVE_REALLOC$]) -m4trace:configure.ac:160: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:160: -1- m4_pattern_allow([^realloc$]) -m4trace:configure.ac:165: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:165: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.ac:165: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) -m4trace:configure.ac:165: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) -m4trace:configure.ac:165: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) -m4trace:configure.ac:165: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) -m4trace:configure.ac:165: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) -m4trace:configure.ac:165: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) -m4trace:configure.ac:165: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS diff --git a/autom4te.cache/traces.1 b/autom4te.cache/traces.1 deleted file mode 100644 index 5f4482b..0000000 --- a/autom4te.cache/traces.1 +++ /dev/null @@ -1,530 +0,0 @@ -m4trace:configure.ac:10: -1- AC_INIT([cellsnp-lite], [1.2.1], [hxj5@hku.hk]) -m4trace:configure.ac:10: -1- m4_pattern_forbid([^_?A[CHUM]_]) -m4trace:configure.ac:10: -1- m4_pattern_forbid([_AC_]) -m4trace:configure.ac:10: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) -m4trace:configure.ac:10: -1- m4_pattern_allow([^AS_FLAGS$]) -m4trace:configure.ac:10: -1- m4_pattern_forbid([^_?m4_]) -m4trace:configure.ac:10: -1- m4_pattern_forbid([^dnl$]) -m4trace:configure.ac:10: -1- m4_pattern_forbid([^_?AS_]) -m4trace:configure.ac:10: -1- AC_SUBST([SHELL]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([SHELL]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^SHELL$]) -m4trace:configure.ac:10: -1- AC_SUBST([PATH_SEPARATOR]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PATH_SEPARATOR$]) -m4trace:configure.ac:10: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([PACKAGE_NAME]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_NAME$]) -m4trace:configure.ac:10: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) -m4trace:configure.ac:10: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_VERSION$]) -m4trace:configure.ac:10: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([PACKAGE_STRING]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_STRING$]) -m4trace:configure.ac:10: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) -m4trace:configure.ac:10: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([PACKAGE_URL]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_URL$]) -m4trace:configure.ac:10: -1- AC_SUBST([exec_prefix], [NONE]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([exec_prefix]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^exec_prefix$]) -m4trace:configure.ac:10: -1- AC_SUBST([prefix], [NONE]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([prefix]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^prefix$]) -m4trace:configure.ac:10: -1- AC_SUBST([program_transform_name], [s,x,x,]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([program_transform_name]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^program_transform_name$]) -m4trace:configure.ac:10: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([bindir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^bindir$]) -m4trace:configure.ac:10: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([sbindir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^sbindir$]) -m4trace:configure.ac:10: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([libexecdir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^libexecdir$]) -m4trace:configure.ac:10: -1- AC_SUBST([datarootdir], ['${prefix}/share']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([datarootdir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^datarootdir$]) -m4trace:configure.ac:10: -1- AC_SUBST([datadir], ['${datarootdir}']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([datadir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^datadir$]) -m4trace:configure.ac:10: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([sysconfdir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^sysconfdir$]) -m4trace:configure.ac:10: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([sharedstatedir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^sharedstatedir$]) -m4trace:configure.ac:10: -1- AC_SUBST([localstatedir], ['${prefix}/var']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([localstatedir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^localstatedir$]) -m4trace:configure.ac:10: -1- AC_SUBST([includedir], ['${prefix}/include']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([includedir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^includedir$]) -m4trace:configure.ac:10: -1- AC_SUBST([oldincludedir], ['/usr/include']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([oldincludedir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^oldincludedir$]) -m4trace:configure.ac:10: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], - ['${datarootdir}/doc/${PACKAGE_TARNAME}'], - ['${datarootdir}/doc/${PACKAGE}'])]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([docdir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^docdir$]) -m4trace:configure.ac:10: -1- AC_SUBST([infodir], ['${datarootdir}/info']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([infodir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^infodir$]) -m4trace:configure.ac:10: -1- AC_SUBST([htmldir], ['${docdir}']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([htmldir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^htmldir$]) -m4trace:configure.ac:10: -1- AC_SUBST([dvidir], ['${docdir}']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([dvidir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^dvidir$]) -m4trace:configure.ac:10: -1- AC_SUBST([pdfdir], ['${docdir}']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([pdfdir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^pdfdir$]) -m4trace:configure.ac:10: -1- AC_SUBST([psdir], ['${docdir}']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([psdir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^psdir$]) -m4trace:configure.ac:10: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([libdir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^libdir$]) -m4trace:configure.ac:10: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([localedir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^localedir$]) -m4trace:configure.ac:10: -1- AC_SUBST([mandir], ['${datarootdir}/man']) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([mandir]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^mandir$]) -m4trace:configure.ac:10: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_NAME$]) -m4trace:configure.ac:10: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ -@%:@undef PACKAGE_NAME]) -m4trace:configure.ac:10: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) -m4trace:configure.ac:10: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ -@%:@undef PACKAGE_TARNAME]) -m4trace:configure.ac:10: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_VERSION$]) -m4trace:configure.ac:10: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ -@%:@undef PACKAGE_VERSION]) -m4trace:configure.ac:10: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_STRING$]) -m4trace:configure.ac:10: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ -@%:@undef PACKAGE_STRING]) -m4trace:configure.ac:10: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) -m4trace:configure.ac:10: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ -@%:@undef PACKAGE_BUGREPORT]) -m4trace:configure.ac:10: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE_URL$]) -m4trace:configure.ac:10: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */ -@%:@undef PACKAGE_URL]) -m4trace:configure.ac:10: -1- AC_SUBST([DEFS]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([DEFS]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^DEFS$]) -m4trace:configure.ac:10: -1- AC_SUBST([ECHO_C]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([ECHO_C]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^ECHO_C$]) -m4trace:configure.ac:10: -1- AC_SUBST([ECHO_N]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([ECHO_N]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^ECHO_N$]) -m4trace:configure.ac:10: -1- AC_SUBST([ECHO_T]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([ECHO_T]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^ECHO_T$]) -m4trace:configure.ac:10: -1- AC_SUBST([LIBS]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:10: -1- AC_SUBST([build_alias]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([build_alias]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^build_alias$]) -m4trace:configure.ac:10: -1- AC_SUBST([host_alias]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([host_alias]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^host_alias$]) -m4trace:configure.ac:10: -1- AC_SUBST([target_alias]) -m4trace:configure.ac:10: -1- AC_SUBST_TRACE([target_alias]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^target_alias$]) -m4trace:configure.ac:14: -1- AM_INIT_AUTOMAKE([subdir-objects foreign]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) -m4trace:configure.ac:14: -1- AM_AUTOMAKE_VERSION([1.13.4]) -m4trace:configure.ac:14: -1- AC_REQUIRE_AUX_FILE([install-sh]) -m4trace:configure.ac:14: -1- AC_SUBST([INSTALL_PROGRAM]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) -m4trace:configure.ac:14: -1- AC_SUBST([INSTALL_SCRIPT]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) -m4trace:configure.ac:14: -1- AC_SUBST([INSTALL_DATA]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([INSTALL_DATA]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^INSTALL_DATA$]) -m4trace:configure.ac:14: -1- AC_SUBST([am__isrc], [' -I$(srcdir)']) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([am__isrc]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^am__isrc$]) -m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__isrc]) -m4trace:configure.ac:14: -1- AC_SUBST([CYGPATH_W]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CYGPATH_W]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^CYGPATH_W$]) -m4trace:configure.ac:14: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME']) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([PACKAGE]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^PACKAGE$]) -m4trace:configure.ac:14: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION']) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([VERSION]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^VERSION$]) -m4trace:configure.ac:14: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^PACKAGE$]) -m4trace:configure.ac:14: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ -@%:@undef PACKAGE]) -m4trace:configure.ac:14: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^VERSION$]) -m4trace:configure.ac:14: -1- AH_OUTPUT([VERSION], [/* Version number of package */ -@%:@undef VERSION]) -m4trace:configure.ac:14: -1- AC_REQUIRE_AUX_FILE([missing]) -m4trace:configure.ac:14: -1- AC_SUBST([ACLOCAL]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([ACLOCAL]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^ACLOCAL$]) -m4trace:configure.ac:14: -1- AC_SUBST([AUTOCONF]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AUTOCONF]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AUTOCONF$]) -m4trace:configure.ac:14: -1- AC_SUBST([AUTOMAKE]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AUTOMAKE]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AUTOMAKE$]) -m4trace:configure.ac:14: -1- AC_SUBST([AUTOHEADER]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AUTOHEADER]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AUTOHEADER$]) -m4trace:configure.ac:14: -1- AC_SUBST([MAKEINFO]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([MAKEINFO]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^MAKEINFO$]) -m4trace:configure.ac:14: -1- AC_SUBST([install_sh]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([install_sh]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^install_sh$]) -m4trace:configure.ac:14: -1- AC_SUBST([STRIP]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([STRIP]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^STRIP$]) -m4trace:configure.ac:14: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) -m4trace:configure.ac:14: -1- AC_REQUIRE_AUX_FILE([install-sh]) -m4trace:configure.ac:14: -1- AC_SUBST([MKDIR_P]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([MKDIR_P]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^MKDIR_P$]) -m4trace:configure.ac:14: -1- AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([mkdir_p]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^mkdir_p$]) -m4trace:configure.ac:14: -1- AC_SUBST([AWK]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AWK]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AWK$]) -m4trace:configure.ac:14: -1- AC_SUBST([SET_MAKE]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([SET_MAKE]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^SET_MAKE$]) -m4trace:configure.ac:14: -1- AC_SUBST([am__leading_dot]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([am__leading_dot]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^am__leading_dot$]) -m4trace:configure.ac:14: -1- AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AMTAR]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AMTAR$]) -m4trace:configure.ac:14: -1- AC_SUBST([am__tar]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([am__tar]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^am__tar$]) -m4trace:configure.ac:14: -1- AC_SUBST([am__untar]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([am__untar]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^am__untar$]) -m4trace:configure.ac:14: -1- AM_SILENT_RULES -m4trace:configure.ac:14: -1- AC_SUBST([AM_V]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AM_V]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AM_V$]) -m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AM_V]) -m4trace:configure.ac:14: -1- AC_SUBST([AM_DEFAULT_V]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AM_DEFAULT_V]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AM_DEFAULT_V$]) -m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) -m4trace:configure.ac:14: -1- AC_SUBST([AM_DEFAULT_VERBOSITY]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AM_DEFAULT_VERBOSITY]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) -m4trace:configure.ac:14: -1- AC_SUBST([AM_BACKSLASH]) -m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AM_BACKSLASH]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^AM_BACKSLASH$]) -m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) -m4trace:configure.ac:20: -1- AC_CONFIG_HEADERS([conf.h]) -m4trace:configure.ac:22: -1- m4_include([ax_with_htslib.m4]) -m4trace:configure.ac:25: -1- AC_SUBST([AWK]) -m4trace:configure.ac:25: -1- AC_SUBST_TRACE([AWK]) -m4trace:configure.ac:25: -1- m4_pattern_allow([^AWK$]) -m4trace:configure.ac:26: -1- AC_SUBST([CC]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:26: -1- AC_SUBST([CFLAGS]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([CFLAGS]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CFLAGS$]) -m4trace:configure.ac:26: -1- AC_SUBST([LDFLAGS]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([LDFLAGS]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.ac:26: -1- AC_SUBST([LIBS]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:26: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:26: -1- AC_SUBST([CC]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:26: -1- AC_SUBST([CC]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:26: -1- AC_SUBST([CC]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:26: -1- AC_SUBST([CC]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:26: -1- AC_SUBST([ac_ct_CC]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([ac_ct_CC]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^ac_ct_CC$]) -m4trace:configure.ac:26: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([EXEEXT]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^EXEEXT$]) -m4trace:configure.ac:26: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([OBJEXT]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^OBJEXT$]) -m4trace:configure.ac:26: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([DEPDIR]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^DEPDIR$]) -m4trace:configure.ac:26: -1- AC_SUBST([am__include]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([am__include]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^am__include$]) -m4trace:configure.ac:26: -1- AC_SUBST([am__quote]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([am__quote]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^am__quote$]) -m4trace:configure.ac:26: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -m4trace:configure.ac:26: -1- AC_SUBST([AMDEP_TRUE]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([AMDEP_TRUE]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^AMDEP_TRUE$]) -m4trace:configure.ac:26: -1- AC_SUBST([AMDEP_FALSE]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([AMDEP_FALSE]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^AMDEP_FALSE$]) -m4trace:configure.ac:26: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) -m4trace:configure.ac:26: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) -m4trace:configure.ac:26: -1- AC_SUBST([AMDEPBACKSLASH]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([AMDEPBACKSLASH]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) -m4trace:configure.ac:26: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) -m4trace:configure.ac:26: -1- AC_SUBST([am__nodep]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([am__nodep]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^am__nodep$]) -m4trace:configure.ac:26: -1- _AM_SUBST_NOTMAKE([am__nodep]) -m4trace:configure.ac:26: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([CCDEPMODE]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^CCDEPMODE$]) -m4trace:configure.ac:26: -1- AM_CONDITIONAL([am__fastdepCC], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) -m4trace:configure.ac:26: -1- AC_SUBST([am__fastdepCC_TRUE]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) -m4trace:configure.ac:26: -1- AC_SUBST([am__fastdepCC_FALSE]) -m4trace:configure.ac:26: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) -m4trace:configure.ac:26: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) -m4trace:configure.ac:26: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) -m4trace:configure.ac:26: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) -m4trace:configure.ac:36: -1- AH_OUTPUT([HAVE_LIBM], [/* Define to 1 if you have the `m\' library (-lm). */ -@%:@undef HAVE_LIBM]) -m4trace:configure.ac:36: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBM]) -m4trace:configure.ac:36: -1- m4_pattern_allow([^HAVE_LIBM$]) -m4trace:configure.ac:48: -1- AH_OUTPUT([HAVE_LIBZ], [/* Define to 1 if you have the `z\' library (-lz). */ -@%:@undef HAVE_LIBZ]) -m4trace:configure.ac:48: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBZ]) -m4trace:configure.ac:48: -1- m4_pattern_allow([^HAVE_LIBZ$]) -m4trace:configure.ac:65: -1- AH_OUTPUT([HAVE_LIBBZ2], [/* Define to 1 if you have the `bz2\' library (-lbz2). */ -@%:@undef HAVE_LIBBZ2]) -m4trace:configure.ac:65: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBBZ2]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^HAVE_LIBBZ2$]) -m4trace:configure.ac:82: -1- AH_OUTPUT([HAVE_LZMA_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_LZMA_H]) -m4trace:configure.ac:82: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LZMA_H]) -m4trace:configure.ac:82: -1- m4_pattern_allow([^HAVE_LZMA_H$]) -m4trace:configure.ac:83: -1- AH_OUTPUT([HAVE_LIBLZMA], [/* Define to 1 if you have the `lzma\' library (-llzma). */ -@%:@undef HAVE_LIBLZMA]) -m4trace:configure.ac:83: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBLZMA]) -m4trace:configure.ac:83: -1- m4_pattern_allow([^HAVE_LIBLZMA$]) -m4trace:configure.ac:100: -1- AH_OUTPUT([HAVE_LIBCURL], [/* Define to 1 if you have the `curl\' library (-lcurl). */ -@%:@undef HAVE_LIBCURL]) -m4trace:configure.ac:100: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBCURL]) -m4trace:configure.ac:100: -1- m4_pattern_allow([^HAVE_LIBCURL$]) -m4trace:configure.ac:120: -1- AH_OUTPUT([HAVE_LIBCRYPTO], [/* Define to 1 if you have the `crypto\' library (-lcrypto). */ -@%:@undef HAVE_LIBCRYPTO]) -m4trace:configure.ac:120: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBCRYPTO]) -m4trace:configure.ac:120: -1- m4_pattern_allow([^HAVE_LIBCRYPTO$]) -m4trace:configure.ac:135: -1- AC_SUBST([HTSDIR]) -m4trace:configure.ac:135: -1- AC_SUBST_TRACE([HTSDIR]) -m4trace:configure.ac:135: -1- m4_pattern_allow([^HTSDIR$]) -m4trace:configure.ac:135: -1- AC_SUBST([HTSLIB_CPPFLAGS]) -m4trace:configure.ac:135: -1- AC_SUBST_TRACE([HTSLIB_CPPFLAGS]) -m4trace:configure.ac:135: -1- m4_pattern_allow([^HTSLIB_CPPFLAGS$]) -m4trace:configure.ac:135: -1- AC_SUBST([HTSLIB_LDFLAGS]) -m4trace:configure.ac:135: -1- AC_SUBST_TRACE([HTSLIB_LDFLAGS]) -m4trace:configure.ac:135: -1- m4_pattern_allow([^HTSLIB_LDFLAGS$]) -m4trace:configure.ac:135: -1- AC_SUBST([HTSLIB_LIB]) -m4trace:configure.ac:135: -1- AC_SUBST_TRACE([HTSLIB_LIB]) -m4trace:configure.ac:135: -1- m4_pattern_allow([^HTSLIB_LIB$]) -m4trace:configure.ac:147: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_STDLIB_H]) -m4trace:configure.ac:147: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_STRING_H]) -m4trace:configure.ac:147: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_UNISTD_H]) -m4trace:configure.ac:147: -1- AC_SUBST([CPP]) -m4trace:configure.ac:147: -1- AC_SUBST_TRACE([CPP]) -m4trace:configure.ac:147: -1- m4_pattern_allow([^CPP$]) -m4trace:configure.ac:147: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.ac:147: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.ac:147: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:147: -1- AC_SUBST([CPP]) -m4trace:configure.ac:147: -1- AC_SUBST_TRACE([CPP]) -m4trace:configure.ac:147: -1- m4_pattern_allow([^CPP$]) -m4trace:configure.ac:147: -1- AC_SUBST([GREP]) -m4trace:configure.ac:147: -1- AC_SUBST_TRACE([GREP]) -m4trace:configure.ac:147: -1- m4_pattern_allow([^GREP$]) -m4trace:configure.ac:147: -1- AC_SUBST([EGREP]) -m4trace:configure.ac:147: -1- AC_SUBST_TRACE([EGREP]) -m4trace:configure.ac:147: -1- m4_pattern_allow([^EGREP$]) -m4trace:configure.ac:147: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) -m4trace:configure.ac:147: -1- m4_pattern_allow([^STDC_HEADERS$]) -m4trace:configure.ac:147: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ -@%:@undef STDC_HEADERS]) -m4trace:configure.ac:147: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_SYS_TYPES_H]) -m4trace:configure.ac:147: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_SYS_STAT_H]) -m4trace:configure.ac:147: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_STDLIB_H]) -m4trace:configure.ac:147: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_STRING_H]) -m4trace:configure.ac:147: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_MEMORY_H]) -m4trace:configure.ac:147: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_STRINGS_H]) -m4trace:configure.ac:147: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_INTTYPES_H]) -m4trace:configure.ac:147: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_STDINT_H]) -m4trace:configure.ac:147: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_UNISTD_H]) -m4trace:configure.ac:150: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler - calls it, or to nothing if \'inline\' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif]) -m4trace:configure.ac:151: -1- AC_DEFINE_TRACE_LITERAL([int32_t]) -m4trace:configure.ac:151: -1- m4_pattern_allow([^int32_t$]) -m4trace:configure.ac:151: -1- AH_OUTPUT([int32_t], [/* Define to the type of a signed integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -@%:@undef int32_t]) -m4trace:configure.ac:152: -1- AC_DEFINE_TRACE_LITERAL([int8_t]) -m4trace:configure.ac:152: -1- m4_pattern_allow([^int8_t$]) -m4trace:configure.ac:152: -1- AH_OUTPUT([int8_t], [/* Define to the type of a signed integer type of width exactly 8 bits if such - a type exists and the standard includes do not define it. */ -@%:@undef int8_t]) -m4trace:configure.ac:153: -1- AC_DEFINE_TRACE_LITERAL([size_t]) -m4trace:configure.ac:153: -1- m4_pattern_allow([^size_t$]) -m4trace:configure.ac:153: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if does not define. */ -@%:@undef size_t]) -m4trace:configure.ac:154: -1- AC_DEFINE_TRACE_LITERAL([ssize_t]) -m4trace:configure.ac:154: -1- m4_pattern_allow([^ssize_t$]) -m4trace:configure.ac:154: -1- AH_OUTPUT([ssize_t], [/* Define to `int\' if does not define. */ -@%:@undef ssize_t]) -m4trace:configure.ac:155: -1- AC_DEFINE_TRACE_LITERAL([_UINT32_T]) -m4trace:configure.ac:155: -1- m4_pattern_allow([^_UINT32_T$]) -m4trace:configure.ac:155: -1- AH_OUTPUT([_UINT32_T], [/* Define for Solaris 2.5.1 so the uint32_t typedef from , - , or is not used. If the typedef were allowed, the - @%:@define below would cause a syntax error. */ -@%:@undef _UINT32_T]) -m4trace:configure.ac:155: -1- AC_DEFINE_TRACE_LITERAL([uint32_t]) -m4trace:configure.ac:155: -1- m4_pattern_allow([^uint32_t$]) -m4trace:configure.ac:155: -1- AH_OUTPUT([uint32_t], [/* Define to the type of an unsigned integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -@%:@undef uint32_t]) -m4trace:configure.ac:156: -1- AC_DEFINE_TRACE_LITERAL([_UINT8_T]) -m4trace:configure.ac:156: -1- m4_pattern_allow([^_UINT8_T$]) -m4trace:configure.ac:156: -1- AH_OUTPUT([_UINT8_T], [/* Define for Solaris 2.5.1 so the uint8_t typedef from , - , or is not used. If the typedef were allowed, the - @%:@define below would cause a syntax error. */ -@%:@undef _UINT8_T]) -m4trace:configure.ac:156: -1- AC_DEFINE_TRACE_LITERAL([uint8_t]) -m4trace:configure.ac:156: -1- m4_pattern_allow([^uint8_t$]) -m4trace:configure.ac:156: -1- AH_OUTPUT([uint8_t], [/* Define to the type of an unsigned integer type of width exactly 8 bits if - such a type exists and the standard includes do not define it. */ -@%:@undef uint8_t]) -m4trace:configure.ac:159: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_STDLIB_H]) -m4trace:configure.ac:159: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H]) -m4trace:configure.ac:159: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) -m4trace:configure.ac:159: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC]) -m4trace:configure.ac:159: -1- m4_pattern_allow([^HAVE_MALLOC$]) -m4trace:configure.ac:159: -1- AH_OUTPUT([HAVE_MALLOC], [/* Define to 1 if your system has a GNU libc compatible `malloc\' function, and - to 0 otherwise. */ -@%:@undef HAVE_MALLOC]) -m4trace:configure.ac:159: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC]) -m4trace:configure.ac:159: -1- m4_pattern_allow([^HAVE_MALLOC$]) -m4trace:configure.ac:159: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS malloc.$ac_objext"]) -m4trace:configure.ac:159: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) -m4trace:configure.ac:159: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:159: -1- AC_LIBSOURCE([malloc.c]) -m4trace:configure.ac:159: -1- AC_DEFINE_TRACE_LITERAL([malloc]) -m4trace:configure.ac:159: -1- m4_pattern_allow([^malloc$]) -m4trace:configure.ac:159: -1- AH_OUTPUT([malloc], [/* Define to rpl_malloc if the replacement function should be used. */ -@%:@undef malloc]) -m4trace:configure.ac:160: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ -@%:@undef HAVE_STDLIB_H]) -m4trace:configure.ac:160: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H]) -m4trace:configure.ac:160: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) -m4trace:configure.ac:160: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC]) -m4trace:configure.ac:160: -1- m4_pattern_allow([^HAVE_REALLOC$]) -m4trace:configure.ac:160: -1- AH_OUTPUT([HAVE_REALLOC], [/* Define to 1 if your system has a GNU libc compatible `realloc\' function, - and to 0 otherwise. */ -@%:@undef HAVE_REALLOC]) -m4trace:configure.ac:160: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC]) -m4trace:configure.ac:160: -1- m4_pattern_allow([^HAVE_REALLOC$]) -m4trace:configure.ac:160: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS realloc.$ac_objext"]) -m4trace:configure.ac:160: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) -m4trace:configure.ac:160: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:160: -1- AC_LIBSOURCE([realloc.c]) -m4trace:configure.ac:160: -1- AC_DEFINE_TRACE_LITERAL([realloc]) -m4trace:configure.ac:160: -1- m4_pattern_allow([^realloc$]) -m4trace:configure.ac:160: -1- AH_OUTPUT([realloc], [/* Define to rpl_realloc if the replacement function should be used. */ -@%:@undef realloc]) -m4trace:configure.ac:161: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ -@%:@undef HAVE_MEMSET]) -m4trace:configure.ac:161: -1- AH_OUTPUT([HAVE_MKDIR], [/* Define to 1 if you have the `mkdir\' function. */ -@%:@undef HAVE_MKDIR]) -m4trace:configure.ac:161: -1- AH_OUTPUT([HAVE_POW], [/* Define to 1 if you have the `pow\' function. */ -@%:@undef HAVE_POW]) -m4trace:configure.ac:161: -1- AH_OUTPUT([HAVE_STRDUP], [/* Define to 1 if you have the `strdup\' function. */ -@%:@undef HAVE_STRDUP]) -m4trace:configure.ac:163: -1- AC_CONFIG_FILES([Makefile]) -m4trace:configure.ac:165: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) -m4trace:configure.ac:165: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:165: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([LTLIBOBJS]) -m4trace:configure.ac:165: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.ac:165: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) -m4trace:configure.ac:165: -1- AC_SUBST([am__EXEEXT_TRUE]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) -m4trace:configure.ac:165: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) -m4trace:configure.ac:165: -1- AC_SUBST([am__EXEEXT_FALSE]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) -m4trace:configure.ac:165: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) -m4trace:configure.ac:165: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) -m4trace:configure.ac:165: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([top_builddir]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([top_build_prefix]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([srcdir]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([abs_srcdir]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([top_srcdir]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([abs_top_srcdir]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([builddir]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([abs_builddir]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([abs_top_builddir]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([INSTALL]) -m4trace:configure.ac:165: -1- AC_SUBST_TRACE([MKDIR_P]) diff --git a/new_release.md b/new_release.md index 279cbfa..83076a1 100644 --- a/new_release.md +++ b/new_release.md @@ -4,3 +4,13 @@ Before releasing a new version (e.g., v100.0.1), - update doc/manual.rst if needed - update AC_INIT in configure.ac +Files generated by autotools (`autoreconf -iv`) and related to bioconda-build +- autom4te.cache (this dir has been added into .gitignore and can be removed) +- aclocal.m4 +- conf.h.in +- configure +- depcomp +- install-sh +- Makefile.in +- missing + From b9852eb5b05adfd8345e872cdfe8254c93446516 Mon Sep 17 00:00:00 2001 From: hxj5 Date: Sat, 30 Oct 2021 10:32:32 +0800 Subject: [PATCH 3/8] config restructure --- src/cellsnp.c | 6 +++- src/config.h | 71 ++-------------------------------------------- src/csp.c | 2 +- src/csp.h | 73 ++++++++++++++++++++++++++++++++++++++++++++++-- src/csp_pileup.c | 5 ++-- 5 files changed, 82 insertions(+), 75 deletions(-) diff --git a/src/cellsnp.c b/src/cellsnp.c index 4a6cabf..16aee67 100644 --- a/src/cellsnp.c +++ b/src/cellsnp.c @@ -3,6 +3,9 @@ */ /* TODO: +- add --max-base-qual option to set max per base quality for genotyping + * in htslib, per base qualities are stored in the Phred scale with no +33 offset. + * get_qual_vector() in mplp.c. - support calling germline SNPs for multiple bam files? * in bulk mode - add --max-depth for mode 2? @@ -90,7 +93,7 @@ static void gll_set_default(global_settings *gs) { gs->min_len = CSP_MIN_LEN; gs->min_mapq = CSP_MIN_MAPQ; //gs->max_flag = -1; gs->rflag_filter = -1; gs->rflag_require = CSP_INCL_FMASK; - gs->plp_max_depth = CSP_PLP_MAX_DEPTH; gs->no_orphan = CSP_NO_ORPHAN; + gs->max_depth = CSP_MAX_DEPTH; gs->no_orphan = CSP_NO_ORPHAN; } } @@ -145,6 +148,7 @@ static void print_usage(FILE *fp) { fprintf(fp, " (when use UMI) or %s (otherwise)]\n", tmp_filter_noumi); fprintf(fp, " --minLEN INT Minimum mapped length for read filtering [%d]\n", CSP_MIN_LEN); fprintf(fp, " --minMAPQ INT Minimum MAPQ for read filtering [%d]\n", CSP_MIN_MAPQ); + //fprintf(fp, " --maxDepth INT Maximum depth for read filtering [%s]\n", fprintf(fp, " --countORPHAN If use, do not skip anomalous read pairs.\n"); fprintf(fp, "\n"); fprintf(fp, "Note that the \"--maxFLAG\" option is now deprecated, please use \"--inclFLAG\" or \"--exclFLAG\"\n"); diff --git a/src/config.h b/src/config.h index 9cb63d7..ca52115 100644 --- a/src/config.h +++ b/src/config.h @@ -13,73 +13,8 @@ #define CSP_VERSION "1.2.1" #define CSP_AUTHOR "hxj5" -#define JF_ZIP_TYPE 2 // use bgzip as zip method for JFile -#define CSP_FIT_MULTI_SMP 1 // if let nthread auto fit multi samples. 0, no; 1, yes. -#define TP_MAX_OPEN 1024 // default max number of open files - -typedef struct _gll_settings global_settings; - -/* Define default values of global parameters. */ -#define CSP_CHROM_ALL {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22"} -#define CSP_NCHROM 22 -#define CSP_CELL_TAG "CB" -#define CSP_UMI_TAG "Auto" -#define CSP_NTHREAD 1 -#define CSP_MIN_COUNT 20 -#define CSP_MIN_MAF 0.0 -#define CSP_MIN_LEN 30 -#define CSP_MIN_MAPQ 20 -/* the following three macros are deprecated, use CSP_EXCL_FMASK* and CSP_INCL_FMASK* instead. -#define CSP_MAX_SAM_FLAG 4096 -#define CSP_MAX_FLAG_WITH_UMI CSP_MAX_SAM_FLAG -#define CSP_MAX_FLAG_WITHOUT_UMI 255 -*/ - -#define CSP_OUT_VCF_CELLS "cellSNP.cells.vcf" -#define CSP_OUT_VCF_BASE "cellSNP.base.vcf" -#define CSP_OUT_SAMPLES "cellSNP.samples.tsv" -#define CSP_OUT_MTX_AD "cellSNP.tag.AD.mtx" -#define CSP_OUT_MTX_DP "cellSNP.tag.DP.mtx" -#define CSP_OUT_MTX_OTH "cellSNP.tag.OTH.mtx" - -/* default values of pileup */ -// default excluding flag mask, reads with any flag mask bit set would be filtered. -#define CSP_EXCL_FMASK_UMI (BAM_FUNMAP | BAM_FSECONDARY | BAM_FQCFAIL) -#define CSP_EXCL_FMASK_NOUMI (BAM_FUNMAP | BAM_FSECONDARY | BAM_FQCFAIL | BAM_FDUP) -// default including flag mask, reads with all flag mask bit unset would be filtered. -#define CSP_INCL_FMASK 0 -// default max depth for one site of one bam file, 0 means highest possible value. used by bam_mplp_set_maxcnt(). -#define CSP_PLP_MAX_DEPTH 0 -// if discard orphan reads -#define CSP_NO_ORPHAN 1 - -// if the tmp files to be zipped: 0: no, 1: yes. -#define CSP_TMP_ZIP 1 - -// output settings -#define CSP_VCF_CELLS_HEADER "##fileformat=VCFv4.2\n" \ - "##source=cellSNP_v" CSP_VERSION "\n" \ - "##FILTER=\n" \ - "##FILTER=\n" \ - "##INFO=\n" \ - "##INFO=\n" \ - "##INFO=\n" \ - "##FORMAT=\n" \ - "##FORMAT=\n" \ - "##FORMAT=\n" \ - "##FORMAT=\n" \ - "##FORMAT=\n" \ - "##FORMAT=\n" - -#define CSP_VCF_CELLS_CONTIG "##contig=\n##contig=\n##contig=\n##contig=\n##contig=\n" \ - "##contig=\n##contig=\n##contig=\n##contig=\n##contig=\n" \ - "##contig=\n##contig=\n##contig=\n##contig=\n##contig=\n" \ - "##contig=\n##contig=\n##contig=\n##contig=\n##contig=\n" \ - "##contig=\n##contig=\n##contig=\n##contig=\n" - -#define CSP_MTX_HEADER "%%MatrixMarket matrix coordinate integer general\n" \ - "%\n" - -#define CSP_VCF_BASE_HEADER "##fileformat=VCFv4.2\n" +#define JF_ZIP_TYPE 2 // 1, gzip; 2, bgzip. +#define CSP_FIT_MULTI_SMP 1 // nthread auto fit multi samples? 0, no; 1, yes. #endif + diff --git a/src/csp.c b/src/csp.c index d34b971..0595b7e 100644 --- a/src/csp.c +++ b/src/csp.c @@ -63,7 +63,7 @@ void gll_setting_print(FILE *fp, global_settings *gs, char *prefix) { fprintf(fp, "%smin_len = %d, min_mapq = %d\n", prefix, gs->min_len, gs->min_mapq); //fprintf(fp, "%smax_flag = %d\n", prefix, gs->max_flag); fprintf(fp, "%srflag_filter = %d, rflag_require = %d\n", prefix, gs->rflag_filter, gs->rflag_require); - fprintf(fp, "%splp_max_depth = %d, no_orphan = %d\n", prefix, gs->plp_max_depth, gs->no_orphan); + fprintf(fp, "%smax_depth = %d, no_orphan = %d\n", prefix, gs->max_depth, gs->no_orphan); } } diff --git a/src/csp.h b/src/csp.h index ece5ab7..b786a1d 100644 --- a/src/csp.h +++ b/src/csp.h @@ -5,6 +5,7 @@ #define CSP_CSP_H #include +#include #include "htslib/sam.h" #include "htslib/kstring.h" #include "htslib/regidx.h" @@ -14,14 +15,80 @@ #include "snp.h" #include "thpool.h" +/* Define default values of global parameters. */ +#define CSP_CHROM_ALL {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22"} +#define CSP_NCHROM 22 +#define CSP_CELL_TAG "CB" +#define CSP_UMI_TAG "Auto" +#define CSP_NTHREAD 1 +#define CSP_MIN_COUNT 20 +#define CSP_MIN_MAF 0.0 +#define CSP_MIN_LEN 30 +#define CSP_MIN_MAPQ 20 +/* the following three macros are deprecated, use CSP_EXCL_FMASK* and CSP_INCL_FMASK* instead. +#define CSP_MAX_SAM_FLAG 4096 +#define CSP_MAX_FLAG_WITH_UMI CSP_MAX_SAM_FLAG +#define CSP_MAX_FLAG_WITHOUT_UMI 255 +*/ + +#define CSP_OUT_VCF_CELLS "cellSNP.cells.vcf" +#define CSP_OUT_VCF_BASE "cellSNP.base.vcf" +#define CSP_OUT_SAMPLES "cellSNP.samples.tsv" +#define CSP_OUT_MTX_AD "cellSNP.tag.AD.mtx" +#define CSP_OUT_MTX_DP "cellSNP.tag.DP.mtx" +#define CSP_OUT_MTX_OTH "cellSNP.tag.OTH.mtx" + +/* default values of pileup */ +// default excluding flag mask, reads with any flag mask bit set would be filtered. +#define CSP_EXCL_FMASK_UMI (BAM_FUNMAP | BAM_FSECONDARY | BAM_FQCFAIL) +#define CSP_EXCL_FMASK_NOUMI (BAM_FUNMAP | BAM_FSECONDARY | BAM_FQCFAIL | BAM_FDUP) +// default including flag mask, reads with all flag mask bit unset would be filtered. +#define CSP_INCL_FMASK 0 +// default max depth for one site of one bam file, 0 means highest possible value. +// It will be used by csp_fetch and the bam_mplp_set_maxcnt() in csp_pileup. +#define CSP_MAX_DEPTH 0 +// if discard orphan reads +#define CSP_NO_ORPHAN 1 + +// if the tmp files to be zipped: 0: no, 1: yes. +#define CSP_TMP_ZIP 1 + +// output settings +#define CSP_VCF_CELLS_HEADER "##fileformat=VCFv4.2\n" \ + "##source=cellSNP_v" CSP_VERSION "\n" \ + "##FILTER=\n" \ + "##FILTER=\n" \ + "##INFO=\n" \ + "##INFO=\n" \ + "##INFO=\n" \ + "##FORMAT=\n" \ + "##FORMAT=\n" \ + "##FORMAT=\n" \ + "##FORMAT=\n" \ + "##FORMAT=\n" \ + "##FORMAT=\n" + +#define CSP_VCF_CELLS_CONTIG "##contig=\n##contig=\n##contig=\n##contig=\n##contig=\n" \ + "##contig=\n##contig=\n##contig=\n##contig=\n##contig=\n" \ + "##contig=\n##contig=\n##contig=\n##contig=\n##contig=\n" \ + "##contig=\n##contig=\n##contig=\n##contig=\n##contig=\n" \ + "##contig=\n##contig=\n##contig=\n##contig=\n" + +#define CSP_MTX_HEADER "%%MatrixMarket matrix coordinate integer general\n" \ + "%\n" + +#define CSP_VCF_BASE_HEADER "##fileformat=VCFv4.2\n" + #if CSP_FIT_MULTI_SMP - #define TP_EUNDEF 1 // error that undefined - #define TP_EMFILE (1 << 1) // error that too many open files + #define TP_EUNDEF 1 // error that undefined + #define TP_EMFILE (1 << 1) // error that too many open files #endif +#define TP_MAX_OPEN 1024 // default max number of open files /* * Global settings */ +typedef struct _gll_settings global_settings; /*Structure that stores global settings/options/parameters. Note: @@ -67,7 +134,7 @@ struct _gll_settings { * */ int rflag_filter; // excluding flag mask, reads with any flag mask bit set would be filtered. int rflag_require; // including flag mask, reads with all flag mask bit unset would be filtered. - int plp_max_depth; // max depth for one site of one file, 0 means highest possible value. + int max_depth; // max depth for one site of one file, 0 means highest possible value. int no_orphan; // 0 or 1. 1: donot use orphan reads; 0: use orphan reads. }; diff --git a/src/csp_pileup.c b/src/csp_pileup.c index 43f9d24..c7babcc 100644 --- a/src/csp_pileup.c +++ b/src/csp_pileup.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "thpool.h" #include "htslib/sam.h" #include "config.h" @@ -299,11 +300,11 @@ static int csp_pileup_core(void *args) { /* pileup each SNP. */ // init mpileup - if (gs->plp_max_depth <= 0) { + if (gs->max_depth <= 0) { max_depth = INT_MAX; fprintf(stderr, "[W::%s] Max depth set to maximum value (%d)\n", __func__, INT_MAX); } else { - max_depth = gs->plp_max_depth; + max_depth = gs->max_depth; if (max_depth > (1 << 20) / (float) nfs) { fprintf(stderr, "[W::%s] Combined max depth is above 1M. Potential memory hog!\n", __func__); } From 23266b68afc4ebe61b163308334294fb22fc520d Mon Sep 17 00:00:00 2001 From: hxj5 Date: Sat, 30 Oct 2021 15:25:45 +0800 Subject: [PATCH 4/8] add --maxDEPTH --- src/cellsnp.c | 16 +++++++++++++--- src/csp.c | 2 +- src/csp.h | 4 ++-- src/csp_fetch.c | 12 ++++++------ src/csp_pileup.c | 23 +++++++++-------------- 5 files changed, 31 insertions(+), 26 deletions(-) diff --git a/src/cellsnp.c b/src/cellsnp.c index 16aee67..f2b5803 100644 --- a/src/cellsnp.c +++ b/src/cellsnp.c @@ -8,7 +8,6 @@ * get_qual_vector() in mplp.c. - support calling germline SNPs for multiple bam files? * in bulk mode -- add --max-depth for mode 2? - add -f option to use fasta? * add fixref and fix-mtx? * !! WARNING !! in mode 1, the output could contain Homozygous SNV even with --minMAF 0.3. e.g., assuming one input SNV has @@ -50,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -148,7 +148,7 @@ static void print_usage(FILE *fp) { fprintf(fp, " (when use UMI) or %s (otherwise)]\n", tmp_filter_noumi); fprintf(fp, " --minLEN INT Minimum mapped length for read filtering [%d]\n", CSP_MIN_LEN); fprintf(fp, " --minMAPQ INT Minimum MAPQ for read filtering [%d]\n", CSP_MIN_MAPQ); - //fprintf(fp, " --maxDepth INT Maximum depth for read filtering [%s]\n", + fprintf(fp, " --maxDEPTH INT Maximum depth for one site of one file; 0 means highest possible value [%d]\n", CSP_MAX_DEPTH); fprintf(fp, " --countORPHAN If use, do not skip anomalous read pairs.\n"); fprintf(fp, "\n"); fprintf(fp, "Note that the \"--maxFLAG\" option is now deprecated, please use \"--inclFLAG\" or \"--exclFLAG\"\n"); @@ -272,6 +272,11 @@ static int check_args(global_settings *gs) { if (getrlimit(RLIMIT_NOFILE, &r) < 0) { fprintf(stderr, "[E::%s] getrlimit error.\n", __func__); return -2; } gs->tp_max_open = (int) r.rlim_cur; } + // check max-depth + if (gs->max_depth <= 0) { + gs->max_depth = INT_MAX; + fprintf(stderr, "[W::%s] Max depth set to maximum value (%d)\n", __func__, INT_MAX); + } return 0; } @@ -359,7 +364,10 @@ int main(int argc, char **argv) { {"printSkipSNPs", no_argument, NULL, 13}, {"inclFLAG", required_argument, NULL, 14}, {"exclFLAG", required_argument, NULL, 15}, - {"countORPHAN", no_argument, NULL, 16} + {"countORPHAN", no_argument, NULL, 16}, + {"maxDEPTH", required_argument, NULL, 17}, + {"maxDepth", required_argument, NULL, 17}, + {"maxdepth", required_argument, NULL, 17} }; if (1 == argc) { print_usage(stderr); goto fail; } while ((c = getopt_long(argc, argv, "hVs:S:O:R:T:b:i:I:p:", lopts, NULL)) != -1) { @@ -429,6 +437,7 @@ int main(int argc, char **argv) { goto fail; } else { break; } case 16: gs.no_orphan = 0; break; + case 17: gs.max_depth = atoi(optarg); break; default: fprintf(stderr,"Invalid option: '%c'\n", c); goto fail; } } @@ -626,3 +635,4 @@ int main(int argc, char **argv) { } return 1; } + diff --git a/src/csp.c b/src/csp.c index 0595b7e..617a9de 100644 --- a/src/csp.c +++ b/src/csp.c @@ -156,7 +156,7 @@ int csp_mplp_push(csp_pileup_t *pileup, csp_mplp_t *mplp, int sid, global_settin idx = seq_nt16_idx2int(pileup->base); plp->bc[idx]++; list_qu_push(plp->qu[idx], pileup->qual); - } // else: do nothing. + } else { return 2; } // umi has already been pushed before } else { idx = seq_nt16_idx2int(pileup->base); plp->bc[idx]++; diff --git a/src/csp.h b/src/csp.h index b786a1d..071da5d 100644 --- a/src/csp.h +++ b/src/csp.h @@ -5,7 +5,6 @@ #define CSP_CSP_H #include -#include #include "htslib/sam.h" #include "htslib/kstring.h" #include "htslib/regidx.h" @@ -181,12 +180,13 @@ int csp_mplp_prepare(csp_mplp_t *mplp, global_settings *gs); @param mplp Pointer of csp_mplp_t structure pushing into. @param sid Index of Sample ID in the input Sample IDs. @param gs Pointer of global_settings structure. -@return 0 if success; +@return 0 if successfully pushed one new record; Negative numbers for error: -1, neither barcodes or Sample IDs are used. -2, khash_put error. Positive numbers for warning: 1, cell-barcode is not in input barcode-list; + 2, umi has already been pushed before; @note 1. To speed up, the caller should guarantee that: a) the parameters are valid, i.e. mplp and gs must not be NULL. In fact, this function is supposed to be diff --git a/src/csp_fetch.c b/src/csp_fetch.c index b9dcd6b..6839dd0 100644 --- a/src/csp_fetch.c +++ b/src/csp_fetch.c @@ -108,14 +108,14 @@ static int fetch_snp(snp_t *snp, csp_bam_fs **fs, htsFile **fp, int nfs, csp_pil csp_bam_fs *bs = NULL; hts_itr_t *iter = NULL; int i, tid, r, ret, st, state = -1; - size_t npushed = 0; + size_t npush1; kstring_t ks = KS_INITIALIZE, *s = &ks; #if DEBUG size_t npileup = 0; #endif mplp->ref_idx = snp->ref ? seq_nt16_char2int(snp->ref) : -1; mplp->alt_idx = snp->alt ? seq_nt16_char2int(snp->alt) : -1; - for (i = 0; i < nfs; i++) { + for (i = 0, npush1 = 0; i < nfs; i++, npush1 = 0) { bs = fs[i]; tid = csp_sam_hdr_name2id(bs->hdr, snp->chr, s); ks_clear(s); @@ -125,22 +125,22 @@ static int fetch_snp(snp_t *snp, csp_bam_fs **fs, htsFile **fp, int nfs, csp_pil #if DEBUG npileup++; #endif + if (npush1 >= gs->max_depth) { npush1 = 0; break; } if (0 == (st = fetch_read(snp->pos, pileup, gs))) { // no need to reset pileup as the values in it will be immediately overwritten. if (use_barcodes(gs)) { r = csp_mplp_push(pileup, mplp, -1, gs); } else if (use_sid(gs)) { r = csp_mplp_push(pileup, mplp, i, gs); } else { state = -1; goto fail; } - if (r < 0) { state = -1; goto fail; } // else if r == 1: pileuped barcode is not in the input barcode list. - else if (r == 0) { npushed++; } + if (r < 0) { state = -1; goto fail; } + else if (r == 0) { npush1++; } // else if r > 0: do nothing } else if (st < 0) { state = -1; goto fail; } } if (ret < -1) { state = -1; goto fail; } else { hts_itr_destroy(iter); iter = NULL; } // TODO: check if could reset iter? } #if DEBUG - fprintf(stderr, "[D::%s] before mplp statistics: npileup = %ld; npushed = %ld; the mplp is:\n", __func__, npileup, npushed); + fprintf(stderr, "[D::%s] before mplp statistics: npileup = %ld; the mplp is:\n", __func__, npileup); csp_mplp_print_(stderr, mplp, "\t"); #endif - if (npushed < gs->min_count) { state = 1; goto fail; } if ((ret = csp_mplp_stat(mplp, gs)) != 0) { state = (ret > 0) ? 1 : -1; goto fail; } #if DEBUG fprintf(stderr, "[D::%s] after mplp statistics: the mplp is:\n", __func__); diff --git a/src/csp_pileup.c b/src/csp_pileup.c index c7babcc..5d6815f 100644 --- a/src/csp_pileup.c +++ b/src/csp_pileup.c @@ -135,30 +135,30 @@ static int pileup_snp(hts_pos_t pos, int *mp_n, const bam_pileup1_t **mp_plp, in { const bam_pileup1_t *bp = NULL; int i, j, r, ret, st, state = -1; - size_t npushed = 0; + size_t npush1; #if DEBUG size_t npileup = 0; #endif - for (i = 0; i < nfs; i++) { + for (i = 0, npush1 = 0; i < nfs; i++, npush1 = 0) { for (j = 0; j < mp_n[i]; j++) { bp = mp_plp[i] + j; #if DEBUG npileup++; #endif + if (npush1 >= gs->max_depth) { npush1 = 0; break; } if (0 == (st = pileup_read(pos, bp, pileup, gs))) { // no need to reset pileup as the values in it will be immediately overwritten. if (use_barcodes(gs)) { r = csp_mplp_push(pileup, mplp, -1, gs); } else if (use_sid(gs)) { r = csp_mplp_push(pileup, mplp, i, gs); } else { state = -1; goto fail; } - if (r < 0) { state = -1; goto fail; } // else if r == 1: pileuped barcode is not in the input barcode list. - else if (r == 0) { npushed++; } + if (r < 0) { state = -1; goto fail; } + else if (r == 0) { npush1++; } // else if r > 0: do nothing } else if (st < 0) { state = -1; goto fail; } } } #if DEBUG - fprintf(stderr, "[D::%s] before mplp statistics: npileup = %ld; npushed = %ld; the mplp is:\n", __func__, npileup, npushed); + fprintf(stderr, "[D::%s] before mplp statistics: npileup = %ld; the mplp is:\n", __func__, npileup); csp_mplp_print_(stderr, mplp, "\t"); #endif - if (npushed < gs->min_count) { state = 1; goto fail; } if ((ret = csp_mplp_stat(mplp, gs)) != 0) { state = (ret > 0) ? 1 : -1; goto fail; } #if DEBUG fprintf(stderr, "[D::%s] after mplp statistics: the mplp is:\n", __func__); @@ -300,14 +300,9 @@ static int csp_pileup_core(void *args) { /* pileup each SNP. */ // init mpileup - if (gs->max_depth <= 0) { - max_depth = INT_MAX; - fprintf(stderr, "[W::%s] Max depth set to maximum value (%d)\n", __func__, INT_MAX); - } else { - max_depth = gs->max_depth; - if (max_depth > (1 << 20) / (float) nfs) { - fprintf(stderr, "[W::%s] Combined max depth is above 1M. Potential memory hog!\n", __func__); - } + max_depth = INT_MAX; + if (gs->max_depth > (1 << 20) / (float) nfs) { + fprintf(stderr, "[W::%s] Combined max depth is above 1M. Potential memory hog!\n", __func__); } for (msnp = nsnp = 0; n < d->m; n++, msnp = nsnp = 0) { #if CSP_FIT_MULTI_SMP From 6a847a98c32e544493cd45d1d3b63a86603ae350 Mon Sep 17 00:00:00 2001 From: hxj5 Date: Tue, 2 Nov 2021 21:09:56 +0800 Subject: [PATCH 5/8] remove redundant comments and re-format codes --- src/biods.h | 14 ++ src/cellsnp.c | 234 ++++++++++++++------ src/config.h | 2 +- src/csp.c | 158 +++++++------ src/csp.h | 176 ++++----------- src/csp_fetch.c | 409 +++++++++++++++++++++------------- src/csp_pileup.c | 566 ++++++++++++++++++++++++++++++----------------- src/jfile.c | 111 +++++++--- src/jfile.h | 130 +++++------ src/jmempool.h | 111 ++++------ src/jnumeric.h | 62 +++--- src/jsam.c | 8 +- src/jsam.h | 72 +++--- src/jstring.c | 2 +- src/jstring.h | 32 +-- src/mplp.c | 160 +++++++------- src/mplp.h | 427 +++++++++++------------------------ src/snp.c | 52 +++-- src/snp.h | 70 ++---- 19 files changed, 1474 insertions(+), 1322 deletions(-) create mode 100644 src/biods.h diff --git a/src/biods.h b/src/biods.h new file mode 100644 index 0000000..0a4adca --- /dev/null +++ b/src/biods.h @@ -0,0 +1,14 @@ +//biods.h + +#ifndef __BIODS_H__ +#define __BIODS_H__ + +#include "jmempool.h" + +#define pool_str_free(s) free(*(s)) +#define pool_str_reset(s) free(*(s)) +JMEMPOOL_INIT(str, char*, pool_str_free, pool_str_reset) +typedef jmempool_t(str) pool_str_t; + +#endif + diff --git a/src/cellsnp.c b/src/cellsnp.c index f2b5803..c25ba96 100644 --- a/src/cellsnp.c +++ b/src/cellsnp.c @@ -1,4 +1,4 @@ -/* cellsnp main function +/* cellsnp.c - cellsnp main function * Author: Xianejie Huang */ @@ -66,32 +66,34 @@ #include "mplp.h" #include "snp.h" -/*@abstract Set default values for global_settings structure. -@param gs Pointer to global_settings structure returned by gll_setting_init(). -@return Void. - -@note Internal use only! - */ +// Set default values for global_settings structure. +// Internal use only! static void gll_set_default(global_settings *gs) { if (gs) { + // Input Output gs->in_fn_file = NULL; gs->in_fns = NULL; gs->nin = 0; gs->out_dir = NULL; gs->out_vcf_base = NULL; gs->out_vcf_cells = NULL; gs->out_samples = NULL; gs->out_mtx_ad = NULL; gs->out_mtx_dp = NULL; gs->out_mtx_oth = NULL; - gs->is_genotype = 0; gs->is_out_zip = 0; - gs->snp_list_file = NULL; snplist_init(gs->pl); gs->is_target = 0; gs->targets = NULL; + gs->snp_list_file = NULL; kv_init(gs->pl); gs->is_target = 0; gs->targets = NULL; gs->barcode_file = NULL; gs->nbarcode = 0; gs->barcodes = NULL; gs->sid_list_file = NULL; gs->sample_ids = NULL; gs->nsid = 0; + + // Options + gs->is_genotype = 0; gs->is_out_zip = 0; char *chrom_tmp[] = CSP_CHROM_ALL; gs->chroms = (char**) calloc(CSP_NCHROM, sizeof(char*)); - for (gs->nchrom = 0; gs->nchrom < CSP_NCHROM; gs->nchrom++) { gs->chroms[gs->nchrom] = safe_strdup(chrom_tmp[gs->nchrom]); } + for (gs->nchrom = 0; gs->nchrom < CSP_NCHROM; gs->nchrom++) { + gs->chroms[gs->nchrom] = safe_strdup(chrom_tmp[gs->nchrom]); + } gs->cell_tag = safe_strdup(CSP_CELL_TAG); gs->umi_tag = safe_strdup(CSP_UMI_TAG); gs->nthread = CSP_NTHREAD; gs->tp = NULL; gs->tp_max_open = TP_MAX_OPEN; gs->mthread = CSP_NTHREAD; gs->tp_errno = 0; gs->tp_ntry = 0; gs->min_count = CSP_MIN_COUNT; gs->min_maf = CSP_MIN_MAF; gs->double_gl = 0; + + // Read Filtering gs->min_len = CSP_MIN_LEN; gs->min_mapq = CSP_MIN_MAPQ; - //gs->max_flag = -1; gs->rflag_filter = -1; gs->rflag_require = CSP_INCL_FMASK; gs->max_depth = CSP_MAX_DEPTH; gs->no_orphan = CSP_NO_ORPHAN; } @@ -165,15 +167,13 @@ static inline int cmp_barcodes(const void *x, const void *y) { return strcmp(*((char**) x), *((char**) y)); } -/*@abstract Perform basic check for global settings right after running getopt()/getopt_long() function. -@param gs Pointer to the global settings. -@return 0 if no error, negative numbers otherwise: - -1, should print_usage after return. - -2, no action. - -@note This is just basic check for the shared parameters of different running modes. - More careful and personalized check would be performed by each running mode. - */ +/*!@func +@abstract Perform basic check for global settings right after running getopt()/getopt_long() function. +@param gs Pointer to the global settings. +@return 0 if no error, negative numbers otherwise: + -1, should print_usage after return. + -2, no action. +*/ static int check_args(global_settings *gs) { int i; struct rlimit r; @@ -190,14 +190,22 @@ static int check_args(global_settings *gs) { return -1; } for (i = 0; i < gs->nin; i++) { - if (0 != access(gs->in_fns[i], F_OK)) { fprintf(stderr, "[E::%s] '%s' does not exist.\n", __func__, gs->in_fns[i]); return -2; } + if (0 != access(gs->in_fns[i], F_OK)) { + fprintf(stderr, "[E::%s] '%s' does not exist.\n", __func__, gs->in_fns[i]); + return -2; + } } + if (gs->out_dir) { if (0 != access(gs->out_dir, F_OK) && 0 != mkdir(gs->out_dir, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH)) { fprintf(stderr, "[E::%s] '%s' does not exist.\n", __func__, gs->out_dir); return -2; } - } else { fprintf(stderr, "[E::%s] should specify -O/--outDir option.\n", __func__); return -1; } + } else { + fprintf(stderr, "[E::%s] should specify -O/--outDir option.\n", __func__); + return -1; + } + /* 1. In current version, one and only one of barcodes and sample-ids would exist and work. Prefer barcodes. 2. For barcodes, the barcode file would not be read unless cell-tag is set, i.e. the barcodes and cell-tag are effective only when both of them are valid. @@ -207,8 +215,12 @@ static int check_args(global_settings *gs) { free(gs->cell_tag); gs->cell_tag = NULL; } if (gs->sample_ids || gs->sid_list_file) { - if (gs->barcode_file) { fprintf(stderr, "[E::%s] should not specify barcodes and sample IDs at the same time.\n", __func__); return -1; } - else if (gs->cell_tag) { free(gs->cell_tag); gs->cell_tag = NULL; } + if (gs->barcode_file) { + fprintf(stderr, "[E::%s] should not specify barcodes and sample IDs at the same time.\n", __func__); + return -1; + } else if (gs->cell_tag) { + free(gs->cell_tag); gs->cell_tag = NULL; + } } if (gs->cell_tag && gs->barcode_file) { if (gs->sample_ids || gs->sid_list_file) { @@ -217,7 +229,9 @@ static int check_args(global_settings *gs) { } else if (NULL == (gs->barcodes = hts_readlines(gs->barcode_file, &gs->nbarcode))) { fprintf(stderr, "[E::%s] could not read barcode file '%s'\n", __func__, gs->barcode_file); return -2; - } else { qsort(gs->barcodes, gs->nbarcode, sizeof(char*), cmp_barcodes); } + } else { + qsort(gs->barcodes, gs->nbarcode, sizeof(char*), cmp_barcodes); + } } else if ((NULL == gs->cell_tag) ^ (NULL == gs->barcode_file)) { fprintf(stderr, "[E::%s] should not specify barcodes or cell-tag alone.\n", __func__); return -1; @@ -229,7 +243,11 @@ static int check_args(global_settings *gs) { return -2; } kstring_t ks = KS_INITIALIZE, *s = &ks; - for (i = 0; i < gs->nin; i++) { ksprintf(s, "Sample_%d", i); gs->sample_ids[i] = strdup(ks_str(s)); ks_clear(s); } + for (i = 0; i < gs->nin; i++) { + ksprintf(s, "Sample_%d", i); + gs->sample_ids[i] = strdup(ks_str(s)); + ks_clear(s); + } gs->nsid = i; ks_free(s); } else if (NULL == (gs->sample_ids = hts_readlines(gs->sid_list_file, &gs->nsid))) { fprintf(stderr, "[E::%s] could not read '%s'\n", __func__, gs->sid_list_file); @@ -244,34 +262,64 @@ static int check_args(global_settings *gs) { return -2; } } + /* 1. In current version, one and only one of pos_list and chrom(s) would exist and work. Prefer pos_list. 2. Sometimes, snp_list_file and chroms are both not NULL as the chroms has been set to default value when - global_settings structure was just created. In this case, free chroms and save snp_list_file. */ + global_settings structure was just created. In this case, free chroms and save snp_list_file. + */ if (NULL == gs->snp_list_file || 0 == strcmp(gs->snp_list_file, "None") || 0 == strcmp(gs->snp_list_file, "none")) { - if (NULL == gs->chroms) { fprintf(stderr, "[E::%s] should specify -R/--regionsVCF or --chrom option.\n", __func__); return -1; } - if (gs->snp_list_file) { free(gs->snp_list_file); gs->snp_list_file = NULL; } - } else if (gs->chroms) { str_arr_destroy(gs->chroms, gs->nchrom); gs->chroms = NULL; gs->nchrom = 0; } + if (NULL == gs->chroms) { + fprintf(stderr, "[E::%s] should specify -R/--regionsVCF or --chrom option.\n", __func__); + return -1; + } + if (gs->snp_list_file) { + free(gs->snp_list_file); gs->snp_list_file = NULL; + } + } else if (gs->chroms) { + str_arr_destroy(gs->chroms, gs->nchrom); + gs->chroms = NULL; gs->nchrom = 0; + } if (gs->umi_tag) { if (0 == strcmp(gs->umi_tag, "Auto")) { - if (gs->barcodes) { free(gs->umi_tag); gs->umi_tag = strdup("UR"); } - else { free(gs->umi_tag); gs->umi_tag = NULL; } - } else if (0 == strcmp(gs->umi_tag, "None") || 0 == strcmp(gs->umi_tag, "none")) { free(gs->umi_tag); gs->umi_tag = NULL; } + if (gs->barcodes) { + free(gs->umi_tag); gs->umi_tag = strdup("UR"); + } else { + free(gs->umi_tag); gs->umi_tag = NULL; + } + } else if (0 == strcmp(gs->umi_tag, "None") || 0 == strcmp(gs->umi_tag, "none")) { + free(gs->umi_tag); gs->umi_tag = NULL; + } } - //if (gs->max_flag < 0) { gs->max_flag = gs->umi_tag ? CSP_MAX_FLAG_WITH_UMI : CSP_MAX_FLAG_WITHOUT_UMI; } - if (gs->rflag_filter < 0) gs->rflag_filter = use_umi(gs) ? CSP_EXCL_FMASK_UMI : CSP_EXCL_FMASK_NOUMI; + + if (gs->rflag_filter < 0) + gs->rflag_filter = use_umi(gs) ? CSP_EXCL_FMASK_UMI : CSP_EXCL_FMASK_NOUMI; + // increase number of max open files if (gs->nin > 1) { - if (getrlimit(RLIMIT_NOFILE, &r) < 0) { fprintf(stderr, "[E::%s] getrlimit error.\n", __func__); return -2; } + if (getrlimit(RLIMIT_NOFILE, &r) < 0) { + fprintf(stderr, "[E::%s] getrlimit error.\n", __func__); + return -2; + } fprintf(stderr, "[I::%s] original limits of max open, soft = %d, hard = %d\n", __func__, (int) r.rlim_cur, (int) r.rlim_max); r.rlim_cur = r.rlim_max; - if (setrlimit(RLIMIT_NOFILE, &r) < 0) { fprintf(stderr, "[E::%s] setrlimit error.\n", __func__); return -2; } - if (getrlimit(RLIMIT_NOFILE, &r) < 0) { fprintf(stderr, "[E::%s] getrlimit error.\n", __func__); return -2; } + if (setrlimit(RLIMIT_NOFILE, &r) < 0) { + fprintf(stderr, "[E::%s] setrlimit error.\n", __func__); + return -2; + } + if (getrlimit(RLIMIT_NOFILE, &r) < 0) { + fprintf(stderr, "[E::%s] getrlimit error.\n", __func__); + return -2; + } fprintf(stderr, "[I::%s] new limits of max open, soft = %d, hard = %d\n", __func__, (int) r.rlim_cur, (int) r.rlim_max); gs->tp_max_open = (int) r.rlim_cur; } else { - if (getrlimit(RLIMIT_NOFILE, &r) < 0) { fprintf(stderr, "[E::%s] getrlimit error.\n", __func__); return -2; } + if (getrlimit(RLIMIT_NOFILE, &r) < 0) { + fprintf(stderr, "[E::%s] getrlimit error.\n", __func__); + return -2; + } gs->tp_max_open = (int) r.rlim_cur; } + // check max-depth if (gs->max_depth <= 0) { gs->max_depth = INT_MAX; @@ -280,7 +328,8 @@ static int check_args(global_settings *gs) { return 0; } -/*@abstract Output headers to files (vcf, mtx etc.) +/*!@func +@abstract Output headers to files (vcf, mtx etc.) @param fs Pointer of jfile_t that the header will be writen into. @param fm File mode; if NULL, use default file mode inside jfile_t. @param header Header to be outputed, ends with '\0'. @@ -319,11 +368,13 @@ int main(int argc, char **argv) { time(&start_time); time_info = localtime(&start_time); strftime(time_str, 30, "%Y-%m-%d %H:%M:%S", time_info); + /* Formal part */ global_settings gs; gll_set_default(&gs); kstring_t ks = KS_INITIALIZE, *s = &ks; int c, k, ret, print_time = 0, print_skip_snp = 0; + struct option lopts[] = { {"help", no_argument, NULL, 'h'}, {"version", no_argument, NULL, 'V'}, @@ -379,7 +430,7 @@ int main(int argc, char **argv) { if (NULL == (gs.in_fns = hts_readlist(optarg, 0, &gs.nin)) || gs.nin <= 0) { fprintf(stderr, "[E::%s] could not read input-list '%s' or list empty.\n", __func__, optarg); goto fail; - } else { break; } + } else { break; } case 'S': if (gs.in_fn_file) free(gs.in_fn_file); gs.in_fn_file = strdup(optarg); break; @@ -441,12 +492,14 @@ int main(int argc, char **argv) { default: fprintf(stderr,"Invalid option: '%c'\n", c); goto fail; } } + fprintf(stderr, "[I::%s] start time: %s\n", __func__, time_str); + + /* check global settings */ #if DEBUG fprintf(stderr, "[D::%s] global settings before checking:\n", __func__); gll_setting_print(stderr, &gs, "\t"); #endif - /* check global settings */ if ((ret = check_args(&gs)) < 0) { fprintf(stderr, "[E::%s] error global settings\n", __func__); if (ret == -1) { print_usage(stderr); } @@ -456,6 +509,7 @@ int main(int argc, char **argv) { fprintf(stderr, "[D::%s] global settings after checking:\n", __func__); gll_setting_print(stderr, &gs, "\t"); #endif + /* prepare output files. */ if (NULL == (gs.out_mtx_ad = jf_init()) || NULL == (gs.out_mtx_dp = jf_init()) || \ NULL == (gs.out_mtx_oth = jf_init()) || NULL == (gs.out_samples = jf_init()) || \ @@ -465,18 +519,24 @@ int main(int argc, char **argv) { } gs.out_mtx_ad->is_zip = 0; gs.out_mtx_ad->is_tmp = 0; gs.out_mtx_ad->fn = format_fn(join_path(gs.out_dir, CSP_OUT_MTX_AD), gs.out_mtx_ad->is_zip, s); ks_clear(s); + gs.out_mtx_dp->is_zip = 0; gs.out_mtx_dp->is_tmp = 0; gs.out_mtx_dp->fn = format_fn(join_path(gs.out_dir, CSP_OUT_MTX_DP), gs.out_mtx_dp->is_zip, s); ks_clear(s); + gs.out_mtx_oth->is_zip = 0; gs.out_mtx_oth->is_tmp = 0; gs.out_mtx_oth->fn = format_fn(join_path(gs.out_dir, CSP_OUT_MTX_OTH), gs.out_mtx_oth->is_zip, s); ks_clear(s); + gs.out_vcf_base->is_zip = gs.is_out_zip; gs.out_vcf_base->is_tmp = 0; gs.out_vcf_base->fn = format_fn(join_path(gs.out_dir, CSP_OUT_VCF_BASE), gs.out_vcf_base->is_zip, s); ks_clear(s); + gs.out_samples->is_zip = 0; gs.out_samples->is_tmp = 0; gs.out_samples->fn = format_fn(join_path(gs.out_dir, CSP_OUT_SAMPLES), gs.out_samples->is_zip, s); ks_clear(s); + if (gs.is_genotype) { gs.out_vcf_cells->is_zip = gs.is_out_zip; gs.out_vcf_cells->is_tmp = 0; gs.out_vcf_cells->fn = format_fn(join_path(gs.out_dir, CSP_OUT_VCF_CELLS), gs.out_vcf_cells->is_zip, s); ks_clear(s); } // no need to set is_tmp for these out files. + /* output headers to files. */ kputs(CSP_MTX_HEADER, s); if (output_headers(gs.out_mtx_ad, "wb", ks_str(s), ks_len(s)) < 0) { // output header to mtx_AD @@ -491,11 +551,19 @@ int main(int argc, char **argv) { fprintf(stderr, "[E::%s] fail to write header to '%s'\n", __func__, gs.out_mtx_oth->fn); goto fail; } ks_clear(s); + if (use_barcodes(&gs)) { // output samples. - for (k = 0; k < gs.nbarcode; k++) { kputs(gs.barcodes[k], s); kputc('\n', s); } + for (k = 0; k < gs.nbarcode; k++) { + kputs(gs.barcodes[k], s); + kputc('\n', s); + } } else if (use_sid(&gs)) { - for (k = 0; k < gs.nsid; k++) { kputs(gs.sample_ids[k], s); kputc('\n', s); } + for (k = 0; k < gs.nsid; k++) { + kputs(gs.sample_ids[k], s); + kputc('\n', s); + } } // else: should not come here! + if (output_headers(gs.out_samples, "wb", ks_str(s), ks_len(s)) < 0) { fprintf(stderr, "[E::%s] fail to write samples to '%s'\n", __func__, gs.out_samples->fn); goto fail; @@ -511,20 +579,31 @@ int main(int argc, char **argv) { kputs(CSP_VCF_CELLS_CONTIG, s); kputs("#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT", s); if (use_barcodes(&gs) && gs.barcodes) { - for (k = 0; k < gs.nbarcode; k++) { kputc_('\t', s); kputs(gs.barcodes[k], s); } + for (k = 0; k < gs.nbarcode; k++) { + kputc_('\t', s); + kputs(gs.barcodes[k], s); + } } else if (use_sid(&gs) && gs.sample_ids) { - for (k = 0; k < gs.nsid; k++) { kputc_('\t', s); kputs(gs.sample_ids[k], s); } - } else { fprintf(stderr, "[E::%s] neither barcodes or sample IDs exist.\n", __func__); goto fail; } + for (k = 0; k < gs.nsid; k++) { + kputc_('\t', s); + kputs(gs.sample_ids[k], s); + } + } else { + fprintf(stderr, "[E::%s] neither barcodes or sample IDs exist.\n", __func__); + goto fail; + } kputc('\n', s); if (output_headers(gs.out_vcf_cells, "wb", ks_str(s), ks_len(s)) < 0) { fprintf(stderr, "[E::%s] fail to write header to '%s'\n", __func__, gs.out_vcf_cells->fn); goto fail; } } + /* set file modes. */ gs.out_mtx_ad->fm = gs.out_mtx_dp->fm = gs.out_mtx_oth->fm = "ab"; gs.out_vcf_base->fm = "ab"; if (gs.is_genotype) { gs.out_vcf_cells->fm = "ab"; } + /* run based on the mode of input. Mode 1a: fetch a list of SNPs for a single BAM/SAM file with barcodes. Mode 1a(-T): pileup a list of SNPs for a single BAM/SAM file with barcodes. @@ -549,7 +628,7 @@ int main(int argc, char **argv) { fprintf(stderr, "[E::%s] get SNP list from '%s' failed.\n", __func__, gs.snp_list_file); print_time = 1; goto fail; } else { - n = snplist_size(gs.pl); + n = kv_size(gs.pl); fprintf(stderr, "[I::%s] pileuping %ld candidate variants ...\n", __func__, n); } if (NULL == (gs.targets = regidx_init(NULL, NULL, regidx_payload_free, sizeof(biallele_t*), NULL))) { @@ -557,20 +636,25 @@ int main(int argc, char **argv) { print_time = 1; goto fail; } for (i = 0; i < n; i++) { - snp = snplist_A(gs.pl, i); + snp = kv_A(gs.pl, i); if (NULL == (*ale = biallele_init())) { - fprintf(stderr, "[E::%s] failed to create biallele_t.\n", __func__); - print_time = 1; goto fail; - } else { (*ale)->ref = snp->ref; (*ale)->alt = snp->alt; } + fprintf(stderr, "[E::%s] failed to create biallele_t.\n", __func__); + print_time = 1; goto fail; + } else { + (*ale)->ref = snp->ref; (*ale)->alt = snp->alt; + } if (regidx_push(gs.targets, snp->chr, snp->chr + strlen(snp->chr) - 1, snp->pos, snp->pos, ale) < 0) { - fprintf(stderr, "[E::%s] failed to push regidx.\n", __func__); - free(ale); ale = NULL; // FIXME!! *ale should be safely freed. - print_time = 1; goto fail; + fprintf(stderr, "[E::%s] failed to push regidx.\n", __func__); + free(ale); ale = NULL; // FIXME!! *ale should be safely freed. + print_time = 1; goto fail; } } free(ale); ale = NULL; snplist_destroy(gs.pl); tmp = regidx_seq_names(gs.targets, &ntmp); - if (gs.chroms) { str_arr_destroy(gs.chroms, gs.nchrom); gs.nchrom = 0; } + if (gs.chroms) { + str_arr_destroy(gs.chroms, gs.nchrom); + gs.nchrom = 0; + } if (NULL == (gs.chroms = (char**) calloc(ntmp, sizeof(char*)))) { fprintf(stderr, "[E::%s] failed to allocate space for gs.chroms\n", __func__); print_time = 1; goto fail; @@ -580,48 +664,72 @@ int main(int argc, char **argv) { } if (gs.barcodes) { fprintf(stderr, "[I::%s] mode 1a(-T): pileup %d whole chromosomes in %d single cells.\n", __func__, gs.nchrom, gs.nbarcode); - if (run_mode1a_T(&gs) < 0) { fprintf(stderr, "[E::%s] running mode 1a(-T) failed.\n", __func__); print_time = 1; goto fail; } + if (run_mode1a_T(&gs) < 0) { + fprintf(stderr, "[E::%s] running mode 1a(-T) failed.\n", __func__); + print_time = 1; goto fail; + } } else { fprintf(stderr, "[I::%s] mode 1b(-T): pileup %d whole chromosomes in %d sample(s).\n", __func__, gs.nchrom, gs.nin); - if (run_mode1b_T(&gs) < 0) { fprintf(stderr, "[E::%s] running mode 1b(-T) failed.\n", __func__); print_time = 1; goto fail; } + if (run_mode1b_T(&gs) < 0) { + fprintf(stderr, "[E::%s] running mode 1b(-T) failed.\n", __func__); + print_time = 1; goto fail; + } } } else { if (get_snplist(gs.snp_list_file, &gs.pl, &ret, print_skip_snp) <= 0 || ret < 0) { fprintf(stderr, "[E::%s] get SNP list from '%s' failed.\n", __func__, gs.snp_list_file); print_time = 1; goto fail; - } else { fprintf(stderr, "[I::%s] fetching %ld candidate variants ...\n", __func__, snplist_size(gs.pl)); } + } else { + fprintf(stderr, "[I::%s] fetching %ld candidate variants ...\n", __func__, kv_size(gs.pl)); + } if (gs.barcodes) { fprintf(stderr, "[I::%s] mode 1a: fetch given SNPs in %d single cells.\n", __func__, gs.nbarcode); - if (run_mode1a(&gs) < 0) { fprintf(stderr, "[E::%s] running mode 1a failed.\n", __func__); print_time = 1; goto fail; } + if (run_mode1a(&gs) < 0) { + fprintf(stderr, "[E::%s] running mode 1a failed.\n", __func__); + print_time = 1; goto fail; + } } else { fprintf(stderr, "[I::%s] mode 1b: fetch given SNPs in %d bulk samples.\n", __func__, gs.nsid); - if (run_mode1b(&gs) < 0) { fprintf(stderr, "[E::%s] running mode 1b failed.\n", __func__); print_time = 1; goto fail; } + if (run_mode1b(&gs) < 0) { + fprintf(stderr, "[E::%s] running mode 1b failed.\n", __func__); + print_time = 1; goto fail; + } } } } else if (gs.chroms) { if (gs.barcodes) { fprintf(stderr, "[I::%s] mode 2a: pileup %d whole chromosomes in %d single cells.\n", __func__, gs.nchrom, gs.nbarcode); - if (run_mode2a(&gs) < 0) { fprintf(stderr, "[E::%s] running mode 2a failed.\n", __func__); print_time = 1; goto fail; } + if (run_mode2a(&gs) < 0) { + fprintf(stderr, "[E::%s] running mode 2a failed.\n", __func__); + print_time = 1; goto fail; + } } else { fprintf(stderr, "[I::%s] mode 2b: pileup %d whole chromosomes in %d sample(s).\n", __func__, gs.nchrom, gs.nin); - if (run_mode2b(&gs) < 0) { fprintf(stderr, "[E::%s] running mode 2b failed.\n", __func__); print_time = 1; goto fail; } + if (run_mode2b(&gs) < 0) { + fprintf(stderr, "[E::%s] running mode 2b failed.\n", __func__); + print_time = 1; goto fail; + } } } else { fprintf(stderr, "[E::%s] no proper mode to run, check input options.\n", __func__); print_usage(stderr); goto fail; } + /* clean */ ks_free(s); s = NULL; gll_setting_free(&gs); fprintf(stderr, "[I::%s] All Done!\n", __func__); + /* calc time spent */ time(&end_time); time_info = localtime(&end_time); strftime(time_str, 30, "%Y-%m-%d %H:%M:%S", time_info); fprintf(stderr, "[I::%s] end time: %s\n", __func__, time_str); fprintf(stderr, "[I::%s] time spent: %ld seconds.\n", __func__, end_time - start_time); + return 0; + fail: if (s) { ks_free(s); } gll_setting_free(&gs); diff --git a/src/config.h b/src/config.h index ca52115..877de07 100644 --- a/src/config.h +++ b/src/config.h @@ -1,4 +1,4 @@ -/* Global configure +/* config.h - Global configure * Author: Xianjie Huang */ #ifndef CSP_CONFIG_H diff --git a/src/csp.c b/src/csp.c index 617a9de..977d78e 100644 --- a/src/csp.c +++ b/src/csp.c @@ -1,4 +1,4 @@ -/* Utils +/* csp.c - Utils * Author: Xianjie Huang */ @@ -41,7 +41,6 @@ void gll_setting_free(global_settings *gs) { } } -/* print global settings. */ void gll_setting_print(FILE *fp, global_settings *gs, char *prefix) { if (gs) { int i; @@ -51,7 +50,7 @@ void gll_setting_print(FILE *fp, global_settings *gs, char *prefix) { fprintf(fp, "%sis_target = %d, num_of_pos = %ld\n", prefix, gs->is_target, gs->is_target ? (gs->targets ? (long) regidx_nregs(gs->targets) : 0) : - (long) snplist_size(gs->pl)); + (long) kv_size(gs->pl)); fprintf(fp, "%snum_of_barcodes = %d, num_of_samples = %d\n", prefix, gs->nbarcode, gs->nsid); fprintf(fp, "%s%d chroms: ", prefix, gs->nchrom); for (i = 0; i < gs->nchrom; i++) fprintf(fp, "%s ", gs->chroms[i]); @@ -74,136 +73,161 @@ int csp_mplp_prepare(csp_mplp_t *mplp, global_settings *gs) { char **sgnames; int i, nsg, r; csp_plp_t *plp; + /* init HashMap, pool of ul, pool of uu for mplp. */ - mplp->hsg = map_sg_init(); - if (NULL == mplp->hsg) { fprintf(stderr, "[E::%s] could not init map_sg_t structure.\n", __func__); return -1; } + mplp->hsg = kh_init(sample_group); + if (NULL == mplp->hsg) { + fprintf(stderr, "[E::%s] could not init map_sg_t structure.\n", __func__); + return -1; + } if (use_umi(gs)) { #if DEVELOP - mplp->pl = pool_ul_init(); - if (NULL == mplp->pl) { fprintf(stderr, "[E::%s] could not init pool_ul_t structure.\n", __func__); return -1; } - mplp->pu = pool_uu_init(); - if (NULL == mplp->pu) { fprintf(stderr, "[E::%s] could not init pool_uu_t structure.\n", __func__); return -1; } + mplp->pl = jmempool_init(list_umiunit); + if (NULL == mplp->pl) { + fprintf(stderr, "[E::%s] could not init pool_ul_t structure.\n", __func__); + return -1; + } + mplp->pu = jmempool_init(umi_unit); + if (NULL == mplp->pu) { + fprintf(stderr, "[E::%s] could not init pool_uu_t structure.\n", __func__); + return -1; + } #endif - mplp->su = pool_ps_init(); - if (NULL == mplp->su) { fprintf(stderr, "[E::%s] could not init pool_su_t structure.\n", __func__); return -1; } + mplp->su = jmempool_init(str); + if (NULL == mplp->su) { + fprintf(stderr, "[E::%s] could not init pool_su_t structure.\n", __func__); + return -1; + } } + /* set sample names for sample groups. */ - if (use_barcodes(gs)) { sgnames = gs->barcodes; nsg = gs->nbarcode; } - else if (use_sid(gs)) { sgnames = gs->sample_ids; nsg = gs->nsid; } - else { fprintf(stderr, "[E::%s] failed to set sample names.\n", __func__); return -1; } // should not come here! + if (use_barcodes(gs)) { + sgnames = gs->barcodes; nsg = gs->nbarcode; + } else if (use_sid(gs)) { + sgnames = gs->sample_ids; nsg = gs->nsid; + } else { + fprintf(stderr, "[E::%s] failed to set sample names.\n", __func__); + return -1; + } // should not come here! if ((r = csp_mplp_set_sg(mplp, sgnames, nsg)) < 0) { if (r == -2) { fprintf(stderr, "[W::%s] duplicate barcodes or sample IDs.\n", __func__); } fprintf(stderr, "[E::%s] failed to set sample names.\n", __func__); return -1; } + /* init plp for each sample group in mplp->hsg and init HashMap plp->hug for UMI grouping. */ for (i = 0; i < nsg; i++) { - if (NULL == (plp = map_sg_val(mplp->hsg, mplp->hsg_iter[i]))) { - if (NULL == (map_sg_val(mplp->hsg, mplp->hsg_iter[i]) = plp = csp_plp_init())) { + if (NULL == (plp = kh_val(mplp->hsg, mplp->hsg_iter[i]))) { + if (NULL == (kh_val(mplp->hsg, mplp->hsg_iter[i]) = plp = csp_plp_init())) { fprintf(stderr, "[E::%s] failed to init csp_plp_t for sg HashMap of csp_mplp_t.\n", __func__); return -1; } } if (use_umi(gs)) { - plp->hug = map_ug_init(); - if (NULL == plp->hug) { fprintf(stderr, "[E::%s] could not init map_ug_t structure.\n", __func__); return -1; } + plp->hug = kh_init(umi_group); + if (NULL == plp->hug) { + fprintf(stderr, "[E::%s] could not init map_ug_t structure.\n", __func__); + return -1; + } } } return 0; } -/*@note 1. To speed up, the caller should guarantee that: - a) the parameters are valid, i.e. mplp and gs must not be NULL. In fact, this function is supposed to be - called after csp_mplp_t is created and set names of sample-groups, so mplp, mplp->hsg could not be NULL. - b) the csp_pileup_t must have passed the read filtering, refer to pileup_read_with_fetch() for details. - c) each key (sample group name) in map_sg_t already has a valid, not NULL, value (csp_plp_t*); - This usually can be done by calling csp_mplp_prepare(). - 2. This function is expected to be used by Mode1 & Mode2. - -@discuss In current version, only the result (base and qual) of the first read in one UMI group will be used for mplp statistics. - TODO: store results of all reads in one UMI group (maybe could do consistency correction in each UMI group) and then - do mplp statistics. - */ int csp_mplp_push(csp_pileup_t *pileup, csp_mplp_t *mplp, int sid, global_settings *gs) { - map_sg_iter k; - map_ug_iter u; + khiter_t k; + khiter_t u; csp_plp_t *plp = NULL; char **s; int r, idx; + /* Push one csp_pileup_t into csp_mplp_t. * The pileup->cb, pileup->umi could not be NULL as the pileuped read has passed filtering. */ if (use_barcodes(gs)) { - if ((k = map_sg_get(mplp->hsg, pileup->cb)) == map_sg_end(mplp->hsg)) { return 1; } - plp = map_sg_val(mplp->hsg, k); + if ((k = kh_get(sample_group, mplp->hsg, pileup->cb)) == kh_end(mplp->hsg)) + return 1; + plp = kh_val(mplp->hsg, k); } else if (use_sid(gs)) { - plp = map_sg_val(mplp->hsg, mplp->hsg_iter[sid]); + plp = kh_val(mplp->hsg, mplp->hsg_iter[sid]); } else { return -1; } // should not come here! if (use_umi(gs)) { - u = map_ug_get(plp->hug, pileup->umi); - if (u == map_ug_end(plp->hug)) { - s = pool_ps_get(mplp->su); + u = kh_get(umi_group, plp->hug, pileup->umi); + if (u == kh_end(plp->hug)) { + s = jmempool_get(str, mplp->su); *s = strdup(pileup->umi); - u = map_ug_put(plp->hug, *s, &r); - if (r < 0) { return -2; } + u = kh_put(umi_group, plp->hug, *s, &r); + if (r < 0) + return -2; /* An example for pushing base & qual into HashMap of umi group. - list_uu_t *ul = pool_ul_get(mplp->pl); - umi_unit_t *uu = pool_uu_get(mplp->pu); + list_uu_t *ul = jmempool_get(list_umiunit, mplp->pl); + umi_unit_t *uu = jmempool_get(umi_unit, mplp->pu); uu->base = pileup->base; uu->qual = pileup->qual; - list_uu_push(ul, uu); - map_ug_val(plp->hug, u) = ul; + kvec_push(umi_unit_t*, *ul, uu); + kh_val(plp->hug, u) = ul; */ idx = seq_nt16_idx2int(pileup->base); plp->bc[idx]++; - list_qu_push(plp->qu[idx], pileup->qual); + kv_push(qual_t, plp->qu[idx], pileup->qual); } else { return 2; } // umi has already been pushed before } else { idx = seq_nt16_idx2int(pileup->base); plp->bc[idx]++; - list_qu_push(plp->qu[idx], pileup->qual); + kv_push(qual_t, plp->qu[idx], pileup->qual); } return 0; } -/*@discuss In current version, only the result (base and qual) of the first read in one UMI group will be used for mplp statistics. - TODO: store results of all reads in one UMI group (maybe could do consistency correction in each UMI group) and then - do mplp statistics. - */ int csp_mplp_stat(csp_mplp_t *mplp, global_settings *gs) { csp_plp_t *plp = NULL; int i, j, k; size_t l; + for (i = 0; i < mplp->nsg; i++) { - plp = map_sg_val(mplp->hsg, mplp->hsg_iter[i]); + plp = kh_val(mplp->hsg, mplp->hsg_iter[i]); for (j = 0; j < 5; j++) { plp->tc += plp->bc[j]; mplp->bc[j] += plp->bc[j]; } } - for (i = 0; i < 5; i++) { mplp->tc += mplp->bc[i]; } - if (mplp->tc < gs->min_count) { return 1; } + for (i = 0; i < 5; i++) + mplp->tc += mplp->bc[i]; + if (mplp->tc < gs->min_count) + return 1; + infer_allele(mplp->bc, &mplp->inf_rid, &mplp->inf_aid); // must be called after mplp->bc are completely calculated. - if (mplp->bc[mplp->inf_aid] < mplp->tc * gs->min_maf) { return 1; } + if (mplp->bc[mplp->inf_aid] < mplp->tc * gs->min_maf) + return 1; + if (mplp->ref_idx < 0) { // ref is not valid. Refer to csp_mplp_t. mplp->ref_idx = mplp->inf_rid; mplp->alt_idx = mplp->inf_aid; } else if (mplp->alt_idx < 0) { // alt is not valid infer_alt(mplp->bc, mplp->ref_idx, &mplp->alt_idx); } - mplp->ad = mplp->bc[mplp->alt_idx]; mplp->dp = mplp->bc[mplp->ref_idx] + mplp->ad; mplp->oth = mplp->tc - mplp->dp; + mplp->ad = mplp->bc[mplp->alt_idx]; + mplp->dp = mplp->bc[mplp->ref_idx] + mplp->ad; + mplp->oth = mplp->tc - mplp->dp; + for (i = 0; i < mplp->nsg; i++) { - plp = map_sg_val(mplp->hsg, mplp->hsg_iter[i]); - plp->ad = plp->bc[mplp->alt_idx]; if (plp->ad) mplp->nr_ad++; - plp->dp = plp->bc[mplp->ref_idx] + plp->ad; if (plp->dp) mplp->nr_dp++; - plp->oth = plp->tc - plp->dp; if (plp->oth) mplp->nr_oth++; + plp = kh_val(mplp->hsg, mplp->hsg_iter[i]); + if ((plp->ad = plp->bc[mplp->alt_idx])) + mplp->nr_ad++; + if ((plp->dp = plp->bc[mplp->ref_idx] + plp->ad)) + mplp->nr_dp++; + if ((plp->oth = plp->tc - plp->dp)) + mplp->nr_oth++; if (gs->is_genotype) { for (j = 0; j < 5; j++) { - for (l = 0; l < list_qu_size(plp->qu[j]); l++) { - if (get_qual_vector(list_qu_A(plp->qu[j], l), 45, 0.25, mplp->qvec) < 0) { return -1; } - for (k = 0; k < 4; k++) plp->qmat[j][k] += mplp->qvec[k]; + for (l = 0; l < kv_size(plp->qu[j]); l++) { + if (get_qual_vector(kv_A(plp->qu[j], l), 45, 0.25, mplp->qvec) < 0) + return -1; + for (k = 0; k < 4; k++) + plp->qmat[j][k] += mplp->qvec[k]; } } - if (qual_matrix_to_geno(plp->qmat, plp->bc, mplp->ref_idx, mplp->alt_idx, gs->double_gl, plp->gl, &plp->ngl) < 0) { return -1; } + if (qual_matrix_to_geno(plp->qmat, plp->bc, mplp->ref_idx, mplp->alt_idx, gs->double_gl, plp->gl, &plp->ngl) < 0) + return -1; } } return 0; @@ -228,9 +252,6 @@ void csp_bam_fs_destroy(csp_bam_fs* p) { * Thread API */ -/*@note The pointer returned successfully by thdata_init() should be freed - by thdata_destroy() when no longer used. - */ thread_data* thdata_init(void) { return (thread_data*) calloc(1, sizeof(thread_data)); } void thdata_destroy(thread_data *p) { free(p); } @@ -329,11 +350,6 @@ int merge_vcf(jfile_t *out, jfile_t **in, const int n, int *ret) { #undef TMP_BUFSIZE } -/*@note 1. When proc = 1, the origial outputed mtx file was not filled with stat info: - (totol SNPs, total samples, total records), - so use this function to fill and rewrite. - 2. @p fs is not open when this function is just called and will keep not open when this function ends. - */ int rewrite_mtx(jfile_t *fs, size_t ns, int nsmp, size_t nr) { #define TMP_BUFSIZE 1048576 kstring_t ks = KS_INITIALIZE, *s = &ks; diff --git a/src/csp.h b/src/csp.h index 071da5d..f98e4aa 100644 --- a/src/csp.h +++ b/src/csp.h @@ -1,4 +1,4 @@ -/* Utils +/* csp.h - Utils * Author: Xianjie Huang */ #ifndef CSP_CSP_H @@ -89,11 +89,9 @@ */ typedef struct _gll_settings global_settings; -/*Structure that stores global settings/options/parameters. -Note: -1. In current version, one and only one of barcode(s) and sample-ID(s) would exist and work, the other - would be freed. Refer to check_global_args() for details. -*/ +// Structure that stores global settings/options/parameters. +// Note: In current version, one and only one of barcode(s) and sample-ID(s) would exist and work, the other +// would be freed. Refer to check_global_args() for details. struct _gll_settings { char *in_fn_file; // Name of the file containing a list of input bam/sam/cram files, one input file per line. int nin; // Num of input bam/sam/cram files. @@ -137,28 +135,9 @@ struct _gll_settings { int no_orphan; // 0 or 1. 1: donot use orphan reads; 0: use orphan reads. }; -/*@abstract Whether to use barcodes for sample grouping during pileup. -@param gs Pointer of global settings structure [global_settings*]. -@return 1, yes; 0, no. -*/ #define use_barcodes(gs) ((gs)->cell_tag) - -/*@abstract Whether to use sample IDs for sample grouping during pileup. -@param gs Pointer of global settings structure [global_settings*]. -@return 1, yes; 0, no. -*/ #define use_sid(gs) ((gs)->sample_ids) - -/*@abstract Whether to use UMI for reads grouping during pileup. -@param gs Pointer of global settings structure [global_settings*]. -@return 1, yes; 0, no. -*/ #define use_umi(gs) ((gs)->umi_tag) - -/*@abstract Whether to use target regions (-T). -@param gs Pointer of global settings structure [global_settings*] -@return 1, yes; 0, no. -*/ #define use_target(gs) ((gs)->is_target) void gll_setting_free(global_settings *gs); @@ -168,45 +147,29 @@ void gll_setting_print(FILE *fp, global_settings *gs, char *prefix); * Mpileup processing */ -/*@abstract Set values for internal variables of csp_mplp_t to prepare for pileup. -@param mplp Pointer of csp_mplp_t structure. -@param gs Pointer of global_settings structure. -@return 0 if success, -1 otherwise. -*/ +//@return 0 if success, -1 otherwise. int csp_mplp_prepare(csp_mplp_t *mplp, global_settings *gs); -/*@abstract Push content of one csp_pileup_t structure into the csp_mplp_t structure. -@param pileup Pointer of csp_pileup_t structure to be pushed. -@param mplp Pointer of csp_mplp_t structure pushing into. -@param sid Index of Sample ID in the input Sample IDs. -@param gs Pointer of global_settings structure. -@return 0 if successfully pushed one new record; - Negative numbers for error: - -1, neither barcodes or Sample IDs are used. - -2, khash_put error. - Positive numbers for warning: - 1, cell-barcode is not in input barcode-list; - 2, umi has already been pushed before; - -@note 1. To speed up, the caller should guarantee that: - a) the parameters are valid, i.e. mplp and gs must not be NULL. In fact, this function is supposed to be - called after csp_mplp_t is created and set names of sample-groups, so mplp, mplp->hsg could not be NULL. - b) the csp_pileup_t must have passed the read filtering, refer to pileup_read_with_fetch() for details. - c) each key (sample group name) in map_sg_t already has a valid, not NULL, value (csp_plp_t*); - This usually can be done by calling csp_mplp_prepare(). - 2. This function is expected to be used by Mode1 & Mode2. - +/*!@func +@abstract Push content of one csp_pileup_t structure into the csp_mplp_t structure. +@return 0 if successfully pushed one new record; + Negative numbers for error: + -1, neither barcodes or Sample IDs are used. + -2, khash_put error. + Positive numbers for warning: + 1, cell-barcode is not in input barcode-list; + 2, umi has already been pushed before; @discuss In current version, only the result (base and qual) of the first read in one UMI group will be used for mplp statistics. TODO: store results of all reads in one UMI group (maybe could do consistency correction in each UMI group) and then do mplp statistics. */ int csp_mplp_push(csp_pileup_t *pileup, csp_mplp_t *mplp, int sid, global_settings *gs); -/*@abstract Do statistics and filtering after all pileup results have been pushed. -@param mplp Pointer of csp_mplp_t structure. -@param gs Pointer of global_settings structure. -@return 0 if success; -1 if error; 1 if not passing filters. - +/*!@func +@abstract Do statistics and filtering after all pileup results have been pushed. +@param mplp Pointer of csp_mplp_t structure. +@param gs Pointer of global_settings structure. +@return 0 if success; -1 if error; 1 if not passing filters. @discuss In current version, only the result (base and qual) of the first read in one UMI group will be used for mplp statistics. TODO: store results of all reads in one UMI group (maybe could do consistency correction in each UMI group) and then do mplp statistics. @@ -224,12 +187,6 @@ typedef struct { hts_idx_t *idx; } csp_bam_fs; -/*@abstract Create a csp_bam_fs structure. -@return Pointer to the csp_bam_fs structure if success, NULL otherwise. - -@note The pointer returned successfully by csp_bam_fs_init() should be freed - by csp_bam_fs_destroy() when no longer used. - */ csp_bam_fs* csp_bam_fs_init(void); void csp_bam_fs_destroy(csp_bam_fs* p); @@ -237,42 +194,20 @@ void csp_bam_fs_destroy(csp_bam_fs* p); * Thread operatoins API/routine */ -/* -* Thread API -*/ -/*@abstract The data structure used as thread-func parameter. -@param gs Pointer to the global_settings structure. -@param bfs Array of csp_bam_fs. -@param nfs Size (Number of elements) of @p bfs. -@param iter Array of hts_itr_t**. -@param niter Size of @p iter. -@param nitr Size of one element of @p iter. -@param n Pos of next element in the snp-list/chrom-list to be used by certain thread. -@param m Total size of elements to be used by certain thread, must not be changed. -@param i Id of the thread data. -@param ret Running state of the thread. -@param ns Num of SNPs that passed all filters. -@param nr_* Num of records for each output matrix file. -@param out_* Pointers of output files. - */ +// The data structure used as thread-func parameter. typedef struct { - global_settings *gs; - csp_bam_fs **bfs; - int nfs; - hts_itr_t ***iter; - int niter, nitr; - size_t m, n; // for snp-list or chrom-list. - int i; - int ret; - size_t ns, nr_ad, nr_dp, nr_oth; - jfile_t *out_mtx_ad, *out_mtx_dp, *out_mtx_oth, *out_vcf_base, *out_vcf_cells; + global_settings *gs; + csp_bam_fs **bfs; + int nfs; // Size of @p bfs. + hts_itr_t ***iter; + int niter, nitr; // niter: Size of @p iter; nitr: Size of one element of @p iter. + size_t m, n; // m: Total size; n: pos of next element; for snp-list or chrom-list. + int i; // Id of the thread data. + int ret; // Running state of the thread. + size_t ns, nr_ad, nr_dp, nr_oth; // ns: Num of SNPs that passed all filters; nr_*: Num of records for each output matrix file. + jfile_t *out_mtx_ad, *out_mtx_dp, *out_mtx_oth, *out_vcf_base, *out_vcf_cells; // out_*: Pointers of output files. } thread_data; -/*@abstract Create the thread_data structure. -@return Pointer to the structure if success, NULL otherwise. -@note The pointer returned successfully by thdata_init() should be freed - by thdata_destroy() when no longer used. - */ thread_data* thdata_init(void); void thdata_destroy(thread_data *p); void thdata_print(FILE *fp, thread_data *p); @@ -281,7 +216,8 @@ void thdata_print(FILE *fp, thread_data *p); * File Routine */ -/*@abstract Create jfile_t structure for tmp file. +/*!@func +@abstract Create jfile_t structure for tmp file. @param fs The file struct that the tmp file is based on. @param idx A number as suffix. @param is_zip If the tmp files should be zipped. @@ -290,52 +226,35 @@ void thdata_print(FILE *fp, thread_data *p); */ jfile_t* create_tmp_fs(jfile_t *fs, int idx, int is_zip, kstring_t *s); -/*@abstract Create array of tmp filen structures based on the given file structure. -@param fs The file struct that the tmp file structs are based on. -@param n Number of tmp file structs to be created. -@param is_zip If the tmp files should be zipped. -@return Pointer to the array of tmp file structs if success, NULL otherwise. - */ jfile_t** create_tmp_files(jfile_t *fs, int n, int is_zip); -/*@abstract Remove tmp files and free memory. -@param fs Pointer of array of jfile_t structures to be removed and freed. -@param n Size of array. -@return Num of tmp files that are removed if no error, -1 otherwise. - */ +//@return Num of tmp files that are removed if no error, -1 otherwise. int destroy_tmp_files(jfile_t **fs, const int n); -/*@abstract Merge several tmp sparse matrices files. -@param out Pointer of file structure merged into. -@param in Pointer of array of tmp mtx files to be merged. -@param n Num of tmp mtx files. -@param ns Pointer to num of SNPs in all input mtx files. -@param nr Pointer to num of records in all input mtx files. -@param ret Pointer to the running state. 0 if success, negative numbers for error: - -1, unknown error; - -2, I/O error. -@return Num of tmp mtx files that are successfully merged. +/*!@func +@abstract Merge several tmp sparse matrices files. +@param out Pointer of file structure merged into. +@param in Pointer of array of tmp mtx files to be merged. +@param n Num of tmp mtx files. +@param ns Pointer to num of SNPs in all input mtx files. +@param nr Pointer to num of records in all input mtx files. +@param ret Pointer to the running state. 0 if success, negative numbers for error: + -1, unknown error; + -2, I/O error. +@return Num of tmp mtx files that are successfully merged. */ int merge_mtx(jfile_t *out, jfile_t **in, const int n, size_t *ns, size_t *nr, int *ret); -/*@abstract Merge several tmp vcf files. -@param out Pointer of file structure merged into. -@param in Pointer of array of tmp vcf files to be merged. -@param n Num of tmp vcf files. -@param ret Pointer to the running state. 0 if success, negative numbers for error: - -1, unknown error; - -2, I/O error. -@return Num of tmp vcf files that are successfully merged. -*/ +// @p ret and @return are similar with @func merge_mtx int merge_vcf(jfile_t *out, jfile_t **in, const int n, int *ret); -/*@abstract Rewrite mtx file to fill in the stat info. +/*!@func +@abstract Rewrite mtx file to fill in the stat info. @param fs Pointer of jfile_t that to be rewriten. @param ns Num of SNPs. @param nsmp Num of samples. @param nr Num of records. @return 0 if success, -1 if error, 1 if the original file has no records while nr != 0. - @note 1. When proc = 1, the origial outputed mtx file was not filled with stat info: (totol SNPs, total samples, total records), so use this function to fill and rewrite. @@ -350,3 +269,4 @@ int csp_fetch(global_settings *gs); int csp_pileup(global_settings *gs); #endif + diff --git a/src/csp_fetch.c b/src/csp_fetch.c index 6839dd0..1dd9c7c 100644 --- a/src/csp_fetch.c +++ b/src/csp_fetch.c @@ -1,4 +1,4 @@ -/* cellsnp fetch method +/* csp_fetch.c - cellsnp fetch method * Author: Xianejie Huang */ @@ -20,37 +20,38 @@ #include #endif -/*@abstract Pileup one read obtained by sam_itr_next(). +/*!@func +@abstract Pileup one read obtained by sam_itr_next(). @param pos Pos of the reference sequence. 0-based. @param p Pointer of csp_pileup_t structure coming from csp_pileup_init() or csp_pileup_reset(). @param gs Pointer of global settings. @return 0 if success, -1 if error, 1 if the reads extracted are not in proper format, 2 if not passing filters. - @note 1. This function is modified from cigar_resolve2() function in sam.c of htslib. Link: https://github.com/samtools/htslib/blob/develop/sam.c#L4526 2. Reads filtering is also applied inside this function, including: UMI and cell tags, read mapping quality, mapping flag and length of bases within alignment. - 3. To speed up, parameters will not be checked, so the caller should guarantee the parameters are valid, i.e. - && p != NULL && gs != NULL. - @TODO 1. Filter unmapped reads (the read itself unmapped or the mate read unmapped) ? - 2. All elements of csp_pileup_t other than 'base' and 'qual' would be overwritten in this function, while 'base' and - 'qual' would not be overwritten when the next op after finding the pos is BAM_CDEL or BAM_CREF_SKIP, in which case - the read would be filtered as being DEL in current version. So 'base' and 'qual' would not be misused for the moment. - But it's better to call csp_pileup_reset*() in case that we donot filter DEL. */ static int fetch_read(hts_pos_t pos, csp_pileup_t *p, global_settings *gs) { /* Filter reads in order. For example, filtering according to umi tag and cell tag would speed up in the case that do not use UMI or Cell-barcode at all. */ - if (use_umi(gs) && NULL == (p->umi = get_bam_aux_str(p->b, gs->umi_tag))) { return 1; } - if (use_barcodes(gs) && NULL == (p->cb = get_bam_aux_str(p->b, gs->cell_tag))) { return 1; } + if (use_umi(gs) && NULL == (p->umi = get_bam_aux_str(p->b, gs->umi_tag))) + return 1; + if (use_barcodes(gs) && NULL == (p->cb = get_bam_aux_str(p->b, gs->cell_tag))) + return 1; + bam1_core_t *c = &(p->b->core); - if (c->tid < 0 || c->flag & BAM_FUNMAP) { return 2; } - if (c->qual < gs->min_mapq) { return 2; } - //if (c->flag > gs->max_flag) { return 2; } - if (gs->rflag_filter && gs->rflag_filter & c->flag) { return 2; } - if (gs->rflag_require && ! (gs->rflag_require & c->flag)) { return 2; } - if (gs->no_orphan && c->flag & BAM_FPAIRED && ! (c->flag & BAM_FPROPER_PAIR)) { return 2; } + if (c->tid < 0 || c->flag & BAM_FUNMAP) + return 2; + if (c->qual < gs->min_mapq) + return 2; + if (gs->rflag_filter && gs->rflag_filter & c->flag) + return 2; + if (gs->rflag_require && ! (gs->rflag_require & c->flag)) + return 2; + if (gs->no_orphan && c->flag & BAM_FPAIRED && ! (c->flag & BAM_FPROPER_PAIR)) + return 2; + uint32_t *cigar = bam_get_cigar(p->b); hts_pos_t x, px; /* x is the coordinate of the reference. */ int k, y, py, op, l; /* y is the query coordinate. */ @@ -61,12 +62,16 @@ static int fetch_read(hts_pos_t pos, csp_pileup_t *p, global_settings *gs) { for (k = 0, px = x = c->pos, py = y = 0, laln = 0; k < c->n_cigar; k++, px = x, py = y) { op = get_cigar_op(cigar[k]); l = get_cigar_len(cigar[k]); - if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) { x += l; y += l; laln += l; } - else if (op == BAM_CDEL || op == BAM_CREF_SKIP) { x += l; } - else if (op == BAM_CINS || op == BAM_CSOFT_CLIP) { y += l; } - // else, do nothing. + if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) { + x += l; y += l; laln += l; + } else if (op == BAM_CDEL || op == BAM_CREF_SKIP) { + x += l; + } else if (op == BAM_CINS || op == BAM_CSOFT_CLIP) { + y += l; + } // else, do nothing. if (x > pos) { break; } } + /* pileup */ assert(k < c->n_cigar); // otherwise a bug. if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) { @@ -77,20 +82,28 @@ static int fetch_read(hts_pos_t pos, csp_pileup_t *p, global_settings *gs) { p->is_del = 1; p->qpos = py; // FIXME: distinguish D and N!!!!! p->is_refskip = (op == BAM_CREF_SKIP); } // cannot be other operations; otherwise a bug - if (p->is_del) { return 2; } - if (p->is_refskip) { return 2; } + if (p->is_del) + return 2; + if (p->is_refskip) + return 2; + /* continue processing cigar string. */ for (k++; k < c->n_cigar; k++) { op = get_cigar_op(cigar[k]); l = get_cigar_len(cigar[k]); - if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) { laln += l; } + if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) + laln += l; } - if (laln < gs->min_len) { return 2; } - else { p->laln = laln; } + if (laln < gs->min_len) + return 2; + else + p->laln = laln; + return 0; } -/*@abstract Pileup one SNP with method fetch. +/*!@func +@abstract Pileup one SNP with method fetch. @param snp Pointer of snp_t structure. @param fs Pointer of array of pointers to the csp_bam_fs structures. @param fp Pointer of array of htsFile* of input files. @@ -99,9 +112,6 @@ static int fetch_read(hts_pos_t pos, csp_pileup_t *p, global_settings *gs) { @param mplp Pointer of csp_mplp_t structure. @param gs Pointer of global_settings structure. @return 0 if success, -1 if error, 1 if pileup failure without error. - -@note 1. This function is mainly called by csp_fetch_core(). Refer to csp_fetch_core() for notes. - 2. The statistics results of all pileuped reads for one SNP is stored in the csp_mplp_t after calling this function. */ static int fetch_snp(snp_t *snp, csp_bam_fs **fs, htsFile **fp, int nfs, csp_pileup_t *pileup, csp_mplp_t *mplp, global_settings *gs) { @@ -110,54 +120,82 @@ static int fetch_snp(snp_t *snp, csp_bam_fs **fs, htsFile **fp, int nfs, csp_pil int i, tid, r, ret, st, state = -1; size_t npush1; kstring_t ks = KS_INITIALIZE, *s = &ks; + #if DEBUG size_t npileup = 0; #endif + mplp->ref_idx = snp->ref ? seq_nt16_char2int(snp->ref) : -1; mplp->alt_idx = snp->alt ? seq_nt16_char2int(snp->alt) : -1; for (i = 0, npush1 = 0; i < nfs; i++, npush1 = 0) { bs = fs[i]; tid = csp_sam_hdr_name2id(bs->hdr, snp->chr, s); ks_clear(s); - if (tid < 0) { state = 1; goto fail; } - if (NULL == (iter = sam_itr_queryi(bs->idx, tid, snp->pos, snp->pos + 1))) { state = 1; goto fail; } + if (tid < 0) { + state = 1; goto fail; + } + if (NULL == (iter = sam_itr_queryi(bs->idx, tid, snp->pos, snp->pos + 1))) { + state = 1; goto fail; + } while ((ret = sam_itr_next(fp[i], iter, pileup->b)) >= 0) { // TODO: check if need to be reset in_fp? #if DEBUG npileup++; #endif - if (npush1 >= gs->max_depth) { npush1 = 0; break; } + if (npush1 >= gs->max_depth) { + npush1 = 0; break; + } if (0 == (st = fetch_read(snp->pos, pileup, gs))) { // no need to reset pileup as the values in it will be immediately overwritten. - if (use_barcodes(gs)) { r = csp_mplp_push(pileup, mplp, -1, gs); } - else if (use_sid(gs)) { r = csp_mplp_push(pileup, mplp, i, gs); } - else { state = -1; goto fail; } - if (r < 0) { state = -1; goto fail; } - else if (r == 0) { npush1++; } // else if r > 0: do nothing - } else if (st < 0) { state = -1; goto fail; } + if (use_barcodes(gs)) { + r = csp_mplp_push(pileup, mplp, -1, gs); + } else if (use_sid(gs)) { + r = csp_mplp_push(pileup, mplp, i, gs); + } else { + state = -1; goto fail; + } + if (r < 0) { + state = -1; goto fail; + } else if (r == 0) { + npush1++; + } // else if r > 0: do nothing + } else if (st < 0) { + state = -1; goto fail; + } } - if (ret < -1) { state = -1; goto fail; } - else { hts_itr_destroy(iter); iter = NULL; } // TODO: check if could reset iter? + if (ret < -1) { + state = -1; goto fail; + } else { + hts_itr_destroy(iter); iter = NULL; + } // TODO: check if could reset iter? } + #if DEBUG fprintf(stderr, "[D::%s] before mplp statistics: npileup = %ld; the mplp is:\n", __func__, npileup); csp_mplp_print_(stderr, mplp, "\t"); #endif - if ((ret = csp_mplp_stat(mplp, gs)) != 0) { state = (ret > 0) ? 1 : -1; goto fail; } + + if ((ret = csp_mplp_stat(mplp, gs)) != 0) { + state = (ret > 0) ? 1 : -1; + goto fail; + } + #if DEBUG fprintf(stderr, "[D::%s] after mplp statistics: the mplp is:\n", __func__); csp_mplp_print_(stderr, mplp, "\t"); #endif + ks_free(s); s = NULL; return 0; + fail: if (s) { ks_free(s); } if (iter) { hts_itr_destroy(iter); } return state; } -/*@abstract Pileup a region (a list of SNPs) with method of fetching. +/*!@func +@abstract Pileup a region (a list of SNPs) with method of fetching. @param args Pointer to thread_data structure. @return Num of SNPs, including those filtered, that are processed. - @note 1. Differ from pileup method in samtools, this function fetches reads covering the SNPs and pileups the reads by processing CIGAR strings with a self-defined resolver function. 2. The internal variable "ret" in thread_data structure saves the running state of the function: @@ -179,77 +217,100 @@ static size_t csp_fetch_core(void *args) { csp_mplp_t *mplp = NULL; int i, ret; kstring_t ks = KS_INITIALIZE, *s = &ks; + #if CSP_FIT_MULTI_SMP - if (gs->tp_errno) { d->ret = 1; goto fail; } + if (gs->tp_errno) { d->ret = 1; goto clean; } #endif + #if DEBUG fprintf(stderr, "[D::%s][Thread-%d] thread options:\n", __func__, d->i); thdata_print(stderr, d); #endif + d->ret = -1; d->ns = d->nr_ad = d->nr_dp = d->nr_oth = 0; + /* prepare data and structures. */ #if CSP_FIT_MULTI_SMP - if (gs->tp_errno) { d->ret = 1; goto fail; } + if (gs->tp_errno) { d->ret = 1; goto clean; } #endif + if (jf_open(d->out_mtx_ad, NULL) <= 0) { fprintf(stderr, "[E::%s] failed to open tmp mtx AD file '%s'.\n", __func__, d->out_mtx_ad->fn); - d->ret = -2; goto fail; + d->ret = -2; goto clean; } if (jf_open(d->out_mtx_dp, NULL) <= 0) { fprintf(stderr, "[E::%s] failed to open tmp mtx DP file '%s'.\n", __func__, d->out_mtx_dp->fn); - d->ret = -2; goto fail; + d->ret = -2; goto clean; } if (jf_open(d->out_mtx_oth, NULL) <= 0) { fprintf(stderr, "[E::%s] failed to open tmp mtx OTH file '%s'.\n", __func__, d->out_mtx_oth->fn); - d->ret = -2; goto fail; + d->ret = -2; goto clean; } if (jf_open(d->out_vcf_base, NULL) <= 0) { fprintf(stderr, "[E::%s] failed to open tmp vcf BASE file '%s'.\n", __func__, d->out_vcf_base->fn); - d->ret = -2; goto fail; + d->ret = -2; goto clean; } if (gs->is_genotype) { if (jf_open(d->out_vcf_cells, NULL) <= 0) { fprintf(stderr, "[E::%s] failed to open tmp vcf CELLS file '%s'.\n", __func__, d->out_vcf_cells->fn); - d->ret = -2; goto fail; + d->ret = -2; goto clean; } } + /* open input files */ #if CSP_FIT_MULTI_SMP - if (gs->tp_errno) { d->ret = 1; goto fail; } + if (gs->tp_errno) { d->ret = 1; goto clean; } #endif + fp = (htsFile**) calloc(gs->nin, sizeof(htsFile*)); - if (NULL == fp) { fprintf(stderr, "[E::%s] failed to open input files\n", __func__); goto fail; } + if (NULL == fp) { + fprintf(stderr, "[E::%s] failed to open input files\n", __func__); + goto clean; + } for (; nfp < gs->nin; ) { if (d->i == 0) { // the caller has opened input files for Thread-0 fp[nfp] = bam_fs[nfp]->fp; nfp++; } else if (NULL == (fp[nfp] = hts_open(gs->in_fns[nfp], "rb"))) { fprintf(stderr, "[E::%s] failed to open %s.\n", __func__, gs->in_fns[nfp]); - d->ret = -2; goto fail; - } else { nfp++; } + d->ret = -2; goto clean; + } else { + nfp++; + } } + /* prepare mplp for pileup. */ #if CSP_FIT_MULTI_SMP - if (gs->tp_errno) { d->ret = 1; goto fail; } + if (gs->tp_errno) { d->ret = 1; goto clean; } #endif - if (NULL == (mplp = csp_mplp_init())) { fprintf(stderr, "[E::%s] could not init csp_mplp_t structure.\n", __func__); goto fail; } - if (csp_mplp_prepare(mplp, gs) < 0) { fprintf(stderr, "[E::%s] could not prepare csp_mplp_t structure.\n", __func__); goto fail; } + + if (NULL == (mplp = csp_mplp_init())) { + fprintf(stderr, "[E::%s] could not init csp_mplp_t structure.\n", __func__); + goto clean; + } + if (csp_mplp_prepare(mplp, gs) < 0) { + fprintf(stderr, "[E::%s] could not prepare csp_mplp_t structure.\n", __func__); + goto clean; + } if (NULL == (pileup = csp_pileup_init())) { fprintf(stderr, "[E::%s] Out of memory allocating csp_pileup_t struct.\n", __func__); - goto fail; + goto clean; } + #if VERBOSE double pos_m, pos_n, pos_r, nprints = 50; pos_n = pos_m = d->m / nprints; pos_r = 100.0 / d->m; #endif + /* pileup each SNP. */ for (; n < d->m; n++) { #if CSP_FIT_MULTI_SMP - if (gs->tp_errno) { d->ret = 1; goto fail; } + if (gs->tp_errno) { d->ret = 1; goto clean; } #endif + #if VERBOSE if (n >= pos_n) { fprintf(stderr, "[I::%s][Thread-%d] %.2f%% SNPs processed.\n", __func__, d->i, n * pos_r); @@ -257,22 +318,29 @@ static size_t csp_fetch_core(void *args) { pos_n = pos_n <= d->m ? pos_n : d->m; } #endif + #if DEBUG fputc('\n', stderr); fprintf(stderr, "[D::%s] chr = %s; pos = %ld; ref = %c; alt = %c;\n", __func__, a[n]->chr, a[n]->pos + 1, a[n]->ref, a[n]->alt); #endif + if ((ret = fetch_snp(a[n], bam_fs, fp, nfs, pileup, mplp, gs)) != 0) { if (ret < 0) { fprintf(stderr, "[E::%s] failed to pileup snp (%s:%ld)\n", __func__, a[n]->chr, a[n]->pos + 1); - goto fail; + goto clean; } #if DEBUG fprintf(stderr, "[W::%s] snp (%s:%ld) filtered, error code = %d\n", __func__, a[n]->chr, a[n]->pos + 1, ret); #endif csp_mplp_reset(mplp); ks_clear(s); continue; - } else { d->ns++; } - d->nr_ad += mplp->nr_ad; d->nr_dp += mplp->nr_dp; d->nr_oth += mplp->nr_oth; + } else { + d->ns++; + } + d->nr_ad += mplp->nr_ad; + d->nr_dp += mplp->nr_dp; + d->nr_oth += mplp->nr_oth; + /* output mplp to mtx and vcf. */ csp_mplp_to_mtx(mplp, d->out_mtx_ad, d->out_mtx_dp, d->out_mtx_oth, d->ns); ksprintf(s, "%s\t%ld\t.\t%c\t%c\t.\tPASS\tAD=%ld;DP=%ld;OTH=%ld", a[n]->chr, a[n]->pos + 1, \ @@ -286,22 +354,15 @@ static size_t csp_fetch_core(void *args) { } csp_mplp_reset(mplp); ks_clear(s); } - // clean - ks_free(s); s = NULL; - jf_close(d->out_mtx_ad); jf_close(d->out_mtx_dp); jf_close(d->out_mtx_oth); - jf_close(d->out_vcf_base); if (gs->is_genotype) { jf_close(d->out_vcf_cells); } - if (d->i > 0) { - for (i = 0; i < nfp; i++) { hts_close(fp[i]); } - } free(fp); fp = NULL; - csp_pileup_destroy(pileup); - csp_mplp_destroy(mplp); + d->ret = 0; - return n; - fail: + + clean: #if CSP_FIT_MULTI_SMP if (-2 == d->ret && EMFILE == errno) { gs->tp_errno |= TP_EMFILE; } else if (d->ret < 0) { gs->tp_errno |= TP_EUNDEF; } #endif + if (s) { ks_free(s); } if (jf_isopen(d->out_mtx_ad)) { jf_close(d->out_mtx_ad); } if (jf_isopen(d->out_mtx_dp)) { jf_close(d->out_mtx_dp); } @@ -310,7 +371,8 @@ static size_t csp_fetch_core(void *args) { if (gs->is_genotype && jf_isopen(d->out_vcf_cells)) { jf_close(d->out_vcf_cells); } if (fp) { if (d->i > 0) { - for (i = 0; i < nfp; i++) { hts_close(fp[i]); } + for (i = 0; i < nfp; i++) + hts_close(fp[i]); } free(fp); } if (pileup) csp_pileup_destroy(pileup); @@ -319,10 +381,11 @@ static size_t csp_fetch_core(void *args) { } #if CSP_FIT_MULTI_SMP -/*@abstract Infer appropriate number of threads for multi samples to - avoid the issue that too many open files -@param gs Pointer to global_settings -@return Infered nthread value, no more than 1. +/*!@func +@abstract Infer appropriate number of threads for multi samples to + avoid the issue that too many open files +@param gs Pointer to global_settings +@return Infered nthread value, no more than 1. */ static inline int infer_nthread(global_settings *gs) { if (gs->tp_ntry == 0) { return gs->mthread; } // the first time to try, just use the value user specified @@ -337,22 +400,25 @@ static inline int infer_nthread(global_settings *gs) { } #endif -/*abstract Run cellSNP Mode with method of fetching. +/*!@func +@abstract Run cellSNP Mode with method of fetching. @param gs Pointer to the global_settings structure. @return 0 if success, -1 otherwise. */ int csp_fetch(global_settings *gs) { /* check options (input) */ - if (NULL == gs || gs->nin <= 0 || (gs->nbarcode <= 0 && gs->nsid <= 0) || snplist_size(gs->pl) <= 0 || \ + if (NULL == gs || gs->nin <= 0 || (gs->nbarcode <= 0 && gs->nsid <= 0) || kv_size(gs->pl) <= 0 || \ NULL == gs->out_dir) { fprintf(stderr, "[E::%s] error options for fetch modes.\n", __func__); return -1; } + /* prepare running data & options for each thread based on the checked global parameters.*/ if (gs->nthread > 1 && NULL == gs->tp && NULL == (gs->tp = thpool_init(gs->nthread))) { fprintf(stderr, "[E::%s] could not initialize the thread pool.\n", __func__); return -1; } + /* core part. */ int nsample = use_barcodes(gs) ? gs->nbarcode : gs->nsid; int nthread = gs->nthread; @@ -361,162 +427,197 @@ int csp_fetch(global_settings *gs) { csp_bam_fs **bam_fs = NULL; /* use array instead of single element to compatible with multi-input-files. */ int nfs = 0; csp_bam_fs *bs = NULL; - int i, ret; + int i, ret, is_ok = 0; size_t npos, mpos, rpos, tpos, ns, nr_ad, nr_dp, nr_oth, ns_merge, nr_merge; jfile_t **out_tmp_mtx_ad, **out_tmp_mtx_dp, **out_tmp_mtx_oth, **out_tmp_vcf_base, **out_tmp_vcf_cells; - out_tmp_mtx_ad = out_tmp_mtx_dp = out_tmp_mtx_oth = out_tmp_vcf_base = out_tmp_vcf_cells = NULL; + /* calc number of threads and number of SNPs for each thread. */ - mtd = min2(snplist_size(gs->pl), nthread); - mpos = snplist_size(gs->pl) / mtd; - rpos = snplist_size(gs->pl) - mpos * mtd; // number of remaining positions + mtd = min2(kv_size(gs->pl), nthread); + mpos = kv_size(gs->pl) / mtd; + rpos = kv_size(gs->pl) - mpos * mtd; // number of remaining positions + /* create output tmp filenames. */ + out_tmp_mtx_ad = out_tmp_mtx_dp = out_tmp_mtx_oth = out_tmp_vcf_base = out_tmp_vcf_cells = NULL; if (NULL == (out_tmp_mtx_ad = create_tmp_files(gs->out_mtx_ad, mtd, CSP_TMP_ZIP))) { fprintf(stderr, "[E::%s] fail to create tmp files for mtx_AD.\n", __func__); - goto fail; + goto clean; } if (NULL == (out_tmp_mtx_dp = create_tmp_files(gs->out_mtx_dp, mtd, CSP_TMP_ZIP))) { fprintf(stderr, "[E::%s] fail to create tmp files for mtx_DP.\n", __func__); - goto fail; + goto clean; } if (NULL == (out_tmp_mtx_oth = create_tmp_files(gs->out_mtx_oth, mtd, CSP_TMP_ZIP))) { fprintf(stderr, "[E::%s] fail to create tmp files for mtx_OTH.\n", __func__); - goto fail; + goto clean; } if (mtd > 1) { if (NULL == (out_tmp_vcf_base = create_tmp_files(gs->out_vcf_base, mtd, CSP_TMP_ZIP))) { fprintf(stderr, "[E::%s] fail to create tmp files for vcf_BASE.\n", __func__); - goto fail; + goto clean; } if (gs->is_genotype && NULL == (out_tmp_vcf_cells = create_tmp_files(gs->out_vcf_cells, mtd, CSP_TMP_ZIP))) { fprintf(stderr, "[E::%s] fail to create tmp files for vcf_CELLS.\n", __func__); - goto fail; + goto clean; } } + /* construct bam_fs */ bam_fs = (csp_bam_fs**) calloc(gs->nin, sizeof(csp_bam_fs*)); - if (NULL == bam_fs) { fprintf(stderr, "[E::%s] could not initialize csp_bam_fs array.\n", __func__); goto fail; } + if (NULL == bam_fs) { + fprintf(stderr, "[E::%s] could not initialize csp_bam_fs array.\n", __func__); + goto clean; + } for (nfs = 0; nfs < gs->nin; nfs++) { - if (NULL == (bs = csp_bam_fs_init())) { fprintf(stderr, "[E::%s] failed to create csp_bam_fs.\n", __func__); goto fail; } + if (NULL == (bs = csp_bam_fs_init())) { + fprintf(stderr, "[E::%s] failed to create csp_bam_fs.\n", __func__); + goto clean; + } if (NULL == (bs->fp = hts_open(gs->in_fns[nfs], "rb"))) { fprintf(stderr, "[E::%s] failed to open %s.\n", __func__, gs->in_fns[nfs]); - goto fail; + goto clean; } if (NULL == (bs->hdr = sam_hdr_read(bs->fp))) { fprintf(stderr, "[E::%s] failed to read header for %s.\n", __func__, gs->in_fns[nfs]); - goto fail; + goto clean; } if (NULL == (bs->idx = sam_index_load(bs->fp, gs->in_fns[nfs]))) { fprintf(stderr, "[E::%s] failed to load index for %s.\n", __func__, gs->in_fns[nfs]); - goto fail; + goto clean; } bam_fs[nfs] = bs; - } bs = NULL; + } + bs = NULL; + /* prepare data for thread pool. */ td = (thread_data**) calloc(mtd, sizeof(thread_data*)); - if (NULL == td) { fprintf(stderr, "[E::%s] could not initialize the array of thread_data structure.\n", __func__); goto fail; } + if (NULL == td) { + fprintf(stderr, "[E::%s] could not initialize the array of thread_data structure.\n", __func__); + goto clean; + } for (npos = 0; ntd < mtd; ntd++, npos += tpos) { if (NULL == (d = thdata_init())) { fprintf(stderr, "[E::%s] could not initialize the thread_data structure.\n", __func__); - goto fail; + goto clean; } tpos = ntd < rpos ? mpos + 1 : mpos; - d->i = ntd; d->gs = gs; d->bfs = bam_fs; d->nfs = nfs; d->n = npos; d->m = tpos; - d->out_mtx_ad = out_tmp_mtx_ad[ntd]; d->out_mtx_dp = out_tmp_mtx_dp[ntd]; d->out_mtx_oth = out_tmp_mtx_oth[ntd]; + d->i = ntd; d->gs = gs; + d->bfs = bam_fs; d->nfs = nfs; + d->n = npos; d->m = tpos; + d->out_mtx_ad = out_tmp_mtx_ad[ntd]; + d->out_mtx_dp = out_tmp_mtx_dp[ntd]; + d->out_mtx_oth = out_tmp_mtx_oth[ntd]; if (mtd > 1) { - d->out_vcf_base = out_tmp_vcf_base[ntd]; d->out_vcf_cells = gs->is_genotype ? out_tmp_vcf_cells[ntd] : NULL; + d->out_vcf_base = out_tmp_vcf_base[ntd]; + d->out_vcf_cells = gs->is_genotype ? out_tmp_vcf_cells[ntd] : NULL; } else { - d->out_vcf_base = gs->out_vcf_base; d->out_vcf_cells = gs->is_genotype ? gs->out_vcf_cells : NULL; + d->out_vcf_base = gs->out_vcf_base; + d->out_vcf_cells = gs->is_genotype ? gs->out_vcf_cells : NULL; } td[ntd] = d; - } d = NULL; + } + d = NULL; + // run the threads if (mtd > 1) { for (i = 0; i < ntd; i++) { if (thpool_add_work(gs->tp, (void*) csp_fetch_core, td[i]) < 0) { fprintf(stderr, "[E::%s] could not add thread work (No. %d)\n", __func__, i); - goto fail; + goto clean; } } thpool_wait(gs->tp); - } else { csp_fetch_core(td[0]); } + } else { + csp_fetch_core(td[0]); + } + /* check running status of threads. */ #if DEBUG - for (i = 0; i < mtd; i++) { fprintf(stderr, "[D::%s] ret of thread-%d is %d\n", __func__, i, td[i]->ret); } + for (i = 0; i < mtd; i++) + fprintf(stderr, "[D::%s] ret of thread-%d is %d\n", __func__, i, td[i]->ret); #endif - for (i = 0; i < mtd; i++) { if (td[i]->ret < 0) goto fail; } + for (i = 0; i < mtd; i++) + if (td[i]->ret < 0) + goto clean; + /* merge tmp files. */ ns = nr_ad = nr_dp = nr_oth = 0; for (i = 0; i < mtd; i++) { nr_ad += td[i]->nr_ad; nr_dp += td[i]->nr_dp; nr_oth += td[i]->nr_oth; ns += td[i]->ns; } - if (jf_open(gs->out_mtx_ad, NULL) < 0) { fprintf(stderr, "[E::%s] failed to open mtx AD.\n", __func__); goto fail; } + + if (jf_open(gs->out_mtx_ad, NULL) < 0) { + fprintf(stderr, "[E::%s] failed to open mtx AD.\n", __func__); + goto clean; + } jf_printf(gs->out_mtx_ad, "%ld\t%d\t%ld\n", ns, nsample, nr_ad); merge_mtx(gs->out_mtx_ad, out_tmp_mtx_ad, mtd, &ns_merge, &nr_merge, &ret); - if (ret < 0 || ns_merge != ns || nr_merge != nr_ad) { fprintf(stderr, "[E::%s] failed to merge mtx AD.\n", __func__); goto fail; } + if (ret < 0 || ns_merge != ns || nr_merge != nr_ad) { + fprintf(stderr, "[E::%s] failed to merge mtx AD.\n", __func__); + goto clean; + } jf_close(gs->out_mtx_ad); - if (jf_open(gs->out_mtx_dp, NULL) < 0) { fprintf(stderr, "[E::%s] failed to open mtx DP.\n", __func__); goto fail; } + if (jf_open(gs->out_mtx_dp, NULL) < 0) { + fprintf(stderr, "[E::%s] failed to open mtx DP.\n", __func__); + goto clean; + } jf_printf(gs->out_mtx_dp, "%ld\t%d\t%ld\n", ns, nsample, nr_dp); merge_mtx(gs->out_mtx_dp, out_tmp_mtx_dp, mtd, &ns_merge, &nr_merge, &ret); - if (ret < 0 || ns_merge != ns || nr_merge != nr_dp) { fprintf(stderr, "[E::%s] failed to merge mtx DP.\n", __func__); goto fail; } + if (ret < 0 || ns_merge != ns || nr_merge != nr_dp) { + fprintf(stderr, "[E::%s] failed to merge mtx DP.\n", __func__); + goto clean; + } jf_close(gs->out_mtx_dp); - if (jf_open(gs->out_mtx_oth, NULL) < 0) { fprintf(stderr, "[E::%s] failed to open mtx OTH.\n", __func__); goto fail; } + if (jf_open(gs->out_mtx_oth, NULL) < 0) { + fprintf(stderr, "[E::%s] failed to open mtx OTH.\n", __func__); + goto clean; + } jf_printf(gs->out_mtx_oth, "%ld\t%d\t%ld\n", ns, nsample, nr_oth); merge_mtx(gs->out_mtx_oth, out_tmp_mtx_oth, mtd, &ns_merge, &nr_merge, &ret); - if (ret < 0 || ns_merge != ns || nr_merge != nr_oth) { fprintf(stderr, "[E::%s] failed to merge mtx OTH.\n", __func__); goto fail; } + if (ret < 0 || ns_merge != ns || nr_merge != nr_oth) { + fprintf(stderr, "[E::%s] failed to merge mtx OTH.\n", __func__); + goto clean; + } jf_close(gs->out_mtx_oth); if (mtd > 1) { - if (jf_open(gs->out_vcf_base, NULL) < 0) { fprintf(stderr, "[E::%s] failed to open vcf BASE.\n", __func__); goto fail; } + if (jf_open(gs->out_vcf_base, NULL) < 0) { + fprintf(stderr, "[E::%s] failed to open vcf BASE.\n", __func__); + goto clean; + } merge_vcf(gs->out_vcf_base, out_tmp_vcf_base, mtd, &ret); - if (ret < 0) { fprintf(stderr, "[E::%s] failed to merge vcf BASE.\n", __func__); goto fail; } + if (ret < 0) { + fprintf(stderr, "[E::%s] failed to merge vcf BASE.\n", __func__); + goto clean; + } jf_close(gs->out_vcf_base); - if (gs->is_genotype) { - if (jf_open(gs->out_vcf_cells, NULL) < 0) { fprintf(stderr, "[E::%s] failed to open vcf CELLS.\n", __func__); goto fail; } + if (jf_open(gs->out_vcf_cells, NULL) < 0) { + fprintf(stderr, "[E::%s] failed to open vcf CELLS.\n", __func__); + goto clean; + } merge_vcf(gs->out_vcf_cells, out_tmp_vcf_cells, mtd, &ret); - if (ret < 0) { fprintf(stderr, "[E::%s] failed to merge vcf CELLS.\n", __func__); goto fail; } + if (ret < 0) { + fprintf(stderr, "[E::%s] failed to merge vcf CELLS.\n", __func__); + goto clean; + } jf_close(gs->out_vcf_cells); } } - /* clean */ - for (i = 0; i < mtd; i++) { thdata_destroy(td[i]); } - free(td); td = NULL; - for (i = 0; i < nfs; i++) { csp_bam_fs_destroy(bam_fs[i]); } - free(bam_fs); bam_fs = NULL; - if (destroy_tmp_files(out_tmp_mtx_ad, mtd) < 0) { - fprintf(stderr, "[W::%s] failed to remove tmp mtx AD files.\n", __func__); - } out_tmp_mtx_ad = NULL; - if (destroy_tmp_files(out_tmp_mtx_dp, mtd) < 0) { - fprintf(stderr, "[W::%s] failed to remove tmp mtx DP files.\n", __func__); - } out_tmp_mtx_dp = NULL; - if (destroy_tmp_files(out_tmp_mtx_oth, mtd) < 0) { - fprintf(stderr, "[W::%s] failed to remove tmp mtx OTH files.\n", __func__); - } out_tmp_mtx_oth = NULL; - if (mtd > 1) { - if (destroy_tmp_files(out_tmp_vcf_base, mtd) < 0) { - fprintf(stderr, "[W::%s] failed to remove tmp vcf BASE files.\n", __func__); - } out_tmp_vcf_base = NULL; - if (gs->is_genotype) { - if (destroy_tmp_files(out_tmp_vcf_cells, mtd) < 0) { - fprintf(stderr, "[W::%s] failed to remove tmp vcf CELLS files.\n", __func__); - } out_tmp_vcf_cells = NULL; - } - } - return 0; - fail: + + is_ok = 1; + + clean: if (td) { for (i = 0; i < mtd; i++) { thdata_destroy(td[i]); } free(td); } - if (d) { thdata_destroy(d); } if (bam_fs) { for (i = 0; i < nfs; i++) { csp_bam_fs_destroy(bam_fs[i]); } free(bam_fs); } - if (bs) { csp_bam_fs_destroy(bs); } if (out_tmp_mtx_ad && destroy_tmp_files(out_tmp_mtx_ad, mtd) < 0) { fprintf(stderr, "[W::%s] failed to remove tmp mtx AD files.\n", __func__); } @@ -534,11 +635,19 @@ int csp_fetch(global_settings *gs) { fprintf(stderr, "[W::%s] failed to remove tmp vcf CELLS files.\n", __func__); } } + + if (is_ok) + return 0; + + //fail: + if (d) { thdata_destroy(d); } + if (bs) { csp_bam_fs_destroy(bs); } if (jf_isopen(gs->out_mtx_ad)) { jf_close(gs->out_mtx_ad); } if (jf_isopen(gs->out_mtx_dp)) { jf_close(gs->out_mtx_dp); } if (jf_isopen(gs->out_mtx_oth)) { jf_close(gs->out_mtx_oth); } if (jf_isopen(gs->out_vcf_base)) { jf_close(gs->out_vcf_base); } if (gs->is_genotype && jf_isopen(gs->out_vcf_cells)) { jf_close(gs->out_vcf_cells); } + #if CSP_FIT_MULTI_SMP if (gs->tp_errno & TP_EMFILE && ! (gs->tp_errno & TP_EUNDEF) && gs->nthread > 1) { fprintf(stderr, "================================================================================\n"); @@ -553,7 +662,9 @@ int csp_fetch(global_settings *gs) { __func__, gs->tp_ntry, gs->nthread); fprintf(stderr, "================================================================================\n"); return csp_fetch(gs); - } else { return -1; } + } else { + return -1; + } #else return -1; #endif diff --git a/src/csp_pileup.c b/src/csp_pileup.c index 5d6815f..832fe91 100644 --- a/src/csp_pileup.c +++ b/src/csp_pileup.c @@ -1,4 +1,4 @@ -/* cellsnp pileup method +/* csp_pileup.c - cellsnp pileup method * Author: Xianejie Huang */ @@ -23,7 +23,6 @@ /* auxiliary data used by @func mp_func. */ typedef struct { htsFile *fp; - //sam_hdr_t *hdr; hts_itr_t *itr; const char *chrom; global_settings *gs; @@ -41,11 +40,11 @@ static inline void mp_aux_destroy(mp_aux_t *p) { static inline void mp_aux_reset(mp_aux_t *p) { } -/*@abstract bam_plp_auto_f used by bam_mplp_init to extract valid reads to be pushed into bam_mpileup stack. +/*!@func +@abstract bam_plp_auto_f used by bam_mplp_init to extract valid reads to be pushed into bam_mpileup stack. @param data Pointer to auxiliary data. @param b Pointer to bam1_t structure. @return 0 on success, -1 on end, < -1 on non-recoverable errors. refer to htslib/sam.h @func bam_plp_init. - @note This function refers to @func mplp_func in bcftools/mpileup.c. */ static int mp_func(void *data, bam1_t *b) { @@ -54,71 +53,89 @@ static int mp_func(void *data, bam1_t *b) { global_settings *gs = dat->gs; bam1_core_t *c; do { - if ((ret = sam_itr_next(dat->fp, dat->itr, b)) < 0) { break; } + if ((ret = sam_itr_next(dat->fp, dat->itr, b)) < 0) + break; c = &(b->core); - if (c->tid < 0 || c->flag & BAM_FUNMAP) { continue; } - if (c->qual < gs->min_mapq) { continue; } - //if (c->flag > gs->max_flag) { continue; } - if (gs->rflag_filter && gs->rflag_filter & c->flag ) { continue; } - if (gs->rflag_require && ! (gs->rflag_require & c->flag)) { continue; } - if (gs->no_orphan && c->flag & BAM_FPAIRED && ! (c->flag & BAM_FPROPER_PAIR)) { continue; } + if (c->tid < 0 || c->flag & BAM_FUNMAP) + continue; + if (c->qual < gs->min_mapq) + continue; + if (gs->rflag_filter && gs->rflag_filter & c->flag ) + continue; + if (gs->rflag_require && ! (gs->rflag_require & c->flag)) + continue; + if (gs->no_orphan && c->flag & BAM_FPAIRED && ! (c->flag & BAM_FPROPER_PAIR)) + continue; if (use_target(gs)) { int beg = c->pos, end = bam_endpos(b) - 1; int overlap = regidx_overlap(gs->targets, dat->chrom, beg, end, NULL); - if (! overlap) { continue; } + if (! overlap) + continue; } break; } while (1); return ret; } -/*@abstract Pileup one read. +/*!@func +@abstract Pileup one read. @param pos Pos of the reference sequence. 0-based. @param bp Pointer of bam_pileup1_t containing pileup-ed results. @param p Pointer of csp_pileup_t structure coming from csp_pileup_init() or csp_pileup_reset(). @param gs Pointer of global settings. @return 0 if success, -1 if error, 1 if the reads extracted are not in proper format, 2 if not passing filters. - @note 1. This function is modified from cigar_resolve2() function in sam.c of htslib. Link: https://github.com/samtools/htslib/blob/develop/sam.c#L4526 2. Reads filtering is also applied inside this function, including: UMI and cell tags and length of bases within alignment. - 3. To speed up, parameters will not be checked, so the caller should guarantee the parameters are valid, i.e. - bp != NULL && p != NULL && gs != NULL. */ static int pileup_read(hts_pos_t pos, const bam_pileup1_t *bp, csp_pileup_t *p, global_settings *gs) { /* Filter reads in order. For example, filtering according to umi tag and cell tag would speed up in the case that do not use UMI or Cell-barcode at all. */ p->b = bp->b; - if (use_umi(gs) && NULL == (p->umi = get_bam_aux_str(p->b, gs->umi_tag))) { return 1; } - if (use_barcodes(gs) && NULL == (p->cb = get_bam_aux_str(p->b, gs->cell_tag))) { return 1; } + if (use_umi(gs) && NULL == (p->umi = get_bam_aux_str(p->b, gs->umi_tag))) + return 1; + if (use_barcodes(gs) && NULL == (p->cb = get_bam_aux_str(p->b, gs->cell_tag))) + return 1; + bam1_core_t *c = &(p->b->core); uint32_t *cigar = bam_get_cigar(p->b); int k, op, l; uint32_t laln; assert(c->pos <= pos); // otherwise a bug. - if (bp->is_del) { return 2; } - if (bp->is_refskip) { return 2; } + if (bp->is_del) + return 2; + if (bp->is_refskip) + return 2; + /* processing cigar string to get number of mapped positions. */ if (gs->min_len > 0) { for (k = 0, laln = 0; k < c->n_cigar; k++) { op = get_cigar_op(cigar[k]); l = get_cigar_len(cigar[k]); - if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) { laln += l; } + if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) + laln += l; } - if (laln < gs->min_len) { return 2; } - else { p->laln = laln; } + if (laln < gs->min_len) + return 2; + else + p->laln = laln; } p->qpos = bp->qpos; - p->is_del = bp->is_del; p->is_refskip = bp->is_refskip; + p->is_del = bp->is_del; + p->is_refskip = bp->is_refskip; if (p->qpos < c->l_qseq) { p->base = bam_seqi(bam_get_seq(p->b), p->qpos); p->qual = bam_get_qual(p->b)[p->qpos]; - } else { p->base = seq_nt16_char2idx('N'); p->qual = 0; } + } else { + p->base = seq_nt16_char2idx('N'); + p->qual = 0; + } return 0; } -/*@abstract Pileup One SNP. +/*!@func +@abstract Pileup One SNP. @param pos Pos of pileup-ed snp. @param mp_n Pointer of array containing numbers of bam_pileup1_t* pileup-ed from each file. @param mp_plp Pointer of array containing bam_pileup1_t* pileup-ed from each file. @@ -127,176 +144,226 @@ static int pileup_read(hts_pos_t pos, const bam_pileup1_t *bp, csp_pileup_t *p, @param mplp Pointer of csp_mplp_t structure. @param gs Pointer of global_settings structure. @return 0 if success, -1 if error, 1 if pileup failure without error. - -@note 1. This function is mainly called by csp_pileup_core(). Refer to csp_pileup_core() for notes. - 2. The statistics result of all pileuped reads for one SNP is stored in the csp_mplp_t after calling this function. */ static int pileup_snp(hts_pos_t pos, int *mp_n, const bam_pileup1_t **mp_plp, int nfs, csp_pileup_t *pileup, csp_mplp_t *mplp, global_settings *gs) { const bam_pileup1_t *bp = NULL; int i, j, r, ret, st, state = -1; size_t npush1; + #if DEBUG size_t npileup = 0; #endif + for (i = 0, npush1 = 0; i < nfs; i++, npush1 = 0) { for (j = 0; j < mp_n[i]; j++) { bp = mp_plp[i] + j; #if DEBUG npileup++; #endif - if (npush1 >= gs->max_depth) { npush1 = 0; break; } + if (npush1 >= gs->max_depth) { + npush1 = 0; + break; + } if (0 == (st = pileup_read(pos, bp, pileup, gs))) { // no need to reset pileup as the values in it will be immediately overwritten. - if (use_barcodes(gs)) { r = csp_mplp_push(pileup, mplp, -1, gs); } - else if (use_sid(gs)) { r = csp_mplp_push(pileup, mplp, i, gs); } - else { state = -1; goto fail; } - if (r < 0) { state = -1; goto fail; } - else if (r == 0) { npush1++; } // else if r > 0: do nothing - } else if (st < 0) { state = -1; goto fail; } + if (use_barcodes(gs)) { + r = csp_mplp_push(pileup, mplp, -1, gs); + } else if (use_sid(gs)) { + r = csp_mplp_push(pileup, mplp, i, gs); + } else { + state = -1; goto fail; + } + if (r < 0) { + state = -1; goto fail; + } else if (r == 0) { + npush1++; + } // else if r > 0: do nothing + } else if (st < 0) { + state = -1; goto fail; + } } } + #if DEBUG fprintf(stderr, "[D::%s] before mplp statistics: npileup = %ld; the mplp is:\n", __func__, npileup); csp_mplp_print_(stderr, mplp, "\t"); #endif - if ((ret = csp_mplp_stat(mplp, gs)) != 0) { state = (ret > 0) ? 1 : -1; goto fail; } + + if ((ret = csp_mplp_stat(mplp, gs)) != 0) { + state = (ret > 0) ? 1 : -1; + goto fail; + } + #if DEBUG fprintf(stderr, "[D::%s] after mplp statistics: the mplp is:\n", __func__); csp_mplp_print_(stderr, mplp, "\t"); #endif + return 0; + fail: return state; } -/*@abstract Pileup regions (several chromosomes). +/*!@func +@abstract Pileup regions (several chromosomes). @param args Pointer to thread_data structure. @return Num of SNPs, including those filtered, that are processed. - -@note 1. The internal variable "ret" in thread_data structure saves the running state of the function: - 0 if success, 1 if error of other threads. - -1, undefined errno in this thread. - -2, open error in this thread. - 2. This function could be used by Mode2 & Mode1a(-T) & Mode1b(-T). - 3. Refering to @func mpileup from bam_plcmd.c in @repo samtools, the @p mp_iter, @p mp_plp and - @p mp_n do not need to be reset every time calling bam_mplp_auto(). Guess that there may be - memory pools inside bam_mplp_* for these structures. - 4. TODO: check consistency among headers. For now not sure the pileup-ed @p tid from @func - bam_mplp_auto() is corresponded to which file's header for different files may have different - target_names in their headers. - 5. TODO: Refering to @func mpileup from bam_plcmd.c in @repo samtools, the hts_itr_t* structure is - reused directly without destroying-creating again. is it a good way? it may speed up if - donot repeat the create-destroy-create-... process. +@note 1. The internal variable "ret" in thread_data structure saves the running state of the function: + 0 if success, 1 if error of other threads. + -1, undefined errno in this thread. + -2, open error in this thread. + 2. This function could be used by Mode2 & Mode1a(-T) & Mode1b(-T). + 3. Refer to @func mpileup from bam_plcmd.c in @repo samtools, the @p mp_iter, @p mp_plp and + @p mp_n do not need to be reset every time calling bam_mplp_auto(). Guess that there may be + memory pools inside bam_mplp_* for these structures. + 4. TODO: check consistency among headers. For now not sure the pileup-ed @p tid from @func + bam_mplp_auto() is corresponded to which file's header for different files may have different + target_names in their headers. + 5. TODO: Refer to @func mpileup from bam_plcmd.c in @repo samtools, the hts_itr_t* structure is + reused directly without destroying-creating again. is it a good way? it may speed up if + donot repeat the create-destroy-create-... process. */ static int csp_pileup_core(void *args) { thread_data *d = (thread_data*) args; global_settings *gs = d->gs; char **a = gs->chroms + d->n; int n = 0; /* n is the num of chroms that are successfully processed. */ + csp_bam_fs **bam_fs = d->bfs; int nfs = d->nfs; htsFile **fp = NULL; int nfp = 0; + csp_pileup_t *pileup = NULL; csp_mplp_t *mplp = NULL; bam_mplp_t mp_iter = NULL; const bam_pileup1_t **mp_plp = NULL; int *mp_n = NULL; + mp_aux_t **data = NULL; int ndat = 0; // num of elements in array of mp_aux_t data. + int tid, max_depth; int pos; int i, r, ret; size_t msnp, nsnp, unit = 200000; regitr_t *itr = NULL; kstring_t ks = KS_INITIALIZE, *s = &ks; + #if CSP_FIT_MULTI_SMP - if (gs->tp_errno) { d->ret = 1; goto fail; } + if (gs->tp_errno) { d->ret = 1; goto clean; } #endif + #if DEBUG fprintf(stderr, "[D::%s][Thread-%d] thread options:\n", __func__, d->i); thdata_print(stderr, d); #endif + assert(d->nfs == gs->nin); assert(d->niter == d->m); assert(d->nitr == gs->nin); d->ret = -1; d->ns = d->nr_ad = d->nr_dp = d->nr_oth = 0; + /* prepare data and structures. */ #if CSP_FIT_MULTI_SMP - if (gs->tp_errno) { d->ret = 1; goto fail; } + if (gs->tp_errno) { d->ret = 1; goto clean; } #endif + if (jf_open(d->out_mtx_ad, NULL) <= 0) { fprintf(stderr, "[E::%s] failed to open tmp mtx AD file '%s'.\n", __func__, d->out_mtx_ad->fn); - d->ret = -2; goto fail; + d->ret = -2; goto clean; } if (jf_open(d->out_mtx_dp, NULL) <= 0) { fprintf(stderr, "[E::%s] failed to open tmp mtx DP file '%s'.\n", __func__, d->out_mtx_dp->fn); - d->ret = -2; goto fail; + d->ret = -2; goto clean; } if (jf_open(d->out_mtx_oth, NULL) <= 0) { fprintf(stderr, "[E::%s] failed to open tmp mtx OTH file '%s'.\n", __func__, d->out_mtx_oth->fn); - d->ret = -2; goto fail; + d->ret = -2; goto clean; } if (jf_open(d->out_vcf_base, NULL) <= 0) { fprintf(stderr, "[E::%s] failed to open tmp vcf BASE file '%s'.\n", __func__, d->out_vcf_base->fn); - d->ret = -2; goto fail; + d->ret = -2; goto clean; } if (gs->is_genotype) { if (jf_open(d->out_vcf_cells, NULL) <= 0) { fprintf(stderr, "[E::%s] failed to open tmp vcf CELLS file '%s'.\n", __func__, d->out_vcf_cells->fn); - d->ret = -2; goto fail; + d->ret = -2; goto clean; } } + /* open input files */ #if CSP_FIT_MULTI_SMP - if (gs->tp_errno) { d->ret = 1; goto fail; } + if (gs->tp_errno) { d->ret = 1; goto clean; } #endif + fp = (htsFile**) calloc(gs->nin, sizeof(htsFile*)); - if (NULL == fp) { fprintf(stderr, "[E::%s] failed to open input files\n", __func__); goto fail; } + if (NULL == fp) { + fprintf(stderr, "[E::%s] failed to open input files\n", __func__); + goto clean; + } for (; nfp < gs->nin; ) { if (d->i == 0) { // the caller has opened input files for Thread-0 - fp[nfp] = bam_fs[nfp]->fp; nfp++; + fp[nfp] = bam_fs[nfp]->fp; + nfp++; } else if (NULL == (fp[nfp] = hts_open(gs->in_fns[nfp], "rb"))) { fprintf(stderr, "[E::%s] failed to open %s.\n", __func__, gs->in_fns[nfp]); - d->ret = -2; goto fail; - } else { nfp++; } + d->ret = -2; goto clean; + } else { + nfp++; + } } + /* prepare mplp for pileup. */ #if CSP_FIT_MULTI_SMP - if (gs->tp_errno) { d->ret = 1; goto fail; } + if (gs->tp_errno) { d->ret = 1; goto clean; } #endif - if (NULL == (mplp = csp_mplp_init())) { fprintf(stderr, "[E::%s] could not init csp_mplp_t structure.\n", __func__); goto fail; } - if (csp_mplp_prepare(mplp, gs) < 0) { fprintf(stderr, "[E::%s] could not prepare csp_mplp_t structure.\n", __func__); goto fail; } + + if (NULL == (mplp = csp_mplp_init())) { + fprintf(stderr, "[E::%s] could not init csp_mplp_t structure.\n", __func__); + goto clean; + } + if (csp_mplp_prepare(mplp, gs) < 0) { + fprintf(stderr, "[E::%s] could not prepare csp_mplp_t structure.\n", __func__); + goto clean; + } if (NULL == (pileup = csp_pileup_init())) { fprintf(stderr, "[E::%s] Out of memory allocating csp_pileup_t struct.\n", __func__); - goto fail; + goto clean; } + /* create bam_mplp_* & mp_aux_t data structures */ if (NULL == (data = (mp_aux_t**) malloc(nfs * sizeof(mp_aux_t*)))) { fprintf(stderr, "[E::%s] failed to allocate space for mp_aux_t data.\n", __func__); - goto fail; + goto clean; } for (; ndat < nfs; ndat++) { if (NULL == (data[ndat] = mp_aux_init())) { fprintf(stderr, "[E::%s] failed to allocate space for mp_aux_t.\n", __func__); - goto fail; - } else { data[ndat]->fp = fp[ndat]; data[ndat]->gs = gs; } + goto clean; + } else { + data[ndat]->fp = fp[ndat]; + data[ndat]->gs = gs; + } } if (NULL == (mp_plp = (const bam_pileup1_t**) calloc(nfs, sizeof(bam_pileup1_t*)))) { fprintf(stderr, "[E::%s] failed to allocate space for mp_plp.\n", __func__); - goto fail; + goto clean; } if (NULL == (mp_n = (int*) calloc(nfs, sizeof(int)))) { fprintf(stderr, "[E::%s] failed to allocate space for mp_nplp.\n", __func__); - goto fail; + goto clean; } + // init reg itr if (use_target(gs) && NULL == (itr = regitr_init(gs->targets))) { fprintf(stderr, "[E::%s] failed to init regitr.\n", __func__); - goto fail; + goto clean; } + /* pileup each SNP. */ // init mpileup @@ -306,43 +373,62 @@ static int csp_pileup_core(void *args) { } for (msnp = nsnp = 0; n < d->m; n++, msnp = nsnp = 0) { #if CSP_FIT_MULTI_SMP - if (gs->tp_errno) { d->ret = 1; goto fail; } + if (gs->tp_errno) { d->ret = 1; goto clean; } #endif + #if VERBOSE fprintf(stderr, "[I::%s][Thread-%d] processing chrom %s ...\n", __func__, d->i, a[n]); #endif + /* create bam_mplp_* mpileup structure from htslib */ - for (i = 0; i < ndat; i++) { data[i]->itr = d->iter[n][i]; data[i]->chrom = a[n]; } + for (i = 0; i < ndat; i++) { + data[i]->itr = d->iter[n][i]; + data[i]->chrom = a[n]; + } if (NULL == (mp_iter = bam_mplp_init(nfs, mp_func, (void**) data))) { fprintf(stderr, "[E::%s] failed to create mp_iter for chrom %s.\n", __func__, a[n]); - goto fail; + goto clean; } bam_mplp_set_maxcnt(mp_iter, max_depth); + // As each query region is a chrom, so no need to call bam_mplp_init_overlaps() here? /* begin mpileup */ while ((ret = bam_mplp_auto(mp_iter, &tid, &pos, mp_n, mp_plp)) > 0) { #if CSP_FIT_MULTI_SMP - if (gs->tp_errno) { d->ret = 1; goto fail; } + if (gs->tp_errno) { d->ret = 1; goto clean; } #endif - if (tid < 0) { break; } + if (tid < 0) + break; if (use_target(gs)) { int overlap = regidx_overlap(gs->targets, a[n], pos, pos, itr); biallele_t *ale = NULL; - if (! overlap) { continue; } // no need to reset mplp_t here + if (! overlap) // no need to reset mplp_t here + continue; while (regitr_overlap(itr)) { ale = regitr_payload(itr, biallele_t*); break; } mplp->ref_idx = ale->ref ? seq_nt16_char2int(ale->ref) : -1; mplp->alt_idx = ale->alt ? seq_nt16_char2int(ale->alt) : -1; - } else { mplp->ref_idx = -1; mplp->alt_idx = -1; } + } else { + mplp->ref_idx = -1; + mplp->alt_idx = -1; + } if ((r = pileup_snp(pos, mp_n, mp_plp, nfs, pileup, mplp, gs)) != 0) { if (r < 0) { fprintf(stderr, "[E::%s] failed to pileup snp for %s:%d\n", __func__, a[n], pos); - goto fail; - } else { csp_mplp_reset(mplp); continue; } - } else { d->ns++; } - d->nr_ad += mplp->nr_ad; d->nr_dp += mplp->nr_dp; d->nr_oth += mplp->nr_oth; + goto clean; + } else { + csp_mplp_reset(mplp); + continue; + } + } else { + d->ns++; + } + d->nr_ad += mplp->nr_ad; + d->nr_dp += mplp->nr_dp; + d->nr_oth += mplp->nr_oth; + /* output mplp to mtx and vcf. */ csp_mplp_to_mtx(mplp, d->out_mtx_ad, d->out_mtx_dp, d->out_mtx_oth, d->ns); ksprintf(s, "%s\t%d\t.\t%c\t%c\t.\tPASS\tAD=%ld;DP=%ld;OTH=%ld", a[n], pos + 1, \ @@ -355,6 +441,7 @@ static int csp_pileup_core(void *args) { jf_putc('\n', d->out_vcf_cells); } csp_mplp_reset(mplp); ks_clear(s); + #if VERBOSE if ((++nsnp) - msnp >= unit) { fprintf(stderr, "[I::%s][Thread-%d] has pileup-ed %.2fM SNPs for chrom %s\n", __func__, d->i, nsnp / 1000000.0, a[n]); @@ -362,33 +449,23 @@ static int csp_pileup_core(void *args) { } #endif } + if (ret < 0) { fprintf(stderr, "[E::%s] failed to pileup chrom %s\n", __func__, a[n]); - goto fail; + goto clean; } - for (i = 0; i < ndat; i++) { mp_aux_reset(data[i]); } + for (i = 0; i < ndat; i++) + mp_aux_reset(data[i]); + #if VERBOSE fprintf(stderr, "[I::%s][Thread-%d] has pileup-ed in total %ld SNPs for chrom %s\n", __func__, d->i, nsnp, a[n]); #endif + } - ks_free(s); s = NULL; - jf_close(d->out_mtx_ad); jf_close(d->out_mtx_dp); jf_close(d->out_mtx_oth); - jf_close(d->out_vcf_base); if (gs->is_genotype) { jf_close(d->out_vcf_cells); } - for (i = 0; i < ndat; i++) { mp_aux_destroy(data[i]); } - free(data); - if (d->i > 0) { - for (i = 0; i < nfp; i++) { hts_close(fp[i]); } - } free(fp); fp = NULL; - free(mp_plp); free(mp_n); - // do not free mp_iter here, otherwise will lead to double free error!!! - // seems bam_mplp_* will free the mp_iter by default. - //bam_mplp_destroy(mp_iter); - csp_pileup_destroy(pileup); - csp_mplp_destroy(mplp); - if (itr) { regitr_destroy(itr); } + d->ret = 0; - return n; - fail: + + clean: #if CSP_FIT_MULTI_SMP if (-2 == d->ret && EMFILE == errno) { gs->tp_errno |= TP_EMFILE; } else if (d->ret < 0) { gs->tp_errno |= TP_EUNDEF; } @@ -410,6 +487,9 @@ static int csp_pileup_core(void *args) { } if (mp_plp) free(mp_plp); if (mp_n) free(mp_n); + // do not free mp_iter here, otherwise will lead to double free error!!! + // seems bam_mplp_* will free the mp_iter by default. + //bam_mplp_destroy(mp_iter); if (pileup) csp_pileup_destroy(pileup); if (mplp) { csp_mplp_destroy(mplp); } if (itr) { regitr_destroy(itr); } @@ -417,10 +497,11 @@ static int csp_pileup_core(void *args) { } #if CSP_FIT_MULTI_SMP -/*@abstract Infer appropriate number of threads for multi samples to - avoid the issue that too many open files -@param gs Pointer to global_settings -@return Infered nthread value, no more than 1. +/*!@func +@abstract Infer appropriate number of threads for multi samples to + avoid the issue that too many open files +@param gs Pointer to global_settings +@return Infered nthread value, no more than 1. */ static inline int infer_nthread(global_settings *gs) { if (gs->tp_ntry == 0) { return gs->mthread; } // the first time to try, just use the value user specified @@ -435,9 +516,10 @@ static inline int infer_nthread(global_settings *gs) { } #endif -/*abstract Run cellSNP Mode with method of pileuping. -@param gs Pointer to the global_settings structure. -@return 0 if success, -1 otherwise. +/*!@func +@abstract Run cellSNP Mode with method of pileuping. +@param gs Pointer to the global_settings structure. +@return 0 if success, -1 otherwise. */ int csp_pileup(global_settings *gs) { /* check options (input) */ @@ -445,15 +527,18 @@ int csp_pileup(global_settings *gs) { fprintf(stderr, "[E::%s] error options for fetch modes.\n", __func__); return -1; } + /* prepare running data & options for each thread based on the checked global parameters.*/ if (gs->nthread > 1 && NULL == gs->tp && NULL == (gs->tp = thpool_init(gs->nthread))) { fprintf(stderr, "[E::%s] could not initialize the thread pool.\n", __func__); return -1; } + /* core part. */ int nsample = use_barcodes(gs) ? gs->nbarcode : gs->nin; thread_data **td = NULL, *d = NULL; int ntd = 0, mtd; // ntd: num of thread-data structures that have been created. mtd: size of td array. + csp_bam_fs **bam_fs = NULL; /* use array instead of single element to compatible with multi-input-files. */ csp_bam_fs *bs = NULL; int nfs = 0; @@ -461,75 +546,99 @@ int csp_pileup(global_settings *gs) { hts_itr_t ***iter = NULL; hts_itr_t **itr = NULL; int ntiter = 0, niter = 0, nitr = 0; + const char *ref = NULL; char **a = NULL; kstring_t ks = KS_INITIALIZE, *s = &ks; - int i, j, k, ret; + int i, j, k, ret, is_ok = 0; + size_t ns, nr_ad, nr_dp, nr_oth, ns_merge, nr_merge; jfile_t **out_tmp_mtx_ad, **out_tmp_mtx_dp, **out_tmp_mtx_oth, **out_tmp_vcf_base, **out_tmp_vcf_cells; - out_tmp_mtx_ad = out_tmp_mtx_dp = out_tmp_mtx_oth = out_tmp_vcf_base = out_tmp_vcf_cells = NULL; + /* calc number of threads and number of chroms for each thread. */ mtd = gs->nthread > 1 ? gs->nchrom : 1; + /* create output tmp filenames. */ + out_tmp_mtx_ad = out_tmp_mtx_dp = out_tmp_mtx_oth = out_tmp_vcf_base = out_tmp_vcf_cells = NULL; if (NULL == (out_tmp_mtx_ad = create_tmp_files(gs->out_mtx_ad, mtd, CSP_TMP_ZIP))) { fprintf(stderr, "[E::%s] fail to create tmp files for mtx_AD.\n", __func__); - goto fail; + goto clean; } if (NULL == (out_tmp_mtx_dp = create_tmp_files(gs->out_mtx_dp, mtd, CSP_TMP_ZIP))) { fprintf(stderr, "[E::%s] fail to create tmp files for mtx_DP.\n", __func__); - goto fail; + goto clean; } if (NULL == (out_tmp_mtx_oth = create_tmp_files(gs->out_mtx_oth, mtd, CSP_TMP_ZIP))) { fprintf(stderr, "[E::%s] fail to create tmp files for mtx_OTH.\n", __func__); - goto fail; + goto clean; } if (mtd > 1) { if (NULL == (out_tmp_vcf_base = create_tmp_files(gs->out_vcf_base, mtd, CSP_TMP_ZIP))) { fprintf(stderr, "[E::%s] fail to create tmp files for vcf_BASE.\n", __func__); - goto fail; + goto clean; } if (gs->is_genotype && NULL == (out_tmp_vcf_cells = create_tmp_files(gs->out_vcf_cells, mtd, CSP_TMP_ZIP))) { fprintf(stderr, "[E::%s] fail to create tmp files for vcf_CELLS.\n", __func__); - goto fail; + goto clean; } } + /* create csp_bam_fs structures */ // open input files and construct hdr for Thread-0 and // other threads would use directly hdr of Thread-0 and by themselves open input files. bam_fs = (csp_bam_fs**) calloc(gs->nin, sizeof(csp_bam_fs*)); - if (NULL == bam_fs) { fprintf(stderr, "[E::%s] could not initialize csp_bam_fs* array.\n", __func__); goto fail; } + if (NULL == bam_fs) { + fprintf(stderr, "[E::%s] could not initialize csp_bam_fs* array.\n", __func__); + goto clean; + } for (nfs = 0; nfs < gs->nin; nfs++) { - if (NULL == (bs = csp_bam_fs_init())) { fprintf(stderr, "[E::%s] failed to create csp_bam_fs.\n", __func__); goto fail; } + if (NULL == (bs = csp_bam_fs_init())) { + fprintf(stderr, "[E::%s] failed to create csp_bam_fs.\n", __func__); + goto clean; + } if (NULL == (bs->fp = hts_open(gs->in_fns[nfs], "rb"))) { fprintf(stderr, "[E::%s] failed to open %s.\n", __func__, gs->in_fns[nfs]); - goto fail; + goto clean; } if (NULL == (bs->hdr = sam_hdr_read(bs->fp))) { fprintf(stderr, "[E::%s] failed to read header for %s.\n", __func__, gs->in_fns[nfs]); - goto fail; + goto clean; } if (NULL == (bs->idx = sam_index_load(bs->fp, gs->in_fns[nfs]))) { fprintf(stderr, "[E::%s] failed to load index for %s.\n", __func__, gs->in_fns[nfs]); - goto fail; + goto clean; } bam_fs[nfs] = bs; - } bs = NULL; + } + bs = NULL; + /* prepare hts_itr_t */ titer = (hts_itr_t****) calloc(mtd, sizeof(hts_itr_t***)); - if (NULL == titer) { fprintf(stderr, "[E::%s] could not initialize hts_itr_t*** array.\n", __func__); goto fail; } + if (NULL == titer) { + fprintf(stderr, "[E::%s] could not initialize hts_itr_t*** array.\n", __func__); + goto clean; + } + /* prepare data for thread pool. */ td = (thread_data**) calloc(mtd, sizeof(thread_data*)); - if (NULL == td) { fprintf(stderr, "[E::%s] could not initialize the array of thread_data structure.\n", __func__); goto fail; } + if (NULL == td) { + fprintf(stderr, "[E::%s] could not initialize the array of thread_data structure.\n", __func__); + goto clean; + } + + /* start mpileup */ for (; ntd < mtd; ntd++) { if (NULL == (d = thdata_init())) { fprintf(stderr, "[E::%s] could not initialize the thread_data structure.\n", __func__); - goto fail; + goto clean; } d->n = ntd; d->m = mtd > 1 ? 1 : gs->nchrom; a = gs->chroms + d->n; d->i = ntd; d->gs = gs; + // construct csp_bam_fs d->bfs = bam_fs; d->nfs = nfs; + // construct hts_itr_t // we choose to create all hts_itrs here instead of creating several required hts_itrs in each thread // because in this way we could destroy all idx & hdr before running each thread to save memory as @@ -537,135 +646,164 @@ int csp_pileup(global_settings *gs) { // But in csp_fetch, the idx & hdr cannot be removed before running each thread as they are required // by sam_itr_queryi() in each thread. iter = (hts_itr_t***) calloc(d->m, sizeof(hts_itr_t**)); - if (NULL == iter) { fprintf(stderr, "[E::%s] failed to allocate space for hts_itr_t***\n", __func__); goto fail; } + if (NULL == iter) { + fprintf(stderr, "[E::%s] failed to allocate space for hts_itr_t***\n", __func__); + goto clean; + } for (niter = 0; niter < d->m; niter++) { itr = (hts_itr_t**) calloc(gs->nin, sizeof(hts_itr_t*)); - if (NULL == itr) { fprintf(stderr, "[E::%s] failed to allocate space for hts_itr_t**\n", __func__); goto fail; } + if (NULL == itr) { + fprintf(stderr, "[E::%s] failed to allocate space for hts_itr_t**\n", __func__); + goto clean; + } for (nitr = 0; nitr < gs->nin; nitr++) { if (NULL == (ref = csp_fmt_chr_name(a[niter], bam_fs[nitr]->hdr, s))) { fprintf(stderr, "[E::%s] could not parse name for chrom %s.\n", __func__, a[niter]); - goto fail; - } else { ks_clear(s); } + goto clean; + } else { + ks_clear(s); + } if (NULL == (itr[nitr] = sam_itr_querys(bam_fs[nitr]->idx, bam_fs[nitr]->hdr, ref))) { fprintf(stderr, "[E::%s] could not parse region for chrom %s.\n", __func__, a[niter]); - goto fail; + goto clean; } } iter[niter] = itr; - } itr = NULL; + } + itr = NULL; titer[ntiter++] = iter; d->iter = iter; d->niter = niter; d->nitr = nitr; iter = NULL; + #if DEBUG assert(niter == d->m); assert(nitr == gs->nin); #endif + // construct thdata - d->out_mtx_ad = out_tmp_mtx_ad[ntd]; d->out_mtx_dp = out_tmp_mtx_dp[ntd]; d->out_mtx_oth = out_tmp_mtx_oth[ntd]; + d->out_mtx_ad = out_tmp_mtx_ad[ntd]; + d->out_mtx_dp = out_tmp_mtx_dp[ntd]; + d->out_mtx_oth = out_tmp_mtx_oth[ntd]; if (mtd > 1) { - d->out_vcf_base = out_tmp_vcf_base[ntd]; d->out_vcf_cells = gs->is_genotype ? out_tmp_vcf_cells[ntd] : NULL; + d->out_vcf_base = out_tmp_vcf_base[ntd]; + d->out_vcf_cells = gs->is_genotype ? out_tmp_vcf_cells[ntd] : NULL; } else { - d->out_vcf_base = gs->out_vcf_base; d->out_vcf_cells = gs->is_genotype ? gs->out_vcf_cells : NULL; + d->out_vcf_base = gs->out_vcf_base; + d->out_vcf_cells = gs->is_genotype ? gs->out_vcf_cells : NULL; } td[ntd] = d; - } d = NULL; - // clean hdr - for (i = 0; i < nfs; i++) { sam_hdr_destroy(bam_fs[i]->hdr); bam_fs[i]->hdr = NULL; } - // clean idx - for (i = 0; i < nfs; i++) { hts_idx_destroy(bam_fs[i]->idx); bam_fs[i]->idx = NULL; } + } + d = NULL; + + // clean hdr and idx + for (i = 0; i < nfs; i++) { + sam_hdr_destroy(bam_fs[i]->hdr); bam_fs[i]->hdr = NULL; + } + for (i = 0; i < nfs; i++) { + hts_idx_destroy(bam_fs[i]->idx); bam_fs[i]->idx = NULL; + } + // run threads if (mtd > 1) { for (i = 0; i < mtd; i++) { if (thpool_add_work(gs->tp, (void*) csp_pileup_core, td[i]) < 0) { fprintf(stderr, "[E::%s] could not add thread work (No. %d)\n", __func__, i); - goto fail; + goto clean; } } thpool_wait(gs->tp); - } else { csp_pileup_core(td[0]); } + } else { + csp_pileup_core(td[0]); + } + /* check running status of threads. */ #if DEBUG - for (i = 0; i < mtd; i++) { fprintf(stderr, "[D::%s] ret of thread-%d is %d\n", __func__, i, td[i]->ret); } + for (i = 0; i < mtd; i++) + fprintf(stderr, "[D::%s] ret of thread-%d is %d\n", __func__, i, td[i]->ret); #endif - for (i = 0; i < mtd; i++) { if (td[i]->ret < 0) goto fail; } + for (i = 0; i < mtd; i++) + if (td[i]->ret < 0) + goto clean; + /* merge tmp files. */ ns = nr_ad = nr_dp = nr_oth = 0; for (i = 0; i < mtd; i++) { - nr_ad += td[i]->nr_ad; nr_dp += td[i]->nr_dp; nr_oth += td[i]->nr_oth; + nr_ad += td[i]->nr_ad; + nr_dp += td[i]->nr_dp; + nr_oth += td[i]->nr_oth; ns += td[i]->ns; } - if (jf_open(gs->out_mtx_ad, NULL) < 0) { fprintf(stderr, "[E::%s] failed to open mtx AD.\n", __func__); goto fail; } + + if (jf_open(gs->out_mtx_ad, NULL) < 0) { + fprintf(stderr, "[E::%s] failed to open mtx AD.\n", __func__); + goto clean; + } jf_printf(gs->out_mtx_ad, "%ld\t%d\t%ld\n", ns, nsample, nr_ad); merge_mtx(gs->out_mtx_ad, out_tmp_mtx_ad, mtd, &ns_merge, &nr_merge, &ret); - if (ret < 0 || ns_merge != ns || nr_merge != nr_ad) { fprintf(stderr, "[E::%s] failed to merge mtx AD.\n", __func__); goto fail; } + if (ret < 0 || ns_merge != ns || nr_merge != nr_ad) { + fprintf(stderr, "[E::%s] failed to merge mtx AD.\n", __func__); + goto clean; + } jf_close(gs->out_mtx_ad); - if (jf_open(gs->out_mtx_dp, NULL) < 0) { fprintf(stderr, "[E::%s] failed to open mtx DP.\n", __func__); goto fail; } + if (jf_open(gs->out_mtx_dp, NULL) < 0) { + fprintf(stderr, "[E::%s] failed to open mtx DP.\n", __func__); + goto clean; + } jf_printf(gs->out_mtx_dp, "%ld\t%d\t%ld\n", ns, nsample, nr_dp); merge_mtx(gs->out_mtx_dp, out_tmp_mtx_dp, mtd, &ns_merge, &nr_merge, &ret); - if (ret < 0 || ns_merge != ns || nr_merge != nr_dp) { fprintf(stderr, "[E::%s] failed to merge mtx DP.\n", __func__); goto fail; } + if (ret < 0 || ns_merge != ns || nr_merge != nr_dp) { + fprintf(stderr, "[E::%s] failed to merge mtx DP.\n", __func__); + goto clean; + } jf_close(gs->out_mtx_dp); - if (jf_open(gs->out_mtx_oth, NULL) < 0) { fprintf(stderr, "[E::%s] failed to open mtx OTH.\n", __func__); goto fail; } + if (jf_open(gs->out_mtx_oth, NULL) < 0) { + fprintf(stderr, "[E::%s] failed to open mtx OTH.\n", __func__); + goto clean; + } jf_printf(gs->out_mtx_oth, "%ld\t%d\t%ld\n", ns, nsample, nr_oth); merge_mtx(gs->out_mtx_oth, out_tmp_mtx_oth, mtd, &ns_merge, &nr_merge, &ret); - if (ret < 0 || ns_merge != ns || nr_merge != nr_oth) { fprintf(stderr, "[E::%s] failed to merge mtx OTH.\n", __func__); goto fail; } + if (ret < 0 || ns_merge != ns || nr_merge != nr_oth) { + fprintf(stderr, "[E::%s] failed to merge mtx OTH.\n", __func__); + goto clean; + } jf_close(gs->out_mtx_oth); if (mtd > 1) { - if (jf_open(gs->out_vcf_base, NULL) < 0) { fprintf(stderr, "[E::%s] failed to open vcf BASE.\n", __func__); goto fail; } + if (jf_open(gs->out_vcf_base, NULL) < 0) { + fprintf(stderr, "[E::%s] failed to open vcf BASE.\n", __func__); + goto clean; + } merge_vcf(gs->out_vcf_base, out_tmp_vcf_base, mtd, &ret); - if (ret < 0) { fprintf(stderr, "[E::%s] failed to merge vcf BASE.\n", __func__); goto fail; } + if (ret < 0) { + fprintf(stderr, "[E::%s] failed to merge vcf BASE.\n", __func__); + goto clean; + } jf_close(gs->out_vcf_base); - if (gs->is_genotype) { - if (jf_open(gs->out_vcf_cells, NULL) < 0) { fprintf(stderr, "[E::%s] failed to open vcf CELLS.\n", __func__); goto fail; } + if (jf_open(gs->out_vcf_cells, NULL) < 0) { + fprintf(stderr, "[E::%s] failed to open vcf CELLS.\n", __func__); + goto clean; + } merge_vcf(gs->out_vcf_cells, out_tmp_vcf_cells, mtd, &ret); - if (ret < 0) { fprintf(stderr, "[E::%s] failed to merge vcf CELLS.\n", __func__); goto fail; } + if (ret < 0) { + fprintf(stderr, "[E::%s] failed to merge vcf CELLS.\n", __func__); + goto clean; + } jf_close(gs->out_vcf_cells); } } - /* clean */ - for (i = 0; i < mtd; i++) { thdata_destroy(td[i]); } - free(td); td = NULL; - ks_free(s); s = NULL; - for (i = 0; i < ntiter; i++) { - for (j = 0; j < niter; j++) { - for (k = 0; k < nitr; k++) { hts_itr_destroy(titer[i][j][k]); } - free(titer[i][j]); - } - free(titer[i]); - } - free(titer); titer = NULL; + + is_ok = 1; + // hdr of other thdata should be set to NULL before being destroyed // otherwise will cause double free error! - for (j = 0; j < nfs; j++) { csp_bam_fs_destroy(bam_fs[j]); } - free(bam_fs); bam_fs = NULL; - if (destroy_tmp_files(out_tmp_mtx_ad, mtd) < 0) { - fprintf(stderr, "[W::%s] failed to remove tmp mtx AD files.\n", __func__); - } out_tmp_mtx_ad = NULL; - if (destroy_tmp_files(out_tmp_mtx_dp, mtd) < 0) { - fprintf(stderr, "[W::%s] failed to remove tmp mtx DP files.\n", __func__); - } out_tmp_mtx_dp = NULL; - if (destroy_tmp_files(out_tmp_mtx_oth, mtd) < 0) { - fprintf(stderr, "[W::%s] failed to remove tmp mtx OTH files.\n", __func__); - } out_tmp_mtx_oth = NULL; - if (mtd > 1) { - if (destroy_tmp_files(out_tmp_vcf_base, mtd) < 0) { - fprintf(stderr, "[W::%s] failed to remove tmp vcf BASE files.\n", __func__); - } out_tmp_vcf_base = NULL; - if (gs->is_genotype) { - if (destroy_tmp_files(out_tmp_vcf_cells, mtd) < 0) { - fprintf(stderr, "[W::%s] failed to remove tmp vcf CELLS files.\n", __func__); - } out_tmp_vcf_cells = NULL; - } - } - return 0; - fail: + + clean: if (td) { for (i = 0; i < mtd; i++) { thdata_destroy(td[i]); } free(td); } - if (d) { thdata_destroy(d); } if (s) { ks_free(s); } if (titer) { for (i = 0; i < ntiter; i++) { @@ -677,18 +815,6 @@ int csp_pileup(global_settings *gs) { } free(titer); } - if (iter) { - for (j = 0; j < niter; j++) { - for (k = 0; k < nitr; k++) { hts_itr_destroy(iter[j][k]); } - free(iter[j]); - } - free(iter); - } - if (itr) { - for (k = 0; k < nitr; k++) { hts_itr_destroy(itr[k]); } - free(itr); - } - if (bs) { csp_bam_fs_destroy(bs); } if (bam_fs) { for (j = 0; j < nfs; j++) { csp_bam_fs_destroy(bam_fs[j]); } free(bam_fs); @@ -710,18 +836,39 @@ int csp_pileup(global_settings *gs) { fprintf(stderr, "[W::%s] failed to remove tmp vcf CELLS files.\n", __func__); } } + + if (is_ok) + return 0; + + //fail: + if (d) { thdata_destroy(d); } + if (iter) { + for (j = 0; j < niter; j++) { + for (k = 0; k < nitr; k++) { hts_itr_destroy(iter[j][k]); } + free(iter[j]); + } + free(iter); + } + if (itr) { + for (k = 0; k < nitr; k++) { hts_itr_destroy(itr[k]); } + free(itr); + } + if (bs) { csp_bam_fs_destroy(bs); } if (jf_isopen(gs->out_mtx_ad)) { jf_close(gs->out_mtx_ad); } if (jf_isopen(gs->out_mtx_dp)) { jf_close(gs->out_mtx_dp); } if (jf_isopen(gs->out_mtx_oth)) { jf_close(gs->out_mtx_oth); } if (jf_isopen(gs->out_vcf_base)) { jf_close(gs->out_vcf_base); } if (gs->is_genotype && jf_isopen(gs->out_vcf_cells)) { jf_close(gs->out_vcf_cells); } + #if CSP_FIT_MULTI_SMP if (gs->tp_errno & TP_EMFILE && ! (gs->tp_errno & TP_EUNDEF) && gs->nthread > 1) { fprintf(stderr, "================================================================================\n"); fprintf(stderr, "[W::%s] Last try (nthreads = %d) failed due to the issue of too many open files.\n", __func__, gs->nthread); // reset gs, especially items related to thpool - if (gs->tp) { thpool_destroy(gs->tp); gs->tp = NULL; } + if (gs->tp) { + thpool_destroy(gs->tp); gs->tp = NULL; + } gs->tp_ntry++; gs->nthread = infer_nthread(gs); gs->tp_errno = 0; @@ -729,10 +876,11 @@ int csp_pileup(global_settings *gs) { __func__, gs->tp_ntry, gs->nthread); fprintf(stderr, "================================================================================\n"); return csp_pileup(gs); - } else { return -1; } + } else { + return -1; + } #else return -1; #endif } - diff --git a/src/jfile.c b/src/jfile.c index 8922f11..f2dab4c 100644 --- a/src/jfile.c +++ b/src/jfile.c @@ -1,4 +1,4 @@ -/* File operatoins API/routine +/* jfile.c - File operatoins API/routine * Author: Xianjie Huang */ @@ -8,7 +8,7 @@ #include #include #include -#include "htslib/kstring.h" // do not use "kstring.h" as it's different from "htslib/kstring.h" +#include "htslib/kstring.h" // do not use "kstring.h" as it's different from "htslib/kstring.h" #include "htslib/bgzf.h" #include "config.h" #include "jfile.h" @@ -25,15 +25,23 @@ int jf_bgzf_gets(BGZF *fp, kstring_t *s) { jfile_t* jf_init(void) { jfile_t *p = (jfile_t*) calloc(1, sizeof(jfile_t)); - if (p) { p->buf = &p->ks; p->bufsize = 1048576; } // p->ks has been initialized after calling calloc(). Double initializing will cause error. + if (p) { // p->ks has been initialized after calling calloc(). Double initializing will cause error. + p->buf = &p->ks; + p->bufsize = 1048576; + } return p; } void jf_destroy(jfile_t* p) { if (p) { if (p->is_open) { - if (p->is_zip) { jf_zclose(p->zfp); p->zfp = NULL; } - else { fclose(p->fp); p->fp = NULL; } + if (p->is_zip) { + jf_zclose(p->zfp); + p->zfp = NULL; + } else { + fclose(p->fp); + p->fp = NULL; + } } ks_free(p->buf); free(p->fn); free(p); @@ -46,21 +54,29 @@ void jf_set_bufsize(jfile_t *p, size_t bufsize) { p->bufsize = bufsize; } int jf_isopen(jfile_t *p) { return p->is_open; } int jf_open(jfile_t *p, char *mode) { - if (p->is_open) { return 0; } + if (p->is_open) + return 0; char *fm = mode ? mode : p->fm; if (p->is_zip) { - if (NULL == (p->zfp = jf_zopen(p->fn, fm))) { return -1; } - else { p->is_open = 1; return 1; } + if (NULL == (p->zfp = jf_zopen(p->fn, fm))) { + return -1; + } else { + p->is_open = 1; + return 1; + } } else if (NULL == (p->fp = fopen(p->fn, fm))) { return -1; - } else { p->is_open = 1; return 1; } + } else { + p->is_open = 1; + return 1; + } } ssize_t jf_read(jfile_t *p, char *buf, size_t len) { return p->is_zip ? jf_zread(p->zfp, buf, len) : fread(buf, 1, len, p->fp); } -//@note kgetline() is defined in htslib/kstring.h +//@note kgetline() is defined in htslib/kstring.h int jf_getln(jfile_t *p, kstring_t *s) { return p->is_zip ? jf_zgetln(p->zfp, s) : kgetline(s, (kgets_func*) fgets, p->fp); } @@ -82,45 +98,56 @@ int jf_printf(jfile_t *p, const char *fmt, ...) { va_start(ap, fmt); l = kvsprintf(p->buf, fmt, ap); va_end(ap); - if (ks_len(p->buf) >= p->bufsize && jf_flush(p) < 0) { return EOF; } + if (ks_len(p->buf) >= p->bufsize && jf_flush(p) < 0) + return EOF; return l; } int jf_putc(int c, jfile_t *p) { int l; l = kputc(c, p->buf); - if (ks_len(p->buf) >= p->bufsize && jf_flush(p) < 0) { return EOF; } + if (ks_len(p->buf) >= p->bufsize && jf_flush(p) < 0) + return EOF; return l; } int jf_putc_(int c, jfile_t *p) { int l; l = kputc_(c, p->buf); - if (ks_len(p->buf) >= p->bufsize && jf_flush(p) < 0) { return EOF; } + if (ks_len(p->buf) >= p->bufsize && jf_flush(p) < 0) + return EOF; return l; } int jf_puts(const char *s, jfile_t *p) { int l; l = kputs(s, p->buf); - if (ks_len(p->buf) >= p->bufsize && jf_flush(p) < 0) { return EOF; } + if (ks_len(p->buf) >= p->bufsize && jf_flush(p) < 0) + return EOF; return l; } int jf_write(jfile_t *p, char *buf, size_t len) { int l; l = kputsn(buf, len, p->buf); - if (ks_len(p->buf) >= p->bufsize && jf_flush(p) < 0) { return EOF; } + if (ks_len(p->buf) >= p->bufsize && jf_flush(p) < 0) + return EOF; return l; } -//@note Even fail, the jfile_t will still be set to not open. +//@note Even fail, the jfile_t will still be set to not open. int jf_close(jfile_t *p) { int ret = 0; if (p->is_open) { - if (ks_len(p->buf) && jf_flush(p) < 0) { ret = EOF; } // only for write mode. - if (p->is_zip) { jf_zclose(p->zfp); p->zfp = NULL; } - else { fclose(p->fp); p->fp = NULL; } + if (ks_len(p->buf) && jf_flush(p) < 0) // only for write mode. + ret = EOF; + if (p->is_zip) { + jf_zclose(p->zfp); + p->zfp = NULL; + } else { + fclose(p->fp); + p->fp = NULL; + } p->is_open = 0; } return ret; @@ -135,8 +162,10 @@ int jf_remove(jfile_t *p) { int jf_remove_all(jfile_t **fs, const int n) { int i, j, ret; for (i = 0, j = 0; i < n; i++) { - if ((ret = jf_remove(fs[i])) < 0) { return -1; } - else { j += ret; } + if ((ret = jf_remove(fs[i])) < 0) + return -1; + else + j += ret; } return j; } @@ -145,14 +174,18 @@ int jf_remove_all(jfile_t **fs, const int n) { * File Functions */ -//@note Only works for Unix system as the path seperator used in this function is '/'. +//@note Only works for Unix system as the path seperator used in this function is '/'. char* join_path(const char *p1, const char *p2) { kstring_t ks = KS_INITIALIZE, *s = &ks; char *p = NULL; int n1; - if (NULL == p1 || (n1 = strlen(p1)) <= 0 || NULL == p2) { ks_free(s); return NULL; } + if (NULL == p1 || (n1 = strlen(p1)) <= 0 || NULL == p2) { + ks_free(s); + return NULL; + } kputs(p1, s); - if (p1[n1 - 1] != '/') { kputc('/', s); } + if (p1[n1 - 1] != '/') + kputc('/', s); kputs(p2, s); p = strdup(ks_str(s)); ks_free(s); @@ -165,13 +198,25 @@ int merge_files(char **in_fn, const int n, const char *out_fn) { FILE *in = NULL, *out = NULL; int i = 0; size_t m; - if (NULL == in_fn || NULL == out_fn) { return 0; } - if (NULL == (out = fopen(out_fn, "w"))) { fprintf(stderr, "[E::%s] could not open '%s'\n", __func__, out_fn); return 0; } + if (NULL == in_fn || NULL == out_fn) + return 0; + if (NULL == (out = fopen(out_fn, "w"))) { + fprintf(stderr, "[E::%s] could not open '%s'\n", __func__, out_fn); + return 0; + } for (i = 0; i < n; i++) { - if (NULL == (in = fopen(in_fn[i], "r"))) { fprintf(stderr, "[E::%s] could not open '%s'\n", __func__, in_fn[i]); goto fail; } - while ((m = fread(buf, 1, TMP_BUFSIZE, in)) > 0) { fwrite(buf, 1, m, out); } - if (ferror(in)) { goto fail; } - else { fclose(in); in = NULL; } + if (NULL == (in = fopen(in_fn[i], "r"))) { + fprintf(stderr, "[E::%s] could not open '%s'\n", __func__, in_fn[i]); + goto fail; + } + while ((m = fread(buf, 1, TMP_BUFSIZE, in)) > 0) + fwrite(buf, 1, m, out); + if (ferror(in)) { + goto fail; + } else { + fclose(in); + in = NULL; + } } fclose(out); return i; @@ -191,8 +236,10 @@ int remove_file(char *fn) { int remove_files(char **fn, const int n) { int i, j, ret; for (i = 0, j = 0; i < n; i++) { - if ((ret = remove_file(fn[i])) < 0) { return -1; } - else { j += ret; } + if ((ret = remove_file(fn[i])) < 0) + return -1; + else + j += ret; } return j; } diff --git a/src/jfile.h b/src/jfile.h index 98704e2..5c9625d 100644 --- a/src/jfile.h +++ b/src/jfile.h @@ -1,4 +1,4 @@ -/* File operatoins API/routine +/* jfile.h - File operatoins API/routine * Author: Xianjie Huang */ #ifndef SZ_JFILE_H @@ -43,62 +43,46 @@ int jf_bgzf_gets(BGZF *fp, kstring_t *s); #define jf_zwrite(zfp, buf, len) gzwrite(zfp, buf, len) #endif -/*@abstract Structure used for outputed files with Simple Output Buffer. -@param fn Filename. -@param fm Filemode. -@param zfp File pointer for zipped mode. -@param fp File pointer for non-zipped mode. -@param is_zip If the outputed file should be zipped. -@param is_tmp If the outputed file is a tmp file. It's only used by mtx file and has no effect on I/O. -@param is_open If the outputed file is open. -@param buf Mimic Output Buffer. -@param bufsize Size of buffer. -@note 1. The @p fn should be valid pointer coming from strdup(). - 2. The @p fm points to const string, so do not free it! - 3. Output buffer is inside the structure. -@TODO Add is_error to save the state that if I/O has error. - */ +// Structure used for outputed files with Simple Output Buffer. +// @TODO Add is_error to save the state that if I/O has error. typedef struct { - char *fn; - char *fm; - JF_ZFILE zfp; - FILE *fp; - uint8_t is_zip, is_tmp, is_open; + char *fn; // File name. should come from strdup(). + char *fm; // File mode. point to const string, do not free it! + JF_ZFILE zfp; // File pointer for zipped mode. + FILE *fp; // File pointer for non-zipped mode. + uint8_t is_zip, is_tmp, is_open; // is_*: for output file. is_tmp: only for mtx file. kstring_t ks, *buf; size_t bufsize; } jfile_t; -/*@abstract Initialize the jfile_t structure. -@param Void. -@return Pointer of jfile_t if success, NULL otherwise. - */ jfile_t* jf_init(void); void jf_destroy(jfile_t* p); void jf_set_bufsize(jfile_t *p, size_t bufsize); - -/* If the jfile_t is open. 0:no; 1:yes. */ int jf_isopen(jfile_t *p); -/*@abstract Open jfile_t for reading or writing. +/*!@func +@abstract Open jfile_t for reading or writing. @param p Pointer of jfile_t. @param mode Open mode as in fopen(). if NULL, use default mode inside jfile_t. @return 1 if success, 0 if already open, -1 if error. */ int jf_open(jfile_t *p, char *mode); -/*@abstract Read from jfile_t without Input buffer. +/*!@func +@abstract Read from jfile_t without Input buffer. @param p Pointer of jfile_t. @param buf Buffer where the read content will be pushed into. @param len Size of content to be read. -@return Value returned as gzread/fread. */ +@return Value returned as gzread/fread. +*/ ssize_t jf_read(jfile_t *p, char *buf, size_t len); -/*@abstract Get a line from jfile_t without Input buffer. -@param p Pointer of jfile_t. -@param s Pointer of kstring_t which saves the line. -@return Value returned as kgetline(). 0 if success, EOF if end-of-file or error. - -@note kgetline() is defined in htslib/kstring.h +/*!@func +@abstract Get a line from jfile_t without Input buffer. +@param p Pointer of jfile_t. +@param s Pointer of kstring_t which saves the line. +@return Value returned as kgetline(). 0 if success, EOF if end-of-file or error. +@note kgetline() is defined in htslib/kstring.h */ int jf_getln(jfile_t *p, kstring_t *s); @@ -106,35 +90,39 @@ int jf_getln(jfile_t *p, kstring_t *s); @return Value returned are like in fxxx()/kxxx() functions (fputc()/kputc() etc.), which are the real size outputed if success, EOF if error. */ -/*@abstract Flush buffer to stream. -@param p Pointer of jfile_t. -@return 0 if success, EOF otherwise. +/*!@func +@abstract Flush buffer to stream. +@param p Pointer of jfile_t. +@return 0 if success, EOF otherwise. */ int jf_flush(jfile_t *p); + int jf_printf(jfile_t *p, const char *fmt, ...); int jf_putc(int c, jfile_t *p); int jf_putc_(int c, jfile_t *p); int jf_puts(const char *s, jfile_t *p); int jf_write(jfile_t *p, char *buf, size_t len); -/*@abstract Close jfile_t but does not destroy it. -@param p Pointer of jfile_t. -@return 0 if success, EOF otherwise. - -@note Even fail, the jfile_t will still be set to not open. +/*!@func +@abstract Close jfile_t but does not destroy it. +@param p Pointer of jfile_t. +@return 0 if success, EOF otherwise. +@note Even fail, the jfile_t will still be set to not open. */ int jf_close(jfile_t *p); -/*@abstract Remove file. -@param p Pointer of jfile_t to be removed. -@return 1 if success, 0 if file does not exist, -1 if failure. +/*!@func +@abstract Remove file. +@param p Pointer of jfile_t to be removed. +@return 1 if success, 0 if file does not exist, -1 if failure. */ int jf_remove(jfile_t *p); -/*@abstract Remove all files in array. -@param fs Pointer of array of jfile_t to be removed. -@param n Size of array. -@return Num of files have been removed if no error, -1 otherwise. +/*!@func +@abstract Remove all files in array. +@param fs Pointer of array of jfile_t to be removed. +@param n Size of array. +@return Num of files have been removed if no error, -1 otherwise. */ int jf_remove_all(jfile_t **fs, const int n); @@ -142,34 +130,38 @@ int jf_remove_all(jfile_t **fs, const int n); * File Functions */ -/*@abstract Join together two pathes. -@param p1 Pointer to the first path. -@param p2 Pointer to the second path. -@return Pointer to the joined path if success, NULL otherwise. - -@note Only works for Unix system as the path seperator used in this function is '/'. +/*!@func +@abstract Join together two pathes. +@param p1 Pointer to the first path. +@param p2 Pointer to the second path. +@return Pointer to the joined path if success, NULL otherwise. +@note Only works for Unix system as the path seperator used in this function is '/'. */ char* join_path(const char *p1, const char *p2); -/*@abstract Merge several files into one. -@param in_fn Names of input files to be merged. -@param n Num of input files. -@param out_fn Name of output file. -@return Num of files have been merged. +/*!@func +@abstract Merge several files into one. +@param in_fn Names of input files to be merged. +@param n Num of input files. +@param out_fn Name of output file. +@return Num of files have been merged. */ int merge_files(char **in_fn, const int n, const char *out_fn); -/*@abstract Remove file. -@param fn Name of file to be removed. -@return 1 if success, 0 if file does not exist, -1 if failure. +/*!@func +@abstract Remove file. +@param fn Name of file to be removed. +@return 1 if success, 0 if file does not exist, -1 if failure. */ int remove_file(char *fn); -/*@abstract Remove several files. -@param fn Names of files to be removed. -@param n Num of files. -@return Num of files have been removed if no error, -1 otherwise. +/*!@func +@abstract Remove several files. +@param fn Names of files to be removed. +@param n Num of files. +@return Num of files have been removed if no error, -1 otherwise. */ int remove_files(char **fn, const int n); #endif + diff --git a/src/jmempool.h b/src/jmempool.h index 4f1dc20..723d60e 100644 --- a/src/jmempool.h +++ b/src/jmempool.h @@ -1,4 +1,4 @@ -/* Memory management API/routine +/* jmempool.h - Memory management API/routine * Author: Xianjie Huang */ #ifndef SZ_JMEMPOOL_H @@ -64,94 +64,63 @@ The jmempool_##name##_t @param a Pointer to the array of base_type*. @param is_reset If the pool has been reset. 1/0. */ -#define JMEMPOOL_INIT2(SCOPE, name, base_type, base_free_f, base_reset_f) \ - typedef struct { \ - size_t l, n, m; \ - base_type **a; \ - int is_reset; \ - } jmempool_##name##_t; \ - SCOPE jmempool_##name##_t* jmempool_init_##name(void) { \ - return (jmempool_##name##_t*) calloc(1, sizeof(jmempool_##name##_t)); \ - } \ - SCOPE void jmempool_destroy_##name(jmempool_##name##_t *p) { \ - size_t k; \ - for (k = 0; k < p->n; k++) { base_free_f(p->a[k]); } \ - free(p->a); free(p); \ - } \ - SCOPE base_type* jmempool_get_##name(jmempool_##name##_t *p) { \ - if (p->l < p->n) { \ - base_type *t = p->a[p->l++]; \ - if (p->is_reset) base_reset_f(t); \ - return t; \ - } else if (p->n >= p->m) { \ - if (p->m) { p->m++; kroundup32(p->m); } \ - else { p->m = 16; } \ - p->a = (base_type**) realloc(p->a, sizeof(base_type*) * p->m); \ +#define JMEMPOOL_INIT2(SCOPE, name, base_type, base_free_f, base_reset_f) \ + typedef struct { \ + size_t l, n, m; \ + base_type **a; \ + int is_reset; \ + } jmempool_##name##_t; \ + SCOPE jmempool_##name##_t* jmempool_init_##name(void) { \ + return (jmempool_##name##_t*) calloc(1, sizeof(jmempool_##name##_t)); \ + } \ + SCOPE void jmempool_destroy_##name(jmempool_##name##_t *p) { \ + size_t k; \ + for (k = 0; k < p->n; k++) { base_free_f(p->a[k]); } \ + free(p->a); free(p); \ + } \ + SCOPE base_type* jmempool_get_##name(jmempool_##name##_t *p) { \ + if (p->l < p->n) { \ + base_type *t = p->a[p->l++]; \ + if (p->is_reset) base_reset_f(t); \ + return t; \ + } else if (p->n >= p->m) { \ + if (p->m) { p->m++; kroundup32(p->m); } \ + else { p->m = 16; } \ + p->a = (base_type**) realloc(p->a, sizeof(base_type*) * p->m); \ } \ - p->a[p->n++] = (base_type*) calloc(1, sizeof(base_type)); /* whatif still p->m <= p->n */ \ - return p->a[p->l++]; /* assert p->l = p->n */ \ - } \ - SCOPE void jmempool_reset_##name(jmempool_##name##_t *p) { p->l = 0; p->is_reset = 1; } \ - SCOPE size_t jmempool_size_##name(jmempool_##name##_t *p) { return p->n; } \ - SCOPE size_t jmempool_max_##name(jmempool_##name##_t *p) { return p->m; } \ - SCOPE size_t jmempool_used_##name(jmempool_##name##_t *p) { return p->l; } \ + p->a[p->n++] = (base_type*) calloc(1, sizeof(base_type)); /* whatif still p->m <= p->n */ \ + return p->a[p->l++]; /* assert p->l = p->n */ \ + } \ + SCOPE void jmempool_reset_##name(jmempool_##name##_t *p) { p->l = 0; p->is_reset = 1; } \ + SCOPE size_t jmempool_size_##name(jmempool_##name##_t *p) { return p->n; } \ + SCOPE size_t jmempool_max_##name(jmempool_##name##_t *p) { return p->m; } \ + SCOPE size_t jmempool_used_##name(jmempool_##name##_t *p) { return p->l; } \ SCOPE base_type* jmempool_A_##name(jmempool_##name##_t *p, size_t i) { return p->a[i]; } -#define JMEMPOOL_INIT(name, base_type, base_free_f, base_reset_f) \ +#define JMEMPOOL_INIT(name, base_type, base_free_f, base_reset_f) \ JMEMPOOL_INIT2(static inline, name, base_type, base_free_f, base_reset_f) -/*@abstract Declare a JMEMPOOL. -@param name Name of the pool. -@return Void. -*/ #define jmempool_t(name) jmempool_##name##_t -/*@abstract Initialize a named pool -@param name Name of the pool. -@return Pointer to the pool if success, NULL otherwise. -*/ +//@return Pointer to the pool if success, NULL otherwise. #define jmempool_init(name) jmempool_init_##name() -/*@abstract Destroy a named pool. -@param name Name of the pool. -@param p Pointer to the pool. -@return Void. -*/ +//@return Void. #define jmempool_destroy(name, p) jmempool_destroy_##name(p) -/*@abstract Get an available element from the pool. -@param name Name of the pool. -@param p Pointer to the pool. -@return An available element in the pool. - */ +//@return An available element in the pool. #define jmempool_get(name, p) jmempool_get_##name(p) -/*@abstract Reset the pool without reallocating memory. -@param name Name of the pool. -@param p Pointer to the pool. -@return Void. - */ +//@return Void. #define jmempool_reset(name, p) jmempool_reset_##name(p) -/*@abstract Return the number of elements have been used in the pool. -@param name Name of the pool. -@param p Pointer to the pool. -@return The number of elements have been used in the pool. - */ +//@abstract Return the number of elements have been used in the pool. #define jmempool_used(name, p) jmempool_used_##name(p) -/*@abstract Return the number of elements exist in the pool. -@param name Name of the pool. -@param p Pointer to the pool. -@return The number of elements exist in the pool. - */ +//@abstract Return the number of elements exist in the pool. #define jmempool_size(name, p) jmempool_size_##name(p) -/*@abstract Return total size of the pool. -@param name Name of the pool. -@param p Pointer to the pool. -@return Total size of the pool. - */ +//@abstract Return total size of the pool. #define jmempool_max(name, p) jmempool_max_##name(p) /*@abstract Return the element of certain index in the pool. @@ -159,7 +128,6 @@ The jmempool_##name##_t @param p Pointer to the pool. @param i Index of the element in the pool [size_t]. @return The element [base_type*]. - @note 1. Be careful that the index i must be less than the total size of pool. 2. Besides, the returned element could be NULL or element that have not been reset, so there are some steps to be taken before the element can be used. If you want to get an element that can be used immediately, @@ -168,3 +136,4 @@ The jmempool_##name##_t #define jmempool_A(name, p, i) jmempool_A_##name(p, i) #endif + diff --git a/src/jnumeric.h b/src/jnumeric.h index 3bf1e7f..f2a93ba 100644 --- a/src/jnumeric.h +++ b/src/jnumeric.h @@ -1,4 +1,4 @@ -/* Numeric operatoins API/routine +/* jnumeric.h - Numeric operatoins API/routine * Author: Xianjie Huang */ #ifndef SZ_JNUMERIC_H @@ -37,37 +37,38 @@ int main(void) { return 0; } */ -#define JNUMERIC_INIT2(SCOPE, name, type) \ - SCOPE type get_sum_of_arr_##name(type *a, const int n) { \ - int i; \ - type sum; \ - for (i = 0, sum = 0; i < n; i++) sum += a[i]; \ - return sum; \ - } \ - SCOPE int get_idx_of_max_##name(type *a, const int n) { \ - int i, j; \ - type max; \ - for (i = 1, j = 0, max = a[0]; i < n; i++) { \ - if (a[i] > max) { max = a[i]; j = i; } \ - } \ - return j; \ - } \ - SCOPE int join_arr_to_str_##name(type *a, const int n, char c, char *fmt, kstring_t *s) { \ - int i; /* TODO: to test if the ret of ksxxx functions is right. */ \ - for (i = 0; i < n - 1; i++) { ksprintf(s, fmt, a[i]); kputc_(c, s); } \ - if (n >= 1) { ksprintf(s, fmt, a[i]); } \ - return n; \ +#define JNUMERIC_INIT2(SCOPE, name, type) \ + SCOPE type get_sum_of_arr_##name(type *a, const int n) { \ + int i; \ + type sum; \ + for (i = 0, sum = 0; i < n; i++) sum += a[i]; \ + return sum; \ + } \ + SCOPE int get_idx_of_max_##name(type *a, const int n) { \ + int i, j; \ + type max; \ + for (i = 1, j = 0, max = a[0]; i < n; i++) { \ + if (a[i] > max) { max = a[i]; j = i; } \ + } \ + return j; \ + } \ + SCOPE int join_arr_to_str_##name(type *a, const int n, char c, char *fmt, kstring_t *s) { \ + int i; /* TODO: to test if the ret of ksxxx functions is right. */ \ + for (i = 0; i < n - 1; i++) { ksprintf(s, fmt, a[i]); kputc_(c, s); } \ + if (n >= 1) { ksprintf(s, fmt, a[i]); } \ + return n; \ } -/*@abstract Macro to declare the JNUMERIC functions. -@param name Name of JNUMERIC. -@param type The numeric type: int, double, size_t etc. - -@example JNUMERIC_INIT(test, int). +/*!@macro +@abstract Macro to declare the JNUMERIC functions. +@param name Name of JNUMERIC. +@param type The numeric type: int, double, size_t etc. +@example JNUMERIC_INIT(test, int). */ #define JNUMERIC_INIT(name, type) JNUMERIC_INIT2(static inline, name, type) -/*@abstract Calculate sum of a numeric array. +/*!@func +@abstract Calculate sum of a numeric array. @param name Name of the JNUMERIC. @param a Pointer of the numeric array [type*]. @param n Size of the array [int]. @@ -75,7 +76,8 @@ int main(void) { */ #define get_sum_of_arr(name, a, n) get_sum_of_arr_##name(a, n) -/*@abstract Get the index of the maximum element in a numeric array. +/*!@func +@abstract Get the index of the maximum element in a numeric array. @param name Name of the JNUMERIC. @param a Pointer of the numeric array [type*]. @param n Size of the array [int]. @@ -83,7 +85,8 @@ int main(void) { */ #define get_idx_of_max(name, a, n) get_idx_of_max_##name(a, n) -/*@abstract Join elements of a numeric array by a delimiter into string. +/*!@func +@abstract Join elements of a numeric array by a delimiter into string. @param name Name of the JNUMERIC. @param a Pointer of the numeric array [type*]. @param n Size of the array [int]. @@ -95,3 +98,4 @@ int main(void) { #define join_arr_to_str(name, a, n, c, fmt, s) join_arr_to_str_##name(a, n, c, fmt, s) #endif + diff --git a/src/jsam.c b/src/jsam.c index ad5f303..cc1caba 100644 --- a/src/jsam.c +++ b/src/jsam.c @@ -1,4 +1,4 @@ -/* BAM/SAM/CRAM file API/routine +/* jsam.c - BAM/SAM/CRAM file API/routine * Author: Xianjie Huang */ #include @@ -14,8 +14,8 @@ */ const char csp_nt5_str[] = "ACGTN"; -/*@note If the translation failed, this function will try " - chr" if name starts with "chr", try - "chr + " otherwise. */ +/*@note If the translation failed, this function will try " - chr" if name starts with "chr", try + "chr + " otherwise. */ int csp_sam_hdr_name2id(sam_hdr_t *hdr, const char *name, kstring_t *s) { int tid; if ((tid = sam_hdr_name2tid(hdr, name)) < 0) { @@ -28,7 +28,7 @@ int csp_sam_hdr_name2id(sam_hdr_t *hdr, const char *name, kstring_t *s) { } else { return tid; } } -//@note No need to free the returned char* pointer when success. +//@note No need to free the returned char* pointer when success. const char* csp_fmt_chr_name(const char *name, sam_hdr_t *hdr, kstring_t *s) { int tid; if ((tid = csp_sam_hdr_name2id(hdr, name, s)) < 0) { return NULL; } diff --git a/src/jsam.h b/src/jsam.h index f609b88..46d21a5 100644 --- a/src/jsam.h +++ b/src/jsam.h @@ -1,4 +1,4 @@ -/* BAM/SAM/CRAM file API/routine +/* jsam.h - BAM/SAM/CRAM file API/routine * Author: Xianjie Huang */ #ifndef SZ_JSAM_H @@ -12,76 +12,68 @@ * BAM/SAM/CRAM File API */ -/*@abstract Translate chr name to tid of bam/sam/cram. +/*!@func +@abstract Translate chr name to tid of bam/sam/cram. @param hdr Pointer of sam_hdr_t structure. @param name Chr name. @param s Pointer of kstring_t. @return Non-negative number if success, -1 for unrecognized reference seq name, -2 for unparsed hdr. - @note If the translation failed, this function will try " - chr" if name starts with "chr", try "chr + " otherwise. */ int csp_sam_hdr_name2id(sam_hdr_t *hdr, const char *name, kstring_t *s); -/*@abstract Convert chrom name to be the same with the one in sam header. -@return Pointer to ref/chrom name if success, NULL otherwise. -@note No need to free the returned char* pointer when success. +/*!@func +@abstract Convert chrom name to be the same with the one in sam header. +@return Pointer to ref/chrom name if success, NULL otherwise. +@note No need to free the returned char* pointer when success. */ const char* csp_fmt_chr_name(const char *name, sam_hdr_t *hdr, kstring_t *s); -/*@abstract The two functions below convert raw cigar op/len value to real value. -@param c Raw cigar op/len value stored in bam1_t, can be an element of cigar array obtained by bam_get_cigar(b) [uint32_t]. -@return An integer [int]. +/*!@func +@abstract The two functions below convert raw cigar op/len value to real value. +@param c Raw cigar op/len value stored in bam1_t, can be an element of cigar array obtained by bam_get_cigar(b) [uint32_t]. +@return An integer [int]. */ #define get_cigar_op(c) ((c) & BAM_CIGAR_MASK) #define get_cigar_len(c) ((c) >> BAM_CIGAR_SHIFT) -/*@abstract Convert index of seq_nt16_str to the index (0-4) of A/C/G/T/G. -@param i Index in the seq_nt16_str for the base [int8_t]. -@return Index in the 'ACGTN' for the base [int8_t]. +extern const char csp_nt5_str[5]; + +/*!@func +@abstract Base Conversions +@param char A char (A/C/G/T/N) [int8_t] +@param idx Index in the seq_nt16_str for the base [int8_t]. +@param int Index in the 'ACGTN' for the base [int8_t]. */ #define seq_nt16_idx2int(i) (seq_nt16_int[i]) - -/*@abstract Convert a char (A/C/G/T/N) to index of seq_nt16_str/seq_nt16_int. -@param c The base char [int8_t]. -@return Index in the seq_nt16_str for the base [int8_t]. - */ #define seq_nt16_char2idx(c) (seq_nt16_table[c]) - -/*@abstract Convert a char (A/C/G/T/N) to the index (0-4) of A/C/G/T/G. -@param c The base char [int8_t]. -@return Index in the 'ACGTN' for the base [int8_t]. - */ #define seq_nt16_char2int(c) (seq_nt16_idx2int(seq_nt16_char2idx(c))) - -extern const char csp_nt5_str[5]; - -/*@abstract Convert index in "ACGTN" to a letter. -@param i Index in "ACGTN" -@return A letter. - */ #define seq_nt16_int2char(i) (csp_nt5_str[i]) -/*@abstract Convert 4-bit integer to a letter. seq_nt16_str is declared in htslib/hts.h -@param i A 4-bit integer returned by bam_seqi(), standing for the index in the seq_nt16_str [int8_t]. -@return A letter standing for base char [int8_t]. +/*!@func +@abstract Convert 4-bit integer to a letter. seq_nt16_str is declared in htslib/hts.h +@param i A 4-bit integer returned by bam_seqi(), standing for the index in the seq_nt16_str [int8_t]. +@return A letter standing for base char [int8_t]. */ #define bam_seq_idx2base(i) (seq_nt16_str[i]) -/*@abstract Convert raw qual score stored in bam1_t to qual char. -@param i Raw qual score stored in bam1_t [int8_t]. -@return Qual char [int8_t]. +/*!@func +@abstract Convert raw qual score stored in bam1_t to qual char. +@param i Raw qual score stored in bam1_t [int8_t]. +@return Qual char [int8_t]. */ #define bam_seq_qual2char(i) ((i) + 33) -/*@abstract Get the content of bam aux tag of 'Z'/'H' (string) type. -@param b Pointer to the bam1_t structure. -@param tag Pointer to the bam aux tag. -@return NULL if donot contain the tag or corrupted data, pointer to the content otherwise. - +/*!@func +@abstract Get the content of bam aux tag of 'Z'/'H' (string) type. +@param b Pointer to the bam1_t structure. +@param tag Pointer to the bam aux tag. +@return NULL if donot contain the tag or corrupted data, pointer to the content otherwise. @note 1. To speed up, the caller should guarantee parameters b and tag are valid. 2. The data of the pointer returned by this function is part of bam1_t, so do not double free! */ char* get_bam_aux_str(bam1_t *b, const char tag[2]); #endif + diff --git a/src/jstring.c b/src/jstring.c index 129baef..cc37214 100644 --- a/src/jstring.c +++ b/src/jstring.c @@ -1,4 +1,4 @@ -/* String operatoins API/routine +/* jstring.c - String operatoins API/routine * Author: Xianjie Huang */ #include diff --git a/src/jstring.h b/src/jstring.h index ecf2da1..b1df0ab 100644 --- a/src/jstring.h +++ b/src/jstring.h @@ -1,4 +1,4 @@ -/* String operatoins API/routine +/* jstring.h - String operatoins API/routine * Author: Xianjie Huang */ #ifndef SZ_JSTRING_H @@ -11,26 +11,30 @@ * String Functions */ -/*@abstract A safe version of strdup() as the parameter of strdup() cannot be NULL. -@param s Pointer of string to be duplicated [char*]. -@return Pointer of newly duplicated string if success, NULL if the original pointer is NULL [char*]. +/*!@func +@abstract A safe version of strdup() as the parameter of strdup() cannot be NULL. +@param s Pointer of string to be duplicated [char*]. +@return Pointer of newly duplicated string if success, NULL if the original pointer is NULL [char*]. */ #define safe_strdup(s) ((s) ? strdup(s) : NULL) -/*@abstract Free space of a char** array. -@param a Pointer to the char* array. -@param n Num of char* elements in the array. -@return Void. +/*!@func +@abstract Free space of a char** array. +@param a Pointer to the char* array. +@param n Num of char* elements in the array. +@return Void. */ void str_arr_destroy(char **a, const int n); -/*abstract Join an array of strings (char*) by a delim char. -@param a Pointer to the char* array. -@param n Num of char* elements in the array. -@param c The delimiter char. -@param s Pointer of the kstring_t structure to save the result. -@return Num of elements that are successfully joined. +/*!@func +@abstract Join an array of strings (char*) by a delim char. +@param a Pointer to the char* array. +@param n Num of char* elements in the array. +@param c The delimiter char. +@param s Pointer of the kstring_t structure to save the result. +@return Num of elements that are successfully joined. */ int str_arr_join(char **a, const int n, int c, kstring_t *s); #endif + diff --git a/src/mplp.c b/src/mplp.c index 0923290..47c721e 100644 --- a/src/mplp.c +++ b/src/mplp.c @@ -1,4 +1,4 @@ -/* Pileup and MPileup operatoins API/routine +/* mplp.c - Pileup and MPileup operatoins API/routine * Author: Xianjie Huang */ @@ -20,10 +20,6 @@ * Pileup and MPileup API */ -/*@note 1. Memory for bam1_t is allocated in this function. - 2. The pointer returned successfully by csp_pileup_init() should be freed - by csp_pileup_destroy() when no longer used. - */ csp_pileup_t* csp_pileup_init(void) { csp_pileup_t *p = (csp_pileup_t*) malloc(sizeof(csp_pileup_t)); if (p) { @@ -39,8 +35,6 @@ void csp_pileup_destroy(csp_pileup_t *p) { } } -/* reset the csp_pileup_t structure without reallocating memory. - return 0 if success, -1 otherwise. */ int csp_pileup_reset(csp_pileup_t *p) { if (p) { if (p->b) { bam_destroy1(p->b); } @@ -50,8 +44,6 @@ int csp_pileup_reset(csp_pileup_t *p) { return 0; } -/* only reset part of the csp_pileup_t as values of parameters in other parts will be immediately overwritten after - calling this function. It's often called by pileup_read_with_fetch(). */ void csp_pileup_reset_(csp_pileup_t *p) { } void csp_pileup_print(FILE *fp, csp_pileup_t *p) { @@ -85,9 +77,6 @@ int get_qual_vector(double qual, double cap_bq, double min_bq, double *rv) { return 0; } -/*@note TODO: In some special cases, ref=A and alt=AG for example, the ref_idx would be equal with alt_idx. - Should be fixed in future. - */ int qual_matrix_to_geno(double qm[][4], size_t *bc, int8_t ref_idx, int8_t alt_idx, int db, double *gl, int *n) { int8_t other_idx[4], noth, i; size_t ref_read, alt_read; @@ -115,8 +104,7 @@ int qual_matrix_to_geno(double qm[][4], size_t *bc, int8_t ref_idx, int8_t alt_i return 0; } -/*@note It's usually called when the input pos has no ref or alt. - */ +//@note It's usually called when the input pos has no ref or alt. void infer_allele(size_t *bc, int8_t *ref_idx, int8_t *alt_idx) { int8_t i, k1, k2; size_t m1, m2; @@ -146,7 +134,7 @@ csp_plp_t* csp_plp_init(void) { return (csp_plp_t*) calloc(1, sizeof(csp_plp_t)) void csp_plp_destroy(csp_plp_t *p) { if (p) { int i; - for (i = 0; i < 5; i++) { list_qu_destroy(p->qu[i]); } + for (i = 0; i < 5; i++) { kv_destroy(p->qu[i]); } if (p->hug) { map_ug_destroy(p->hug); } free(p); } @@ -166,37 +154,45 @@ void csp_plp_reset(csp_plp_t *p) { void csp_plp_print(FILE *fp, csp_plp_t *p, char *prefix) { int i, j; - map_ug_iter u; + khiter_t u; fprintf(fp, "%stotal read count = %ld\n", prefix, p->tc); fprintf(fp, "%sbase count (A/C/G/T/N):", prefix); - for (i = 0; i < 5; i++) fprintf(fp, " %ld", p->bc[i]); + for (i = 0; i < 5; i++) + fprintf(fp, " %ld", p->bc[i]); fputc('\n', fp); fprintf(fp, "%squal matrix 5x4:\n", prefix); for (i = 0; i < 5; i++) { fprintf(fp, "%s\t", prefix); - for (j = 0; j < 4; j++) fprintf(fp, " %.2f", p->qmat[i][j]); + for (j = 0; j < 4; j++) + fprintf(fp, " %.2f", p->qmat[i][j]); fputc('\n', fp); } fprintf(fp, "%snum of geno likelihood = %d\n", prefix, p->ngl); if (p->ngl) { fprintf(fp, "%sgeno likelihood:", prefix); - for (i = 0; i < p->ngl; i++) fprintf(fp, " %.2f", p->gl[i]); + for (i = 0; i < p->ngl; i++) + fprintf(fp, " %.2f", p->gl[i]); fputc('\n', fp); } if (p->hug) { - int size = map_ug_size(p->hug); + int size = kh_size(p->hug); fprintf(fp, "%ssize of the map_ug = %d\n", prefix, size); if (size) { fprintf(fp, "%s", prefix); - for (u = map_ug_begin(p->hug); u != map_ug_end(p->hug); u++) { - if (map_ug_exist(p->hug, u)) { fprintf(fp, " %s", map_ug_key(p->hug, u)); } - } fputc('\n', fp); + for (u = kh_begin(p->hug); u != kh_end(p->hug); u++) { + if (kh_exist(p->hug, u)) + fprintf(fp, " %s", kh_key(p->hug, u)); + } + fputc('\n', fp); } } } int csp_plp_str_vcf(csp_plp_t *p, kstring_t *s) { - if (p->tc <= 0) { kputs(".:.:.:.:.:.", s); return 0; } + if (p->tc <= 0) { + kputs(".:.:.:.:.:.", s); + return 0; + } double gl[5]; int i, m; double tmp = -10 / log(10); @@ -204,15 +200,21 @@ int csp_plp_str_vcf(csp_plp_t *p, kstring_t *s) { m = get_idx_of_max(cu_d, p->gl, 3); kputs(gt[m], s); ksprintf(s, ":%ld:%ld:%ld:", p->ad, p->dp, p->oth); - for (i = 0; i < p->ngl; i++) { gl[i] = p->gl[i] * tmp; } - if (join_arr_to_str(cu_d, gl, p->ngl, ',', "%.0f", s) < p->ngl) { return -1; } + for (i = 0; i < p->ngl; i++) + gl[i] = p->gl[i] * tmp; + if (join_arr_to_str(cu_d, gl, p->ngl, ',', "%.0f", s) < p->ngl) + return -1; kputc_(':', s); - if (join_arr_to_str(cu_s, p->bc, 5, ',', "%ld", s) < 5) { return -1; } + if (join_arr_to_str(cu_s, p->bc, 5, ',', "%ld", s) < 5) + return -1; return 0; } int csp_plp_to_vcf(csp_plp_t *p, jfile_t *s) { - if (p->tc <= 0) { jf_puts(".:.:.:.:.:.", s); return 0; } + if (p->tc <= 0) { + jf_puts(".:.:.:.:.:.", s); + return 0; + } double gl[5]; int i, m; double tmp = -10 / log(10); @@ -220,17 +222,16 @@ int csp_plp_to_vcf(csp_plp_t *p, jfile_t *s) { m = get_idx_of_max(cu_d, p->gl, 3); jf_puts(gt[m], s); jf_printf(s, ":%ld:%ld:%ld:", p->ad, p->dp, p->oth); - for (i = 0; i < p->ngl; i++) { gl[i] = p->gl[i] * tmp; } - if (join_arr_to_str(cu_d, gl, p->ngl, ',', "%.0f", s->buf) < p->ngl) { return -1; } // TODO: use internal buf directly is not good. + for (i = 0; i < p->ngl; i++) + gl[i] = p->gl[i] * tmp; + if (join_arr_to_str(cu_d, gl, p->ngl, ',', "%.0f", s->buf) < p->ngl) + return -1; // TODO: use internal buf directly is not good. jf_putc_(':', s); - if (join_arr_to_str(cu_s, p->bc, 5, ',', "%ld", s->buf) < 5) { return -1; } + if (join_arr_to_str(cu_s, p->bc, 5, ',', "%ld", s->buf) < 5) + return -1; return 0; } -/*@note 1. The kstring_t s is also initialized inside this function. - 2. The valid pointer returned by this function should be freed by csp_mplp_destroy() function - when no longer used. - */ csp_mplp_t* csp_mplp_init(void) { csp_mplp_t *p = (csp_mplp_t*) calloc(1, sizeof(csp_mplp_t)); return p; @@ -240,9 +241,9 @@ void csp_mplp_destroy(csp_mplp_t *p) { if (p) { if (p->hsg) { map_sg_destroy(p->hsg); } if (p->hsg_iter) { free(p->hsg_iter); } - if (p->pu) { pool_uu_destroy(p->pu); } - if (p->pl) { pool_ul_destroy(p->pl); } - if (p->su) { pool_ps_destroy(p->su); } + if (p->pu) { jmempool_destroy(umi_unit, p->pu); } + if (p->pl) { jmempool_destroy(list_umiunit, p->pl); } + if (p->su) { jmempool_destroy(str, p->su); } free(p); } } @@ -253,9 +254,9 @@ void csp_mplp_reset(csp_mplp_t *p) { p->tc = p->ad = p->dp = p->oth = 0; p->nr_ad = p->nr_dp = p->nr_oth = 0; if (p->hsg) { map_sg_reset_val(p->hsg); } - if (p->pu) { pool_uu_reset(p->pu); } - if (p->pl) { pool_ul_reset(p->pl); } - if (p->su) { pool_ps_reset(p->su); } + if (p->pu) { jmempool_reset(umi_unit, p->pu); } + if (p->pl) { jmempool_reset(list_umiunit, p->pl); } + if (p->su) { jmempool_reset(str, p->su); } memset(p->qvec, 0, sizeof(p->qvec)); } } @@ -268,14 +269,15 @@ void csp_mplp_print(FILE *fp, csp_mplp_t *p, char *prefix) { fprintf(fp, "%sinf_rid = %d, inf_aid = %d\n", prefix, p->inf_rid, p->inf_aid); fprintf(fp, "%stotal base count = %ld\n", prefix, p->tc); fprintf(fp, "%sbase count (A/C/G/T/N):", prefix); - for (i = 0; i < 5; i++) { fprintf(fp, " %ld", p->bc[i]); } + for (i = 0; i < 5; i++) + fprintf(fp, " %ld", p->bc[i]); fputc('\n', fp); fprintf(fp, "%snum of sample group = %d\n", prefix, p->nsg); if (p->nsg) { kputs(prefix, s); kputc('\t', s); for (i = 0; i < p->nsg; i++) { - fprintf(fp, "%sSG-%d = %s:\n", prefix, i, map_sg_key(p->hsg, p->hsg_iter[i])); - plp = map_sg_val(p->hsg, p->hsg_iter[i]); + fprintf(fp, "%sSG-%d = %s:\n", prefix, i, kh_key(p->hsg, p->hsg_iter[i])); + plp = kh_val(p->hsg, p->hsg_iter[i]); csp_plp_print(fp, plp, ks_str(s)); } } @@ -288,36 +290,43 @@ void csp_mplp_print_(FILE *fp, csp_mplp_t *p, char *prefix) { fprintf(fp, "%sinf_rid = %d, inf_aid = %d\n", prefix, p->inf_rid, p->inf_aid); fprintf(fp, "%stotal base count = %ld\n", prefix, p->tc); fprintf(fp, "%sbase count (A/C/G/T/N):", prefix); - for (i = 0; i < 5; i++) { fprintf(fp, " %ld", p->bc[i]); } + for (i = 0; i < 5; i++) + fprintf(fp, " %ld", p->bc[i]); fputc('\n', fp); fprintf(fp, "%snum of sample group = %d\n", prefix, p->nsg); } -/*@note 1. This function should be called just one time right after csp_mplp_t structure was created - becuase the sgname wouldn't change once set. - 2. The HashMap (for sgnames) in csp_mplp_t should be empty or NULL. - 3. The keys of HashMap are exactly pointers to sg names coming directly from @p s. - */ int csp_mplp_set_sg(csp_mplp_t *p, char **s, const int n) { - if (NULL == p || NULL == s || 0 == n) { return -1; } + if (NULL == p || NULL == s || 0 == n) + return -1; int i, r; - map_sg_iter k; - if (NULL == p->hsg && NULL == (p->hsg = map_sg_init())) { return -1; } - if (NULL == p->hsg_iter && NULL == (p->hsg_iter = (map_sg_iter*) malloc(sizeof(map_sg_iter) * n))) { return -1; } + khiter_t k; + if (NULL == p->hsg && NULL == (p->hsg = kh_init(sample_group))) + return -1; + if (NULL == p->hsg_iter && NULL == (p->hsg_iter = (khiter_t*) malloc(sizeof(khiter_t) * n))) + return -1; for (i = 0; i < n; i++) { if (s[i]) { - k = map_sg_put(p->hsg, s[i], &r); - if (r > 0) { map_sg_val(p->hsg, k) = NULL; } - else if (r < 0) { return -1; } - else { return -2; } /* r = 0 means repeatd sgnames. */ - } else { return -1; } + k = kh_put(sample_group, p->hsg, s[i], &r); + if (r > 0) + kh_val(p->hsg, k) = NULL; + else if (r < 0) + return -1; + else + return -2; /* r = 0 means repeatd sgnames. */ + } else { + return -1; + } } - /* Storing iter index for each sg (sample group) name must be done after all sg names have been pushed into - the HashMap in case that the internal arrays of HashMap autoly shrink or some else modifications. */ + // Storing iter index for each sg (sample group) name must be done after all sg names have been + // pushed into the HashMap in case that the internal arrays of HashMap autoly shrink or some + // else modifications. for (i = 0; i < n; i++) { - k = map_sg_get(p->hsg, s[i]); - if (k == map_sg_end(p->hsg)) { return -1; } - else { p->hsg_iter[i] = k; } + k = kh_get(sample_group, p->hsg, s[i]); + if (k == kh_end(p->hsg)) + return -1; + else + p->hsg_iter[i] = k; } p->nsg = n; return 0; @@ -327,7 +336,8 @@ int csp_mplp_str_vcf(csp_mplp_t *mplp, kstring_t *s) { int i; for (i = 0; i < mplp->nsg; i++) { kputc_('\t', s); - if (csp_plp_str_vcf(map_sg_val(mplp->hsg, mplp->hsg_iter[i]), s) < 0) { return -1; } + if (csp_plp_str_vcf(kh_val(mplp->hsg, mplp->hsg_iter[i]), s) < 0) + return -1; } //s->s[--(s->l)] = '\0'; /* s->l could not be negative unless no csp_plp_t(s) are printed to s->s. */ return 0; } @@ -336,7 +346,8 @@ int csp_mplp_to_vcf(csp_mplp_t *mplp, jfile_t *s) { int i; for (i = 0; i < mplp->nsg; i++) { jf_putc_('\t', s); - if (csp_plp_to_vcf(map_sg_val(mplp->hsg, mplp->hsg_iter[i]), s) < 0) { return -1; } + if (csp_plp_to_vcf(kh_val(mplp->hsg, mplp->hsg_iter[i]), s) < 0) + return -1; } //s->s[--(s->l)] = '\0'; /* s->l could not be negative unless no csp_plp_t(s) are printed to s->s. */ return 0; } @@ -345,7 +356,7 @@ int csp_mplp_str_mtx(csp_mplp_t *mplp, kstring_t *ks_ad, kstring_t *ks_dp, kstri csp_plp_t *plp; int i; for (i = 1; i <= mplp->nsg; i++) { - plp = map_sg_val(mplp->hsg, mplp->hsg_iter[i]); + plp = kh_val(mplp->hsg, mplp->hsg_iter[i]); if (plp->ad) ksprintf(ks_ad, "%ld\t%d\t%ld\n", idx, i, plp->ad); if (plp->dp) ksprintf(ks_dp, "%ld\t%d\t%ld\n", idx, i, plp->dp); if (plp->oth) ksprintf(ks_oth, "%ld\t%d\t%ld\n", idx, i, plp->oth); @@ -353,13 +364,11 @@ int csp_mplp_str_mtx(csp_mplp_t *mplp, kstring_t *ks_ad, kstring_t *ks_dp, kstri return 0; } -/*@note This function is used for tmp files. - */ int csp_mplp_str_mtx_tmp(csp_mplp_t *mplp, kstring_t *ks_ad, kstring_t *ks_dp, kstring_t *ks_oth) { csp_plp_t *plp; int i; for (i = 1; i <= mplp->nsg; i++) { - plp = map_sg_val(mplp->hsg, mplp->hsg_iter[i]); + plp = kh_val(mplp->hsg, mplp->hsg_iter[i]); if (plp->ad) ksprintf(ks_ad, "%d\t%ld\n", i, plp->ad); if (plp->dp) ksprintf(ks_dp, "%d\t%ld\n", i, plp->dp); if (plp->oth) ksprintf(ks_oth, "%d\t%ld\n", i, plp->oth); @@ -372,10 +381,13 @@ int csp_mplp_to_mtx(csp_mplp_t *mplp, jfile_t *fs_ad, jfile_t *fs_dp, jfile_t *f csp_plp_t *plp; int i; for (i = 1; i <= mplp->nsg; i++) { - plp = map_sg_val(mplp->hsg, mplp->hsg_iter[i - 1]); - if (plp->ad) fs_ad->is_tmp ? jf_printf(fs_ad, "%d\t%ld\n", i, plp->ad) : jf_printf(fs_ad, "%ld\t%d\t%ld\n", idx, i, plp->ad); - if (plp->dp) fs_dp->is_tmp ? jf_printf(fs_dp, "%d\t%ld\n", i, plp->dp) : jf_printf(fs_dp, "%ld\t%d\t%ld\n", idx, i, plp->dp); - if (plp->oth) fs_oth->is_tmp ? jf_printf(fs_oth, "%d\t%ld\n", i, plp->oth) : jf_printf(fs_oth, "%ld\t%d\t%ld\n", idx, i, plp->oth); + plp = kh_val(mplp->hsg, mplp->hsg_iter[i - 1]); + if (plp->ad) + fs_ad->is_tmp ? jf_printf(fs_ad, "%d\t%ld\n", i, plp->ad) : jf_printf(fs_ad, "%ld\t%d\t%ld\n", idx, i, plp->ad); + if (plp->dp) + fs_dp->is_tmp ? jf_printf(fs_dp, "%d\t%ld\n", i, plp->dp) : jf_printf(fs_dp, "%ld\t%d\t%ld\n", idx, i, plp->dp); + if (plp->oth) + fs_oth->is_tmp ? jf_printf(fs_oth, "%d\t%ld\n", i, plp->oth) : jf_printf(fs_oth, "%ld\t%d\t%ld\n", idx, i, plp->oth); } if (fs_ad->is_tmp) jf_putc('\n', fs_ad); if (fs_dp->is_tmp) jf_putc('\n', fs_dp); diff --git a/src/mplp.h b/src/mplp.h index 181e3df..4d2ae22 100644 --- a/src/mplp.h +++ b/src/mplp.h @@ -1,4 +1,4 @@ -/* Pileup and MPileup operatoins API/routine +/* mplp.h - Pileup and MPileup operatoins API/routine * Author: Xianjie Huang */ #ifndef CSP_MPLP_H @@ -13,72 +13,41 @@ #include "jfile.h" #include "jmempool.h" #include "config.h" +#include "biods.h" /* * Pileup and MPileup API */ -/*@abstract Store statistics result of one read matching the query pos. -@param b Pointer of bam1_t structure. -@param qpos The index of the query pos in the read seq. -@param base The base corresponding to the query pos, equal to read_seq[qpos]. -@param qual The qual corresponding to the query pos, equal to qual_seq[qpos]. -@param is_refskip 0/1. if the query pos is in res-skip region. -@param is_del 0/1. if the query pos is in deletion region (also set 1 when is_refskip to be compatible with sam.c). -@param umi Pointer to UMI tag. -@param cb Pointer to cell barcode. -@param laln Length of the read part that aligned to reference. - -@note 1. The umi and cb in the structure would be extracted from bam1_t, so do not need to free it as the bam1_t will do that! - Refer to bam_get_aux(), bam_aux_get() and bam_aux2Z() in sam.h. - */ + +//Store statistics result of one read matching the query pos. +//@note The umi and cb in the structure would be extracted from bam1_t, so do not need to free it +// as the bam1_t will do that! Refer to bam_get_aux(), bam_aux_get() and bam_aux2Z() in sam.h. typedef struct { bam1_t *b; - int32_t qpos; - int8_t base, qual; - uint8_t is_refskip:1, is_del:1; + int32_t qpos; // The index of the query pos in the read seq. + int8_t base, qual; // The base and qual of the query pos: read_seq[qpos] and qual_seq[qpos]. + uint8_t is_refskip:1, is_del:1; // Note is_del is set to 1 when @p qpos is in ref-skip region. char *umi, *cb; - uint32_t laln; + uint32_t laln; // Length of the read part that aligned to reference. } csp_pileup_t; -/*@abstract Initialize the csp_pileup_t structure. -@return Pointer to csp_pileup_t structure if success, NULL otherwise. - -@note 1. Memory for bam1_t is allocated in this function. - 2. The pointer returned successfully by csp_pileup_init() should be freed - by csp_pileup_destroy() when no longer used. - */ +//@note Memory for bam1_t is allocated in this function. csp_pileup_t* csp_pileup_init(void); - void csp_pileup_destroy(csp_pileup_t *p); -/* reset the csp_pileup_t structure without reallocating memory. - return 0 if success, -1 otherwise. */ +//@return 0 if success, -1 otherwise. int csp_pileup_reset(csp_pileup_t *p); -/* only reset part of the csp_pileup_t as values of parameters in other parts will be immediately overwritten after - calling this function. It's often called by pileup_read_with_fetch(). */ +//only reset part of the csp_pileup_t. It's often called by pileup_read_with_fetch(). void csp_pileup_reset_(csp_pileup_t *p); void csp_pileup_print(FILE *fp, csp_pileup_t *p); -/*@abstract Pool that stores char*. The real elements in the pool are char**. -@example Refer to the example of JMEMPOOL in general_util.h. -@note This structure is aimed to store dynamically allocated strings(char*). - */ -#define pool_str_free(s) free(*(s)) -#define pool_str_reset(s) free(*(s)) -JMEMPOOL_INIT(ps, char*, pool_str_free, pool_str_reset) -typedef jmempool_t(ps) pool_ps_t; -#define pool_ps_init() jmempool_init(ps) -#define pool_ps_destroy(p) jmempool_destroy(ps, p) -#define pool_ps_get(p) jmempool_get(ps, p) -#define pool_ps_reset(p) jmempool_reset(ps, p) - -/*@abstract This structure stores stat info of one read of one UMI group for certain query pos. -@param base The base for the query pos in the read of the UMI gruop. - A 4-bit integer returned by bam_seqi(), which is related to bam_nt16_table(now called seq_nt16_str). -@param qual Qual value for the query pos in the read of the UMI gruop. The value is extracted by calling bam_get_qual() and - could be translated to qual char by plusing 33. +/*!@struct +@abstract This structure stores stat info of one read of one UMI group for certain query pos. +@param base The base for the query pos. A 4-bit integer returned by bam_seqi(). +@param qual Qual value for the query pos, extracted from bam_get_qual() and could be translated + to qual char by plusing 33. */ typedef struct { int8_t base, qual; @@ -88,244 +57,143 @@ umi_unit_t* umi_unit_init(void); #define umi_unit_reset(p) void umi_unit_destroy(umi_unit_t *p); -/*@abstract Pool that stores umi_unit_t structures. The real elements in the pool are pointers to the umi_unit_t structures. - The pool is aimed to save the overhead of reallocating memories for umi_unit_t structures. -@example Refer to the example of JMEMPOOL in general_util.h. - */ -JMEMPOOL_INIT(uu, umi_unit_t, umi_unit_destroy, umi_unit_reset) -typedef jmempool_t(uu) pool_uu_t; -#define pool_uu_init() jmempool_init(uu) -#define pool_uu_destroy(p) jmempool_destroy(uu, p) -#define pool_uu_get(p) jmempool_get(uu, p) -#define pool_uu_reset(p) jmempool_reset(uu, p) - -/* Struct list_uu_t APIs -@abstract The structure stores stat info of all reads of one UMI group for certain query pos. -@param v Pointer to the list_uu_t structure [list_uu_t*]. - -@note 1. The elements in the list are pointers of umi_unit_t, resetting the list only sets - the list's internal var n, which stands for the next available pos in the list, to be 0. - After calling reset function, the values (i.e. pointers of umi_unit_t from pool_uu) - newly pushed into the list would overwrite the original ones, which will not cause memory error. - 2. The parameter in list_uu_xxx functions is pointer of list_uu_t. +JMEMPOOL_INIT(umi_unit, umi_unit_t, umi_unit_destroy, umi_unit_reset) +typedef jmempool_t(umi_unit) pool_uu_t; -@example Refer to the example in kvec.h, but the parameter in list_uu_xxx functions is pointer, - which is different from kv_xxx functions. +/*!@struct +@abstract The structure stores stat info of all reads of one UMI group for certain query pos. +@note After calling reset function, the values (i.e. pointers of umi_unit_t from pool_uu) newly + pushed into the list would overwrite the original ones, which will not cause memory error. */ typedef kvec_t(umi_unit_t*) list_uu_t; list_uu_t* list_uu_init(void); -#define list_uu_resize(v, size) kv_resize(umi_unit_t*, *(v), size) -#define list_uu_push(v, x) kv_push(umi_unit_t*, *(v), x) -#define list_uu_A(v, i) kv_A(*(v), i) -#define list_uu_size(v) kv_size(*(v)) -#define list_uu_max(v) kv_max(*(v)) #define list_uu_destroy(v) kv_destroy(*(v)) #define list_uu_reset(v) ((v)->n = 0) -/*@abstract Pool that stores list_uu_t structures. The real elements in the pool are pointers to the list_uu_t structures. - The pool is aimed to save the overhead of reallocating memories for list_uu_t structures. -@example Refer to the example of JMEMPOOL in general_util.h. - */ -JMEMPOOL_INIT(ul, list_uu_t, list_uu_destroy, list_uu_reset) -typedef jmempool_t(ul) pool_ul_t; -#define pool_ul_init() jmempool_init(ul) -#define pool_ul_destroy(p) jmempool_destroy(ul, p) -#define pool_ul_get(p) jmempool_get(ul, p) -#define pool_ul_reset(p) jmempool_reset(ul, p) - -/*@abstract The HashMap maps UMI-group-name (char*) to list_uu_t (*). - -@example (A simple example from khash.h) -KHASH_MAP_INIT_INT(32, char) -int main() { - int ret, is_missing; - khiter_t k; - khash_t(32) *h = kh_init(32); - k = kh_put(32, h, 5, &ret); - kh_value(h, k) = 10; - k = kh_get(32, h, 10); - is_missing = (k == kh_end(h)); - k = kh_get(32, h, 5); - kh_del(32, h, k); - for (k = kh_begin(h); k != kh_end(h); ++k) - if (kh_exist(h, k)) kh_value(h, k) = 1; - kh_destroy(32, h); - return 0; -} - */ - -// TODO: use umi:array(list_uu_t*) pair to save memory -// specifically, the array is a[5] with each element being -// a list_uu_t* and the umi_unit_t could be changed to -// struct { int8_t qual; }. -KHASH_MAP_INIT_STR(ug, list_uu_t*) -typedef khash_t(ug) map_ug_t; -#define map_ug_iter khiter_t -#define map_ug_init() kh_init(ug) -#define map_ug_resize(h, s) kh_resize(ug, h, s) -#define map_ug_put(h, k, r) kh_put(ug, h, k, r) -#define map_ug_get(h, k) kh_get(ug, h, k) -#define map_ug_del(h, k) kh_del(ug, h, k) -#define map_ug_exist(h, x) kh_exist(h, x) -#define map_ug_key(h, x) kh_key(h, x) -#define map_ug_val(h, x) kh_val(h, x) -#define map_ug_begin(h) kh_begin(h) -#define map_ug_end(h) kh_end(h) -#define map_ug_size(h) kh_size(h) -#define map_ug_reset(h) kh_clear(ug, h) -#define map_ug_destroy(h) { \ - if (h) { \ - map_ug_iter __k; \ - for (__k = map_ug_begin(h); __k != map_ug_end(h); __k++) { \ - if (map_ug_exist(h, __k)) list_uu_destroy(map_ug_val(h, __k)); \ - } \ - kh_destroy(ug, h); \ - } \ +JMEMPOOL_INIT(list_umiunit, list_uu_t, list_uu_destroy, list_uu_reset) +typedef jmempool_t(list_umiunit) pool_ul_t; + +//The HashMap maps UMI-group-name (char*) to list_uu_t (*). +//TODO: use umi:array(list_uu_t*) pair to save memory +// specifically, the array is a[5] with each element being +// a list_uu_t* and the umi_unit_t could be changed to +// struct { int8_t qual; }. +KHASH_MAP_INIT_STR(umi_group, list_uu_t*) +typedef khash_t(umi_group) map_ug_t; +#define map_ug_reset(h) kh_clear(umi_group, h) +#define map_ug_destroy(h) { \ + if (h) { \ + khiter_t __k; \ + for (__k = kh_begin(h); __k != kh_end(h); __k++) { \ + if (kh_exist(h, __k)) list_uu_destroy(kh_val(h, __k)); \ + } \ + kh_destroy(umi_group, h); \ + } \ } -/* Struct list_qu_t APIs -@abstract The structure stores all qual value of one sample for certain query pos. -@param v The list_qu_t structure [list_qu_t]. - -@example Refer to the example in kvec.h. - */ -typedef kvec_t(int8_t) list_qu_t; -#define list_qu_init(v) kv_init(v) -#define list_qu_resize(v, size) kv_resize(int8_t, v, size) -#define list_qu_push(v, x) kv_push(int8_t, v, x) -#define list_qu_A(v, i) kv_A(v, i) -#define list_qu_size(v) kv_size(v) -#define list_qu_max(v) kv_max(v) -#define list_qu_destroy(v) kv_destroy(v) +typedef int8_t qual_t; +typedef kvec_t(qual_t) list_qu_t; #define list_qu_reset(v) ((v).n = 0) -/*@abstract Internal function to convert the base call quality score to related values for different genotypes. -@param qual Qual value for the query pos in the read of the UMI gruop. The value is extracted by calling bam_get_qual() and - could be translated to qual char by plusing 33. +/*!@func +@abstract Internal function to convert the base quality score for different genotypes. +@param qual Qual value for the query pos. The value is extracted by calling bam_get_qual() and + could be translated to qual char by plusing 33. @param cap_bq @param min_bq -@param rv Pointer of vector of loglikelihood for AA, AA+AB (doublet), AB, B or E (see Demuxlet paper online methods) - Size of RV must be no less than 4. Be careful that no size check inside the function -@return 0 if success, -1 otherwise. -@reference 1. http://emea.support.illumina.com/bulletins/2016/04/fastq-files-explained.html - 2. https://linkinghub.elsevier.com/retrieve/pii/S0002-9297(12)00478-8 +@param rv Pointer of vector of loglikelihood for AA, AA+AB (doublet), AB, B or E (see Demuxlet paper online methods) + Size of RV must be no less than 4. Be careful that no size check inside the function +@return 0 if success, -1 otherwise. +@reference 1. http://emea.support.illumina.com/bulletins/2016/04/fastq-files-explained.html + 2. https://linkinghub.elsevier.com/retrieve/pii/S0002-9297(12)00478-8 */ int get_qual_vector(double qual, double cap_bq, double min_bq, double *rv); -/*@abstract Internal function to translate qual matrix to vector of GL. +/*!@func +@abstract Internal function to translate qual matrix to vector of GL. @param qm Qual matrix: 5-by-4, columns are [1-Q, 3/4-2/3Q, 1/2-1/3Q, Q]. See csp_plp_t::qmat @param bc Base count: (5, ). See csp_plp_t::bc @param ref_idx Index of ref base in 'ACGTN'. @param alt_idx Index of alt base in 'ACGTN'. @param db doublet_GL. 1/0. @param gl Array of GL: loglikelihood for - GL1: L(rr|qual_matrix, base_count), - GL2-GL5: L(ra|..), L(aa|..), L(rr+ra|..), L(ra+aa|..) + GL1: L(rr|qual_matrix, base_count), + GL2-GL5: L(ra|..), L(aa|..), L(rr+ra|..), L(ra+aa|..) Size must be no less than 5. Be careful that no size check inside the function @param n Pointer of num of elements in GL array. @return 0 if success, -1 otherwise. -@note TODO: In some special cases, ref=A and alt=AG for example, the ref_idx would be equal with alt_idx. - Should be fixed in future. +@note TODO: In some special cases, ref=A and alt=AG for example, the ref_idx would be equal + with alt_idx. Should be fixed in future. */ int qual_matrix_to_geno(double qm[][4], size_t *bc, int8_t ref_idx, int8_t alt_idx, int db, double *gl, int *n); -/*@abstract Infer ref and alt based on the read count of each possible alleles (ACGTN). -@param bc Pointer of array that stores the read count of each possible alleles, the read count is - in the order of A/C/G/T/N. +/*!@func +@abstract Infer ref and alt based on the read count of each possible alleles (ACGTN). +@param bc Pointer of array that stores the read count of each possible alleles, the read count + is in the order of A/C/G/T/N. @param ref_idx Pointer of index of ref in "ACGTN". @param alt_idx Pointer of index of alt in "ACGTN". @return Void. - @note It's usually called when the input pos has no ref or alt. */ void infer_allele(size_t *bc, int8_t *ref_idx, int8_t *alt_idx); -// infer alt index when the ref is known. +//infer alt index when the ref is known. void infer_alt(size_t *bc, int8_t ref_idx, int8_t *alt_idx); -/*@abstract The structure that store pileup info of one cell/sample for certain query pos. -@param bc Total read count for each base in the order of 'ACGTN'. -@param tc Total read count for all bases. -@param ad Read count of alt. -@param dp Read count of alt + ref. -@param oth Read count of bases except alt and ref. -@param qu All qual values of each base for one sample in the order of 'ACGTN'. -@param qmat Matrix of qual with 'ACGTN' vs. [1-Q, 3/4-2/3Q, 1/2-1/3Q, Q]. -@param gl Array of GL: loglikelihood for - GL1: L(rr|qual_matrix, base_count), - GL2-GL5: L(ra|..), L(aa|..), L(rr+ra|..), L(ra+aa|..). -@param ngl Num of valid elements in the array gl. -@param hug Pointer of hash table that stores stat info of UMI groups. - */ +//The structure that store pileup info of one cell/sample for certain query pos. +//@param gl Array of GL: loglikelihood for +// GL1: L(rr|qual_matrix, base_count), +// GL2-GL5: L(ra|..), L(aa|..), L(rr+ra|..), L(ra+aa|..). typedef struct { - size_t bc[5]; - size_t tc, ad, dp, oth; - list_qu_t qu[5]; - double qmat[5][4]; - double gl[5]; - int ngl; - map_ug_t *hug; + size_t bc[5]; // Total read count for each base in the order of 'ACGTN'. + size_t tc, ad, dp, oth; // Read count for all bases (tc), alt (ad), alt+ref (dp), others (oth). + list_qu_t qu[5]; // All qual values of each base for one sample in the order of 'ACGTN'. + double qmat[5][4]; // Matrix of qual with 'ACGTN' vs. [1-Q, 3/4-2/3Q, 1/2-1/3Q, Q]. + double gl[5]; // Array of GL: loglikelihood. + int ngl; // Num of valid elements in the array @p gl. + map_ug_t *hug; // Pointer of hash table that stores stat info of UMI groups. } csp_plp_t; -/* note that the @p qu is also initialized after calling calloc(). */ csp_plp_t* csp_plp_init(void); void csp_plp_destroy(csp_plp_t *p); void csp_plp_reset(csp_plp_t *p); -/*@abstract Print the content to csp_plp_t to stream. -@param fp Pointer of stream. -@param p Pointer of csp_plpt_t to be printed. -@param prefix Pointer of prefix string. Set to "" if no prefix. -@return Void. - */ void csp_plp_print(FILE *fp, csp_plp_t *p, char *prefix); -/*@abstract Format the content of csp_plp_t (the pileup stat info) of one cell/sample for certain query pos to - string in the output vcf file. -@param p Pointer of csp_plp_t structure corresponding to the pos. -@param s Pointer of kstring_t which would store the formatted string. -@return 0 if success, -1 otherwise. +/*!@func +@abstract Format the content of csp_plp_t to string for the output vcf file. +@param p Pointer of csp_plp_t structure corresponding to the pos. +@param s Pointer of kstring_t which would store the formatted string. +@return 0 if success, -1 otherwise. */ int csp_plp_str_vcf(csp_plp_t *p, kstring_t *s); int csp_plp_to_vcf(csp_plp_t *p, jfile_t *s); -/*@abstract The HashMap maps sample-group-name (char*) to csp_plp_t (*). -@example Refer to a simple example in khash.h. - */ -KHASH_MAP_INIT_STR(sg, csp_plp_t*) -typedef khash_t(sg) map_sg_t; -#define map_sg_iter khiter_t -#define map_sg_init() kh_init(sg) -#define map_sg_clear(h) kh_clear(sg, h) -#define map_sg_resize(h, s) kh_resize(sg, h, s) -#define map_sg_put(h, k, r) kh_put(sg, h, k, r) -#define map_sg_get(h, k) kh_get(sg, h, k) -#define map_sg_del(h, k) kh_del(sg, h, k) -#define map_sg_exist(h, x) kh_exist(h, x) -#define map_sg_key(h, x) kh_key(h, x) -#define map_sg_val(h, x) kh_val(h, x) -#define map_sg_begin(h) kh_begin(h) -#define map_sg_end(h) kh_end(h) -#define map_sg_size(h) kh_size(h) -#define map_sg_destroy(h) { \ - if (h) { \ - map_sg_iter __k; \ - for (__k = map_sg_begin(h); __k != map_sg_end(h); __k++) { \ - if (map_sg_exist(h, __k)) csp_plp_destroy(map_sg_val(h, __k)); \ - } \ - kh_destroy(sg, h); \ - } \ +//The HashMap maps sample-group-name (char*) to csp_plp_t (*). +KHASH_MAP_INIT_STR(sample_group, csp_plp_t*) +typedef khash_t(sample_group) map_sg_t; +#define map_sg_destroy(h) { \ + if (h) { \ + khiter_t __k; \ + for (__k = kh_begin(h); __k != kh_end(h); __k++) { \ + if (kh_exist(h, __k)) csp_plp_destroy(kh_val(h, __k)); \ + } \ + kh_destroy(sample_group, h); \ + } \ } -#define map_sg_reset_val(h) { \ - if (h) { \ - map_sg_iter __k; \ - for (__k = map_sg_begin(h); __k != map_sg_end(h); __k++) { \ - if (map_sg_exist(h, __k)) csp_plp_reset(map_sg_val(h, __k)); \ - } \ - } \ +#define map_sg_reset_val(h) { \ + if (h) { \ + khiter_t __k; \ + for (__k = kh_begin(h); __k != kh_end(h); __k++) { \ + if (kh_exist(h, __k)) csp_plp_reset(kh_val(h, __k)); \ + } \ + } \ } +typedef pool_str_t pool_ps_t; + //TODO: use kstring_t instead of char* in mplp_t::su as its base element type. //Previously, we use a pool (actually as a array) to store all UMI strings (char*) //pushed to plp_t::hug for easy management (mainly for easier free of the @@ -333,74 +201,45 @@ typedef khash_t(sg) map_sg_t; //strdup and free (with @func free()) may be high. Using kstring_t is expected to //largely reduce this overhead -/*@abstract The structure stores the stat info of all sample groups for certain query pos. -@param ref_idx Index of ref in "ACGTN". Negative number means not valid value. -@param alt_idx Index of alt in "ACGTN". Negative number means not valid value. -@param inf_rid Infered index of ref in "ACGTN". Negative number means not valid value. -@param inf_aid Infered index of alt in "ACGTN". Negative number means not valid value. -@param bc Read count of each base summarizing all sample groups for the pos, in the order of 'ACGTN'. -@param tc Total read count of all bases for the pos. -@param ad Read count of alt. -@param dp Read count of alt + ref. -@param oth Read count of bases except alt and ref. -@param nr_* Num of records/lines outputed to mtx file for certain SNP/pos. -@param hsg HashMap that stores the stat info of all sample groups for the pos. -@param hsg_iter Pointer of array of map_sg_iter. The iter in the array is in the same order of sg names. -@param nsg Size of map_sg_iter array hsg_iter. -@param pu Pool of umi_unit_t structures. -@param pl Pool of list_uu_t structures. -@param su Pool of UMI strings. -@param qvec A container for the qual vector returned by get_qual_vector(). - */ +//The structure stores the stat info of all sample groups for certain query pos. typedef struct { - int8_t ref_idx, alt_idx, inf_rid, inf_aid; - size_t bc[5]; - size_t tc, ad, dp, oth; - size_t nr_ad, nr_dp, nr_oth; - map_sg_t *hsg; - map_sg_iter *hsg_iter; - int nsg; - pool_uu_t *pu; - pool_ul_t *pl; - pool_ps_t *su; - double qvec[4]; + int8_t ref_idx, alt_idx; // Index of ref/alt in "ACGTN". Negative means invalid value. + int8_t inf_rid, inf_aid; // Infered index of ref/alt in "ACGTN". Negative means invalid value. + size_t bc[5]; // Summarized read count across samples, in the order of 'ACGTN'. + size_t tc, ad, dp, oth; // Similar with that csp_plp_t. + size_t nr_ad, nr_dp, nr_oth; // nr_* Num of records/lines outputed to mtx file. + map_sg_t *hsg; // HashMap that stores the stat info of all sample groups. + khiter_t *hsg_iter; // The iter in the array is in the same order of sg names. + int nsg; // Size of @p hsg_iter. + pool_uu_t *pu; // Pool of umi_unit_t structures. + pool_ul_t *pl; // Pool of list_uu_t structures. + pool_ps_t *su; // Pool of UMI strings. + double qvec[4]; // A container for the qual vector returned by get_qual_vector(). } csp_mplp_t; -/*@abstract Initialize the csp_mplp_t structure. -@return Pointer to the csp_mplp_t structure if success, NULL otherwise. - -@note 1. The kstring_t s is also initialized inside this function. - 2. The valid pointer returned by this function should be freed by csp_mplp_destroy() function - when no longer used. - */ csp_mplp_t* csp_mplp_init(void); void csp_mplp_destroy(csp_mplp_t *p); void csp_mplp_reset(csp_mplp_t *p); -/*@abstract Print the content to csp_mplp_t to stream. -@param fp Pointer of stream. -@param p Pointer of csp_mplpt_t to be printed. -@param prefix Pointer of prefix string. Set to "" if no prefix. -@return Void. - */ void csp_mplp_print(FILE *fp, csp_mplp_t *p, char *prefix); void csp_mplp_print_(FILE *fp, csp_mplp_t *p, char *prefix); -/*@abstract Set sample group names for the csp_mplp_t structure. -@param p Pointer to the csp_mplp_t structure. -@parma s Pointer to the array of names of sample groups. -@param n Num of sample groups. -@return 0, no error; -1 otherwise. - -@note 1. This function should be called just one time right after csp_mplp_t structure was created - becuase the sgname wouldn't change once set. - 2. The HashMap (for sgnames) in csp_mplp_t should be empty or NULL. - 3. The keys of HashMap are exactly pointers to sg names coming directly from @p s. +/*!@func +@abstract Set sample group names for the csp_mplp_t structure. +@param p Pointer to the csp_mplp_t structure. +@parma s Pointer to the array of names of sample groups. +@param n Num of sample groups. +@return 0, no error; -1 otherwise. +@note 1. This function should be called just one time right after csp_mplp_t structure was + created becuase the sgname wouldn't change once set. + 2. The HashMap (for sgnames) in csp_mplp_t should be empty or NULL. + 3. The keys of HashMap are exactly pointers to sg names coming directly from @p s. */ int csp_mplp_set_sg(csp_mplp_t *p, char **s, const int n); -/*@abstract Format the content of csp_mplp_t (the pileup stat info) of certain query pos to string in the output vcf file. +/*!@func +@abstract Format the content of csp_mplp_t to string for the output vcf file. @param mplp Pointer of the csp_mplp_t structure corresponding to the pos. @param s Pointer of kstring_t which stores the formatted string. @return 0 if success, -1 otherwise. @@ -409,7 +248,8 @@ int csp_mplp_str_vcf(csp_mplp_t *mplp, kstring_t *s); int csp_mplp_to_vcf(csp_mplp_t *mplp, jfile_t *s); -/*@abstract Format the content of csp_mplp_t of certain query pos to string in the output sparse matrices file. +/*!@func +@abstract Format the content of csp_mplp_t to string for the output sparse matrices file. @param mplp Pointer of the csp_mplp_t structure corresponding to the pos. @param ks_ad Pointer of kstring_t which is to store formatted AD string. @param ks_dp Pointer of kstring_t which is to store formatted DP string. @@ -419,15 +259,7 @@ int csp_mplp_to_vcf(csp_mplp_t *mplp, jfile_t *s); */ int csp_mplp_str_mtx(csp_mplp_t *mplp, kstring_t *ks_ad, kstring_t *ks_dp, kstring_t *ks_oth, size_t idx); -/*@abstract Format the content of csp_mplp_t of certain query pos to string in the tmp output sparse matrices file. -@param mplp Pointer of the csp_mplp_t structure corresponding to the pos. -@param ks_ad Pointer of kstring_t which is to store formatted AD string. -@param ks_dp Pointer of kstring_t which is to store formatted DP string. -@param ks_oth Pointer of kstring_t which is to store formatted OTH string. -@return 0 if success, -1 otherwise. - -@note This function is used for tmp files. - */ +//@note This function is used for tmp files. int csp_mplp_str_mtx_tmp(csp_mplp_t *mplp, kstring_t *ks_ad, kstring_t *ks_dp, kstring_t *ks_oth); int csp_mplp_to_mtx(csp_mplp_t *mplp, jfile_t *fs_ad, jfile_t *fs_dp, jfile_t *fs_oth, size_t idx); @@ -490,3 +322,4 @@ void mtx_tag_fs_destroy(mtx_tag_fs *p) { #endif #endif + diff --git a/src/snp.c b/src/snp.c index 3a94a1c..f617679 100644 --- a/src/snp.c +++ b/src/snp.c @@ -1,4 +1,4 @@ -/* SNP operatoins API/routine +/* snp.c - SNP operatoins API/routine * Author: Xianjie Huang */ @@ -15,9 +15,6 @@ * SNP List API */ -/*@note The pointer returned successfully by snp_init() should be freed - by snp_destroy() when no longer used. - */ snp_t* snp_init(void) { return (snp_t*) calloc(1, sizeof(snp_t)); } void snp_destroy(snp_t *p) { @@ -28,9 +25,6 @@ void snp_reset(snp_t *p) { if (p) { free(p->chr); memset(p, 0, sizeof(snp_t)); } } -/*@note If length of Ref or Alt is larger than 1, then the SNP would be skipped. - If length of Ref or Alt is 0, then their values would be infered during pileup. - */ size_t get_snplist_from_vcf(const char *fn, snplist_t *pl, int *ret, int print_skip) { htsFile *fp = NULL; bcf_hdr_t *hdr = NULL; @@ -39,10 +33,20 @@ size_t get_snplist_from_vcf(const char *fn, snplist_t *pl, int *ret, int print_s size_t l, m, n = 0; /* use n instead of kv_size(*pl) in case that pl is not empty at the beginning. */ int r; *ret = -1; - if (NULL == fn || NULL == pl) { return 0; } - if (NULL == (fp = hts_open(fn, "rb"))) { fprintf(stderr, "[E::%s] could not open '%s'\n", __func__, fn); return 0; } - if (NULL == (hdr = bcf_hdr_read(fp))) { fprintf(stderr, "[E::%s] could not read header for '%s'\n", __func__, fn); goto fail; } - if (NULL == (rec = bcf_init1())) { fprintf(stderr, "[E::%s] could not initialize the bcf structure.\n", __func__); goto fail; } + if (NULL == fn || NULL == pl) + return 0; + if (NULL == (fp = hts_open(fn, "rb"))) { + fprintf(stderr, "[E::%s] could not open '%s'\n", __func__, fn); + return 0; + } + if (NULL == (hdr = bcf_hdr_read(fp))) { + fprintf(stderr, "[E::%s] could not read header for '%s'\n", __func__, fn); + goto fail; + } + if (NULL == (rec = bcf_init1())) { + fprintf(stderr, "[E::%s] could not initialize the bcf structure.\n", __func__); + goto fail; + } for (m = 1; (r = bcf_read1(fp, hdr, rec)) >= 0; m++) { if (NULL == (ip = snp_init())) { fprintf(stderr, "[E::%s] could not initialize the snp_t structure.\n", __func__); @@ -50,36 +54,43 @@ size_t get_snplist_from_vcf(const char *fn, snplist_t *pl, int *ret, int print_s } ip->chr = safe_strdup(bcf_hdr_id2name(hdr, rec->rid)); if (NULL == ip->chr) { - if (print_skip) { fprintf(stderr, "[W::%s] skip No.%ld SNP: could not get chr name.\n", __func__, m); } + if (print_skip) + fprintf(stderr, "[W::%s] skip No.%ld SNP: could not get chr name.\n", __func__, m); snp_destroy(ip); continue; - } ip->pos = rec->pos; + } + ip->pos = rec->pos; bcf_unpack(rec, BCF_UN_STR); if (rec->n_allele > 0) { - if (1 == (l = strlen(rec->d.allele[0]))) { ip->ref = rec->d.allele[0][0]; } + if (1 == (l = strlen(rec->d.allele[0]))) + ip->ref = rec->d.allele[0][0]; else if (l > 1) { - if (print_skip) { fprintf(stderr, "[W::%s] skip No.%ld SNP: ref_len > 1.\n", __func__, m); } + if (print_skip) + fprintf(stderr, "[W::%s] skip No.%ld SNP: ref_len > 1.\n", __func__, m); snp_destroy(ip); continue; } // else: do nothing. keep ref = 0, 0 is its init value. if (2 == rec->n_allele) { - if (1 == (l = strlen(rec->d.allele[1]))) { ip->alt = rec->d.allele[1][0]; } + if (1 == (l = strlen(rec->d.allele[1]))) + ip->alt = rec->d.allele[1][0]; else if (l > 1) { - if (print_skip) { fprintf(stderr, "[W::%s] skip No.%ld SNP: alt_len > 1.\n", __func__, m); } + if (print_skip) + fprintf(stderr, "[W::%s] skip No.%ld SNP: alt_len > 1.\n", __func__, m); snp_destroy(ip); continue; } // else: do nothing. keep alt = 0, 0 is its init value. } else if (rec->n_allele > 2) { - if (print_skip) { fprintf(stderr, "[W::%s] skip No.%ld SNP: n_allele > 2.\n", __func__, m); } + if (print_skip) + fprintf(stderr, "[W::%s] skip No.%ld SNP: n_allele > 2.\n", __func__, m); snp_destroy(ip); continue; } // else: keep alt = 0. } // else: do nothing. keep ref = alt = 0, 0 is their init values. - snplist_push(*pl, ip); + kv_push(snp_t*, *pl, ip); n++; } if (-1 == r) { // end of bcf file. - snplist_resize(*pl, snplist_size(*pl)); + kv_resize(snp_t*, *pl, kv_size(*pl)); } else { fprintf(stderr, "[E::%s] error when parsing '%s'\n", __func__, fn); goto fail; @@ -102,3 +113,4 @@ size_t get_snplist_from_vcf(const char *fn, snplist_t *pl, int *ret, int print_s biallele_t* biallele_init(void) { return (biallele_t*) calloc(1, sizeof(biallele_t)); } void biallele_destroy(biallele_t *p) { if (p) { free(p); } } void biallele_reset(biallele_t *p) {} + diff --git a/src/snp.h b/src/snp.h index 36f4d57..dac2ea5 100644 --- a/src/snp.h +++ b/src/snp.h @@ -1,4 +1,4 @@ -/* SNP operatoins API/routine +/* snp.h - SNP operatoins API/routine * Author: Xianjie Huang */ #ifndef CSP_SNP_H @@ -10,65 +10,34 @@ /* * SNP List API */ -/*@abstruct The basic data structure to store SNP info. -@param chr Name of chr. -@param pos 0-based coordinate in the reference sequence. -@param ref Ref base (a letter). 0 means no ref in the input SNP file for the pos. -@param alt Alt base (a letter). 0 means no alt in the input SNP file for the pos. - */ + typedef struct { - char *chr; - hts_pos_t pos; - int8_t ref, alt; + char *chr; // Name of chromosome. + hts_pos_t pos; // 0-based coordinate in the reference sequence. + int8_t ref, alt; // Ref/Alt base. 0 means no ref/alt in the input SNP file for the pos. } snp_t; -/*@abstract Initilize the snp_t structure. -@return Pointer to the snp_t structure if success, NULL if failure. -@note The pointer returned successfully by snp_init() should be freed - by snp_destroy() when no longer used. - */ snp_t* snp_init(void); void snp_destroy(snp_t *p); void snp_reset(snp_t *p); -/*@abstract A list containing of several pointers to the snp_t structure. -@param a Array of snp_t* pointers. -@param n The next pos of the unused element of the array. -@param m Size of the whole array. - -@note The snplist_t structure should be freed by snplist_destroy() when no longer used. - snplist_init() function should be called immediately after the structure was created. - -@example (A simple example from kvec.h) - kvec_t(int) array; - kv_init(array); - kv_push(int, array, 10); // append - kv_A(array, 20) = 4; - kv_destroy(array); - */ -typedef kvec_t(snp_t*) snplist_t; /* kvec_t from kvec.h */ -#define snplist_init(v) kv_init(v) -#define snplist_resize(v, size) kv_resize(snp_t*, v, size) -#define snplist_push(v, x) kv_push(snp_t*, v, x) -#define snplist_A(v, i) kv_A(v, i) -#define snplist_size(v) kv_size(v) -#define snplist_max(v) kv_max(v) -#define snplist_destroy(v) { \ - size_t __j; \ - for (__j = 0; __j < snplist_size(v); __j++) snp_destroy(snplist_A(v, __j)); \ - kv_destroy(v); \ - (v).a = NULL; (v).m = (v).n = 0; \ +typedef kvec_t(snp_t*) snplist_t; +#define snplist_destroy(v) { \ + size_t __j; \ + for (__j = 0; __j < kv_size(v); __j++) snp_destroy(kv_A(v, __j)); \ + kv_destroy(v); \ + (v).a = NULL; (v).m = (v).n = 0; \ } -/*@abstract Extract SNP info from bcf/vcf file. -@param fn Filename of bcf/vcf. -@param pl Pointer to client data used to store the extracted SNP info. -@param ret Pointer to store running state. 0 if success, -1 otherwise. +/*!@func +@abstract Extract SNP info from bcf/vcf file. +@param fn Filename of bcf/vcf. +@param pl Pointer to client data used to store the extracted SNP info. +@param ret Pointer to store running state. 0 if success, -1 otherwise. @param print_skip If print the skipped SNPs. 1, yes, 0, no. -@return Num of elements successfully added into the snplist. - -@note If length of Ref or Alt is larger than 1, then the SNP would be skipped. - If length of Ref or Alt is 0, then their values would be infered during pileup. +@return Num of elements successfully added into the snplist. +@note If length of Ref or Alt is larger than 1, then the SNP would be skipped. + If length of Ref or Alt is 0, then their values would be infered during pileup. */ size_t get_snplist_from_vcf(const char *fn, snplist_t *pl, int *ret, int print_skip); #define get_snplist(fn, pl, ret, print_skip) get_snplist_from_vcf(fn, pl, ret, print_skip) @@ -85,3 +54,4 @@ void biallele_destroy(biallele_t *p); void biallele_reset(biallele_t *p); #endif + From 17ceb37920175873b55ca2a7f0703a53cc9764e1 Mon Sep 17 00:00:00 2001 From: hxj5 Date: Wed, 3 Nov 2021 10:33:08 +0800 Subject: [PATCH 6/8] version string: add htslib version --- src/cellsnp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cellsnp.c b/src/cellsnp.c index c25ba96..460edf7 100644 --- a/src/cellsnp.c +++ b/src/cellsnp.c @@ -58,6 +58,7 @@ #include "thpool.h" #include "htslib/sam.h" #include "htslib/regidx.h" +#include "htslib/hts.h" #include "config.h" #include "csp.h" #include "jfile.h" @@ -112,7 +113,8 @@ static void print_usage(FILE *fp) { char *tmp_filter_noumi = bam_flag2str(CSP_EXCL_FMASK_NOUMI); fprintf(fp, "\n"); - fprintf(fp, "Usage: %s [options]\n", CSP_NAME); + fprintf(fp, "Version: %s (htslib %s)\n", CSP_VERSION, hts_version()); + fprintf(fp, "Usage: %s [options]\n", CSP_NAME); fprintf(fp, "\n"); fprintf(fp, "Options:\n"); fprintf(fp, " -s, --samFile STR Indexed sam/bam file(s), comma separated multiple samples.\n"); @@ -424,7 +426,7 @@ int main(int argc, char **argv) { while ((c = getopt_long(argc, argv, "hVs:S:O:R:T:b:i:I:p:", lopts, NULL)) != -1) { switch (c) { case 'h': print_usage(stderr); goto fail; - case 'V': printf("%s\n", CSP_VERSION); goto fail; + case 'V': printf("%s %s (htslib %s)\n", CSP_NAME, CSP_VERSION, hts_version()); goto fail; case 's': if (gs.in_fns) { str_arr_destroy(gs.in_fns, gs.nin); } if (NULL == (gs.in_fns = hts_readlist(optarg, 0, &gs.nin)) || gs.nin <= 0) { From bac6a6020ba60ca5a9c02d82daee15522b4c2687 Mon Sep 17 00:00:00 2001 From: hxj5 Date: Wed, 3 Nov 2021 16:49:07 +0800 Subject: [PATCH 7/8] add -f/--refseq --- src/cellsnp.c | 10 ++++++++- src/csp.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++-- src/csp.h | 8 +++++++ src/csp_fetch.c | 8 ++++--- src/csp_pileup.c | 8 ++++--- src/mplp.c | 1 + src/mplp.h | 4 ++++ src/snp.c | 2 +- 8 files changed, 88 insertions(+), 10 deletions(-) diff --git a/src/cellsnp.c b/src/cellsnp.c index 460edf7..fe2d173 100644 --- a/src/cellsnp.c +++ b/src/cellsnp.c @@ -82,6 +82,7 @@ static void gll_set_default(global_settings *gs) { // Options gs->is_genotype = 0; gs->is_out_zip = 0; + gs->refseq_file = NULL; char *chrom_tmp[] = CSP_CHROM_ALL; gs->chroms = (char**) calloc(CSP_NCHROM, sizeof(char*)); for (gs->nchrom = 0; gs->nchrom < CSP_NCHROM; gs->nchrom++) { @@ -138,6 +139,9 @@ static void print_usage(FILE *fp) { fprintf(fp, " --gzip If use, the output files will be zipped into BGZF format.\n"); fprintf(fp, " --printSkipSNPs If use, the SNPs skipped when loading VCF will be printed.\n"); fprintf(fp, " -p, --nproc INT Number of subprocesses [%d]\n", CSP_NTHREAD); + fprintf(fp, " -f, --refseq FILE Faidx indexed reference sequence file. If set, the real (genomic)\n"); + fprintf(fp, " ref extracted from this file would be used for Mode 2 or for the\n"); + fprintf(fp, " missing REFs in the input VCF for Mode 1.\n"); fprintf(fp, " --chrom STR The chromosomes to use, comma separated [1 to %d]\n", CSP_NCHROM); fprintf(fp, " --cellTAG STR Tag for cell barcodes, turn off with None [%s]\n", CSP_CELL_TAG); fprintf(fp, " --UMItag STR Tag for UMI: UR, Auto, None. For Auto mode, use UR if barcodes is inputted,\n"); @@ -395,6 +399,7 @@ int main(int argc, char **argv) { {"sampleIDs", required_argument, NULL, 'I'}, {"sampleids", required_argument, NULL, 'I'}, {"nproc", required_argument, NULL, 'p'}, + {"refseq", required_argument, NULL, 'f'}, {"chrom", required_argument, NULL, 1}, {"cellTAG", required_argument, NULL, 2}, {"celltag", required_argument, NULL, 2}, @@ -423,7 +428,7 @@ int main(int argc, char **argv) { {"maxdepth", required_argument, NULL, 17} }; if (1 == argc) { print_usage(stderr); goto fail; } - while ((c = getopt_long(argc, argv, "hVs:S:O:R:T:b:i:I:p:", lopts, NULL)) != -1) { + while ((c = getopt_long(argc, argv, "hVs:S:O:R:T:b:i:I:p:f:", lopts, NULL)) != -1) { switch (c) { case 'h': print_usage(stderr); goto fail; case 'V': printf("%s %s (htslib %s)\n", CSP_NAME, CSP_VERSION, hts_version()); goto fail; @@ -458,6 +463,9 @@ int main(int argc, char **argv) { goto fail; } else { break; } case 'p': gs.mthread = gs.nthread = atoi(optarg); break; + case 'f': + if (gs.refseq_file) free(gs.refseq_file); + gs.refseq_file = strdup(optarg); break; case 1: if (gs.chroms) { str_arr_destroy(gs.chroms, gs.nchrom); gs.nchrom = 0; } if (NULL == (gs.chroms = hts_readlist(optarg, 0, &gs.nchrom))) { diff --git a/src/csp.c b/src/csp.c index 977d78e..1c6f5c1 100644 --- a/src/csp.c +++ b/src/csp.c @@ -4,8 +4,10 @@ #include #include +#include #include "htslib/sam.h" #include "htslib/kstring.h" +#include "htslib/faidx.h" #include "config.h" #include "mplp.h" #include "jfile.h" @@ -34,6 +36,7 @@ void gll_setting_free(global_settings *gs) { if (gs->barcodes) { str_arr_destroy(gs->barcodes, gs->nbarcode); gs->barcodes = NULL; } if (gs->sid_list_file) { free(gs->sid_list_file); gs->sid_list_file = NULL; } if (gs->sample_ids) { str_arr_destroy(gs->sample_ids, gs->nsid); gs->sample_ids = NULL; } + if (gs->refseq_file) { free(gs->refseq_file); gs->refseq_file = NULL; } if (gs->chroms) { str_arr_destroy(gs->chroms, gs->nchrom); gs->chroms = NULL; } if (gs->cell_tag) { free(gs->cell_tag); gs->cell_tag = NULL; } if (gs->umi_tag) { free(gs->umi_tag); gs->umi_tag = NULL; } @@ -52,6 +55,7 @@ void gll_setting_print(FILE *fp, global_settings *gs, char *prefix) { (gs->targets ? (long) regidx_nregs(gs->targets) : 0) : (long) kv_size(gs->pl)); fprintf(fp, "%snum_of_barcodes = %d, num_of_samples = %d\n", prefix, gs->nbarcode, gs->nsid); + fprintf(fp, "%srefseq file = %s\n", prefix, gs->refseq_file); fprintf(fp, "%s%d chroms: ", prefix, gs->nchrom); for (i = 0; i < gs->nchrom; i++) fprintf(fp, "%s ", gs->chroms[i]); fputc('\n', fp); @@ -131,9 +135,47 @@ int csp_mplp_prepare(csp_mplp_t *mplp, global_settings *gs) { } } } + + /* construct faidx if needed */ + if (gs->refseq_file) { + if (NULL == (mplp->fai = fai_load(gs->refseq_file))) { + fprintf(stderr, "[E::%s] failed to open refseq file '%s'.\n", __func__, gs->refseq_file); + return -1; + } + } + return 0; } +int8_t csp_mplp_base2int(int8_t c) { + int8_t i = seq_nt16_char2int(c); + if (i < 0 || i > 4) + i = -1; + if (i == 4 && c != (int8_t)'N') + i = -1; + return i; +} + +char* csp_mplp_get_ref(csp_mplp_t *mplp, hts_pos_t *len, global_settings *gs) { + faidx_t *fai = mplp->fai; + if (! mplp->chrom) { + *len = -1; + return NULL; + } + if (faidx_has_seq(fai, mplp->chrom)) { + return faidx_fetch_seq64(fai, mplp->chrom, mplp->pos, mplp->pos, len); + } else if (0 == strncmp(mplp->chrom, "chr", 3)) { + return faidx_fetch_seq64(fai, mplp->chrom + 3, mplp->pos, mplp->pos, len); + } else { + kstring_t str = {0, 0, 0}; + kputs("chr", &str); kputs(mplp->chrom, &str); + char *s; + s = faidx_fetch_seq64(fai, str.s, mplp->pos, mplp->pos, len); + ks_free(&str); + return s; + } +} + int csp_mplp_push(csp_pileup_t *pileup, csp_mplp_t *mplp, int sid, global_settings *gs) { khiter_t k; khiter_t u; @@ -182,6 +224,8 @@ int csp_mplp_stat(csp_mplp_t *mplp, global_settings *gs) { csp_plp_t *plp = NULL; int i, j, k; size_t l; + char *ref = NULL; + hts_pos_t len; for (i = 0; i < mplp->nsg; i++) { plp = kh_val(mplp->hsg, mplp->hsg_iter[i]); @@ -200,8 +244,17 @@ int csp_mplp_stat(csp_mplp_t *mplp, global_settings *gs) { return 1; if (mplp->ref_idx < 0) { // ref is not valid. Refer to csp_mplp_t. - mplp->ref_idx = mplp->inf_rid; - mplp->alt_idx = mplp->inf_aid; + if (mplp->fai) { + ref = csp_mplp_get_ref(mplp, &len, gs); + if (NULL == ref || len != 1) + return 1; + mplp->ref_idx = seq_nt16_char2int((int8_t)ref[0]); + infer_alt(mplp->bc, mplp->ref_idx, &mplp->alt_idx); + free(ref); + } else { + mplp->ref_idx = mplp->inf_rid; + mplp->alt_idx = mplp->inf_aid; + } } else if (mplp->alt_idx < 0) { // alt is not valid infer_alt(mplp->bc, mplp->ref_idx, &mplp->alt_idx); } diff --git a/src/csp.h b/src/csp.h index f98e4aa..08c5c0b 100644 --- a/src/csp.h +++ b/src/csp.h @@ -111,6 +111,7 @@ struct _gll_settings { char *sid_list_file; // Name of the file containing a list of sample IDs, one sample-ID per line. char **sample_ids; // Pointer to the array of sample IDs. int nsid; // Num of sample IDs. + char *refseq_file; // File name of the refseq (usually a fasta file). char **chroms; // Pointer to the array of the chromosomes to use. int nchrom; // Num of chromosomes. char *cell_tag; // Tag for cell barcodes, NULL means no cell tags. @@ -150,6 +151,13 @@ void gll_setting_print(FILE *fp, global_settings *gs, char *prefix); //@return 0 if success, -1 otherwise. int csp_mplp_prepare(csp_mplp_t *mplp, global_settings *gs); +//convert the base char to the index of 'ACGTN' if the base is one of them +//otherwise convert to -1. +int8_t csp_mplp_base2int(int8_t c); + +//@return Pointe to string r if success, NULL otherwise. +char* csp_mplp_get_ref(csp_mplp_t *mplp, hts_pos_t *len, global_settings *gs); + /*!@func @abstract Push content of one csp_pileup_t structure into the csp_mplp_t structure. @return 0 if successfully pushed one new record; diff --git a/src/csp_fetch.c b/src/csp_fetch.c index 1dd9c7c..9e409ca 100644 --- a/src/csp_fetch.c +++ b/src/csp_fetch.c @@ -125,8 +125,8 @@ static int fetch_snp(snp_t *snp, csp_bam_fs **fs, htsFile **fp, int nfs, csp_pil size_t npileup = 0; #endif - mplp->ref_idx = snp->ref ? seq_nt16_char2int(snp->ref) : -1; - mplp->alt_idx = snp->alt ? seq_nt16_char2int(snp->alt) : -1; + mplp->ref_idx = csp_mplp_base2int(snp->ref); + mplp->alt_idx = csp_mplp_base2int(snp->alt); for (i = 0, npush1 = 0; i < nfs; i++, npush1 = 0) { bs = fs[i]; tid = csp_sam_hdr_name2id(bs->hdr, snp->chr, s); @@ -173,6 +173,8 @@ static int fetch_snp(snp_t *snp, csp_bam_fs **fs, htsFile **fp, int nfs, csp_pil csp_mplp_print_(stderr, mplp, "\t"); #endif + mplp->chrom = snp->chr; + mplp->pos = snp->pos; if ((ret = csp_mplp_stat(mplp, gs)) != 0) { state = (ret > 0) ? 1 : -1; goto fail; @@ -391,7 +393,7 @@ static inline int infer_nthread(global_settings *gs) { if (gs->tp_ntry == 0) { return gs->mthread; } // the first time to try, just use the value user specified if (gs->tp_ntry == 1) { int n0 = 3; // FIXME!!! the initial files opened by this program. eg. the program itself and lz, lhts etc. - int n = gs->nin + 4 + gs->is_genotype; // 4 is the 4 output files: base.vcf, ad.mtx, dp.mtx and oth.mtx + int n = gs->nin + 4 + gs->is_genotype + (NULL != gs->refseq_file); // 4 is the 4 output files: base.vcf, ad.mtx, dp.mtx and oth.mtx int m = (gs->tp_max_open - n0) / n; if (m >= gs->mthread) { m = gs->mthread - 1; } if (m < 1) { m = 1; } diff --git a/src/csp_pileup.c b/src/csp_pileup.c index 832fe91..3c5dbc0 100644 --- a/src/csp_pileup.c +++ b/src/csp_pileup.c @@ -189,6 +189,7 @@ static int pileup_snp(hts_pos_t pos, int *mp_n, const bam_pileup1_t **mp_plp, in csp_mplp_print_(stderr, mplp, "\t"); #endif + mplp->pos = pos; if ((ret = csp_mplp_stat(mplp, gs)) != 0) { state = (ret > 0) ? 1 : -1; goto fail; @@ -393,6 +394,7 @@ static int csp_pileup_core(void *args) { // As each query region is a chrom, so no need to call bam_mplp_init_overlaps() here? /* begin mpileup */ + mplp->chrom = a[n]; while ((ret = bam_mplp_auto(mp_iter, &tid, &pos, mp_n, mp_plp)) > 0) { #if CSP_FIT_MULTI_SMP if (gs->tp_errno) { d->ret = 1; goto clean; } @@ -408,8 +410,8 @@ static int csp_pileup_core(void *args) { ale = regitr_payload(itr, biallele_t*); break; } - mplp->ref_idx = ale->ref ? seq_nt16_char2int(ale->ref) : -1; - mplp->alt_idx = ale->alt ? seq_nt16_char2int(ale->alt) : -1; + mplp->ref_idx = csp_mplp_base2int(ale->ref); + mplp->alt_idx = csp_mplp_base2int(ale->alt); } else { mplp->ref_idx = -1; mplp->alt_idx = -1; @@ -507,7 +509,7 @@ static inline int infer_nthread(global_settings *gs) { if (gs->tp_ntry == 0) { return gs->mthread; } // the first time to try, just use the value user specified if (gs->tp_ntry == 1) { int n0 = 3; // FIXME!!! the initial files opened by this program. eg. the program itself and lz, lhts etc. - int n = gs->nin + 4 + gs->is_genotype; // 4 is the 4 output files: base.vcf, ad.mtx, dp.mtx and oth.mtx + int n = gs->nin + 4 + gs->is_genotype + (NULL != gs->refseq_file); // 4 is the 4 output files: base.vcf, ad.mtx, dp.mtx and oth.mtx int m = (gs->tp_max_open - n0) / n; if (m >= gs->mthread) { m = gs->mthread - 1; } if (m < 1) { m = 1; } diff --git a/src/mplp.c b/src/mplp.c index 47c721e..f29eaf4 100644 --- a/src/mplp.c +++ b/src/mplp.c @@ -244,6 +244,7 @@ void csp_mplp_destroy(csp_mplp_t *p) { if (p->pu) { jmempool_destroy(umi_unit, p->pu); } if (p->pl) { jmempool_destroy(list_umiunit, p->pl); } if (p->su) { jmempool_destroy(str, p->su); } + if (p->fai) { fai_destroy(p->fai); } free(p); } } diff --git a/src/mplp.h b/src/mplp.h index 4d2ae22..4180ade 100644 --- a/src/mplp.h +++ b/src/mplp.h @@ -9,6 +9,7 @@ #include "htslib/sam.h" #include "htslib/kstring.h" #include "htslib/khash.h" +#include "htslib/faidx.h" #include "kvec.h" #include "jfile.h" #include "jmempool.h" @@ -203,6 +204,8 @@ typedef pool_str_t pool_ps_t; //The structure stores the stat info of all sample groups for certain query pos. typedef struct { + char *chrom; // Do not free it. + hts_pos_t pos; // 0-based. int8_t ref_idx, alt_idx; // Index of ref/alt in "ACGTN". Negative means invalid value. int8_t inf_rid, inf_aid; // Infered index of ref/alt in "ACGTN". Negative means invalid value. size_t bc[5]; // Summarized read count across samples, in the order of 'ACGTN'. @@ -215,6 +218,7 @@ typedef struct { pool_ul_t *pl; // Pool of list_uu_t structures. pool_ps_t *su; // Pool of UMI strings. double qvec[4]; // A container for the qual vector returned by get_qual_vector(). + faidx_t *fai; // Fasta index structure. } csp_mplp_t; csp_mplp_t* csp_mplp_init(void); diff --git a/src/snp.c b/src/snp.c index f617679..bb3a088 100644 --- a/src/snp.c +++ b/src/snp.c @@ -62,7 +62,7 @@ size_t get_snplist_from_vcf(const char *fn, snplist_t *pl, int *ret, int print_s ip->pos = rec->pos; bcf_unpack(rec, BCF_UN_STR); if (rec->n_allele > 0) { - if (1 == (l = strlen(rec->d.allele[0]))) + if (1 == (l = strlen(rec->d.allele[0]))) ip->ref = rec->d.allele[0][0]; else if (l > 1) { if (print_skip) From 8b739152bcf523e08a057d144e0c7295170b5a15 Mon Sep 17 00:00:00 2001 From: hxj5 Date: Wed, 3 Nov 2021 17:18:31 +0800 Subject: [PATCH 8/8] update to v1.2.2 --- configure.ac | 2 +- doc/conf.py | 2 +- doc/manual.rst | 11 ++++++++--- doc/release.rst | 10 ++++++++++ src/cellsnp.c | 42 +++++++++++++++++++++++++----------------- src/config.h | 2 +- 6 files changed, 46 insertions(+), 23 deletions(-) diff --git a/configure.ac b/configure.ac index e8e629f..cf8a034 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ dnl - github:htslib https://github.com/samtools/htslib/blob/550c6b1b98414ef60eeb dnl - github:samtools https://github.com/samtools/samtools/blob/develop/configure.ac AC_PREREQ([2.63]) -AC_INIT([cellsnp-lite], [1.2.1], [hxj5@hku.hk]) +AC_INIT([cellsnp-lite], [1.2.2], [hxj5@hku.hk]) dnl Use subdir-objects option so that the source files in subdir `src` dnl could be compiled successfully diff --git a/doc/conf.py b/doc/conf.py index a6a0429..0e3f3bc 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -22,7 +22,7 @@ author = 'Xianjie Huang' # The full version, including alpha/beta/rc tags -release = 'v1.2.0' +release = 'v1.2.2' # -- General configuration --------------------------------------------------- diff --git a/doc/manual.rst b/doc/manual.rst index 6b282ee..e95e505 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -141,8 +141,9 @@ Here is a list of full parameters for setting (``cellsnp-lite -V`` always give t version you are using): .. code-block:: html - - Usage: cellsnp-lite [options] + + Version: 1.2.2 (htslib 1.11-79-g53d7277) + Usage: cellsnp-lite [options] Options: -s, --samFile STR Indexed sam/bam file(s), comma separated multiple samples. @@ -166,6 +167,9 @@ version you are using): --gzip If use, the output files will be zipped into BGZF format. --printSkipSNPs If use, the SNPs skipped when loading VCF will be printed. -p, --nproc INT Number of subprocesses [1] + -f, --refseq FILE Faidx indexed reference sequence file. If set, the real (genomic) + ref extracted from this file would be used for Mode 2 or for the + missing REFs in the input VCF for Mode 1. --chrom STR The chromosomes to use, comma separated [1 to 22] --cellTAG STR Tag for cell barcodes, turn off with None [CB] --UMItag STR Tag for UMI: UR, Auto, None. For Auto mode, use UR if barcodes is inputted, @@ -180,9 +184,10 @@ version you are using): (when use UMI) or UNMAP,SECONDARY,QCFAIL,DUP (otherwise)] --minLEN INT Minimum mapped length for read filtering [30] --minMAPQ INT Minimum MAPQ for read filtering [20] + --maxDEPTH INT Maximum depth for one site of one file; 0 means highest possible value [0] --countORPHAN If use, do not skip anomalous read pairs. Note that the "--maxFLAG" option is now deprecated, please use "--inclFLAG" or "--exclFLAG" instead. You can easily aggregate and convert the flag mask bits to an integer by refering to: https://broadinstitute.github.io/picard/explain-flags.html - + diff --git a/doc/release.rst b/doc/release.rst index 6585953..1cc36c6 100644 --- a/doc/release.rst +++ b/doc/release.rst @@ -2,6 +2,16 @@ History ======= +Release v1.2.2 (03/11/2021) +=========================== +* add -f/--refseq so that the real (genomic) ref could be extracted from + the fasta file for Mode 2 or for the missing REFs in the input VCF for + Mode 1. Credit to issue 28. +* add --maxDEPTH for read filtering. +* version: add the version of htslib to the version string and output it + by default for usage(). +* remove redundant comments and re-format codes. + Release v1.2.1 (07/09/2021) =========================== * implement infering ALT when REF is provided in vcf, which could avoid wrong diff --git a/src/cellsnp.c b/src/cellsnp.c index fe2d173..252e904 100644 --- a/src/cellsnp.c +++ b/src/cellsnp.c @@ -3,39 +3,47 @@ */ /* TODO: -- add --max-base-qual option to set max per base quality for genotyping +- Add --max-base-qual option to set max per base quality for genotyping * in htslib, per base qualities are stored in the Phred scale with no +33 offset. * get_qual_vector() in mplp.c. -- support calling germline SNPs for multiple bam files? - * in bulk mode -- add -f option to use fasta? - * add fixref and fix-mtx? - * !! WARNING !! in mode 1, the output could contain Homozygous SNV even with --minMAF 0.3. e.g., assuming one input SNV has - REF/ALT - A/C, while the two real alleles are C/G with AF 0.6/0.4, then this SNV would pass --minMAF 0.3 - and the genotype is 1/1 (as REF is A, ALT is C), while the real genotype should be 1/2 (as two alt alleles C,G). - (SNVs of this kind are not so many in practice? - in a recent case, only 158 out of 133k SNVs) +- Write test scripts for some key functions. - Consistency correction could be done in UMI groups with the help of @p pu & @p pl inside mplp structure. * update map_ug_t first! -- update mplp_t::su and plp_t::hug - Output vcf header according to input bam header -- Write test scripts for some key functions. -- add fetch and pileup sub-commands? -- ?change -T method, use qsort & linear search instead of regidx_t of htslib: +- More filters could be applied when extracting/fetching reads. +- Add fetch and pileup sub-commands? + * merge csp_fetch() and csp_pileup() for the two functions share most codes? +- Support calling germline SNPs for multiple bam files? + * in bulk mode +- ?Change -T method, use qsort & linear search instead of regidx_t of htslib: * note the bug of qsort in lower version of glibc, refer to https://sourceware.org/bugzilla/show_bug.cgi?id=11655) * as the linear searching assume that the bam has been sortted by start pos, then how to deal with the partly aligned reads and one read in paired reads aligned to query chrom. +- Save memory for snp list + * use fixed 32-bit index for chrom string. + * use shared chrom string for all snps in that chrom, like the way in the develop branch. +- Use optional sparse matrices tags with the help of function pointers. +- Wrap up the steps in the whole workflow into proper data structures. + * e.g., the snp iteration, the read extraction from input files (especially the redundant hts_itr_xxx), + mplp statistics, temporary file creation & output, etc. +- Update mplp_t::su and plp_t::hug - Try multi-process (process pool) for multi input samples -- separate htsFile from csp_bam_fs as it cannot be shared among threads -- merge csp_fetch() and csp_pileup() for the two functions share most codes? +- Separate htsFile from csp_bam_fs as it cannot be shared among threads - Try using multi_iter fetching method of bam/sam/cram for multi regions (SNPs) if it can in theory speed cellsnp up. -- More filters could be applied when extracting/fetching reads. - Improve the jfile_t structure, for example, adding @p is_error. - Improve the JMEMPOOL structure, for example, adding @p base_init_f. -- Use optional sparse matrices tags with the help of function pointers. - Output optionally qual values/letters to mtx file. - Deal with the problem that some UMIs have the letter 'N'. */ +/* Discuss +- Cellsnp-lite now only considers biallele (related to -f/--refseq). + * !! WARNING !! in mode 1, the output could contain Homozygous SNV even with --minMAF 0.3. e.g., assuming one input SNV has + REF/ALT - A/C, while the two real alleles are C/G with AF 0.6/0.4, then this SNV would pass --minMAF 0.3 + and the genotype is 1/1 (as REF is A, ALT is C), while the real genotype should be 1/2 (as two alt alleles C,G). + (SNVs of this kind are not so many in practice? - in a recent case, only 158 out of 133k SNVs) + */ + /* Reference - htslib header files: https://github.com/samtools/htslib/tree/develop/htslib mainly the sam.{h,c}, regidx.{h,c}, vcf.{h,c}, kstring.h, hts.{h,c} files diff --git a/src/config.h b/src/config.h index 877de07..f926935 100644 --- a/src/config.h +++ b/src/config.h @@ -10,7 +10,7 @@ #define DEVELOP 0 #define CSP_NAME "cellsnp-lite" -#define CSP_VERSION "1.2.1" +#define CSP_VERSION "1.2.2" #define CSP_AUTHOR "hxj5" #define JF_ZIP_TYPE 2 // 1, gzip; 2, bgzip.