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