| OLD | NEW |
| 1 #! /bin/sh | 1 #! /bin/sh |
| 2 # Common stub for a few missing GNU programs while installing. | 2 # Common stub for a few missing GNU programs while installing. |
| 3 | 3 |
| 4 scriptversion=2006-05-10.23 | 4 scriptversion=2009-04-28.21; # UTC |
| 5 | 5 |
| 6 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 | 6 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, |
| 7 # Free Software Foundation, Inc. | 7 # 2008, 2009 Free Software Foundation, Inc. |
| 8 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. | 8 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. |
| 9 | 9 |
| 10 # This program is free software; you can redistribute it and/or modify | 10 # This program is free software; you can redistribute it and/or modify |
| 11 # it under the terms of the GNU General Public License as published by | 11 # it under the terms of the GNU General Public License as published by |
| 12 # the Free Software Foundation; either version 2, or (at your option) | 12 # the Free Software Foundation; either version 2, or (at your option) |
| 13 # any later version. | 13 # any later version. |
| 14 | 14 |
| 15 # This program is distributed in the hope that it will be useful, | 15 # This program is distributed in the hope that it will be useful, |
| 16 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 # GNU General Public License for more details. | 18 # GNU General Public License for more details. |
| 19 | 19 |
| 20 # You should have received a copy of the GNU General Public License | 20 # You should have received a copy of the GNU General Public License |
| 21 # along with this program; if not, write to the Free Software | 21 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 22 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | |
| 23 # 02110-1301, USA. | |
| 24 | 22 |
| 25 # As a special exception to the GNU General Public License, if you | 23 # As a special exception to the GNU General Public License, if you |
| 26 # distribute this file as part of a program that contains a | 24 # distribute this file as part of a program that contains a |
| 27 # configuration script generated by Autoconf, you may include it under | 25 # configuration script generated by Autoconf, you may include it under |
| 28 # the same distribution terms that you use for the rest of that program. | 26 # the same distribution terms that you use for the rest of that program. |
| 29 | 27 |
| 30 if test $# -eq 0; then | 28 if test $# -eq 0; then |
| 31 echo 1>&2 "Try \`$0 --help' for more information" | 29 echo 1>&2 "Try \`$0 --help' for more information" |
| 32 exit 1 | 30 exit 1 |
| 33 fi | 31 fi |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 autom4te touch the output file, or create a stub one | 80 autom4te touch the output file, or create a stub one |
| 83 automake touch all \`Makefile.in' files | 81 automake touch all \`Makefile.in' files |
| 84 bison create \`y.tab.[ch]', if possible, from existing .[ch] | 82 bison create \`y.tab.[ch]', if possible, from existing .[ch] |
| 85 flex create \`lex.yy.c', if possible, from existing .c | 83 flex create \`lex.yy.c', if possible, from existing .c |
| 86 help2man touch the output file | 84 help2man touch the output file |
| 87 lex create \`lex.yy.c', if possible, from existing .c | 85 lex create \`lex.yy.c', if possible, from existing .c |
| 88 makeinfo touch the output file | 86 makeinfo touch the output file |
| 89 tar try tar, gnutar, gtar, then tar without non-portable flags | 87 tar try tar, gnutar, gtar, then tar without non-portable flags |
| 90 yacc create \`y.tab.[ch]', if possible, from existing .[ch] | 88 yacc create \`y.tab.[ch]', if possible, from existing .[ch] |
| 91 | 89 |
| 90 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and |
| 91 \`g' are ignored when checking the name. |
| 92 |
| 92 Send bug reports to <bug-automake@gnu.org>." | 93 Send bug reports to <bug-automake@gnu.org>." |
| 93 exit $? | 94 exit $? |
| 94 ;; | 95 ;; |
| 95 | 96 |
| 96 -v|--v|--ve|--ver|--vers|--versi|--versio|--version) | 97 -v|--v|--ve|--ver|--vers|--versi|--versio|--version) |
| 97 echo "missing $scriptversion (GNU Automake)" | 98 echo "missing $scriptversion (GNU Automake)" |
| 98 exit $? | 99 exit $? |
| 99 ;; | 100 ;; |
| 100 | 101 |
| 101 -*) | 102 -*) |
| 102 echo 1>&2 "$0: Unknown \`$1' option" | 103 echo 1>&2 "$0: Unknown \`$1' option" |
| 103 echo 1>&2 "Try \`$0 --help' for more information" | 104 echo 1>&2 "Try \`$0 --help' for more information" |
| 104 exit 1 | 105 exit 1 |
| 105 ;; | 106 ;; |
| 106 | 107 |
| 107 esac | 108 esac |
| 108 | 109 |
| 110 # normalize program name to check for. |
| 111 program=`echo "$1" | sed ' |
| 112 s/^gnu-//; t |
| 113 s/^gnu//; t |
| 114 s/^g//; t'` |
| 115 |
| 109 # Now exit if we have it, but it failed. Also exit now if we | 116 # Now exit if we have it, but it failed. Also exit now if we |
| 110 # don't have it and --version was passed (most likely to detect | 117 # don't have it and --version was passed (most likely to detect |
| 111 # the program). | 118 # the program). This is about non-GNU programs, so use $1 not |
| 119 # $program. |
| 112 case $1 in | 120 case $1 in |
| 113 lex|yacc) | 121 lex*|yacc*) |
| 114 # Not GNU programs, they don't have --version. | 122 # Not GNU programs, they don't have --version. |
| 115 ;; | 123 ;; |
| 116 | 124 |
| 117 tar) | 125 tar*) |
| 118 if test -n "$run"; then | 126 if test -n "$run"; then |
| 119 echo 1>&2 "ERROR: \`tar' requires --run" | 127 echo 1>&2 "ERROR: \`tar' requires --run" |
| 120 exit 1 | 128 exit 1 |
| 121 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then | 129 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then |
| 122 exit 1 | 130 exit 1 |
| 123 fi | 131 fi |
| 124 ;; | 132 ;; |
| 125 | 133 |
| 126 *) | 134 *) |
| 127 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | 135 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then |
| 128 # We have it, but it failed. | 136 # We have it, but it failed. |
| 129 exit 1 | 137 exit 1 |
| 130 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then | 138 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then |
| 131 # Could not run --version or --help. This is probably someone | 139 # Could not run --version or --help. This is probably someone |
| 132 # running `$TOOL --version' or `$TOOL --help' to check whether | 140 # running `$TOOL --version' or `$TOOL --help' to check whether |
| 133 # $TOOL exists and not knowing $TOOL uses missing. | 141 # $TOOL exists and not knowing $TOOL uses missing. |
| 134 exit 1 | 142 exit 1 |
| 135 fi | 143 fi |
| 136 ;; | 144 ;; |
| 137 esac | 145 esac |
| 138 | 146 |
| 139 # If it does not exist, or fails to run (possibly an outdated version), | 147 # If it does not exist, or fails to run (possibly an outdated version), |
| 140 # try to emulate it. | 148 # try to emulate it. |
| 141 case $1 in | 149 case $program in |
| 142 aclocal*) | 150 aclocal*) |
| 143 echo 1>&2 "\ | 151 echo 1>&2 "\ |
| 144 WARNING: \`$1' is $msg. You should only need it if | 152 WARNING: \`$1' is $msg. You should only need it if |
| 145 you modified \`acinclude.m4' or \`${configure_ac}'. You might want | 153 you modified \`acinclude.m4' or \`${configure_ac}'. You might want |
| 146 to install the \`Automake' and \`Perl' packages. Grab them from | 154 to install the \`Automake' and \`Perl' packages. Grab them from |
| 147 any GNU archive site." | 155 any GNU archive site." |
| 148 touch aclocal.m4 | 156 touch aclocal.m4 |
| 149 ;; | 157 ;; |
| 150 | 158 |
| 151 autoconf) | 159 autoconf*) |
| 152 echo 1>&2 "\ | 160 echo 1>&2 "\ |
| 153 WARNING: \`$1' is $msg. You should only need it if | 161 WARNING: \`$1' is $msg. You should only need it if |
| 154 you modified \`${configure_ac}'. You might want to install the | 162 you modified \`${configure_ac}'. You might want to install the |
| 155 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU | 163 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU |
| 156 archive site." | 164 archive site." |
| 157 touch configure | 165 touch configure |
| 158 ;; | 166 ;; |
| 159 | 167 |
| 160 autoheader) | 168 autoheader*) |
| 161 echo 1>&2 "\ | 169 echo 1>&2 "\ |
| 162 WARNING: \`$1' is $msg. You should only need it if | 170 WARNING: \`$1' is $msg. You should only need it if |
| 163 you modified \`acconfig.h' or \`${configure_ac}'. You might want | 171 you modified \`acconfig.h' or \`${configure_ac}'. You might want |
| 164 to install the \`Autoconf' and \`GNU m4' packages. Grab them | 172 to install the \`Autoconf' and \`GNU m4' packages. Grab them |
| 165 from any GNU archive site." | 173 from any GNU archive site." |
| 166 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}
` | 174 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}
` |
| 167 test -z "$files" && files="config.h" | 175 test -z "$files" && files="config.h" |
| 168 touch_files= | 176 touch_files= |
| 169 for f in $files; do | 177 for f in $files; do |
| 170 case $f in | 178 case $f in |
| 171 *:*) touch_files="$touch_files "`echo "$f" | | 179 *:*) touch_files="$touch_files "`echo "$f" | |
| 172 sed -e 's/^[^:]*://' -e 's/:.*//'`;; | 180 sed -e 's/^[^:]*://' -e 's/:.*//'`;; |
| 173 *) touch_files="$touch_files $f.in";; | 181 *) touch_files="$touch_files $f.in";; |
| 174 esac | 182 esac |
| 175 done | 183 done |
| 176 touch $touch_files | 184 touch $touch_files |
| 177 ;; | 185 ;; |
| 178 | 186 |
| 179 automake*) | 187 automake*) |
| 180 echo 1>&2 "\ | 188 echo 1>&2 "\ |
| 181 WARNING: \`$1' is $msg. You should only need it if | 189 WARNING: \`$1' is $msg. You should only need it if |
| 182 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. | 190 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. |
| 183 You might want to install the \`Automake' and \`Perl' packages. | 191 You might want to install the \`Automake' and \`Perl' packages. |
| 184 Grab them from any GNU archive site." | 192 Grab them from any GNU archive site." |
| 185 find . -type f -name Makefile.am -print | | 193 find . -type f -name Makefile.am -print | |
| 186 sed 's/\.am$/.in/' | | 194 sed 's/\.am$/.in/' | |
| 187 while read f; do touch "$f"; done | 195 while read f; do touch "$f"; done |
| 188 ;; | 196 ;; |
| 189 | 197 |
| 190 autom4te) | 198 autom4te*) |
| 191 echo 1>&2 "\ | 199 echo 1>&2 "\ |
| 192 WARNING: \`$1' is needed, but is $msg. | 200 WARNING: \`$1' is needed, but is $msg. |
| 193 You might have modified some files without having the | 201 You might have modified some files without having the |
| 194 proper tools for further handling them. | 202 proper tools for further handling them. |
| 195 You can get \`$1' as part of \`Autoconf' from any GNU | 203 You can get \`$1' as part of \`Autoconf' from any GNU |
| 196 archive site." | 204 archive site." |
| 197 | 205 |
| 198 file=`echo "$*" | sed -n "$sed_output"` | 206 file=`echo "$*" | sed -n "$sed_output"` |
| 199 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` | 207 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` |
| 200 if test -f "$file"; then | 208 if test -f "$file"; then |
| 201 touch $file | 209 touch $file |
| 202 else | 210 else |
| 203 test -z "$file" || exec >$file | 211 test -z "$file" || exec >$file |
| 204 echo "#! /bin/sh" | 212 echo "#! /bin/sh" |
| 205 echo "# Created by GNU Automake missing as a replacement of" | 213 echo "# Created by GNU Automake missing as a replacement of" |
| 206 echo "# $ $@" | 214 echo "# $ $@" |
| 207 echo "exit 0" | 215 echo "exit 0" |
| 208 chmod +x $file | 216 chmod +x $file |
| 209 exit 1 | 217 exit 1 |
| 210 fi | 218 fi |
| 211 ;; | 219 ;; |
| 212 | 220 |
| 213 bison|yacc) | 221 bison*|yacc*) |
| 214 echo 1>&2 "\ | 222 echo 1>&2 "\ |
| 215 WARNING: \`$1' $msg. You should only need it if | 223 WARNING: \`$1' $msg. You should only need it if |
| 216 you modified a \`.y' file. You may need the \`Bison' package | 224 you modified a \`.y' file. You may need the \`Bison' package |
| 217 in order for those modifications to take effect. You can get | 225 in order for those modifications to take effect. You can get |
| 218 \`Bison' from any GNU archive site." | 226 \`Bison' from any GNU archive site." |
| 219 rm -f y.tab.c y.tab.h | 227 rm -f y.tab.c y.tab.h |
| 220 if test $# -ne 1; then | 228 if test $# -ne 1; then |
| 221 eval LASTARG="\${$#}" | 229 eval LASTARG="\${$#}" |
| 222 case $LASTARG in | 230 case $LASTARG in |
| 223 *.y) | 231 *.y) |
| 224 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` | 232 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` |
| 225 if test -f "$SRCFILE"; then | 233 if test -f "$SRCFILE"; then |
| 226 cp "$SRCFILE" y.tab.c | 234 cp "$SRCFILE" y.tab.c |
| 227 fi | 235 fi |
| 228 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` | 236 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` |
| 229 if test -f "$SRCFILE"; then | 237 if test -f "$SRCFILE"; then |
| 230 cp "$SRCFILE" y.tab.h | 238 cp "$SRCFILE" y.tab.h |
| 231 fi | 239 fi |
| 232 ;; | 240 ;; |
| 233 esac | 241 esac |
| 234 fi | 242 fi |
| 235 if test ! -f y.tab.h; then | 243 if test ! -f y.tab.h; then |
| 236 echo >y.tab.h | 244 echo >y.tab.h |
| 237 fi | 245 fi |
| 238 if test ! -f y.tab.c; then | 246 if test ! -f y.tab.c; then |
| 239 echo 'main() { return 0; }' >y.tab.c | 247 echo 'main() { return 0; }' >y.tab.c |
| 240 fi | 248 fi |
| 241 ;; | 249 ;; |
| 242 | 250 |
| 243 lex|flex) | 251 lex*|flex*) |
| 244 echo 1>&2 "\ | 252 echo 1>&2 "\ |
| 245 WARNING: \`$1' is $msg. You should only need it if | 253 WARNING: \`$1' is $msg. You should only need it if |
| 246 you modified a \`.l' file. You may need the \`Flex' package | 254 you modified a \`.l' file. You may need the \`Flex' package |
| 247 in order for those modifications to take effect. You can get | 255 in order for those modifications to take effect. You can get |
| 248 \`Flex' from any GNU archive site." | 256 \`Flex' from any GNU archive site." |
| 249 rm -f lex.yy.c | 257 rm -f lex.yy.c |
| 250 if test $# -ne 1; then | 258 if test $# -ne 1; then |
| 251 eval LASTARG="\${$#}" | 259 eval LASTARG="\${$#}" |
| 252 case $LASTARG in | 260 case $LASTARG in |
| 253 *.l) | 261 *.l) |
| 254 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` | 262 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` |
| 255 if test -f "$SRCFILE"; then | 263 if test -f "$SRCFILE"; then |
| 256 cp "$SRCFILE" lex.yy.c | 264 cp "$SRCFILE" lex.yy.c |
| 257 fi | 265 fi |
| 258 ;; | 266 ;; |
| 259 esac | 267 esac |
| 260 fi | 268 fi |
| 261 if test ! -f lex.yy.c; then | 269 if test ! -f lex.yy.c; then |
| 262 echo 'main() { return 0; }' >lex.yy.c | 270 echo 'main() { return 0; }' >lex.yy.c |
| 263 fi | 271 fi |
| 264 ;; | 272 ;; |
| 265 | 273 |
| 266 help2man) | 274 help2man*) |
| 267 echo 1>&2 "\ | 275 echo 1>&2 "\ |
| 268 WARNING: \`$1' is $msg. You should only need it if | 276 WARNING: \`$1' is $msg. You should only need it if |
| 269 you modified a dependency of a manual page. You may need the | 277 you modified a dependency of a manual page. You may need the |
| 270 \`Help2man' package in order for those modifications to take | 278 \`Help2man' package in order for those modifications to take |
| 271 effect. You can get \`Help2man' from any GNU archive site." | 279 effect. You can get \`Help2man' from any GNU archive site." |
| 272 | 280 |
| 273 file=`echo "$*" | sed -n "$sed_output"` | 281 file=`echo "$*" | sed -n "$sed_output"` |
| 274 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` | 282 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` |
| 275 if test -f "$file"; then | 283 if test -f "$file"; then |
| 276 touch $file | 284 touch $file |
| 277 else | 285 else |
| 278 test -z "$file" || exec >$file | 286 test -z "$file" || exec >$file |
| 279 echo ".ab help2man is required to generate this page" | 287 echo ".ab help2man is required to generate this page" |
| 280 » exit 1 | 288 » exit $? |
| 281 fi | 289 fi |
| 282 ;; | 290 ;; |
| 283 | 291 |
| 284 makeinfo) | 292 makeinfo*) |
| 285 echo 1>&2 "\ | 293 echo 1>&2 "\ |
| 286 WARNING: \`$1' is $msg. You should only need it if | 294 WARNING: \`$1' is $msg. You should only need it if |
| 287 you modified a \`.texi' or \`.texinfo' file, or any other file | 295 you modified a \`.texi' or \`.texinfo' file, or any other file |
| 288 indirectly affecting the aspect of the manual. The spurious | 296 indirectly affecting the aspect of the manual. The spurious |
| 289 call might also be the consequence of using a buggy \`make' (AIX, | 297 call might also be the consequence of using a buggy \`make' (AIX, |
| 290 DU, IRIX). You might want to install the \`Texinfo' package or | 298 DU, IRIX). You might want to install the \`Texinfo' package or |
| 291 the \`GNU make' package. Grab either from any GNU archive site." | 299 the \`GNU make' package. Grab either from any GNU archive site." |
| 292 # The file to touch is that specified with -o ... | 300 # The file to touch is that specified with -o ... |
| 293 file=`echo "$*" | sed -n "$sed_output"` | 301 file=`echo "$*" | sed -n "$sed_output"` |
| 294 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` | 302 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` |
| 295 if test -z "$file"; then | 303 if test -z "$file"; then |
| 296 # ... or it is the one specified with @setfilename ... | 304 # ... or it is the one specified with @setfilename ... |
| 297 infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` | 305 infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` |
| 298 file=`sed -n ' | 306 file=`sed -n ' |
| 299 /^@setfilename/{ | 307 /^@setfilename/{ |
| 300 s/.* \([^ ]*\) *$/\1/ | 308 s/.* \([^ ]*\) *$/\1/ |
| 301 p | 309 p |
| 302 q | 310 q |
| 303 }' $infile` | 311 }' $infile` |
| 304 # ... or it is derived from the source name (dir/f.texi becomes f.info) | 312 # ... or it is derived from the source name (dir/f.texi becomes f.info) |
| 305 test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info | 313 test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info |
| 306 fi | 314 fi |
| 307 # If the file does not exist, the user really needs makeinfo; | 315 # If the file does not exist, the user really needs makeinfo; |
| 308 # let's fail without touching anything. | 316 # let's fail without touching anything. |
| 309 test -f $file || exit 1 | 317 test -f $file || exit 1 |
| 310 touch $file | 318 touch $file |
| 311 ;; | 319 ;; |
| 312 | 320 |
| 313 tar) | 321 tar*) |
| 314 shift | 322 shift |
| 315 | 323 |
| 316 # We have already tried tar in the generic part. | 324 # We have already tried tar in the generic part. |
| 317 # Look for gnutar/gtar before invocation to avoid ugly error | 325 # Look for gnutar/gtar before invocation to avoid ugly error |
| 318 # messages. | 326 # messages. |
| 319 if (gnutar --version > /dev/null 2>&1); then | 327 if (gnutar --version > /dev/null 2>&1); then |
| 320 gnutar "$@" && exit 0 | 328 gnutar "$@" && exit 0 |
| 321 fi | 329 fi |
| 322 if (gtar --version > /dev/null 2>&1); then | 330 if (gtar --version > /dev/null 2>&1); then |
| 323 gtar "$@" && exit 0 | 331 gtar "$@" && exit 0 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 exit 1 | 364 exit 1 |
| 357 ;; | 365 ;; |
| 358 esac | 366 esac |
| 359 | 367 |
| 360 exit 0 | 368 exit 0 |
| 361 | 369 |
| 362 # Local variables: | 370 # Local variables: |
| 363 # eval: (add-hook 'write-file-hooks 'time-stamp) | 371 # eval: (add-hook 'write-file-hooks 'time-stamp) |
| 364 # time-stamp-start: "scriptversion=" | 372 # time-stamp-start: "scriptversion=" |
| 365 # time-stamp-format: "%:y-%02m-%02d.%02H" | 373 # time-stamp-format: "%:y-%02m-%02d.%02H" |
| 366 # time-stamp-end: "$" | 374 # time-stamp-time-zone: "UTC" |
| 375 # time-stamp-end: "; # UTC" |
| 367 # End: | 376 # End: |
| OLD | NEW |