Hello all! I am the maintainer of a free software package for scientific data storage: netcdf.
In order to build on AIX in 64-bit mode, I have to be able to set the ARFLAGS, but I can't get that to work. No matter what I do, automake ignores my ARFLAGS and just uses "cru". I have created a minimalistic example. A single C file, small.c, with one function, is turned into a libtool library. The configure.ac, Makefile.am, and code file are appended to this email. >From the info pages on Automake: `AR' and `ARFLAGS' default to `ar' and `cru' respectively; you can override these two variables my setting them in your `Makefile.am', by `AC_SUBST'ing them from your `configure.ac', or by defining a per-library `maude_AR' variable (*note Program and Library Variables::). However, this is not working for me. Nor is setting AM_ARFLAGS, nor using a per-library variable. Here's how I build this: autoreconf -i && ARFLAGS=lalala ./configure && make Here's the build output: make[1]: Entering directory `/home/ed/small_autotools' /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -Wall -g -MT small.lo -MD -MP -MF .deps/small.Tpo -c -o small.lo small.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -Wall -g -MT small.lo -MD -MP -MF .deps/small.Tpo -c small.c -o small.o mv -f .deps/small.Tpo .deps/small.Plo /bin/sh ./libtool --tag=CC --mode=link gcc -Wall -g -o libsmall.la -rpath /usr/local/lib small.lo libtool: link: ar cru .libs/libsmall.a small.o libtool: link: ranlib .libs/libsmall.a libtool: link: ( cd ".libs" && rm -f "libsmall.la" && ln -s "../libsmall.la" "libsmall.la" ) make[1]: Leaving directory `/home/ed/small_autotools As you can see, ar is using "cru" instead of "lalala", which is what ARFLAGS is set to. Interestingly, the Makefile does have ARFLAGS defined: ARFLAGS = lalala But neither ar nor ranlib seem to be actually used in the Makefile. but this seems to be ignored when building the library. So what am I doing wrong here? Thanks, Ed configure.ac: AC_INIT([small], [1.0], [EMAIL PROTECTED]) AC_CANONICAL_HOST AM_DISABLE_SHARED AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([foreign -Wall]) AC_CONFIG_SRCDIR([small.c]) LT_INIT() AC_SUBST(ARFLAGS, ["$ARFLAGS"]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT() Makefile.am: AM_ARFLAGS = $(ARFLAGS) lib_LTLIBRARIES = libsmall.la libsmall_la_SOURCES = small.c small.c: int fun() { return 42; } -- Ed Hartnett -- [EMAIL PROTECTED]