summaryrefslogtreecommitdiff
path: root/src/skribilo-config.in
diff options
context:
space:
mode:
authorLudovic Courtès2007-12-10 22:39:34 +0100
committerLudovic Courtès2007-12-10 22:39:34 +0100
commita7c8c1edc641a383f26da6d8e696c39bacb4e2ff (patch)
treeb00f429667487239c227957bcb8a0b1a2671cebf /src/skribilo-config.in
parent4db9e8bbe8d9dabcb80baee9d096e3894f2c57bf (diff)
downloadskribilo-a7c8c1edc641a383f26da6d8e696c39bacb4e2ff.tar.gz
skribilo-a7c8c1edc641a383f26da6d8e696c39bacb4e2ff.tar.lz
skribilo-a7c8c1edc641a383f26da6d8e696c39bacb4e2ff.zip
Add proper `skribilo-config' executable.
* src/Makefile.am (EXTRA_DIST): Add `skribilo-config.in'. (bin_SCRIPTS): Add `skribilo-config'. (substitute): Add new variables. * src/skribilo-config.in: Improve, based on `skribe-config.in'.
Diffstat (limited to 'src/skribilo-config.in')
-rw-r--r--src/skribilo-config.in63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/skribilo-config.in b/src/skribilo-config.in
new file mode 100644
index 0000000..eb5983c
--- /dev/null
+++ b/src/skribilo-config.in
@@ -0,0 +1,63 @@
+#!/bin/sh
+#
+# Author: Erick Gallesio [eg@essi.fr]
+# Ludovic Courtès <ludo@gnu.org>
+
+
+function usage()
+{
+ cat <<EOF
+Usage: skribilo-config [OPTIONS]
+Display the configuration of Skribilo.
+
+ --version, -v Show Skribilo version.
+ --help, -h Show a list of options.
+
+ --prefix, -p Prefix that was given during the build
+ --module-dir, -m Display the Guile module directory
+ --doc-dir, -d Display the documentation directory location
+ --emacs-dir, -e Display the emacs directory location
+ --scheme, -s Display the configured Scheme implementation
+
+Report bugs to <@PACKAGE_BUGREPORT@>.
+EOF
+ exit $1
+}
+
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+while test $# -gt 0; do
+ case "$1" in
+ --version|-v)
+ echo @PACKAGE_VERSION@
+ ;;
+ --prefix|-p)
+ echo @prefix@
+ ;;
+ --module-dir|-m)
+ echo @guilemoduledir@
+ ;;
+ --doc-dir|-d)
+ echo @docdir@
+ ;;
+ --emacs-dir|-e)
+ echo @emacsdir@
+ ;;
+ --scheme|-s)
+ echo @GUILE@
+ ;;
+ --help|-h)
+ usage 0 1>&2
+ ;;
+ *)
+ echo "unrecognized option \`$1'" 1>&2
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+exit 0
+