All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 08/27] libcacard: require libtool to build it
Date: Sat, 12 Jan 2013 18:35:19 +0100	[thread overview]
Message-ID: <1358012138-21613-9-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1358012138-21613-1-git-send-email-pbonzini@redhat.com>

Do not fail at build time, instead just disable the library if libtool
is not present.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Makefile           | 2 ++
 configure          | 3 ++-
 libcacard/Makefile | 8 --------
 rules.mak          | 6 +-----
 4 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile
index 3c960a1..f035a61 100644
--- a/Makefile
+++ b/Makefile
@@ -160,12 +160,14 @@ libqemustub.a: $(stub-obj-y)
 ######################################################################
 # Support building shared library libcacard
 
+ifeq ($(CONFIG_SMARTCARD_NSS),y)
 .PHONY: libcacard.la install-libcacard
 libcacard.la: $(oslib-obj-y) qemu-timer-common.o $(trace-obj-y)
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" libcacard.la,)
 
 install-libcacard: libcacard.la
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" install-libcacard,)
+endif
 
 ######################################################################
 
diff --git a/configure b/configure
index 35762f5..39358ad 100755
--- a/configure
+++ b/configure
@@ -2824,7 +2824,8 @@ EOF
     if test "$werror" = "yes"; then
         test_cflags="-Werror $test_cflags"
     fi
-    if $pkg_config --atleast-version=3.12.8 nss >/dev/null 2>&1 && \
+    if test -n "$libtool" &&
+            $pkg_config --atleast-version=3.12.8 nss >/dev/null 2>&1 && \
       compile_prog "$test_cflags" "$libcacard_libs"; then
         smartcard_nss="yes"
         QEMU_CFLAGS="$QEMU_CFLAGS $libcacard_cflags"
diff --git a/libcacard/Makefile b/libcacard/Makefile
index 08a47e0..a526eae 100644
--- a/libcacard/Makefile
+++ b/libcacard/Makefile
@@ -31,13 +31,6 @@ all: libcacard.la libcacard.pc
 #########################################################################
 # Rules for building libcacard standalone library
 
-ifeq ($(LIBTOOL),)
-libcacard.la:
-	@echo "libtool is missing, please install and rerun configure"; exit 1
-
-install-libcacard:
-	@echo "libtool is missing, please install and rerun configure"; exit 1
-else
 libcacard.la: $(libcacard.lib-y) $(QEMU_OBJS_LIB)
 	$(call quiet-command,$(LIBTOOL) --mode=link --tag=CC $(CC) -rpath $(libdir) -o $@ $^ $(libcacard_libs),"  lt LINK $@")
 
@@ -63,4 +56,3 @@ install-libcacard: libcacard.pc libcacard.la vscclient
 	for inc in *.h; do \
 		$(INSTALL_DATA) $(libcacard_srcpath)/$$inc "$(DESTDIR)$(libcacard_includedir)"; \
 	done
-endif
diff --git a/rules.mak b/rules.mak
index 5865e9b..4297345 100644
--- a/rules.mak
+++ b/rules.mak
@@ -21,11 +21,7 @@ QEMU_CFLAGS += -I$(<D) -I$(@D)
 	$(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  CC    $(TARGET_DIR)$@")
 
 ifeq ($(LIBTOOL),)
-%.lo: %.c
-	@echo "missing libtool. please install and rerun configure"; exit 1
-%.lo: %.dtrace
-	@echo "missing libtool. please install and rerun configure."; exit 1
-
+LIBTOOL = /bin/false
 LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
        $(sort $(filter %.o, $1)) $(filter-out %.o, $1) \
        $(LIBS),"  LINK  $(TARGET_DIR)$@")
-- 
1.8.1

  parent reply	other threads:[~2013-01-12 17:36 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12 17:35 [Qemu-devel] [PULL 00/27] More source reorganization and build system TLC Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 01/27] qemu-option: move standard option definitions out of qemu-config.c Paolo Bonzini
2013-01-14  9:26   ` Stefan Hajnoczi
2013-01-14  9:49     ` Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 02/27] stubs: fully replace qemu-tool.c and qemu-user.c Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 03/27] build: make libtool verbose when making with V=1 Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 04/27] build: support linking with libtool objects/libraries Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 05/27] build: move dtrace rules to rules.mak Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 06/27] build: remove CONFIG_SMARTCARD Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 07/27] libcacard: fix missing symbol in libcacard.so Paolo Bonzini
2013-01-12 17:35 ` Paolo Bonzini [this message]
2013-01-12 17:35 ` [Qemu-devel] [PATCH 09/27] libcacard: prepare to use -y trick in the Makefile Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 10/27] libcacard: use per-target variable definitions Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 11/27] libcacard: add list of exported symbols Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 12/27] libcacard: rewrite Makefile in non-recursive style Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 13/27] libcacard: link vscclient to dynamic library Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 14/27] libcacard: list oslib-obj-y file explicitly Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 15/27] build: rename oslib-obj-y to util-obj-y Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 16/27] build: move util-obj-y to libqemuutil.a Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 17/27] build: move files away from tools-obj-y, common-obj-y, user-obj-y Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 18/27] build: move libqemuutil.a components to util/ Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 19/27] build: move qobject files to qobject/ and libqemuutil.a Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 20/27] build: consolidate multiple variables into universal-obj-y Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 21/27] build: move QAPI definitions for QEMU out of qapi-obj-y Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 22/27] build: move base QAPI files to libqemuutil.a Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 23/27] build: move version-obj-y to the generic LINK rule Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 24/27] build: remove coroutine-obj-y Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 25/27] build: some simplifications for "trace/Makefile.objs" Paolo Bonzini
2013-01-14 15:19   ` Lluís Vilanova
2013-01-14 15:30     ` Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 26/27] build: fold trace-obj-y into libqemuutil.a Paolo Bonzini
2013-01-12 17:35 ` [Qemu-devel] [PATCH 27/27] build: improve quiet output for .stp rules Paolo Bonzini
2013-01-14  9:33 ` [Qemu-devel] [PULL 00/27] More source reorganization and build system TLC Stefan Hajnoczi
2013-01-18 18:03 ` Andreas Färber
2013-01-19 10:17   ` Paolo Bonzini
2013-01-19 10:21     ` Blue Swirl
2013-01-19 10:43       ` Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2012-12-21 16:05 [Qemu-devel] [PATCH " Paolo Bonzini
2012-12-21 16:05 ` [Qemu-devel] [PATCH 08/27] libcacard: require libtool to build it Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358012138-21613-9-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.