home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gdb-4.16-base.tgz / gdb-4.16-base.tar / fsf / gdb / sim / configure.in < prev    next >
Text File  |  1996-04-08  |  2KB  |  63 lines

  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_PREREQ(2.3)dnl
  3. AC_INIT(Makefile.in)
  4.  
  5. AC_PROG_CC
  6. AC_CHECK_TOOL(AR, ar)
  7. AC_CHECK_TOOL(RANLIB, ranlib, :)
  8.  
  9. AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
  10. AC_CANONICAL_SYSTEM
  11. AC_ARG_PROGRAM
  12. AC_PROG_CC
  13. AC_SUBST(CFLAGS)
  14. AC_SUBST(HDEFINES)
  15. AR=${AR-ar}
  16. AC_SUBST(AR)
  17. AC_PROG_RANLIB
  18.  
  19. # Put a plausible default for CC_FOR_BUILD in Makefile.
  20. AC_C_CROSS
  21. if test "x$cross_compiling" = "xno"; then
  22.   CC_FOR_BUILD='$(CC)'
  23. else
  24.   CC_FOR_BUILD=gcc
  25. fi
  26. AC_SUBST(CC_FOR_BUILD)
  27.  
  28. # The PowerPC simulator uses the GCC extension long long as well as
  29. # ANSI prototypes, so don't enable it for random host compilers
  30. # unless asked to.
  31.  
  32. AC_ARG_ENABLE(sim-powerpc,
  33. [  --enable-sim-powerpc ],
  34. [case "${enableval}" in
  35. yes)    powerpc_sim=yes ;;
  36. no)    powerpc_sim=no ;;
  37. *)    AC_MSG_ERROR(bad value ${enableval} given for sim-powerpc option) ;;
  38. esac],[if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi])
  39.  
  40. # WHEN ADDING ENTRIES TO THIS MATRIX:
  41. #  Make sure that the left side always has two dashes.  Otherwise you
  42. #  can get spurious matches.  Even for unambiguous cases, do this as a
  43. #  convention, else the table becomes a real mess to understand and maintain.
  44.  
  45. case "${target}" in
  46.   arm*-*-*)        sim_target=arm ;;
  47.   h8300*-*-*)        sim_target=h8300 ;;
  48.   h8500-*-*)        sim_target=h8500 ;;
  49.   mips*-*-*)        sim_target=mips ;;
  50.   sh*-*-*)        sim_target=sh ;; 
  51.   powerpc*-*-eabi*)    if test x"$powerpc_sim" = x"yes"; then sim_target=ppc; fi ;;
  52.   w65-*-*)        sim_target=w65 ;;
  53.   z8k*-*-*)        sim_target=z8k ;;
  54.   *)            sim_target=none ;;
  55. esac
  56.  
  57. configdirs=${sim_target}
  58. AC_CONFIG_SUBDIRS($configdirs)
  59.  
  60. AC_OUTPUT(Makefile)
  61.  
  62. exit 0
  63.