OSDN Git Service

2007-12-05 Bechir Zalila <bechir.zalila@gmail.com>
[pf3gnuchains/gcc-fork.git] / gnattools / configure
index 9e299b7..30a9085 100755 (executable)
@@ -880,7 +880,7 @@ esac
     else
       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
     fi
-    cd "$ac_popdir"
+    cd $ac_popdir
   done
 fi
 
@@ -1455,21 +1455,51 @@ test -n "$target_alias" &&
 # These demand that AC_CANONICAL_SYSTEM be called beforehand.
 
 ####
-# NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like AC_CHECK_TOOL, but tries a prefix of the target, not the host.
-# Code is pretty much lifted from autoconf2.53.
-
+# NCN_STRICT_CHECK_TOOLS(variable, progs-to-check-for,[value-if-not-found],[path])
+# Like plain AC_CHECK_TOOLS, but require prefix if build!=host.
 
 
 ####
-# NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like AC_CHECK_TOOL, but requires the prefix if build!=host.
+# NCN_STRICT_CHECK_TARGET_TOOLS(variable, progs-to-check-for,[value-if-not-found],[path])
+# Like CVS Autoconf AC_CHECK_TARGET_TOOLS, but require prefix if build!=target.
 
 
 
-####
-# NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target.
+# Backported from Autoconf 2.5x; can go away when and if
+# we switch.  Put the OS path separator in $PATH_SEPARATOR.
+
+
+
+
+# ACX_HAVE_GCC_FOR_TARGET
+# Check if the variable GCC_FOR_TARGET really points to a GCC binary.
+
+
+# ACX_CHECK_INSTALLED_TARGET_TOOL(VAR, PROG)
+# Searching for installed target binutils.  We need to take extra care,
+# else we may find the wrong assembler, linker, etc., and lose.
+#
+# First try --with-build-time-tools, if specified.
+#
+# For build != host, we ask the installed GCC for the name of the tool it
+# uses, and accept it if it is an absolute path.  This is because the
+# only good choice for a compiler is the same GCC version that is being
+# installed (or we couldn't make target libraries), and we assume that
+# on the host system we'll have not only the same GCC version, but also
+# the same binutils version.
+#
+# For build == host, search the same directories that the installed
+# compiler will search.  We used to do this for the assembler, linker,
+# and nm only; for simplicity of configuration, however, we extend this
+# criterion to tools (such as ar and ranlib) that are never invoked by
+# the compiler, to avoid mismatches.
+#
+# Also note we have to check MD_EXEC_PREFIX before checking the user's path
+# if build == target.  This makes the most sense only when bootstrapping,
+# but we also do so when build != host.  In this case, we hope that the
+# build and host systems will have similar contents of MD_EXEC_PREFIX.
+#
+# If we do not find a suitable binary, then try the user's path.
 
 
 ###
@@ -1489,7 +1519,11 @@ test -n "$target_alias" &&
 # understands Ada.  We use the user's CC setting, already found.
 #
 # Sets the shell variable have_gnat to yes or no as appropriate, and
-# substitutes GNATBIND.
+# substitutes GNATBIND and GNATMAKE.
+
+
+
+
 
 
 
@@ -1566,77 +1600,80 @@ case "${target}" in
   | xscale*-wrs-vx* \
   | xscale*-wrs-coff \
   | mips*-wrs-vx*)
-    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-vxworks.adb"
+    TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-vxworks.adb"
     ;;
   sparc-sun-solaris*)
-    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-solaris.adb"
+    TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-solaris.adb"
     ;;
   *86-*-solaris2*)
-    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-solaris.adb"
+    TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-solaris.adb"
     ;;
   *86-*-linux* \
-  | powerpc*-*-linux*)
-    TOOLS_TARGET_PAIRS="\
-    mlib-tgt.adb<mlib-tgt-linux.adb \
-    indepsw.adb<indepsw-linux.adb"
-    ;;
-  *ia64-*-linux* \
-  | alpha*-*-linux )
+  | powerpc*-*-linux* \
+  | *ia64-*-linux* \
+  | alpha*-*-linux* \
+  | sparc*-*-linux* \
+  | hppa*-*-linux* \
+  | *x86_64-*-linux*)
     TOOLS_TARGET_PAIRS="\
-    mlib-tgt.adb<mlib-tgt-linux.adb \
-    indepsw.adb<indepsw-linux.adb"
+    mlib-tgt-specific.adb<mlib-tgt-linux.adb \
+    indepsw.adb<indepsw-gnu.adb"
     ;;
