From MAILER-DAEMON Wed Mar 01 09:08:48 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cj4vw-0008QO-4l
	for mharc-autoconf@gnu.org; Wed, 01 Mar 2017 09:08:48 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48160)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.kahari@icm.uu.se>) id 1cj4Pk-0002vx-UO
	for autoconf@gnu.org; Wed, 01 Mar 2017 08:35:36 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.kahari@icm.uu.se>) id 1cj4Ph-0006Xz-HB
	for autoconf@gnu.org; Wed, 01 Mar 2017 08:35:32 -0500
Received: from smtp-out3.uu.se ([130.238.7.174]:54137 helo=cursor.its.uu.se)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <andreas.kahari@icm.uu.se>)
	id 1cj4Ph-0006NN-3B
	for autoconf@gnu.org; Wed, 01 Mar 2017 08:35:29 -0500
Received: from e-mailfilter01.sunet.se (e-mailfilter01.sunet.se
	[192.36.171.201])
	by cursor.its.uu.se (Postfix) with ESMTP id CF94A7E0
	for <autoconf@gnu.org>; Wed,  1 Mar 2017 14:35:05 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uu.se;
	s=centralsmtp; t=1488375305;
	bh=nRjEzHANLlMMfdSPGuPRcn5aU1jHqxqVhAzA4ECznDw=;
	h=Date:From:To:Subject;
	b=J1ucEwuT1ohenIR25MiaLRsBr6Wlh9KrV5ypsAGUYIAzbGtwEvFSQV1Fmd4Q2l/cC
	2B/cJh4JhzJHGQSSWPdscTmfiVQMNhtvvaEIsiV7yKr3radH4ar7bVgWFkZCX8RLEn
	2OG+KixKI6Vi5TOISG+S5ENYuv0uSK95a7et0x1s=
Received: from lyra.its.uu.se (lyra.its.uu.se [130.238.7.73])
	by e-mailfilter01.sunet.se (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP
	id v21DZ5Vs015127
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <autoconf@gnu.org>; Wed, 1 Mar 2017 14:35:05 +0100
Received: from smtp.user.uu.se (uuc-epost001.user.uu.se [130.238.3.11])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by lyra.its.uu.se (Postfix) with ESMTPS id C53333830A
	for <autoconf@gnu.org>; Wed,  1 Mar 2017 14:35:04 +0100 (CET)
Received: from omni.local (83.233.151.119) by uuc-epost001.user.uu.se
	(130.238.3.11) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32;
	Wed, 1 Mar 2017 14:35:04 +0100
Received: from box.local (box.local [10.0.0.10])
	by omni.local (OpenSMTPD) with ESMTP id a887ae5f
	for <autoconf@gnu.org>; Wed, 1 Mar 2017 14:35:04 +0100 (CET)
Received: from localhost (box.local [local])
	by box.local (OpenSMTPD) with ESMTPA id 0ad482fa
	for <autoconf@gnu.org>; Wed, 1 Mar 2017 14:35:04 +0100 (CET)
Date: Wed, 1 Mar 2017 14:35:04 +0100
From: Andreas Kusalananda =?iso-8859-1?B?S+Ro5HJp?= <andreas.kahari@icm.uu.se>
To: <autoconf@gnu.org>
Subject: Proper location to install shell function libraries?
Message-ID: <20170301133504.kjv2gzzlvy6fhzps@box.local>
Mail-Followup-To: autoconf@gnu.org
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="angnkt5wa5n7cxvs"
Content-Disposition: inline
Organization: NBIS, ICM, Uppsala University, Sweden
User-Agent: NeoMutt/20170206 (1.7.2)
X-Originating-IP: [83.233.151.119]
X-ClientProxiedBy: uuc-epost003.user.uu.se (130.238.3.13) To
	uuc-epost001.user.uu.se (130.238.3.11)
X-Bayes-Prob: 0.0001 (Score 0, tokens from: outbound, outbound-uu-se:default,
	uu-se:default, base:default, @@RPTN)
X-p0f-Info: os=Linux 2.6.x, link=Ethernet or modem
X-CanIt-Geo: ip=130.238.3.11; country=SE; region=Uppsala; city=Uppsala;
	latitude=59.8585; longitude=17.6454;
	http://maps.google.com/maps?q=59.8585,17.6454&z=6
X-CanItPRO-Stream: outbound-uu-se:outbound (inherits from
	outbound-uu-se:default, uu-se:default, base:default)
X-Canit-Stats-ID: 09SOBz53q - c8897a9a1ab0 - 20170301
X-CanIt-Archive-Cluster: PfMRe/vJWMiXwM2YIH5BVExnUnw
Received-SPF: neutral (e-mailfilter01.sunet.se: 130.238.3.11 is neither
	permitted nor denied by domain andreas.kahari@icm.uu.se)
	receiver=e-mailfilter01.sunet.se; client-ip=130.238.3.11;
	envelope-from=<andreas.kahari@icm.uu.se>; helo=lyra.its.uu.se;
	identity=mailfrom
X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.36.171.201
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 130.238.7.174
X-Mailman-Approved-At: Wed, 01 Mar 2017 09:08:46 -0500
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Mar 2017 13:35:36 -0000

--angnkt5wa5n7cxvs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

I'm hoping this is the correct forum for this query.  If not, kindly
point me elsewhere.

I'm developing a tiny set of shell scripts (sh, ksh93, bash) for use in
testing behaviour of shell constructs under various shells.

The scripts use GNU autoconf for finding the absolute paths to either
ksh93 or bash on the system it's being installed on, and for simply
placing a bug reporting address and project version number in the
generated scripts (really, nothing fancy at all).

The scripts make use of a common set of shell functions, defined in
their own file.  This is currently sourced like this:

    prefix="@prefix@"
    exec_prefix="@exec_prefix@"
    . "@libexecdir@/toolbox.shlib"

Then, in the configure.ac file, I have a line like

    AC_CONFIG_FILES([src/script], [chmod +x src/script])

for each script, so that it's generated from the corresponding script.in
file upon running configure.

My query is this: Would libexecdir be the best place to put a file that
is architecture dependent, but *not* meant to be executed separatedly
(it's a library).  Or should it actually be stored under libdir (which
I've never seen done with a shell library of functions)?

Regards,
Andreas

--angnkt5wa5n7cxvs
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIcBAABCAAGBQJYts4DAAoJEO/1ZlN5iXn4w+MP/RLLoWY4F1WVCGV4XRko3YVp
I3aygiHenWwKN09XYFS4NVIyivBO6SxUyUpvyH9ij8uPtGlHe4vSXb0cpIAVh8mO
KOOWvcjwuP1xel/6u94peeOOFvkHycSALaJZoonC+IehTu+Z0eE8VB4jXqBEDfxv
opB+Xl7saEVMMgFiBEk8NxCSxPVm1RG4spWW8bmiRmIM1kLigfIpZZwhT2x90W3x
lwqWZ3VwJgk1nxXIK9us+93dS2QQBVcltZjo6nrxK0enTBp5LmyqeFB9sr67A2vc
GxKSbQA+awiLf3Jdb9ClqhDm3Q83ODsfeUdFM+j6/7B/5Q2EF6YOiRIzfD2AMXHc
FL4/CGYGbgVtnLofxu9yUaUFgnYBVN1uK7HTzbPH/lnUQZVqzwwO8i8/Hq4opWeQ
jJocl2kc9fNH0GesdjqNqmkZ7F8mJDjID9JdnC0TWgz29ugPVXPwV1vr/yBuBQkE
jpoLZW5IYAyurE71SyAOoLoVPsz1rTaW/ruuUhBBHISW7pVvydclSzQ1kWGWWA53
azF4sb/ZOavKk22etm7AUOe1AvOpMD/iTMFYijM3GhuE0njalgIcm/Td0zGo+Q/I
jdmrUigsPhHqvdg0b9qTH1chj4kQhfv3G44ck7gb5TgkP4WGb46rG50UJGNphY2h
t6PVQOqj0h0MwcvKwmbz
=rwd8
-----END PGP SIGNATURE-----

--angnkt5wa5n7cxvs--


From MAILER-DAEMON Wed Mar 01 11:02:38 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cj6i6-0007Pf-C8
	for mharc-autoconf@gnu.org; Wed, 01 Mar 2017 11:02:38 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40809)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rc040203@freenet.de>) id 1cj6i4-0007P3-G5
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:02:37 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rc040203@freenet.de>) id 1cj6i1-0007CX-9K
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:02:36 -0500
Received: from mout1.freenet.de ([2001:748:100:40::2:3]:33875)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rc040203@freenet.de>) id 1cj6i1-0007BJ-3B
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:02:33 -0500
Received: from [195.4.92.140] (helo=mjail0.freenet.de)
	by mout1.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (port
	25) (Exim 4.85 #1) id 1cj6hw-000075-Mk
	for autoconf@gnu.org; Wed, 01 Mar 2017 17:02:28 +0100
Received: from localhost ([::1]:40598 helo=mjail0.freenet.de)
	by mjail0.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (Exim
	4.85 #1) id 1cj6hw-0005Td-HR
	for autoconf@gnu.org; Wed, 01 Mar 2017 17:02:28 +0100
Received: from mx14.freenet.de ([195.4.92.24]:36590)
	by mjail0.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (Exim
	4.85 #1) id 1cj6ew-0003VO-FI
	for autoconf@gnu.org; Wed, 01 Mar 2017 16:59:22 +0100
Received: from hsi-kbw-046-005-173-188.hsi8.kabel-badenwuerttemberg.de
	([46.5.173.188]:44376 helo=[192.168.1.102])
	by mx14.freenet.de with esmtpsa (ID ralf.corsepius@freenet.de)
	(TLSv1.2:DHE-RSA-AES128-SHA:128) (port 465) (Exim 4.85 #1)
	id 1cj6ew-0003mM-7A
	for autoconf@gnu.org; Wed, 01 Mar 2017 16:59:22 +0100
Subject: Re: Proper location to install shell function libraries?
To: autoconf@gnu.org
References: <20170301133504.kjv2gzzlvy6fhzps@box.local>
From: Ralf Corsepius <rc040203@freenet.de>
Message-ID: <8ac493d8-3eef-8be3-3a88-0773f84b827a@freenet.de>
Date: Wed, 1 Mar 2017 16:59:20 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.7.0
MIME-Version: 1.0
In-Reply-To: <20170301133504.kjv2gzzlvy6fhzps@box.local>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Originated-At: 46.5.173.188!44376
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:748:100:40::2:3
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Mar 2017 16:02:37 -0000

On 03/01/2017 02:35 PM, Andreas Kusalananda Kähäri wrote:

> My query is this: Would libexecdir be the best place to put a file that
> is architecture dependent, but *not* meant to be executed separatedly
> (it's a library).  Or should it actually be stored under libdir

$libexecdir is meant to take a suite's/package's 
"internal/sub-programs/executables/scripts" (typically with executable 
permissions). Think of it as a auxiliary $bindir, which is supposed not 
to be in $PATH.

$libdir/<subdir>/ (e.g. %libdir/<package>) is the playground a package 
can install more or less whatever it wants, comprising executables.

As your "scripts" don't seem to be "programs", $libdir/<subdir> probably 
is what you are looking for.

 > (which
 > I've never seen done with a shell library of functions)?
Storing script fragments or scripts in $libdir would be unusual and 
discussworthy, but installing these to $libdir/<packages>/ is quite common.

Ralf





From MAILER-DAEMON Wed Mar 01 11:13:27 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cj6sZ-0003DK-Ew
	for mharc-autoconf@gnu.org; Wed, 01 Mar 2017 11:13:27 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:46423)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nbowler@draconx.ca>) id 1cj6sW-0003Cv-5s
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:13:25 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <nbowler@draconx.ca>) id 1cj6sT-0004MP-Kv
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:13:24 -0500
Received: from mail-ot0-x22b.google.com ([2607:f8b0:4003:c0f::22b]:33805)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <nbowler@draconx.ca>) id 1cj6sT-0004M8-F2
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:13:21 -0500
Received: by mail-ot0-x22b.google.com with SMTP id x10so32913356otb.1
	for <autoconf@gnu.org>; Wed, 01 Mar 2017 08:13:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=draconx-ca.20150623.gappssmtp.com; s=20150623;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:content-transfer-encoding;
	bh=7RSG0IJ6F+1bxOc14oJf/GqloPL/ByptZFiEviFFAoI=;
	b=vzS1c94oZqYwIjn3Qb0Lgn0aSo4ibI78nL5CUCxFwaMXtaiO8DLMBsM+fxsQBZLtXn
	jvQ+YKxzNJUy2zai+wNk1/ANrelWdGNbIVsk4mbp8SuNjUHzxs/nwQOw7giAHbg6tUKt
	cF2Fk97bEDs0jWTBim6fzokCoGyQmYvkeH7yI3ZcFkmyZYQXp6zXgyJKMjW0kH53cKUz
	w5VqqusV+NUsrMnNGvP+oTVHtM5Z1VRb11QVeMNEYgHEmawklgfsv00rGOsi3Auhjdqw
	/+wtooYBKhMURX5ro+lcaXvGa9ToQqAR37TcaPlTqHuSnU0fmUhB6Fi71f3KprOT1QRo
	u4Ew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:content-transfer-encoding;
	bh=7RSG0IJ6F+1bxOc14oJf/GqloPL/ByptZFiEviFFAoI=;
	b=Hbob7UYQLmXwYBNSEnOxWRyPH0KcMPTWAnXj1lB0jhSw38AwkY1x6rvSDMiumqN5ev
	sz0gzEEKZW7etHK2mdd0ZOuLq+/deBqHm4xYaRZ6PPQ0pXsq1qID3qIP/HQpV4WM6TXT
	0K9V/+i68bkVWqVHv6f56zapeEKJLPb0oT2ZftzX3t5DGyjEjAMHa5ODzU8WAhKHYOIj
	QFGcFYsR+xaUc3+yClOA/JnaGC/lk4NSxx0rw7CjKHCG68e4sdlXKdBu71TGe9bGivhg
	/XiJBJJ1VKUWJFfJvKbl1YJNyAjQC93oeggZ4q2gnLBxVT2QnbCDyltmJWOivAkQcWIK
	DkBw==
X-Gm-Message-State: AMke39n+gdQDh9QsZ43csOkHCnj7tb5WRdO8VSmMdfNhLrvJoj3K9HOQndKbK6kDM/cDJiTps/v6CVEUpA0s4A==
X-Received: by 10.157.54.98 with SMTP id w89mr4683824otb.123.1488384799019;
	Wed, 01 Mar 2017 08:13:19 -0800 (PST)
MIME-Version: 1.0
Received: by 10.202.81.145 with HTTP; Wed, 1 Mar 2017 08:13:18 -0800 (PST)
X-Originating-IP: [2604:a880:0:1010::23:4001]
In-Reply-To: <20170301133504.kjv2gzzlvy6fhzps@box.local>
References: <20170301133504.kjv2gzzlvy6fhzps@box.local>
From: Nick Bowler <nbowler@draconx.ca>
Date: Wed, 1 Mar 2017 11:13:18 -0500
Message-ID: <CADyTPEzfWFw3wosYp4n=v2-=5o_4iUFpjEQKbx3zFkfYmdCpwA@mail.gmail.com>
Subject: Re: Proper location to install shell function libraries?
To: autoconf@gnu.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2607:f8b0:4003:c0f::22b
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Mar 2017 16:13:25 -0000

Hello,

On 3/1/17, Andreas Kusalananda K=C3=A4h=C3=A4ri <andreas.kahari@icm.uu.se> =
wrote:
[...]
> The scripts make use of a common set of shell functions, defined in
> their own file.  This is currently sourced like this:
>
>     prefix=3D"@prefix@"
>     exec_prefix=3D"@exec_prefix@"
>     . "@libexecdir@/toolbox.shlib"
>
> Then, in the configure.ac file, I have a line like
>
>     AC_CONFIG_FILES([src/script], [chmod +x src/script])
>
> for each script, so that it's generated from the corresponding script.in
> file upon running configure.
>
> My query is this: Would libexecdir be the best place to put a file that
> is architecture dependent, but *not* meant to be executed separatedly
> (it's a library).  Or should it actually be stored under libdir (which
> I've never seen done with a shell library of functions)?

Seems fine.  If you are installing more than one file (or think you
might do so in the future) I suggest putting them in a subdirectory
thereof -- if you use Automake then this will define the pkglibexecdir
variable by default to install files into a subdirectory with the
same name as your package.

The definition of these install variables comes from the GNU Coding
Standards[1].  You mention the installed scripts are machine-dependent
so they should be installed in either libdir or libexecdir.  GCS says:

  "libexecdir: The directory for installing executable programs to be
               run by other programs rather than by users  ..."

  "libdir:     The directory for object files and libraries of object
               code ..."

Which doesn't really help us decide where to install non-executable
machine-dependent shell fragments.  Based on this information alone,
libexecdir seems like a reasonable choice.  However, looking at what
packages installed on my computer do, libdir seems to be much more
commonly used.  So I'd say do whatever you prefer.

[1] https://www.gnu.org/prep/standards/

Cheers,
  Nick


From MAILER-DAEMON Wed Mar 01 11:30:25 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cj78z-0004HM-3e
	for mharc-autoconf@gnu.org; Wed, 01 Mar 2017 11:30:25 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:56227)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rc040203@freenet.de>) id 1cj78w-0004Ez-8R
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:30:23 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rc040203@freenet.de>) id 1cj78t-0004IJ-L3
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:30:22 -0500
Received: from mout1.freenet.de ([2001:748:100:40::2:3]:53132)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rc040203@freenet.de>) id 1cj78t-0004Gf-FO
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:30:19 -0500
Received: from [195.4.92.142] (helo=mjail2.freenet.de)
	by mout1.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (port
	25) (Exim 4.85 #1) id 1cj78o-0006BX-Fc
	for autoconf@gnu.org; Wed, 01 Mar 2017 17:30:14 +0100
Received: from localhost ([::1]:46059 helo=mjail2.freenet.de)
	by mjail2.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (Exim
	4.85 #1) id 1cj78n-0004AT-QV
	for autoconf@gnu.org; Wed, 01 Mar 2017 17:30:14 +0100
Received: from mx3.freenet.de ([195.4.92.13]:40759)
	by mjail2.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (Exim
	4.85 #1) id 1cj76f-0002Bb-Dw
	for autoconf@gnu.org; Wed, 01 Mar 2017 17:28:01 +0100
Received: from hsi-kbw-046-005-173-188.hsi8.kabel-badenwuerttemberg.de
	([46.5.173.188]:49200 helo=[192.168.1.102])
	by mx3.freenet.de with esmtpsa (ID ralf.corsepius@freenet.de)
	(TLSv1.2:DHE-RSA-AES128-SHA:128) (port 465) (Exim 4.85 #1)
	id 1cj76f-0004SS-9X
	for autoconf@gnu.org; Wed, 01 Mar 2017 17:28:01 +0100
Subject: Re: Proper location to install shell function libraries?
To: autoconf@gnu.org
References: <20170301133504.kjv2gzzlvy6fhzps@box.local>
	<CADyTPEzfWFw3wosYp4n=v2-=5o_4iUFpjEQKbx3zFkfYmdCpwA@mail.gmail.com>
From: Ralf Corsepius <rc040203@freenet.de>
Message-ID: <5b9c8830-fe13-86e0-9f79-d1cbbafa6c86@freenet.de>
Date: Wed, 1 Mar 2017 17:27:59 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.7.0
MIME-Version: 1.0
In-Reply-To: <CADyTPEzfWFw3wosYp4n=v2-=5o_4iUFpjEQKbx3zFkfYmdCpwA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Originated-At: 46.5.173.188!49200
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:748:100:40::2:3
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Mar 2017 16:30:23 -0000

On 03/01/2017 05:13 PM, Nick Bowler wrote:

> The definition of these install variables comes from the GNU Coding
> Standards[1].  You mention the installed scripts are machine-dependent
> so they should be installed in either libdir or libexecdir.  GCS says:
>
>   "libexecdir: The directory for installing executable programs to be
>                run by other programs rather than by users  ..."
 >
>   "libdir:     The directory for object files and libraries of object
>                code ..."
>
> Which doesn't really help us decide where to install non-executable
> machine-dependent shell fragments.

Note the term "executable programs" in the section on "libexecdir", you 
cited above. Shell fragment usually aren't "executable".

> Based on this information alone,
> libexecdir seems like a reasonable choice.  However, looking at what
> packages installed on my computer do, libdir seems to be much more
> commonly used.
This observation has its reasons (at least under Linux).

- Many distros do not support or did not support libexecdir and favor 
$libdir/<package>.
- Many packages do not use libexecdir.
- Putting everything into $libdir/<package> is easier to use.

Ralf



From MAILER-DAEMON Wed Mar 01 11:47:20 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cj7PM-0000UV-Aa
	for mharc-autoconf@gnu.org; Wed, 01 Mar 2017 11:47:20 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36935)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nbowler@draconx.ca>) id 1cj7PJ-0000UH-8x
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:47:18 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <nbowler@draconx.ca>) id 1cj7PI-00048y-Eh
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:47:17 -0500
Received: from mail-ot0-x235.google.com ([2607:f8b0:4003:c0f::235]:35980)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <nbowler@draconx.ca>) id 1cj7PI-00048h-8R
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:47:16 -0500
Received: by mail-ot0-x235.google.com with SMTP id i1so33716624ota.3
	for <autoconf@gnu.org>; Wed, 01 Mar 2017 08:47:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=draconx-ca.20150623.gappssmtp.com; s=20150623;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc; bh=3GCXTWSvdlqkCwc48xd9eOL7hMblrlaZxIdxzVMYKQc=;
	b=qqtxTzRG2W5224sduWQoBYxHSe/K1uMeHP7ViX9oyVy+p63dg1eZj7KPaMzwoSXIdK
	5POldSELPGV7AXm6tQtmVUv0bojyc3oviilsyE+6A1qxtehjgcZY6Xc2b/rEoPgt4msB
	V5TlKsgjyMyTQJZdF2aXpMKpQT8IaI99tZXwds/uE6M7yJE0bL8O+OP/VFfXnIe5S16C
	4GXJDtPYYocmgX3HoSAwEnKEpJwIJKplbeUJ0R+4qyHccHdYCqNOvVQ5cdl+1HCf1Tn5
	EWjcngX1sZkpZB6imKTr85wa1QNmeP0b888hR3S0WhFoEFtoL/jxeyS5+VWVWmHAhtnr
	Urew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc;
	bh=3GCXTWSvdlqkCwc48xd9eOL7hMblrlaZxIdxzVMYKQc=;
	b=jG/O66aL7Xufq8QZhYlrtFCnAIvZ27XaRbrcFFSjHWjKpB4d2FLjV2R9nAsiWAWgKS
	6DqWYOaMLuqDpC78R9UAsM5/ovrKVrD5d4ppkK2rp3VxDIIeOvltUfcA5brs6BEwhzGN
	l9aPW3uHFjhIh9wncudyIqXu1mh2mXi1ZTk80yIPLX8+Ksql2Jc++bq8wMlVtC0JcUNR
	CNyeuCCzALNnrkzc+JDz10cSNBFVYgXG3OVv9jzrRB8r54KapK6GXbamxyUlv/ekP/ML
	Qum2RR02YHBtxyRK7bT0bV46jGhnqb4d4jC/nPtZhk8GjkjSKN6AvLO88flEmX7+oiJi
	rriw==
