Debian Codegraph @

configure.ac

raw
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([2.63])
5 AC_INIT([ivar], [1.4.4], [[email protected]])
6 AM_INIT_AUTOMAKE([foreign subdir-objects])
7 AC_CONFIG_HEADERS([config.h])
8
9 # Checks for programs.
10 AC_PROG_AWK
11 AC_PROG_CXX
12 AC_PROG_CC
13 AC_PROG_INSTALL
14 AC_PROG_CPP
15 AC_PROG_MKDIR_P
16
17 LIBS="-lhts -lp -lpthread"
18
19 # introduce the optional configure parameter for a non-standard install prefix of XXX
20 AC_ARG_WITH([hts],
21 [AS_HELP_STRING([--with-hts=prefix],
22 [use this to specify a non-standard install prefix of the htslib])],
23 [HTSPATHSET=1],
24 [HTSPATHSET=0])
25
26 # if optional parameter used, extend path flags for compliler and linker
27 if test $HTSPATHSET = 1 ; then
28 # extend the compiler and linker flags according to the path set
29 AM_CXXFLAGS="$AM_CXXFLAGS -I$with_hts/include"
30 AM_LDFLAGS="$AM_LDFLAGS -L$with_hts/lib"
31 AC_SUBST([LIBS])
32 AC_SUBST([AM_CXXFLAGS])
33 AC_SUBST([AM_LDFLAGS])
34 fi
35
36 # Checks for libraries.
37 # FIXME: Replace `main' with a function in `-lhts':
38 AC_CHECK_LIB([hts], [main])
39 # FIXME: Replace `main' with a function in `-lpthread':
40 AC_CHECK_LIB([pthread], [main])
41 # FIXME: Replace `main' with a function in `-lz':
42 AC_CHECK_LIB([z], [main])
43
44 # Checks for header files.
45 AC_CHECK_HEADERS([unistd.h])
46
47 # Checks for typedefs, structures, and compiler characteristics.
48 AC_HEADER_STDBOOL
49 AC_C_INLINE
50 AC_TYPE_INT16_T
51 AC_TYPE_INT32_T
52 AC_TYPE_INT8_T
53 AC_TYPE_UINT16_T
54 AC_TYPE_UINT32_T
55 AC_TYPE_UINT8_T
56
57 # Checks for library functions.
58 AC_FUNC_MALLOC
59 AC_FUNC_REALLOC
60 AC_CHECK_FUNCS([memmove])
61
62 AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile])
63 AC_OUTPUT