mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
Use -ltinfo instead of -lncurses.
In tools except guestfish, we don't use ncurses, or even curses, just 2 termcap functions and a global variable. These are provided by libtinfo, so just link to that. In guestfish we use readline which needs ncurses. Leave that alone.
This commit is contained in:
@@ -172,7 +172,7 @@ OCAMLCLIBS = \
|
||||
-L../src/.libs -lutils \
|
||||
-L../gnulib/lib/.libs -lgnu \
|
||||
-pthread -lpthread \
|
||||
-lncurses -lcrypt
|
||||
-ltinfo -lcrypt
|
||||
|
||||
if HAVE_OCAMLOPT
|
||||
virt-builder: $(OBJECTS)
|
||||
|
||||
12
configure.ac
12
configure.ac
@@ -355,14 +355,14 @@ struct sockaddr_un myaddr;
|
||||
dnl tgetent, tputs and UP [sic] are all required. They come from libtinfo
|
||||
dnl which is pulled in as a dependency of libncurses.
|
||||
old_LIBS="$LIBS"
|
||||
AC_CHECK_LIB([ncurses], [tgetent], [], [
|
||||
AC_MSG_ERROR(['ncurses' library not found, or it doesn't contain 'tgetent'])
|
||||
AC_CHECK_LIB([tinfo], [tgetent], [], [
|
||||
AC_MSG_ERROR(['libtinfo' library (usually part of ncurses) not found, or it doesn't contain 'tgetent'])
|
||||
])
|
||||
AC_CHECK_LIB([ncurses], [tputs], [], [
|
||||
AC_MSG_ERROR(['ncurses' library not found, or it doesn't contain 'tputs'])
|
||||
AC_CHECK_LIB([tinfo], [tputs], [], [
|
||||
AC_MSG_ERROR(['libtinfo' library (usually part of ncurses) not found, or it doesn't contain 'tputs'])
|
||||
])
|
||||
AC_CHECK_LIB([ncurses], [UP], [], [
|
||||
AC_MSG_ERROR(['ncurses' library not found, or it doesn't contain 'UP'])
|
||||
AC_CHECK_LIB([tinfo], [UP], [], [
|
||||
AC_MSG_ERROR(['libtinfo' library (usually part of ncurses) not found, or it doesn't contain 'UP'])
|
||||
])
|
||||
LIBS="$old_LIBS"
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
|
||||
OCAMLOPTFLAGS = $(OCAMLCFLAGS)
|
||||
|
||||
OCAMLCLIBS = \
|
||||
$(LIBXML2_LIBS) $(LIBINTL) -lncurses -lcrypt \
|
||||
$(LIBXML2_LIBS) $(LIBINTL) -ltinfo -lcrypt \
|
||||
-L../src/.libs -lutils \
|
||||
-L../gnulib/lib/.libs -lgnu
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
|
||||
OCAMLOPTFLAGS = $(OCAMLCFLAGS)
|
||||
|
||||
OCAMLCLIBS = \
|
||||
$(LIBXML2_LIBS) $(LIBINTL) -lncurses -lcrypt \
|
||||
$(LIBXML2_LIBS) $(LIBINTL) -ltinfo -lcrypt \
|
||||
-L../src/.libs -lutils \
|
||||
-L../gnulib/lib/.libs -lgnu
|
||||
|
||||
@@ -154,11 +154,11 @@ check_SCRIPTS = common_utils_tests
|
||||
if HAVE_OCAMLOPT
|
||||
common_utils_tests: common_gettext.cmx tty-c.o tTY.cmx common_utils.cmx common_utils_tests.cmx
|
||||
$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
|
||||
mlguestfs.cmxa -linkpkg $^ -cclib -lncurses -o $@
|
||||
mlguestfs.cmxa -linkpkg $^ -cclib -ltinfo -o $@
|
||||
else
|
||||
common_utils_tests: common_gettext.cmo tty-c.o tTY.cmo common_utils.cmo common_utils_tests.cmo
|
||||
$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) \
|
||||
mlguestfs.cma -linkpkg $^ -cclib -lncurses -custom -o $@
|
||||
mlguestfs.cma -linkpkg $^ -cclib -ltinfo -custom -o $@
|
||||
endif
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
@@ -71,7 +71,7 @@ OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
|
||||
OCAMLOPTFLAGS = $(OCAMLCFLAGS)
|
||||
|
||||
OCAMLCLIBS = \
|
||||
$(LIBXML2_LIBS) $(LIBINTL) -lncurses \
|
||||
$(LIBXML2_LIBS) $(LIBINTL) -ltinfo \
|
||||
-L../src/.libs -lutils \
|
||||
-L../gnulib/lib/.libs -lgnu
|
||||
|
||||
|
||||
@@ -19,4 +19,4 @@
|
||||
# Hack automake to link binary properly. There is no other way to add
|
||||
# the -cclib parameter to the end of the command line.
|
||||
|
||||
exec "$@" -linkpkg -cclib '-lncurses'
|
||||
exec "$@" -linkpkg -cclib '-ltinfo'
|
||||
|
||||
@@ -136,7 +136,7 @@ OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
|
||||
OCAMLOPTFLAGS = $(OCAMLCFLAGS)
|
||||
|
||||
OCAMLCLIBS = \
|
||||
$(LIBXML2_LIBS) $(LIBINTL) -lncurses -lcrypt \
|
||||
$(LIBXML2_LIBS) $(LIBINTL) -ltinfo -lcrypt \
|
||||
-L../src/.libs -lutils \
|
||||
-L../gnulib/lib/.libs -lgnu
|
||||
|
||||
|
||||
@@ -19,4 +19,4 @@
|
||||
# Hack automake to link binary properly. There is no other way to add
|
||||
# the -cclib parameter to the end of the command line.
|
||||
|
||||
exec "$@" -linkpkg -cclib '-lutils -lncurses -lcrypt @LIBVIRT_LIBS@ @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
|
||||
exec "$@" -linkpkg -cclib '-lutils -ltinfo -lcrypt @LIBVIRT_LIBS@ @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
|
||||
|
||||
Reference in New Issue
Block a user