Hi!
>--[Akim Demaille]--<[EMAIL PROTECTED]>
> ... we finally have a snapshot! No, I really mean it! We have one!
> ps/ Jim, could you please upload 2.49a in
> ftp://alpha.gnu.org/gnu/autoconf/autoconf-2.49a.tar.gz
Looks like it's still not there... :(
Anyway, I have some questions regarding cross-compiling:
I saw config.guess use $CC_FOR_BUILD, if set, to determine the $build system
is this the name to use in Makefile.(in|am)? How can I make
autoconf/configure check for that? If I do AC_CHECK_PROG(CC_FOR_BUILD,
$CC_FOR_BUILD $HOST_CC $CC gcc cc), then I have to do it _before_ CC is set
by AC_PROG_CC. Would it be possible to put it into AC_PROC_CC?
What is the right way of specifying a program to be compiled natively
as well in automake?
I found the following in an aclocal.m4 file (Apache2.0a5):
--snip--
# AC_PROG_NM - find the path to a BSD-compatible name lister
AC_DEFUN(AC_PROG_NM,
[AC_MSG_CHECKING([for BSD-compatible nm])
AC_CACHE_VAL(ac_cv_path_NM,
[if test -n "$NM"; then
# Let the user override the test.
ac_cv_path_NM="$NM"
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the ed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null
>/dev/null; then
ac_cv_path_NM="$ac_dir/nm -B"
break
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null
>/dev/null; the
ac_cv_path_NM="$ac_dir/nm -p"
break
else
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
fi])
NM="$ac_cv_path_NM"
AC_MSG_RESULT([$NM])
AC_SUBST(NM)
])
--snip--
I can't tell where this exactly came from, but anyway. The problem is that
it doesn't use the $ac_tool_prefix(?) to check for a tool for $host. Can we
provide an appropriate AC_PROG_NM? Besides the fact that "my" nm is
basically a patched GNU nm 2.9.1, but accepts an empty file as input, while
"standard" GNU nm 2.9.1 outputs "nm: /dev/null: File truncated".
Nevertheless, my nm does know the -B option, so this test fails...
Another problem I have is the following: When configuring a source tree
of unrelated projects, I sometimes want to give configuration options
for a specific project - but since I'm configuring a complete
directory, I can't, because the only way would be to specify it to the
full directory's configure - but then it would be inherited to *all*
subdirectories, not just a single one. Is there a way to solve
this? If not, would it be possible for configure to extract additional
configure options from, say, $CONFIG_SITE? Say, I add something like
ac_extra_configure_flags=${ac_extra_configure_flags="--with-something"}
to a file in $CONFIG_SITE, and configure will respect it?
Thanks for your help.
Yours, Rüdiger.