X-Gm-Message-State: AMke39mfQv7Gf3JIGt71mu/loVthFZSQ5mD2fhMpcPaSweJ3CBRwlD9DnrGY7MCEM7Vlubr+Wj/yBvM/BaN1WA==
X-Received: by 10.157.36.161 with SMTP id z30mr5058704ota.208.1488386835090;
	Wed, 01 Mar 2017 08:47:15 -0800 (PST)
MIME-Version: 1.0
Received: by 10.202.81.145 with HTTP; Wed, 1 Mar 2017 08:47:14 -0800 (PST)
X-Originating-IP: [2604:a880:0:1010::23:4001]
In-Reply-To: <5b9c8830-fe13-86e0-9f79-d1cbbafa6c86@freenet.de>
References: <20170301133504.kjv2gzzlvy6fhzps@box.local>
	<CADyTPEzfWFw3wosYp4n=v2-=5o_4iUFpjEQKbx3zFkfYmdCpwA@mail.gmail.com>
	<5b9c8830-fe13-86e0-9f79-d1cbbafa6c86@freenet.de>
From: Nick Bowler <nbowler@draconx.ca>
Date: Wed, 1 Mar 2017 11:47:14 -0500
Message-ID: <CADyTPEzMn_2GavwhyFSo6w=TJR119tFPu_Yuokb0idWX7XdThg@mail.gmail.com>
Subject: Re: Proper location to install shell function libraries?
To: Ralf Corsepius <rc040203@freenet.de>
Cc: autoconf@gnu.org
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:4003:c0f::235
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Mar 2017 16:47:18 -0000

On 3/1/17, Ralf Corsepius <rc040203@freenet.de> wrote:
> On 03/01/2017 05:13 PM, Nick Bowler wrote:
>> The definition of these install variables comes from the GNU Coding
>> Standards[1].  You mention the installed scripts are machine-dependent
>> so they should be installed in either libdir or libexecdir.  GCS says:
>>
>>   "libexecdir: The directory for installing executable programs to be
>>                run by other programs rather than by users  ..."
>  >
>>   "libdir:     The directory for object files and libraries of object
>>                code ..."
>>
>> Which doesn't really help us decide where to install non-executable
>> machine-dependent shell fragments.
>
> Note the term "executable programs" in the section on "libexecdir",
> you cited above. Shell fragment usually aren't "executable".

I agree, but such fragments are also definitely not "object files" nor
are they "libraries of object code", hence why neither description is
particularly helpful in this case.

On the face of it a sourceable shell fragment seems closer to being an
executable program than it does to being an object file, so...

Cheers,
  Nick


From MAILER-DAEMON Wed Mar 01 11:49:47 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cj7Rj-0001PD-3U
	for mharc-autoconf@gnu.org; Wed, 01 Mar 2017 11:49:47 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:38013)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.kahari@icm.uu.se>) id 1cj7Re-0001Ma-8z
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:49:45 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.kahari@icm.uu.se>) id 1cj7Ra-0005NN-TM
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:49:42 -0500
Received: from smtp-out3.uu.se ([130.238.7.174]:53096 helo=cursor.its.uu.se)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <andreas.kahari@icm.uu.se>)
	id 1cj7Ra-0005LP-Fe
	for autoconf@gnu.org; Wed, 01 Mar 2017 11:49:38 -0500
Received: from e-mailfilter01.sunet.se (e-mailfilter01.sunet.se
	[192.36.171.201])
	by cursor.its.uu.se (Postfix) with ESMTP id E777B5D2
	for <autoconf@gnu.org>; Wed,  1 Mar 2017 17:49:36 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uu.se;
	s=centralsmtp; t=1488386976;
	bh=GZBZwbdawwQskhmlbUtWOItxl69GfzOhCzuSAGxcdXQ=;
	h=Date:From:To:Subject:References:In-Reply-To;
	b=e8N2yFwFNSU5XdQh8c8qqqlQ5LbKbMs4OvbW1ZIQ1+g8TLatzR0jeY+INzBsQB0ar
	ybkHtNqIpCuaG8cfiZp1yLj4fl39CyOOvQtWSviuUt3sDZ7TaJt9bT7KxGIE2zQ3ij
	c7EsPLpRjo6mlwsXFqpEtKT4e46zOIQUsmFjkAJs=
