Re: autoconf bug?

2001-02-09 Thread Tomas Berndtsson

Alexandre Oliva [EMAIL PROTECTED] writes:

 On Feb  8, 2001, Tomas Berndtsson [EMAIL PROTECTED] wrote:
 
  My autoconf version is 2.13. m4 is GNU m4 1.4. 
  I have the following in my configure.in:
 
  AC_CHECK_FUNCS(dlopen, , AC_CHECK_LIB(dl,dlopen, ,
  [AC_MSG_ERROR([
  *** Zen does not function properly without dlopen, sorry.])]))
 
 You're missing quotes around [AC_CHECK_LIB(..)]

I don't see why I need that, but I tried, and it still didn't
work. This is what it looks like now:

AC_CHECK_FUNCS(dlopen, , [AC_CHECK_LIB(dl,dlopen, ,
[AC_MSG_ERROR([
*** Zen does not function properly without dlopen, sorry.])])])

which gave exactly the same error as before.


Tomas




Re: autoconf bug?

2001-02-09 Thread Alexandre Oliva

On Feb  9, 2001, Tomas Berndtsson [EMAIL PROTECTED] wrote:

 I don't see why I need that, but I tried, and it still didn't
 work.

In this case, you may have found a bug in autoconf.  The automake
mailing list is certainly not the best place to report an autoconf
bug :-)

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist*Please* write to mailing lists, not to me




Re: autoconf bug?

2001-02-09 Thread Tomas Berndtsson

Alexandre Oliva [EMAIL PROTECTED] writes:

 On Feb  9, 2001, Tomas Berndtsson [EMAIL PROTECTED] wrote:
 
  I don't see why I need that, but I tried, and it still didn't
  work.
 
 In this case, you may have found a bug in autoconf.  The automake
 mailing list is certainly not the best place to report an autoconf
 bug :-)

Well, the webpage said: "The mailing list [EMAIL PROTECTED] is for
discussion of Automake, Autoconf, and other configuration/portability
tools (e.g., libtool).", so I thought it would be a good starting
point, in case it was just my mistake.

The autoconf online manual says bugs should go to
[EMAIL PROTECTED], but that seems like a pretty old and
possibly outdated address (no @gnu.org address). Is there a better
one?


Tomas




Re: 29-backname.patch

2001-02-09 Thread Akim Demaille

Tom Tromey [EMAIL PROTECTED] writes:

  "Akim" == Akim Demaille [EMAIL PROTECTED] writes:
 
  Hmm... shouldn't we print all the copyright years here?
  And in aclocal?
 
 Akim No idea, you are the Boss :)
 
 That's cheating!  

:)

 What does autoconf do?

/tmp % ace --version nostromo 11:52
autoconf (GNU Autoconf) 2.49d
Written by David J. MacKenzie.

Copyright 1992, 1993, 1994, 1996, 1999, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 Maybe we need to ask RMS.

Ahem... Don't.




Re: Allow per-object cflags?

2001-02-09 Thread Emil Ong

On 8 Feb 2001, Tom Tromey wrote:

 This ought to work with automake 1.4b.

Yep, it did actually.  I didn't realize that I had to delete my old
"missing" file and run --add-missing again.  This might be worth
documenting, at least to prevent guys like me from complaining that it
doesn't work. :)  I would also suggest fixing the TODO to avoid confusion.

Sorry for the trouble and thanks for your help,
Emil





Re: 29-backname.patch

2001-02-09 Thread Lars J. Aas

On Fri, Feb 09, 2001 at 11:53:08AM +0100, Akim Demaille wrote:
: /tmp % ace --version nostromo 11:52
: autoconf (GNU Autoconf) 2.49d
: Written by David J. MacKenzie.

This is kind of an unfair statement the way things are now, isn't it?
More like "Written by `cat AUTHORS` with the help from `cat THANKS`."

  Lars J
-- 
Innovation is one percent inspiration and ninetynine percent perspiration,
and in my case; twice that...  -- Norville Barnes, `The Hudsucker Proxy'




Re: [revised patch 1/1] support AC_SUBST'able automake rules

2001-02-09 Thread Lars J. Aas

On Fri, Feb 09, 2001 at 10:48:38AM -0600, Michael Bletzinger wrote:
: The thing is, that since every AC_SUBST'd variable is transformed into a
: make variable, you can already specify all sorts of derived stuff using
: make variables in Makefile.am's with the CVS automake. For example:
: 
: in the configure.in
: 
: AC_SUBST(arch)
: AC_SUBST(nonthreaded)
: AC_SUBST(nonthreaded_sources)
: 
: 
: and in the Makefile.am
: 
: foo_SOURCES = foo.c fee_$(arch).c
: 
: lib_LTLIBRARIES = libfoo_$(nonthreaded).la
: 
: libfoo___nonthreaded__la_SOURCES = foo.c $(nonthreaded_sources)

Ah, I missed this "hack" when I started trying.  I don't consider it to
be "supported", though, since you need to transform the characters...

: So I'm not sure that doing autoconf substitution really adds anything.  

If nothing else, it will de-obfuscate such hacks as the one above :)

  Lars J
-- 
Innovation is one percent inspiration and ninetynine percent perspiration,
and in my case; twice that...  -- Norville Barnes, `The Hudsucker Proxy'




