autocon and sub-packages

2015-09-03 Thread Sébastien Hinderer
Dear all, I am one of the maintainers of Coccinelle[1], a tool written in the Objective Caml[2] language. The tool is distributed with the libraries it depends on (they are provided as bundles). For each dependency, coccinelle's configure script checks whether the library is already installed. I

Re: autocon and sub-packages

2015-09-04 Thread Sébastien Hinderer
Dear Eric, Thanks a lot for your response. Eric Blake (2015/09/04 06:07 -0600): > On 09/03/2015 08:09 AM, Sébastien Hinderer wrote: > > Dear all, > > > > I am one of the maintainers of Coccinelle[1], a tool written in the > > Objective Caml[2] language. > > >

Re: autocon and sub-packages

2015-09-04 Thread Sébastien Hinderer
Dear Ralf, > Well, what I can tell you with my Fedora on is that in Fedora we discourage > bundling, because it in a nutshell raises a lot problems in maintenance, > both for system-integrators (read: distros) and upstreams. Many thanks for having written this. It is also what I think but I'd nee

Re: autocon and sub-packages

2015-09-04 Thread Sébastien Hinderer
Hello Warren, Many thanks for providing all these useul comments. Warren Young (2015/09/04 12:27 -0600): > Left unsaid in Eric’s answer is that this change in distribution > philosophy happened *because* capable versions started appearing > everywhere, so it was no longer necessary to provide cop

Detecting object file format

2018-07-19 Thread Sébastien Hinderer
Dear all, Sorry if the question is trivial. I am wondering how one should proceed to determine the object file format used on a target system in a configure.ac script? To be more precise: I am working on a project which tests this by trying to compile a C program that has a different behaviour ac

C compiler detection question

2018-07-19 Thread Sébastien Hinderer
Dear all, On Cygwin, I would like to slightly alter AC_PROG_CC's list of C compilers. What I would like is that it tries a few ones I could hardcode but then if they are not found that it falls back to its own list. I realise that I could hardcode the whole list with my compilers first but I would

cl.exe and system types

2018-08-20 Thread Sébastien Hinderer
Dear all, I am writing an autoconf script for a project which is supposed to compile under both Unix and Windows. Under Windows, the project will be built under Cygwin but it should be possible to use both MingW and cl.exe to compile it. For the MingW case, giving thee right --host= option works

Re: cl.exe and system types

2018-08-20 Thread Sébastien Hinderer
Dear Bob, Many thanks for your responses. Bob Friesenhahn (2018/08/20 10:44 -0500): > I don't know that MSVC is supported by Autotools. It would be nice if it > was. Have you seen a statement that this is supported? Well, here is what AC_PROG_CC outputs when running $ ./configure CC=cl checkin

Re: cl.exe and system types

2018-08-20 Thread Sébastien Hinderer
Bob Friesenhahn (2018/08/20 12:52 -0500): > Are you using Cygwin for your shell environment? Yes, absolutely. Do you think this makes things better, or worse? :) Sébastien. ___ Autoconf mailing list Autoconf@gnu.org https://lists.gnu.org/mailman/listin

Re: cl.exe and system types

2018-08-21 Thread Sébastien Hinderer
Dear Earnie and Bob, Many thanks for your replies. Earnie (2018/08/20 16:07 -0400): > On 8/20/2018 2:19 PM, Sébastien Hinderer wrote: > > Bob Friesenhahn (2018/08/20 12:52 -0500): > >> Are you using Cygwin for your shell environment? > > > > Yes, absolutely.

Re: cl.exe and system types

2018-08-23 Thread Sébastien Hinderer
Dear Peter, Many thanks for all the helpful informationn you provide! I don't think we will be able to introduce automake and libtool at this stage (there are even developers in the community who think we should replace make by a language-specific build system), but it is still very useful to kno

Re: cl.exe and system types

