Lines 47-85
then
Link Here
|
47 |
fi |
47 |
fi |
48 |
|
48 |
|
49 |
# PKG_CHECK_MODULES macro is NOT used to avoid confusing syntax errors in case that pkg-config is NOT installed |
49 |
# PKG_CHECK_MODULES macro is NOT used to avoid confusing syntax errors in case that pkg-config is NOT installed |
50 |
AC_CHECK_LIB(ncursesw, killwchar, [], |
50 |
AC_SUBST([NCURSESW_CFLAGS]) |
51 |
[ |
51 |
AC_SUBST([NCURSESW_LIBS]) |
52 |
AC_CHECK_LIB(ncurses, killwchar, [], |
52 |
if pkg-config --exists ncursesw |
53 |
[ |
53 |
then |
54 |
AC_SUBST([NCURSESW_CFLAGS]) |
54 |
AC_MSG_NOTICE([Module ncursesw found]) |
55 |
AC_SUBST([NCURSESW_LIBS]) |
55 |
NCURSESW_CFLAGS=`pkg-config --cflags ncursesw` |
56 |
if pkg-config --exists ncursesw |
56 |
NCURSESW_LIBS=`pkg-config --libs ncursesw` |
57 |
then |
57 |
else |
58 |
AC_MSG_NOTICE([Module ncursesw found]) |
58 |
if pkg-config --exists ncurses |
59 |
NCURSESW_CFLAGS=`pkg-config --cflags ncursesw` |
59 |
then |
60 |
NCURSESW_LIBS=`pkg-config --libs ncursesw` |
60 |
AC_MSG_NOTICE([Module ncurses found]) |
61 |
else |
61 |
NCURSESW_CFLAGS=`pkg-config --cflags ncursesw` |
62 |
if pkg-config --exists ncurses |
62 |
NCURSESW_LIBS=`pkg-config --libs ncurses` |
63 |
then |
63 |
else |
64 |
AC_MSG_NOTICE([Module ncurses found]) |
64 |
AS_CASE([$host_os], |
65 |
NCURSESW_CFLAGS=`pkg-config --cflags ncursesw` |
65 |
[darwin*], |
66 |
NCURSESW_LIBS=`pkg-config --libs ncurses` |
66 |
[ |
67 |
else |
67 |
AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])]) |
68 |
AS_CASE([$host_os], |
68 |
AC_CHECK_HEADER(curses.h) |
69 |
[darwin*], |
69 |
], |
70 |
[ |
70 |
[ |
71 |
AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])]) |
71 |
AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])]) |
72 |
AC_CHECK_HEADER(curses.h) |
72 |
AC_CHECK_HEADER(ncursesw/curses.h) |
73 |
], |
73 |
] |
74 |
[ |
74 |
) |
75 |
AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])]) |
75 |
fi |
76 |
AC_CHECK_HEADER(ncursesw/curses.h) |
76 |
fi |
77 |
] |
|
|
78 |
) |
79 |
fi |
80 |
fi |
81 |
]) # FAIL of ncurses |
82 |
]) # FAIL of ncursesw |
83 |
|
77 |
|
84 |
|
78 |
|
85 |
# Checks for libraries. |
79 |
# Checks for libraries. |