Hi Rodrigo,

Regarding this issue[1], I have found couple of ways to address this:

The easiest way is to do AC_PROG_CXX before AC_PROG_CC:

--- a/configure.ac      Sat Oct  5 13:15:28 2024
+++ b/configure.ac      Sat Oct  5 13:15:48 2024
@@ -124,8 +124,8 @@ if test "x$enable_ssl" != "x"; then
   AC_MSG_ERROR([The flag --enable-ssl is deprecated, use --enable-tls])
 fi
 
-AC_PROG_CC
 AC_PROG_CXX
+AC_PROG_CC
 AC_PROG_RANLIB
 AC_PROG_CPP

Which now errors out when no working compiler is found:
'configure: error: C++ compiler cannot create executables'

Alternately, we can add a check to verify if the complier actually
exists, and if not, exit. Something like this:

dnl ------------------------------------------------------------
dnl AC_PROG_CXX will set CXX=g++ even if it finds no useable C++
dnl compiler, so we have to check whether the program named by
dnl CXX exists.
dnl ------------------------------------------------------------
dnl
AC_PROG_CXX
AC_PATH_PROG(REAL_CXX, $CXX)
HAVE_CXX=no
if test -n "$REAL_CXX"; then
        HAVE_CXX=yes
fi
if HAVE_CXX="no"; then
        echo "Error: No working C++ compiler found!"
        exit 1
        fi

If either of these solutions work for you, I can create a pull request.

[1] https://github.com/dillo-browser/dillo/issues/187

Regards,
Alex
_______________________________________________
Dillo-dev mailing list -- dillo-dev@mailman3.com
To unsubscribe send an email to dillo-dev-le...@mailman3.com

Reply via email to