2018-08-23 Thread Sébastien Hinderer
Dear Nick, Nick Bowler (2018/08/21 10:32 -0400): > Hi Sébastien, > > On 2018-08-21, Sébastien Hinderer wrote: > > What I do not understand, though, is why it is necessary to specify > > --build. I know the manual says that when one specifies --host then one > > has t

Re: cl.exe and system types

2018-08-24 Thread Sébastien Hinderer
Dear Earnie and Keith, Many thanks for your support, warmly appreciated. Earnie (2018/08/23 13:08 -0400): > It's going to depend on what you want. If you're using the crosstools > for MinGW-w64 then you would specify --host as {i686,x86_64}-w64-mingw32 > and --build as {i686,x86_64}-pc-cygwin.

Re: cl.exe and system types

2018-08-24 Thread Sébastien Hinderer
Keith Marshall (2018/08/24 10:50 +0100): > > But why would you include a "mingw" string in something that does > > not use mingw at all? > > Because it's an OS name already known to config.sub, and because it's > an OS designator which is specific to native MS-Windows software > builds, (but see

Checking support of #! scripts

2018-09-27 Thread Sébastien Hinderer
Dear all, Is there a recommended way to detect whether #! scripts are supported on a host/target system? Many thanks in advance for any help, Sébastien. ___ Autoconf mailing list Autoconf@gnu.org https://lists.gnu.org/mailman/listinfo/autoconf

Re: Checking support of #! scripts

2018-09-27 Thread Sébastien Hinderer
Replying to myself, yes, it exists, AC_SYS_INTERPRETER. Sébastien. ___ Autoconf mailing list Autoconf@gnu.org https://lists.gnu.org/mailman/listinfo/autoconf

Arguemnts to configure

2018-10-02 Thread Sébastien Hinderer
Dear all, Is there a way to add a new "directory category", in addition to bindir, libdir, etc.? And, more generally, is there a way to make a configure script accept arguments that have a shape different from --with, --without, --enable and --disalbe? Many thanks in advance for any help! Sébas

Re: Arguments to configure

2018-10-03 Thread Sébastien Hinderer
Dear Eric, First of all, many thanks for your prompt and precise response, warmly appreciated. Eric Blake (2018/10/02 10:40 -0500): > On 10/2/18 10:15 AM, Sébastien Hinderer wrote: > > Dear all, > > > > Is there a way to add a new "directory category", in addi

Re: Arguemnts to configure

2018-10-03 Thread Sébastien Hinderer
Many thanks for your response, Vivien! I agree environment variables can help, too, althought it's not my preferred way, but thanks for having mentionned them anyway! Sébastien. ___ Autoconf mailing list Autoconf@gnu.org https://lists.gnu.org/mailman/l

Re: Arguments to configure

2018-10-04 Thread Sébastien Hinderer
Dear Gavin, Many thanks for your response! Gavin Smith (2018/10/04 19:10 +0100): > On Wed, Oct 03, 2018 at 12:10:49PM +0200, Sébastien Hinderer wrote: > > Coming to the directory I was talking about, it is currently called > > "target-bindir" and is used to define where

Re: Arguments to configure

2018-11-21 Thread Sébastien Hinderer
Dear Vivien, I'm really sorry about my delayed response! Vivien Kraus (2018/10/03 18:33 +0200): > > Sébastien Hinderer writes: > > > > Coming to the directory I was talking about, it is currently called > > "target-bindir" and is used to define where the b

Re: Arguments to configure

2018-11-21 Thread Sébastien Hinderer
Dear Nick, Many thanks for your response, I find it very helpful! Nick Bowler (2018/10/03 14:19 -0400): > Hello, > > Responding to part of your message... > > On 2018-10-03, Sébastien Hinderer wrote: > > In the same vein, I was wondering why the 'AC_SYS_INTERPRETER&

how to let configure know include and library path for library foo?

2019-01-24 Thread Sébastien Hinderer
Dear all, When an autoconf-driven project has a dependency on library foo, what's the best / recommended way to let users specify the directories for header files and library files when configuring the project? For the XWindow system, for instance, there are the --x-includes=DIR and --x-libraries

Re: how to let configure know include and library path for library foo?

2019-01-24 Thread Sébastien Hinderer
Dear Bob, Many thanks for your response. Sure, I understand the problem you describe and it makes perfect sense to me. But then, what would be an appropriate way to deal with it, according to you? Shall one let users put their directories in CFLAGS and LDFLAGS? Thanks! Sébastien. _

Re: how to let configure know include and library path for library foo?

2019-01-24 Thread Sébastien Hinderer
Sure, I understand and fully agree with what you write. Thanks. Sébastien. ___ Autoconf mailing list Autoconf@gnu.org https://lists.gnu.org/mailman/listinfo/autoconf

Making a path absolute portably

2019-07-10 Thread Sébastien Hinderer
Dear all, I'd need to compute the absolute path of srcdir in a portable way (it's okay if it includes symlinks). Currently I use abssrcdir=$(cd "${srcdir}"; echo $PWD) which seems to work fine. Is that considered portable enough? Thanks, Sébastien. ___

