tcpconns plugin: Fix for compilation under FreeBSD.
[collectd.git] / configure.in
index 3c632c7..07c9b42 100644 (file)
@@ -371,8 +371,7 @@ AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr
 
 AC_FUNC_STRERROR_R
 
-AC_CHECK_FUNCS(getpwnam_r)
-AC_CHECK_FUNCS(getgrnam_r)
+AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
 
 socket_needs_socket="no"
 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
@@ -382,8 +381,6 @@ nanosleep_needs_rt="no"
 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
 
-AC_CHECK_FUNCS(regcomp regerror regexec regfree)
-
 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
@@ -1902,6 +1899,9 @@ AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@
        then
                PERL_BINDINGS_OPTIONS="$withval"
                with_perl_bindings="yes"
+       else
+               PERL_BINDINGS_OPTIONS=""
+               with_perl_bindings="$withval"
        fi
 ],
 [
@@ -1936,21 +1936,6 @@ then
        with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
 fi
 
-if test ".." != "$ac_top_srcdir"
-then
-       # we're not building from the source tree
-       for file in \
-                       bindings/perl/Collectd/Makefile.PL \
-                       bindings/perl/Collectd/Unixsock.pm \
-                       bindings/perl/Collectd.pm \
-                       bindings/perl/Makefile.PL
-       do
-               dir=`dirname $file`
-               mkdir -p $dir
-               cp src/$ac_top_srcdir/$file $file
-       done
-fi
-
 cat <<EOF;
 
 Configuration: