Re: depcomp changes for IRIX
David, [depcomp with SGI MIPSpro] The second is optional; to shorten some very long dependency lines I pruned out all the system headers (all headers with absolute paths). The problem you're probably seeing without your patch is probably lines that are cut off, thereby giving you faulty dependencies. The cause of this is actually that IRIX sed cuts off lines longer than a certain limit (4096 characters, if I remember correctly). I submitted a workaround for this long ago, so this is also fixed in the CVS sources. Regards, Morten
Re: Automake shooting in its foot
Akim, In fact, I am still against generic hooks because that's a bad thing to do. Nobody where ever imagine doing this in another programming language. [...] Emacs Lisp comes to mind.. ;-) Regards, Morten
[PATCH] Output files with LF only
Hi, someone mis-applied my patch so that ``binmode'' was set _after_ Automake had opened a file for writing. Regards, Morten Index: ChangeLog === RCS file: /cvs/automake/automake/ChangeLog,v retrieving revision 1.904 diff -u -r1.904 ChangeLog --- ChangeLog 2000/10/23 18:58:33 1.904 +++ ChangeLog 2000/11/15 11:41:42 @@ -1,3 +1,8 @@ +2000-11-15 Morten Eriksen [EMAIL PROTECTED] + + * aclocal.in (write_aclocal): Set ``binmode'' after file has been + opened, otherwise it has no effect. + 2000-10-23 Morten Eriksen [EMAIL PROTECTED] * aclocal.in (write_aclocal): Don't write aclocal.m4 with Index: aclocal.in === RCS file: /cvs/automake/automake/aclocal.in,v retrieving revision 1.49 diff -u -r1.49 aclocal.in --- aclocal.in 2000/10/23 18:58:33 1.49 +++ aclocal.in 2000/11/15 11:41:44 @@ -427,6 +427,8 @@ print STDERR "Writing $output_file\n" if $verbosity; +open (ACLOCAL, " " . $output_file) + || die "aclocal: couldn't open \`$output_file' for writing: $!\n"; # In case we're running under MSWindows, don't write with CRLF. # (This circumvents a bug in at least Cygwin bash where the shell @@ -434,8 +436,6 @@ # and CRLF.) binmode ACLOCAL; -open (ACLOCAL, " " . $output_file) - || die "aclocal: couldn't open \`$output_file' for writing: $!\n"; print ACLOCAL "# $output_file generated automatically by aclocal $VERSION\n"; print ACLOCAL "\ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
[PATCH] Fix for CRLF problem
Hi, I had problems running a configure script under Cygwin, because of extra CR-characters (i.e. ASCII \015, "carriage return") being added to the shell code of the macros gathered into aclocal.m4 by Automake's ``aclocal''. This lead to problems when running ``configure'' due to what looks like a bug in the Cygwin bash port (using the latest release): lines ending with '\' (i.e. "continuation" lines) plus CRLF will not be parsed correctly -- bash just ends the command, as if the '\' character wasn't there. The attached patch will let Automake circumvent this bug by writing aclocal.m4 in binary mode (i.e. with just LF instead of CRLF under MSWindows). I believe this to be the correct behavior anyway, Cygwin bash bug or not. (There might be a better way than using ``binmode'' to instruct Perl's ``print'' function to write LF instead of CRLF, but I couldn't find one. I'm no Perl guru. :^}) BTW, I've also reported the bash bug to the cygwin mailinglist. Regards, Morten Index: ChangeLog === RCS file: /cvs/automake/automake/ChangeLog,v retrieving revision 1.891 diff -u -r1.891 ChangeLog --- ChangeLog 2000/10/06 22:49:14 1.891 +++ ChangeLog 2000/10/09 10:59:37 @@ -1,3 +1,8 @@ +2000-10-09 Morten Eriksen [EMAIL PROTECTED] + + * aclocal.in (write_aclocal): Don't write aclocal.m4 with + CRLFs. This circumvents a bug in Cygwin bash. + 2000-10-06 Alexandre Duret-Lutz [EMAIL PROTECTED] * aclocal.in (add_file): Strip comments while scanning for Index: aclocal.in === RCS file: /cvs/automake/automake/aclocal.in,v retrieving revision 1.46 diff -u -r1.46 aclocal.in --- aclocal.in 2000/10/06 22:49:14 1.46 +++ aclocal.in 2000/10/09 10:59:38 @@ -429,6 +429,13 @@ open (ACLOCAL, " " . $output_file) || die "aclocal: couldn't open \`$output_file' for writing: $!\n"; + +# In case we're running under MSWindows, don't write with CRLF. +# (This circumvents a bug in at least Cygwin bash where the shell +# parsing fails on lines ending with the continuation character '\' +# and CRLF.) +binmode ACLOCAL; + print ACLOCAL "dnl $output_file generated automatically by aclocal $VERSION\n"; print ACLOCAL "\ dnl Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
Re: [PATCH] Fix for CRLF problem
Hi, I found another problem with Automake under Cygwin. The Makefile.in files are written with CRLF, which causes the grep and/or sed code which extracts the list of dependency files in AM_OUTPUT_DEPENDENCY_COMMANDS to fail. Updated patch attached below. Regards, Morten Index: ChangeLog === RCS file: /cvs/automake/automake/ChangeLog,v retrieving revision 1.891 diff -u -r1.891 ChangeLog --- ChangeLog 2000/10/06 22:49:14 1.891 +++ ChangeLog 2000/10/09 14:43:56 @@ -1,3 +1,12 @@ +2000-10-09 Morten Eriksen [EMAIL PROTECTED] + + * aclocal.in (write_aclocal): Don't write aclocal.m4 with + CRLFs. This circumvents a bug in Cygwin bash. + + * automake.in (generate_makefile): Don't write Makefile.in + files with CRLFs, as it causes problems for the dependency-file + extraction in AM_OUTPUT_DEPENDENCY_COMMANDS. + 2000-10-06 Alexandre Duret-Lutz [EMAIL PROTECTED] * aclocal.in (add_file): Strip comments while scanning for Index: aclocal.in === RCS file: /cvs/automake/automake/aclocal.in,v retrieving revision 1.46 diff -u -r1.46 aclocal.in --- aclocal.in 2000/10/06 22:49:14 1.46 +++ aclocal.in 2000/10/09 14:43:57 @@ -429,6 +429,13 @@ open (ACLOCAL, " " . $output_file) || die "aclocal: couldn't open \`$output_file' for writing: $!\n"; + +# In case we're running under MSWindows, don't write with CRLF. +# (This circumvents a bug in at least Cygwin bash where the shell +# parsing fails on lines ending with the continuation character '\' +# and CRLF.) +binmode ACLOCAL; + print ACLOCAL "dnl $output_file generated automatically by aclocal $VERSION\n"; print ACLOCAL "\ dnl Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc. Index: automake.in === RCS file: /cvs/automake/automake/automake.in,v retrieving revision 1.796 diff -u -r1.796 automake.in --- automake.in 2000/09/15 20:09:55 1.796 +++ automake.in 2000/10/09 14:44:05 @@ -689,6 +689,11 @@ } print "automake: creating ", $makefile, ".in\n" if $verbose; +# In case we're running under MSWindows, don't write with CRLF +# (as it causes problems for the dependency-file extraction in +# AM_OUTPUT_DEPENDENCY_COMMANDS). +binmode GM_FILE; + print GM_FILE $output_vars; # We make sure that `all:' is the first target. print GM_FILE $output_all;
[PATCH] Dependency tracking for Microsoft Visual C/C++
Hi, this patch implements support for extracting dependency tracking information by using the preprocessor mode of the Microsoft Visual C/C++ compiler. Regards, Morten Index: ChangeLog === RCS file: /cvs/automake/automake/ChangeLog,v retrieving revision 1.891 diff -u -r1.891 ChangeLog --- ChangeLog 2000/10/06 22:49:14 1.891 +++ ChangeLog 2000/10/09 17:46:26 @@ -1,3 +1,8 @@ +2000-10-09 Morten Eriksen [EMAIL PROTECTED] + + * depcomp (msvisualcpp): New dependency tracking mode, this one + works with Microsoft Visual C++. + 2000-10-06 Alexandre Duret-Lutz [EMAIL PROTECTED] * aclocal.in (add_file): Strip comments while scanning for Index: depcomp === RCS file: /cvs/automake/automake/depcomp,v retrieving revision 1.8 diff -u -r1.8 depcomp --- depcomp 2000/08/20 15:58:45 1.8 +++ depcomp 2000/10/09 17:46:27 @@ -263,6 +272,44 @@ rm -f "$depfile" cat "$tmpdepfile" "$depfile" sed "$tmpdepfile" -e 's/^[^:]*: //' -e 's/$/ :/' "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " +case " $* " in +*" --mode=compile "*) + for arg + do # cycle over the arguments +case "$arg" in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; +esac +"$@" -E | +sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | +sort | uniq "$tmpdepfile" + ) + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + echo "$object : \\" "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' "$depfile" + echo " " "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' "$depfile" rm -f "$tmpdepfile" ;;
Re: C++ shared libraries
Simon Richter [EMAIL PROTECTED] writes: probably this is a FAQ, [...] I don't think there's a decent FAQ for any of the trio of configure/build tools, so you should be on safe ground. :^) but i couldn't find an answer: How can I tell automake to check for a C++ library (i.e. that contains no C symbols)? (That should be "autoconf", not "automake".) We've been using AC_TRY_LINK with a minimal test program utilizing at least one of the functions in the library. Works like a charm. Feel free to check out the macros we've written for the Coin project, sourcecode available from URL:http://www.coin3d.org. Regards, Morten
Re: Problem in depcomp due to SGI IRIX sed
Another suggestion for a fix -- I don't know if this is to be considered worse or better than the previous patch. Is this way of using tail portable? (The _only_ other use of tail I could find in Autoconf and Automake is in depcomp.) Regards, Morten Index: depcomp === RCS file: /cvs/automake/automake/depcomp,v retrieving revision 1.5 diff -u -r1.5 depcomp --- depcomp 1999/12/14 04:36:10 1.5 +++ depcomp 2000/06/02 07:55:07 @@ -123,7 +123,14 @@ fi rm -f "$depfile" echo "$object : \\" "$depfile" - sed 's/^[^:]*: / /' "$tmpdepfile" "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than 8192 characters. + tr ' ' ' +' "$tmpdepfile" | tail +2 | tr ' +' ' ' $depfile + tr ' ' ' ' "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation
Re: Changing the name of the PACKAGE at configure time
Tom Tromey [EMAIL PROTECTED] writes: tom There are a few tools like this. GNU stow is one. There is at least tom one other one whose name I forgot. Paul I think you're thinking of depot. It wasn't depot -- I forgot all about that one. So there's still one more out there. Perhaps you were thinking of Store, which should be referenced somewhere from http://www.pvv.org (their server seems to be down now, so I can't give a direct URL). Morten
Re: Changing the name of the PACKAGE at configure time
Tom Tromey [EMAIL PROTECTED] writes: [about making it possible to set PACKAGE] We could add it, but it doesn't seem that useful in general. It'd be nice to be able to name ``libmyfancylib'' as ``libmyfancylibdbg'' depending on a --disable-debug option to configue, for instance, to make it possible to dual-install a debug version and a regular version of the same library. This seems to be a common thing to do in the MSWin-world, where debug-versions of DLLs are often installed with a "d" as a postfix to the "real" name. Morten
Re: Testing for a library with a function different from main() (Was: Testing for a library with $CXX (instead of $CC))
Tom Tromey [EMAIL PROTECTED] writes: "Morten" == Morten Eriksen [EMAIL PROTECTED] writes: Morten BTW, I've already written a pretty extensive Qt-check macro. Feel free Morten to check it out, its part of our SoQt distribution at Morten URL:http://www.sim.no/coin.html, or just do: Why not submit it to the autoconf macro archive? Will do, just need to find the time to do some cleanups, corrections etc, so I don't embarass myself in public any more than I need to. :^/ BTW, there's a whole bunch of nice and useful macros in our Coin and Coin-related projects which should eventually be submitted to the archive. If anyone got too much spare time on their hands, feel free to hack away at them (hey, I can dream). :^} Morten