Re: Making a path absolute portably

2019-07-11 Thread Sébastien Hinderer
Dear Andrew and dear all, Many thanks for all your responses which I found all very useful and full of teachings. Andrew Price (2019/07/10 14:04 +0100): > On 10/07/2019 12:45, Sébastien Hinderer wrote: > > Dear all, > > > > I'd need to compute the absolute path of srcd

Re: Making a path absolute portably

2019-07-11 Thread Sébastien Hinderer
Andrew Price (2019/07/11 14:29 +0100): > It sounds like you want $abs_top_srcdir > > Relevant documentation: > https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Preset-Output-Variables.html My bad! Should have read the docs more carefully, sorry! This indeed seems

Re: Making a path absolute portably

2019-07-11 Thread Sébastien Hinderer
Bob Friesenhahn (2019/07/11 08:38 -0500): > Usually when people use a term like 'absolute' I assume that they mean the > real underlying path, removing the influence of symbolic links, so that it > reflects the operating system's opinion of the path. If a computed path > based on the specified path

Conventions on build variables

2019-08-08 Thread Sébastien Hinderer
Dear all, Are there some conventions about the properties a build system should have regarding certain standard build variables? For instance, regarding variables such as CC or CFLAGS, when they are passed to configure, should they be recorded somewhere so that a future invocation of make takes t

Re: Conventions on build variables

2019-08-26 Thread Sébastien Hinderer
Dear Bob, Many thanks for your response and sorry aobut the delay of mine. Bob Friesenhahn (2019/08/08 08:05 -0500): > On Thu, 8 Aug 2019, Sébastien Hinderer wrote: > > > Dear all, > > > > Are there some conventions about the properties a build system should > > h

Re: Conventions on build variables

2019-08-30 Thread Sébastien Hinderer
Dear Bob and Nick, Many thanks for your replies which I found really helpful. In particular I went over chapter 7 of the GNU coding standards which I didn't see before and kind of helped. Thanks again to both of you, Sébastien. ___ Autoconf mailing l

How should long messages be displayed

2019-09-17 Thread Sébastien Hinderer
Dear all, One of my autoconf script has a long notice mesage, i.e. over 80 characters. I am already using m4_normalize to be able to write the message nicely in the configure.ac file, but at the moment the printed message generates a very long line and I am wondering whether something is recommend

Re: How should long messages be displayed

2019-09-17 Thread Sébastien Hinderer
Eric Blake (2019/09/17 11:53 -0500): > Can you paste the actual portion of the configure.ac in question? Sure! It's work in progress but at the moment it looks like this: [AC_MSG_NOTICE(m4_normalize([ BFD library not found, 'objinfo' will be unable to display info on .cmxs f

Command-line option processing

