File: configure.ac

package info (click to toggle)
libseqlib 1.1.2+dfsg-1~bpo9+1
  • links: PTS, VCS
  • area: main
  • in suites: stretch-backports
  • size: 1,460 kB
  • sloc: cpp: 7,176; sh: 805; makefile: 60
file content (54 lines) | stat: -rw-r--r-- 1,612 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59) ## specificy version of autoconf
AC_INIT(seqkit, 1.0, jwala@broadinstitute.org)
AM_INIT_AUTOMAKE(foreign)
AC_CONFIG_SRCDIR([src/BamReader.cpp])
AC_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE([disable])
##m4_include([m4/m4_ax_openmp.m4])

LIB_VERSION=1:0

AC_SUBST([VERSION])
AC_SUBST([LIB_VERSION])

# Checks for programs.
AC_PROG_CXX ## test for cpp compiler
AC_PROG_CC ## test for C compiler
AC_PROG_RANLIB ## required if libraries are built in package
AC_PROG_LIBTOOL

# Check for headers
AC_LANG([C++])
AC_CHECK_HEADER([zlib.h])

# Check for libraries
AC_SEARCH_LIBS([gzopen],[z],,[AC_MSG_ERROR([libz not found, please install zlib (http://www.zlib.net/)])])
AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [clock_getttime found])], )

# check for c++11
#AX_CXX_COMPILE_STDCXX_11(,[optional])

# Only fail on warnings when the --enable-development flag is passed into configure
AC_ARG_ENABLE(development, AS_HELP_STRING([--enable-development],
	[Turn on development options, like failing compilation on warnings]))
if test "$enable_development"; then
    fail_on_warning="-Werror"
fi

# Set compiler flags.
AC_SUBST(AM_CXXFLAGS, "-g $fail_on_warning -Wno-unknown-pragmas")
AC_SUBST(CXXFLAGS, "$CXXFLAGS")
AC_SUBST(CFLAGS, "$CFLAGS")
AC_SUBST(LDFLAGS, "$LDFLAGS")

# We always need to specify to link in external libraries
AC_SUBST(LIBS, "$LIBS -pthread")

AC_CONFIG_FILES([Makefile
	         src/Makefile
	         src/seqtools/Makefile
                 libseqlib.pc
                ])	

AC_OUTPUT