summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@slbdata.se>2010-04-07 23:08:44 +0200
committerSamuel Lidén Borell <samuel@slbdata.se>2010-04-07 23:08:44 +0200
commit190cbd1aa58ef317e422bc4a14d7cf8657d97c75 (patch)
tree3d7c3e13426f5cebbf7a469424319365ae10448b /configure
parent442de1ddbdb8cd5e4c2540c29bc8218fcceab5f0 (diff)
downloadfribid-190cbd1aa58ef317e422bc4a14d7cf8657d97c75.tar.gz
fribid-190cbd1aa58ef317e422bc4a14d7cf8657d97c75.tar.bz2
fribid-190cbd1aa58ef317e422bc4a14d7cf8657d97c75.zip
Make it possible to configure the library and data paths
This is needed when compiling for certain distributions that store native libraries in /usr/lib64 (and 32-bit libraries in /usr/lib).
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure27
1 files changed, 26 insertions, 1 deletions
diff --git a/configure b/configure
index d0ba3ec..71ff586 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2009 Samuel Lidén Borell <samuel@slbdata.se>
+# Copyright (c) 2009-2010 Samuel Lidén Borell <samuel@slbdata.se>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -25,6 +25,9 @@ prefixSet=""
prefix="/usr/local"
execprefix=""
+libdir=""
+datadir=""
+
pluginPathSet=""
pluginPaths="/usr/lib/mozilla/plugins"
@@ -52,6 +55,9 @@ Options:
--prefix=PATH Sets the installation prefix. [/usr/local]
--exec-prefix=PATH Sets the installation prefix for executable files.
The default is to use the same prefix for all files.
+ --libdir=PATH Sets the directory for libraries. [EPREFIX/lib]
+ --datadir=PATH Sets the directory for architecture-independent
+ data. [PREFIX/share]
--plugin-path=PATH Sets the NPAPI plugin path [/usr/lib/mozilla/plugin]
This option may be repeated if you want to create
plugin links in several places. Do not include the
@@ -69,6 +75,12 @@ Options:
--exec-prefix=*)
execprefix=${flag#--exec-prefix=}
;;
+ --libdir=*)
+ libdir=${flag#--libdir=}
+ ;;
+ --datadir=*)
+ datadir=${flag#--datadir=}
+ ;;
--plugin-path=*)
path=${flag#--plugin-path=}
path=${path%/}
@@ -134,6 +146,15 @@ if [ -n "$execprefix" ]; then
echo "Executable/library prefix: $execPath"
fi
+### Specific directories
+if [ -z "$libdir" ]; then
+ libdir="$execPath/lib"
+fi
+
+if [ -z "$datadir" ]; then
+ datadir="$prefixPath/share"
+fi
+
### Plugin paths
hasPaths=""
@@ -195,6 +216,10 @@ echo "
#define PREFIX \"$prefixPath\"
#define EPREFIX \"$execPath\"
+
+#define LIBDIR \"$libdir\"
+#define DATADIR \"$datadir\"
+
#define NPAPI_PLUGIN_PATHS \"$pluginPaths\"
" > "$CONFFILE"