aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--Makefile.am2
-rw-r--r--cmd.c3
-rw-r--r--configure.in9
4 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e68597a..b70539a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
2009-04-08 kalev
+ * Add a configure option to select plugin directory.
* configure.in: Display summary at the end of configure run.
* cmd2.c: Move aliases/actions back to default group if it was
specified as '*'.
diff --git a/Makefile.am b/Makefile.am
index 5da8f73..151acef 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
# Default help file directory
-AM_CFLAGS=-DPOWWOW_DIR=\"$(pkgdatadir)\"
+AM_CFLAGS=-DPOWWOW_DIR=\"$(pkgdatadir)\" -DPLUGIN_DIR=\"$(plugindir)\"
bin_PROGRAMS = powwow muc catrw follow movie
powwow_SOURCES = beam.c cmd.c log.c edit.c cmd2.c eval.c \
diff --git a/cmd.c b/cmd.c
index 5a71442..edd6d00 100644
--- a/cmd.c
+++ b/cmd.c
@@ -326,6 +326,7 @@ static void cmd_module __P1 (char *,arg) {
int pindex;
struct stat junk;
char *prefixes[] = {
+ PLUGIN_DIR,
".",
"/lib/powwow",
"/usr/lib/powwow",
@@ -337,7 +338,7 @@ static void cmd_module __P1 (char *,arg) {
/* I changed it to work this way so that you can have libs in multiple places and
* also eventually to allow it to use .dll instead of .so under the cygwin environment */
- for( pindex = 0; pindex < 4; pindex++ ) {
+ for( pindex = 0; pindex < 5; pindex++ ) {
bzero( libname, 1024 );
/* don't look for name without .so, it breaks if you have a file
diff --git a/configure.in b/configure.in
index 7a8c660..2978766 100644
--- a/configure.in
+++ b/configure.in
@@ -93,6 +93,14 @@ AC_CHECK_HEADERS([stdlib.h unistd.h])
AC_CHECK_HEADER([locale.h],
[AC_CHECK_FUNC([putwc],[AC_DEFINE(USE_LOCALE)])])
+AC_ARG_WITH([plugindir],
+ AC_HELP_STRING([--with-plugindir=DIR],
+ [Plugin installation directory [[default=LIBDIR/powwow]]])],
+ [plugindir="${withval}"],
+ [plugindir="\${libdir}/powwow"])
+
+AC_SUBST(plugindir)
+
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -112,6 +120,7 @@ Powwow has been configured with the following options:
Version: ${VERSION}
User binaries: $(eval eval eval echo "${bindir}")
Data directory: $(eval eval eval echo "${datadir}/${PACKAGE}")
+Plugin directory: $(eval eval eval echo "${plugindir}")
enable-vt100: ${enable_vt100}
enable-sort: ${enable_sort}