source: mediastreamer2/configure.ac @ 906:15c3f35412ca

Last change on this file since 906:15c3f35412ca was 906:15c3f35412ca, checked in by Simon Morlat <simon.morlat@…>, 3 years ago

strongly encourage the use of libv4l

File size: 18.3 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT([mediastreamer],[2.3.1])
3
4AC_MSG_NOTICE([$PACKAGE_NAME-$PACKAGE_VERSION           A mediastreaming library for telephony application.])
5AC_MSG_NOTICE([licensed under the terms of the General Public License (GPL)])
6
7AC_CANONICAL_SYSTEM
8
9dnl Source packaging numbers
10MEDIASTREAMER_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
11MEDIASTREAMER_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
12MEDIASTREAMER_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
13MEDIASTREAMER_EXTRA_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f4)
14
15LIBMEDIASTREAMER_SO_CURRENT=0 dnl increment this number when you add/change/remove an interface
16LIBMEDIASTREAMER_SO_REVISION=1 dnl increment this number when you change source code, without changing interfaces; set to 0 when incrementing CURRENT
17LIBMEDIASTREAMER_SO_AGE=0 dnl increment this number when you add an interface, set to 0 if you remove an interface
18
19LIBMEDIASTREAMER_SO_VERSION=$LIBMEDIASTREAMER_SO_CURRENT:$LIBMEDIASTREAMER_SO_REVISION:$LIBMEDIASTREAMER_SO_AGE
20MEDIASTREAMER_VERSION=${MEDIASTREAMER_MAJOR_VERSION}.${MEDIASTREAMER_MINOR_VERSION}.${MEDIASTREAMER_MICRO_VERSION}
21
22if test -n "$MEDIASTREAMER_EXTRA_VERSION" ; then
23        MEDIASTREAMER_VERSION="${MEDIASTREAMER_VERSION}.${MEDIASTREAMER_EXTRA_VERSION}"
24fi
25
26AC_SUBST(LIBMEDIASTREAMER_SO_VERSION)
27AC_SUBST(MEDIASTREAMER_VERSION)
28
29PACKAGE=mediastreamer
30
31OS=`uname|sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
32AC_MSG_RESULT([Building Package on ${OS}])
33
34AM_INIT_AUTOMAKE([tar-ustar])
35m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
36AC_CONFIG_HEADERS(mediastreamer-config.h)
37AC_DEFINE_UNQUOTED(MEDIASTREAMER_MAJOR_VERSION,$MEDIASTREAMER_MAJOR_VERSION, [major version])
38AC_DEFINE_UNQUOTED(MEDIASTREAMER_MINOR_VERSION,$MEDIASTREAMER_MINOR_VERSION, [minor version])
39AC_DEFINE_UNQUOTED(MEDIASTREAMER_MICRO_VERSION,$MEDIASTREAMER_MICRO_VERSION, [micro version])
40AC_DEFINE_UNQUOTED(MEDIASTREAMER_VERSION,"$MEDIASTREAMER_VERSION",[MEDIASTREAMER version number])
41
42MS_PUBLIC_CFLAGS=
43
44AC_SUBST([mkdir_p])
45
46AC_MSG_CHECKING([warning make an error on compilation])
47AC_ARG_ENABLE(strict,
48[  --enable-strict       Enable error on compilation warning [default=no]],
49[wall_werror=$enableval],
50[
51        if test "$USER" = "smorlat" ; then
52                wall_werror=yes
53        else
54                wall_werror=no
55        fi
56]
57)
58
59CFLAGS="-DORTP_INET6 $CFLAGS "
60
61dnl enable ipv6 support
62AC_ARG_ENABLE(ipv6,
63      [  --enable-ipv6    Turn on ipv6 support],
64      [case "${enableval}" in
65        yes)  ipv6=true;;
66        no)   ipv6=false;;
67        *) AC_MSG_ERROR(bad value ${enableval} for --enable-ipv6) ;;
68      esac],[ipv6=true])
69if test x$ipv6 = xtrue ; then
70        CFLAGS="$CFLAGS -DINET6"
71fi
72
73
74AC_ARG_ENABLE(debug,
75                        [  --enable-debug=[yes/no]   enables the display of traces showing the execution of the library. [default=yes]],
76                        [case "${enableval}" in
77                                yes) debug_enabled=yes;;
78                                no) debug_enabled=no;;
79                                *) AC_MSG_ERROR("Bad value for --enable-debug");;
80                        esac],
81                        [debug_enabled=no] )
82
83
84dnl Checks for programs.
85AC_PROG_CC
86AC_PROG_CXX
87AC_PROG_OBJC
88AC_LIBTOOL_WIN32_DLL
89AC_PROG_LIBTOOL
90AC_ENABLE_SHARED(yes)
91AC_ENABLE_STATIC(no)
92
93if test "$GCC" != "yes" ; then
94        case $target_os in
95                *hpux*)
96                        dnl we are probably using HPUX cc compiler, so add a +O2 to CFLAGS
97                        CFLAGS="$CFLAGS +O2 -g "
98                        ;;
99        esac
100else
101        CFLAGS="$CFLAGS -Wall"
102fi
103
104
105
106if test $debug_enabled = "yes"; then
107        CFLAGS="$CFLAGS -g -DDEBUG"
108else
109        CFLAGS="$CFLAGS -O2 -g "
110fi
111
112dnl Checks for header files.
113AC_HEADER_STDC
114
115dnl Checks for typedefs, structures, and compiler characteristics.
116AC_C_CONST
117AC_C_INLINE
118AC_HEADER_TIME
119AC_WORDS_BIGENDIAN
120if test x$ac_cv_c_bigendian = xyes ; then
121        CFLAGS="$CFLAGS -D_BIGENDIAN "
122fi
123
124if test $GCC = yes && test $wall_werror = yes;  then
125        CFLAGS="$CFLAGS -Werror "
126fi
127
128macosx_found=no
129mingw32ce_found=no
130
131dnl add thread flags
132case $target_os in
133        *darwin*)
134                MSPLUGINS_CFLAGS=""
135                MSPLUGINS_LIBS="-dynamiclib"
136                macosx_found=yes
137                LIBS="$LIBS -framework CoreFoundation -framework AudioToolbox -framework CoreAudio"
138        ;;
139        *mingw32ce)
140                CFLAGS="$CFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501  -D_WIN32_WCE  -DORTP_STATIC"
141                CXXFLAGS="$CXXFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -DORTP_STATIC  -D_WIN32_WCE"
142dnl ORTP_STATIC to tell ortp not to export its variable with dllexport, as if we were building statically, or dynamically on linux
143                LIBS="$LIBS -lws2"
144                mingw_found=yes
145                mingw32ce_found=yes
146                build_tests=no
147    ;;
148        *mingw*)
149                CFLAGS="$CFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -DORTP_STATIC"
150                CXXFLAGS="$CXXFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -DORTP_STATIC"
151dnl ORTP_STATIC to tell ortp not to export its variable with dllexport, as if we were building statically, or dynamically on linux
152                LIBS="$LIBS -lws2_32 -lwinmm "
153                mingw_found=yes
154        ;;
155  *)
156     MSPLUGINS_CFLAGS="-pthread"
157     MSPLUGINS_LIBS="-shared -pthread"
158     CFLAGS="$CFLAGS -pthread -D_REENTRANT"
159     LIBS="$LIBS -pthread -lpthread"
160     ;;
161esac
162
163AM_CONDITIONAL(BUILD_MACOSX, test x$macosx_found = xyes)
164
165AM_CONDITIONAL(BUILD_TESTS,test x$build_tests != xno)
166
167AC_CONFIG_COMMANDS([libtool-hacking],[
168if test "$mingw_found" = "yes" ; then
169        echo "Hacking libtool to work with mingw..."
170        sed -e 's/\*\" \$a_deplib \"\*/\*/' < ./libtool > libtool.tmp
171        cp -f ./libtool.tmp ./libtool
172        rm -f ./libtool.tmp
173else
174        echo "No need to hack libtool."
175fi
176], [mingw_found=$mingw_found])
177
178
179dnl prefer fixed point computations
180AC_ARG_ENABLE(fixed_point,
181      [  --enable-fixed-point    Turn on fixed point computations (default: guess)],
182      [case "${enableval}" in
183        yes)  fixed_point=true;;
184        no)   fixed_point=false;;
185        guess) fixed_point=guess;;
186        *) AC_MSG_ERROR(bad value ${enableval} for --enable-fixed-point) ;;
187      esac],[fixed_point=guess])
188
189if test "$fixed_point" = "guess" ; then
190        AC_MSG_CHECKING([whether fixed point arithmetic is preferred])
191        case ${target_cpu}${host_cpu} in
192                *bfin*)
193                        fixed_point=true
194                ;;
195                *arm*)
196                        fixed_point=true
197                ;;
198                *)
199                        fixed_point=false
200                ;;
201        esac
202        AC_MSG_RESULT([$fixed_point])
203fi
204 
205
206if test x$fixed_point = xtrue ; then
207        MS_PUBLIC_CFLAGS="$MS_PUBLIC_CFLAGS -DMS_FIXED_POINT"
208fi
209
210
211dnl initialize pkg-config so that we can use it within if else fi statements.
212PKG_PROG_PKG_CONFIG()
213
214AC_SUBST(MSPLUGINS_CFLAGS)
215AC_SUBST(MSPLUGINS_LIBS)
216
217AC_CHECK_LIB(rt,clock_gettime,[LIBS="$LIBS -lrt"])
218
219dnl     *********************************
220dnl     various checks for soundcard apis
221dnl     *********************************
222
223found_sound=no
224
225if test x$mingw_found = xyes ; then
226        found_sound=yes
227fi
228
229AC_ARG_ENABLE(oss,
230      [  --enable-oss    Disable oss support],
231      [case "${enableval}" in
232        yes) oss=true ;;
233        no)  oss=false ;;
234        *) AC_MSG_ERROR(bad value ${enableval} for --disable-oss) ;;
235      esac],[oss=true])
236
237if "$oss" = "true"; then
238AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h sys/audio.h)
239if test "${ac_cv_header_sys_soundcard_h}" = "yes" || \
240        test "${ac_cv_header_soundcard_h}" = "yes" || \
241                test "${ac_cv_header_sys_audio_h}" = "yes" || \
242        test "${ac_cv_header_machine_soundcard_h}" = "yes"; then
243        found_sound=yes
244else
245        oss=false
246fi
247fi
248
249AM_CONDITIONAL(BUILD_OSS, test x$oss = xtrue)
250
251dnl conditionnal build of ALSA support
252AC_ARG_ENABLE(alsa,
253      [  --enable-alsa    Turn on alsa native support compiling],
254      [case "${enableval}" in
255        yes) alsa=true ;;
256        no)  alsa=false ;;
257        *) AC_MSG_ERROR(bad value ${enableval} for --enable-alsa) ;;
258      esac],[alsa=true])
259
260if test "$alsa" = "true"; then
261        AC_CHECK_HEADERS(alsa/asoundlib.h,
262                [ AC_CHECK_LIB(asound,snd_pcm_open,
263                        [ ALSA_LIBS="-lasound"
264                          found_sound=yes
265                        AC_DEFINE(__ALSA_ENABLED__,1,[defined if alsa support is available])
266                        alsa_enabled=true
267                        ])
268                ]
269        )
270fi
271AC_SUBST(ALSA_LIBS)
272
273AM_CONDITIONAL(BUILD_ALSA, test x$alsa_enabled = xtrue)
274
275
276AC_ARG_ENABLE(artsc,
277      [  --enable-artsc    Turn on artsc (kde<4) sound input/output (no) ],
278      [case "${enableval}" in
279        yes) artsc=true ;;
280        no)  artsc=false ;;
281        *) AC_MSG_ERROR(bad value ${enableval} for --enable-artsc) ;;
282      esac],[artsc=no])
283
284arts_enabled=false
285
286if test "$artsc" = "true" ; then
287
288        dnl check for arts (kde sound daemon) support
289        PKG_CHECK_MODULES(ARTS, [artsc],[
290                dnl New detection
291                arts_enabled=true
292        ],[
293                dnl Old detection
294                if test x$artsc = xtrue ; then
295                        AC_CHECK_HEADERS(kde/artsc/artsc.h,
296                                [ AC_CHECK_LIB(artsc,arts_init,
297                                        [ ARTS_LIBS="-lartsc"
298                                        arts_enabled=true
299                                        ])
300                                ]
301                        )
302                fi
303                AC_SUBST(ARTS_LIBS)
304        ])
305fi
306
307if test x$arts_enabled = xtrue; then
308        found_sound=yes
309        AC_DEFINE(__ARTS_ENABLED__,1,[defined if arts support is available])
310fi
311
312AM_CONDITIONAL(BUILD_ARTS, test x$arts_enabled = xtrue)
313
314AC_ARG_ENABLE(portaudio,
315      [  --enable-portaudio    Turn on portaudio native support compiling],
316      [case "${enableval}" in
317        yes) portaudio=true ;;
318        no)  portaudio=false ;;
319        *) AC_MSG_ERROR(bad value ${enableval} for --enable-portaudio) ;;
320      esac],[portaudio=false])
321
322if test "$portaudio" = "true"; then
323        AC_CHECK_HEADERS(portaudio.h,
324                [ AC_CHECK_LIB(portaudio,Pa_Initialize,
325                        [ PORTAUDIO_LIBS="-lportaudio"
326                          found_sound=yes
327                        AC_DEFINE(__PORTAUDIO_ENABLED__,1,[defined if portaudio support is available])
328                        portaudio_enabled=true
329                        ])
330                ]
331        )
332fi
333
334AC_SUBST(PORTAUDIO_LIBS)
335AM_CONDITIONAL(BUILD_PORTAUDIO, test x$portaudio_enabled = xtrue)
336
337AC_ARG_ENABLE(macsnd,
338      [  --enable-macsnd    Turn on native macosx sound support (default=no)],
339      [case "${enableval}" in
340        yes) macsnd=true ;;
341        no)  macsnd=false ;;
342        *) AC_MSG_ERROR(bad value ${enableval} for --enable-macsnd) ;;
343      esac],[macsnd=false])
344
345if test "$macsnd" = "true"; then
346        AC_DEFINE(__MACSND_ENABLED__,1,[defined if native macosx sound support is available])
347        macsnd_enabled=true
348        found_sound=yes
349fi
350
351AM_CONDITIONAL(BUILD_MACSND, test x$macsnd_enabled = xtrue)
352
353AC_ARG_ENABLE(macaqsnd,
354      [  --enable-macaqsnd    Turn on native macosx Audio Queue sound support (default=yes)],
355      [case "${enableval}" in
356        yes) macaqsnd=true ;;
357        no)  macaqsnd=false ;;
358        *) AC_MSG_ERROR(bad value ${enableval} for --enable-macaqsnd) ;;
359      esac],[macaqsnd=true])
360
361if test "$macosx_found" != "yes" ; then
362        macaqsnd=false
363fi
364
365if test "$macaqsnd" = "true"; then
366        AC_DEFINE(__MAC_AQ_ENABLED__,1,[defined if native macosx AQ sound support is available])
367        found_sound=yes
368fi
369
370AM_CONDITIONAL(BUILD_MACAQSND, test x$macaqsnd = xtrue)
371
372AC_ARG_ENABLE(jack,
373      [  --disable-jack    Disable jack support],
374      [case "${enableval}" in
375        yes) jack=true ;;
376        no)  jack=false ;;
377        *) AC_MSG_ERROR(bad value ${enableval} for --disable-jack) ;;
378      esac],[jack=true])
379
380if test x$jack = xtrue; then
381
382dnl Check for samplerate libraries
383dnl Check for jack libraries (sound output plugin)
384PKG_CHECK_MODULES(JACK,jack >= 0.15.0,
385[
386        dnl we' found jack devel files
387        PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.13,
388                [AC_DEFINE(__JACK_ENABLED__,1,[Jack support])
389                found_sound=yes
390                jack_found=yes] ,
391                [echo "libsamplerate not found, jack support disabled."])
392        AC_SUBST(SAMPLERATE_CFLAGS)
393        AC_SUBST(SAMPLERATE_LIBS)
394],
395[echo "No jack support."] )
396
397if test x$jack_found = xno ; then
398        dnl reset flags
399        JACK_CFLAGS=
400        JACK_LIBS=
401        SAMPLERATE_CFLAGS=
402        SAMPLERATE_LIBS=
403fi
404
405AC_SUBST(JACK_CFLAGS)
406AC_SUBST(JACK_LIBS)
407
408fi
409
410if test "$found_sound" = "no"; then
411        AC_MSG_WARN([Could not find a support sound driver API])
412fi
413
414
415dnl     *************************************
416dnl     check for various codecs libraries
417dnl     *************************************
418
419AC_ARG_ENABLE(speex,
420      [  --disable-speex    Disable speex support],
421      [case "${enableval}" in
422        yes) speex=true ;;
423        no)  speex=false ;;
424        *) AC_MSG_ERROR(bad value ${enableval} for --disable-speex) ;;
425      esac],[speex=true])
426
427if test x$speex = xtrue; then
428
429dnl check for installed version of speex
430PKG_CHECK_MODULES(SPEEX, speex >= 1.2beta3,
431        [ AC_DEFINE(HAVE_SPEEX_NOISE,1,[tells whether the noise arg of speex_echo_cancel can be used]) ],
432        [try_other_speex=yes]
433)
434PKG_CHECK_MODULES(SPEEX, speex >= 1.2beta3, build_speex=yes)
435build_resample=false
436PKG_CHECK_MODULES(SPEEXDSP, speexdsp >= 1.2beta3,
437    [SPEEX_LIBS="$SPEEX_LIBS $SPEEXDSP_LIBS"
438    AC_DEFINE(HAVE_SPEEXDSP,1,[have speexdsp library])
439    build_resample=yes] ,
440    [AC_MSG_NOTICE([No speexdsp library found.])
441]
442)
443AC_SUBST(SPEEX_CFLAGS)
444AC_SUBST(SPEEX_LIBS)
445
446fi
447
448AM_CONDITIONAL(BUILD_SPEEX, test x$build_speex = xyes )
449AM_CONDITIONAL(BUILD_RESAMPLE, test x$build_resample = xyes )
450
451AC_ARG_ENABLE(gsm,
452      [  --disable-gsm    Disable gsm support],
453      [case "${enableval}" in
454        yes) gsm=true ;;
455        no)  gsm=false ;;
456        *) AC_MSG_ERROR(bad value ${enableval} for --disable-gsm) ;;
457      esac],[gsm=true])
458     
459if test x$gsm = xtrue; then
460
461dnl check for gsm
462build_gsm=no
463AC_ARG_WITH( gsm,
464                  [  --with-gsm         Sets the installation prefix of gsm codec library [default=/usr] ],
465                  [ gsmdir=${withval}],[ gsmdir=/usr ])
466
467if test x"$gsmdir" != xno ; then
468        test x"$gmsdir" = xyes && gsmdir=/usr
469        MS_CHECK_DEP([gsm codec],[GSM],[${gsmdir}/include],
470                [${gsmdir}/lib],[gsm/gsm.h],[gsm],[gsm_create])
471        if test "$GSM_found" = "yes" ; then
472                build_gsm=yes
473        fi
474else
475        build_gsm=no
476fi
477
478fi
479
480AM_CONDITIONAL(BUILD_GSM, test x$build_gsm = xyes )
481
482MS_CHECK_VIDEO
483AM_CONDITIONAL(BUILD_VIDEO, test "$video" = "true")
484AM_CONDITIONAL(BUILD_THEORA, test "$have_theora" = "yes")
485AM_CONDITIONAL(BUILD_WIN32, test "$mingw_found" = "yes")
486AM_CONDITIONAL(BUILD_WIN32_WCE, test "$mingw32ce_found" = "yes")
487
488dnl     *********************************************
489dnl     setup oRTP dependency
490dnl     *********************************************
491AC_ARG_ENABLE(external-ortp,
492      [  --enable-external-ortp    Use external oRTP library],
493      [case "${enableval}" in
494        yes) external_ortp=true ;;
495        no)  external_ortp=false ;;
496        *) AC_MSG_ERROR(bad value ${enableval} for --enable-external-ortp) ;;
497      esac],[external_ortp=false])
498
499if test "$external_ortp" = 'false'; then
500        if test -e $srcdir/../oRTP/include/ortp/ortp.h ; then
501                echo "building from linphone source tree, using ../oRTP/include/ortp/ortp.h"
502                ORTP_CFLAGS="-I\$(top_srcdir)/../oRTP/include"
503                ORTP_LIBS="\$(top_builddir)/../oRTP/src/libortp.la"
504                if test x$ac_cv_c_bigendian = xyes ; then
505                        ORTP_CFLAGS="$ORTP_CFLAGS -DORTP_BIGENDIAN"
506                fi
507        else
508                external_ortp=true
509        fi
510fi
511if test "$external_ortp" = 'true'; then
512        PKG_CHECK_MODULES(ORTP, ortp >= 0.9.0, ,
513                [ AC_MSG_ERROR([Couldn't find ortp library]) ] )
514fi
515AC_SUBST(ORTP_CFLAGS)
516AC_SUBST(ORTP_LIBS)
517
518
519dnl check dlopen support in headers and libraries, so that we can use mediastreamer plugins
520AC_CHECK_HEADERS(dlfcn.h)
521have_dlopen=false
522AC_CHECK_LIB(dl,dlopen,[LIBS="$LIBS -ldl"; have_dlopen=true])
523AC_CHECK_FUNC(dlopen,[have_dlopen=true])
524if test "$have_dlopen" = "true" ; then
525        AC_DEFINE(HAVE_DLOPEN,1,[Defined if dlopen() is availlable])
526fi
527
528dnl check various things
529AC_FUNC_ALLOCA
530
531if test "x${prefix}" = "xNONE"; then
532        package_prefix=${ac_default_prefix}
533else
534        package_prefix=${prefix}
535fi
536
537if test x$mingw_found = xyes ; then
538        package_prefix="."
539fi
540
541dnl define path of plugins:
542AC_DEFINE_UNQUOTED(PACKAGE_PLUGINS_DIR, "${package_prefix}/lib/mediastreamer/plugins" ,[path of plugins])
543PACKAGE_PLUGINS_DIR="${package_prefix}/lib/mediastreamer/plugins"
544AC_SUBST(PACKAGE_PLUGINS_DIR)
545
546PACKAGE_DATA_DIR="$prefix/share"
547AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR,  "${package_prefix}/share" ,[path of data])
548AC_SUBST(PACKAGE_DATA_DIR)
549
550dnl check for video4linux headers
551AC_CHECK_HEADERS(linux/videodev.h linux/videodev2.h)
552if test "${ac_cv_header_linux_videodev_h}" = "yes" || \
553        test "${ac_cv_header_linux_videodev2_h}" = "yes" ; then
554        found_v4l=yes
555else
556        found_v4l=no
557fi
558
559AM_CONDITIONAL(BUILD_V4L, test x$found_v4l = xyes )
560
561AC_ARG_ENABLE(libv4l,
562      [  --disable-libv4l    Disable usage of libv4l, really discouraged],
563      [case "${enableval}" in
564        yes) libv4l=true ;;
565        no)  libv4l=false ;;
566        *) AC_MSG_ERROR(bad value ${enableval} for --disable-libv4l) ;;
567      esac],[libv4l=true])b
568
569PKG_CHECK_MODULES(LIBV4L2, libv4l2,
570        [AC_DEFINE(HAVE_LIBV4L2,1,[Defined if we have libv4l2])
571        have_libv4l2=yes]
572        ,[echo "No libv4l2 found."]
573)
574PKG_CHECK_MODULES(LIBV4L1, libv4l1,
575        [AC_DEFINE(HAVE_LIBV4L1,1,[Defined if we have libv4l1])
576        have_libv4l1=yes]
577        ,[echo "No libv4l1 found."]
578)
579
580if test "$found_v4l" = "yes" && test "$have_libv4l2" != "yes" ; then
581        if test "$libv4l" = "no" ; then
582                AC_MSG_ERROR(
583[
584Missing libv4l2. It is highly recommended to build with
585libv4l2 headers and library. Many camera will won't work or will crash
586your application if libv4l2 is not installed.
587If you know what you are doing, you can use --disable-libv4l to disable
588this check.
589])
590        fi
591fi
592
593dnl ##################################################
594dnl # Check for doxygen
595dnl ##################################################
596
597AC_PATH_PROG(DOXYGEN,doxygen,false)
598AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
599
600
601dnl ##################################################
602dnl # Check for ESP Packager
603dnl ##################################################
604
605AC_PATH_PROG(EPM,epm,false)
606AC_PATH_PROG(MKEPMLIST,mkepmlist,false)
607AC_PATH_PROG(EPMINSTALL,epminstall,false)
608AM_CONDITIONAL(WITH_EPM,test $EPM != false && test $MKEPMLIST != false && test $EPMINSTALL != false)
609
610
611# Preferred packaging system, as per EPM terminology
612case $target in
613*-*-linux*)
614        if test -f /etc/debian_version ; then
615                EPM_PKG_EXT=deb
616        else
617                EPM_PKG_EXT=rpm
618        fi
619        ;;
620*-hp-hpux*)
621        EPM_PKG_EXT=depot.gz;;
622*-dec-osf*)
623        EPM_PKG_EXT=setld;;
624esac
625AC_SUBST(EPM_PKG_EXT)
626
627# System software User & Group names
628case $target in
629*-*-linux*)
630        SYS_USER=root
631        SYS_GROUP=root
632        ;;
633*-*-hpux*|*-dec-osf*)
634        SYS_USER=bin
635        SYS_GROUP=bin
636        ;;
637esac
638AC_SUBST(SYS_USER)
639AC_SUBST(SYS_GROUP)
640
641# CPU Architecture
642case $target_cpu in
643i?86)           ARCH=i386;;
644*)              ARCH=$target_cpu;;
645esac
646AC_SUBST(ARCH)
647
648# Various other packaging variables, that can be over-ridden ad `make
649# package' time
650SUMMARY="A mediastreaming library."
651AC_SUBST(SUMMARY)
652PACKAGER=anonymous
653AC_SUBST(PACKAGER)
654LICENSE=GPL
655AC_SUBST(LICENSE)
656VENDOR=Linphone
657AC_SUBST(VENDOR)
658RELEASE=1
659AC_SUBST(RELEASE)
660
661CFLAGS="$CFLAGS $MS_PUBLIC_CFLAGS"
662CXXFLAGS="$CXXFLAGS $MS_PUBLIC_CFLAGS"
663dnl: these ones gets exported in pkgconfig file.
664AC_SUBST(MS_PUBLIC_CFLAGS)
665
666AC_OUTPUT(
667Makefile
668include/Makefile
669include/mediastreamer2/Makefile
670src/Makefile
671tests/Makefile
672build/Makefile
673build/win32native/Makefile
674build/win32-novideo/Makefile
675build/wince/Makefile
676build/winmob/Makefile
677mediastreamer.pc
678mediastreamer2.spec
679help/Makefile
680help/Doxyfile
681help/doxygen.dox
682)
Note: See TracBrowser for help on using the repository browser.