Received: from lyra.its.uu.se (lyra.its.uu.se [130.238.7.73])
	by e-mailfilter01.sunet.se (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP
	id v21GnaHl004167
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <autoconf@gnu.org>; Wed, 1 Mar 2017 17:49:36 +0100
Received: from smtp.user.uu.se (uuc-epost001.user.uu.se [130.238.3.11])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by lyra.its.uu.se (Postfix) with ESMTPS id C63B53836E
	for <autoconf@gnu.org>; Wed,  1 Mar 2017 17:49:35 +0100 (CET)
Received: from omni.local (83.233.151.119) by uuc-epost001.user.uu.se
	(130.238.3.11) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32;
	Wed, 1 Mar 2017 17:49:36 +0100
Received: from box.local (box.local [10.0.0.10])
	by omni.local (OpenSMTPD) with ESMTP id 505b281c
	for <autoconf@gnu.org>; Wed, 1 Mar 2017 17:49:35 +0100 (CET)
Received: from localhost (box.local [local])
	by box.local (OpenSMTPD) with ESMTPA id e4d9c325
	for <autoconf@gnu.org>; Wed, 1 Mar 2017 17:49:35 +0100 (CET)
Date: Wed, 1 Mar 2017 17:49:35 +0100
From: Andreas Kusalananda =?iso-8859-1?B?S+Ro5HJp?= <andreas.kahari@icm.uu.se>
To: <autoconf@gnu.org>
Subject: Re: Proper location to install shell function libraries?
Message-ID: <20170301164935.ptpdvwhtqb2o4vos@box.local>
Mail-Followup-To: autoconf@gnu.org
References: <20170301133504.kjv2gzzlvy6fhzps@box.local>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="q4ctc2mgndvi36v2"
Content-Disposition: inline
In-Reply-To: <20170301133504.kjv2gzzlvy6fhzps@box.local>
Organization: NBIS, ICM, Uppsala University, Sweden
User-Agent: NeoMutt/20170206 (1.7.2)
X-Originating-IP: [83.233.151.119]
X-ClientProxiedBy: uuc-epost002.user.uu.se (130.238.3.12) To
	uuc-epost001.user.uu.se (130.238.3.11)
X-Bayes-Prob: 0.0001 (Score 0, tokens from: outbound, outbound-uu-se:default,
	uu-se:default, base:default, @@RPTN)
X-p0f-Info: os=Linux 2.6.x, link=Ethernet or modem
X-CanIt-Geo: ip=130.238.3.11; country=SE; region=Uppsala; city=Uppsala;
	latitude=59.8585; longitude=17.6454;
	http://maps.google.com/maps?q=59.8585,17.6454&z=6
X-CanItPRO-Stream: outbound-uu-se:outbound (inherits from
	outbound-uu-se:default, uu-se:default, base:default)
X-Canit-Stats-ID: 09SOENAF5 - 803c2c02918c - 20170301
X-CanIt-Archive-Cluster: PfMRe/vJWMiXwM2YIH5BVExnUnw
Received-SPF: neutral (e-mailfilter01.sunet.se: 130.238.3.11 is neither
	permitted nor denied by domain andreas.kahari@icm.uu.se)
	receiver=e-mailfilter01.sunet.se; client-ip=130.238.3.11;
	envelope-from=<andreas.kahari@icm.uu.se>; helo=lyra.its.uu.se;
	identity=mailfrom
X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.36.171.201
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 130.238.7.174
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Mar 2017 16:49:45 -0000

--q4ctc2mgndvi36v2
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Mar 01, 2017 at 02:35:04PM +0100, Andreas Kusalananda K=E4h=E4ri wr=
ote:
> Hi,
>=20
[cut]
>=20
> The scripts make use of a common set of shell functions, defined in
> their own file.  This is currently sourced like this:
>=20
>     prefix=3D"@prefix@"
>     exec_prefix=3D"@exec_prefix@"
>     . "@libexecdir@/toolbox.shlib"
>=20
> Then, in the configure.ac file, I have a line like
>=20
>     AC_CONFIG_FILES([src/script], [chmod +x src/script])
>=20
> for each script, so that it's generated from the corresponding script.in
> file upon running configure.
>=20
> My query is this: Would libexecdir be the best place to put a file that
> is architecture dependent, but *not* meant to be executed separatedly
> (it's a library).  Or should it actually be stored under libdir (which
> I've never seen done with a shell library of functions)?


Just to clarify:  The scripts themselves are naturally installed in
bindir, the question is what to do with a "shared library of shell
functions".

Thanks for the replies so far.  I will try with libdir/package-name and
see what it looks like.

If anyone knows of a precedent for doing it one way or another, I'd be
happy to get to know about it.


Regards,
Andreas

--q4ctc2mgndvi36v2
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIcBAABCAAGBQJYtvuWAAoJEO/1ZlN5iXn4cJQP/0AxY70s+JXjudAHT4t1xk3s
vqINABwDyX8qE9MHqIEdHEh/Om/EsPCkkmH4sWFueSTlWo6BHyIHHEdLiy8XK6AT
9st8Qv2nhVcH0ieFb6jXpgpDlSvUL8XKdQm+hLgEIRDXp/VW7wZpedofuukUQ8Zu
Om3CYZHbWDw5TnC6S8xKp1hsr8r4UmNV3f2nDq1tbeFnWx1fyWI6zmSbxl2hryZS
BiPPgv+6E2KJ7N857Ewok3OJJGsnM88mMuvrOYTceo/HAzmFUleATEpqcwOgT/gZ
P2H1NFPkRSEusIZGkrm1vmd6pvgx1sAcSUc31AvzKolAL0sFx+JOWB1ylxzyHvRc
AIIB6z3hHcgswEJ47qWcs0R4eT//+ObKaevMJJ2cM6MEVDznVeAapnISNXeRaT3Z
6UnOYFox9PTaoMYdFdRFGYbwIl8npcXs2Snd/kZ4CDCqtND4wBGuYTMC81ThD4D5
7MrMR19OyZ0L8DDxxS/sjuXqGs0p2JCZLxqcMjl3D3budTE32qe7ZY2tCAGCGvMH
IViL6uQ2f1148kBh9tE6XEfXSVTdD3ri8SoJqSGmQTDtGWk6RjA7NOeQHwjCWWcb
RRWB9SMg7bEetHvTGX/b412eKdnS8l2L+KCUQqs6nHUnZQhGd2EjmataRknM9DLR
v4c7CoDHu/p5A516jbh5
=gVRP
-----END PGP SIGNATURE-----

--q4ctc2mgndvi36v2--


From MAILER-DAEMON Wed Mar 01 22:53:09 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cjHng-0007nE-Uj
	for mharc-autoconf@gnu.org; Wed, 01 Mar 2017 22:53:08 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48691)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eagle@eyrie.org>) id 1cjHne-0007mx-6q
	for autoconf@gnu.org; Wed, 01 Mar 2017 22:53:07 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eagle@eyrie.org>) id 1cjHnb-0007Ae-3Q
	for autoconf@gnu.org; Wed, 01 Mar 2017 22:53:06 -0500
Received: from haven.eyrie.org ([166.84.7.159]:44317)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <eagle@eyrie.org>) id 1cjHna-0007AM-VG
	for autoconf@gnu.org; Wed, 01 Mar 2017 22:53:03 -0500
Received: from lothlorien.eyrie.org
	(96-90-234-101-static.hfc.comcastbusiness.net [96.90.234.101])
	(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by haven.eyrie.org (Postfix) with ESMTPS id 3599811846A
	for <autoconf@gnu.org>; Wed,  1 Mar 2017 19:52:59 -0800 (PST)
Received: by lothlorien.eyrie.org (Postfix, from userid 1000)
	id 0ACB5B40555; Wed,  1 Mar 2017 19:52:57 -0800 (PST)
From: Russ Allbery <eagle@eyrie.org>
To: autoconf@gnu.org
Subject: Re: Proper location to install shell function libraries?
In-Reply-To: <8ac493d8-3eef-8be3-3a88-0773f84b827a@freenet.de> (Ralf
	Corsepius's message of "Wed, 1 Mar 2017 16:59:20 +0100")
Organization: The Eyrie
References: <20170301133504.kjv2gzzlvy6fhzps@box.local>
	<8ac493d8-3eef-8be3-3a88-0773f84b827a@freenet.de>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
Date: Wed, 01 Mar 2017 19:52:57 -0800
Message-ID: <87shmwcp2e.fsf@hope.eyrie.org>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 166.84.7.159
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Mar 2017 03:53:07 -0000

Ralf Corsepius <rc040203@freenet.de> writes:

> $libdir/<subdir>/ (e.g. %libdir/<package>) is the playground a package can
> install more or less whatever it wants, comprising executables.

> As your "scripts" don't seem to be "programs", $libdir/<subdir> probably
> is what you are looking for.

$datadir/<subdir>, no?  Script libraries are almost certainly
architecture-independent.

-- 
Russ Allbery (eagle@eyrie.org)              <http://www.eyrie.org/~eagle/>


From MAILER-DAEMON Wed Mar 01 23:59:02 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cjIpR-0001bz-UR
	for mharc-autoconf@gnu.org; Wed, 01 Mar 2017 23:59:01 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43015)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <basinilya@gmail.com>) id 1cjIpP-0001bY-Ey
	for autoconf@gnu.org; Wed, 01 Mar 2017 23:59:00 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <basinilya@gmail.com>) id 1cjIpK-0001p3-FY
	for autoconf@gnu.org; Wed, 01 Mar 2017 23:58:59 -0500
Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:34352)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <basinilya@gmail.com>) id 1cjIpK-0001oL-7w
	for autoconf@gnu.org; Wed, 01 Mar 2017 23:58:54 -0500
Received: by mail-lf0-x244.google.com with SMTP id y193so3522639lfd.1
	for <autoconf@gnu.org>; Wed, 01 Mar 2017 20:58:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=subject:to:references:from:message-id:date:user-agent:mime-version
	:in-reply-to:content-transfer-encoding;
	bh=sxsph5jT8qlxEpdHAB+eUoDU9MFFGN+Y7F3n6qY8uQ0=;
	b=nciRn/gfFzm//dMh5I2ZbzjI9ncVmG/nhNA8TUSkAcgdMgH8m4h2DthDE/von2MTdl
	oIQ+0JiAxVfCPoMWY0QZ/DzMFIOr3nD0DmquvTNlcn5uIW2YyI8rw+fTyimfotx4xGja
	ECAAnHiclIayqerQDhxpHgblE/VELyYp3L26/g0nBVgvg8gox1zSBC+MhVcSyzb1aaW0
	yWCawv17vqkfo8uYhwLCmV2Cq0sf0+5gHjfac02lBpmFg+ev3j93uxmLaxqtUdM6D+Je
	RViFK+nsQu2UJwo0azWs9IpnqvNVzv+q0FldwG0spbAwxD1rrBvvTKnjjwFbZgjeFjvq
	DMMw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:subject:to:references:from:message-id:date
	:user-agent:mime-version:in-reply-to:content-transfer-encoding;
	bh=sxsph5jT8qlxEpdHAB+eUoDU9MFFGN+Y7F3n6qY8uQ0=;
	b=tazhTOtDAJORgmxri/PmXsfIiFNDXE8qGAzddTzSi814iDC0ZmJMGRjBcyud2jFPp9
	xEhBDNx3dnOhAFrwk7v/GWbAfVTnxfeUnfnN5NB6pL08oCrywq+ociOz0uAv8YpUPXTF
	5WS+//cDDDoEu+tSFzRo6NneTgozosvfvn7hgfEOHZkk7GDqK+DPXps3nomD4WiUkzQw
	YjW4ScNs8Nxcscc1FPvCqWJYQSz7JtqCA+hEz206H/G908gwdUVt7DcLki7oV5j3d9xt
	Az7T0LMfuIgZ1tQiw6wN4/KOVG4Q3XbjJ2EppInFGoB5yq25LgMD1Y3GdKylCEoxc/TT
	HTuQ==
X-Gm-Message-State: AMke39mtLOiuZypSbrL9UoVO4XDrbmImW4U52LGqjIlov8nh7OvRz3oNktyw14GrFS1qUg==
X-Received: by 10.25.127.151 with SMTP id a145mr1153271lfd.19.1488430731334;
	Wed, 01 Mar 2017 20:58:51 -0800 (PST)
