summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorKarel Zak2017-05-31 10:52:44 +0200
committerKarel Zak2017-05-31 10:54:21 +0200
commit4c12a334dc4104d16dc06edf51904b08b08fcdfa (patch)
treeb4b174446961e61f9434a0145b29ce08cd9e4612 /m4
parentbuild-sys: require kernel headers on Linux (diff)
downloadkernel-qcow2-util-linux-4c12a334dc4104d16dc06edf51904b08b08fcdfa.tar.gz
kernel-qcow2-util-linux-4c12a334dc4104d16dc06edf51904b08b08fcdfa.tar.xz
kernel-qcow2-util-linux-4c12a334dc4104d16dc06edf51904b08b08fcdfa.zip
build-sys: prefer ncurses-config rather than pkg-config
If you have installed: ii libncurses5:i386 5.9+20140913-1+b1 i386 shared libraries for terminal handling ii libncurses5-dev:i386 5.9+20140913-1+b1 i386 developer's libraries for ncurses ii libncursesw5:i386 5.9+20140913-1+b1 i386 shared libraries for terminal handling (wide character support) then pkg-config blindly follows ncursesw although there are not header files for this library. It seems better to use pkg-config as fallback solution only. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'm4')
-rw-r--r--m4/ul.m424
1 files changed, 12 insertions, 12 deletions
diff --git a/m4/ul.m4 b/m4/ul.m4
index db04c1269..cfd2e68fc 100644
--- a/m4/ul.m4
+++ b/m4/ul.m4
@@ -455,14 +455,6 @@ AC_DEFUN([UL_NCURSES_CHECK], [
m4_define([suffix], $1)
m4_define([SUFFIX], m4_toupper($1))
- # pkg-config (not supported by ncurses upstream by default)
- #
- PKG_CHECK_MODULES(SUFFIX, [$1], [
- have_[]suffix=yes
- NCURSES_LIBS=${SUFFIX[]_LIBS}
- NCURSES_CFLAGS=${SUFFIX[]_CFLAGS}
- ],[have_[]suffix=no])
-
# ncurses6-config
#
AS_IF([test "x$have_[]suffix" = xno], [
@@ -489,12 +481,20 @@ AC_DEFUN([UL_NCURSES_CHECK], [
fi
])
+ # pkg-config (not supported by ncurses upstream by default)
+ #
+ AS_IF([test "x$have_[]suffix" = xno], [
+ PKG_CHECK_MODULES(SUFFIX, [$1], [
+ have_[]suffix=yes
+ NCURSES_LIBS=${SUFFIX[]_LIBS}
+ NCURSES_CFLAGS=${SUFFIX[]_CFLAGS}
+ ],[have_[]suffix=no])
+ ])
+
# classic autoconf way
#
AS_IF([test "x$have_[]suffix" = xno], [
- AS_IF([test "x$have_[]suffix" = xno], [
- AC_CHECK_LIB([$1], [initscr], [have_[]suffix=yes], [have_[]suffix=no])
- AS_IF([test "x$have_[]suffix" = xyes], [NCURSES_LIBS="-l[]suffix"])
- ])
+ AC_CHECK_LIB([$1], [initscr], [have_[]suffix=yes], [have_[]suffix=no])
+ AS_IF([test "x$have_[]suffix" = xyes], [NCURSES_LIBS="-l[]suffix"])
])
])