Code

configure: Only set the Perl interpreter if the argument is a file.
[collectd.git] / configure.in
index 43e3329b1700b2de7154cb09be7777fa02154b6d..39a99eadc0f3c061ea96d0052a2253aaf4ebf177 100644 (file)
@@ -2672,7 +2672,7 @@ AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
 perl_interpreter="perl"
 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
 [
-       if test -x "$withval"
+       if test -f "$withval" && test -x "$withval"
        then
                perl_interpreter="$withval"
                with_libperl="yes"