Received: from [192.168.3.135] (92-100-225-106.dynamic.avangarddsl.ru.
	[92.100.225.106]) by smtp.googlemail.com with ESMTPSA id
	q6sm1478094ljb.12.2017.03.01.20.58.50
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Wed, 01 Mar 2017 20:58:50 -0800 (PST)
Subject: Re: Proper location to install shell function libraries?
To: Russ Allbery <eagle@eyrie.org>, autoconf@gnu.org
References: <20170301133504.kjv2gzzlvy6fhzps@box.local>
	<8ac493d8-3eef-8be3-3a88-0773f84b827a@freenet.de>
	<87shmwcp2e.fsf@hope.eyrie.org>
From: Basin Ilya <basinilya@gmail.com>
Message-ID: <9f836bcf-87b7-f9c1-f6d7-10806dad6185@gmail.com>
Date: Thu, 2 Mar 2017 07:57:49 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.7.1
MIME-Version: 1.0
In-Reply-To: <87shmwcp2e.fsf@hope.eyrie.org>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2a00:1450:4010:c07::244
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Mar 2017 04:59:00 -0000

I agree. Consider RHEL/CentOS where you can simultanneously install both .i686 and .x86_64 versions of one package. The packages are allowed to have overlapping files, if these files don't differ.

If one puts script libraries to $libdir/<subdir>,  CentOS will have duplicate files in /lib/<subdir> and /lib64/<subdir>, but in case of $datadir there will be only one /usr/share/<subpackage>


On 02.03.2017 06:52, Russ Allbery wrote:
> Ralf Corsepius <rc040203@freenet.de> writes:
>
>> $libdir/<subdir>/ (e.g. %libdir/<package>) is the playground a package can
>> install more or less whatever it wants, comprising executables.
>> As your "scripts" don't seem to be "programs", $libdir/<subdir> probably
>> is what you are looking for.
> $datadir/<subdir>, no?  Script libraries are almost certainly
> architecture-independent.
>



From MAILER-DAEMON Thu Mar 02 03:05:34 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cjLjy-0002F0-L9
	for mharc-autoconf@gnu.org; Thu, 02 Mar 2017 03:05:34 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43991)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rc040203@freenet.de>) id 1cjLjv-0002Eo-Rp
	for autoconf@gnu.org; Thu, 02 Mar 2017 03:05:32 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rc040203@freenet.de>) id 1cjLjs-0002xk-OX
	for autoconf@gnu.org; Thu, 02 Mar 2017 03:05:31 -0500
Received: from mout0.freenet.de ([2001:748:100:40::2:2]:39141)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <rc040203@freenet.de>) id 1cjLjs-0002xO-IP
	for autoconf@gnu.org; Thu, 02 Mar 2017 03:05:28 -0500
Received: from [195.4.92.141] (helo=mjail1.freenet.de)
	by mout0.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (port
	25) (Exim 4.85 #1) id 1cjLjq-00029Y-R3
	for autoconf@gnu.org; Thu, 02 Mar 2017 09:05:26 +0100
Received: from localhost ([::1]:32874 helo=mjail1.freenet.de)
	by mjail1.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (Exim
	4.85 #1) id 1cjLjq-0000iX-Q9
	for autoconf@gnu.org; Thu, 02 Mar 2017 09:05:26 +0100
Received: from mx10.freenet.de ([195.4.92.20]:47242)
	by mjail1.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (Exim
	4.85 #1) id 1cjLhh-0007Q7-MS
	for autoconf@gnu.org; Thu, 02 Mar 2017 09:03:13 +0100
Received: from hsi-kbw-046-005-173-188.hsi8.kabel-badenwuerttemberg.de
	([46.5.173.188]:45600 helo=[192.168.1.102])
	by mx10.freenet.de with esmtpsa (ID ralf.corsepius@freenet.de)
	(TLSv1.2:DHE-RSA-AES128-SHA:128) (port 465) (Exim 4.85 #1)
	id 1cjLhh-0008BH-Ja
	for autoconf@gnu.org; Thu, 02 Mar 2017 09:03:13 +0100
Subject: Re: Proper location to install shell function libraries?
To: autoconf@gnu.org
References: <20170301133504.kjv2gzzlvy6fhzps@box.local>
	<8ac493d8-3eef-8be3-3a88-0773f84b827a@freenet.de>
	<87shmwcp2e.fsf@hope.eyrie.org>
	<9f836bcf-87b7-f9c1-f6d7-10806dad6185@gmail.com>
From: Ralf Corsepius <rc040203@freenet.de>
Message-ID: <85ee1c06-d6a6-6b2c-b038-9bef29789c7e@freenet.de>
Date: Thu, 2 Mar 2017 09:03:11 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.7.0
MIME-Version: 1.0
In-Reply-To: <9f836bcf-87b7-f9c1-f6d7-10806dad6185@gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Originated-At: 46.5.173.188!45600
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:748:100:40::2:2
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Mar 2017 08:05:32 -0000

On 03/02/2017 05:57 AM, Basin Ilya wrote:
> I agree. Consider RHEL/CentOS where you can simultanneously install both .i686 and .x86_64 versions of one package. The packages are allowed to have overlapping files, if these files don't differ.
>
> If one puts script libraries to $libdir/<subdir>,  CentOS will have duplicate files in /lib/<subdir> and /lib64/<subdir>, but in case of $datadir there will be only one /usr/share/<subpackage>

Right, but this is only applicable if all files are arch-independent and 
guaranteed to stay so for ever.

Ralf




From MAILER-DAEMON Thu Mar 02 03:48:34 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cjMPa-0003b9-Nl
	for mharc-autoconf@gnu.org; Thu, 02 Mar 2017 03:48:34 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52495)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.kahari@icm.uu.se>) id 1cjMPY-0003b2-DV
	for autoconf@gnu.org; Thu, 02 Mar 2017 03:48:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.kahari@icm.uu.se>) id 1cjMPU-00024k-FR
	for autoconf@gnu.org; Thu, 02 Mar 2017 03:48:32 -0500
Received: from smtp-out3.uu.se ([130.238.7.174]:51512 helo=cursor.its.uu.se)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <andreas.kahari@icm.uu.se>)
	id 1cjMPU-00023n-27
	for autoconf@gnu.org; Thu, 02 Mar 2017 03:48:28 -0500
Received: from e-mailfilter02.sunet.se (e-mailfilter02.sunet.se
	[192.36.171.202])
	by cursor.its.uu.se (Postfix) with ESMTP id B6E6C807
	for <autoconf@gnu.org>; Thu,  2 Mar 2017 09:48:25 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uu.se;
	s=centralsmtp; t=1488444505;
	bh=Mbx7yI28oZ//Ht3XJSqPaQRaeqCW7dyLFPQJA+NF3Vg=;
	h=Date:From:To:Subject;
	b=O8ojyJSPgrBY79+w4DOZCo1AX9z9Mg0DRNmLsx8rdUqQygMsaUDkBc7dG/fLW5gSi
	z6CarDmDao7NjRcAOVm8RNZxpXra/jJCE2sXdH+ObO6fmK1hbNifnJpBeNPYADKUGE
	J4H23mA2dDHlFMsMy/4vQOUaUTpduV0hx18M4upc=
