From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id E08146DE024C for ; Tue, 29 May 2018 20:05:03 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=5 tests=[AWL=0.010, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0bnQK118jMDC for ; Tue, 29 May 2018 20:05:02 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id CA47C6DE022C for ; Tue, 29 May 2018 20:05:02 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1fNrQ3-00020v-6r; Tue, 29 May 2018 23:04:59 -0400 Received: (nullmailer pid 18912 invoked by uid 1000); Wed, 30 May 2018 03:04:53 -0000 From: David Bremner To: Tomi Ollila , David Bremner , notmuch@notmuchmail.org Subject: [PATCH] configure: check for links to/from libdir in ldconfig output Date: Tue, 29 May 2018 20:04:14 -0700 Message-Id: <20180530030414.18785-1-david@tethera.net> X-Mailer: git-send-email 2.17.0 In-Reply-To: References: X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2018 03:05:04 -0000 If e.g. /lib is a link to /usr/lib, then the latter may not show up in the way we expect in the output of ldconfig. 'test foo -ef bar' checks if foo and bar have the same device and inode numbers. Since (at least in bash, ksh, and zsh) the shell dereferences symlinks before applying the test, this includes both the case where file1 is equal to file2 and the case where one is a symlink to the other. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 3cefdcc6..ab7e1610 100755 --- a/configure +++ b/configure @@ -715,7 +715,7 @@ elif [ $uname = "Linux" ] || [ $uname = "GNU" ] ; then IFS=" " for path in $ldconfig_paths; do - if [ "$path" = "$libdir_expanded" ]; then + if [ "$path" -ef "$libdir_expanded" ]; then libdir_in_ldconfig=1 fi done -- 2.17.0