1 AC_INIT(../include/ptlib.h)
5 dnl ########################################################################
6 dnl set the PWLIB directory to the current directory
9 echo "Plugin source directory is $PWLIBDIR";
11 dnl set the pwlib installation dir for pwlib-config
14 dnl ########################################################################
15 dnl set the PREFIX accordingly
16 if test "x$prefix" = "xNONE"; then
17 INSTALLPREFIX="/usr/local"
19 INSTALLPREFIX="${prefix}"
22 AC_SUBST(INSTALLPREFIX)
24 dnl ########################################################################
25 dnl set LIBDIR accordingly
29 AC_ARG_ENABLE(plugins, disable plugin support])
30 if test "${enable_plugins}z" = "z" ; then
33 if test "$enable_plugins" = "no" ; then
34 AC_MSG_NOTICE(Plugins disabled)
39 [ --disable-audio disable audio support])
40 if test "${enable_audio}z" = "z" ; then
44 if test "${enable_audio}" = "yes" ; then
46 dnl #########################################################################
47 dnl check for Alsa sound support
48 dnl ########################################################################
50 AC_ARG_ENABLE(alsa, [ --enable-alsa enable ALSA audio support],,enable_alsa=yes)
52 if test "${enable_alsa}z" = "yesz" ; then
53 AC_CHECK_HEADER(alsa/asoundlib.h, ALSAHDR=1)
54 AC_MSG_CHECKING(for ALSA sound support)
55 if test "${ALSAHDR}z" != "z"; then
63 dnl #########################################################################
64 dnl check for ESD sound support
65 dnl ########################################################################
67 AC_ARG_ENABLE(esd, [ --enable-esd enable ESD audio support],,enable_esd=no)
69 if test "${enable_esd}z" = "yesz" ; then
70 AC_CHECK_HEADER(esd.h, ESDHDR=1)
71 AC_MSG_CHECKING(for ESD sound support)
72 if test "${ESDHDR}z" != "z"; then
80 dnl #########################################################################
81 dnl check for OSS sound support
82 dnl ########################################################################
84 AC_ARG_ENABLE(oss, [ --enable-oss enable OSS audio support],,enable_oss=no)
86 if test "${enable_oss}z" = "yesz" ; then
87 AC_CHECK_HEADER(sys/soundcard.h, SNDCARDHDR=1)
88 AC_MSG_CHECKING(for OSS sound support)
89 if test "${SNDCARDHDR}z" != "z"; then
97 dnl #########################################################################
98 dnl check for sunaudio sound support
99 dnl ########################################################################
101 AC_ARG_ENABLE(sunaudio, [ --enable-sunaudio enable Sun audio support],,enable_sunaudio=no)
103 if test "${enable_sunaudio}z" = "yesz" ; then
104 AC_CHECK_HEADER(sys/conf.h, SNDCARDHDR=1)
105 AC_MSG_CHECKING(for Sun audio sound support)
106 if test "${SNDCARDHDR}z" != "z"; then
107 AC_SUBST(HAS_SUNAUDIO, 1)
116 [ --disable-video disable video device support in PWLIB])
118 if test "${enable_video}z" = "z" ; then
122 if test "$enable_video" = "yes" ; then
124 dnl #########################################################################
125 dnl check for V4L video support
126 dnl ########################################################################
128 AC_ARG_ENABLE(v4l, [ --enable-v4l enable V4L video support],,enable_v4l=yes)
130 if test "${enable_v4l}z" = "yesz" ; then
131 AC_CHECK_HEADER(linux/videodev.h, V4LHDR=1)
132 AC_MSG_CHECKING(for V4L video support)
133 if test "${V4LHDR}z" != "z"; then
141 dnl #########################################################################
142 dnl check for V4L2 video support
143 dnl ########################################################################
145 AC_ARG_ENABLE(v4l2, [ --enable-v4l2 enable V4L2 video support],,enable_v4l2=yes)
147 if test "${enable_v4l2}z" = "yesz" ; then
148 if test "${OSTYPE}z" = "solaris2.11z"; then
149 VIDEODEV="sys/videodev2.h"
151 VIDEODEV="linux/videodev2.h"
153 AC_CHECK_HEADER($VIDEODEV,
156 # We can't use AC_CHECK_HEADER again because
157 # the value is cached, perhaps we have another
158 # method to do this more cleanly ?
159 AC_MSG_CHECKING([for $VIDEODEV with sys/types.h])
162 #include <sys/types.h>
163 #include <linux/types.h>
166 #include <sys/types.h>
167 #include <sys/time.h>
169 #error "not supported"
187 #include <linux/types.h>
190 AC_MSG_CHECKING(for V4L2 video support)
191 if test "${V4L2HDR}z" != "z"; then
192 AC_SUBST(HAS_V4L2, 1)
199 dnl #########################################################################
200 dnl check for BSD video capture support
201 dnl ########################################################################
203 AC_ARG_ENABLE(bsdvideo, [ --enable-bsdvideo enable BSD video support],,enable_bsdvideo=yes)
205 if test "${enable_bsdvideo}z" = "yesz" ; then
206 AC_CHECK_HEADER(machine/ioctl_meteor.h, BSDVIDEOHDR=1)
207 AC_CHECK_HEADER(i386/ioctl_meteor.h, BSDVIDEOHDR=1)
208 AC_CHECK_HEADER(dev/ic/bt8xx.h, BSDVIDEOHDR=1)
209 AC_MSG_CHECKING(for BSD video support)
210 if test "${BSDVIDEOHDR}z" != "z"; then
211 AC_SUBST(HAS_BSDVIDEOCAP, 1)
218 dnl #########################################################################
219 dnl check for AVC video support
220 dnl ########################################################################
222 AC_ARG_ENABLE(avc, [ --enable-avc enable IEEE1394/AVC video support],,enable_avc=yes)
224 if test "${enable_avc}z" = "yesz" ; then
225 AC_CHECK_HEADER(libavc1394/avc1394.h, AVC1394HDR=1)
226 AC_CHECK_HEADER(libdv/dv.h, DVHDR=1)
227 AC_CHECK_HEADER(libraw1394/raw1394.h, RAW1394HDR=1)
228 AC_MSG_CHECKING(for IEEE1394/AVC video support)
229 if test "${AVC1394HDR}z" != "z" -a "${DVHDR}z" != "z" -a "${RAW1394HDR}z" != "z"; then
230 AC_SUBST(HAS_AVC1394, 1)
237 dnl #########################################################################
238 dnl check for DC video support
239 dnl ########################################################################
241 AC_ARG_ENABLE(dc, [ --enable-dc enable IEEE1394/DC video support],,enable_dc=yes)
243 if test "${enable_dc}z" = "yesz" ; then
244 AC_CHECK_HEADER(libdc1394/dc1394_control.h, DC1394HDR=1)
245 AC_CHECK_HEADER(libraw1394/raw1394.h, RAW1394HDR=1)
246 AC_MSG_CHECKING(for IEEE1394/DC video support)
247 if test "${DC1394HDR}z" != "z" -a "${RAW1394HDR}z" != "z"; then
248 AC_SUBST(HAS_DC1394, 1)
250 AC_MSG_CHECKING(if dc1394_dma_setup_capture has 12 parms)
252 #include "libdc1394/dc1394_control.h"
253 int main(int ac,char **av)
255 raw1394handle_t handle;
263 int do_extra_buffering;
265 const char *dma_device_file;
266 dc1394_cameracapture *camera;
267 dc1394_dma_setup_capture(handle, node, channel, format, mode, speed, frame_rate, num_dma_buffers,
268 do_extra_buffering, drop_frames, dma_device_file, camera);
271 ]],NEW_DC_API=1, NEW_DC_API=0)
272 if test "$NEW_DC_API" = "1" ; then
273 AC_SUBST(DC_CFLAGS, -DNEW_DC_API)
285 dnl end of test for video
289 dnl ########################################################################
290 dnl output header file
292 AC_CONFIG_FILES(Makefile)
293 AC_CONFIG_FILES(vidinput_dc/Makefile)