xref: /netbsd-src/external/gpl3/binutils/dist/ltgcc.m4 (revision be9ac0ea6dd4dd3d7f9b0dfc7f99591c100b3bb9)
12a6b7db3Sskrll# _LT_LANG_GCJ_CONFIG([TAG])
22a6b7db3Sskrll# --------------------------
32a6b7db3Sskrll# Ensure that the configuration variables for the GNU Java Compiler compiler
42a6b7db3Sskrll# are suitably defined.  These variables are subsequently used by _LT_CONFIG
52a6b7db3Sskrll# to write the compiler configuration to `libtool'.  Locally modified to
62a6b7db3Sskrll# run its tests on C programs, because we cannot link Java programs until
72a6b7db3Sskrll# we have finished building libjava.
82a6b7db3SskrllAC_DEFUN([_LT_LANG_GCJ_CONFIG],
92a6b7db3Sskrll[AC_REQUIRE([LT_PROG_GCJ])dnl
102a6b7db3SskrllAC_LANG_SAVE
112a6b7db3Sskrll
122a6b7db3Sskrll# Source file extension for Java test sources.
132a6b7db3Sskrllac_ext=c
142a6b7db3Sskrll
152a6b7db3Sskrll# Object file extension for compiled Java test sources.
162a6b7db3Sskrllobjext=o
172a6b7db3Sskrll_LT_TAGVAR(objext, $1)=$objext
182a6b7db3Sskrll
192a6b7db3Sskrll# Code to be used in simple compile tests
202a6b7db3Sskrlllt_simple_compile_test_code="int some_variable = 0;"
212a6b7db3Sskrll
222a6b7db3Sskrll# Code to be used in simple link tests
232a6b7db3Sskrlllt_simple_link_test_code='int main(){return(0);}'
242a6b7db3Sskrll
252a6b7db3Sskrll# ltmain only uses $CC for tagged configurations so make sure $CC is set.
262a6b7db3Sskrll_LT_TAG_COMPILER
272a6b7db3Sskrll
282a6b7db3Sskrll# save warnings/boilerplate of simple test code
292a6b7db3Sskrll_LT_COMPILER_BOILERPLATE
302a6b7db3Sskrll_LT_LINKER_BOILERPLATE
312a6b7db3Sskrll
322a6b7db3Sskrll# Allow CC to be a program name with arguments.
33*be9ac0eaSchristosGCC=yes
342a6b7db3Sskrllcompiler=$CC
352a6b7db3Sskrll_LT_TAGVAR(compiler, $1)=$CC
362a6b7db3Sskrll_LT_CC_BASENAME([$compiler])
372a6b7db3Sskrll
382a6b7db3Sskrll# GCJ did not exist at the time GCC didn't implicitly link libc in.
392a6b7db3Sskrll_LT_TAGVAR(archive_cmds_need_lc, $1)=no
402a6b7db3Sskrll
412a6b7db3Sskrll_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
422a6b7db3Sskrll
432a6b7db3Sskrll## CAVEAT EMPTOR:
442a6b7db3Sskrll## There is no encapsulation within the following macros, do not change
452a6b7db3Sskrll## the running order or otherwise move them around unless you know exactly
462a6b7db3Sskrll## what you are doing...
472a6b7db3Sskrllif test -n "$compiler"; then
482a6b7db3Sskrll  _LT_COMPILER_NO_RTTI($1)
492a6b7db3Sskrll  _LT_COMPILER_PIC($1)
502a6b7db3Sskrll  _LT_COMPILER_C_O($1)
512a6b7db3Sskrll  _LT_COMPILER_FILE_LOCKS($1)
522a6b7db3Sskrll  _LT_LINKER_SHLIBS($1)
532a6b7db3Sskrll  _LT_LINKER_HARDCODE_LIBPATH($1)
542a6b7db3Sskrll
552a6b7db3Sskrll  _LT_CONFIG($1)
562a6b7db3Sskrllfi
572a6b7db3Sskrll
582a6b7db3Sskrll_LT_TAGVAR(compiler, $1)=${GCJ-gcj}
592a6b7db3SskrllAC_LANG_RESTORE
602a6b7db3Sskrll])# _LT_LANG_GCJ_CONFIG
61