3 # Note: future version will have a syntax something like
4 # ./configure [OPTIONS]
5 # Where OPTIONS is any of:
9 # --jargons JARGON1 ...
11 # --vars VAR1=VAL1 ...
12 # which is why I warn when --vars is not used before VAR1=VAL1
14 # Avoid depending upon Character Ranges.
15 # Taken from autoconf 2.50
16 cr_az='abcdefghijklmnopqrstuvwxyz'
17 cr_AZ='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19 cr_alnum=$cr_az$cr_AZ$cr_09
21 # also taken form autoconf
22 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23 *c*,-n*) ECHO_N= ECHO_C='
25 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
26 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
38 if test $mode != vars; then
39 echo "Warning: future versions will require --vars before variables are set"
42 # Taken from autoconf 2.50
43 envvar=`expr "x$option" : 'x\([^=]*\)='`
44 optarg=`expr "x$option" : 'x[^=]*=\(.*\)'`
45 # Reject names that are not valid shell variable names.
46 expr "x$envvar" : ".*[^_$cr_alnum]" >/dev/null &&
47 { echo "$as_me: error: invalid variable name: $envvar" >&2
48 { (exit 1); exit 1; }; }
50 optarg=`echo "$optarg" | sed "s/'/'\\\\\\\\''/g"`
51 eval "$envvar='$optarg'"
55 echo "Usage: ./configure [--help | --vars VAR1=VAL1 ...]"
56 echo " Note: Variables may also be set in the environment brefore running config"
57 echo " Useful vars: ASPELL ASPELL_PARMS PREZIP DESTDIR"
61 echo "Error: unrecognized option $option";
67 if test x = "x$ASPELL"
68 then ASPELL=aspell; fi
69 if test x = "x$PREZIP"
70 then PREZIP=prezip-bin; fi
71 ASPELL=`which $ASPELL`
73 echo $ECHO_N "Finding Dictionary file location ... $ECHO_C"
74 dictdir=`$ASPELL dump config dict-dir`
77 echo $ECHO_N "Finding Data file location ... $ECHO_C"
78 datadir=`$ASPELL dump config data-dir`
81 echo $ECHO_N "Testing if an English dictionary is already installed ... $ECHO_C"
82 if $ASPELL create master --lang=en ./en-test.rws < /dev/null > /dev/null 2>&1
87 echo no: will install lang data files
89 ASPELL="$ASPELL --local-data-dir=lang"
93 echo "ASPELL = $ASPELL" > Makefile
94 echo "ASPELL_FLAGS = $ASPELL_FLAGS" >> Makefile
95 echo "PREZIP = `which $PREZIP`" >> Makefile
96 echo "DESTDIR = $DESTDIR" >> Makefile
97 echo "dictdir = $dictdir" >> Makefile
98 echo "datadir = $datadir" >> Makefile
99 echo "name = $name" >> Makefile
100 if test "$HAVE_LANG_FILES" = no; then
102 echo "NEED_LANG_FILES = yes" >> Makefile
105 cat Makefile.pre >> Makefile