Update symbols
[opal/cbnco.git] / configure.ac
bloba8c3ba54a02e2b0914b1864aeb87589ae8467f04
1 AC_INIT(include/opal/manager.h)
3 AC_PROG_CC
4 AC_PROG_CXX
6 h323=yes
7 t38=yes
8 h224=yes
9 h450=yes
10 h460=yes
11 sip=yes
12 iax=yes
13 audio=yes
14 video=yes
16 dnl this must be updated for every minor revision, and for
17 dnl builds when and as necessary
18 REQUIRED_PWLIB_MAJOR=1
19 REQUIRED_PWLIB_MINOR=11
20 REQUIRED_PWLIB_BUILD=0
22 dnl ########################################################################
23 dnl set the OPAL directory to the current directory
25 OPALDIR=`pwd`
26 AC_SUBST(OPALDIR)
28 dnl ########################################################################
29 dnl set the PREFIX accordingly
30 if test "x$prefix" = "xNONE"; then
31    INSTALLPREFIX="/usr/local"
32 else
33    INSTALLPREFIX="${prefix}"
36 AC_SUBST(INSTALLPREFIX)
38 dnl ########################################################################
39 dnl set LIBDIR accordingly
40 LIBDIR="${libdir}"
42 AC_SUBST(LIBDIR)
44 dnl ########################################################################
45 dnl extract the OPAL version
47 dnl MSWIN_DISPLAY version,Version
48 dnl MSWIN_VERSION version,OPAL_MAJOR=MAJOR_VERSION
49 dnl MSWIN_VERSION version,OPAL_MINOR=MINOR_VERSION
50 dnl MSWIN_VERSION version,OPAL_BUILD=BUILD_NUMBER
51 dnl MSWIN_VERSION version,OPAL_VERSION=VERSION
53 MAJOR_VERSION=`cat ${OPALDIR}/version.h | grep MAJOR_VERSION | cut -f3 -d' '`
54 MINOR_VERSION=`cat ${OPALDIR}/version.h | grep MINOR_VERSION | cut -f3 -d' '`
55 BUILD_NUMBER=`cat ${OPALDIR}/version.h | grep BUILD_NUMBER | cut -f3 -d' '`
56 OPAL_VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${BUILD_NUMBER}"
57 AC_DEFINE_UNQUOTED(OPAL_MAJOR,   ${MAJOR_VERSION})
58 AC_DEFINE_UNQUOTED(OPAL_MINOR,   ${MINOR_VERSION})
59 AC_DEFINE_UNQUOTED(OPAL_BUILD,   ${BUILD_NUMBER})
60 AC_DEFINE_UNQUOTED(OPAL_VERSION, "$OPAL_VERSION")
62 AC_MSG_NOTICE(Opal version is ${OPAL_VERSION});
64 #use to set the version in opal.pc
65 AC_SUBST(OPAL_VERSION)
67 dnl ########################################################################
68 dnl look for ptlib, use a preference order of explicit PWLIBDIR, directory
69 dnl at same level, home directory, /usr/local or /usr.
71 if test "${PWLIBDIR:-unset}" != "unset" ; then
72   AC_CHECK_FILE(${PWLIBDIR}/version.h, HAS_PTLIB=1)
74 if test "${HAS_PTLIB:-unset}" = "unset" ; then
75   AC_CHECK_FILE(${OPALDIR}/../pwlib/version.h, HAS_PTLIB=1)
76   if test "${HAS_PTLIB:-unset}" != "unset" ; then
77     PWLIBDIR="${OPALDIR}/../pwlib"
78   else
79     AC_CHECK_FILE(${HOME}/pwlib/include/ptlib.h, HAS_PTLIB=1)
80     if test "${HAS_PTLIB:-unset}" != "unset" ; then
81       PWLIBDIR="${HOME}/pwlib"
82     else
83       AC_CHECK_FILE(/usr/local/include/ptlib.h, HAS_PTLIB=1)
84       if test "${HAS_PTLIB:-unset}" != "unset" ; then
85         AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin)
86       else
87         AC_CHECK_FILE(/usr/include/ptlib.h, HAS_PTLIB=1)
88         if test "${HAS_PTLIB:-unset}" != "unset" ; then
89           AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/share/pwlib/make/)
90         else
91           AC_CHECK_FILE(${prefix}/include/ptlib.h, HAS_PTLIB=1)
92           if test "${HAS_PTLIB:-unset}" != "unset" ; then
93             AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , ${prefix}/bin)
94           fi
95         fi
96       fi
97     fi
98   fi
101 if test "${HAS_PTLIB:-unset}" = "unset" ; then
102   AC_MSG_ERROR("Cannot find pwlib - please install or set PWLIBDIR and try again")
105 if test "${PWLIBDIR:-unset}" = "unset" ; then
106   if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
107     AC_MSG_ERROR("Cannot find ptlib-config - please install and try again")
108   fi
109   PWLIBDIR=`$PTLIB_CONFIG --prefix`
112 if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then
113   PWLIBDIR="/usr/share/pwlib/"
115 if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then
116   PWLIBDIR="/usr/local/share/pwlib/"
118 if test "x$PWLIBDIR" = "x${prefix}"; then
119   PWLIBDIR="${prefix}/share/pwlib/"
121 AC_SUBST(PWLIBDIR)
123 echo "PWLib prefix set to.... $PWLIBDIR"
125 if test "${PWLIBDIR:-unset}" = "unset" ; then
126   PWVERSION=`$PTLIB_CONFIG --version`
127   PW_MAJOR_VERSION=`echo $PW_VERSION | cut -d'.' -f1`
128   PW_MINOR_VERSION=`echo $PW_VERSION | cut -d'.' -f2`
129   PW_BUILD_NUMBER=`echo $PW_VERSION | cut -d'.' -f3`
130   
131 else
132   PW_MAJOR_VERSION=`cat ${PWLIBDIR}/version.h | grep MAJOR_VERSION | cut -f3 -d' '`
133   PW_MINOR_VERSION=`cat ${PWLIBDIR}/version.h | grep MINOR_VERSION | cut -f3 -d' '`
134   PW_BUILD_NUMBER=`cat ${PWLIBDIR}/version.h | grep BUILD_NUMBER | cut -f3 -d' '`
135   PWVERSION="${PW_MAJOR_VERSION}.${PW_MINOR_VERSION}.${PW_BUILD_NUMBER}"
138 AC_ARG_ENABLE(versioncheck,
139                 [  --disable-versioncheck    disable PWLib version check],
140                 PWLIB_VERSION_CHECK=$enableval)
142 AC_MSG_CHECKING(Checking PWLib version ${PWVERSION})
143 if test "${PWLIB_VERSION_CHECK}x" = "nox" ; then
144   AC_MSG_RESULT(check disabled)
145 else
146   if test $PW_MAJOR_VERSION -lt $REQUIRED_PWLIB_MAJOR ; then
147     AC_MSG_ERROR(Major version less than required $REQUIRED_PWLIB_MAJOR)
148   fi
149   if test $PW_MINOR_VERSION -lt $REQUIRED_PWLIB_MINOR ; then
150     AC_MSG_ERROR(Minor version less than required $REQUIRED_PWLIB_MINOR)
151   fi
152   if test $PW_BUILD_NUMBER -lt $REQUIRED_PWLIB_BUILD ; then
153     AC_MSG_ERROR(Build version less than required $REQUIRED_PWLIB_BUILD)
154   fi
155   AC_MSG_RESULT(ok)
158 AC_SUBST(PWLIBDIR)
160 dnl ########################################################################
161 dnl get the gcc version
163 if test x$GXX = xyes ; then
164   USE_GCC=yes
165   gcc_version=`$CXX -dumpversion`
166   AC_MSG_NOTICE(gcc version is $gcc_version);
167   GXX_MAJOR=`echo $gcc_version | sed 's/\..*$//'`
168   GXX_MINOR=[`echo $gcc_version | sed -e 's/[0-9][0-9]*\.//' -e 's/\..*$//'`]
169   GXX_PATCH=[`echo $gcc_version | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\.//' -e 's/\..*$//'`]
171   dnl cannot compile for less than gcc 3
172   AC_MSG_CHECKING(checking if gcc version is valid)
173   if test ${GXX_MAJOR} -lt 3 ; then
174     AC_MSG_RESULT(no)
175     AC_MSG_ERROR([OPAL requires gcc version 3 or later])
176   else
177     AC_MSG_RESULT(yes)
178   fi
182 dnl ########################################################################
183 dnl Look for system libspeex
184 localspeex="xxx"
185 AC_ARG_ENABLE(localspeex,
186        [  --enable-localspeex     use local version of Speex library rather than system version],
187        localspeex=$enableval)
189 AC_CHECK_SIZEOF(short)
190 AC_CHECK_SIZEOF(int)
191 AC_CHECK_SIZEOF(long)
192 AC_CHECK_SIZEOF(long long)
194 case 2 in
195         $ac_cv_sizeof_short) SIZE16="short";;
196         $ac_cv_sizeof_int) SIZE16="int";;
197 esac
199 case 4 in
200         $ac_cv_sizeof_int) SIZE32="int";;
201         $ac_cv_sizeof_long) SIZE32="long";;
202         $ac_cv_sizeof_short) SIZE32="short";;
203 esac
205 AC_SUBST(SIZE16)
206 AC_SUBST(SIZE32)
208 OPAL_HAVE_SPEEX_H=
209 OPAL_HAVE_SPEEX_SPEEX_H=
210 AC_CHECK_HEADERS("speex.h", OPAL_HAVE_SPEEX_H=1)
211 if test "${OPAL_HAVE_SPEEX_H}x" != "x" ; then
212   AC_DEFINE(OPAL_HAVE_SPEEX_H)
213 else
214   AC_CHECK_HEADERS("speex/speex.h", OPAL_HAVE_SPEEX_SPEEX_H=1)
215   if test "${OPAL_HAVE_SPEEX_SPEEX_H}x" != "x" ; then
216     AC_DEFINE(OPAL_HAVE_SPEEX_SPEEX_H)
217   fi
220 if test "${localspeex}" = "yes" ; then
221   AC_MSG_NOTICE(Forcing use of OPAL Speex sources)
222 elif test "${localspeex}" = "no" ; then
223   AC_MSG_NOTICE(Forcing use of system Speex library)
224   AC_DEFINE(OPAL_SYSTEM_SPEEX, 1)
225   AC_SUBST(OPAL_SYSTEM_SPEEX, 1)
226 else
227   AC_CHECK_LIB(speex, speex_encoder_destroy, SPEEX=1)
228   if test "${SPEEX}x" != "x" ; then
229     AC_CHECK_LIB(speex, speex_encode_int, SPEEX=1, unset SPEEX)
230   fi
231   if test "x$SPEEX" = "x" -o \( "${OPAL_HAVE_SPEEX_H}x" = "x" -a "${OPAL_HAVE_SPEEX_SPEEX_H}x" = "x" \); then
232     AC_MSG_NOTICE(Forcing use of OPAL Speex library)
233   else
234     AC_MSG_CHECKING(system Speex version)
235     if test "${OPAL_HAVE_SPEEX_H}x" != "x" ; then
236       echo "#include <speex.h>" > t.c 
237       echo "#include <speex_header.h>" >> t.c
238     else
239       echo "#include <speex/speex.h>" > t.c 
240       echo "#include <speex/speex_header.h>" >> t.c
241     fi
242     cat >> t.c <<C_FILE
243     #include <stdio.h>
244     int main(int argc,char *argv[])
245     {
246       SpeexHeader header;
247       speex_init_header(&header, 1, 1, &speex_nb_mode);
248       printf("%s\n", header.speex_version);
249     }
250 C_FILE
251     cc -o t t.c -lspeex > /dev/null 2>&1
252     if test \! -x t ; then
253       AC_MSG_RESULT(cannot determine - using OPAL version)
254     else
255       SYSVER=`./t`
256       AC_MSG_RESULT($SYSVER)
257       AC_MSG_CHECKING(library Speex version)
258       LIBVER=`grep "#define SPEEX_VERSION" ./src/codec/speex/libspeex/misc.h | sed -e 's/^.*[Ss][Pp][Ee][Ee][Xx]\-//' -e 's/\"//' -e 's/\/.*//'`
259       AC_MSG_RESULT($LIBVER)
260       AC_MSG_CHECKING(Speex versions)
261       cat > t.pl <<P_FILE
262       [
263       \$sysver = @ARGV[0];
264       \$libver = @ARGV[1];
265       @lib = split /\./, \$libver;
266       while (@lib < 3) {
267         @lib[0+@lib] = "0";
268       }
269       @sys = split /\./, \$sysver;
270       while (@sys < 3) {
271         @sys[0+@sys] = "0";
272       }
273       \$i = 0;
274       while (\$i < 3) {
275         if (@sys[\$i] < @lib[\$i]) {
276           print "0";
277           die;
278         }
279         \$i++;
280       }
281       print "1";
282       ]
283 P_FILE
284       SPEEX=`perl t.pl $SYSVER $LIBVER`
285       rm t.pl
286       if test "x$SPEEX" = "x0" ; then
287         AC_MSG_RESULT(OPAL version is more recent)
288       else
289         AC_MSG_RESULT(system version is more recent)
290         AC_DEFINE(OPAL_SYSTEM_SPEEX, 1)
291         AC_SUBST(OPAL_SYSTEM_SPEEX, 1)
292         AC_MSG_CHECKING(Speex noise type)
293         if test "${OPAL_HAVE_SPEEX_H}x" != "x" ; then
294           echo "#include <speex.h>" > t.c
295           echo "#include <speex_preprocess.h>" >> t.c
296         else
297           echo "#include <speex/speex.h>" > t.c
298           echo "#include <speex/speex_preprocess.h>" >> t.c
299         fi
300         cat >> t.c <<C_FILE
301           #include <stdio.h>
302           int main(int argc,char *argv[])
303           {
304              struct SpeexPreprocessState *st;
305              spx_int16_t *x;
306              float *echo;
307              speex_preprocess(st, x, echo);
308           }
309 C_FILE
310         rm -f t
311         cc -Werror -o t t.c -lspeex > /dev/null 2>&1
312         if test \! -x t ; then
313           AC_MSG_RESULT(spx_int32_t)
314         else
315           AC_MSG_RESULT(float)
316           AC_DEFINE(OPAL_SPEEX_FLOAT_NOISE)
317         fi
318       fi
319     fi
320     rm -f t t.c
321   fi
324 AC_SUBST(OPAL_HAVE_SPEEX_SPEEX_H)
326 dnl ########################################################################
327 dnl enable audio, video, SIP, H.323 and IAX
329 dnl MSWIN_DISPLAY audio,Audio
330 dnl MSWIN_DEFINE  audio,OPAL_AUDIO
332 AC_ARG_ENABLE(audio,
333        [  --disable-audio         disable audio codec support],
334        audio=$enableval)
335 AC_MSG_CHECKING(audio codec support)
336 if test "$audio" = "yes" ; then
337   AC_SUBST(OPAL_AUDIO, 1)
338   AC_DEFINE(OPAL_AUDIO)
339   AC_MSG_RESULT(enabled)
340 else
341   AC_MSG_RESULT(disabled)
345 dnl MSWIN_DISPLAY video,Video
346 dnl MSWIN_DEFINE  video,OPAL_VIDEO
349 AC_ARG_ENABLE(video,
350        [  --disable-video         disable video codec support],
351        video=$enableval)
352 AC_MSG_CHECKING(video device support)
353 if test "$video" = "yes" ; then
354   AC_SUBST(OPAL_VIDEO, 1)
355   AC_DEFINE(OPAL_VIDEO)
356   AC_MSG_RESULT(enabled)
357 else
358   AC_MSG_RESULT(disabled)
362 dnl MSWIN_DISPLAY sip,SIP support
363 dnl MSWIN_DEFINE  sip,OPAL_SIP
365 AC_ARG_ENABLE(sip,
366        [  --disable-sip           disable SIP protocol support],
367        sip=$enableval)
368 AC_MSG_CHECKING(SIP protocol)
369 if test "$sip" = "yes" ; then
370   AC_SUBST(OPAL_SIP, 1)
371   AC_DEFINE(OPAL_SIP)
372   AC_MSG_RESULT(enabled)
373 else
374   AC_MSG_RESULT(disabled)
378 dnl MSWIN_DISPLAY h323,H.323 support
379 dnl MSWIN_DEFINE  h323,OPAL_H323
381 AC_ARG_ENABLE(h323,
382        [  --disable-h323          disable H.323 protocol support],
383        h323=$enableval)
384 AC_MSG_CHECKING(H.323 protocol)
385 if test "$h323" = "yes" ; then
386   AC_SUBST(OPAL_H323, 1)
387   AC_DEFINE(OPAL_H323)
388   AC_MSG_RESULT(enabled)
389 else
390   AC_SUBST(OPAL_H323, 0)
391   AC_MSG_RESULT(disabled (T.38, H.224, H.460 also disabled))
392   h224=no
393   h460=no
395 AC_SUBST(OPAL_H323, $OPAL_H323)
397 dnl ########################################################################
399 dnl IAX
401 dnl MSWIN_DISPLAY iax2,IAX2 support
402 dnl MSWIN_DEFINE  iax2,OPAL_IAX2
404 AC_ARG_ENABLE(iax,
405        [  --disable-iax           disable IAX2 protocol support],
406        iax=$enableval)
407 AC_MSG_CHECKING(IAX2 protocol)
408 if test "$iax" = "yes" ; then
409   AC_SUBST(OPAL_IAX2, 1)
410   AC_DEFINE(OPAL_IAX2)
411   AC_MSG_RESULT(enabled)
412 else
413   AC_MSG_RESULT(disabled)
416 dnl ########################################################################
418 dnl H.224
420 dnl MSWIN_DISPLAY h224,H.224 support
421 dnl MSWIN_DEFINE  h224,OPAL_H224
423 AC_ARG_ENABLE(h224,
424                 [  --disable-h224          disable H.224 protocol support],
425                 h224=$enableval)
426 AC_MSG_CHECKING(H224 protocol)
427 if test "$h224" = "yes" ; then
428   AC_SUBST(OPAL_H224, 1)
429   AC_DEFINE(OPAL_H224)
430   AC_MSG_RESULT(enabled)
431 else
432   AC_MSG_RESULT(disabled)
435 dnl ########################################################################
437 dnl T.38
439 dnl MSWIN_DISPLAY    t38,T.38
440 dnl MSWIN_DEFINE     t38,OPAL_T38FAX
442 if test "$t38" = "yes" ; then
443   AC_ARG_ENABLE(t38,
444          [  --disable-t38           disable T.38 protocol support],
445          t38=$enableval)
446   AC_MSG_CHECKING(T.38 protocol)
447   if test "$t38" = "yes" ; then
448     AC_SUBST(OPAL_T38FAX, 1)
449     AC_DEFINE(OPAL_T38FAX)
450     AC_MSG_RESULT(enabled)
451   else
452     AC_MSG_RESULT(disabled)
453   fi
457 dnl ########################################################################
459 dnl H.450
461 dnl MSWIN_DISPLAY    h450,H.450
462 dnl MSWIN_DEFINE     h450,OPAL_H450
463 dnl MSWIN_IF_FEATURE h450,h323
465 OPAL_450=
466 if test "$h450" = "yes" ; then
467   AC_ARG_ENABLE(h450,
468          [  --disable-h450          disable H.450],
469          h450=$enableval)
470   AC_MSG_CHECKING(H.450 support)
471   if test "$h450" = "yes" ; then
472     AC_SUBST(OPAL_H450, 1)
473     AC_DEFINE(OPAL_H450)
474     AC_MSG_RESULT(enabled)
475   else
476     AC_MSG_RESULT(disabled)
477   fi
481 dnl ########################################################################
483 dnl H.460
485 dnl MSWIN_DISPLAY    h460,H.460
486 dnl MSWIN_DEFINE     h460,OPAL_H460
487 dnl MSWIN_IF_FEATURE h460,h323
489 OPAL_460=
490 if test "$h460" = "yes" ; then
491   AC_ARG_ENABLE(h460,
492          [  --disable-h460          disable H.460],
493          h460=$enableval)
494   AC_MSG_CHECKING(H.460 support)
495   if test "$h460" = "yes" ; then
496     AC_SUBST(OPAL_H460, 1)
497     AC_DEFINE(OPAL_H460)
498     AC_MSG_RESULT(enabled)
499   else
500     AC_MSG_RESULT(disabled)
501   fi
505 dnl ########################################################################
507 dnl LID, used for vpb, dialogic etc ...
509 dnl MSWIN_DISPLAY lids,Line Interface Device
510 dnl MSWIN_DEFINE  lids,OPAL_LID
512 OPAL_LID=
513 lid=yes
514 if test "$lid" = "yes" ; then
515   AC_ARG_ENABLE(lid,
516          [  --disable-lid           disable LID support],
517          lid=$enableval)
518   AC_MSG_CHECKING(LID support)
519   if test "$lid" = "yes" ; then
520     AC_DEFINE(OPAL_LID, 1)
521     OPAL_LID=1
522     AC_MSG_RESULT(enabled)
523   else
524     AC_MSG_RESULT(disabled)
525   fi
527 AC_SUBST(OPAL_LID)
529 dnl ########################################################################
531 dnl IVR
533 dnl MSWIN_DISPLAY ivr,IVR support
534 dnl MSWIN_DEFINE  ivr,OPAL_IVR
536 OPAL_ivr=
537 ivr=yes
538 if test "$ivr" = "yes" ; then
539   AC_ARG_ENABLE(ivr,
540          [  --disable-ivr           disable IVR support],
541          ivr=$enableval)
542   AC_MSG_CHECKING(IVR support)
543   if test "$ivr" = "yes" ; then
544     AC_DEFINE(OPAL_IVR, 1)
545     OPAL_IVR=1
546     AC_MSG_RESULT(enabled)
547   else
548     AC_MSG_RESULT(disabled)
549   fi
551 AC_SUBST(OPAL_IVR)
556 dnl ########################################################################
558 dnl ZRTP from Phil Zimmermann
559 dnl 
561 dnl MSWIN_DISPLAY     libzrtp,ZRTP/SRTP support
562 dnl MSWIN_CHECK_FILE  libzrtp,include\zrtp_types.h,HAS_LIBZRTP=1
563 dnl MSWIN_DIR_SYMBOL  libzrtp,LIBZRTP_DIR
564 dnl MSWIN_CHECK_DIR   libsrtp,.\srtp_win32k
565 dnl MSWIN_CHECK_DIR   libzrtp,.\zrtp
566 dnl MSWIN_CHECK_DIR   libzrtp,..\external\zrtp
567 dnl MSWIN_CHECK_DIR   libzrtp,c:\libs
569 HAS_LIBZRTP=
570 dnl AC_MSG_CHECKING(for libZRTP)
571 dnl AC_TRY_COMPILE([#include "srtp/srtp.h"],
572 dnl  [int main(int argc, char *argv[]) { crypto_policy_t p; p.cipher_key_len = SRTP_MASTER_KEY_LEN; return 0; }],
573 dnl  HAS_LIBSRTP=1)
574 dnl if test "${HAS_LIBSRTP}" = "1" ; then
575 dnl   AC_MSG_RESULT(yes)
576 dnl   AC_DEFINE(HAS_LIBSRTP, 1)
577 dnl   HAS_LIBSRTP=1
578 dnl   OPAL_SRTP=1
579 dnl else
580 dnl   AC_MSG_RESULT(no)
581 dnl fi
582 AC_SUBST(OPAL_ZRTP)
583 AC_SUBST(HAS_LIBZRTP)
586 dnl ########################################################################
588 dnl Cisco libSRTP
589 dnl 
591 dnl MSWIN_DISPLAY     libsrtp,Cisco libSRTP support
592 dnl MSWIN_IF_FEATURE  libsrtp,!libzrtp
593 dnl MSWIN_CHECK_FILE  libsrtp,include\srtp.h,HAS_LIBSRTP=1
594 dnl MSWIN_DIR_SYMBOL  libsrtp,LIBSRTP_DIR
595 dnl MSWIN_CHECK_DIR   libsrtp,.\srtp
596 dnl MSWIN_CHECK_DIR   libsrtp,..\external\srtp
597 dnl MSWIN_CHECK_DIR   libsrtp,c:\libs
599 HAS_LIBSRTP=
600 AC_MSG_CHECKING(for libSRTP)
601 AC_TRY_COMPILE([#include "srtp/srtp.h"],
602  [int main(int argc, char *argv[]) { crypto_policy_t p; p.cipher_key_len = SRTP_MASTER_KEY_LEN; return 0; }],
603  HAS_LIBSRTP=1)
604 if test "${HAS_LIBSRTP}" = "1" ; then
605   AC_MSG_RESULT(yes)
606   AC_DEFINE(HAS_LIBSRTP, 1)
607   HAS_LIBSRTP=1
608   OPAL_SRTP=1
609 else
610   AC_MSG_RESULT(no)
612 AC_SUBST(OPAL_SRTP)
613 AC_SUBST(HAS_LIBSRTP)
614 dnl ########################################################################
615 dnl output make directives
617 AC_SUBST(STDCCFLAGS)
618 AC_SUBST(LDFLAGS)
619 AC_SUBST(ENDLDLIBS)
620 AC_PROG_INSTALL
622 dnl ########################################################################
623 dnl Output configured files
625 AC_CONFIG_SUBDIRS(plugins)
627 dnl ########################################################################
628 dnl output header file
630 AC_CONFIG_FILES(opal_inc.mak)
631 AC_CONFIG_FILES(Makefile)
632 AC_CONFIG_HEADERS(include/opal/buildopts.h)
633 AC_CONFIG_FILES(opal.pc)
634 AC_CONFIG_FILES(opal.spec)
635 AC_CONFIG_FILES(opal_cfg.dxy)
637 AC_OUTPUT(src/codec/speex/libspeex/speex_config_types.h)