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="\
25 shared int some_variable = 0;
28 # Code to be used in simple link tests
29 lt_simple_link_test_code="\
31 extern(C) int main() { return 0; }
34 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
37 # save warnings/boilerplate of simple test code
38 _LT_COMPILER_BOILERPLATE
39 _LT_LINKER_BOILERPLATE
41 # Allow CC to be a program name with arguments.
43 lt_save_CFLAGS=$CFLAGS
49 _LT_TAGVAR(compiler, $1)=$CC
50 _LT_TAGVAR(LD, $1)=$CC
51 _LT_CC_BASENAME([$compiler])
53 # GDC did not exist at the time GCC didn't implicitly link libc in.
54 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
56 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
57 _LT_TAGVAR(reload_flag, $1)=$reload_flag
58 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
61 ## There is no encapsulation within the following macros, do not change
62 ## the running order or otherwise move them around unless you know exactly
63 ## what you are doing...
64 if test -n "$compiler"; then
65 _LT_COMPILER_NO_RTTI($1)
68 _LT_COMPILER_FILE_LOCKS($1)
70 _LT_LINKER_HARDCODE_LIBPATH($1)
79 CFLAGS=$lt_save_CFLAGS