build - Autoconf: Check if a program in an unsupported language compiles -
to conditionally enable part of autotooled project, need check whether short program stub in language not supported autotools out of box compiles or not.
i need ac_try_compile
arbitrary compiler executable – create temporary file, write piece of code it, , try if invoking compiler (found via ac_check_progs
before) returns exit code equal 0 or not.
what elegant/common way this?
ac_try_compile
(which deprecated , replaced ac_compile_ifelse
) supports limited set of languages: c, c++, fortran 77, fortran, erlang, objective c, objective c++ (source).
configure.ac
can contain custom shell code - gets skipped on autoconf
(really m4
). why not write test in shell? if you're going use more 1 test, wrap in ac_defun
.
Comments
Post a Comment