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