FPS option part 2
[fswebcam.git] / configure.ac
blob0e297caa16468c49b67528bdf2f0a3b97ca31410
2 AC_INIT(fswebcam, 20091224, phil@firestorm.cx)
3 AC_PROG_CC
5 AC_ARG_ENABLE(32bit-buffer,
6         [  --enable-32bit-buffer   allow capturing of 2^32 frames],
7         [BUFFER_BITS="32"
8         AC_DEFINE([USE_32BIT_BUFFER], [1], [Allow capture of 2^32 frames])],
9         [BUFFER_BITS="16"])
11 SRC_OBJS="src_test.o src_raw.o src_file.o"
13 dnl --- Test if V4L1 should be disabled. ---
14 AC_ARG_ENABLE(v4l1,
15         [  --disable-v4l1          disable V4L1 support],
16         [HAVE_V4L1="no"],
17         [AC_DEFINE([HAVE_V4L1], [1], [V4L1 source support.])
18         SRC_OBJS="$SRC_OBJS src_v4l1.o"
19         HAVE_V4L1="yes"]
22 dnl --- Test if V4L2 should be disabled. ---
24 AC_ARG_ENABLE(v4l2,
25         [  --disable-v4l2          disable V4L2 support],
26         [HAVE_V4L2="no"],
27         [AC_DEFINE([HAVE_V4L2], [1], [V4L2 source support.])
28         SRC_OBJS="$SRC_OBJS src_v4l2.o"
29         HAVE_V4L2="yes"]
32 AC_SUBST(SRC_OBJS)
34 AC_FUNC_MMAP
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])
39 else
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.])
63 #fi
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>
69 #])
70 #if test "$HAVE_V4L2" == "yes"; then
71 #       AC_DEFINE([HAVE_V4L2], [1], [V4L2 source support.])
72 #fi
74 AC_MSG_RESULT([
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)
85 AC_OUTPUT