$NetBSD: patch-ac,v 1.9 2014/06/29 19:03:30 dholland Exp $ - Don't belch on single quotes in uname output. - Dragonfly support. - Always use pkgsrc termcap. - Use assorted pkgsrc tools. - Don't embed the tools path of sleep into installed scripts. --- Configure.orig 2001-02-22 19:17:39.000000000 +0000 +++ Configure @@ -1260,7 +1260,6 @@ mkdir mv rm sed -sleep sort tail touch @@ -1366,6 +1365,7 @@ for file in $trylist; do ;; esac done +sleep=sleep case "$egrep" in egrep) echo "Substituting grep for egrep." @@ -1507,7 +1507,7 @@ case "$config_sh" in myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1` # tr '[A-Z]' '[a-z]' would not work in EBCDIC # because the A-Z/a-z are not consecutive. -myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \ +myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e "s/['/]//g" | \ ./tr '[A-Z]' '[a-z]' | tr $trnl ' '` newmyuname="$myuname" dflt=n @@ -2540,7 +2540,7 @@ EOM esac ;; *) case "$d_inews" in - '') dflt="$prefix/bin";; + '') dflt=none;; "$define") set dflt installinews bin eval $prefixit @@ -4412,6 +4412,9 @@ case "$nm_so_opt" in nm_so_opt='--dynamic' fi ;; + *dragonfly*) + nm_so_opt='-D' + ;; esac ;; esac @@ -4855,10 +4858,54 @@ set getpwent d_getpwent eval $inlibc : where do we get termlib routines from +if :; then # pkgsrc +# disable termcap search; for pkgsrc always use -ltermcap + termlib='-ltermcap' + d_havetlib="$define" + echo "Using pkgsrc termcap." >&4 +else echo " " -xxx=`./loc libcurses$_a x $libpth` +xxx=`./loc libtermlib$_a x $libpth` case "$xxx" in /*) + case "$xxx" in + /usr/lib*|/lib*) + termlib='-ltermlib' + d_havetlib="$define" + echo "Termlib library found." >&4 + ;; + /*) + termlib="$xxx" + d_havetlib="$define" + echo "Termlib library found." >&4 + ;; + *) + xxx=x + esac + ;; +esac +case "$xxx" in +x) + xxx=`./loc libtermcap.$so'*' x $libpth` + case "$xxx" in + /usr/lib*|/lib*) + termlib='-ltermcap' + d_havetlib="$define" + echo "Termcap library found." >&4 + ;; + /*) + termlib="$xxx" + d_havetlib="$define" + echo "Termcap library found." >&4 + ;; + *) + xxx=x + esac + ;; +esac +case "$xxx" in +x) + xxx=`./loc libcurses$_a x $libpth` ar t $xxx >grimble if $contains tputs$_o grimble >/dev/null 2>&1; then termlib='-lcurses' @@ -4882,10 +4929,10 @@ case "$xxx" in esac case "$xxx" in x) - xxx=`./loc libtermlib$_a x $libpth` + xxx=`./loc libcurses$_a x $libpth` case "$xxx" in /usr/lib*|/lib*) - termlib='-ltermlib' + termlib='-lcurses' d_havetlib="$define" echo "Termlib library found." >&4 ;; @@ -4901,17 +4948,17 @@ x) esac case "$xxx" in x) - xxx=`./loc libtermcap$_a x $libpth` + xxx=`./loc libcurses.$so'*' x $libpth` case "$xxx" in /usr/lib*|/lib*) - termlib='-ltermcap' + termlib='-lcurses' d_havetlib="$define" - echo "Termcap library found." >&4 + echo "Terminfo library found." >&4 ;; /*) termlib="$xxx" d_havetlib="$define" - echo "Termcap library found." >&4 + echo "Terminfo library found." >&4 ;; *) xxx=x @@ -4928,6 +4975,7 @@ x) echo "Terminfo library found." >&4 ;; /*) + xxx=`dirname "$xxx"` termlib="$xxx" d_havetlib="$define" echo "Terminfo library found." >&4 @@ -4958,25 +5006,6 @@ x) esac case "$xxx" in x) - xxx=`./loc libtermcap.$so'*' x $libpth` - case "$xxx" in - /usr/lib*|/lib*) - termlib='-ltermcap' - d_havetlib="$define" - echo "Termcap library found." >&4 - ;; - /*) - termlib="$xxx" - d_havetlib="$define" - echo "Termcap library found." >&4 - ;; - *) - xxx=x - esac - ;; -esac -case "$xxx" in -x) dflt=y rp="Your system appears to NOT have termlib-style routines. Is this true?" . ./myread @@ -5000,6 +5029,7 @@ EOM esac ;; esac +fi # pkgsrc : Decide whether to ignore the ORGANIZATION environment variable case "$d_ignoreorg" in @@ -6223,14 +6253,14 @@ active='$active' acttimes='$acttimes' aphostcmd='$aphostcmd' archobjs='$archobjs' -awk='$awk' -basename='$basename' +awk='$TOOLS_AWK' +basename='$TOOLS_BASENAME' bash='$bash' bin='$bin' binexp='$binexp' byacc='$byacc' c='$c' -cat='$cat' +cat='$TOOLS_CAT' cc='$cc' ccflags='$ccflags' cf_by='$cf_by' @@ -6240,7 +6270,7 @@ cntrydist='$cntrydist' comm='$comm' contains='$contains' contdist='$contdist' -cp='$cp' +cp='$TOOLS_CP' cpp='$cpp' cppflags='$cppflags' cpplast='$cpplast' @@ -6305,21 +6335,21 @@ d_xenix='$d_xenix' d_xthread='$d_xthread' date='$date' defeditor='$defeditor' -diff='$diff' +diff='$TOOLS_DIFF' direntrytype='$direntrytype' -echo='$echo' +echo='$TOOLS_ECHO' ed='$ed' -egrep='$egrep' +egrep='$TOOLS_EGREP' eunicefix='$eunicefix' exe_ext='$exe_ext' -expr='$expr' +expr='$TOOLS_EXPR' extrainews='$extrainews' filexp='$filexp' find='$find' firstmakefile='$firstmakefile' gccversion='$gccversion' glibpth='$glibpth' -grep='$grep' +grep='$TOOLS_GREP' groupdesc='$groupdesc' hint='$hint' hostbits='$hostbits' @@ -6376,10 +6406,10 @@ mboxchar='$mboxchar' mimecap='$mimecap' mips='$mips' mips_type='$mips_type' -mkdir='$mkdir' +mkdir='$TOOLS_MKDIR' more='$more' multistatedist='$multistatedist' -mv='$mv' +mv='$TOOLS_MV' myactive='$myactive' myuname='$myuname' n='$n' @@ -6417,11 +6447,11 @@ prefixexp='$prefixexp' prefshell='$prefshell' privlib='$privlib' privlibexp='$privlibexp' -rm='$rm' +rm='$TOOLS_RM' rmail='$rmail' rootid='$rootid' runnm='$runnm' -sed='$sed' +sed='$TOOLS_SED' sendmail='$sendmail' servername='$servername' sharpbang='$sharpbang' @@ -6442,7 +6472,7 @@ strings='$strings' strn='$strn' subscriptions='$subscriptions' sysman='$sysman' -tail='$tail' +tail='$TOOLS_TAIL' tee='$tee' termlib='$termlib' test='$test' @@ -6450,7 +6480,7 @@ threaddir='$threaddir' tk='$tk' tkinc='$tkinc' tklibs='$tklibs' -tr='$tr' +tr='$TOOLS_TR' trn_init='$trn_init' trn_select='$trn_select' trnl='$trnl'