ltgcc.m4 revision 214571
150479Speter# _LT_LANG_GCJ_CONFIG([TAG])
239224Sabial# --------------------------
339224Sabial# Ensure that the configuration variables for the GNU Java Compiler compiler
439224Sabial# are suitably defined.  These variables are subsequently used by _LT_CONFIG
5139103Sru# to write the compiler configuration to `libtool'.  Locally modified to
639224Sabial# run its tests on C programs, because we cannot link Java programs until
739224Sabial# we have finished building libjava.
839224SabialAC_DEFUN([_LT_LANG_GCJ_CONFIG],
939224Sabial[AC_REQUIRE([LT_PROG_GCJ])dnl
10AC_LANG_SAVE
11
12# Source file extension for Java test sources.
13ac_ext=c
14
15# Object file extension for compiled Java test sources.
16objext=o
17_LT_TAGVAR(objext, $1)=$objext
18
19# Code to be used in simple compile tests
20lt_simple_compile_test_code="int some_variable = 0;"
21
22# Code to be used in simple link tests
23lt_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.
33compiler=$CC
34_LT_TAGVAR(compiler, $1)=$CC
35_LT_CC_BASENAME([$compiler])
36
37# GCJ did not exist at the time GCC didn't implicitly link libc in.
38_LT_TAGVAR(archive_cmds_need_lc, $1)=no
39
40_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
41
42## CAVEAT EMPTOR:
43## There is no encapsulation within the following macros, do not change
44## the running order or otherwise move them around unless you know exactly
45## what you are doing...
46if test -n "$compiler"; then
47  _LT_COMPILER_NO_RTTI($1)
48  _LT_COMPILER_PIC($1)
49  _LT_COMPILER_C_O($1)
50  _LT_COMPILER_FILE_LOCKS($1)
51  _LT_LINKER_SHLIBS($1)
52  _LT_SYS_DYNAMIC_LINKER($1)
53  _LT_LINKER_HARDCODE_LIBPATH($1)
54
55  _LT_CONFIG($1)
56fi
57
58_LT_TAGVAR(compiler, $1)=${GCJ-gcj}
59AC_LANG_RESTORE
60])# _LT_LANG_GCJ_CONFIG
61