From: Jeff Law Date: Wed, 9 Oct 1996 12:08:15 +0000 (+0000) Subject: * configure: Avoid hpux10.20 sed bug. X-Git-Tag: gdb-4_18~7469 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4efa6b75d81d88ed41fd113cbb0c2d3303442dc8;p=platform%2Fupstream%2Fbinutils.git * configure: Avoid hpux10.20 sed bug. --- diff --git a/ChangeLog b/ChangeLog index 6f0be42..c42e555 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Oct 9 06:06:46 1996 Jeffrey A Law (law@cygnus.com) + + * configure: Avoid hpux10.20 sed bug. + Tue Oct 8 08:32:48 1996 Stu Grossman (grossman@critters.cygnus.com) * configure.in config/mh-windows: Add support for windows host diff --git a/configure b/configure index 3d6be6e..36afd7d 100755 --- a/configure +++ b/configure @@ -180,8 +180,8 @@ do esac enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'` - eval $enableopt="$optarg" - enableoptions="$enableoptions $option" + eval "$enableopt='$optarg'" + enableoptions="$enableoptions '$option'" ;; --exec-prefix* | --ex*) exec_prefix=$optarg @@ -203,6 +203,7 @@ do ;; --nfp | --nf*) floating_point=no + floating_pointoption="--nfp" ;; --norecursion | --no*) norecursion=yes @@ -339,7 +340,7 @@ case "${fatal}" in # Neither --host option nor undefs were present. # Call config.guess. guesssys=`echo ${progname} | sed 's/configure$/config.guess/'` - if host_alias=`${guesssys}` + if host_alias=`${config_shell} ${guesssys}` then # If the string we are going to use for # the target is a prefix of the string @@ -425,7 +426,7 @@ configsub=`echo ${progname} | sed 's/configure$/config.sub/'` moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'` # this is a hack. sun4 must always be a valid host alias or this will fail. -if ${configsub} sun4 >/dev/null 2>&1 ; then +if ${config_shell} ${configsub} sun4 >/dev/null 2>&1 ; then true else echo '***' cannot find config.sub. 1>&2 @@ -433,7 +434,7 @@ else fi touch config.junk -if ${moveifchange} config.junk config.trash ; then +if ${config_shell} ${moveifchange} config.junk config.trash ; then true else echo '***' cannot find move-if-change. 1>&2 @@ -511,7 +512,7 @@ case "`grep '^# per\-host:' ${srcdir}/configure.in`" in ${program_prefixoption} ${program_suffixoption} \ ${program_transform_nameoption} ${site_option} \ ${withoptions} ${withoutoptions} \ - ${enableoptions} ${disableoptions} \ + ${enableoptions} ${disableoptions} ${floating_pointoption} \ ${cache_file_option} ${removing} ${other_options} ${redirect} else echo '***' There is no configure script present though. 1>&2 @@ -672,7 +673,9 @@ fi if [ -z "${CC}" -a -r Makefile ]; then sed -n -e ':loop /\\$/ N +s/\\$/\\*hpuxsedbug*/ /\\$/ b loop +s/\\\*hpuxsedbug\*/\\/g s/\\\n//g /^CC[ ]*=/ s/CC[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc CC=`tail -1 Makefile.cc` @@ -682,13 +685,53 @@ fi if [ -z "${CXX}" -a -r Makefile ]; then sed -n -e ':loop /\\$/ N +s/\\$/\\*hpuxsedbug*/ /\\$/ b loop +s/\\\*hpuxsedbug\*/\\/g s/\\\n//g /^CXX[ ]*=/ s/CXX[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc CXX=`tail -1 Makefile.cc` rm -f Makefile.cc fi +# Generate a default definition for YACC. This is used if the makefile can't +# locate bison or byacc in objdir. + +for prog in 'bison -y' byacc yacc +do + set dummy $prog; tmp=$2 + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + for dir in $PATH; do + test -z "$dir" && dir=. + if test -f $dir/$tmp; then + DEFAULT_YACC="$prog" + break + fi + done + IFS="$save_ifs" + + test -n "$DEFAULT_YACC" && break +done + +# Generate a default definition for LEX. This is used if the makefile can't +# locate flex in objdir. + +for prog in flex lex +do + set dummy $prog; tmp=$2 + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + for dir in $PATH; do + test -z "$dir" && dir=. + if test -f $dir/$tmp; then + DEFAULT_LEX="$prog" + break + fi + done + IFS="$save_ifs" + + test -n "$DEFAULT_LEX" && break +done + if [ "${build}" != "${host}" ]; then # If we are doing a Canadian Cross, in which the host and build systems # are not the same, we set reasonable default values for the tools. @@ -703,7 +746,9 @@ if [ "${build}" != "${host}" ]; then if [ -z "`eval 'echo $'"${var}"`" -a -r Makefile ]; then sed -n -e ':loop /\\$/ N +s/\\$/\\*hpuxsedbug*/ /\\$/ b loop +s/\\\*hpuxsedbug\*/\\/g s/\\\n//g /^'"${var}"'[ ]*=/ s/'"${var}"'[ ]*=[ ]*\(.*\)/\1/p' \ < Makefile > Makefile.v @@ -806,6 +851,8 @@ export CXX case "$host" in *go32*) enable_gdbtk=no ;; + *cygwin32*) + enable_gdbtk=no ;; esac # Determine whether gdb needs tk/tcl or not. @@ -1067,14 +1114,18 @@ EOF -e "/^CC[ ]*=/{ :loop1 /\\\\$/ N + s/\\\\$/\\\\*hpuxsedbug*/ /\\\\$/ b loop1 + s/\\\\\\*hpuxsedbug\\*/\\\\/g s/\\\\\\n//g s%^CC[ ]*=.*$%CC = ${CC}% }" \ -e "/^CXX[ ]*=/{ :loop2 /\\\\$/ N + s/\\\\$/\\\\*hpuxsedbug*/ /\\\\$/ b loop2 + s/\\\\\\*hpuxsedbug\\*/\\\\/g s/\\\\\\n//g s%^CXX[ ]*=.*$%CXX = ${CXX}% }" \ @@ -1086,6 +1137,8 @@ EOF -e "s:^program_suffix[ ]*=.*$:program_suffix = ${program_suffix}:" \ -e "s:^program_transform_name[ ]*=.*$:program_transform_name = ${program_transform_name}:" \ -e "s:^tooldir[ ]*=.*$:tooldir = ${tooldir}:" \ + -e "s:^DEFAULT_YACC[ ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \ + -e "s:^DEFAULT_LEX[ ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \ ${subdir}/Makefile.tem >> ${Makefile} # If this is a Canadian Cross, preset the values of many more @@ -1233,7 +1286,7 @@ if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then if [ ! -z "${recprog}" ] ; then if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \ ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \ - ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then + ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then true else echo Configure in `pwd` failed, exiting. 1>&2