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