| 1 | # _LT_LANG_GCJ_CONFIG([TAG]) |
| 2 | # -------------------------- |
| 3 | # Ensure that the configuration variables for the GNU Java Compiler compiler |
| 4 | # are suitably defined. These variables are subsequently used by _LT_CONFIG |
| 5 | # to write the compiler configuration to `libtool'. Locally modified to |
| 6 | # run its tests on C programs, because we cannot link Java programs until |
| 7 | # we have finished building libjava. |
| 8 | AC_DEFUN([_LT_LANG_GCJ_CONFIG], |
| 9 | [AC_REQUIRE([LT_PROG_GCJ])dnl |
| 10 | AC_LANG_SAVE |
| 11 | |
| 12 | # Source file extension for Java test sources. |
| 13 | ac_ext=c |
| 14 | |
| 15 | # Object file extension for compiled Java test sources. |
| 16 | objext=o |
| 17 | _LT_TAGVAR(objext, $1)=$objext |
| 18 | |
| 19 | # Code to be used in simple compile tests |
| 20 | lt_simple_compile_test_code="int some_variable = 0;" |
| 21 | |
| 22 | # Code to be used in simple link tests |
| 23 | lt_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. |
| 33 | compiler=$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... |
| 46 | if 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) |
| 56 | fi |
| 57 | |
| 58 | _LT_TAGVAR(compiler, $1)=${GCJ-gcj} |
| 59 | AC_LANG_RESTORE |
| 60 | ])# _LT_LANG_GCJ_CONFIG |