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
|
AC_INIT([calculer], [1.0.0])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([-Wall -Werror, foreign])
AC_PROG_CC
AH_TEMPLATE([USE_READLINE], [do we use GNU Readline ?])
AC_DEFUN([LINENOISE_URL], [https://github.com/antirez/linenoise.git])
AC_CHECK_LIB([readline],
[readline],
[AC_DEFINE([USE_READLINE], [1])
use_readline=true
AC_ARG_WITH([readline],
AS_HELP_STRING([--without-readline],
[do not use GNU Readline, and use the Linenoise library
available at LINENOISE_URL]),
if test ! -d "./linenoise/"
then
git clone --depth=1 'LINENOISE_URL'
fi
AC_DEFINE([USE_READLINE], [0])
use_readline=false
)],
[AC_DEFINE([USE_READLINE], [0])
use_readline=true]
)
AM_CONDITIONAL([USE_READLINE_COND], [test x$use_readline = xtrue])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[enable debugging, only useful for development])],
[debug=true],
[debug=false]
)
AM_CONDITIONAL([DEBUG_COND], [test x$debug = xtrue])
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT
|