summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorSamuel <samuellb@crashie.(none)>2009-06-16 22:21:08 +0200
committerSamuel Lidén Borell <samuel@slbdata.se>2010-01-02 22:30:07 +0100
commit5b2f618582f824b79d1050cdeb81045837371f3b (patch)
treeda08cc8796926e4fa68f2cbd755006b40442c964 /configure
parentc58f5585564d39843de0c9c46050a8284b0e05b0 (diff)
downloadfribid-5b2f618582f824b79d1050cdeb81045837371f3b.tar.gz
fribid-5b2f618582f824b79d1050cdeb81045837371f3b.tar.bz2
fribid-5b2f618582f824b79d1050cdeb81045837371f3b.zip
Added a convenience option for installing in the user's home directory
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure b/configure
index f05a070..1a220da 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,15 @@
#!/bin/sh
+prefixSet=""
prefix="/usr/local"
execprefix=""
pluginPathSet=""
pluginPaths="/usr/lib/mozilla/plugins"
+userPluginPath="$HOME/.mozilla/plugins"
+userPrefix="$HOME/.local"
+
error=""
basedir=`dirname "$0"`
@@ -20,6 +24,7 @@ while [ "$#" != "0" ]; do
;;
--prefix=*)
prefix=${flag#--prefix=}
+ prefixSet=1
;;
--exec-prefix=*)
execprefix=${flag#--exec-prefix=}
@@ -34,6 +39,18 @@ while [ "$#" != "0" ]; do
pluginPaths="$pluginPaths $path"
fi
;;
+ --current-user)
+ if [ -z "$prefixSet" ]; then
+ prefix="$userPrefix"
+ fi
+
+ if [ -z "$pluginPathSet" ]; then
+ pluginPathSet=1
+ pluginPaths="$userPluginPath"
+ else
+ pluginPaths="$pluginPaths $userPluginPath"
+ fi
+ ;;
--internal--get-define=*)
name=${flag#--internal--get-define=}
printf '#include "%s"\n%s\n' "$basedir/common/defines.h" "$name" | cpp - | sed 's/#[^\n]*//g' | tr -d '\n' | sed 's/" "//g' | tr -d '\"'