Re: [revised patch 1/1] support AC_SUBST'able automake rules

2001-02-09 Thread Michael Bletzinger

"Lars J. Aas" wrote:
 
 On Fri, Feb 09, 2001 at 10:48:38AM -0600, Michael Bletzinger wrote:
 : The thing is, that since every AC_SUBST'd variable is transformed into a
 : make variable, you can already specify all sorts of derived stuff using
 : make variables in Makefile.am's with the CVS automake. For example:
 :
 : in the configure.in
 :
 : AC_SUBST(arch)
 : AC_SUBST(nonthreaded)
 : AC_SUBST(nonthreaded_sources)
 :
 :
 : and in the Makefile.am
 :
 : foo_SOURCES = foo.c fee_$(arch).c
 :
 : lib_LTLIBRARIES = libfoo_$(nonthreaded).la
 :
 : libfoo___nonthreaded__la_SOURCES = foo.c $(nonthreaded_sources)
 
 Ah, I missed this "hack" when I started trying.  I don't consider it to
 be "supported", though, since you need to transform the characters...
 
 : So I'm not sure that doing autoconf substitution really adds anything.
 
 If nothing else, it will de-obfuscate such hacks as the one above :)

Well one person's hack is another person's cool trick :-)

On the minus side using an autoconf substitution limits the characters
you can use for target names because the name has to translate to a make
variable.  That's why the character transformation is in automake.

On the plus side using autoconf will resolve all of the targets after
configure is run while using make variables will postpone the resolution
until the make install step.

I don't have a problem with your patch.  I just want to collect enough
information so that these things can be written up in the docs.

Michael

 
   Lars J
 --
 Innovation is one percent inspiration and ninetynine percent perspiration,
 and in my case; twice that...  -- Norville Barnes, `The Hudsucker Proxy'

-- 
--
Michael Bletzinger  Software Developer, Alliance Computational
[EMAIL PROTECTED]  Environment  Security
217 265 5137NCSA




Re: include only in cvs-automake?

2001-02-09 Thread Gary V. Vaughan


On Wed, Feb 07, 2001 at 11:32:43AM -0700, Tom Tromey wrote:
  "Per" == Per Bothner [EMAIL PROTECTED] writes:
 
 Per The Autotools book, the automake-1.4 manual, and the
 Per automake-1.4/NEWS all imply that "include" is part of automake
 Per 1.4.  So how come it doesn't work, but when I try automake from
 Per cvs it does work?
 
 Maybe it is a bug in the book.  It's hard to remember 1.4 :-(

Wow.  I almost sent a message to say that I had definitely used
`include' in some old (circa-1997) projects.  But I dug out the code,
and it seems I was relying on make's own include implementation.  I am
still using automake-1.4 (so that I can be certain that the upcoming
libtool releases will work correctly with it) and had never noticed
this before... 

Tom, would you commit an errata to the autobook pages to describe this
bug please?

FYI, I attach the macro I dug out, which allows you to add this to
your Makefile.am:

  @MAKEINCLUDE@ @MAKEQUOTE@$(top_builddir)/config/MakeRules@MAKEQUOTE@

This works with the `include file' and `.include "file"' syntaxes.

Cheers,
Gary.
-- 
  ___  _   ___   __  _ mailto: [EMAIL PROTECTED]
 / __|__ _ _ ___ _| | / / | / /_ _ _  _ __ _| |_  __ _ ___   [EMAIL PROTECTED] 
