Files
meta-openembedded/meta-oe/recipes-extended/dialog/files/use-pkg-config-for-ncurses-detection.patch
Roy Li 01816e4420 dialog: fix the redirection of the error information
Drop the error information, other than redirect them to stdout, otherwise
the error information will be included into LIBS/CFLAG

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2014-09-26 05:41:54 +02:00

41 lines
1.2 KiB
Diff

Subject: [PATCH] use pkg-config for ncurses detection.
Upstream-Status: Inappropriate [configuration]
This is a workaround to make dialog be able to build after ncurses-config
does not work, since the configure file is called directly in dialog bb
file, and autoconf can not work, make a workaround in configure file.
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
configure | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 24e28c1..c78735d 100755
--- a/configure
+++ b/configure
@@ -9976,8 +9976,8 @@ fi
if test "$NCURSES_CONFIG" != none ; then
-CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
-LIBS="`$NCURSES_CONFIG --libs` $LIBS"
+CPPFLAGS="$CPPFLAGS `pkg-config --short-errors --print-errors --cflags "ncurses" 2>/dev/null`"
+LIBS="`pkg-config --short-errors --print-errors --libs "ncurses" 2>/dev/null` $LIBS"
# even with config script, some packages use no-override for curses.h
@@ -10096,7 +10096,7 @@ cat >>confdefs.h <<EOF
#define $cf_nculib_ROOT 1
EOF
-cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
+cf_cv_ncurses_version=`pkg-config --short-errors --print-errors --modversion "ncurses"`
else
--
1.7.10.4