Received: from velox.its.uu.se (velox.its.uu.se [130.238.7.74])
	by e-mailfilter02.sunet.se (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP
	id v228mP9J030793
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <autoconf@gnu.org>; Thu, 2 Mar 2017 09:48:25 +0100
Received: from smtp.user.uu.se (uuc-epost001.user.uu.se [130.238.3.11])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by velox.its.uu.se (Postfix) with ESMTPS id 35A1834155
	for <autoconf@gnu.org>; Thu,  2 Mar 2017 09:48:24 +0100 (CET)
Received: from omni.local (83.233.151.119) by uuc-epost001.user.uu.se
	(130.238.3.11) with Microsoft SMTP Server (version=TLS1_2,
	cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32;
	Thu, 2 Mar 2017 09:48:24 +0100
Received: from box.local (box.local [10.0.0.10])
	by omni.local (OpenSMTPD) with ESMTP id 17fb0dc7
	for <autoconf@gnu.org>; Thu, 2 Mar 2017 09:48:24 +0100 (CET)
Received: from localhost (box.local [local])
	by box.local (OpenSMTPD) with ESMTPA id 25cdef4a
	for <autoconf@gnu.org>; Thu, 2 Mar 2017 09:48:24 +0100 (CET)
Date: Thu, 2 Mar 2017 09:48:24 +0100
From: Andreas Kusalananda =?iso-8859-1?B?S+Ro5HJp?= <andreas.kahari@icm.uu.se>
To: <autoconf@gnu.org>
Subject: Re: Proper location to install shell function libraries?
Message-ID: <20170302084824.w7eopyfke3khqbtt@box.local>
Mail-Followup-To: autoconf@gnu.org
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="tyxxy6l3senehmpr"
Content-Disposition: inline
Organization: NBIS, ICM, Uppsala University, Sweden
User-Agent: NeoMutt/20170206 (1.7.2)
X-Originating-IP: [83.233.151.119]
X-ClientProxiedBy: uuc-epost005.user.uu.se (130.238.3.15) To
	uuc-epost001.user.uu.se (130.238.3.11)
X-Bayes-Prob: 0.495 (Score 0, tokens from: outbound, outbound-uu-se:default,
	uu-se:default, base:default, @@RPTN)
X-p0f-Info: os=Linux 2.6.x, link=Ethernet or modem
X-CanIt-Geo: ip=130.238.3.11; country=SE; region=Uppsala; city=Uppsala;
	latitude=59.8585; longitude=17.6454;
	http://maps.google.com/maps?q=59.8585,17.6454&z=6
X-CanItPRO-Stream: outbound-uu-se:outbound (inherits from
	outbound-uu-se:default, uu-se:default, base:default)
X-Canit-Stats-ID: 0aSOUMpMf - 68da73f543b5 - 20170302
X-CanIt-Archive-Cluster: PfMRe/vJWMiXwM2YIH5BVExnUnw
Received-SPF: neutral (e-mailfilter02.sunet.se: 130.238.3.11 is neither
	permitted nor denied by domain andreas.kahari@icm.uu.se)
	receiver=e-mailfilter02.sunet.se; client-ip=130.238.3.11;
	envelope-from=<andreas.kahari@icm.uu.se>; helo=velox.its.uu.se;
	identity=mailfrom
X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.36.171.202
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 130.238.7.174
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Mar 2017 08:48:34 -0000

--tyxxy6l3senehmpr
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

(Forwarded to the list because I initially sent it from the wrong
address)

----- Forwarded message from Andreas Kusalananda K=E4h=E4ri <andreas.kahari=
@nbis.se> -----

Date: Thu, 2 Mar 2017 09:23:34 +0100
=46rom: Andreas Kusalananda K=E4h=E4ri <andreas.kahari@nbis.se>
To: Basin Ilya <basinilya@gmail.com>
Cc: Russ Allbery <eagle@eyrie.org>, autoconf@gnu.org
Subject: Re: Proper location to install shell function libraries?

On Thu, Mar 02, 2017 at 07:57:49AM +0300, Basin Ilya wrote:
> I agree. Consider RHEL/CentOS where you can simultanneously install both =
=2Ei686 and .x86_64 versions of one package. The packages are allowed to ha=
ve overlapping files, if these files don't differ.
>=20
> If one puts script libraries to $libdir/<subdir>,  CentOS will have dupli=
cate files in /lib/<subdir> and /lib64/<subdir>, but in case of $datadir th=
ere will be only one /usr/share/<subpackage>

If you install architecture-dependent shell function library files into
$datadir and then mount that hierarchy on different architectures,
this will fail.  Different architectures in this case means OpenBSD,
NetBSD, Solaris and Ubuntu, and the architecture dependance comes from
the location of certain utilities used by the shell library (GNU "grep"
is /usr/local/bin/ggrep on OpenBSD, /usr/pkg/bin/ggrep on NetBSD,
/usr/bin/ggrep on Solaris, while it's /bin/grep on Ubuntu).

Andreas

>=20
>=20
> On 02.03.2017 06:52, Russ Allbery wrote:
> > Ralf Corsepius <rc040203@freenet.de> writes:
> >
> >> $libdir/<subdir>/ (e.g. %libdir/<package>) is the playground a package=
 can
> >> install more or less whatever it wants, comprising executables.
> >> As your "scripts" don't seem to be "programs", $libdir/<subdir> probab=
ly
> >> is what you are looking for.
> > $datadir/<subdir>, no?  Script libraries are almost certainly
> > architecture-independent.
> >
>=20
>=20
> _______________________________________________
> Autoconf mailing list
> Autoconf@gnu.org
> https://lists.gnu.org/mailman/listinfo/autoconf
>=20



----- End forwarded message -----

--tyxxy6l3senehmpr
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIcBAABCAAGBQJYt9xRAAoJEO/1ZlN5iXn4AfgP/i/mldAyOGhaPlUmytWXmxu7
AOe57fSQ73JfIuqod8xHIx1gcAjhK8zoKHhX/0nzHdqso5ig3+rfdtlpfVOpjnLz
ZSstLtWEmJGocoDiP4l6zFp8QiX87M16ve7oBjablpUSQsXIgtwlD58JcMbwh3Rq
+XbEsR9ZD2Nza929F5Fed2Th3oMpXxvVF8buao7NIrOoyRA0acVbvR1O9oXJ3VJX
YrZyEcEUPAsw6tTnK/UFI+NRer6j9vbtLg2/it2BQIBHi6qavS3hsawrFTX5oDKm
KcV9TQfrLRK48U7Znp85PRmQNXsKl1tjGF5aI3ive+uutuFSI69yxREmx8D6I9hI
kX3kPLM7mIXO+DIdCqSjoLeh4rM2qkqyHXRmwdbgWRYtoYKZq86fOxI5bFWy4Pfl
TytY1nSpd5vqzzske/Bqet+7DnMkP/doOTgJm9fm4oW0CIaR56bpVZSCqSBuaAwY
D7nYlmo0iAyUiFvOAk50o3zkQ55Row0A7tcUR7pHgxsT9avdc3XmU/TmBk8VgAvL
uJ57OFacaWjFO3tmLWe0wamJrTZM7krH2gz8BfsMLQLLKAhcOSPFkV9d0Qtwb7Ab
Z5rUzzxT2U2Vf6vujD/bVD2E2+SsGlMPSe3b38ILx2RzClDpzdwAvS7y0GzYzpO2
UKaJt2/e3PzBJQ2OtBOH
=oeDt
-----END PGP SIGNATURE-----

--tyxxy6l3senehmpr--


From MAILER-DAEMON Thu Mar 02 09:57:20 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cjSAS-0005q2-0J
	for mharc-autoconf@gnu.org; Thu, 02 Mar 2017 09:57:20 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:47609)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.kahari@nbis.se>) id 1cjM1h-00055Z-9d
	for autoconf@gnu.org; Thu, 02 Mar 2017 03:23:54 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.kahari@nbis.se>) id 1cjM1c-0001nR-GO
	for autoconf@gnu.org; Thu, 02 Mar 2017 03:23:53 -0500
Received: from nbis.scilifelab.se ([130.237.80.8]:43998 helo=mail.nbis.se)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <andreas.kahari@nbis.se>)
	id 1cjM1c-0001hK-2N
	for autoconf@gnu.org; Thu, 02 Mar 2017 03:23:48 -0500
Received: from mail.nbis.se (localhost [127.0.0.1])
	by mail.nbis.se (Postfix) with ESMTP id 26D7E40253
	for <autoconf@gnu.org>; Thu,  2 Mar 2017 09:23:38 +0100 (CET)
Authentication-Results: mail.nbis.se (amavisd-new); dkim=pass
	reason="pass (just generated, assumed good)" header.d=nbis.se
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nbis.se; h=
	user-agent:organization:in-reply-to:content-disposition
	:content-type:content-type:mime-version:references:message-id
	:subject:subject:to:from:from:date:date; s=dkim; t=1488443017;
	x=1489307018; bh=R557fDu6bTqnl2W0UrFvYuIR7+lY//IMIJgW74kTXy4=; b=
	qSAPXaZpILwyaaTs5SIwFBvDJooPWMrXY9umCXjmzge70hZOEctwG/+ulfrOCRh2
	j3oGukBfDXuGjN59EssxbQCTAeoGHZQLTuccp1U13+edkNIWhkuQNaBYKQLt4dJx
	rt1Q2HqK+dh1LET6TebphefQDxY8AjWDweFOaf0aa4Y=
X-Virus-Scanned: Debian amavisd-new at 
Received: from mail.nbis.se ([127.0.0.1])
	by mail.nbis.se (mail.nbis.se [127.0.0.1]) (amavisd-new, port 10026)
	with ESMTP id PFUVBhCzR67U for <autoconf@gnu.org>;
	Thu,  2 Mar 2017 09:23:37 +0100 (CET)
Received: from omni.local (c-83-233-151-119.cust.bredband2.com
	[83.233.151.119])
	by mail.nbis.se (Postfix) with ESMTPSA id 315DA3FB95;
	Thu,  2 Mar 2017 09:23:36 +0100 (CET)
Received: from box.local (box.local [10.0.0.10])
	by omni.local (OpenSMTPD) with ESMTP id 43a01614;
	Thu, 2 Mar 2017 09:23:34 +0100 (CET)
Received: from localhost (box.local [local])
	by box.local (OpenSMTPD) with ESMTPA id f5c2448b;
	Thu, 2 Mar 2017 09:23:34 +0100 (CET)
Date: Thu, 2 Mar 2017 09:23:34 +0100
From: Andreas Kusalananda =?iso-8859-1?B?S+Ro5HJp?= <andreas.kahari@nbis.se>
To: Basin Ilya <basinilya@gmail.com>
Cc: Russ Allbery <eagle@eyrie.org>, autoconf@gnu.org
Subject: Re: Proper location to install shell function libraries?
Message-ID: <20170302082334.aahfnordhrbsxwmj@box.local>
Mail-Followup-To: Basin Ilya <basinilya@gmail.com>,
	Russ Allbery <eagle@eyrie.org>, autoconf@gnu.org
References: <20170301133504.kjv2gzzlvy6fhzps@box.local>
	<8ac493d8-3eef-8be3-3a88-0773f84b827a@freenet.de>
	<87shmwcp2e.fsf@hope.eyrie.org>
	<9f836bcf-87b7-f9c1-f6d7-10806dad6185@gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="qgndrop3rrgiz3tu"
Content-Disposition: inline
In-Reply-To: <9f836bcf-87b7-f9c1-f6d7-10806dad6185@gmail.com>
Organization: NBIS, ICM, Uppsala University, Sweden
User-Agent: NeoMutt/20170206 (1.7.2)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 130.237.80.8
X-Mailman-Approved-At: Thu, 02 Mar 2017 09:57:19 -0500
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Mar 2017 08:23:54 -0000


--qgndrop3rrgiz3tu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Mar 02, 2017 at 07:57:49AM +0300, Basin Ilya wrote:
> I agree. Consider RHEL/CentOS where you can simultanneously install both =
=2Ei686 and .x86_64 versions of one package. The packages are allowed to ha=
ve overlapping files, if these files don't differ.
>=20
> If one puts script libraries to $libdir/<subdir>,  CentOS will have dupli=
cate files in /lib/<subdir> and /lib64/<subdir>, but in case of $datadir th=
ere will be only one /usr/share/<subpackage>

