summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaura Orvokki Kursula <lav@vampires.gay>2024-08-24 13:40:29 +0200
committerLaura Orvokki Kursula <lav@vampires.gay>2024-08-24 13:40:29 +0200
commit4f37c47720cf30ac61b3e6efc513563519750011 (patch)
tree96ed1118856efdb19602d2aeb4740649c51aeaeb
parentc8c3a7299c1ecb9770a84b0bb1d55a2ab1cf9424 (diff)
downloadaspell-nn-4f37c47720cf30ac61b3e6efc513563519750011.tar.gz
aspell-nn-4f37c47720cf30ac61b3e6efc513563519750011.zip
fixup! Initial commit
-rw-r--r--README3
-rwxr-xr-xconfigure89
2 files changed, 91 insertions, 1 deletions
diff --git a/README b/README
index 28e7667..60d9e94 100644
--- a/README
+++ b/README
@@ -3,7 +3,8 @@ unchanged from the Norwegian Language Bank, licenced under CC BY
4.0[1], and may be downloaded from the National Library of Norway's
website[2].
-The metadata files are adapted from Morten Bo Johansen's aspell-da[3].
+The metadata files and configure script are adapted from Morten Bo
+Johansen's aspell-da[3].
Made by Laura Orvokki Kursula in 2024. See the file LICENCE for
copyright information.
diff --git a/configure b/configure
new file mode 100755
index 0000000..7d2d19f
--- /dev/null
+++ b/configure
@@ -0,0 +1,89 @@
+#!/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
+
+# also taken form autoconf
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+
+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\([^=]*\)='`
+ optarg=`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; }; }
+ #echo $envvar $optarg
+ 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 PREZIP DESTDIR"
+ exit 0
+ ;;
+ *)
+ echo "Error: unrecognized option $option";
+ exit 1
+ ;;
+ esac
+done
+
+#echo $ASPELL
+if test x = "x$ASPELL"
+ then ASPELL=aspell; fi
+if test x = "x$PREZIP"
+ then PREZIP=prezip-bin; fi
+#echo $ASPELL
+
+echo $ECHO_N "Finding Dictionary file location ... $ECHO_C"
+dictdir=`$ASPELL dump config dict-dir`
+echo $dictdir
+
+echo $ECHO_N "Finding Data file location ... $ECHO_C"
+datadir=`$ASPELL dump config data-dir`
+echo $datadir
+
+echo "ASPELL = `which $ASPELL`" > Makefile
+echo "ASPELL_FLAGS = $ASPELL_FLAGS" >> Makefile
+echo "PREZIP = `which $PREZIP`" >> Makefile
+echo "DESTDIR = $DESTDIR" >> Makefile
+echo "dictdir = $dictdir" >> Makefile
+echo "datadir = $datadir" >> Makefile
+echo >> Makefile
+cat Makefile.pre >> Makefile