2007-10-29 Thread Sébastien Hinderer
Dear all, Is it possible, in a configure script as produced by autoconf, to detect that the script was invoked with option of the form -with-foo=bar, where foo or bar take values not understood by the script ? Any help warmly appreciated. Thanks, Sébastien. _

Re: Command-line option processing

2007-10-29 Thread Sébastien Hinderer
Hi Benoît, > AC_ARG_WITH([foo], > [AC_HELP_STRING([--with-foo=whatever], > [Specifies something for foo @<:@default value > here@:>@])], > [], [with_foo=no]) > > case $with_foo in >no) echo some default action >;; > bar) echo do wh

Re: Command-line option processing

2007-10-30 Thread Sébastien Hinderer
Hello Ralf, > The next Autoconf version will warn by default on --enable/--disable > and --with/--without switches it knows nothing about. This is indeed what we are looking for. Will the warning appear as the very last output of the script, that is, if no redirections are performed, will the war

Re: Command-line option processing

2007-11-06 Thread Sébastien Hinderer
Hi, > > Actually, one solution that would be even better IMHO would be to be > > able to turn this kind of warnings into errors that would make the > > configue script fail, i.e. not produce the files it normally produces > > from the .in files. Is this possible ? Does it make sense to you guys ?

Re: Autotools lint tool

2019-10-23 Thread Sébastien Hinderer
David A. Wheeler (2019/10/07 12:29 -0400): > Here's a list of some style recommendations I made for autotools use: > > https://dwheeler.com/autotools/#style > > I think a number of them could be implemented by a linter. > You could also warn about a missing AC_INIT and AC_OUTPUT, > although I suspe

Re: Autotools lint tool

2019-10-23 Thread Sébastien Hinderer
David A. Wheeler (2019/10/23 12:18 -0400): > I just did a quick check with "autoreconf -i" in version 2.69. > Sadly it does NOT warn about either AC_INIT or AC_OUTPUT missing. Just for the reocrd there is the --warnings=all option. It does not warn either but IMO it could/should and that's the kin

Re: STDCXX issue

2020-01-20 Thread Sébastien Hinderer
Hi vincent, I'm all but an autoconf expert. Is it on purpose that you didn't call AC_INIT at the beginningof your autoconf script? Did you try running autoconf and automake with warnings enable to see whether they find something suspicious in your code? Best wishes, Sébastien.

Re: STDCXX issue

2020-01-20 Thread Sébastien Hinderer
Vincent Blondel (2020/01/20 15:10 +0100): > both ..._stdcxxx.m4 files are in the m4 subfolder ... is that not > enough ? As far as I know each .m4 file needs to be included explicitly. Sébastien.

Re: STDCXX issue

2020-01-20 Thread Sébastien Hinderer
Well it wouldn't hurt to fix the warnings. Perhaps it won't help, but I'd still do it. Sébastien.

Re: No macro for C11/C18?

2020-01-29 Thread Sébastien Hinderer
Perhaps such a macro could be included in the autoconf archive? Although not ideal, that may be beter than nothing. Best wishes, Sébastien.

Re: Makefile.am target name prefix *.o

2020-02-01 Thread Sébastien Hinderer
Hello, Vincent Blondel (2020/02/01 17:10 +0100): > Hello, > > Encounter a strange behaviour with autoconf. > I do not understand why all the compiled *.o files are prefixed with > target-xxx.o. > > Below an example ... have no progname yet for my executable hence let's > call it main for now ... >

Re: M4sh tests 77 and 78 vs /bin/sh -> dash

2020-03-13 Thread Sébastien Hinderer
Bob Friesenhahn (2020/03/12 16:04 -0500): > One reason why some projects are discarding use of Autoconf (and moving to > CMake and Meson/Ninja) is due to how long it takes to execute a configure > script. Given modern multicore CPUs, it often takes as much (or more) time > to run the configure scr

Re: M4sh tests 77 and 78 vs /bin/sh -> dash

2020-03-13 Thread Sébastien Hinderer
I did experiment on two projects and didn't observe that noticeable differences either. Sébastien.

LIBS or LDLIBS ?

2021-01-14 Thread Sébastien Hinderer
Dear autoconf and make users, The status of the LIBS and LDLIBS variables is unclear to me. Do both of them have a conventional meanings, or are they just alternatives for the same thing, namely giving libraries that should be passed to the ld linker? ./configure --help refers to LIBS but in mak

Re: LIBS or LDLIBS ?

2021-01-14 Thread Sébastien Hinderer
Hi, Kaz Kylheku (gmake) (2021/01/14 03:37 -0800): > On 2021-01-14 02:45, Sébastien Hinderer wrote: > > Dear autoconf and make users, > > I suspect mailing list cross-posting doesn't work well in an > age in which mailing lists don't accept postings from non-subscribe

Re: LIBS or LDLIBS ?

2021-01-14 Thread Sébastien Hinderer
Hi Paul, many thanks for your response. Paul Smith (2021/01/14 08:56 -0500): > On Thu, 2021-01-14 at 12:56 +0100, Sébastien Hinderer wrote: > > My question is: between LIBS and LDLIBS, which one is a build system > > supposed to honour? > > "Supposed to" according t

Building a cross-compiler

2021-01-20 Thread Sébastien Hinderer
Dear all, Sorry if what follows is unclear. I am writing because things are unclear in my brain and I am looking for help to clarify them. I am in charge of making cross-compilation possible for the OCaml language, given that the compiler's build system uses autoconf. The compiler is written in O

Re: Building a cross-compiler

2021-01-21 Thread Sébastien Hinderer
Dear Nick, Many thanks for your response! Nick Bowler (2021/01/20 10:36 -0500): > One thing that might help you is to know that you can just add > cross_compiling=yes to the configure command line to force > configure into cross compilation mode. I didn't know that indeed! thanks! > If you only

Re: Building a cross-compiler

2021-01-21 Thread Sébastien Hinderer
Dear Zack, Many thanks for having taken the time to write such a detailed repsonse, I find it really helpful. And, many thanks, too, for your work on Autoocnf and the discussion you started recently. As a noob I can't help much but fully support your work. Zack Weinberg (2021/01/21 09:20 -0500):

Weird behaviour about system types

2021-02-04 Thread Sébastien Hinderer
Dear all, I just noticed a behaviour of a configure script that surprises me. The configure.ac script does contain the AC_CANONICAL_BUILD, AC_CANONICAL_HOST and AC_CANONICAL_TARGET macros. I am calling the generated configure script as follows: ./configure --build=x86_64-pc-linux-gnu --host=a

Re: Weird behaviour about system types

2021-02-04 Thread Sébastien Hinderer
Hello Zack, many thanks for your helpful response! Zack Weinberg (2021/02/04 11:50 -0500): > Sorry for the blank reply, I misclicked. No problem. > > On Thu, Feb 4, 2021 at 11:27 AM Sébastien Hinderer > > wrote: > > > checking build system type... x86_64-pc-linux

Re: Weird behaviour about system types

2021-02-04 Thread Sébastien Hinderer
Hello Nick, many thanks for your response! The host that I used comes from the name under which Debian has installed the C cross-compiler. It's called aarch64-linux-gnu-gcc, that's how I came to use this argument to --host. Actually I find it odd that Debian installs cross-compilers under names t

Re: Weird behaviour about system types

2021-02-04 Thread Sébastien Hinderer
Hello Nick, many thanks for your response! Nick Bowler (2021/02/04 14:54 -0500): > Hi Sébastien, > > The purpose of canonicalization is not to find the toolchain. The user > specifies the actual name of the toolchain via the command-line > options. Which options is it that you have in mind to sp

AC_PROG_CC: how to distinguish clnag from gcc?

