home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / gdb-4.12-src.lha / GNU / src / amiga / gdb-4.12 / configure < prev    next >
Text File  |  1994-06-17  |  42KB  |  1,024 lines

  1. #!/bin/sh
  2.  
  3. ### WARNING: this file contains embedded tabs.  Do not run untabify on this file.
  4.  
  5. # Configuration script
  6. #   Copyright (C) 1988, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
  7.  
  8. # This program is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 2 of the License, or
  11. # (at your option) any later version.
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU General Public License for more details.
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. # Please email any bugs, comments, and/or additions to this file to:
  21. # bug-gdb@prep.ai.mit.edu
  22.  
  23. # This file was written by K. Richard Pixley.
  24.  
  25. #
  26. # Shell script to create proper links to machine-dependent files in
  27. # preparation for compilation.
  28. #
  29. # If configure succeeds, it leaves its status in config.status.
  30. # If configure fails after disturbing the status quo, 
  31. #       config.status is removed.
  32. #
  33.  
  34. # In places where the argument to echo may start with a '-', use /bin/echo
  35. # since the AmigaDOS pdksh builtin echo botches this case.
  36.  
  37. export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0 $argv; kill $$)
  38.  
  39. remove=rm
  40. hard_link=cp
  41. symbolic_link=cp
  42.  
  43. #for Test
  44. #remove="echo rm"
  45. #hard_link="echo ln"
  46. #symbolic_link="echo ln -s"
  47.  
  48. # clear some things potentially inherited from environment.
  49.  
  50. Makefile=Makefile
  51. Makefile_in=Makefile.in
  52. arguments=$*
  53. build_alias=
  54. configdirs=
  55. exec_prefix=
  56. exec_prefixoption=
  57. fatal=
  58. floating_point=default
  59. gas=default
  60. host_alias=
  61. host_makefile_frag=
  62. moveifchange=
  63. next_build=
  64. next_host=
  65. next_prefix=
  66. next_site=
  67. next_srcdir=
  68. next_target=
  69. next_tmpdir=
  70. norecursion=
  71. package_makefile_frag=
  72. # This is a hack so we don't have to remember to always configure using
  73. # the "--prefix=/gnu" option.  Personally I feel this should be settable
  74. # in a config file.  -fnf
  75. prefix=/gnu
  76. progname=
  77. program_prefix=
  78. program_prefixoption=
  79. program_suffix=
  80. program_suffixoption=
  81. program_transform_name=
  82. program_transform_nameoption=
  83. redirect=">/dev/null"
  84. removing=
  85. site=
  86. site_makefile_frag=
  87. site_option=
  88. srcdir=
  89. srctrigger=
  90. subdirs=
  91. target_alias=
  92. target_makefile_frag=
  93. undefinedargs=
  94. version="$Revision: 1.173 $"
  95. x11=default
  96.  
  97. ### we might need to use some other shell than /bin/sh for running subshells
  98. #
  99. config_shell=${CONFIG_SHELL-/bin/sh}
  100.  
  101. NO_EDIT="This file was generated automatically by configure.  Do not edit."
  102.  
  103. ## this is a little touchy and won't always work, but...
  104. ##
  105. ## if the argv[0] starts with a slash then it is an absolute name that can (and
  106. ## must) be used as is.
  107. ##
  108. ## otherwise, if argv[0] has no slash in it, we can assume that it is on the
  109. ## path.  Since PATH might include "." we also add `pwd` to the end of PATH.
  110. ##
  111.  
  112. # For some reason, the value of $0 in AmigaDOS pdksh ends up with a
  113. # trailing '/' that needs to be stripped.
  114. progname=`/bin/echo $0 | sed 's:/$::'`
  115. # if PWD already has a value, it is probably wrong.
  116. # The AmigaDOS pksh can't change the value of PWD, it's readonly.
  117. #if [ -n "$PWD" ]; then PWD=`pwd`; fi
  118.  
  119. case "${progname}" in
  120. /*) ;;
  121. */*) ;;
  122. *)
  123.         PATH=$PATH:${PWD=`pwd`} ; export PATH
  124.         ;;
  125. esac
  126.  
  127. for arg in $*
  128. do
  129.         # handle things that might have args following as separate words
  130.         if [ -n "${next_prefix}" ] ; then prefix=${arg} ; prefixoption="-prefix=${prefix}" ; next_prefix=
  131.         elif [ -n "${next_exec_prefix}" ] ; then
  132.                 exec_prefix=${arg}
  133.                 exec_prefixoption="-exec-prefix=${exec_prefix}"
  134.                 next_exec_prefix=
  135.         elif [ -n "${next_site}" ] ; then site=${arg} ; site_option=-site=${site} ; next_site=
  136.         # remove any possible trailing slash from srcdir.  See note below.
  137.         elif [ -n "${next_srcdir}" ] ; then srcdir=`/bin/echo ${arg} | sed -e 's:/$::'` ; next_srcdir=
  138.         elif [ -n "${next_program_prefix}" ] ; then
  139.                 program_prefix=${arg}
  140.                 program_prefixoption="-program_prefix=${program_prefix}"
  141.                 next_program_prefix=
  142.         elif [ -n "${next_program_suffix}" ] ; then
  143.                 program_suffix=${arg}
  144.                 program_suffixoption="-program_suffix=${program_suffix}"
  145.                 next_program_suffix=
  146.         elif [ -n "${next_program_transform_name}" ] ; then
  147.                 # Double any backslashes or dollar signs in the argument
  148.         if [ -n "${arg}" ] ; then
  149.             program_transform_name="${program_transform_name} -e `/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
  150.         fi
  151.                 program_transform_nameoption="${program_transform_nameoption} --program-transform-name='${arg}'"
  152.                 next_program_transform_name=
  153.         elif [ -n "${next_build}" ] ; then
  154.                 next_build=
  155.                 case "${build_alias}" in
  156.                 "")
  157.                         build_alias="${arg}"
  158.                         ;;
  159.                 *)
  160.                         echo '***' Can only configure for one build machine at a time.  1>&2
  161.                         fatal=yes
  162.                         ;;
  163.                 esac
  164.         elif [ -n "${next_target}" ] ; then
  165.                 next_target=
  166.                 case "${target_alias}" in
  167.                 "")
  168.                         target_alias="${arg}"
  169.                         ;;
  170.                 *)
  171.                         echo '***' Can only configure for one target at a time.  1>&2
  172.                         fatal=yes
  173.                         ;;
  174.                 esac
  175.         elif [ -n "${next_host}" ] ; then
  176.                 next_host=
  177.                 case "${host_alias}" in
  178.                 "")
  179.                         host_alias="${arg}"
  180.                         ;;
  181.                 *)
  182.                         echo '***' Can only configure for one host at a time.  1>&2
  183.                         fatal=yes
  184.                         ;;
  185.                 esac
  186.         elif [ -n "${next_tmpdir}" ] ; then
  187.                 next_tmpdir=
  188.                 tmpdiroption="--tmpdir=${arg}"
  189.                 TMPDIR=${arg}
  190.  
  191.         else
  192.                 case ${arg} in
  193.                 -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  194.                         case "${build_alias}" in
  195.                         "") build_alias="`/bin/echo ${arg} | sed 's/^[-a-z]*=//'`" ;;
  196.                         *)
  197.                                 echo '***' Can only configure for one build machine at a time.  1>&2
  198.                                 fatal=yes
  199.                                 ;;
  200.                         esac
  201.                         ;;
  202.                 -build | --build | --buil | --bui | --bu | --b)
  203.                         next_build=yes
  204.                         ;;
  205.                 -exec_prefix=* | --exec_prefix=* | --exec_prefi=* | --exec_pref=* | --exec_pre=* | --exec_pr=* | --exec_p=* | --exec_=* | --exec=* | --exe=* | --ex=* | --e=* | -exec-prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* )
  206.                         exec_prefix=`/bin/echo ${arg} | sed 's/^[-a-z_]*=//'`
  207.                         exec_prefixoption=${arg}
  208.                         ;;
  209.                 -exec_prefix | --exec_prefix | --exec_prefi | --exec_pref | --exec_pre | --exec_pr | --exec_p | --exec_ | --exec | --exe | --ex | --e | -exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec-)
  210.                         next_exec_prefix=yes
  211.                         ;;
  212.                 -gas | --g*)
  213.                         gas=yes
  214.                         ;;
  215.                 -help | --he*)
  216.                         fatal=true
  217.                         ;;
  218.                 -host=* | --host=* | --hos=* | --ho=*)
  219.                         case "${host_alias}" in
  220.                         "")
  221.                                 host_alias="`/bin/echo ${arg} | sed 's/^[-a-z]*=//'`"
  222.                                 ;;
  223.