bootstrap
author hegyi
Mon, 21 Nov 2005 18:03:20 +0000
changeset 1823 cb082cdf3667
parent 1304 c9c2e90b2342
child 2012 224cd6aacfc1
permissions -rwxr-xr-x
NewMapWin has become Dialog instead of Window. Therefore it is created dynamically, when there is need for it, instead of keeping one instance in memory. This solution is slower, but more correct than before.
ladanyi@1304
     1
#!/bin/bash
ladanyi@1304
     2
ladanyi@1304
     3
prev=
ladanyi@1304
     4
for option
ladanyi@1304
     5
do
ladanyi@1304
     6
  if test -n "$prev"
ladanyi@1304
     7
  then
ladanyi@1304
     8
    eval "$prev=\$option"
ladanyi@1304
     9
    prev=
ladanyi@1304
    10
    continue
ladanyi@1304
    11
  fi
ladanyi@1304
    12
ladanyi@1304
    13
  optarg=`expr "x$option" : 'x[^=]*=\(.*\)'`
ladanyi@1304
    14
ladanyi@1304
    15
  case $option in
ladanyi@1304
    16
ladanyi@1304
    17
  -amver | --amver)
ladanyi@1304
    18
    prev=amver ;;
ladanyi@1304
    19
  -amver=* | --amver=*)
ladanyi@1304
    20
    amver=$optarg ;;
ladanyi@1304
    21
ladanyi@1304
    22
  -acver | --acver)
ladanyi@1304
    23
    prev=acver ;;
ladanyi@1304
    24
  -acver=* | --acver=*)
ladanyi@1304
    25
    acver=$optarg ;;
ladanyi@1304
    26
ladanyi@1304
    27
  --help | -h)
ladanyi@1304
    28
    cat << EOF
ladanyi@1304
    29
Usage: $0 [OPTION]
ladanyi@1304
    30
ladanyi@1304
    31
Options:
ladanyi@1304
    32
  -h, --help            display this help and exit
ladanyi@1304
    33
      --amver=VERSION   use VERSION version of automake
ladanyi@1304
    34
      --acver=VERSION   use VERSION version of autoconf
ladanyi@1304
    35
ladanyi@1304
    36
Expamle:
ladanyi@1304
    37
  $0 --amver=1.8 --acver=2.59
ladanyi@1304
    38
EOF
ladanyi@1304
    39
    exit 0
ladanyi@1304
    40
    ;;
ladanyi@1304
    41
ladanyi@1304
    42
  *)
ladanyi@1304
    43
    cat << EOF >&2
ladanyi@1304
    44
$0: unrecognized option: $option
ladanyi@1304
    45
Try \`$0 --help' for more information.
ladanyi@1304
    46
EOF
ladanyi@1304
    47
    exit 1
ladanyi@1304
    48
    ;;
ladanyi@1304
    49
ladanyi@1304
    50
  esac
ladanyi@1304
    51
done
ladanyi@1304
    52
ladanyi@1304
    53
automake=automake
ladanyi@1304
    54
aclocal=aclocal
ladanyi@1304
    55
autoconf=autoconf
ladanyi@1348
    56
autoheader=autoheader
ladanyi@1304
    57
ladanyi@1304
    58
if test -n "$amver"
ladanyi@1304
    59
then
ladanyi@1304
    60
  automake=automake-$amver
ladanyi@1304
    61
  aclocal=aclocal-$amver
ladanyi@1304
    62
fi
ladanyi@1304
    63
ladanyi@1304
    64
if test -n "$acver"
ladanyi@1304
    65
then
ladanyi@1304
    66
  autoconf=autoconf-$acver
ladanyi@1348
    67
  autoheader=autoheader-$acver
ladanyi@1304
    68
fi
ladanyi@1304
    69
ladanyi@1348
    70
set -x
ladanyi@1348
    71
$aclocal -I config \
ladanyi@1304
    72
&& libtoolize --force --copy \
ladanyi@1348
    73
&& $autoheader \
ladanyi@1304
    74
&& $automake --add-missing --copy --gnu \
ladanyi@1304
    75
&& $autoconf