Don't define EXTCAP_DIR as "${datadir}/wireshark/extcap".
authorGuy Harris <guy@alum.mit.edu>
Sat, 13 Feb 2016 20:26:23 +0000 (12:26 -0800)
committerGuy Harris <guy@alum.mit.edu>
Sat, 13 Feb 2016 20:26:54 +0000 (20:26 +0000)
If you hand that string to a UNIX API, it'll probably fail; you need to
expand ${datadir} in the *build* process.

Do it the same way we handle PLUGIN_INSTALL_DIR.

Change-Id: I09e8a8467ab7b0e912a174be3335ee1faff91abb
Reviewed-on: https://code.wireshark.org/review/13928
Reviewed-by: Guy Harris <guy@alum.mit.edu>
configure.ac

index f30c0f0e8fd61662ee6336f59c7a7ef2766af665..4bb99da914d3c7a0a73028f8435c9bae5f97761d 100644 (file)
@@ -3055,9 +3055,12 @@ WS_CPPFLAGS="$WS_CPPFLAGS '-DPLUGIN_INSTALL_DIR=\"\$(plugindir)\"'"
 PLUGIN_LIBS=""
 AC_SUBST(PLUGIN_LIBS)
 
-
-dnl Use extcap by default
-extcapdir='${datadir}/wireshark/extcap/'
+dnl
+dnl check whether extcap programs should be enabled and, if they should be,
+dnl check for extcap directory - stolen from Amanda's configure.ac
+dnl
+dnl we don't wish to expand ${datadir} yet
+extcapdir="\${datadir}/wireshark/extcap"
 AC_ARG_WITH(extcap,
   AC_HELP_STRING( [--with-extcap@<:@=DIR@:>@],
                  [use extcap for external capture sources (installed in DIR, if supplied) @<:@default=yes, if possible@:>@]),
@@ -3077,9 +3080,9 @@ AM_CONDITIONAL(HAVE_EXTCAP, test "x$have_extcap" = "xyes")
 if test "x$have_extcap" = "xyes"
 then
   AC_DEFINE(HAVE_EXTCAP, 1, [Define if external capture sources should be enabled])
-  AC_DEFINE_UNQUOTED(EXTCAP_DIR,"$extcapdir", [Directory for extcap plugins])
 fi
 AC_SUBST(extcapdir)
+WS_CPPFLAGS="$WS_CPPFLAGS '-DEXTCAP_DIR=\"\$(extcapdir)\"'"
 
 if test "x$enable_sshdump" = "xyes" ; then
        if  test "x$have_good_libssh" = "xyes" ; then