-  *x86_64-*-linux* \
-  | s390*-*-linux*)
-    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-linux.adb"
+  s390*-*-linux*)
+    TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-linux.adb"
     ;;
   *86-*-freebsd*)
     TOOLS_TARGET_PAIRS="\
-    mlib-tgt.adb<mlib-tgt-linux.adb"
+    mlib-tgt-specific.adb<mlib-tgt-linux.adb \
+    indepsw.adb<indepsw-gnu.adb"
     ;;
   mips-sgi-irix*)
-    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-irix.adb"
+    TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-irix.adb"
     ;;
   hppa*-hp-hpux10*) # Unlike hpux11
     ;;
   hppa*-hp-hpux11*)
-    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-hpux.adb"
+    TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-hpux.adb"
     ;;
   *-ibm-aix*)
     TOOLS_TARGET_PAIRS="\
-    mlib-tgt.adb<mlib-tgt-aix.adb \
+    mlib-tgt-specific.adb<mlib-tgt-aix.adb \
     indepsw.adb<indepsw-aix.adb"
     ;;
   alpha*-dec-osf*)
-    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-tru64.adb"
+    TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-tru64.adb"
     ;;
   alpha*-dec-vms* | alpha*-dec-openvms* | alpha*-dec-vms* \
   | alpha*-hp-vms* | alpha*-hp-openvms* | alpha*-hp-vms*)
     TOOLS_TARGET_PAIRS="\
-    mlib-tgt.adb<mlib-tgt-vms-alpha.adb \
-    symbols.adb<symbols-vms-alpha.adb"
+    mlib-tgt-specific.adb<mlib-tgt-vms-alpha.adb \
+    symbols.adb<symbols-vms.adb \
+    symbols-processing.adb<symbols-processing-vms-alpha.adb"
 
     EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
     ;;
   ia64*-dec-vms* | ia64*-dec-openvms* | ia64*-dec-vms* \
   | ia64*-hp-vms* | ia64*-hp-openvms* | ia64*-hp-vms*)
     TOOLS_TARGET_PAIRS="\
-    mlib-tgt.adb<mlib-tgt-vms-ia64.adb \
-    symbols.adb<symbols-vms-ia64.adb"
+    mlib-tgt-specific.adb<mlib-tgt-vms-ia64.adb \
+    symbols.adb<symbols-vms.adb \
+    symbols-processing.adb<symbols-processing-vms-ia64.adb"
 
     EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
     ;;
   *-*-cygwin32* | *-*-mingw32* | *-*-pe)
     TOOLS_TARGET_PAIRS="\
-    mlib-tgt.adb<mlib-tgt-mingw.adb \
+    mlib-tgt-specific.adb<mlib-tgt-mingw.adb \
     indepsw.adb<indepsw-mingw.adb"
     EXTRA_GNATTOOLS='../../gnatdll$(exeext)'
     ;;
-  powerpc-*-darwin*)
-    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-darwin.adb"
+  powerpc-*-darwin* | *86-*-darwin*)
+    TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-darwin.adb"
     ;;
   *-*-lynxos)
-    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-lynxos.adb"
+    TOOLS_TARGET_PAIRS="\
+    mlib-tgt-specific.adb<mlib-tgt-lynxos.adb \
+    indepsw.adb<indepsw-gnu.adb"
     ;;
 esac
 
@@ -2469,6 +2506,11 @@ esac
   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
   esac
 
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
   # Let's still pretend it is `configure' which instantiates (i.e., don't
   # use $as_me), people would be surprised to read:
   #    /* config.h.  Generated by config.status.  */
@@ -2507,12 +2549,6 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
         fi;;
       esac
     done` || { (exit 1); exit 1; }
-
-  if test x"$ac_file" != x-; then
-    { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    rm -f "$ac_file"
-  fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
   sed "$ac_vpsub