[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#454798: Erlang: AC_COMPILE_IFELSE always fails, and AC_LINK_IFEL
Re: Bug#454798: Erlang: AC_COMPILE_IFELSE always fails, and AC_LINK_IFELSE always succeeds
Mon, 10 Dec 2007 10:10:07 +0100
[ Cc:ing bug-autoconf ]
thanks for the report and patch.
* Ben Pfaff wrote on Mon, Dec 10, 2007 at 02:00:16AM CET:
> Mikael Magnusson <address@hidden> writes:
> > AC_COMPILE_IFELSE and AC_LINK_IFELSE don't work as documented when
> > Erlang is the current language. I include a configure.ac which shows two
> > bugs.
> > 1. AC_COMPILE_IFELSE always fails and runs ACTION-IF-NOT-FOUND, because
> > configure checks if conftest.$ac_objext is present. But it never is
> > when using Erlang.
> It looks to me like the proper solution to this is to set
> $ac_objext. Perhaps the following patch is sufficient? It makes
> the AC_COMPILE_IFELSE succeed on my system here.
Autoconf currently assumes that ac_objext is the same for all languages.
This patch violates that assumption, and, by looking at it, will make
a later compile test in a different language (say, C) fail, e.g.:
I suppose we could change all the AC_LANG(XXX) macros (with XXX being
C, C++, Fortran, Fortran 77, Objective C, and Erlang) to set ac_objext
accordingly; and let ac_cv_objext be valid only for all != Erlang.
Anyway, I haven't tested that, and however the fix looks like in the
end, it should be accompanied by testsuite additions that exercise
AC_COMPILE_IFELSE with Erlang (if compiler is available) and that
exercise an AC_COMPILE_IFELSE with C after one with Erlang.
I'd be glad to assist if you need help writing such a patch, or write
one eventually, but I'd need someone with Erlang to test it for me.
> --- tmp/autoconf-2.61/lib/autoconf/erlang.m4 2006-09-05 07:36:18.000000000
> +++ autoconf-2.61/lib/autoconf/erlang.m4 2007-12-09 16:57:45.000000000
> @@ -175,7 +175,9 @@
> # ----------------------------
> # Find the Erlang compiler. Must be AC_DEFUN'd to be AC_REQUIRE'able.
|[Prev in Thread]
||[Next in Thread]|
- Re: Bug#454798: Erlang: AC_COMPILE_IFELSE always fails, and AC_LINK_IFELSE always succeeds,
Ralf Wildenhues <=