In keeping with all the other path variables (eg, libdir), don't resolve
authorrichardv <richardv@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 24 Aug 2007 00:06:30 +0000 (00:06 +0000)
committerrichardv <richardv@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 24 Aug 2007 00:06:30 +0000 (00:06 +0000)
plugindir at configure time. Instead leave it to be defined at make
time, which means it can then be changed by, eg, changing $prefix. This
also means moving the definition of PLUGIN_DIR from config.h to a -D in
CPPFLAGS.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22617 f5534014-38df-0310-8fa8-9805f1628bb7

config.h.win32
configure.in

index 1be2f1856ee70d555ddf0b5049a04152f14caf4b..a49d6ec7927b23d03cca61cf271779c9e9f73822 100644 (file)
 /* Version number of package */
 #define VERSION "@VERSION@"
 
-/* We don't know what the plugin installation directory will be. */
-#define PLUGIN_DIR NULL
-
 /* We shouldn't need this under Windows but we'll define it anyway. */
 #define HTML_VIEWER "mozilla"
index b7ffb2b58382be9b81254899840eb40aaacc2a5a..cbc2ab57c77eda2e53000d6334332c195898fa09 100644 (file)
@@ -1443,7 +1443,8 @@ dnl
 dnl check whether plugins should be enabled and, if they should be,
 dnl check for plugins directory - stolen from Amanda's configure.in
 dnl
-plugindir="$libdir/wireshark/plugins/$VERSION"
+dnl we don't wish to expand ${libdir} yet
+plugindir='${libdir}/wireshark/plugins/${VERSION}'
 AC_ARG_WITH(plugins,
   AC_HELP_STRING( [--with-plugins@<:@=DIR@:>@],
                   [support plugins (installed in DIR, if supplied).   @<:@default=yes, if possible@:>@]),
@@ -1461,16 +1462,9 @@ AM_CONDITIONAL(HAVE_PLUGINS, test "x$have_plugins" = "xyes")
 if test x$have_plugins = xyes
 then
   AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled])
-  plugindir=`(
-    test "x$prefix" = xNONE && prefix=$ac_default_prefix
-    test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
-    eval echo "$plugindir"
-  )`
-  AC_DEFINE_UNQUOTED(PLUGIN_DIR, "$plugindir", [Plugin installation directory])
-else
-  AC_DEFINE(PLUGIN_DIR, NULL, [Plugin installation directory])
 fi
 AC_SUBST(plugindir)
+CPPFLAGS="$CPPFLAGS '-DPLUGIN_DIR=\"\$(plugindir)\"'"
 
 #
 # The plugin dissectors reside in ./plugins/PROTO/