diff options
author | Fabrice Fontaine <fontaine.fabrice@gmail.com> | 2022-11-03 17:19:09 +0100 |
---|---|---|
committer | Alexander Amelkin <mocbuhtig@amelkin.msk.ru> | 2023-01-11 18:48:55 +0300 |
commit | 9dfdf1427002b3f44845941faf1e780553ece566 (patch) | |
tree | 24c04625048f71624e480dc9130a687a0d8608ab | |
parent | 707a2980f63ab47081538bec3f3d94082eb0b880 (diff) | |
download | ipmitool-9dfdf1427002b3f44845941faf1e780553ece566.tar.gz |
configure.ac: fix readline static build
Use pkg-config to retrieve readline dependencies such as ncurses to
avoid the following static build when readline is built with ncurses
support (which is raised since version 1.8.19 and
https://github.com/ipmitool/ipmitool/commit/63dd71c39c9bf522ad3a785dd001737a285458eb):
** Unable to build Solaris 9 x86 IPMI interface support!
checking for library containing readline... no
configure: error: ** Unable to find readline required by ipmishell.
[...]
configure:15125: /tmp/instance-0/output-1/host/bin/armeb-buildroot-linux-musleabi-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O0 -g0 -static -Wall -Wextra -std=gnu11 -pedantic -Wformat -Wformat-nonliteral -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static conftest.c -lreadline -lcrypto >&5
/tmp/instance-0/output-1/host/lib/gcc/armeb-buildroot-linux-musleabi/11.3.0/../../../../armeb-buildroot-linux-musleabi/bin/ld: /tmp/instance-0/output-1/host/armeb-buildroot-linux-musleabi/sysroot/usr/lib/libreadline.a(display.o): in function `_rl_move_cursor_relative':
display.c:(.text+0x80fc): undefined reference to `tputs'
Fixes:
- http://autobuild.buildroot.org/results/dabc6a4f49d464c129ac6bc3710011678142fcbe
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-rw-r--r-- | configure.ac | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index d6ba62b..4ee1be8 100644 --- a/configure.ac +++ b/configure.ac @@ -624,7 +624,11 @@ AC_ARG_ENABLE([ipmishell], dnl check for readline library to enable ipmi shell if test "x$xenable_ipmishell" = "xyes"; then - AC_SEARCH_LIBS([readline], [readline edit], [have_readline=yes]) + PKG_PROG_PKG_CONFIG + PKG_CHECK_MODULES([READLINE], [readline], + [LIBS="$LIBS $READLINE_LIBS" have_readline=yes], + [AC_SEARCH_LIBS([readline], [readline edit], [have_readline=yes])] + ) if test "x$have_readline" != "xyes"; then AC_MSG_ERROR([** Unable to find readline required by ipmishell.]) xenable_ipmishell=no |