Hello, I encountered a problem with a configure script which used ac_aux_dir before it was set.
I found out that the macro AM_AUX_DIR_EXPAND supposes that ac_aux_dir is ready. The natural way to express this assumption is: AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) This bug does not hit in the usual case when AM_INIT_AUTOMAKE is called before any other AM_* macros, and the above AC_REQUIRE is brought in by AC_PROG_INSTALL. In my case, AM_PROG_CC_C_O was called before AM_INIT_AUTOMAKE. I looked quickly to the Automake manual, and I haven't found the rule that AM_INIT_AUTOMAKE should be the first AM_* macro; is it really there? In any case, I suppose the attached patch should not hurt. Thanks, Stepan Kasal
2007-01-10 Stepan Kasal <[EMAIL PROTECTED]> * m4/auxdir.m4 (AM_AUX_DIR_EXPAND): Require AC_CONFIG_AUX_DIR_DEFAULT. Index: m4/auxdir.m4 =================================================================== RCS file: /cvs/automake/automake/m4/auxdir.m4,v retrieving revision 1.7 diff -u -r1.7 auxdir.m4 --- m4/auxdir.m4 9 Jan 2005 14:46:21 -0000 1.7 +++ m4/auxdir.m4 9 Jan 2007 14:59:40 -0000 @@ -47,6 +47,7 @@ AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ])