I just tried to run a configure script
generated by the CVS version of autoconf.

% ~/project/tkgs/configure
configure: error: cannot run 


This was caused by a check for config.sub
the file did not exist in my src tree.
This is a problem, but the test is also
broken because the AC_CONFIG_AUX_DIR_DEFAULT
seems to be getting expanded after the
AC_CANONICAL_BUILD macro. The result
is the following in the generated configure.


(line 699)

# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
  { echo "configure: error: cannot run config.sub = $ac_config_sub" >&2; 
exit 1; }


(line 816)

if test -z "$ac_aux_dir"; then
  { echo "configure: error: cannot find install-sh or install.sh in 
$srcdir $srcdir/.. $srcdir/../.." >&2; exit 1; }
fi
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus 
configure.



The ac_config_sub is getting set after it is getting used
(inside the AC_CANONICAL_BUILD macro).



Here is what the defs in acgeneral look like:


# AC_CANONICAL_BUILD
# ------------------
AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
AC_DIVERT([HELP_CANON],
[[
Hosts type:
  --build=BUILD     configure for building on BUILD [guessed]]])dnl
# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
  AC_MSG_ERROR([cannot run config.sub = $ac_config_sub])

AC_CACHE_CHECK([build system type], [ac_cv_build],
[ac_cv_build_alias=$build_alias
test -z "$ac_cv_build_alias" &&
  ac_cv_build_alias=`$ac_config_guess`
test -z "$ac_cv_build_alias" &&
  AC_MSG_ERROR([cannot guess build type; you must specify one])
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || exit 1
])
_AC_CANONICAL_SPLIT(build)
])# AC_CANONICAL_BUILD


# AC_CONFIG_AUX_DIR_DEFAULT
# -------------------------
# The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
# There's no need to call this macro explicitly; just AC_REQUIRE it.
AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
[AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])


# AC_CONFIG_AUX_DIRS(DIR ...)
# ---------------------------
# Internal subroutine.
# Search for the configuration auxiliary files in directory list $1.
# We look only for install-sh, so users of AC_PROG_INSTALL
# do not automatically need to distribute the other auxiliary files.
AC_DEFUN([AC_CONFIG_AUX_DIRS],
[ac_aux_dir=
for ac_dir in $1; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  elif test -f $ac_dir/shtool; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/shtool install -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  AC_MSG_ERROR([cannot find install-sh or install.sh in $1])
fi
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus 
configure.
AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
])# AC_CONFIG_AUX_DIRS




I am stumped. Is something wrong with the
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) such
that is no longer includes the text from
AC_CONFIG_AUX_DIR_DEFAULT?


Mo DeJong
Red Hat Inc

Reply via email to