2021-02-05 Thread Sébastien Hinderer
Dear all, It seems AC_PROG_CC wrongly believes clang is gcc and that may cause problems when clang is passed a warning which is only supposrted by gcc, as is the case e.g. for -Wno-stringop-truncation. Is there a recommended way to determine for sure from a configure script whether the detected C

Re: AC_PROG_CC: how to distinguish clnag from gcc?

2021-02-05 Thread Sébastien Hinderer
Many thanks Todd for your helpful response! Sébastien.

Re: AC_PROG_CC: how to distinguish clang from gcc?

2021-02-08 Thread Sébastien Hinderer
Hello David and all, David A. Wheeler (2021/02/05 11:40 -0500): > I would *discourage* trying to figure out if a C compiler is gcc or clang. > Instead, create separate detectors for whatever you’re looking for. > > The gcc & clang groups coordinate with each other; they try to provide the > same

Re: AC_PROG_CC: how to distinguish clnag from gcc?

2021-02-08 Thread Sébastien Hinderer
Many thanks for yoru suggestion, Russ. David's approach makes sense to me but yours too. Did you notice important changes in the supported warnings between different versions of the same compiler? Are there many warnings in common between (at least one version of) clang and (at least one version

Re: AC_PROG_CC: how to distinguish clnag from gcc?

2021-02-09 Thread Sébastien Hinderer
Many thanks Russ for the helpful response, and for the -Weverything trick, I'll give it a try! And thanks to Paul, too! Sébastien.

m4 macro expansion problem

2021-08-23 Thread Sébastien Hinderer
Dear all, I am trying to define a package version properly by first defining its components separately (major and minor version number, patchlevel, and extra). The major and minor numbers are assumed to be always present. The patchlevel and the extra bits are optional. In pseudo-shell code, the

Re: m4 macro expansion problem

2021-08-25 Thread Sébastien Hinderer
Dear Nick, Yes, your email was definitely helpful and clear! Many thanks for that! Now the macro works like a charm. The only thing that remains osbcure to me is what would be the best way to generate our "VERSION" file, the one I am trying to replace. ONe simple way would be to have a VERSION.

Re: m4 macro expansion problem

2021-08-25 Thread Sébastien Hinderer
Dear Peter, Many thanks for your response and the link to your code! I willl definitely look into it. It's just that I wanted to see if I am able to write the code by myself first, so that I can then compare what I was able to produce to what other produced, but I'll definitely look at it. Thank

Re: m4 macro expansion problem

2021-08-25 Thread Sébastien Hinderer
Sébastien Hinderer (2021/08/25 15:45 +0200): > Dear Nick, > > Yes, your email was definitely helpful and clear! Many thanks for that! > > Now the macro works like a charm. > > The only thing that remains osbcure to me is what would be the best way > to generate our &quo

Re: m4 macro expansion problem

2021-08-25 Thread Sébastien Hinderer
Hey Zack! Many thanks for your reposne! I'll not quote you, to keep mine short. No, I wasn't aware that the macro wouold be executed several times. It's a pity, but I do think it will do exactly the same thing eeach time. And at the moemnt, as soon as we use some components of VERSION in the bui

Description not expanded in a call to AC_DEFINE

2021-08-31 Thread Sébastien Hinderer
Dear all, I just added a bunch of AC_DEFINE invocations to my configure.ac, with two arguments for each of them: a symbol name and a value. All of them are expanded correctly and the expected header file is generated. As the next step, I wanted to add a description as the third argument, hoping

Re: Description not expanded in a call to AC_DEFINE

2021-08-31 Thread Sébastien Hinderer
Dear Nick, Many thanks for your prompt and helpful response! So in my case, the file in question is called "version.h", so am I thus correct that the description mechanism will not work and that I better put the comments, if any, in version.h.in? Thanks, Sébastien.

Re: Description not expanded in a call to AC_DEFINE

