| 1 |
# Process this file with autoconf to produce a configure script. |
| 2 |
AC_PREREQ(2.59) ## specificy version of autoconf |
| 3 |
AC_INIT(seqkit, 1.0, [email protected]) |
| 4 |
AM_INIT_AUTOMAKE(foreign) |
| 5 |
AC_CONFIG_SRCDIR([src/BamReader.cpp]) |
| 6 |
AC_CONFIG_HEADER([config.h]) |
| 7 |
AM_MAINTAINER_MODE([disable]) |
| 8 |
##m4_include([m4/m4_ax_openmp.m4]) |
| 9 |
|
| 10 |
# Checks for programs. |
| 11 |
AC_PROG_CXX ## test for cpp compiler |
| 12 |
AC_PROG_CC ## test for C compiler |
| 13 |
AC_PROG_RANLIB ## required if libraries are built in package |
| 14 |
|
| 15 |
# Check for headers |
| 16 |
AC_LANG([C++]) |
| 17 |
AC_CHECK_HEADER([zlib.h]) |
| 18 |
|
| 19 |
# Check for libraries |
| 20 |
AC_SEARCH_LIBS([gzopen],[z],,[AC_MSG_ERROR([libz not found, please install zlib (http://www.zlib.net/)])]) |
| 21 |
AC_SEARCH_LIBS([lzma_code],[lzma],,[AC_MSG_ERROR([liblzma not found, please install lzma (http://www.7-zip.org/sdk.html)])]) |
| 22 |
AC_SEARCH_LIBS([BZ2_bzBuffToBuffDecompress],[bz2],,[AC_MSG_ERROR([lib bz2 not found, please install])]) |
| 23 |
AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [clock_getttime found])], ) |
| 24 |
|
| 25 |
# check for c++11 |
| 26 |
#AX_CXX_COMPILE_STDCXX_11(,[optional]) |
| 27 |
|
| 28 |
# Only fail on warnings when the --enable-development flag is passed into configure |
| 29 |
AC_ARG_ENABLE(development, AS_HELP_STRING([--enable-development], |
| 30 |
[Turn on development options, like failing compilation on warnings])) |
| 31 |
if test "$enable_development"; then |
| 32 |
fail_on_warning="-Werror" |
| 33 |
fi |
| 34 |
|
| 35 |
# Set compiler flags. |
| 36 |
AC_SUBST(AM_CXXFLAGS, "-g $fail_on_warning -std=c++11 -Wno-unknown-pragmas") |
| 37 |
AC_SUBST(CXXFLAGS, "$CXXFLAGS") |
| 38 |
AC_SUBST(CFLAGS, "$CFLAGS") |
| 39 |
AC_SUBST(LDFLAGS, "$LDFLAGS") |
| 40 |
|
| 41 |
# We always need to specify to link in external libraries |
| 42 |
AC_SUBST(LIBS, "$LIBS -pthread") |
| 43 |
|
| 44 |
AC_CONFIG_FILES([Makefile |
| 45 |
src/Makefile |
| 46 |
src/seqtools/Makefile]) |
| 47 |
|
| 48 |
AC_OUTPUT |