From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65343 invoked by alias); 31 Jan 2019 22:51:42 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 65328 invoked by uid 89); 31 Jan 2019 22:51:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy=our X-Spam-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 31 Jan 2019 22:51:40 +0000 Received: from librem.wildebeest.org (deer0x15.wildebeest.org [172.31.17.151]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 9C996302BBFE; Thu, 31 Jan 2019 23:51:38 +0100 (CET) Received: by librem.wildebeest.org (Postfix, from userid 1000) id 7126F13FEF3; Thu, 31 Jan 2019 23:51:38 +0100 (CET) Date: Thu, 31 Jan 2019 22:51:00 -0000 From: Mark Wielaard To: Ulf Hermann Cc: "elfutils-devel@sourceware.org" Subject: Re: [PATCH] configure: Add new --enable-install-elfh option. Message-ID: <20190131225138.GS9378@wildebeest.org> References: <1547817925-24532-1-git-send-email-mark@klomp.org> <80f7f62b-56c6-3dbe-2b96-39f11849ef85@qt.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Flag: NO X-IsSubscribed: yes X-SW-Source: 2019-q1/txt/msg00113.txt.bz2 On Wed, Jan 30, 2019 at 09:54:53AM +0000, Ulf Hermann wrote: > > Yes, it should indeed. > > I used a slightly different solution though. > > It relies on the default include flags already including the srcdirs. > > Does that work for your use case too? (See revised patch attached.) > > I'm not an expert in autotools. The reason I also have "else" case in my > code is that I want to do "+=" in the USE_GNULIB case below. That only > works if system_elf_libelf_test_CPPFLAGS is defined, which curiously it > is not if you don't explicitly set it before (even though it is > implicitly there somehow ... ?!?). > > In particular I get the following error from autoconf if I naively merge > your patch: > > > Ulf@Ulf-PC MINGW64 /d/elfutils$ autoreconf -fi > > tests/Makefile.am:617: error: cannot apply '+=' because 'system_elf_libelf_test_CPPFLAGS' is not defined in > > tests/Makefile.am:617: the following conditions: > > tests/Makefile.am:617: INSTALL_ELFH and USE_GNULIB > > tests/Makefile.am:617: either define 'system_elf_libelf_test_CPPFLAGS' in these conditions, or use > > tests/Makefile.am:617: '+=' in the same conditions as the definitions. > > autoreconf: automake failed with exit status: 1 > > As this only applies to my code, you are of course free to apply your > version upstream. It probably makes no difference if the USE_GNULIB case > isn't there. I will adapt my code then. That makes sense. I added the else to explicitly set it: diff --git a/tests/Makefile.am b/tests/Makefile.am index 4c4af7843..1b0c7d333 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -598,6 +598,8 @@ addsections_LDADD = $(libelf) # Don't include any -I CPPFLAGS. Except when we install our own elf.h. if !INSTALL_ELFH system_elf_libelf_test_CPPFLAGS = +else +system_elf_libelf_test_CPPFLAGS = -I$(top_srcdir)/libelf endif system_elf_libelf_test_LDADD = $(libelf) Pushed with that change. Thanks, Mark