Tue, 10 Jul 2018 11:08:59 +0100
Add tests for stanzacmp
74
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 | #!/bin/sh |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 | SQUISH=./buildscripts/squish |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 | PREFIX="/usr/local" |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 | # Help |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 | show_help() { |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 | cat <<EOF |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
10 | Configure Prosody prior to building. |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 | --help This help. |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 | --prefix Installation path prefix (used when installing) |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 | Default: $PREFIX |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 | --squish Path to squish utility (used for building) |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 | Default: $SQUISH |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 | EOF |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
18 | } |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
19 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
21 | while [ "$1" ] |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
22 | do |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 | value="`echo $1 | sed 's/[^=]*=\(.*\)/\1/'`" |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 | if echo "$value" | grep -q "~" |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
25 | then |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
26 | echo |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
27 | echo '*WARNING*: the "~" sign is not expanded in flags.' |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 | echo 'If you mean the home directory, use $HOME instead.' |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
29 | echo |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
30 | fi |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
31 | case "$1" in |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
32 | --help) |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
33 | show_help |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
34 | exit 0 |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
35 | ;; |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
36 | --with-squish=*) |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
37 | SQUISH="$value" |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
38 | ;; |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
39 | --prefix=*) |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
40 | PREFIX="$value" |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
41 | ;; |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
42 | *) |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
43 | echo "Error: Unknown flag: $1" |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
44 | exit 1 |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
45 | ;; |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
46 | esac |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
47 | shift |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
48 | done |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
49 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
50 | # Sanity-check options |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
51 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
52 | if ! test -x "$SQUISH"; then |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
53 | echo "FATAL: Unable to find/use squish: $SQUISH"; |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
54 | exit 1; |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
55 | fi |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
56 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
57 | cat <<EOF >config.unix |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
58 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
59 | # This file was automatically generated by the configure script. |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
60 | # Run "./configure --help" for details. |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
61 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
62 | SQUISH=./buildscripts/squish |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
63 | PREFIX=$PREFIX |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
64 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
65 | EOF |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
66 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
67 | echo |
87
bd7888c3745a
configure: Fix typo (scansion/squish)
Matthew Wild <mwild1@gmail.com>
parents:
74
diff
changeset
|
68 | echo "Installing scansion to: $PREFIX/bin" |
74
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
69 | echo |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
70 | echo "Configured successfully. Please run 'make' to proceed." |