Re: Making MSVC/clang-cl succeed AC_PROG_CC C11 discovery

2024-04-30 Thread Werner LEMBERG
> +*** AC_PROG_CC no longer tests for VLAs, or whether __STDC__ is defined. > + This ports better to MSVC, which does not support variable length > + arrays and does not define __STDC__. Suggestion: ``` *** AC_PROG_CC no longer tests for variable length arrays (VLAs), or whether __STDC__

Re: `cp -l` doesn't work correctly on some macOS versions

2024-02-03 Thread Werner LEMBERG
>> I looked into the autoconf info files, section 'Limitations of >> usual tools', and 'cp -l' wasn't explictly mentioned, > > Although tt's expecting a bit much for the Autoconf manual to say > every option that *isn't* portable, as there are so many (and they > proliferate), the manual could

Re: `cp -l` doesn't work correctly on some macOS versions

2024-02-02 Thread Werner LEMBERG
Thanks to all who have answered! >> I thought ln || ln -s was the standard >> recipe here > > Yes, "cp -l" isn't required by POSIX and is not portable in > general. For example, on AIX 7.1: > > $ cp -l a b > cp: Not a recognized flag: l > Usage: cp [-fhipHILPU][-d|-e] [-r|-R]

`cp -l` doesn't work correctly on some macOS versions

2024-02-02 Thread Werner LEMBERG
Folks, I'm shocked to read in https://apple.stackexchange.com/questions/464706/why-do-i-get-bad-file-descriptor-when-copying-using-hardlink-flag that `cp -l` fails for recent macOS versions – a LilyPond user just confirmed that, too... What do you recommend to test for and/or to

Re: Dependency tracking not working on macOS

2022-10-16 Thread Werner LEMBERG
> My suspicion is that you're running the old, broken version of GNU > make that Apple ships with its Xcode environment. Maybe the new GNU make is called 'gmake' on this platform? Werner

Re: what platforms don't have `dirname`?

2022-07-21 Thread Werner LEMBERG
>> it seems to me that the advice, while useful for autoconf, is very >> outdated. > > Thanks, I installed the attached. Thanks, too, for the quickly fix and reply! Werner

what platforms don't have `dirname`?

2022-07-21 Thread Werner LEMBERG
The autoconf info pages say ‘dirname’ Not all hosts have a working ‘dirname’, and you should instead use ‘AS_DIRNAME’ (*note Programming in M4sh::). [...] Looking into the git repository log it seems this remark is ld, essentially written before 1996. I now wonder whether

`./configure --help` fails if `configure` is dislocated

2022-07-20 Thread Werner LEMBERG
Take any `configure` script and move it to another directory. For example, executing the script from Emacs gives ``` configure: error: cannot find sources (src/lisp.h) in . or .. ``` which is ok. However, and I consider this a bug, you get exactly the same error message if you say

Re: New libtool maintainer: request for feedback

2021-10-26 Thread Werner LEMBERG
> I was recently added as the new maintainer of `libtool' [...] Excellent news! However, are you aware that you haven't introduced yourself on the 'libtool' mailing list? Making you a maintainer must have been a very recent decision, since on Oct 21st we accidentally discussed exactly that

Re: Version 2.72a fails with libarchive git version

