summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@slbdata.se>2011-06-19 00:25:11 +0200
committerSamuel Lidén Borell <samuel@slbdata.se>2011-06-19 00:25:11 +0200
commit28c688b400a9e05f480bb56bad5c25be556bbd80 (patch)
tree781166b07079e00f56c07598c0a2a684710894d7
parent78d848bf3bc52b0f4b1fcdbc3e2eb4ca721c95d4 (diff)
downloadfribid-28c688b400a9e05f480bb56bad5c25be556bbd80.tar.gz
fribid-28c688b400a9e05f480bb56bad5c25be556bbd80.tar.bz2
fribid-28c688b400a9e05f480bb56bad5c25be556bbd80.zip
Add --mandir and --localedir to the configure script
-rw-r--r--common/defines.h4
-rwxr-xr-xconfigure26
2 files changed, 24 insertions, 6 deletions
diff --git a/common/defines.h b/common/defines.h
index 37e4d2f..99b08f3 100644
--- a/common/defines.h
+++ b/common/defines.h
@@ -27,7 +27,7 @@
#include "config.h"
-#if (!defined(CONFIGVERSION) || CONFIGVERSION < 1) && !defined(CALLED_FROM_CONFIGURE)
+#if (!defined(CONFIGVERSION) || CONFIGVERSION < 2) && !defined(CALLED_FROM_CONFIGURE)
#error config.h is outdated or non-existent. Please run ./configure
#endif
@@ -45,8 +45,6 @@
#define LIB_PATH LIBDIR "/" BINNAME
#define SHARE_PATH DATADIR "/" BINNAME
#define DOC_PATH DATADIR "/doc/" BINNAME
-#define MANDIR DATADIR "/man"
-#define LOCALEDIR DATADIR "/locale"
#define SIGNING_EXECUTABLE LIB_PATH "/sign"
#define UI_PATH SHARE_PATH "/ui"
diff --git a/configure b/configure
index 1e3f638..a2337aa 100755
--- a/configure
+++ b/configure
@@ -33,6 +33,8 @@ fi
libdir=""
datadir=""
+localedir=""
+mandir=""
pluginPathSet=""
pluginPaths="/usr/$multilib/mozilla/plugins"
@@ -68,6 +70,8 @@ Options:
--libdir=PATH Sets the directory for libraries. [EPREFIX/$multilib]
--datadir=PATH Sets the directory for architecture-independent
data. [PREFIX/share]
+ --localedir=PATH Sets the directory for translations [DATADIR/locale]
+ --mandir=PATH Sets the directory for man pages. [DATADIR/man]
--plugin-path=PATH Sets the NPAPI plugin path [$pluginPaths]
This option may be repeated if you want to create
plugin links in several places.
@@ -94,6 +98,12 @@ Options:
--datadir=*)
datadir=${flag#--datadir=}
;;
+ --localedir=*)
+ localedir=${flag#--localedir=}
+ ;;
+ --mandir=*)
+ mandir=${flag#--mandir=}
+ ;;
--plugin-path=*)
path=${flag#--plugin-path=}
path=${path%/}
@@ -186,6 +196,14 @@ if [ -z "$datadir" ]; then
datadir="$prefixPath/share"
fi
+if [ -z "$localedir" ]; then
+ localedir="$datadir/locale"
+fi
+
+if [ -z "$mandir" ]; then
+ mandir="$datadir/man"
+fi
+
### Plugin paths
hasPaths=""
@@ -273,13 +291,15 @@ cat <<EOT >"$CONFFILE"
/* This file is automatically generated.
Run the configure script to change the configuration. */
-#define CONFIGVERSION 1
+#define CONFIGVERSION 2
#define PREFIX "$prefixPath"
#define EPREFIX "$execPath"
-#define LIBDIR "$libdir"
-#define DATADIR "$datadir"
+#define LIBDIR "$libdir"
+#define DATADIR "$datadir"
+#define LOCALEDIR "$localedir"
+#define MANDIR "$mandir"
#define NPAPI_PLUGIN_PATHS "$pluginPaths"