Skip to content

Commit

Permalink
updated configure to require lzma and bz2 (htslib requirements)
Browse files Browse the repository at this point in the history
  • Loading branch information
walaj committed May 12, 2017
1 parent 9d83028 commit 2a9f106
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 0 deletions.
116 changes: 116 additions & 0 deletions configure
Expand Up @@ -4755,6 +4755,122 @@ else
as_fn_error $? "libz not found, please install zlib (http://www.zlib.net/)" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing lzma_end" >&5
$as_echo_n "checking for library containing lzma_end... " >&6; }
if ${ac_cv_search_lzma_end+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$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_end ();
int
main ()
{
return lzma_end ();
;
return 0;
}
_ACEOF
for ac_lib in '' lzma; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_search_lzma_end=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_lzma_end+:} false; then :
break
fi
done
if ${ac_cv_search_lzma_end+:} false; then :
else
ac_cv_search_lzma_end=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_lzma_end" >&5
$as_echo "$ac_cv_search_lzma_end" >&6; }
ac_res=$ac_cv_search_lzma_end
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "liblzma not found, please install lzma" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing BZ2_bzBuffToBuffCompress" >&5
$as_echo_n "checking for library containing BZ2_bzBuffToBuffCompress... " >&6; }
if ${ac_cv_search_BZ2_bzBuffToBuffCompress+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$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
for ac_lib in '' bz2; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_search_BZ2_bzBuffToBuffCompress=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_BZ2_bzBuffToBuffCompress+:} false; then :
break
fi
done
if ${ac_cv_search_BZ2_bzBuffToBuffCompress+:} false; then :
else
ac_cv_search_BZ2_bzBuffToBuffCompress=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_BZ2_bzBuffToBuffCompress" >&5
$as_echo "$ac_cv_search_BZ2_bzBuffToBuffCompress" >&6; }
ac_res=$ac_cv_search_BZ2_bzBuffToBuffCompress
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "libbz2 not found, please install bz2" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
$as_echo_n "checking for library containing clock_gettime... " >&6; }
if ${ac_cv_search_clock_gettime+:} false; then :
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Expand Up @@ -18,6 +18,8 @@ AC_CHECK_HEADER([zlib.h])
# Check for libraries
##AC_SEARCH_LIBS([library],[function], [action-if-found], [action if not found])
AC_SEARCH_LIBS([gzopen],[z],,[AC_MSG_ERROR([libz not found, please install zlib (http://www.zlib.net/)])])
AC_SEARCH_LIBS([lzma_end],[lzma],,[AC_MSG_ERROR([liblzma not found, please install lzma])])
AC_SEARCH_LIBS([BZ2_bzBuffToBuffCompress],[bz2],,[AC_MSG_ERROR([libbz2 not found, please install bz2])])
AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [clock_getttime found])], )

# Only fail on warnings when the --enable-development flag is passed into configure
Expand Down

0 comments on commit 2a9f106

Please sign in to comment.