2021-03-07 Thread Werner LEMBERG
Hello Zack, thanks for the analysis. >> [autoconf 6d38e9fa2b] >> [clang 9.0.1] >> [https://github.com/libarchive/libarchive.git] >> >> fails as below. > ... >> checking whether C compiler accepts -Wall... yes >> checking whether C compiler accepts -Wformat... yes >> checking whether C

Version 2.72a fails with libarchive git version

2021-02-27 Thread Werner LEMBERG
[for completeness I send this bug report to bug-autoconf, too] [autoconf 6d38e9fa2b] [clang 9.0.1] [https://github.com/libarchive/libarchive.git] Running autoreconf -fvim in libarchive's git repository, then executing CC=clang ./configure fails as below. I had to use autoconf version

Version 2.72a fails with libarchive git version

2021-02-22 Thread Werner LEMBERG
[autoconf 6d38e9fa2b] [clang 9.0.1] [https://github.com/libarchive/libarchive.git] Running autoreconf -fvim in libarchive's git repository, then executing CC=clang ./configure fails as below. I had to use autoconf version 2.69 to create a `configure` script that could be successfully

Re: Making Autoconf 2.70 happen in the near future

2020-03-10 Thread Werner LEMBERG
> - Run the bundled testsuite (plain ‘make check’ only, not ‘make >distcheck’) on the following OS and CPU combinations, all of which >are readily accessible to me: [...] > >This list is shorter than I would like, particularly in the OS >department. I was hoping to get access

Re: configure checking for csh hash hack

2015-05-08 Thread Werner LEMBERG
It's a problem related to the groff source code, and it's not something Autoconf can fix. :-) The attached patch might fix it. I haven't tested this patch, as I stopped using csh over 35 years ago and never want to go back. I think groff would be better off if it didn't worry about csh

Re: cross-compilation and proprietary pkg-config replacements (pcre-config, pcap-config, etc)

2014-08-15 Thread Werner LEMBERG
It seems it's en vogue for libs to ship their own broken replacement rather than supplying a portable pkgconfig file... the list is big, but these here are the most often used ones: pcap-config, pcre-config, freetype-config, apr-1-config, glib-config, gtk-config, ncursesw5-config,

Re: [GNU Autoconf 2.69] OSX autotools: `aclocal.m4' not being output by `autom4te'

2014-06-27 Thread Werner LEMBERG
Ultimately, it is partisan nonsense that the only file system that can be agreed on is FAT, but that is the reality. There really are many, many more elegant solutions than sharing files using FAT! [...] Note, however, that failure of FAT *is not obvious* for the casual user! You have to

Re: [GNU Autoconf 2.69] OSX autotools: `aclocal.m4' not being output by `autom4te'

2014-06-27 Thread Werner LEMBERG
Ultimately, it is partisan nonsense that the only file system that can be agreed on is FAT, but that is the reality. There really are many, many more elegant solutions than sharing files using FAT! [...] Note, however, that failure of FAT *is not obvious* for the casual user! You have to

Re: uint64_t fails with C++ (again)

2014-02-14 Thread Werner LEMBERG
I tend to work around these sorts of glitches using Gnulib; its stdint module fixes the portability problem with __STDC_LIMIT_MACROS that I know about. Admittedly Gnulib is not for everybody. Hehe. I use gnulib, so this is just fine for me. Will test `stdint' module soon – I've never

Re: uint64_t fails with C++ (again)

2014-02-07 Thread Werner LEMBERG
Repeating your test verbatim I get the #error message! How about if you compile with the following command instead? g++ -D__STDC_LIMIT_MACROS -c t.cc That fixes the problem on RHEL 6.4, anyway. It works for me, too. Will this problem be handled in a forthcoming autoconf release?

Re: uint64_t fails with C++ (again)

2014-02-07 Thread Werner LEMBERG
Will this problem be handled in a forthcoming autoconf release? I'm afraid I don't understand the problem yet, as your original email defined __STDC_LIMIT_MACROS, but now you're saying that -D__STDC_LIMIT_MACROS fixes the problem. Indeed, doing ./configure CC=g++

Re: uint64_t fails with C++ (again)

2014-02-07 Thread Werner LEMBERG
I tend to work around these sorts of glitches using Gnulib; its stdint module fixes the portability problem with __STDC_LIMIT_MACROS that I know about. Admittedly Gnulib is not for everybody. Hehe. I use gnulib, so this is just fine for me. Will test `stdint' module soon – I've never

uint64_t fails with C++ (again)

2014-02-06 Thread Werner LEMBERG
In 2011, there was the following thread started by me: http://lists.gnu.org/archive/html/autoconf/2011-12/msg2.html The solution that worked eventually was to put AC_PROG_CC AC_PROG_CPP AC_TYPE_UINT64_T into my configure.ac file, and #include config.h /* make `stdint.h'

Re: uint64_t fails with C++ (again)

2014-02-06 Thread Werner LEMBERG
Hello Paul! neither `UINT64_MAX' nor `uint64_t' gets define That's odd, because UINT64_MAX is defined for me, even for this much-simpler program: #include stdint.h #ifdef UINT64_MAX typedef uint64_t TA_ULongLong; #else # error No unsigned 64bit wide data type found. #endif If I

autoconf/automake rules for building OS X application bundles

2012-05-21 Thread Werner LEMBERG
Is anybody aware of automake or autoconf rules to build an OS X application bundle (and transforming it into a dmg file)? autoconf-archive doesn't show anything up, and my search with google wasn't successful... Werner ___ Autoconf mailing list

Re: [autoconf] Re: Enforce strict C99 in Autoconf project

2012-05-06 Thread Werner LEMBERG
Although I understand that autoconf is designed for the portability and expecting a dictionary of compiler-specific options in there is out of the scope, I'm interested in the appropriate place to collect such. Perhaps http://www.gnu.org/software/autoconf-archive/ Werner

detecting windows

2012-02-03 Thread Werner LEMBERG
Folks, is there an autoconf macro to detect MS Windows? Werner ___ Autoconf mailing list Autoconf@gnu.org https://lists.gnu.org/mailman/listinfo/autoconf

Re: detecting windows

2012-02-03 Thread Werner LEMBERG
is there an autoconf macro to detect MS Windows? Is that a joke? The trouble is, that autoconf requires a shell and M4, which Windows doesn't provide (only in Cygwin). So MS Windows is detected when autoconf/configure does not run... Very witty :-) No, it's not a joke. I don't want to

Re: detecting windows

2012-02-03 Thread Werner LEMBERG
Thanks for the answers, Vincent and Peter! You do as you do with whatever else you are requiring. Check if #include windows.h is there, and check if you can link with some API of your choice. [...] I would have expected something like this as a ready-to-run macro in the autoconf-macro

MinGW's awk 3.1.7, config.status, and CRLF issues

2012-01-29 Thread Werner LEMBERG
Folks, after a few hours of debugging I've discovered that either MinGW awk 3.1.7 or MinGW autoconf 2.68's awk script as used in `config.status' (to convert `foo.h.in' into `foo.h') has problems with CRLF: Only if the original input file has Unix line endings, the script runs successfully!

Re: [Mingw-users] MinGW's awk 3.1.7, config.status, and CRLF issues

2012-01-29 Thread Werner LEMBERG
Yes, MSYS is set to use LF line endings. OK. In other words, it is a problem of the awk script in `config.status' which doesn't anticipate the CRLF case within a Unix line ending environment... And indeed, if I read the correctly correctly, the $ac_cs_awk_cr stuff or something similar is

AC_PROG_LN_S limitation

2011-12-26 Thread Werner LEMBERG
I've received the following bug report from Eli: I've built Groff 1.21 on MS-Windows using the MinGW tools, and hit a small snag when installing the result. The `install' target in the top-level Makefile ends with this command $(LN_S) $(version)$(revision) current Since

uint64_t fails with C++

2011-12-07 Thread Werner LEMBERG
In my configure.ac file I have AC_PROG_CC AC_PROG_CPP AC_TYPE_UINT64_T In my C file I have #include config.h #if HAVE_STDINT_H # include stdint.h #endif #if defined UINT64_MAX || defined uint64_t typedef uint64_t TA_ULongLong; #else # error No unsigned 64bit wide

Re: uint64_t fails with C++

2011-12-07 Thread Werner LEMBERG
My main question is: Why does the autoconf test succeeds (which properly uses g++ for its test according to the config.log file) but the compilation in my test file fails? A bug? A feature? Sorry, I'm not sure about that bit. Does config.log show it using any special compiler options

Re: uint64_t fails with C++

2011-12-07 Thread Werner LEMBERG
It's nothing to do with autoconf really, configure correctly finds uint64_t, your C program then checks for UINT64_MAX or a uint64_t macro instead of #include config.h and checking for HAVE_UINT64_T. HAVE_UINT64_T is *not* defined in my config.h... C++ compilers do not get these definition

Re: uint64_t fails with C++

2011-12-07 Thread Werner LEMBERG
I still don't understand the details of the autoconf problem (and I still think that something is fishy), but defining this macro works just fine :-) Clearly, depending on an implementation-dependent macro is not suitable for portable software. So please tell me how to solve this properly

Re: uint64_t fails with C++

2011-12-07 Thread Werner LEMBERG
If the above guesswork holds, It doesn't :-) then I wonder why your project uses C++ file extensions and $CC (your said it was a C file). It should be either C file extensions and $CC, or C++ file extensions and $CXX. Or? As Nelson Beebe has explained to me some time ago, there are a bunch

Re: uint64_t fails with C++

2011-12-07 Thread Werner LEMBERG
If you do need the UINT64_MAX etc macros as well as the uint64_t type then you will have to define __STDC_LIMIT_MACROS. Yep. I believe this is something I would have never found out without assistance. Thanks again to all of you! Werner ___

Re: uint64_t fails with C++

2011-12-07 Thread Werner LEMBERG
== 2011-12-07 Werner Lemberg w...@gnu.org doc: Mention __STDC_LIMIT_MACROS * doc/autoconf.texi (Particular Type Checks): We need this macro for C++ compilation. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index d7d2231

is ${!...} portable?

2009-05-31 Thread Werner LEMBERG
Sometimes indirect expansion helps a lot in writing shell scripts. Is `${!foo}' portable or an invention of Bash? Perhaps it makes sense to mention this in the autoconf info file. Werner

Re: is ${!...} portable?

2009-05-31 Thread Werner LEMBERG
Sometimes indirect expansion helps a lot in writing shell scripts. Is `${!foo}' portable or an invention of Bash? it's specific to bash Thanks. Perhaps it makes sense to mention this in the autoconf info file. maybe, but where would you stop? You are right. Maybe a bad idea.

Re: config.status problem with UWIN

2009-03-12 Thread Werner LEMBERG
I agree. Can you retry with current git Autoconf (i.e., build and install that somewhere, and run its autoreconf -vif on groff)? I postpone this since... If it doesn't work either, then I guess it would be interesting to see sh -x ./configure output for a small example configure

config.status problem with UWIN

2009-03-09 Thread Werner LEMBERG
Folks, please have a look at the two config.status files. One has been created on my GNU/Linux box, the other one on MS-Windows: uname -m = i1586 uname -r = 4.2/5.1 uname -s = UWIN-XP uname -v = 2600 while the configure script runs successfully on both boxes, executing config.status

Re: LIBEXT

2009-01-05 Thread Werner LEMBERG
What about adding a test to find out the extension of (static) libraries? Having a LIBEXT variable would be quite helpful. [...] you can alternatively use the gnulib module havelib (which will use the logic in the config.rpath file to set libext). This looks very promising, thanks! How

LIBEXT

2009-01-04 Thread Werner LEMBERG
6½ years ago I've asked this: What about adding a test to find out the extension of (static) libraries? Having a LIBEXT variable would be quite helpful. I've never got a response :-) Werner

Re: buggy sed on Darwin?

2006-03-12 Thread Werner LEMBERG
I wonder whether this is a BSD sed bug or whether I'm doing something wrong. GNU sed recognizes `\+' as shorthand for `\{1,\}', but POSIX leaves its meaning undefined. I suspect BSD sed treats it like literal `+'. Other people already pointed that out to me. Thanks for your answer.

GNU and BSD sed differences

2005-12-12 Thread Werner LEMBERG
I suggest to add that `\?', `\+', and `\|' should not be used in sed expressions because other sed implementations don't interpret those entities specially. Inspite of marked as GNU extensions in sed.info, it is easy to miss that. Werner

Re: strncasecmp dcl

2001-06-28 Thread Werner LEMBERG
[No longer Cc'ed to [EMAIL PROTECTED]] Now, I took some more time to think about it, and here is my proposal: when $4 is not given (was introduced in 2.50a, did not exist before, so we are free to do whatever we want with it), just do what Autoconf always did: merely check it can be