#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT([bwa], [0.5.5])
AC_CONFIG_SRCDIR([bntseq.c])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE()

# Checks for programs.
AC_PROG_CC([gcc])
AC_PROG_CXX([g++])
AC_PROG_INSTALL
AC_PROG_AWK
AC_PROG_MKDIR_P
AC_PROG_RANLIB

# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([limits.h stdint.h stdlib.h string.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([memmove memset sqrt strdup strstr])
AC_CHECK_LIB([m],[log])
AC_CHECK_LIB([z],[gzopen])
AC_CHECK_LIB([pthread],[pthread_create])

ACX_PTHREAD

AC_CONFIG_FILES([Makefile
                 bwt_gen/Makefile])
AC_OUTPUT