If you install architecture-dependent shell function library files into
$datadir and then mount that hierarchy on different architectures,
this will fail.  Different architectures in this case means OpenBSD,
NetBSD, Solaris and Ubuntu, and the architecture dependance comes from
the location of certain utilities used by the shell library (GNU "grep"
is /usr/local/bin/ggrep on OpenBSD, /usr/pkg/bin/ggrep on NetBSD,
/usr/bin/ggrep on Solaris, while it's /bin/grep on Ubuntu).

Andreas

>=20
>=20
> On 02.03.2017 06:52, Russ Allbery wrote:
> > Ralf Corsepius <rc040203@freenet.de> writes:
> >
> >> $libdir/<subdir>/ (e.g. %libdir/<package>) is the playground a package=
 can
> >> install more or less whatever it wants, comprising executables.
> >> As your "scripts" don't seem to be "programs", $libdir/<subdir> probab=
ly
> >> is what you are looking for.
> > $datadir/<subdir>, no?  Script libraries are almost certainly
> > architecture-independent.
> >
>=20
>=20
> _______________________________________________
> Autoconf mailing list
> Autoconf@gnu.org
> https://lists.gnu.org/mailman/listinfo/autoconf
>=20

--qgndrop3rrgiz3tu
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIcBAABCAAGBQJYt9aBAAoJEO/1ZlN5iXn4zLEQANit6aTQwaLy9U+UImx03R/f
k8CfmLp0i2VK21OfJltvIZcBkpbDGJ33lNYgzKqpjKrkLW5IvGMv9AU3qJ6tb+Ot
kyBrUp8e5bDRjUJjduDgkRMQYWrU9Y2LT8J6dggiCzIN+cBSeuKI8sF5+GrZKc06
kPGbxIwmJmRsl5WYJ+V/iluiVDpdOqR1Qa0RcmOn+IiSV7t2hx8U0dW7GhvGMqVP
ofqWVwG9WOAq33s96COc/J9nxZoHXZ6rLQolo3J3hECqEkYz0niQyNlD8eMT0iqf
T0XYWzF8pkJ/urALfjiWU9qIPB0FVr/5OdHazckcMBJd9T7fDSjpCLINgiXiiap6
ff9E5jCa99G2NoqLoFwcPs49iroB4DUJbi65Ce1rUgZMLQd2MHwA6y9Hzi+F1dFr
xXIOS+yDMMsJBLbnF7b0I0IyLAvhPNcn8J2V+GBr3vWRCByB9kbdDSszdNwbgEyv
lRRj0HcWYmLfrd3YKJZ6ry/t09qQs5sBvQ0IqHubW+PFNAyBviBXZyyjL5/pW9hJ
bdx9LTfWjHXJZUvhINDXTxlVOikDkQJcUxwBCF4hnejHG+gUvC7a8rL/7HaIvqgA
ArFrbqcp1hiAI+uBY9ihqimMnVNFa8VpemRYgmQIUymFRCmPEiC2q0ir982O9CYl
1NQLV17NKNGRsPLDNGTX
=haal
-----END PGP SIGNATURE-----

--qgndrop3rrgiz3tu--


From MAILER-DAEMON Wed Mar 22 08:48:34 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cqfgn-0000Di-Qt
	for mharc-autoconf@gnu.org; Wed, 22 Mar 2017 08:48:33 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:39843)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <joakim.jalap@fastmail.com>) id 1cqbV5-0003fQ-SZ
	for autoconf@gnu.org; Wed, 22 Mar 2017 04:20:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <joakim.jalap@fastmail.com>) id 1cqbV0-0000Aj-0Q
	for autoconf@gnu.org; Wed, 22 Mar 2017 04:20:11 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:42292)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <joakim.jalap@fastmail.com>)
	id 1cqbUz-00009x-Dj
	for autoconf@gnu.org; Wed, 22 Mar 2017 04:20:05 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
	by mailout.nyi.internal (Postfix) with ESMTP id BE84220D04
	for <autoconf@gnu.org>; Wed, 22 Mar 2017 04:20:03 -0400 (EDT)
Received: from frontend1 ([10.202.2.160])
	by compute4.internal (MEProxy); Wed, 22 Mar 2017 04:20:03 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h=
	content-type:date:from:message-id:mime-version:subject:to
	:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=hT4c2f
	PhKDAfmhcROyw2yISfLdo6xwoxO292wiRfjfk=; b=Vh44t4PIUtC6b3nc6Pdvow
	7TN6hnMpzTYnalUjOxaZ6ITDiWaI71Qc1WPB+23M8f2O815IqTi6Oabj0nvD1PZe
	XBdX0pI9tJD3NBL5RJVBtH///3OeeWXr25yRz54EX1glYjtEObEacM8kpFyESxP+
	LR8CIwI2Ut2KMwcJVORex1nAZGD+5t03dlJq2hDvXHUm8EPCH3iQjGg60O052zuE
	S9vnXPRxq4hnzQ7Iyd2UswrzPIcDyqa7qIWawQyflk0lfDv0//U96ZppcJyxnVmd
	D4ZS1j6zapP7OCEcdUod/OqYxu7RBaa2NnnaiDtvmKLDmMX5EmK0GfYi/cohK/8g
	==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=content-type:date:from:message-id
	:mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc
	:x-sasl-enc; s=fm1; bh=hT4c2fPhKDAfmhcROyw2yISfLdo6xwoxO292wiRfj
	fk=; b=T6qKAU/mkd9X9wgm+I7FrB+xLbSXOgVs2X0Wtu+sh6PbAqfW//qFTwnRN
	KPXh4UByeirduGDJTgIPCadSEjtgcuA1vG+xEDfCpXFb1DEhlq0wcuANicurJT7x
	uJJU9m3+aiGfThuf4aX0iAtJrVFLFgo55MfyFOe/XHuFeybiCnPsgfz5+rMeFV82
	3tEQ3ZONqBqrktLOqwDQ5j5/oTBa8L23/V51VtLUcGa27PqDGJ875Yi9Em7DteH9
	XGFRTqP7DQzUjuCAOgPm9h/zkwZbUsZ8ejJ9jQ0NU50IGmc6JfBY1uJMApZt88Ya
	tnD10wKBZOpkLsxr6ySrEDzjq9qaA==
X-ME-Sender: <xms:szPSWI5NV4nuSawZi1E9dctwpqT9MnI3PCbn_GYq5z51fbINexI40Q>
X-Sasl-enc: xKSa4ghmO297y2ZH3dj3ExGsQ7uWmZR1Ijq8WYm6gFog 1490170803
Received: from genserv (unknown [5.150.202.248])
	by mail.messagingengine.com (Postfix) with ESMTPA id 479D07E718
	for <autoconf@gnu.org>; Wed, 22 Mar 2017 04:20:03 -0400 (EDT)
From: Joakim Jalap <joakim.jalap@fastmail.com>
To: autoconf@gnu.org
Subject: Variable expansin in AC_PREFIX_DEFAULT
Date: Wed, 22 Mar 2017 09:20:01 +0100
Message-ID: <87var1afke.fsf@fastmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 66.111.4.25
X-Mailman-Approved-At: Wed, 22 Mar 2017 08:48:31 -0400
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Mar 2017 08:20:14 -0000

Hello autoconf gurus!

I am trying to write some autotools support for installing a latex
package. On CTAN I found some autoconf macros (which I had to modify a
bit) which I use to find for example latex(1) and pdflatex(1). So far so
good. This CTAN package also has a macro to find the path to the tex
installation, AC_TEXMF_PATH. This finds the correct path for me at
/usr/share/texmf-dist. Now I want to put this as the default prefix so
that configure will "do the right thing" by default, but this is where I
fail.

This is my configure.ac:
----------------------------------------
AC_INIT([package], [0.1], [blah])
AC_PREREQ([2.60])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])

AC_PROG_INSTALL
AC_PROG_LATEX
AC_PROG_KPSEWHICH
AC_PROG_PDFLATEX
AC_TEXMF_PATH

AC_PREFIX_DEFAULT([$texmfpath])
AC_MSG_NOTICE([$texmfpath])

AC_CONFIG_FILES(Makefile)
AC_OUTPUT
----------------------------------------
AC_TEXMF_PATH exports `texmfpath' and does AC_SUBST on it. (You can find
all the macros here: https://www.ctan.org/tex-archive/support/autoconf)

The problem is with the AC_PREFIX_DEFAULT. It sets the default prefix to
empty. But the AC_MSG_NOTICE macro on the line below prints the correct
path! So somehow $texmfpath is expanded to the correct value by
AC_MSG_NOTICE, but it is expanded to nothing on the line above. If I do
AC_PREFIX_DEFAULT(["some_path"]) then the default prefix is correctly
set to "some_path".

Is it not possible to set the default prefix in this way? What other
good ways are there to set the default prefix to something discovered at
configure time?

I'm not subscribed to the list so if somebody answers, please keep me on
cc :)

Regards,

Joakim


From MAILER-DAEMON Wed Mar 22 09:38:49 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cqgTR-0003bJ-Nb
	for mharc-autoconf@gnu.org; Wed, 22 Mar 2017 09:38:49 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:47088)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1cqgTO-0003Yf-PK
	for autoconf@gnu.org; Wed, 22 Mar 2017 09:38:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1cqgTN-0003Zk-Jt
	for autoconf@gnu.org; Wed, 22 Mar 2017 09:38:46 -0400
Received: from mx1.redhat.com ([209.132.183.28]:40588)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <eblake@redhat.com>) id 1cqgTN-0003ZJ-A4
	for autoconf@gnu.org; Wed, 22 Mar 2017 09:38:45 -0400
Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com
	[10.5.11.13])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.redhat.com (Postfix) with ESMTPS id 37BD6C054928;
	Wed, 22 Mar 2017 13:38:45 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 37BD6C054928
Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com;
	dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com;
	spf=pass smtp.mailfrom=eblake@redhat.com
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 37BD6C054928
Received: from [10.10.121.124] (ovpn-121-124.rdu2.redhat.com [10.10.121.124])
	by smtp.corp.redhat.com (Postfix) with ESMTP id A647A17AA8;
	Wed, 22 Mar 2017 13:38:44 +0000 (UTC)
Subject: Re: Variable expansin in AC_PREFIX_DEFAULT
To: Joakim Jalap <joakim.jalap@fastmail.com>, autoconf@gnu.org
References: <87var1afke.fsf@fastmail.com>
From: Eric Blake <eblake@redhat.com>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Organization: Red Hat, Inc.
Message-ID: <98298118-671d-a94a-49b0-81c3dac19a74@redhat.com>
Date: Wed, 22 Mar 2017 08:38:42 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <87var1afke.fsf@fastmail.com>
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="W6MWt1FcsNqfudtP2qimUc03jPNSScCRO"
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
	(mx1.redhat.com [10.5.110.32]);
	Wed, 22 Mar 2017 13:38:45 +0000 (UTC)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 209.132.183.28
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Mar 2017 13:38:48 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--W6MWt1FcsNqfudtP2qimUc03jPNSScCRO
From: Eric Blake <eblake@redhat.com>
To: Joakim Jalap <joakim.jalap@fastmail.com>, autoconf@gnu.org
Message-ID: <98298118-671d-a94a-49b0-81c3dac19a74@redhat.com>
Subject: Re: Variable expansin in AC_PREFIX_DEFAULT
References: <87var1afke.fsf@fastmail.com>
In-Reply-To: <87var1afke.fsf@fastmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 03/22/2017 03:20 AM, Joakim Jalap wrote:
> Hello autoconf gurus!
>=20
> I am trying to write some autotools support for installing a latex
> package. On CTAN I found some autoconf macros (which I had to modify a
> bit) which I use to find for example latex(1) and pdflatex(1). So far s=
o
> good. This CTAN package also has a macro to find the path to the tex
> installation, AC_TEXMF_PATH. This finds the correct path for me at

It's poor practice to name a macro in the AC_ namespace if it is not
actually owned by autoconf; you may want to choose a different namespace
to make it obvious where the macro originates from.

> /usr/share/texmf-dist. Now I want to put this as the default prefix so
> that configure will "do the right thing" by default, but this is where =
I
> fail.
>=20
> This is my configure.ac:
> ----------------------------------------
> AC_INIT([package], [0.1], [blah])
> AC_PREREQ([2.60])
> AC_CONFIG_MACRO_DIR([m4])
> AM_INIT_AUTOMAKE([foreign])
>=20
> AC_PROG_INSTALL
> AC_PROG_LATEX
> AC_PROG_KPSEWHICH
> AC_PROG_PDFLATEX
> AC_TEXMF_PATH
>=20
> AC_PREFIX_DEFAULT([$texmfpath])
> AC_MSG_NOTICE([$texmfpath])
>=20
> AC_CONFIG_FILES(Makefile)
> AC_OUTPUT
> ----------------------------------------
> AC_TEXMF_PATH exports `texmfpath' and does AC_SUBST on it. (You can fin=
d
> all the macros here: https://www.ctan.org/tex-archive/support/autoconf)=

