]>
Commit | Line | Data |
---|---|---|
eecb7461 PB |
1 | # _LT_LANG_GCJ_CONFIG([TAG]) |
2 | # -------------------------- | |
3 | # Ensure that the configuration variables for the GNU Java Compiler compiler | |
4 | # are suitably defined. These variables are subsequently used by _LT_CONFIG | |
5 | # to write the compiler configuration to `libtool'. Locally modified to | |
6 | # run its tests on C programs, because we cannot link Java programs until | |
7 | # we have finished building libjava. | |
8 | AC_DEFUN([_LT_LANG_GCJ_CONFIG], | |
9 | [AC_REQUIRE([LT_PROG_GCJ])dnl | |
10 | AC_LANG_SAVE | |
11 | ||
12 | # Source file extension for Java test sources. | |
13 | ac_ext=c | |
14 | ||
15 | # Object file extension for compiled Java test sources. | |
16 | objext=o | |
17 | _LT_TAGVAR(objext, $1)=$objext | |
18 | ||
19 | # Code to be used in simple compile tests | |
20 | lt_simple_compile_test_code="int some_variable = 0;" | |
21 | ||
22 | # Code to be used in simple link tests | |
23 | lt_simple_link_test_code='int main(){return(0);}' | |
24 | ||
25 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
26 | _LT_TAG_COMPILER | |
27 | ||
28 | # save warnings/boilerplate of simple test code | |
29 | _LT_COMPILER_BOILERPLATE | |
30 | _LT_LINKER_BOILERPLATE | |
31 | ||
32 | # Allow CC to be a program name with arguments. | |
ae11dff4 | 33 | GCC=yes |
eecb7461 PB |
34 | compiler=$CC |
35 | _LT_TAGVAR(compiler, $1)=$CC | |
36 | _LT_CC_BASENAME([$compiler]) | |
37 | ||
38 | # GCJ did not exist at the time GCC didn't implicitly link libc in. | |
39 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
40 | ||
41 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | |
42 | ||
43 | ## CAVEAT EMPTOR: | |
44 | ## There is no encapsulation within the following macros, do not change | |
45 | ## the running order or otherwise move them around unless you know exactly | |
46 | ## what you are doing... | |
47 | if test -n "$compiler"; then | |
48 | _LT_COMPILER_NO_RTTI($1) | |
49 | _LT_COMPILER_PIC($1) | |
50 | _LT_COMPILER_C_O($1) | |
51 | _LT_COMPILER_FILE_LOCKS($1) | |
52 | _LT_LINKER_SHLIBS($1) | |
eecb7461 PB |
53 | _LT_LINKER_HARDCODE_LIBPATH($1) |
54 | ||
55 | _LT_CONFIG($1) | |
56 | fi | |
57 | ||
58 | _LT_TAGVAR(compiler, $1)=${GCJ-gcj} | |
59 | AC_LANG_RESTORE | |
60 | ])# _LT_LANG_GCJ_CONFIG |