hegyi@1: #!/bin/bash hegyi@1: hegyi@1: quiet=0 hegyi@1: function quiet { [[ $quiet == 1 ]]; } hegyi@1: hegyi@1: if [[ "$1" == "-q" ]]; then hegyi@1: quiet=1 hegyi@1: shift hegyi@1: fi hegyi@1: hegyi@1: prev= hegyi@1: for option hegyi@1: do hegyi@1: if test -n "$prev" hegyi@1: then hegyi@1: eval "$prev=\$option" hegyi@1: prev= hegyi@1: continue hegyi@1: fi hegyi@1: hegyi@1: optarg=`expr "x$option" : 'x[^=]*=\(.*\)'` hegyi@1: hegyi@1: case $option in hegyi@1: hegyi@1: -amver | --amver) hegyi@1: prev=amver ;; hegyi@1: -amver=* | --amver=*) hegyi@1: amver=$optarg ;; hegyi@1: hegyi@1: -acver | --acver) hegyi@1: prev=acver ;; hegyi@1: -acver=* | --acver=*) hegyi@1: acver=$optarg ;; hegyi@1: hegyi@1: --help | -h) hegyi@1: cat << EOF hegyi@1: Usage: $0 [OPTION] hegyi@1: hegyi@1: Options: hegyi@1: -h, --help display this help and exit hegyi@1: --amver=VERSION use VERSION version of automake hegyi@1: --acver=VERSION use VERSION version of autoconf hegyi@1: hegyi@1: Expamle: hegyi@1: $0 --amver=1.8 --acver=2.59 hegyi@1: EOF hegyi@1: exit 0 hegyi@1: ;; hegyi@1: hegyi@1: *) hegyi@1: cat << EOF >&2 hegyi@1: $0: unrecognized option: $option hegyi@1: Try \`$0 --help' for more information. hegyi@1: EOF hegyi@1: exit 1 hegyi@1: ;; hegyi@1: hegyi@1: esac hegyi@1: done hegyi@1: hegyi@1: automake=automake hegyi@1: aclocal=aclocal hegyi@1: autoconf=autoconf hegyi@1: autoheader=autoheader hegyi@1: hegyi@1: if test -n "$amver" hegyi@1: then hegyi@1: automake=automake-$amver hegyi@1: aclocal=aclocal-$amver hegyi@1: fi hegyi@1: hegyi@1: if test -n "$acver" hegyi@1: then hegyi@1: autoconf=autoconf-$acver hegyi@1: autoheader=autoheader-$acver hegyi@1: fi hegyi@1: hegyi@1: set -e hegyi@1: quiet || set -x hegyi@1: hegyi@1: autopoint hegyi@1: $aclocal -I m4 hegyi@1: $autoconf hegyi@1: $autoheader hegyi@1: $automake --add-missing --copy --gnu