forked from meskio/tudu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.acr
79 lines (67 loc) · 1.82 KB
/
configure.acr
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
REQUIRE_ACR_VERSION 0.8.2
PKGNAME tudu
VERSION 0.10.4
CONTACT Ruben Pollan ; [email protected]
YEAR = 2020 ;
LANG_CXX!
CXXFLAGS += -Wall -O2 ;
CPPFLAGS += "" ;
SRCS += tudu.cc data.cc editor.cc interface.cc window.cc text.cc parser.cc
config.cc date.cc screen.cc scheduler.cc cmd.cc ;
// Detecting curses
CHKINC xcurses.h
CHKINC ncursesw/curses.h
CHKINC ncurses/curses.h
CHKINC ncurses.h
CHKINC curses.h
IF HAVE_XCURSES_H { CURSES_INCLUDE = xcurses.h ; }
IF HAVE_NCURSESW_CURSES_H { CURSES_INCLUDE ?= ncursesw/curses.h ; }
IF HAVE_NCURSES_CURSES_H { CURSES_INCLUDE ?= ncurses/curses.h ; }
IF HAVE_NCURSES_H { CURSES_INCLUDE ?= ncurses.h ; }
IF HAVE_CURSES_H { CURSES_INCLUDE ?= curses.h ; }
IFNULL CURSES_INCLUDE { DIENOW There is no curses installed! ; }
CHKLIB ncursesw
CHKLIB ncurses
CHKLIB curses
IF HAVE_LIB_NCURSESW { LD_CURSES = -lncursesw ; }
IF HAVE_LIB_NCURSES { LD_CURSES ?= -lncurses ; }
IF HAVE_LIB_CURSES { LD_CURSES ?= -lcurses ; }
IFNULL LD_CURSES { DIENOW There is no curses installed! ; }
LDFLAGS += $LD_CURSES ;
CHECK WIDEC_CURSES <<EOF
echo "#define _XOPEN_SOURCE_EXTENDED" > test.c \
echo "#include<$CURSES_INCLUDE>" >> test.c \
echo "int main(){ addwstr(L\"\"); }" >> test.c \
eval \$${COMPILER} ${CXXFLAGS} test.c ${LDFLAGS} >/dev/null 2>&1 \
WIDEC_CURSES=$? \
rm test.c
<<EOF
IFNOT WIDEC_CURSES { DIENOW There is no wide character support on curses! ; }
// Test all the includes
CHKINC! string
CHKINC! vector
CHKINC! map
CHKINC! fstream
CHKINC! list
CHKINC! stack
CHKINC! algorithm
CHKINC! set
CHKINC! ctime
CHKINC! cstring
CHKINC! csignal
CHKINC! cstdio
CHKINC! cstdlib
CHKINC! sys/types.h
CHKINC! sys/wait.h
CHKINC! sys/stat.h
CHKINC! unistd.h
CHKINC! fcntl.h
CHKINC! locale
CHKINC! cwchar
CHKINC! clocale
CHKINC! climits
CHKINC! iostream
CHKINC! iomanip
CHKINC! sstream
CHKINC! cerrno
SUBDIRS . src data src/defs.h ;