>=20
> The problem is with the AC_PREFIX_DEFAULT. It sets the default prefix t=
o
> empty. But the AC_MSG_NOTICE macro on the line below prints the correct=

> path! So somehow $texmfpath is expanded to the correct value by
> AC_MSG_NOTICE, but it is expanded to nothing on the line above. If I do=

> AC_PREFIX_DEFAULT(["some_path"]) then the default prefix is correctly
> set to "some_path".

Indeed, thanks to the magic of m4 diversions, AC_PREFIX_DEFAULT expands
to code that appears very early in configure, and using a shell variable
that early in the run is tricky; while AC_MSG_NOTICE expands to code
that runs at the place where the macro was used.

>=20
> Is it not possible to set the default prefix in this way? What other
> good ways are there to set the default prefix to something discovered a=
t
> configure time?

Is AC_PREFIX_PROGRAM any better for your use case?

>=20
> I'm not subscribed to the list so if somebody answers, please keep me o=
n
> cc :)

That's GNU list policy anyways.

--=20
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--W6MWt1FcsNqfudtP2qimUc03jPNSScCRO
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJY0n5iAAoJEKeha0olJ0Nq2ngH/RgzDFlVpC56R5fLapJEFmAe
6OUY50mzvZDdb4It/YzcyVixnXGdGQ6PF2RqBNSJqB4G0PuNmoTrX0e8JE0T9SuU
6phcPEfwbGI0AL7ySK/6VBfXof/+B3Ry9H4bj93rr8Y5pwfW817B/B8HlyBB0nS4
CdbZ38OLmIZpXDrwPyEid2F8Osa3seQRJVQ91xfqH+uBxxSIw6FfoxyQxJEFua7R
Bs3BJI0LdaE1HBIxhaGtIR7zdeAqjV+z+QXRFPpF4efAGQrJUTdEzBKgAQ3gosqd
pdivM0K9wImBfXuT4AxCfTMjQZm385PCKZXZ7IFaVb8oLtXnTSfHQ05ealIUB8s=
=FSsN
-----END PGP SIGNATURE-----

--W6MWt1FcsNqfudtP2qimUc03jPNSScCRO--


From MAILER-DAEMON Wed Mar 22 11:55:08 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cqibM-0007h3-C0
	for mharc-autoconf@gnu.org; Wed, 22 Mar 2017 11:55:08 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60563)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <joakim.jalap@fastmail.com>) id 1cqibJ-0007df-TC
	for autoconf@gnu.org; Wed, 22 Mar 2017 11:55:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <joakim.jalap@fastmail.com>) id 1cqibE-0003gr-4y
	for autoconf@gnu.org; Wed, 22 Mar 2017 11:55:05 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:54575)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <joakim.jalap@fastmail.com>)
	id 1cqibD-0003gf-L9
	for autoconf@gnu.org; Wed, 22 Mar 2017 11:55:00 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
	by mailout.nyi.internal (Postfix) with ESMTP id E4D3520D84;
	Wed, 22 Mar 2017 11:54:58 -0400 (EDT)
Received: from frontend1 ([10.202.2.160])
	by compute4.internal (MEProxy); Wed, 22 Mar 2017 11:54:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h=
	cc:content-type:date:from:in-reply-to:message-id:mime-version
	:references:subject:to:x-me-sender:x-me-sender:x-sasl-enc
	:x-sasl-enc; s=fm1; bh=XuRdKOJbaEE4PYCiZBQEyPED89ugsbCwdPI2HN+1e
	2o=; b=qY054EggdUfAxdxiULSplg3Dl+eidmXQ0vvgkezmqohgaXbRhXsBjqy8I
	6JL4lamKNKBuQxxvzH8/IdInU+dnBdaPm03Zc9zQUjh1ariVq964Dqf+/VzLLnTu
	aG1ep1cD4/ErO9WQFgPqDYDBdznhYJyqiybL2TErr8Eu4Pbs58bQ8+zUbnF5QoAy
	hKHq0LWeMfwUxRXEuV+o6eN0HzwHftA9BKIgH+/docruKhiR3SsaBYdXrYHgkWQ6
	hYd9+IpNQS2jBjAfoOWTtLOugKPlClDpmvseKci18vIpem5SKXV4mJk51cw/I+EK
	lmyshLq3Jg7RUqBnV7Dvp7RBchvzg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:content-type:date:from:in-reply-to
	:message-id:mime-version:references:subject:to:x-me-sender
	:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=XuRdKOJbaEE4PYCiZB
	QEyPED89ugsbCwdPI2HN+1e2o=; b=BI7SRGeJYk97gMte7kGhKFGVkqsxvMTxs2
	i2F1h5wM53esrVN7sjFyys8TtqLyYZmpLUDGZALmdDj/RtUCROIM32Hi/xA0vaIM
	JzZCm/X+7QiP7h7534P9bh+AEu0c+FUwrxBotf/3Ujc2nT9UErYNf8u6whZmACi0
	kqhTBieMum9T2GvcdcdJkuKRi13SJBHmAvIsn9aIulHeKi6p6RXDRwmnAj2y+lqi
	k/IZufNr62VXp7Ny4klhqZF66B6Lt0KJey6+t2YIHiXOFxaCBq/vdZ6lS4TLM608
	QeWrqUS6lu+3T/XJZUDonn8S3wy4N7FcqS159uyX1r1/jsHdPLkA==
X-ME-Sender: <xms:Up7SWK0T13OZobk_s09IrjKUjLgXfJNeAZC0NTifsXp3rSbq1mzdqQ>
X-Sasl-enc: BTvFhP4gEjWP7Vd1nkKc+drdZQ3lo/VlG6mZF7aO7nbm 1490198098
Received: from genserv (unknown [5.150.202.248])
	by mail.messagingengine.com (Postfix) with ESMTPA id 53B967E186;
	Wed, 22 Mar 2017 11:54:58 -0400 (EDT)
From: Joakim Jalap <joakim.jalap@fastmail.com>
To: Eric Blake <eblake@redhat.com>
Cc: autoconf@gnu.org
Subject: Re: Variable expansin in AC_PREFIX_DEFAULT
References: <87var1afke.fsf@fastmail.com>
	<98298118-671d-a94a-49b0-81c3dac19a74@redhat.com>
Date: Wed, 22 Mar 2017 16:54:56 +0100
In-Reply-To: <98298118-671d-a94a-49b0-81c3dac19a74@redhat.com> (Eric Blake's
	message of "Wed, 22 Mar 2017 08:38:42 -0500")
Message-ID: <87r31p9ui7.fsf@fastmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 66.111.4.25
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Mar 2017 15:55:07 -0000

Eric Blake <eblake@redhat.com> writes:

> On 03/22/2017 03:20 AM, Joakim Jalap wrote:
>> Hello autoconf gurus!
>> 
>> I am trying to write some autotools support for installing a latex
>> package. On CTAN I found some autoconf macros (which I had to modify a
>> bit) which I use to find for example latex(1) and pdflatex(1). So far so
>> good. This CTAN package also has a macro to find the path to the tex
>> installation, AC_TEXMF_PATH. This finds the correct path for me at
>
> It's poor practice to name a macro in the AC_ namespace if it is not
> actually owned by autoconf; you may want to choose a different namespace
> to make it obvious where the macro originates from.
>

Well I didn't choose it. That's the way it was in CTAN. But point taken.

> Indeed, thanks to the magic of m4 diversions, AC_PREFIX_DEFAULT expands
> to code that appears very early in configure, and using a shell variable
> that early in the run is tricky; while AC_MSG_NOTICE expands to code
> that runs at the place where the macro was used.

Well that's a shame. But I found another way anyway. See below.

> Is AC_PREFIX_PROGRAM any better for your use case?

Not really. I'm not installing any programs, only data. But I found a
solution: I can use the 'kpsewhich' program to find the correct texmf
directory. So now I do

AC_PREFIX_DEFAULT([`pksewhich --var-value TEXMFHOME`])

and it works!

Thanks for your time!

-- Joakim