2021-09-01 Thread Sébastien Hinderer
Excellent! Thanks again Nick for being so helpful on a topic which is not well known at all by most of theengineers aroudn me (I'm supposed to be the expert, which should gives you a good indication ;-) ). Sébastien.

Re: m4 macro expansion problem

2021-09-08 Thread Sébastien Hinderer
Hey Peter, Peter Johansson (2021/08/26 10:26 +1000): > Hi Sebastien, > > On 26/8/21 12:49 am, Sébastien Hinderer wrote: > > > Perhaps macros > > > are available that let one write some content to a file directly from > > > aclocal.m4? > > There is a

Re: m4 macro expansion problem

2021-09-08 Thread Sébastien Hinderer
Zack Weinberg (2021/08/25 14:41 -0400): > On Wed, Aug 25, 2021, at 12:06 PM, Sébastien Hinderer wrote: > > Zack Weinberg (2021/08/25 11:39 -0400): > > > m4_syscmd is a primitive, and it doesn't expand its argument, so you need > > > to expand PKG_VERSION f

Re: Making a path absolute portably

2021-10-13 Thread Sébastien Hinderer
Hello Andy and all, I am replying to this alod thread... Andrew Price (2019/07/11 14:29 +0100): > > > On 11/07/2019 14:22, Sébastien Hinderer wrote: > > Dear Andrew and dear all, > > > > Many thanks for all your responses which I found all very useful and > >

abs_top_srcdir broken?

2021-10-18 Thread Sébastien Hinderer
Dear all, Given the follwing configure.ac script: AC_INIT([demo], [demo], [0.1], [d...@demo.org]) AC_MSG_NOTICE([abs_top_srcdir="$abs_top_srcdir"]) Tue configure script produced by autoconf 2.69 prints: configure: abs_top_srcdir="" Is that an expected behaviour? Thanks, Sébastien.

Re: abs_top_srcdir broken?

2021-10-19 Thread Sébastien Hinderer
Dear Nick, Nick Bowler (2021/10/18 13:39 -0400): > On 2021-10-18, Sébastien Hinderer wrote: > > Given the follwing configure.ac script: > > > > AC_INIT([demo], [demo], [0.1], [d...@demo.org]) > > AC_MSG_NOTICE([abs_top_srcdir="$abs_top_srcdir"]) >

Re: abs_top_srcdir broken?

2021-11-24 Thread Sébastien Hinderer
Hello Nick and all, I am following up on this. Nick Bowler (2021/10/18 13:39 -0400): > On 2021-10-18, Sébastien Hinderer wrote: > > Given the follwing configure.ac script: > > > > AC_INIT([demo], [demo], [0.1], [d...@demo.org]) > > AC_MSG_NOTICE([abs_top_srcdir="

Checking whether program foo supports option --bar

2022-03-01 Thread Sébastien Hinderer
Dear all, Is there a conventional / recommended way to test whether a program supports a given command-line option? I understand the test needs to be somehow program-specific but I still wonder whether there are some macros around that can be used to make writing this test simpler. To be more sp

Re: Checking whether program foo supports option --bar

2022-03-10 Thread Sébastien Hinderer
Hello, Peter Johansson (2022/03/02 09:13 +1000): > Hi Sebasien, > > On 2/3/22 04:23, Paul Eggert wrote: > > On 3/1/22 09:08, Sébastien Hinderer wrote: > > > Is there a conventional / recommended way to test whether a program > > > supports a given command-line o

Generating configuration files conditionnally?

2022-06-16 Thread Sébastien Hinderer
Dear all, Assume a source package that can give rise to several binary packages (they can be enabled at configure time) and assume that each binary package has a META file describing it. Is it possible to have the META files produced from META.in files but only if the package they describe has be

Re: Generating configuration files conditionnally?

2022-06-16 Thread Sébastien Hinderer
Many thanks Nick! I don't know what confused me. I was under the (wrong) impression that the AC_CONFIG_FILES macro would somehow be evaluated beforeone even knows the value of the configure varialbes. I now understand I was wrong and apologize for having asked such an obvious question. All the b

AC_SYS_LARGEFILE

2023-09-11 Thread Sébastien Hinderer
Dear all, I am writing with a quesiton about the AC_SYS_LARGEFILE macro. It would be great to be able to use it but according to its documentation, the macro adds its flags to the CC output variable, which is not convenient in my context because we have dedicated variables not only for C flags

Re: AC_SYS_LARGEFILE

2023-09-11 Thread Sébastien Hinderer
Dear Bob, Many thanks for your repsonse! Bob Friesenhahn (2023/09/11 11:28 -0500): > On Mon, 11 Sep 2023, Sébastien Hinderer wrote: > > > Dear all, > > > > I am writing with a quesiton about the AC_SYS_LARGEFILE macro. > > > > It would be great to be

Re: AC_SYS_LARGEFILE

2023-09-13 Thread Sébastien Hinderer
Hi, Many thanks for your response. Nick Bowler (2023/09/11 13:56 -0400): > On 2023-09-11, Sébastien Hinderer wrote: > > I am writing with a quesiton about the AC_SYS_LARGEFILE macro. > > > > It would be great to be able to use it but according to its > > documentatio

Re: AC_SYS_LARGEFILE

2023-09-18 Thread Sébastien Hinderer
Hello, Many thanks for your response. Paul Eggert (2023/09/11 13:38 -0500): > On 9/11/23 13:23, Russ Allbery wrote: > > I suspect that the aswer to the original question is "don't worry about > > it, just use AC_SYS_LARGEFILE, because no system you will build on will > > need the CC modification

Re: AC_SYS_LARGEFILE

2023-09-18 Thread Sébastien Hinderer
Many thanks for the message below which I found enlighetning. Seb. Russ Allbery (2023/09/11 11:23 -0700): > Nick Bowler writes: > > > Looking at the code, CC is modified only if the -n32 option is needed to > > enable large-file support. The comments suggest this is required on > > IRIX. If la

Re: AC_SYS_LARGEFILE

2023-09-19 Thread Sébastien Hinderer
Paul Eggert (2023/09/18 13:46 -0700): > On 2023-09-18 02:55, Sébastien Hinderer wrote: > > the project currently has the convention of including > > system headers before its ocnfiguraiotn headers > > Ouch. The Autoconf manual explicitly says "The package should ‘#in

Evaluating arithmetic expressions with macros (eval)

2023-10-04 Thread Sébastien Hinderer
Dear all, I find myself stuck with something which I assume is trivial. I define: m4_define([X], [9]) m4_define([Y], [3]) And I would like to define Z as being the arithmetic sum of X and Y and can seem to get it. I tried several variations of eval but had no success. I understand that all the

Re: Evaluating arithmetic expressions with macros (eval)

2023-10-12 Thread Sébastien Hinderer
Dear all, Apologies for my so late response, when Nick's one came in so promptly and has been so useful. Nick Bowler (2023/10/04 16:29 -0400): > Hi, > > On 2023-10-04, Sébastien Hinderer wrote: > > I find myself stuck with something which I assume is trivial. I define: >

Re: Evaluating arithmetic expressions with macros (eval)

2023-10-12 Thread Sébastien Hinderer
Hi, Peter Hull (2023/10/12 15:04 +0100): > On Thu, 12 Oct 2023 at 14:41, Sébastien Hinderer > wrote: > > Aht alone was useful. It made me realise that I was using eval, rather > > than m4_eval. I assume this is why it didn't work as expected. > > > > However, e

Executing code before AM_INIT_AUTOMAKE

2025-05-06 Thread Sébastien Hinderer
Dear all, If a configure.ac file contains: AM_INIT_AUTOMAKE([foreign]) It seems this gets executed very early in the generated configure script. For instance I tried to add the following invocation AC_MSG_NOTICE([Configuring mytool version AC_PACKAGE_VERSION]) _before_ the call to AM_INIT_A