source: mediastreamer2/configure.ac @ 1165:bb9faf525280

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

XvXshm? display works
+ big cleanups

File size: 19.5 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT([mediastreamer],[2.7.0])
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=1 dnl increment this number when you add/change/remove an interface
16LIBMEDIASTREAMER_SO_REVISION=0 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(iounit,
373      [  --enable-iounit    Turn on native apple iounit support (default=no)],
374      [case "${enableval}" in
375        yes) iounit=true ;;
376        no)  iounit=false ;;
377        *) AC_MSG_ERROR(bad value ${enableval} for --enable-iounit) ;;
378      esac],[iounit=false])
379
380if test "$iounit" = "true"; then
381        AC_DEFINE(__MACIOUNIT_ENABLED__,1,[defined if native apple iounit support is available])
382        iounit_enabled=true
383        found_sound=yes
384fi
385
386AM_CONDITIONAL(BUILD_MACIOUNIT, test x$iounit_enabled = xtrue)
387
388AC_ARG_ENABLE(jack,
389      [  --disable-jack    Disable jack support],
390      [case "${enableval}" in
391        yes) jack=true ;;
392        no)  jack=false ;;
393        *) AC_MSG_ERROR(bad value ${enableval} for --disable-jack) ;;
394      esac],[jack=true])
395
396if test x$jack = xtrue; then
397
398dnl Check for samplerate libraries
399dnl Check for jack libraries (sound output plugin)
400PKG_CHECK_MODULES(JACK,jack >= 0.15.0,
401[
402        dnl we' found jack devel files
403        PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.13,
404                [AC_DEFINE(__JACK_ENABLED__,1,[Jack support])
405                found_sound=yes
406                jack_found=yes] ,
407                [echo "libsamplerate not found, jack support disabled."])
408        AC_SUBST(SAMPLERATE_CFLAGS)
409        AC_SUBST(SAMPLERATE_LIBS)
410],
411[echo "No jack support."] )
412
413if test x$jack_found = xno ; then
414        dnl reset flags
415        JACK_CFLAGS=
416        JACK_LIBS=
417        SAMPLERATE_CFLAGS=
418        SAMPLERATE_LIBS=
419fi
420
421AC_SUBST(JACK_CFLAGS)
422AC_SUBST(JACK_LIBS)
423
424fi
425
426AC_ARG_ENABLE(pulseaudio,
427      [  --disable-pulseaudio    Disable pulseaudio support],
428      [case "${enableval}" in
429        yes) pulseaudio=true ;;
430        no)  pulseaudio=false ;;
431        *) AC_MSG_ERROR(bad value ${enableval} for --disable-pulseaudio) ;;
432      esac],[pulseaudio=true])
433
434
435if test x$pulseaudio = xtrue ; then
436        PKG_CHECK_MODULES(LIBPULSE, libpulse >= 0.9.21,
437                [AC_DEFINE(__PULSEAUDIO_ENABLED__,1,[Pulse audio support])],
438                [pulseaudio=false])
439fi
440
441AM_CONDITIONAL(BUILD_PULSEAUDIO,test x$pulseaudio = xtrue)
442
443
444if test "$found_sound" = "no"; then
445        AC_MSG_WARN([Could not find a support sound driver API])
446fi
447
448
449dnl     *************************************
450dnl     check for various codecs libraries
451dnl     *************************************
452
453AC_ARG_ENABLE(speex,
454      [  --disable-speex    Disable speex support],
455      [case "${enableval}" in
456        yes) speex=true ;;
457        no)  speex=false ;;
458        *) AC_MSG_ERROR(bad value ${enableval} for --disable-speex) ;;
459      esac],[speex=true])
460
461if test x$speex = xtrue; then
462
463dnl check for installed version of speex
464PKG_CHECK_MODULES(SPEEX, speex >= 1.2beta3,
465        [ AC_DEFINE(HAVE_SPEEX_NOISE,1,[tells whether the noise arg of speex_echo_cancel can be used]) ],
466        [try_other_speex=yes]
467)
468PKG_CHECK_MODULES(SPEEX, speex >= 1.2beta3, build_speex=yes)
469build_resample=false
470PKG_CHECK_MODULES(SPEEXDSP, speexdsp >= 1.2beta3,
471    [SPEEX_LIBS="$SPEEX_LIBS $SPEEXDSP_LIBS"
472    AC_DEFINE(HAVE_SPEEXDSP,1,[have speexdsp library])
473    build_resample=yes] ,
474    [AC_MSG_NOTICE([No speexdsp library found.])
475]
476)
477AC_SUBST(SPEEX_CFLAGS)
478AC_SUBST(SPEEX_LIBS)
479
480fi
481
482AM_CONDITIONAL(BUILD_SPEEX, test x$build_speex = xyes )
483AM_CONDITIONAL(BUILD_RESAMPLE, test x$build_resample = xyes )
484
485AC_ARG_ENABLE(gsm,
486      [  --disable-gsm    Disable gsm support],
487      [case "${enableval}" in
488        yes) gsm=true ;;
489        no)  gsm=false ;;
490        *) AC_MSG_ERROR(bad value ${enableval} for --disable-gsm) ;;
491      esac],[gsm=true])
492     
493if test x$gsm = xtrue; then
494
495dnl check for gsm
496build_gsm=no
497AC_ARG_WITH( gsm,
498                  [  --with-gsm         Sets the installation prefix of gsm codec library [default=/usr] ],
499                  [ gsmdir=${withval}],[ gsmdir=/usr ])
500
501if test x"$gsmdir" != xno ; then
502        test x"$gmsdir" = xyes && gsmdir=/usr
503        MS_CHECK_DEP([gsm codec],[GSM],[${gsmdir}/include],
504                [${gsmdir}/lib],[gsm/gsm.h],[gsm],[gsm_create])
505        if test "$GSM_found" = "yes" ; then
506                build_gsm=yes
507        fi
508else
509        build_gsm=no
510fi
511
512fi
513
514AM_CONDITIONAL(BUILD_GSM, test x$build_gsm = xyes )
515
516MS_CHECK_VIDEO
517AM_CONDITIONAL(BUILD_VIDEO, test "$video" = "true")
518AM_CONDITIONAL(BUILD_THEORA, test "$have_theora" = "yes")
519AM_CONDITIONAL(BUILD_WIN32, test "$mingw_found" = "yes")
520AM_CONDITIONAL(BUILD_WIN32_WCE, test "$mingw32ce_found" = "yes")
521AM_CONDITIONAL(BUILD_FFMPEG, test "$ffmpeg" = "true")
522AM_CONDITIONAL(BUILD_SDL,test "$sdl_found" = "true" )
523AM_CONDITIONAL(BUILD_X11_XV, test "$enable_xv" = "true" )
524
525dnl     *********************************************
526dnl     setup oRTP dependency
527dnl     *********************************************
528AC_ARG_ENABLE(external-ortp,
529      [  --enable-external-ortp    Use external oRTP library],
530      [case "${enableval}" in
531        yes) external_ortp=true ;;
532        no)  external_ortp=false ;;
533        *) AC_MSG_ERROR(bad value ${enableval} for --enable-external-ortp) ;;
534      esac],[external_ortp=false])
535
536if test "$external_ortp" = 'false'; then
537        if test -e $srcdir/../oRTP/include/ortp/ortp.h ; then
538                echo "building from linphone source tree, using ../oRTP/include/ortp/ortp.h"
539                ORTP_CFLAGS="-I\$(top_srcdir)/../oRTP/include"
540                ORTP_LIBS="\$(top_builddir)/../oRTP/src/libortp.la"
541                if test x$ac_cv_c_bigendian = xyes ; then
542                        ORTP_CFLAGS="$ORTP_CFLAGS -DORTP_BIGENDIAN"
543                fi
544        else
545                external_ortp=true
546        fi
547fi
548if test "$external_ortp" = 'true'; then
549        PKG_CHECK_MODULES(ORTP, ortp >= 0.9.0, ,
550                [ AC_MSG_ERROR([Couldn't find ortp library]) ] )
551fi
552AC_SUBST(ORTP_CFLAGS)
553AC_SUBST(ORTP_LIBS)
554
555
556dnl check dlopen support in headers and libraries, so that we can use mediastreamer plugins
557AC_CHECK_HEADERS(dlfcn.h)
558have_dlopen=false
559AC_CHECK_LIB(dl,dlopen,[LIBS="$LIBS -ldl"; have_dlopen=true])
560AC_CHECK_FUNC(dlopen,[have_dlopen=true])
561if test "$have_dlopen" = "true" ; then
562        AC_DEFINE(HAVE_DLOPEN,1,[Defined if dlopen() is availlable])
563fi
564
565dnl check various things
566AC_FUNC_ALLOCA
567
568if test "x${prefix}" = "xNONE"; then
569        package_prefix=${ac_default_prefix}
570else
571        package_prefix=${prefix}
572fi
573
574if test x$mingw_found = xyes ; then
575        package_prefix="."
576fi
577
578dnl define path of plugins:
579AC_DEFINE_UNQUOTED(PACKAGE_PLUGINS_DIR, "${package_prefix}/lib/mediastreamer/plugins" ,[path of plugins])
580PACKAGE_PLUGINS_DIR="${package_prefix}/lib/mediastreamer/plugins"
581AC_SUBST(PACKAGE_PLUGINS_DIR)
582
583PACKAGE_DATA_DIR="$prefix/share"
584AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR,  "${package_prefix}/share" ,[path of data])
585AC_SUBST(PACKAGE_DATA_DIR)
586
587dnl check for video4linux headers
588AC_CHECK_HEADERS(linux/videodev.h linux/videodev2.h)
589if test "${ac_cv_header_linux_videodev_h}" = "yes" || \
590        test "${ac_cv_header_linux_videodev2_h}" = "yes" ; then
591        found_v4l=yes
592else
593        found_v4l=no
594fi
595
596AM_CONDITIONAL(BUILD_V4L, test x$found_v4l = xyes )
597
598AC_ARG_ENABLE(libv4l,
599      [  --disable-libv4l    Disable usage of libv4l, really discouraged],
600      [case "${enableval}" in
601        yes) libv4l=yes ;;
602        no)  libv4l=no ;;
603        *) AC_MSG_ERROR(bad value ${enableval} for --disable-libv4l) ;;
604      esac],[libv4l=yes])
605
606PKG_CHECK_MODULES(LIBV4L2, libv4l2,
607        [AC_DEFINE(HAVE_LIBV4L2,1,[Defined if we have libv4l2])
608        have_libv4l2=yes]
609        ,[echo "No libv4l2 found."]
610)
611PKG_CHECK_MODULES(LIBV4L1, libv4l1,
612        [AC_DEFINE(HAVE_LIBV4L1,1,[Defined if we have libv4l1])
613        have_libv4l1=yes]
614        ,[echo "No libv4l1 found."]
615)
616
617if test "$found_v4l" = "yes" && test "$have_libv4l2" != "yes" ; then
618        if test "$video" = "true" && test "$libv4l" = "yes" ; then
619                AC_MSG_ERROR(
620[
621Missing libv4l2. It is highly recommended to build with
622libv4l2 headers and library. Many camera will won't work or will crash
623your application if libv4l2 is not installed.
624If you know what you are doing, you can use --disable-libv4l to disable
625this check.
626])
627        fi
628fi
629
630dnl ##################################################
631dnl # Check for doxygen
632dnl ##################################################
633
634AC_PATH_PROG(DOXYGEN,doxygen,false)
635AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
636
637
638dnl ##################################################
639dnl # Check for ESP Packager
640dnl ##################################################
641
642AC_PATH_PROG(EPM,epm,false)
643AC_PATH_PROG(MKEPMLIST,mkepmlist,false)
644AC_PATH_PROG(EPMINSTALL,epminstall,false)
645AM_CONDITIONAL(WITH_EPM,test $EPM != false && test $MKEPMLIST != false && test $EPMINSTALL != false)
646
647
648# Preferred packaging system, as per EPM terminology
649case $target in
650*-*-linux*)
651        if test -f /etc/debian_version ; then
652                EPM_PKG_EXT=deb
653        else
654                EPM_PKG_EXT=rpm
655        fi
656        ;;
657*-hp-hpux*)
658        EPM_PKG_EXT=depot.gz;;
659*-dec-osf*)
660        EPM_PKG_EXT=setld;;
661esac
662AC_SUBST(EPM_PKG_EXT)
663
664# System software User & Group names
665case $target in
666*-*-linux*)
667        SYS_USER=root
668        SYS_GROUP=root
669        ;;
670*-*-hpux*|*-dec-osf*)
671        SYS_USER=bin
672        SYS_GROUP=bin
673        ;;
674esac
675AC_SUBST(SYS_USER)
676AC_SUBST(SYS_GROUP)
677
678# CPU Architecture
679case $target_cpu in
680i?86)           ARCH=i386;;
681*)              ARCH=$target_cpu;;
682esac
683AC_SUBST(ARCH)
684
685# Various other packaging variables, that can be over-ridden ad `make
686# package' time
687SUMMARY="A mediastreaming library."
688AC_SUBST(SUMMARY)
689PACKAGER=anonymous
690AC_SUBST(PACKAGER)
691LICENSE=GPL
692AC_SUBST(LICENSE)
693VENDOR=Linphone
694AC_SUBST(VENDOR)
695RELEASE=1
696AC_SUBST(RELEASE)
697
698CFLAGS="$CFLAGS $MS_PUBLIC_CFLAGS"
699CXXFLAGS="$CXXFLAGS $MS_PUBLIC_CFLAGS"
700dnl: these ones gets exported in pkgconfig file.
701AC_SUBST(MS_PUBLIC_CFLAGS)
702
703AC_OUTPUT(
704Makefile
705include/Makefile
706include/mediastreamer2/Makefile
707src/Makefile
708tests/Makefile
709build/Makefile
710build/win32native/Makefile
711build/win32-novideo/Makefile
712build/wince/Makefile
713build/winmob/Makefile
714mediastreamer.pc
715mediastreamer2.spec
716help/Makefile
717help/Doxyfile
718help/doxygen.dox
719)
Note: See TracBrowser for help on using the repository browser.