-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.ac
89 lines (77 loc) · 1.84 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
dnl Process this file with `autoconf' to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([tvision],
[0.8.0],
[https://github.com/kloczek/tvision/issues],
[],
[https://github.com/kloczek/tvision])
AM_INIT_AUTOMAKE([
--warnings=all --warnings=error
dist-xz
no-dist-gzip
foreign
])
AM_MAINTAINER_MODE([disable])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_MACRO_DIR([m4])
dnl Check for system.
AC_CANONICAL_HOST
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AM_PROG_AR
AC_LANG([C++])
AC_ENABLE_SHARED([])
AC_DISABLE_STATIC([])
LT_INIT
dnl Checks for header files.
AC_CHECK_INCLUDES_DEFAULT
AC_CHECK_HEADERS(ncurses.h curses.h gpm.h)
dnl Checks for libraries.
AC_SEARCH_LIBS(initscr, [ncursesw ncurses curses],
[AC_SUBST([SCREEN_LIB], ["-l${ac_lib}"])],
[AC_MSG_ERROR(You need to install the ncurses or curses library)]
)
LIBS=""
dnl Checks for library functions.
AC_CHECK_LIB(gpm, Gpm_Close)
AC_MSG_CHECKING(if the alternate character set should be disabled)
AC_ARG_ENABLE(acs,
[ --disable-acs disable alternate character set],
[AC_MSG_RESULT(yes)
AC_DEFINE(DISABLE_ACS, 1, [alterate character set])
],
[AC_MSG_RESULT(no)]
)
case $host_os in
linux*)
AC_MSG_CHECKING(if the Linux GPM mouse support should be disabled)
AC_ARG_ENABLE(linux-gpm,
[ --disable-linux-gpm disable Linux GPM mouse support],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_DEFINE(ENABLE_GPM, 1, [Linux GPM mouse support])]
)
AC_MSG_CHECKING(if the FreeBSD mouse support should be disabled)
AC_ARG_ENABLE(freebsd-mouse,
[ --disable-freebsd-mouse disable FreeBSD mouse support],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_DEFINE(ENABLE_FBSDM, 1, [the FreeBSD mouse support])
]
)
;;
esac
AC_CONFIG_FILES([
Makefile
tvision/Makefile
tvhc/Makefile
demo/Makefile
tutorial/Makefile
doc/Doxyfile
doc/Makefile
tvision.pc
tvision.spec
])
AC_OUTPUT