-
Notifications
You must be signed in to change notification settings - Fork 38
/
configure.ac
66 lines (50 loc) · 1.76 KB
/
configure.ac
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
55
56
57
58
59
60
61
62
63
64
65
66
AC_PREREQ([2.60])
AC_INIT( [fastq-tools], [0.8.3], [dcjones@cs.washington.edu] )
AM_INIT_AUTOMAKE( [foreign -Wall -Werror] )
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
AM_PROG_CC_C_O
m4_ifdef([AC_TYPE_UINT8_T], [AC_TYPE_UINT8_T])
m4_ifdef([AC_TYPE_UINT16_T], [AC_TYPE_UINT16_T])
m4_ifdef([AC_TYPE_INT32_T], [AC_TYPE_INT32_T])
m4_ifdef([AC_TYPE_UINT32_T], [AC_TYPE_UINT32_T])
m4_ifdef([AC_TYPE_UINT64_T], [AC_TYPE_UINT64_T])
m4_ifdef([AC_TYPE_SIZE_T], [AC_TYPE_SIZE_T])
m4_ifdef([AC_HEADER_STDBOOL], [AC_HEADER_STDBOOL])
opt_CFLAGS="--std=gnu99 -Wall -Wextra -g -O3"
dbg_CFLAGS="--std=gnu99 -Wall -Wextra -g -O0"
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[enable debugging info (default is no)])],
[], [enable_debug=no])
AS_IF([test "x$enable_debug" = xyes],
[CFLAGS="$dbg_CFLAGS"],
[CFLAGS="$opt_CFLAGS"])
AC_DEFINE(_FILE_OFFSET_BITS, 64)
AC_DEFINE(_POSIX_SOURCE) # needed for fileno
AC_PROG_LIBTOOL
AC_CHECK_FUNC(mkstemp, ,
AC_MSG_ERROR([The 'mkstemp' function is missing.]))
AC_CHECK_FUNC(fileno, ,
AC_MSG_ERROR([The 'fileno' function is missing.]))
# check pcre
AC_CHECK_PROG(HAVE_PCRE, pcre-config, yes, no)
if test "x$HAVE_PCRE" = "xno"
then
AC_MSG_ERROR([The PCRE library is needed. See http://www.pcre.org.])
fi
CFLAGS="$CFLAGS $(pcre-config --cflags)"
PCRE_LIBS="$(pcre-config --libs)"
AC_SUBST(PCRE_LIBS)
# check getopt
AC_CHECK_HEADER(getopt.h, ,
AC_MSG_ERROR([The posix getopt.h header is needed.]))
LIBS+="-lm"
CXXFLAGS=$CFLAGS
AC_CONFIG_FILES([Makefile
src/Makefile
tests/Makefile
doc/Makefile
src/version.h])
AC_OUTPUT