| (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \
 \___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/
home page:  /___/  /___/  gpg public key:
http://www.oranda.demon.co.uk   http://www.oranda.demon.co.uk/key.asc


dnl  -*- Mode: M4 -*- 
dnl 
dnl make.m4 --- determine correct make include syntax.
dnl 
dnl Author:Gary V. Vaughan [EMAIL PROTECTED]
dnl Maintainer:Gary V. Vaughan [EMAIL PROTECTED]
dnl Created:   Mon Jul 20 01:23:02 1998
dnl Last Modified: Wed Jul 22 01:52:32 1998 
dnlby: Gary V. Vaughan [EMAIL PROTECTED]
dnl 
dnl @(#) $Id$
dnl 
dnl 
dnl Copyright (C) 1998 Gary V. Vaughan
dnl 
dnl This file is distributed freely, but without  warranty. No author or
dnl distributer  accepts responsibility to anyone  for any damage caused
dnl to hardware or software  through the use or  misuse of this  file in
dnl any form, or  for whether it serves  any particular purpose or works
dnl at  all, regardless  of further   modifications made  to  it by  any
dnl subsequent distributers.
dnl 
dnl Permission is granted to copy, use, modify or redistribute this file
dnl provided the copyright notice and  this notice remains intact in its
dnl entirety in any and all subsequent copies.
dnl 
dnl Code:

# Find the include syntax used by the make program, define MAKEINCLUDE
# and MAKEQUOTE so that using the following in a Makefile.in should work
# most anywhere:
#   @MAKEINCLUDE@ @MAKEQUOTE@makefragment@MAKEQUOTE@
# serial 1

dnl LILAC_PROG_MAKE_INCLUDE
dnl Some make programs require includes to be
dnl .include "file"
dnl others...
dnl include file
dnl Checks the MAKE environment variable for the name of the make command
dnl to use.
AC_DEFUN(LILAC_PROG_MAKE_INCLUDE,
[AC_MSG_CHECKING([how make handles includes])
AC_CACHE_VAL(lilac_cv_prog_make_include,
[cat  confmakeinc EOF

EOF
cat  confmakefile EOF
include confmakeinc

all:
EOF
if ${MAKE-make} -f confmakefile /dev/null 21; then
lilac_cv_make_include="include"
lilac_cv_make_quote=''
else
lilac_cv_make_include=".include"
lilac_cv_make_quote='"'
fi
rm confmakefile confmakeinc])
AC_MSG_RESULT([$lilac_cv_make_include 
${lilac_cv_make_quote}file${lilac_cv_make_quote}])
MAKEINCLUDE=$lilac_cv_make_include
MAKEQUOTE=$lilac_cv_make_quote
AC_SUBST(MAKEINCLUDE)
AC_SUBST(MAKEQUOTE)])

dnl make.m4 ends here



[patch 1/1 v2] support AC_SUBST'able automake rules

2001-02-09 Thread Lars J. Aas

Something like this?

2001-02-09  Lars J. Aas  [EMAIL PROTECTED]

* automake.in ($MACRO_PATTERN): Include '@' in name regex.
(canonicalize): New. Includes '@' in canonical range.
(check_canonical_spelling, handle_programs, handle_libraries,
handle_ltlibraries, handle_techinfo): Use canonicalize.

Index: automake.in
===
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.872
diff -u -r1.872 automake.in
--- automake.in 2001/02/09 07:06:53 1.872
+++ automake.in 2001/02/09 18:12:42
@@ -46,7 +46,7 @@
 # Only recognize leading spaces, not leading tabs.  If we recognize
 # leading tabs here then we need to make the reader smarter, because
 # otherwise it will think rules like `foo=bar; \' are errors.
-$MACRO_PATTERN = "^ *([A-Za-z0-9_]+)[ \t]*([:+]?)=[ \t]*(.*)\$";
+$MACRO_PATTERN = "^ *([A-Za-z0-9_\@]+)[ \t]*([:+]?)=[ \t]*(.*)\$";
 $BOGUS_MACRO_PATTERN = "^ *([^ \t]*)[ \t]*([:+]?)=[ \t]*(.*)\$";
 $GNITS_VERSION_PATTERN = "[0-9]+\\.[0-9]+([a-z]|\\.[0-9]+)?";
 $IF_PATTERN = "^if[ \t]+\([A-Za-z][A-Za-z0-9_]*\)[ \t]*\(#.*\)?\$";
@@ -1689,6 +1689,14 @@
 return $seen_libobjs;
 }
 
+# Canonicalize the input parameter
+sub canonicalize
+{
+local($string) = @_;
+$string =~ tr/A-Za-z0-9_\@/_/c;
+return $string;
+}
+
 # Canonicalize a name, and check to make sure the non-canonical name
 # is never used.  Returns canonical name.  Arguments are name and a
 # list of suffixes to check for.
@@ -1697,7 +1705,7 @@
 local ($name, @suffixes) = @_;
 local ($xname, $xt);
 
-($xname = $name) =~ tr/A-Za-z0-9_/_/c;
+$xname = canonicalize ($name);
 if ($xname ne $name)
 {
local ($xt);
@@ -1828,8 +1836,7 @@
 {
foreach $one_file (@proglist)
{
-   # Canonicalize names.
-   ($xname = $one_file) =~ tr/A-Za-z0-9_/_/c;
+   $xname = canonicalize ($one_file);
 
if (variable_defined ($xname . '_LDADD'))
{
@@ -1932,8 +1939,7 @@
 {
foreach $onelib (@liblist)
{
-   # Canonicalize names.
-   ($xlib = $onelib) =~ tr/A-Za-z0-9_/_/c;
+   $xlib = canonicalize ($onelib);
if (variable_defined ($xlib . '_LIBADD'))
{
check_libobjs_sources ($xlib, $xlib . '_LIBADD');
@@ -2093,8 +2099,7 @@
 {
foreach $onelib (@liblist)
{
-   # Canonicalize names.
-   ($xlib = $onelib) =~ tr/A-Za-z0-9_/_/c;
+   $xlib = canonicalize ($onelib);
if (variable_defined ($xlib . '_LIBADD'))
{
check_libobjs_sources ($xlib, $xlib . '_LIBADD');
@@ -2294,8 +2299,7 @@
# work if the target has it and the dependency doesn't.
push (@texi_deps, '$(srcdir)/' . $vtexi) if $vtexi;
 
-   # Canonicalize name first.
-   ($canonical = $infobase) =~ tr/A-Za-z0-9_/_/c;
+   $canonical = canonicalize ($infobase);
if (variable_defined ($canonical . "_TEXINFOS"))
{
push (@texi_deps, '$(' . $canonical . '_TEXINFOS)');




Revert setting of CONFIG_COMMANDS when running config.status

2001-02-09 Thread Raja R Harinath

Hi,

Please revert the CONFIG_COMMANDS part of 

  2001-02-04  Kevin Ryde [EMAIL PROTECTED]

* automake.in (handle_configure): Call config.status with empty
CONFIG_LINKS and CONFIG_COMMANDS when regenerating a file.

This doesn't work with beta autoconf 2.49d and 

  AC_OUTPUT(outputs, commands)

syntax.  For example, 'automake's configure.in uses

  AC_OUTPUT([Makefile automake aclocal m4/Makefile tests/Makefile],
  [chmod +x automake aclocal])

However, 

  automake: $(top_builddir)/config.status automake.in
cd $(top_builddir)  \
CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= CONFIG_COMMANDS= \
$(SHELL) ./config.status

doesn't run the 'chmod +x automake'.  This is because the old
AC_OUTPUT syntax appears to be internally implemented via
CONFIG_COMMANDS, and the explicit setting interferes with that.  

This only affects beta autoconf, and CONFIG_COMMANDS was introduced
only with beta autoconf.  So, it is safe to revert this part.

I don't think similar changes should be incorporated in the future.
It would be better to migrate to the new config.status command line
interface if AC_PREREQ(2.50) is seen,

  ./config.status --files=$@

rather than depend on specific details of the implementation of
config.status.

I've attached a patch only to revert the CONFIG_COMMANDS case.  I
think the CONFIG_LINKS= part in the above is harmless.

- Hari



from  Raja R Harinath  [EMAIL PROTECTED]

	* automake.in (handle_configure): Revert part of 
	'2001-02-04  Kevin Ryde [EMAIL PROTECTED]'.  Don't 
	set CONFIG_COMMANDS explicitly.

Index: automake.in
===
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.871
diff -u -p -u -r1.871 automake.in
--- automake.in	2001/02/09 03:39:18	1.871
+++ automake.in	2001/02/09 18:52:50
@@ -3185,7 +3185,7 @@ sub handle_configure
 		  . "\t   CONFIG_FILES="
 		  . (($relative_dir eq '.') ? '$@' : '$(subdir)/$@')
 		  . $colon_infile
-		  . ' CONFIG_HEADERS= CONFIG_LINKS= CONFIG_COMMANDS= $(SHELL) ./config.status'
+		  . ' CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status'
 		  . "\n\n");
 
 if ($relative_dir ne '.')
@@ -3437,7 +3437,7 @@ sub handle_configure
			  . '$@' . ($need_rewritten
 ? (':' . join (':', @inputs))
 : '')
-			  . ' CONFIG_HEADERS= CONFIG_LINKS= CONFIG_COMMANDS= $(SHELL) ./config.status'
+			  . ' CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status'
 			  . "\n");
 	push (@actual_other_files, $local);
 



-- 
Raja R Harinath -- [EMAIL PROTECTED]
"When all else fails, read the instructions."  -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash



AM_PROG_LIBTOOL / AC_PROG_LIBTOOL

2001-02-09 Thread Jeremy Slade

I'm brand new to automake/autoconf, trying to configure my first real
project.  I've got automake building a .a for me using the _LIBRARIES
command, now I want to convert to using libtool to build shared and
archive libraries.

I am using autoconf-2.49c and automake-1.4b on HPUX 10.20.  When I put
AM_PROG_LIBTOOL in my configure.in, automake says I should use
AC_PROG_LIBTOOL instead.  But when I change it, autoconf then
generates an error that AC_PROG_LIBTOOL is undefined.

Do I have a version mismatch here, or what else might be going on?

Thanks,
Jeremy
-- 
Jeremy Slade
Hewlett-Packard Company  VLSI Technology Center - http://cpus.hp.com/
[EMAIL PROTECTED](970) 898-7881





Re: AM_PROG_LIBTOOL / AC_PROG_LIBTOOL

2001-02-09 Thread Tim Heath

I have version 1.3.5 of LIBTOOL sorry about that.  Have you tried
deleting your configure, config.cache, and aclocal.m4 then running:

aclocal
automake
autconf
?

I would also look in your actual automake file for this kind of entry:

eval 'exec #!/home/th374862/timheath/gnu_tools/perl -S $0 ${1+"$@"}'
if 0;

Is it pointing to the right directory?
Check the other tools to make sure their exec paths are correct.

Tim Heath

Jeremy Slade wrote:
 
 Tim Heath writes:
  I ran into this problem last night when installing on RH 7.0.  It turned
  out that the configure script for automake and autoconf installed
  automake/autoconf in /usr/local/share.  When I did the command
 
  which automake
 
  I found it in /usr/local/bin
 
  Try running automake --version and make sure it says automake-1.4b.  If it
  doesn't you will need to edit your path to search the right directory
  first.  I hope this helped.
 
  Tim Heath
 
  P.S.
 
  When I modified my path it fixed the problem.  I was using automake 1.4a
  and autoconf 2.13, and libtool 1.5 on RH 7.0.  You can also make
 
 No, that is not the problem... Wonder if the problem is my libtool
 version, which is currently:
 
 ltmain.sh (GNU libtool) 1.3.5 (1.385.2.206 2000/05/27 11:12:27)
 
 --
 Jeremy Slade
 Hewlett-Packard Company  VLSI Technology Center - http://cpus.hp.com/
 [EMAIL PROTECTED](970) 898-7881




Re: [patch 1/1 v2] support AC_SUBST'able automake rules

2001-02-09 Thread Michael Bletzinger

Speaking with no authority this looks fine to me.  My only concern is
that '@' is also used to indicate arrays which could cause some of the
more complex regex substitutions to fail (ie. the ones used by
file_contents_with_transform).  I will do some testing on this in the
next few days.

Michael



"Lars J. Aas" wrote:
 
 Something like this?
 
 2001-02-09  Lars J. Aas  [EMAIL PROTECTED]
 
 * automake.in ($MACRO_PATTERN): Include '@' in name regex.
 (canonicalize): New. Includes '@' in canonical range.
 (check_canonical_spelling, handle_programs, handle_libraries,
 handle_ltlibraries, handle_techinfo): Use canonicalize.
 
 Index: automake.in
 ===
 RCS file: /cvs/automake/automake/automake.in,v
 retrieving revision 1.872
 diff -u -r1.872 automake.in
 --- automake.in 2001/02/09 07:06:53 1.872
 +++ automake.in 2001/02/09 18:12:42
 @@ -46,7 +46,7 @@
  # Only recognize leading spaces, not leading tabs.  If we recognize
  # leading tabs here then we need to make the reader smarter, because
  # otherwise it will think rules like `foo=bar; \' are errors.
 -$MACRO_PATTERN = "^ *([A-Za-z0-9_]+)[ \t]*([:+]?)=[ \t]*(.*)\$";
 +$MACRO_PATTERN = "^ *([A-Za-z0-9_\@]+)[ \t]*([:+]?)=[ \t]*(.*)\$";
  $BOGUS_MACRO_PATTERN = "^ *([^ \t]*)[ \t]*([:+]?)=[ \t]*(.*)\$";
  $GNITS_VERSION_PATTERN = "[0-9]+\\.[0-9]+([a-z]|\\.[0-9]+)?";
  $IF_PATTERN = "^if[ \t]+\([A-Za-z][A-Za-z0-9_]*\)[ \t]*\(#.*\)?\$";
 @@ -1689,6 +1689,14 @@
  return $seen_libobjs;
  }
 
 +# Canonicalize the input parameter
 +sub canonicalize
 +{
 +local($string) = @_;
 +$string =~ tr/A-Za-z0-9_\@/_/c;
 +return $string;
 +}
 +
  # Canonicalize a name, and check to make sure the non-canonical name
  # is never used.  Returns canonical name.  Arguments are name and a
  # list of suffixes to check for.
 @@ -1697,7 +1705,7 @@
  local ($name, @suffixes) = @_;
  local ($xname, $xt);
 
 -($xname = $name) =~ tr/A-Za-z0-9_/_/c;
 +$xname = canonicalize ($name);
  if ($xname ne $name)
  {
 local ($xt);
 @@ -1828,8 +1836,7 @@
  {
 foreach $one_file (@proglist)
 {
 -   # Canonicalize names.
 -   ($xname = $one_file) =~ tr/A-Za-z0-9_/_/c;
 +   $xname = canonicalize ($one_file);
 
 if (variable_defined ($xname . '_LDADD'))
 {
 @@ -1932,8 +1939,7 @@
  {
 foreach $onelib (@liblist)
 {
 -   # Canonicalize names.
 -   ($xlib = $onelib) =~ tr/A-Za-z0-9_/_/c;
 +   $xlib = canonicalize ($onelib);
 if (variable_defined ($xlib . '_LIBADD'))
 {
 check_libobjs_sources ($xlib, $xlib . '_LIBADD');
 @@ -2093,8 +2099,7 @@
  {
 foreach $onelib (@liblist)
 {
 -   # Canonicalize names.
 -   ($xlib = $onelib) =~ tr/A-Za-z0-9_/_/c;
 +   $xlib = canonicalize ($onelib);
 if (variable_defined ($xlib . '_LIBADD'))
 {
 check_libobjs_sources ($xlib, $xlib . '_LIBADD');
 @@ -2294,8 +2299,7 @@
 # work if the target has it and the dependency doesn't.
 push (@texi_deps, '$(srcdir)/' . $vtexi) if $vtexi;
 
 -   # Canonicalize name first.
 -   ($canonical = $infobase) =~ tr/A-Za-z0-9_/_/c;
 +   $canonical = canonicalize ($infobase);
 if (variable_defined ($canonical . "_TEXINFOS"))
 {
 push (@texi_deps, '$(' . $canonical . '_TEXINFOS)');

-- 
--
Michael Bletzinger  Software Developer, Alliance Computational
[EMAIL PROTECTED]  Environment  Security
217 265 5137NCSA




Re: [patch 1/1 v2] support AC_SUBST'able automake rules

2001-02-09 Thread Lars J. Aas

On Fri, Feb 09, 2001 at 02:12:22PM -0600, Michael Bletzinger wrote:
: Speaking with no authority this looks fine to me.  My only concern is
: that '@' is also used to indicate arrays which could cause some of the
: more complex regex substitutions to fail (ie. the ones used by
: file_contents_with_transform).  I will do some testing on this in the
: next few days.

Great.  Just one more thing...

:  2001-02-09  Lars J. Aas  [EMAIL PROTECTED]
:  
:  * automake.in ($MACRO_PATTERN): Include '@' in name regex.
:  (canonicalize): New. Includes '@' in canonical range.
:  (check_canonical_spelling, handle_programs, handle_libraries,
:  handle_ltlibraries, handle_techinfo): Use canonicalize.

stupid typo: s/techinfo/texinfo/

  Lars J




Re: AM_PROG_LIBTOOL / AC_PROG_LIBTOOL

2001-02-09 Thread Jeremy Slade

Tim Heath writes:
 I have version 1.3.5 of LIBTOOL sorry about that.  Have you tried
 deleting your configure, config.cache, and aclocal.m4 then running:
 
 aclocal
 automake
 autconf
 ?

Tried that, same result.
 
 I would also look in your actual automake file for this kind of entry:
 
 eval 'exec #!/home/th374862/timheath/gnu_tools/perl -S $0 ${1+"$@"}'
 if 0;
 
 Is it pointing to the right directory?
 Check the other tools to make sure their exec paths are correct.

Yup, that's right, all the other paths also appear to be correct.

Where would I even look to find the definition of AC_PROG_LIBTOOL?  I
quickly grep'd through all the usr/share/autoconf and
usr/share/autoconf files, the only thing I found was the AU_ALIAS for
AM_PROG_LIBTOOL.

Jeremy
-- 
Jeremy Slade
Hewlett-Packard Company  VLSI Technology Center - http://cpus.hp.com/
[EMAIL PROTECTED](970) 898-7881





Re: question about sources in multiple directories

2001-02-09 Thread Michael Bletzinger

"Matthew R. MacIntyre" wrote:
 
 Hi,
 
 I'm sure there is a fairly easy way to do this, but I just can't figure it
 out.  I was hoping someone here could help me.
 
 I've got some c++ classes in my project's src/ directory, and I want to
 write some little driver programs in the test/ directory to show that the
 classes behave as expected.  I've had no problem including the header
 files I need to compile the driver programs, but errors occur at the
 linking phase of the build process.  How can I get automake setup the
 Makefile in the test/ directory to link with the objects in the src/
 directory?
 
 Thanks in advance,
 
 -matt

Wrap your objects in a noinstall library and have the test programs link
with it.

ie.

in your C++ directory:
noinst_LIBRARIES = libMyCplusplus.a

in your test directory:

testprogram_LDADD = -D../C++ directory -lMyCplusplus



This is off the top of my head and untested.  I have used this with C
code and libtool libraries but I understand that there are some problems
with shared libraries and C++ initialization on some platforms.


Michael

-- 
--
Michael Bletzinger  Software Developer, Alliance Computational
[EMAIL PROTECTED]  Environment  Security
217 265 5137NCSA




Re: [patch] header.am typo

2001-02-09 Thread Tom Tromey

 "Lars" == Lars J Aas [EMAIL PROTECTED] writes:

Lars 2001-02-09  Lars J. Aas  [EMAIL PROTECTED]
Lars   * header.am: s,?!NOBASE?,?!BASE?, (typo)

Thanks, I checked this in.

Tom




Re: question about sources in multiple directories

2001-02-09 Thread Matthew R. MacIntyre

On Fri, 9 Feb 2001, Michael Bletzinger wrote:

 Wrap your objects in a noinstall library and have the test programs link
 with it.

 ie.

 in your C++ directory:
 noinst_LIBRARIES = libMyCplusplus.a

 in your test directory:

 testprogram_LDADD = -D../C++ directory -lMyCplusplus

Ok, tried that.  I had to change testprogram_LDADD to testprogram_LDFLAGS,
and fix a few other autoconf errors, and then I got this error when
building:

make: *** No rule to make target `libArray.a.c', needed by `libArray.a.o'.
Stop.

Seems that it wants to compile the library as a C library, not a C++
library.

Any other ideas?

Thanks,

-matt





AC_CANONICAL_* *_triplet

2001-02-09 Thread Derek R. Price

Is there a good reason that Automake renames the three variables set by
AC_CANONICAL_* ('build', 'host',  'target') to 'build_triplet', 'host_triplet',
 'target_triplet'?

Because using the current traces design, 'build', 'host',  'target' would be
substituted automatically, allowing removal/simplification of some code once AC
2.13 is no longer supported, if the rename was unnecessary.  This would include
removal of the following FIXME comment and associated code:

# Generate some useful variables when AC_CANONICAL_* used.  FIXME:
# this should use generic %configure_vars method.

Derek

--
Derek Price  CVS Solutions Architect ( http://CVSHome.org )
mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com )
--
I will not sell school property.
I will not sell school property.
I will not sell school property...

  - Bart Simpson on chalkboard, _The Simpsons_







Re: include only in cvs-automake?

2001-02-09 Thread Rusty Ballinger

 Wow.  I almost sent a message to say that I had definitely used
 `include' in some old (circa-1997) projects.  But I dug out the code,
 and it seems I was relying on make's own include implementation.  I am
 still using automake-1.4 (so that I can be certain that the upcoming
 libtool releases will work correctly with it) and had never noticed
 this before...

 Tom, would you commit an errata to the autobook pages to describe this
 bug please?

include does work in automake 1.4:

include $(top_srcdir)/packages/javadefs.am

However, if you go

JAVAROOT = ../../../../..
include $(JAVAROOT)/javadefs.am

then automake 1.4 puts that line in the Makefile rather than including the
file.  Maybe this is what per was seeing?

--Rusty




libtool problem with linking .a's

2001-02-09 Thread Tim Heath

I am getting the message:

libtool: link: cannot build libtool library `liboracle.la' from
non-libtool objects: /opt/oracle/X/product/8.1.6/lib/libcore8.a

My Makefile.am looks like this:

## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = README
CLEANFILES = *~

AM_CXXFLAGS = -fPIC

noinst_LTLIBRARIES = liboracle.la

liboracle_la_SOURCES = \
oracle.C

liboracle_la_LDFLAGS = -static

liboracle_la_LIBADD = /opt/oracle/X/product/8.1.6/lib/libcore8.a \
  /opt/oracle/X/product/8.1.6/lib/libclntsh.sl

INCLUDES = -I@top_srcdir@/include -I@top_srcdir@/../include
-I@top_srcdir@/src/i
nclude -I/opt/oracle/talon/product/8.1.6/precomp/public

Does anyone know how to fix this?

Thanks,

Tim Heath




Re: question about sources in multiple directories

2001-02-09 Thread Michael Bletzinger

Please post your Makefile.am's and I'll take a look.

Michael

"Matthew R. MacIntyre" wrote:
 
 On Fri, 9 Feb 2001, Michael Bletzinger wrote:
 
  Wrap your objects in a noinstall library and have the test programs link
  with it.
 
  ie.
 
  in your C++ directory:
  noinst_LIBRARIES = libMyCplusplus.a
 
  in your test directory:
 
  testprogram_LDADD = -D../C++ directory -lMyCplusplus
 
 Ok, tried that.  I had to change testprogram_LDADD to testprogram_LDFLAGS,
 and fix a few other autoconf errors, and then I got this error when
 building:
 
 make: *** No rule to make target `libArray.a.c', needed by `libArray.a.o'.
 Stop.
 
 Seems that it wants to compile the library as a C library, not a C++
 library.
 
 Any other ideas?
 
 Thanks,
 
 -matt

-- 
--
Michael Bletzinger  Software Developer, Alliance Computational
[EMAIL PROTECTED]  Environment  Security
217 265 5137NCSA




Re: CVS automake: depcomp/gcc3 doesn't propagate errors?

2001-02-09 Thread Tom Tromey

 "Hari" == Raja R Harinath [EMAIL PROTECTED] writes:

Hari from  Raja R Harinath  [EMAIL PROTECTED]
Hari   * depcomp (gcc3): Propagate exit code.

Thanks, I checked this in.

Tom




removing $seen_canonical

2001-02-09 Thread Derek R. Price

I've removed the references to $seen_canonical, re one of the FIXME
comments on the way to enabling traces.  I know this patch is kinda
largish, but even if it doesn't get checked in yet, I'd like some
feedback.  This is somewhat integral to my work on traces.

Derek

--
Derek Price  CVS Solutions Architect ( http://CVSHome.org )
mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com )
Once Law was sitting on the bench
And Mercy knelt a-weeping.
"Clear out!" he cried, "disordered wench!
Nor come before me creeping.
Upon you knees if you appear,
'Tis plain you have no standing here."

Then Justice came.  His Honor cried:
"YOUR states? -- Devil seize you!"
"Amica curiae," she replied --
"Friend of the court, so please you."
"Begone!" he shouted -- "There's the door --
I never saw your face before!"
-- Ambrose Bierce, "The Devil's Dictionary"




Index: ChangeLog
===
RCS file: /cvs/automake/automake/ChangeLog,v
retrieving revision 1.1014
diff -u -r1.1014 ChangeLog
--- ChangeLog   2001/02/10 01:26:54 1.1014
+++ ChangeLog   2001/02/10 05:06:50
@@ -1,3 +1,7 @@
+2001-02-10  Derek Price  [EMAIL PROTECTED]
+
+   * automake.in: Replace $seen_canonical with %configure_vars.
+
 2001-02-09  Raja R Harinath  [EMAIL PROTECTED]
 
* depcomp (gcc3): Propagate exit code.
Index: automake.in
===
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.872
diff -u -r1.872 automake.in
--- automake.in 2001/02/09 07:06:53 1.872
+++ automake.in 2001/02/10 05:06:54
@@ -191,10 +191,6 @@
 # TRUE if AC_DECL_YYTEXT was seen.
 $seen_decl_yytext = 0;
 
-# TRUE if we've seen AC_CANONICAL_(HOST|SYSTEM).  The presence of
-# AC_CHECK_TOOL also sets this.
-$seen_canonical = 0;
-
 # TRUE if we've seen AC_ARG_PROGRAM.
 $seen_arg_prog = 0;
 
@@ -606,10 +602,14 @@
   @libtoolize_files)
if $seen_libtool;
 
-# AC_CANONICAL_HOST and AC_CANONICAL_SYSTEM need config.guess and
-# config.sub.
+   # AC_CANONICAL_BUILD, AC_CANONICAL_HOST, and
+   # AC_CANONICAL_(SYSTEM|TARGET) need config.guess and config.sub.
+   #
+   # FIXME - When traces is enabled, only 'build' need be checked here
+   # since AC_CANONICAL_BUILD is required by AC_CANONICAL_HOST, which is
+   # required by AC_CANONICAL_TARGET, as of AC 2.50..
 require_config_file ($FOREIGN, 'config.guess', 'config.sub')
-   if $seen_canonical;
+   if $configure_vars{'build'} || $configure_vars{'host'};
 }
 
 # We still need Makefile.in here, because sometimes the `dist'
@@ -3932,29 +3932,18 @@
   . "\t\@echo 'set tool \$(DEJATOOL)'  \$\@-t\n"
   . "\t\@echo 'set srcdir \$(srcdir)'  \$\@-t\n"
   . "\t\@echo 'set objdir' \`pwd\`  \$\@-t\n");
-
-# Extra stuff for AC_CANONICAL_*
-local (@whatlist) = ();
-if ($seen_canonical)
-{
-push (@whatlist, 'host');
-}
 
-# Extra stuff only for AC_CANONICAL_SYSTEM.
-if ($seen_canonical == $AC_CANONICAL_SYSTEM)
+   my $c;
+   foreach $c ('build', 'host', 'target')
 {
-push (@whatlist, 'target', 'build');
+   # Maybe an error message if both of these are not set is a good
+   # idea?  It might be overkill.
+   $output_rules .= "\t\@echo 'set ${c}_triplet \$(${c})'  \$\@-t\n"
+   if defined $configure_vars{$c};
+   $output_rules .= "\t\@echo 'set ${c}_alias \$(${c}_alias})'  \$\@-t\n"
+   if defined $configure_vars{"${c}_alias"};
 }
 
-local ($c1, $c2);
-foreach $c1 (@whatlist)
-{
-foreach $c2 ('alias', 'triplet')
-{
-$output_rules .= "\t\@echo 'set ${c1}_${c2} \$(${c1}_${c2})'  
\$\@-t\n";
-}
-}
-
 $output_rules .= ("\t\@echo '## All variables above are generated by 
configure. Do Not Edit ##'  \$\@-t\n"
   . "\t\@test ! -f site.exp || sed '1,/^## All variables 
above are.*##/ d' site.exp  \$\@-t\n"
   . "\t\@test ! -f site.exp || mv site.exp site.bak\n"
@@ -4228,6 +4217,21 @@
 }
 
 
+
+# found_ac_canonical_x ($x, $where)
+# --
+# Helper function which sets %configure_vars for an AC_CANONICAL_* invocation
+sub found_ac_canonical_x
+{
+my $c;
+foreach $c ('', '_alias', '_cpu', '_vendor', '_os')
+{
+   $configure_vars{$_[0] . $c} = $_[1];
+}
+}
+
+
+
 # scan_one_autoconf_file ($FILENAME)
 # ---
 # Scan one file for interesting things.  Subroutine of
@@ -,12 +4448,25 @@
}
}
 
-# Handle AC_CANONICAL_*.  Always allow upgrading to
-#