Re: Issue 187: "Configure should stop when no compiler is found"

<[email protected]> Sat, 5 Oct 2024 20:05:52 +0200
Newsgroups gmane.comp.web.dillo.devel
Message-ID <[email protected]>
Rodrigo Arias <[email protected]> wrote:

> I think something like this may be more strict, as we test that it
> can compile a simple C++ program:
> 
> diff --git a/configure.ac b/configure.ac
> index 5c308cb7..7d156b81 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -129,6 +129,19 @@ AC_PROG_CXX
>   AC_PROG_RANLIB
>   AC_PROG_CPP
> 
> +AC_MSG_CHECKING(if C++ compiler '$CXX' works)
> +AC_LANG_PUSH([C++])
> +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> +  #ifndef __cplusplus
> +  #error "No C++ support, AC_PROG_CXX failed"
> +  #endif
> +  ]])],
> +  [AC_MSG_RESULT([yes])],
> +  [AC_MSG_RESULT(no)
> +  AC_MSG_FAILURE([C++ compiler doesn't work])]
> +)
> +AC_LANG_POP([C++])
> +
>   dnl ----------------------------
>   dnl Check our char and int types
>   dnl ----------------------------

Very nice. Works fine here :)
_______________________________________________
Dillo-dev mailing list -- dillo-dev-lx9mn2B4QYRWk0Htik3J/[email protected]
To unsubscribe send an email to dillo-dev-leave-lx9mn2B4QYRWk0Htik3J/[email protected]