ltgcc.m4 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. # Source file extension for Java test sources.
  12. ac_ext=c
  13. # Object file extension for compiled Java test sources.
  14. objext=o
  15. _LT_TAGVAR(objext, $1)=$objext
  16. # Code to be used in simple compile tests
  17. lt_simple_compile_test_code="int some_variable = 0;"
  18. # Code to be used in simple link tests
  19. lt_simple_link_test_code='int main(){return(0);}'
  20. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  21. _LT_TAG_COMPILER
  22. # save warnings/boilerplate of simple test code
  23. _LT_COMPILER_BOILERPLATE
  24. _LT_LINKER_BOILERPLATE
  25. # Allow CC to be a program name with arguments.
  26. GCC=yes
  27. compiler=$CC
  28. _LT_TAGVAR(compiler, $1)=$CC
  29. _LT_CC_BASENAME([$compiler])
  30. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  31. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  32. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  33. ## CAVEAT EMPTOR:
  34. ## There is no encapsulation within the following macros, do not change
  35. ## the running order or otherwise move them around unless you know exactly
  36. ## what you are doing...
  37. if test -n "$compiler"; then
  38. _LT_COMPILER_NO_RTTI($1)
  39. _LT_COMPILER_PIC($1)
  40. _LT_COMPILER_C_O($1)
  41. _LT_COMPILER_FILE_LOCKS($1)
  42. _LT_LINKER_SHLIBS($1)
  43. _LT_LINKER_HARDCODE_LIBPATH($1)
  44. _LT_CONFIG($1)
  45. fi
  46. _LT_TAGVAR(compiler, $1)=${GCJ-gcj}
  47. AC_LANG_RESTORE
  48. ])# _LT_LANG_GCJ_CONFIG