[Nexus-developers] autoconf

Akeroyd, FA (Freddie) F.A.Akeroyd at rl.ac.uk
Thu Feb 19 13:03:54 GMT 2004


Jens,

Yes, I remember you working on autotools before - I wasn't sure how far you
had got and I didn't have your files easily to hand to check (we've moved
CVS machines so I would need to get them from the backup tape). Also as we
have re-organised the repository since then I though it would be a good time
for me to learn how all the tools worked properly - I'd only used autoconf
before so starting from scratch seemed a good way to learn. 

Thank you for your patches and for tidying up my rather lax use of ".." in
some paths. I have a few comments, mostly dealing with difference between my
version of automake (1.6.3) and yours (1.7) Automake-1.6.3 is installed by
default on e.g. Redhat linux 9, so if we can keep things compatible with the
older version it is one less thing to worry about/install separately for
developers.  

In configure.ac you have changed AM_CONFIG_HEADER  to  AC_CONFIG_HEADER;  on
automake-1.6.3 it complains and tells me to use AM_CONFIG_HEADER instead; I
guess your version gives a warning with AM_CONFIG_HEADER and suggests the
other way round? Maybe we can conditionally check the automake version and
run the appropriate one.

In src/Makefile.am you have conditionally modified the same variable
(libNeXus_la_SOURCES) in more than once place; this isn't allowed in 1.6.3
Instead you need to use something like

! if HAVE_HDF4 
! H4SRC = napi4.c
! endif
! 
! if HAVE_HDF5
! H5SRC = napi5.c
! endif
! 
! libNeXus_la_SOURCES = napi.c $(H4SRC) $(H5SRC)

It's only slightly more verbose, so I think it is worth doing for backward
compatibility. Also do you need to explicity add the HDF libraries to
libNeXus_la_LIBADD ? They have been added to LIBS already by configure -
would

libNeXus_la_LIBADD = $(LIBS)

be OK, or is anything needed at all (is LIBS checked automatically?)
	
> Some additional remark to the files in the CVS. I suggest 
> to remove all generated files like:
> Makefile.in
> configure
> nxconfig.h.in
> config.guess
> config.sub
> and so on
> otherwise you have always problem with cvs conflicts if you 
> are change some of the Makefile.am's
> or the configure.ac file.

Agreed - they (and other files) are only there for the moment as we are in a
"transition period" and used to distribute the CVS tree as the "source";
once we are happy with "make dist" etc. they can be removed.

> Due to my experiences with the use of automake, autoconf, and libtool 
> I would like to help you to integrate these tools into the 
> NeXus development.

Thank you - I'd also be interested in your view on nxconfig.h V napi.h etc

> If you agreed with my patch, I would check in the changes into the CVS.

Please go ahead and submit them

Regards 

Freddie






More information about the NeXus-developers mailing list