+if test "x$has_libudev" != "xno"; then
+ INCLUDES="$INCLUDES $UDEV_CFLAGS";LIBS="$LIBS $UDEV_LIBS"
+ AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"])
+ REQUIRES="udev"
+fi
+
+AC_SEARCH_LIBS([pthread_create],[pthread],, AC_MSG_ERROR("required library 'pthread' is missing"))
+
+libs_pre_dl=$LIBS
+ AC_SEARCH_LIBS(dlopen, [dl],
+ [test "$ac_cv_search_dlopen" = "none required" || LIBS_DL=$ac_cv_search_dlopen],
+ AC_MSG_ERROR("required library 'dl' is missing"))
+ AC_SUBST([LIBS_DL])
+LIBS=$libs_pre_dl
+
+CXXFLAGS="-fPIC -Wall -Wextra $CXXFLAGS"
+
+AC_SUBST(REQUIRES)