summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorSamuel <samuellb@crashie.(none)>2009-06-16 22:10:04 +0200
committerSamuel Lidén Borell <samuel@slbdata.se>2010-01-02 22:30:07 +0100
commitc58f5585564d39843de0c9c46050a8284b0e05b0 (patch)
treedf34e524ee7a1428d74fcd303880f6b35856d800 /configure
parent3aff8b355f4394b95f129390a00f6c440683f6ef (diff)
downloadfribid-c58f5585564d39843de0c9c46050a8284b0e05b0.tar.gz
fribid-c58f5585564d39843de0c9c46050a8284b0e05b0.tar.bz2
fribid-c58f5585564d39843de0c9c46050a8284b0e05b0.zip
Made the plugin path configurable
The default path is /usr/lib/mozilla/plugins
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure42
1 files changed, 41 insertions, 1 deletions
diff --git a/configure b/configure
index 4246e03..f05a070 100755
--- a/configure
+++ b/configure
@@ -3,6 +3,9 @@
prefix="/usr/local"
execprefix=""
+pluginPathSet=""
+pluginPaths="/usr/lib/mozilla/plugins"
+
error=""
basedir=`dirname "$0"`
@@ -21,6 +24,16 @@ while [ "$#" != "0" ]; do
--exec-prefix=*)
execprefix=${flag#--exec-prefix=}
;;
+ --plugin-path=*)
+ path=${flag#--plugin-path=}
+ path=${path%/}
+ if [ -z "$pluginPathSet" ]; then
+ pluginPathSet=1
+ pluginPaths="$path"
+ else
+ pluginPaths="$pluginPaths $path"
+ 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 '\"'
@@ -41,7 +54,7 @@ while [ "$#" != "0" ]; do
done
if [ ! -r "$basedir/common/defines.h" ]; then
- echo "Source code not found."
+ echo "ERROR: Source code not found."
error=1
fi
@@ -49,6 +62,8 @@ if [ -n "$error" ]; then
exit 2
fi
+
+### Prefixes
prefixPath="$prefix"
if [ -z "$execprefix" ]; then
@@ -62,6 +77,29 @@ if [ -n "$execprefix" ]; then
echo "Executable/library prefix: $execPath"
fi
+
+### Plugin paths
+hasPaths=""
+for path in $pluginPaths; do
+ hasPaths="1"
+ if [ "$path" = "${path%/plugins}" ]; then
+ echo "WARNING: Plugin path $path doesn't end with /plugins." >&2
+ elif [ -d "$path" ]; then
+ echo "Plugin path: $path"
+ else
+ echo "WARNING: Plugin path $path doesn't exist!"
+ if [ -z "$pluginPathSet" ]; then
+ echo " You may need to change it with the --plugin-path=... option." >&2
+ fi
+ fi
+done
+
+if [ -z "$hasPaths" ]; then
+ echo "No plugin paths specified."
+fi
+
+
+### Write configuration
CONFFILE="$basedir/common/config.h"
echo "
@@ -70,9 +108,11 @@ echo "
#define PREFIX \"$prefixPath\"
#define EPREFIX \"$execPath\"
+#define NPAPI_PLUGIN_PATHS \"$pluginPaths\"
" > $CONFFILE
+### Display success message
cancreate() {
if [ -w "$1" ]; then
return 0