-
Notifications
You must be signed in to change notification settings - Fork 87
/
configure.ac
92 lines (73 loc) · 2.32 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
AC_INIT(fswebcam, 20200725, phil@sanslogic.co.uk)
AC_PROG_CC
AC_ARG_ENABLE(32bit-buffer,
[ --enable-32bit-buffer allow capturing of 2^32 frames],
[BUFFER_BITS="32"
AC_DEFINE([USE_32BIT_BUFFER], [1], [Allow capture of 2^32 frames])],
[BUFFER_BITS="16"])
SRC_OBJS="src_test.o src_raw.o src_file.o"
dnl --- Test if V4L1 should be disabled. ---
AC_ARG_ENABLE(v4l1,
[ --disable-v4l1 disable V4L1 support],
[HAVE_V4L1="no"],
[AC_DEFINE([HAVE_V4L1], [1], [V4L1 source support.])
SRC_OBJS="$SRC_OBJS src_v4l1.o"
HAVE_V4L1="yes"]
)
dnl --- Test if V4L2 should be disabled. ---
AC_ARG_ENABLE(v4l2,
[ --disable-v4l2 disable V4L2 support],
[HAVE_V4L2="no"],
[AC_DEFINE([HAVE_V4L2], [1], [V4L2 source support.])
SRC_OBJS="$SRC_OBJS src_v4l2.o"
HAVE_V4L2="yes"]
)
AC_SUBST(SRC_OBJS)
AC_FUNC_MMAP
AC_CHECK_LIB(gd, gdImageCreateTrueColor, HAVE_GD="yes",,)
if test "$HAVE_GD" != "yes"; then
AC_MSG_ERROR([GD graphics library not found])
else
LDFLAGS="-lgd $LDFLAGS"
fi
AC_CHECK_LIB(gd, gdImageStringFT, HAVE_FT2="yes",,)
if test "$HAVE_FT2" != "yes"; then
AC_MSG_ERROR([GD does not have FreeType2 font support!])
fi
AC_CHECK_LIB(gd, gdImageJpeg, HAVE_JPEG="yes",,)
if test "$HAVE_JPEG" != "yes"; then
AC_MSG_ERROR([GD does not have JPEG support!])
fi
AC_CHECK_LIB(gd, gdImagePngEx, HAVE_PNG="yes",,)
if test "$HAVE_PNG" != "yes"; then
AC_MSG_ERROR([GD does not have PNG support!])
fi
AC_CHECK_LIB(gd, gdImageWebpEx, HAVE_WEBP="yes",HAVE_WEBP="no",)
if test "$HAVE_WEBP" == "yes"; then
AC_DEFINE([HAVE_WEBP], [1], [WebP output support.])
fi
# The V4Lx headers are now included along with the source.
#AC_CHECK_HEADER(linux/videodev.h, HAVE_V4L1="yes",,)
#if test "$HAVE_V4L1" == "yes"; then
# AC_DEFINE([HAVE_V4L1], [1], [V4L1 source support.])
#fi
#AC_CHECK_HEADERS([linux/videodev2.h], HAVE_V4L2="yes",,[
##include <sys/types.h>
##include <sys/time.h>
##include <linux/videodev.h>
#])
#if test "$HAVE_V4L2" == "yes"; then
# AC_DEFINE([HAVE_V4L2], [1], [V4L2 source support.])
#fi
AC_MSG_RESULT([
Buffer type ........... $BUFFER_BITS bit
PNG support ........... $HAVE_PNG
JPEG support .......... $HAVE_JPEG
WEBP support .......... $HAVE_WEBP
Freetype 2.x support .. $HAVE_FT2
V4L1 support .......... $HAVE_V4L1
V4L2 support .......... $HAVE_V4L2
])
AC_CONFIG_FILES(Makefile)
AC_CONFIG_HEADER(config.h)
AC_OUTPUT