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_INIT([jq], m4_esyscmd([tr -d '\n' <VERSION]), [mu@netsoc.tcd.ie],
[jq], [http://stedolan.github.com/jq/])
dnl Created autoconf implementation thompson@dtosolutions, 26NOV12
AC_PREREQ([2.61])
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE([parallel-tests])
AC_PROG_CC
AC_PROG_CC_STDC
AC_PROG_CPP_WERROR
AM_PROG_CC_C_O
dnl CFLAGS is concidered a packagers variable, not a developer variable
dnl in Auto-tools. For developer ease of use, CFLAGS are set how the
dnl developers like them by default but the packager can disable if so
dnl desired. This is useful if something other than gcc is needed or
dnl for distros that need to heavily tweek the compiler (gentoo, ARM cpu
dnl linux's, etc)
AC_ARG_ENABLE([devcflags],
[AC_HELP_STRING([--enable-devcflags=@<:@yes/no@:>@],
[Enable the same CFLAGS used by jq developers @<:@default=yes@:>@])],
[enable_devcflags=$enableval],
[enable_devcflags=yes])
AC_MSG_RESULT($enable_devcflags)
dnl AM_CONDITIONAL(DEVCFLAGS, test x$enable_devcflags = xyes)
if test "$enable_devcflags" = "yes"; then
AM_CONDITIONAL(DEVCFLAGS_ENABLED, true)
fi
dnl Check for sed
AC_CHECK_PROGS(regex_cmd, sed)
if test x$regex_cmd = "x" ; then
AC_MSG_NOTICE([sed is required to patch jq.])
fi
dnl Check for flex
AC_CHECK_PROGS(flex_cmd, flex)
if test x$flex_cmd = "x" ; then
AC_MSG_NOTICE([flex is required to patch jq.])
fi
dnl Check for bison
AC_CHECK_PROGS(bison_cmd, bison)
if test x$bison_cmd = "x" ; then
AC_MSG_NOTICE([bison is required to patch jq.])
fi
AC_CONFIG_HEADERS(config.h)
dnl Check for python
AC_CHECK_PROGS(python_cmd, python)
if test x$python_cmd = "x" ; then
AC_MSG_NOTICE([python is required to patch jq.])
fi
dnl Check for valgrind
AC_CHECK_PROGS(valgrind_cmd, valgrind)
if test x$valgrind_cmd = "x" ; then
AC_MSG_NOTICE([valgrind is required to test jq.])
fi
dnl AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall dist-bzip2 dist-zip])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
|