2 AC_INIT( [fastq-tools], [0.3], [dcjones@cs.washington.ed] )
3 AM_INIT_AUTOMAKE( [foreign -Wall -Werror] )
4 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
6 AC_CONFIG_MACRO_DIR([m4])
11 opt_CFLAGS="--std=c99 -Wall -Wextra -pedantic -g -O3"
12 dbg_CFLAGS="--std=c99 -Wall -Wextra -pedantic -g -O0"
14 AC_ARG_ENABLE([debug],
15 [AS_HELP_STRING([--enable-debug],
16 [enable debugging info (default is no)])],
17 [], [enable_debug=no])
19 AS_IF([test "x$enable_debug" = xyes],
20 [CFLAGS="$dbg_CFLAGS"],
21 [CFLAGS="$opt_CFLAGS"])
23 AC_DEFINE(_FILE_OFFSET_BITS, 64)
24 AC_DEFINE(_POSIX_SOURCE) # needed for fileno
28 AC_CHECK_FUNC(fileno, ,
29 AC_MSG_ERROR([The 'fileno' function is missing.]))
35 AC_CHECK_PROG(HAVE_PCRE, pcre-config, yes, no)
36 if test "x$HAVE_PCRE" = "xno"
38 AC_MSG_ERROR([The PCRE library is needed. See http://www.pcre.org.])
40 CFLAGS="$CFLAGS $(pcre-config --cflags)"
41 PCRE_LIBS="$(pcre-config --libs)"
45 AC_CHECK_HEADER(getopt.h, ,
46 AC_MSG_ERROR([The posix getopt.h header is needed.]))
51 AC_CONFIG_FILES([Makefile