-
Notifications
You must be signed in to change notification settings - Fork 21
/
configure.ac
72 lines (59 loc) · 1.98 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
# use autoreconf to generate configure script and cbits/config.h
# sanity
AC_INIT(UI/HSCurses/Curses.hsc)
# Prepare to generate the config.h.in file
AC_CONFIG_HEADERS([cbits/config.h])
# this is arbitrary
AC_PREREQ([2.52])
AC_ARG_WITH(compiler,
[AC_HELP_STRING([--with-hc=ARG],
[ignored])],
true, true)
#
# Curses. If you don't have wchar_t-aware ncurses (Debian package:
# libncursesw5-dev), uncomment the first line and comment-out the
# two later.
#
# The shell variables should be added to, e.g., $LIBS
#
AC_CHECK_LIB(curses, addnstr)
AC_CHECK_LIB(ncurses, addnstr)
AC_CHECK_LIB(ncursesw, waddnwstr)
AC_CHECK_LIB(pdcurses, addnstr)
AC_CHECK_LIB(pdcursesw, waddnwstr)
AC_CHECK_LIB(iconv, iconv)
AC_CHECK_LIB(iconv, libiconv)
# Bit weird. On OpenBSD you need the 'lib' suffix to iconv functions, it seems
AC_CHECK_FUNCS(libiconv, AC_DEFINE( [ICONV_LIB_PREFIX],[1],
[Define to 1 if you need a 'lib' prefix to iconv functions]))
# On linux we need to call doupdate() after endwin() to restore the term
if uname -s | grep Linux > /dev/null 2>&1 ; then
AC_DEFINE( [NCURSES_UPDATE_AFTER_END],[1],
[Define to 1 if you need to call doupdate after endwin])
fi
# some special libs need to be set for package.conf files
if echo "$LIBS" | grep iconv > /dev/null 2>&1 ; then
ICONV=iconv
fi
if (echo "$LIBS" | grep ncursesw) >/dev/null 2>&1 ; then
CURSES=ncursesw
elif (echo "$LIBS" | grep ncurses) >/dev/null 2>&1 ; then
CURSES=ncurses
elif (echo "$LIBS" | grep pdcursesw) >/dev/null 2>&1 ; then
CURSES=pdcursesw
elif (echo "$LIBS" | grep pdcurses) >/dev/null 2>&1 ; then
CURSES=pdcurses
else
CURSES=curses
fi
AC_SUBST(ICONV)
AC_SUBST(CURSES)
#
# Specific headers to check for
#
AC_CHECK_HEADERS([iconv.h curses.h ncurses.h ncursesw/ncurses.h locale.h langinfo.h wchar.h limits.h signal.h ])
AC_SUBST(SYMS)
current_directory=`pwd`
AC_SUBST(current_directory)
AC_CONFIG_FILES([hscurses.buildinfo])
AC_OUTPUT