1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
#!/bin/sh
# Note: future version will have a syntax something like
# ./configure [OPTIONS]
# Where OPTIONS is any of:
# --help
# --codes CODE1 ...
# --sizes SIZE1 ...
# --jargons JARGON1 ...
# --extras EXTRA1 ...
# --vars VAR1=VAL1 ...
# which is why I warn when --vars is not used before VAR1=VAL1
# Avoid depending upon Character Ranges.
# Taken from autoconf 2.50
cr_az='abcdefghijklmnopqrstuvwxyz'
cr_AZ='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
cr_09='0123456789'
cr_alnum=$cr_az$cr_AZ$cr_09
mode=none
for option; do
case $option in
--vars)
mode=vars
;;
*=*)
if test $mode != vars; then
echo "Warning: future versions will require --vars before variables are set"
mode=vars
fi
# Taken from autoconf 2.50
envvar=`expr "x$option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
expr "x$envvar" : ".*[^_$cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid variable name: $envvar" >&2
{ (exit 1); exit 1; }; }
optarg=`echo "$optarg" | sed "s/'/'\\\\\\\\''/g"`
eval "$envvar='$optarg'"
export $envvar
;;
--help)
echo "Usage: ./configure [--help | --vars VAR1=VAL1 ...]"
echo " Note: Variables may also be set in the environment brefore running config"
echo " Useful vars: ASPELL ASPELL_PARMS PSPELL_CONFIG WORD_LIST_COMPRESS DESTDIR"
exit 0
;;
*)
echo "Error: unrecognized option $option";
exit 1
;;
esac
done
if test x = "x$ASPELL"
then ASPELL=aspell; fi
if test x = "x$PSPELL_CONFIG"
then PSPELL_CONFIG=pspell-config; fi
if test x = "x$WORD_LIST_COMPRESS"
then WORD_LIST_COMPRESS=word-list-compress; fi
echo -n "Finding PWLI file location ... "
pwlidir=`$PSPELL_CONFIG pkgdatadir`
echo $pwlidir
echo -n "Finding Dictionary file location ... "
dictdir=`$ASPELL dump config | grep "# dict-dir current" | cut -b 21-`
echo $dictdir
echo -n "Finding Data file location ... "
datadir=`$ASPELL dump config | grep "# data-dir current" | cut -b 21-`
echo $datadir
echo "ASPELL = $ASPELL" > Makefile
echo "ASPELL_FLAGS = $ASPELL_FLAGS" >> Makefile
echo "WORD_LIST_COMPRESS = $WORD_LIST_COMPRESS" >> Makefile
echo "DESTDIR = $DESTDIR" >> Makefile
echo "pwlidir = $pwlidir" >> Makefile
echo "dictdir = $dictdir" >> Makefile
echo "datadir = $datadir" >> Makefile
echo >> Makefile
cat Makefile.pre >> Makefile
|