2 AC_INIT(fswebcam, 20091224, phil@firestorm.cx)
5 AC_ARG_ENABLE(32bit-buffer,
6 [ --enable-32bit-buffer allow capturing of 2^32 frames],
8 AC_DEFINE([USE_32BIT_BUFFER], [1], [Allow capture of 2^32 frames])],
11 SRC_OBJS="src_test.o src_raw.o src_file.o"
13 dnl --- Test if V4L1 should be disabled. ---
15 [ --disable-v4l1 disable V4L1 support],
17 [AC_DEFINE([HAVE_V4L1], [1], [V4L1 source support.])
18 SRC_OBJS="$SRC_OBJS src_v4l1.o"
22 dnl --- Test if V4L2 should be disabled. ---
25 [ --disable-v4l2 disable V4L2 support],
27 [AC_DEFINE([HAVE_V4L2], [1], [V4L2 source support.])
28 SRC_OBJS="$SRC_OBJS src_v4l2.o"
36 AC_CHECK_LIB(gd, gdImageCreateTrueColor, HAVE_GD="yes",,)
37 if test "$HAVE_GD" != "yes"; then
38 AC_MSG_ERROR([GD graphics library not found])
40 LDFLAGS="-lgd $LDFLAGS"
43 AC_CHECK_LIB(gd, gdImageStringFT, HAVE_FT2="yes",,)
44 if test "$HAVE_FT2" != "yes"; then
45 AC_MSG_ERROR([GD does not have FreeType2 font support!])
48 AC_CHECK_LIB(gd, gdImageJpeg, HAVE_JPEG="yes",,)
49 if test "$HAVE_JPEG" != "yes"; then
50 AC_MSG_ERROR([GD does not have JPEG support!])
53 AC_CHECK_LIB(gd, gdImagePngEx, HAVE_PNG="yes",,)
54 if test "$HAVE_PNG" != "yes"; then
55 AC_MSG_ERROR([GD does not have PNG support!])
58 # The V4Lx headers are now included along with the source.
60 #AC_CHECK_HEADER(linux/videodev.h, HAVE_V4L1="yes",,)
61 #if test "$HAVE_V4L1" == "yes"; then
62 # AC_DEFINE([HAVE_V4L1], [1], [V4L1 source support.])
65 #AC_CHECK_HEADERS([linux/videodev2.h], HAVE_V4L2="yes",,[
66 ##include <sys/types.h>
67 ##include <sys/time.h>
68 ##include <linux/videodev.h>
70 #if test "$HAVE_V4L2" == "yes"; then
71 # AC_DEFINE([HAVE_V4L2], [1], [V4L2 source support.])
75 Buffer type ........... $BUFFER_BITS bit
76 PNG support ........... $HAVE_PNG
77 JPEG support .......... $HAVE_JPEG
78 Freetype 2.x support .. $HAVE_FT2
79 V4L1 support .......... $HAVE_V4L1
80 V4L2 support .......... $HAVE_V4L2
83 AC_CONFIG_FILES(Makefile)
84 AC_CONFIG_HEADER(config.h)