2 # Minimal libtool support for the D language.
3 # Adapted from the Go language support files.
6 # _LT_LANG_D_CONFIG([TAG])
7 # --------------------------
8 # Ensure that the configuration variables for the GNU D compiler
9 # are suitably defined. These variables are subsequently used by _LT_CONFIG
10 # to write the compiler configuration to `libtool'.
11 m4_defun([_LT_LANG_D_CONFIG],
12 [AC_REQUIRE([AC_PROG_GDC])dnl
15 # Source file extension for D test sources.
18 # Object file extension for compiled D test sources.
20 _LT_TAGVAR(objext, $1)=$objext
22 # Code to be used in simple compile tests
23 lt_simple_compile_test_code="module mod; extern(C) int main() { return 0; }"
25 # Code to be used in simple link tests
26 lt_simple_link_test_code='module mod; extern(C) int main() { return 0; }'
28 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
31 # save warnings/boilerplate of simple test code
32 _LT_COMPILER_BOILERPLATE
33 _LT_LINKER_BOILERPLATE
35 # Allow CC to be a program name with arguments.
37 lt_save_CFLAGS=$CFLAGS
38 lt_save_DFLAGS=$GDCFLAGS
42 # Need to specify location for object.d
43 GDCFLAGS="-nophoboslib $GDCFLAGS"
46 _LT_TAGVAR(compiler, $1)=$CC
47 _LT_TAGVAR(LD, $1)=$CC
48 _LT_CC_BASENAME([$compiler])
50 # GDC did not exist at the time GCC didn't implicitly link libc in.
51 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
53 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
54 _LT_TAGVAR(reload_flag, $1)=$reload_flag
55 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
58 ## There is no encapsulation within the following macros, do not change
59 ## the running order or otherwise move them around unless you know exactly
60 ## what you are doing...
61 if test -n "$compiler"; then
62 _LT_COMPILER_NO_RTTI($1)
65 _LT_COMPILER_FILE_LOCKS($1)
67 _LT_LINKER_HARDCODE_LIBPATH($1)
76 CFLAGS=$lt_save_CFLAGS
77 GDCFLAGS=$lt_save_DFLAGS