Fix hash-table violation in trans-decl.c.
[official-gcc.git] / libphobos / m4 / libtool.m4
blob44ca572025be37e963be6e484a733edbd3af9896
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
13 AC_LANG_SAVE
15 # Source file extension for D test sources.
16 ac_ext=d
18 # Object file extension for compiled D test sources.
19 objext=o
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.
29 _LT_TAG_COMPILER
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.
36 lt_save_CC=$CC
37 lt_save_CFLAGS=$CFLAGS
38 lt_save_DFLAGS=$GDCFLAGS
39 lt_save_GCC=$GCC
40 GCC=yes
41 CC=${GDC-"gdc"}
42 # Need to specify location for object.d
43 GDCFLAGS="-nophoboslib $GDCFLAGS"
44 CFLAGS=$GDCFLAGS
45 compiler=$CC
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
57 ## CAVEAT EMPTOR:
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)
63   _LT_COMPILER_PIC($1)
64   _LT_COMPILER_C_O($1)
65   _LT_COMPILER_FILE_LOCKS($1)
66   _LT_LINKER_SHLIBS($1)
67   _LT_LINKER_HARDCODE_LIBPATH($1)
69   _LT_CONFIG($1)
72 AC_LANG_RESTORE
74 GCC=$lt_save_GCC
75 CC=$lt_save_CC
76 CFLAGS=$lt_save_CFLAGS
77 GDCFLAGS=$lt_save_DFLAGS
78 ])# _LT_LANG_D_CONFIG