+2025-06-12 Bruno Haible <bruno@clisp.org>
+
+ dcomp-script: Reject D compilers with installation problems.
+ * m4/dcomp.m4 (gt_DCOMP): Try each candidate program, seeing whether it
+ can compile a trivial program.
+ * build-aux/dcomp.sh.in: Fix typos in comment.
+
2025-06-12 Bruno Haible <bruno@clisp.org>
gettext: Improve config.log traces.
# -c
# -g
# -O (mapped to -O or -O2, depending on implementation)
-# -o FILE (for libtool compatility)
-# -lLIBRARY (for libtool compatility)
-# -LDIR (for libtool compatility)
-# -pthread (for libtool compatility)
-# -Wl,OPTION (for libtool compatility)
+# -o FILE (for libtool compatibility)
+# -lLIBRARY (for libtool compatibility)
+# -LDIR (for libtool compatibility)
+# -pthread (for libtool compatibility)
+# -Wl,OPTION (for libtool compatibility)
# Find out which implementation we are using.
case `@DC@ --version | sed -e 's/ .*//' -e 1q` in
# dcomp.m4
-# serial 2
+# serial 3
dnl Copyright (C) 2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_ARG_VAR([DC], [D compiler command])
AC_ARG_VAR([DFLAGS], [D compiler options])
dnl On OpenBSD, gdc is called 'egdc' and works less well than dmd.
- AC_CHECK_TOOLS([DC], [gdc ldc2 dmd egdc])
+ dnl Like AC_CHECK_TOOLS([DC], [gdc ldc2 dmd egdc]) but check whether the
+ dnl compiler can actually compile a trivial program. We may simplify this
+ dnl once <https://savannah.gnu.org/support/index.php?111256> is implemented.
+ if test -z "$DC"; then
+ echo > empty.d
+ if test -n "${host_alias}"; then
+ if test -z "$DC"; then
+ DC="${host_alias}-gdc"
+ echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
+ if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
+ fi
+ if test -z "$DC"; then
+ DC="${host_alias}-ldc2"
+ echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
+ if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
+ fi
+ if test -z "$DC"; then
+ DC="${host_alias}-dmd"
+ echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
+ if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
+ fi
+ if test -z "$DC"; then
+ DC="${host_alias}-egdc"
+ echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
+ if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
+ fi
+ fi
+ if test -z "$DC"; then
+ DC="gdc"
+ echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
+ if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
+ fi
+ if test -z "$DC"; then
+ DC="ldc2"
+ echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
+ if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
+ fi
+ if test -z "$DC"; then
+ DC="dmd"
+ echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
+ if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
+ fi
+ if test -z "$DC"; then
+ DC="egdc"
+ echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
+ if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
+ fi
+ rm -f empty.d empty.o empty.obj
+ fi
popdef([AC_MSG_RESULT])dnl
popdef([AC_CHECKING])dnl
popdef([AC_MSG_CHECKING])dnl