File configure.ac changed (mode: 100644) (index bbd33e3..2317a3e) |
... |
... |
AM_INIT_AUTOMAKE |
29 |
29 |
# Checks for programs. |
# Checks for programs. |
30 |
30 |
AC_PROG_CC |
AC_PROG_CC |
31 |
31 |
|
|
32 |
|
# NCURSES check w/o PKG_CHECK_MODULES macro |
|
|
32 |
|
# NCURSES check w/o PKG_CHECK_MODULES macro: CHECK_LIB > MODULES > CHECK_LIB |
33 |
33 |
# Determine OS |
# Determine OS |
34 |
34 |
AC_CANONICAL_HOST |
AC_CANONICAL_HOST |
35 |
35 |
# Notify user that pkg-tools are required |
# Notify user that pkg-tools are required |
|
... |
... |
AC_MSG_NOTICE([================================================================= |
37 |
37 |
AC_MSG_NOTICE([IMPORTANT: Make sure you have pkg-config installed - it's needed to run this script]) |
AC_MSG_NOTICE([IMPORTANT: Make sure you have pkg-config installed - it's needed to run this script]) |
38 |
38 |
AC_MSG_NOTICE([===================================================================================]) |
AC_MSG_NOTICE([===================================================================================]) |
39 |
39 |
# PKG_CHECK_MODULES macro is NOT used to avoid confusing syntax errors in case that pkg-config is NOT installed |
# PKG_CHECK_MODULES macro is NOT used to avoid confusing syntax errors in case that pkg-config is NOT installed |
40 |
|
AC_SUBST([NCURSESW_CFLAGS]) |
|
41 |
|
AC_SUBST([NCURSESW_LIBS]) |
|
42 |
|
if pkg-config --exists ncursesw |
|
43 |
|
then |
|
44 |
|
AC_MSG_NOTICE([Module ncursesw found]) |
|
45 |
|
NCURSESW_CFLAGS=`pkg-config --cflags ncursesw` |
|
46 |
|
NCURSESW_LIBS=`pkg-config --libs ncursesw` |
|
47 |
|
else |
|
48 |
|
if pkg-config --exists ncurses |
|
49 |
|
then |
|
50 |
|
AC_MSG_NOTICE([Module ncurses found]) |
|
51 |
|
NCURSESW_CFLAGS=`pkg-config --cflags ncursesw` |
|
52 |
|
NCURSESW_LIBS=`pkg-config --libs ncurses` |
|
53 |
|
else |
|
54 |
|
AS_CASE([$host_os], |
|
55 |
|
[darwin*], |
|
56 |
|
[ |
|
57 |
|
AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])]) |
|
58 |
|
AC_CHECK_HEADER(curses.h) |
|
59 |
|
], |
|
60 |
|
[ |
|
61 |
|
AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])]) |
|
62 |
|
AC_CHECK_HEADER(ncursesw/curses.h) |
|
63 |
|
] |
|
64 |
|
) |
|
65 |
|
fi |
|
66 |
|
fi |
|
|
40 |
|
AC_CHECK_LIB(ncursesw, killwchar, [], |
|
41 |
|
[ |
|
42 |
|
AC_CHECK_LIB(ncurses, killwchar, [], |
|
43 |
|
[ |
|
44 |
|
AC_SUBST([NCURSESW_CFLAGS]) |
|
45 |
|
AC_SUBST([NCURSESW_LIBS]) |
|
46 |
|
if pkg-config --exists ncursesw |
|
47 |
|
then |
|
48 |
|
AC_MSG_NOTICE([Module ncursesw found]) |
|
49 |
|
NCURSESW_CFLAGS=`pkg-config --cflags ncursesw` |
|
50 |
|
NCURSESW_LIBS=`pkg-config --libs ncursesw` |
|
51 |
|
else |
|
52 |
|
if pkg-config --exists ncurses |
|
53 |
|
then |
|
54 |
|
AC_MSG_NOTICE([Module ncurses found]) |
|
55 |
|
NCURSESW_CFLAGS=`pkg-config --cflags ncursesw` |
|
56 |
|
NCURSESW_LIBS=`pkg-config --libs ncurses` |
|
57 |
|
else |
|
58 |
|
AS_CASE([$host_os], |
|
59 |
|
[darwin*], |
|
60 |
|
[ |
|
61 |
|
AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])]) |
|
62 |
|
AC_CHECK_HEADER(curses.h) |
|
63 |
|
], |
|
64 |
|
[ |
|
65 |
|
AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])]) |
|
66 |
|
AC_CHECK_HEADER(ncursesw/curses.h) |
|
67 |
|
] |
|
68 |
|
) |
|
69 |
|
fi |
|
70 |
|
fi |
|
71 |
|
]) # FAIL of ncurses |
|
72 |
|
]) # FAIL of ncursesw |
|
73 |
|
|
67 |
74 |
|
|
68 |
75 |
# Checks for libraries. |
# Checks for libraries. |
69 |
76 |
AC_CHECK_LIB(m, cos, [], [AC_MSG_ERROR([Could not find m library])]) |
AC_CHECK_LIB(m, cos, [], [AC_MSG_ERROR([Could not find m library])]) |
70 |
77 |
AC_CHECK_LIB(readline, using_history, [], [AC_MSG_ERROR([Could not find readline library])]) |
AC_CHECK_LIB(readline, using_history, [], [AC_MSG_ERROR([Could not find readline library])]) |
|
78 |
|
# ncurses might be linked in libtinfo |
|
79 |
|
#AC_CHECK_LIB(tinfo, keypad, [], [AC_MSG_ERROR([Could not find tinfo library])]) |
71 |
80 |
|
|
72 |
81 |
# Checks for header files. |
# Checks for header files. |
73 |
82 |
AC_CHECK_HEADER(assert.h) |
AC_CHECK_HEADER(assert.h) |