From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: [PATCH] Makefile: Change library order for static linking Date: Tue, 22 Sep 2015 14:30:06 -0700 Message-ID: References: <1442524332-10180-1-git-send-email-repk@triplefau.lt> <20150917212016.GF606@cruxbox> <20150918071525.GA482@cruxbox> <20150922203759.GB9793@cruxbox> Mime-Version: 1.0 Content-Type: text/plain Cc: git@vger.kernel.org, Brandon Casey , Jeff King , Jonathan Nieder To: Remi Pommarel X-From: git-owner@vger.kernel.org Tue Sep 22 23:33:01 2015 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZeVBM-0004wg-67 for gcvg-git-2@plane.gmane.org; Tue, 22 Sep 2015 23:33:00 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935010AbbIVVcC (ORCPT ); Tue, 22 Sep 2015 17:32:02 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35799 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934896AbbIVVaJ (ORCPT ); Tue, 22 Sep 2015 17:30:09 -0400 Received: by pacfv12 with SMTP id fv12so20210437pac.2 for ; Tue, 22 Sep 2015 14:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=h8yxbiDzDZ2NvtIcw9MYTerhZ/3XDvM9pT5cX+Xs9YE=; b=uk8ZuSiaGfKiDgP0ZblZClE+uyEj8xpHILHj0G4EkktYIYYJD5ptA9VxDNO0U4clyg VKtV/mO+Ex7GswCgZjtdWB7wMm+BgdCh+JixmOGG4levK9TjtMn8cNs8ML9iGusQrmn2 x3SPCdgpMohexS8mWqDOyT2xTv04JgF7TNCHTgg/ZExlkd8gGSrpSSs+8wXDiFCGw8Ha 3gt8QoBCJDdFRMEahEKBO81oSk/ROBZTd7PivYhcCHAyYsODPkb9O1QVauwdgepal4ye 5ZX73i70fkKQwY5/71kb5LL/QflfPM5UedzPC1u0qlskhQHt1npYdy7dd807KZIdyPD5 Mujg== X-Received: by 10.66.144.165 with SMTP id sn5mr34392400pab.122.1442957408713; Tue, 22 Sep 2015 14:30:08 -0700 (PDT) Received: from localhost ([2620:0:1000:861b:fd7e:7071:2eda:9c63]) by smtp.gmail.com with ESMTPSA id xm9sm4046372pbc.32.2015.09.22.14.30.07 (version=TLS1_2 cipher=AES128-SHA256 bits=128/128); Tue, 22 Sep 2015 14:30:07 -0700 (PDT) In-Reply-To: <20150922203759.GB9793@cruxbox> (Remi Pommarel's message of "Tue, 22 Sep 2015 22:37:59 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Remi Pommarel writes: > I have one last question thought. Wouldn't it be nice if we had > configure to autodetect the need for -lssl with libcurl? Sure. I do not think anybody tried, but it would be nice. > We could make > configure to check for Curl_ssl_init function symbol in libcurl, > which is only present if libcurl has been compiled with openssl support, > by adding something like that in configure.ac: > > AC_CHECK_LIB([curl], [Curl_ssl_init], > [NEEDS_SSL_WITH_CURL=YesPlease], > [NEEDS_SSL_WITH_CURL=]) > > The thing that I'm afraid of is that checking a function that is not part > of official libcurl API could be not very reliable, don't you think ? That is true. To be bluntly honest, use of autoconf (and configure generated by it) in this project is optional, so I would not worry too much if you misidentify a version of cURL that does not need -lssl as needing one (or vice versa). As long as other parts of the resulting ./configure keeps working (read: emitting a syntactically broken shell script is not an OK offence) and if there is a way to work around the result of misidentification made by ./configure (read: config.mak can cure all gotchas made by config.mak.autogen), it would be fine to use something like the above snippet you gave us as the starting point and it will help some positive number of people. We have to start from somewhere if we want to get there. People who find versions of libcURL that gets misidentified will send in fixes if it matters to them. Thanks.