6 dnl ########################################################################
7 dnl set the PREFIX accordingly
8 if test "x$prefix" = "xNONE"; then
9 INSTALLPREFIX="/usr/local"
11 INSTALLPREFIX="${prefix}"
14 AC_SUBST(INSTALLPREFIX)
17 dnl ########################################################################
18 dnl set LIBDIR accordingly
23 dnl ########################################################################
27 solaris*) LDSO="-Bdynamic -G -h" ;;
29 *) LDSO="-shared -Wl,-soname,";;
31 AC_SUBST(LDSO, ${LDSO})
33 dnl ########################################################################
34 dnl look for amr-nb_float
36 H323_GSMAMR_NB_FLOAT=0
37 if test -r "./audio/gsm-amr/src/interf_dec.h" ; then
38 AC_MSG_NOTICE(Enabling GSM-AMR plugin)
39 H323_GSMAMR_NB_FLOAT=1
41 AC_MSG_NOTICE(GSM-AMR plugin disabled (no 3GPP source))
43 AC_SUBST(H323_GSMAMR_NB_FLOAT, $H323_GSMAMR_NB_FLOAT)
46 dnl ########################################################################
47 dnl Look for system GSM
49 dnl Note that we can only use llibgsm if it is compiled with WAV49
54 AC_ARG_ENABLE(localgsm,
55 [ --enable-localgsm use local version of GSM library rather than system version],
58 if test "${localgsm}" = "yes" ; then
59 AC_MSG_NOTICE(Forcing use of local GSM sources)
60 elif test "${localgsm}" = "no" ; then
61 AC_MSG_NOTICE(Forcing use of system GSM library)
64 AC_CHECK_LIB(gsm, gsm_create, GSM=1)
65 if test "x$GSM" != "x"; then
66 AC_MSG_CHECKING(if system GSM library has WAV49)
74 gsm handle = gsm_create();
75 return (gsm_option(handle, GSM_OPT_WAV49, &option) == -1) ? 1 : 0;
77 if test "x$GSM" == "x2"; then
80 AC_MSG_NOTICE(Using system gsm)
87 AC_SUBST(H323_SYSTEM_GSM, $H323_SYSTEM_GSM)
88 AC_DEFINE_UNQUOTED(H323_SYSTEM_GSM, $H323_SYSTEM_GSM)
90 dnl ########################################################################
91 dnl Look for system libspeex
93 AC_CHECK_SIZEOF(short)
96 AC_CHECK_SIZEOF(long long)
99 $ac_cv_sizeof_short) SIZE16="short";;
100 $ac_cv_sizeof_int) SIZE16="int";;
104 $ac_cv_sizeof_int) SIZE32="int";;
105 $ac_cv_sizeof_long) SIZE32="long";;
106 $ac_cv_sizeof_short) SIZE32="short";;
114 AC_ARG_ENABLE(localspeex,
115 [ --enable-localspeex use local version of Speex library rather than system version],
116 localspeex=$enableval)
118 if test "${localspeex}" = "yes" ; then
119 AC_MSG_NOTICE(Forcing use of local Speex sources)
120 elif test "${localspeex}" = "no" ; then
121 AC_MSG_NOTICE(Forcing use of system Speex library)
122 AC_DEFINE(H323_SYSTEM_SPEEX, 1)
123 AC_SUBST(H323_SYSTEM_SPEEX, 1)
125 AC_CHECK_LIB(speex, speex_encoder_destroy, SPEEX=1)
126 if test "x$SPEEX" = "x"; then
127 AC_MSG_NOTICE(Forcing use of local Speex library)
129 AC_MSG_CHECKING(system Speex version)
132 #include <speex_header.h>
134 int main(int argc,char *argv[])
137 speex_init_header(&header, 1, 1, &speex_nb_mode);
138 printf("%s\n", header.speex_version);
141 cc -o t t.c -lspeex > /dev/null 2>&1
142 if test \! -x t ; then
143 AC_MSG_RESULT(cannot determine - using library version)
147 AC_MSG_RESULT($SYSVER)
148 AC_MSG_CHECKING(library Speex version)
149 LIBVER=`grep "#define VERSION" ./audio/Speex/libspeex/misc.h | sed -e 's/^.*speex\-//' -e 's/\"//'`
150 AC_MSG_RESULT($LIBVER)
151 AC_MSG_CHECKING(Speex versions)
156 @lib = split /\./, \$libver;
160 @sys = split /\./, \$sysver;
166 #print "comparing " . @sys[\$i] . " and " . @lib[\$i] . "\n";
167 if (\@sys[\$i] < @lib[\$i]) {
176 SPEEX=`perl t.pl $SYSVER $LIBVER`
178 if test "x$SPEEX" = "x" ; then
179 AC_MSG_RESULT(library version is more recent)
181 AC_MSG_RESULT(system version is more recent)
182 AC_DEFINE(H323_SYSTEM_SPEEX, 1)
183 AC_SUBST(H323_SYSTEM_SPEEX, 1)
189 dnl ########################################################################
198 dnl ########################################################################
200 dnl Quicknet xJACK cards
204 AC_CHECK_HEADERS(linux/telephony.h sys/telephony.h /usr/local/include/sys/telephony.h, HAS_IXJ=1)
205 if test "x$HAS_IXJ" != "x" ; then
206 AC_MSG_CHECKING(if ixjuser.h actually compiles)
207 AC_TRY_COMPILE([#include <linux/ixjuser.h>],
208 [int main(int ac,char **av) { return 0; }], HAS_IXJ=1, HAS_IXJ=)
209 if test "x$HAS_IXJ" != "x" ; then
219 dnl ########################################################################
221 dnl VoiceTronics VPB card
227 [ --enable-vpb enable voicetronix vpb],
229 AC_MSG_CHECKING(Voicetronix vpb)
230 if test "$vpb" = "yes" ; then
232 AC_MSG_RESULT(enabled)
234 AC_MSG_RESULT(disabled)
239 dnl ########################################################################
244 AC_CHECK_HEADERS(capi20.h, HAS_CAPI20_H=1)
248 [ --enable-capi enable CAPI],
250 AC_MSG_CHECKING(CAPI)
251 if test "$capi" = "yes" ; then
252 if test "x$HAS_CAPI20_H" != "x" ; then
254 AC_MSG_RESULT(enabled)
256 AC_MSG_RESULT(not available)
259 AC_MSG_RESULT(disabled)
264 dnl ########################################################################
266 dnl Sangoma libraries
269 OLD_CPPFLAGS=$CPPFLAGS
273 AC_CHECK_HEADERS(/usr/local/include/libpri.h, HAS_SANGOMA=1)
274 if test "x$HAS_SANGOMA" != "x" ; then
275 AC_CHECK_HEADERS(/usr/local/include/libsangoma.h, HAS_SANGOMA=1)
276 if test "x$HAS_SANGOMA" != "x" ; then
277 AC_CHECK_LIB(pri, pri_new_cb, HAS_SANGOMA=1)
278 if test "x$HAS_SANGOMA" = "x" ; then
279 AC_MSG_NOTICE(*** If the latest libri is installed in /usr/local/lib, ensure it is not obscured by an older version in /usr/lib)
281 AC_CHECK_LIB(sangoma, sangoma_create_socket, HAS_SANGOMA=1)
282 if test "x$HAS_SANGOMA" != "x" ; then
283 AC_DEFINE(HAS_SANGOMA, 1)
289 AC_SUBST(HAS_SANGOMA)
291 CPPFLAGS=$OLD_CPPFLAGS
294 dnl ########################################################################
296 if test -d audio/gsm-amr ; then
297 AC_CONFIG_FILES(audio/gsm-amr/Makefile)
299 if test -d audio/GSM0610 ; then
300 AC_CONFIG_FILES(audio/GSM0610/Makefile)
302 if test -d audio/iLBC ; then
303 AC_CONFIG_FILES(audio/iLBC/Makefile)
305 if test -d audio/Speex ; then
306 AC_CONFIG_FILES(audio/Speex/Makefile)
308 if test -d audio/LPC_10 ; then
309 AC_CONFIG_FILES(audio/LPC_10/Makefile)
311 if test -d audio/G726 ; then
312 AC_CONFIG_FILES(audio/G726/Makefile)
314 if test -d audio/IMA_ADPCM ; then
315 AC_CONFIG_FILES(audio/IMA_ADPCM/Makefile)
317 if test -d video/H.261-vic ; then
318 AC_CONFIG_FILES(video/H.261-vic/Makefile)
320 if test -d video/H.263-ffmpeg ; then
321 AC_CONFIG_FILES(video/H.263-ffmpeg/Makefile)
323 if test -d LID/IxJ ; then
324 AC_CONFIG_FILES(LID/IxJ/Makefile)
326 if test -d LID/VPB ; then
327 AC_CONFIG_FILES(LID/VPB/Makefile)
329 if test -d LID/CAPI ; then
330 AC_CONFIG_FILES(LID/CAPI/Makefile)
333 AC_CONFIG_FILES(Makefile)
335 dnl ########################################################################
338 dnl ########################################################################
339 dnl Output configured files
341 AC_OUTPUT(audio/Speex/libspeex/speex_config_types.h)