From: Nathan Scott Date: Wed, 9 Mar 2005 14:08:18 +0000 (+0000) Subject: Resolve build issue with using libtermcap/libreadline via configure option. X-Git-Tag: v2.7.0~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=541a1d4f64eff1353eb6a2e4440a2a8180d267d6;p=thirdparty%2Fxfsprogs-dev.git Resolve build issue with using libtermcap/libreadline via configure option. Merge of master-melb:xfs-cmds:21777a by kenmcd. --- diff --git a/configure.in b/configure.in index c3a2a4a2e..c39e5bdd1 100644 --- a/configure.in +++ b/configure.in @@ -13,18 +13,23 @@ AC_SUBST(enable_gettext) AC_ARG_ENABLE(readline, [ --enable-readline=[yes/no] Enable readline command editing [default=no]], - test $enable_readline = yes && libreadline="-lreadline -ltermcap", + test $enable_readline = yes && libreadline="-lreadline", enable_readline=no) AC_SUBST(libreadline) AC_SUBST(enable_readline) AC_ARG_ENABLE(editline, [ --enable-editline=[yes/no] Enable editline command editing [default=no]], - test $enable_editline = yes && libeditline="-ledit -ltermcap", + test $enable_editline = yes && libeditline="-ledit", enable_editline=no) AC_SUBST(libeditline) AC_SUBST(enable_editline) +AC_ARG_ENABLE(termcap, +[ --enable-termcap=[yes/no] Enable terminal capabilities library [default=no]], + test $enable_termcap = yes && libtermcap="-ltermcap",) +AC_SUBST(libtermcap) + AC_PACKAGE_GLOBALS(xfsprogs) AC_PACKAGE_UTILITIES(xfsprogs) diff --git a/db/Makefile b/db/Makefile index 1e5b815e4..698b5489a 100644 --- a/db/Makefile +++ b/db/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of version 2 of the GNU General Public License as @@ -48,12 +48,12 @@ LTDEPENDENCIES = $(LIBXFS) $(LIBXLOG) LLDFLAGS += -static ifeq ($(ENABLE_READLINE),yes) -LLDLIBS += $(LIBREADLINE) +LLDLIBS += $(LIBREADLINE) $(LIBTERMCAP) CFLAGS += -DENABLE_READLINE endif ifeq ($(ENABLE_EDITLINE),yes) -LLDLIBS += $(LIBEDITLINE) +LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP) CFLAGS += -DENABLE_EDITLINE endif diff --git a/include/builddefs.in b/include/builddefs.in index f850d5901..7db6438e6 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -41,6 +41,7 @@ MALLOCLIB = @malloc_lib@ LIBUUID = @libuuid@ LIBPTHREAD = @libpthread@ +LIBTERMCAP = @libtermcap@ LIBEDITLINE = @libeditline@ LIBREADLINE = @libreadline@ LIBXFS = $(TOPDIR)/libxfs/libxfs.la diff --git a/io/Makefile b/io/Makefile index 32782c14f..4b0838483 100644 --- a/io/Makefile +++ b/io/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of version 2 of the GNU General Public License as @@ -77,12 +77,12 @@ LSRCFILES += inject.c resblks.c shutdown.c endif ifeq ($(ENABLE_READLINE),yes) -LLDLIBS += $(LIBREADLINE) +LLDLIBS += $(LIBREADLINE) $(LIBTERMCAP) CFLAGS += -DENABLE_READLINE endif ifeq ($(ENABLE_EDITLINE),yes) -LLDLIBS += $(LIBEDITLINE) +LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP) CFLAGS += -DENABLE_EDITLINE endif