diff options
-rw-r--r-- | configure.ac | 38 | ||||
-rw-r--r-- | include/pdp_config.h.in | 18 |
2 files changed, 45 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index 4732c22..cd3c84c 100644 --- a/configure.ac +++ b/configure.ac @@ -139,12 +139,40 @@ then dnl if not darwin, assume target is linux else - AC_CHECK_HEADER(linux/videodev.h, + have_v4l="no" + have_libv4l="no" + AC_CHECK_HEADERS([libv4l1-videodev.h], have_v4l="yes") + AC_CHECK_HEADERS([linux/videodev.h], have_libv4l="yes") + + if test "x$have_libv4l" = "xyes" + then + have_v4l="yes" + fi + + if test "x$enable_v4l" = "xno" + then + have_v4l="no" + fi + + if test "x$have_v4l" = "xyes" + then PDP_OPTMOD="$PDP_OPTMOD pdp_v4l.o" - AC_DEFINE(HAVE_PDP_V4L, 1, build pdp_v4l), - echo " linux/videodev.h not found: not building pdp_v4l") - - + AC_DEFINE(HAVE_PDP_V4L, 1, [build pdp_v4l]) + + if test "x$have_libv4l" = "xyes" + then + AC_DEFINE(HAVE_PDP_LIBV4L, 1, [build pdp_v4l with libv4l]) + PDP_V4L_CFLAGS="$(shell pkg-config --cflags libv4l)" + PDP_V4L_LIBS="$(shell pkg-config --libs libv4l)" + else + PDP_V4L_CFLAGS="" + PDP_V4L_LIBS="" + fi + PDP_CFLAGS="$PDP_CFLAGS $PDP_V4L_CFLAGS" + LIBS="$LIBS $PDP_V4L_LIBS" + else + AC_MSG_RESULT([not building pdp_v4l]) + fi fi dnl optional gsl support diff --git a/include/pdp_config.h.in b/include/pdp_config.h.in index 1ecfb3a..cc37277 100644 --- a/include/pdp_config.h.in +++ b/include/pdp_config.h.in @@ -9,6 +9,12 @@ /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM +/* Define to 1 if you have the <libv4l1-videodev.h> header file. */ +#undef HAVE_LIBV4L1_VIDEODEV_H + +/* Define to 1 if you have the <linux/videodev.h> header file. */ +#undef HAVE_LINUX_VIDEODEV_H + /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H @@ -18,24 +24,21 @@ /* gsl support */ #undef HAVE_PDP_GSL +/* build pdp_v4l with libv4l */ +#undef HAVE_PDP_LIBV4L + /* build png support */ #undef HAVE_PDP_PNG /* build pdp_qt */ #undef HAVE_PDP_QT -/* readline needed for console support */ -#undef HAVE_PDP_READLINE - /* build pdp_sdl */ #undef HAVE_PDP_SDL /* build pdp_v4l */ #undef HAVE_PDP_V4L -/* experimental vforth dsp engine */ -#undef HAVE_PDP_VFORTH - /* build X11 support */ #undef HAVE_PDP_X @@ -78,6 +81,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION |