2 # SPDX-License-Identifier: GPL-2.0
7 if pkg-config --exists $PKG; then
8 echo cflags=\"$(pkg-config --cflags $PKG)\"
9 echo libs=\"$(pkg-config --libs $PKG)\"
13 if pkg-config --exists $PKG2; then
14 echo cflags=\"$(pkg-config --cflags $PKG2)\"
15 echo libs=\"$(pkg-config --libs $PKG2)\"
19 # Unfortunately, some distributions (e.g. openSUSE) cannot find ncurses
21 if [ -f /usr/include/ncursesw/ncurses.h ]; then
22 echo cflags=\"-D_GNU_SOURCE -I/usr/include/ncursesw\"
23 echo libs=\"-lncursesw\"
27 if [ -f /usr/include/ncurses/ncurses.h ]; then
28 echo cflags=\"-D_GNU_SOURCE -I/usr/include/ncurses\"
29 echo libs=\"-lncurses\"
33 if [ -f /usr/include/ncurses.h ]; then
34 echo cflags=\"-D_GNU_SOURCE\"
35 echo libs=\"-lncurses\"
40 echo >&2 "* Unable to find the ncurses package."
41 echo >&2 "* Install ncurses (ncurses-devel or libncurses-dev"
42 echo >&2 "* depending on your distribution)."