* scripttempl/i960.sc: Add CONSTRUCTORS to .data.
[binutils-gdb.git] / configure
index 7508ae09cf8d34dd64245d6f2e50f444fedaa727..65185c2f44db8cdee91cfb311bcc3c657dcf53f5 100755 (executable)
--- a/configure
+++ b/configure
@@ -141,7 +141,7 @@ do
                ;;
 # These options have mandatory values.  Since we didn't find an = sign,
 # the value must be in the next argument
-       --b* | --ex* | --ho* | --pre* | --program-p* | --program-s* | --program-t* | --si* | --sr* | --ta* | --tm*)
+       --b* | --ex* | --ho* | --pre* | --program-p* | --program-s* | --program-t* | --si* | --sr* | --ta* | --tm* | --x-*)
                optarg=$1
                shift
                ;;
@@ -212,7 +212,7 @@ do
        --program-transform-name* | --program-t*)
                # Double any backslashes or dollar signs in the argument
                program_transform_name="${program_transform_name} -e `echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
-               program_transform_nameoption="--program-transform-nameoption='$optarg'"
+               program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'"
                ;;
        --rm)
                removing=--rm
@@ -273,11 +273,11 @@ do
        --x)    with_x=yes
                withoptions="$withoptions --with-x"
                ;;
+       --x-i* | --x-l*) other_options="$other_options $orig_option"
+               ;;
        --*)
-               echo "Warning: Unrecognized option: \"$orig_option\"". >&2
-               # Pass the option to any configure scripts in subdirectories
-               # in case they recognize it.
-               other_options="$other_options $orig_option"
+               echo "configure: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
+               exit 1
                ;;
        *)
                case $undefs in
@@ -328,6 +328,30 @@ case "${fatal}" in
                        guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
                        if host_alias=`${guesssys}`
                        then
+                               # If the string we are going to use for
+                               # the target is a prefix of the string
+                               # we just guessed for the host, then
+                               # assume we are running native, and force
+                               # the same string for both target and host.
+                               case $target_alias in
+                               NOTARGET)
+                                       case $undefs in
+                                       NOUNDEFS) ;;
+                                       *)
+                                           if expr $host_alias : $undefs >/dev/null
+                                           then
+                                               host_alias=$undefs
+                                           fi
+                                           ;;
+                                       esac
+                                       ;;
+                               *)
+                                       if expr $host_alias : $target_alias >/dev/null
+                                       then
+                                               host_alias=$target_alias
+                                       fi
+                                       ;;
+                               esac
                                echo "Configuring for a ${host_alias} host." 1>&2
                                arguments="--host=$host_alias $arguments"
                        else
@@ -360,7 +384,7 @@ esac
 
 if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then
        exec 1>&2
-       echo Usage: configure HOST
+       echo Usage: configure [OPTIONS] HOST
        echo
        echo Options: [defaults in brackets]
        echo ' --prefix=MYDIR            configure for installation of host independent files into MYDIR. ["/usr/local"]'
@@ -382,7 +406,7 @@ if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then
        echo ' --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)'
        echo ' --disable-FOO             do not include feature FOO'
        echo
-       echo 'Where HOST and TARGET are something like "vax", "sun3", "encore", etc.'
+       echo 'Where HOST and TARGET are something like "sun4", "decstation", "encore", etc.'
        echo
        if [ -r config.status ] ; then
                cat config.status
@@ -632,9 +656,15 @@ for subdir in . ${subdirs} ; do
                 fi
 
                 ${remove} -f ${link}
-                # Make a symlink if possible, otherwise try a hard link
-                ${symbolic_link} ${srcdir}/${file} ${link} 2>/dev/null || ${hard_link} ${srcdir}/${file} ${link}
-
+               # Make a symlink if possible, otherwise try a hard link
+               if ${symbolic_link} ${srcdir}/${file} ${link} >/dev/null 2>&1 ; then
+                       true
+               else
+                       # We need to re-remove the file because Lynx leaves a 
+                       # very strange directory there when it fails an NFS symlink.
+                       ${remove} -r -f ${link}
+                       ${hard_link} ${srcdir}/${file} ${link}
+               fi
                 if [ ! -r ${link} ] ; then
                         echo '***' "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2
                         exit 1
@@ -737,6 +767,7 @@ EOF
                       fi
                       if [ -f ${package_makefile_frag} ] ; then
                               sed -e "/^####/  r ${package_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
+                             rm -f ${subdir}/Makefile.tem
                       else
                               echo '***' Expected package makefile fragment \"${package_makefile_frag}\" 1>&2
                               echo '***' is missing in ${PWD=`pwd`}. 1>&2