-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
62 lines (44 loc) · 1.12 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
AC_INIT([libtprl],[0.1.3],[[email protected]])
AC_CONFIG_SRCDIR(tprl/rlcommand.cpp)
AC_CANONICAL_TARGET([])
AM_INIT_AUTOMAKE(libtprl, 0.1.3)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
CXXFLAGS="-g -Wall"
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AC_LANG_CPLUSPLUS
AC_REQUIRE_CPP
AC_HEADER_STDC
#AC_CHECK_LIB(pthread, pthread_create,,AC_MSG_ERROR(libtprl requires pthread library))
#check headers, functions, etc
#checking for readline
READLINE_LIBS=
AC_CHECK_LIB(termcap,tgetent,
[READLINE_LIBS="$READLINE_LIBS -ltermcap"],
AC_CHECK_LIB(ncurses, tgetent,
[READLINE_LIBS="$READLINE_LIBS -lncurses"],
AC_MSG_ERROR([Cannot find tgetent in termcap or ncurses libraries!])
)
)
AC_CHECK_HEADERS(termios.h unistd.h signal.h)
AC_CHECK_LIB(readline,readline,
[
AC_DEFINE(HAVE_LIBREADLINE, 1, true if we have libreadline)
READLINE_LIBS="$READLINE_LIBS -lreadline"
],
[
AC_MSG_ERROR([Cannot find readline!])
],[ $READLINE_LIBS ]
)
AC_SUBST(READLINE_LIBS)
AC_CONFIG_FILES([
libtprl.pc
Makefile
tprl/Makefile
test/Makefile
])
AC_OUTPUT