1AC_INIT(include/h323.h)
2
3AC_PROG_CXX
4AC_HEADER_STDC
5
6dnl this must be updated for every minor revision, and for
7dnl builds when and as necessary
8REQUIRED_PTLIB_MAJOR=2
9REQUIRED_PTLIB_MINOR=6
10REQUIRED_PTLIB_BUILD=4
11
12dnl ########################################################################
13dnl set the OpenH323 directory to the current directory
14
15OPENH323DIR=`pwd`
16AC_SUBST(OPENH323DIR)
17
18dnl ########################################################################
19dnl set the PREFIX accordingly
20if test "x$prefix" = "xNONE"; then
21   INSTALLPREFIX="/usr/local"
22else
23   INSTALLPREFIX="${prefix}"
24fi
25
26AC_SUBST(INSTALLPREFIX)
27
28
29dnl ########################################################################
30dnl set LIBDIR accordingly
31LIBDIR="${libdir}"
32
33AC_SUBST(LIBDIR)
34
35
36dnl ########################################################################
37dnl extract the OpenH323 version
38
39dnl MSWIN_DISPLAY version,Version
40dnl MSWIN_VERSION version,OPENH323_MAJOR=MAJOR_VERSION
41dnl MSWIN_VERSION version,OPENH323_MINOR=MINOR_VERSION
42dnl MSWIN_VERSION version,OPENH323_BUILD=BUILD_NUMBER
43dnl MSWIN_VERSION version,OPENH323_VERSION=VERSION
44
45MAJOR_VERSION=`cat ${OPENH323DIR}/version.h | grep MAJOR_VERSION | cut -f3 -d' '`
46MINOR_VERSION=`cat ${OPENH323DIR}/version.h | grep MINOR_VERSION | cut -f3 -d' '`
47BUILD_NUMBER=`cat ${OPENH323DIR}/version.h | grep BUILD_NUMBER | cut -f3 -d' '`
48OPENH323_VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${BUILD_NUMBER}"
49AC_SUBST(MAJOR_VERSION)
50AC_SUBST(MINOR_VERSION)
51AC_SUBST(BUILD_NUMBER)
52AC_SUBST(OPENH323_VERSION)
53AC_SUBST(MAJOR_VERSION, $MAJOR_VERSION)
54AC_SUBST(MINOR_VERSION, $MINOR_VERSION)
55AC_SUBST(BUILD_NUMBER, $BUILD_NUMBER)
56
57echo "OpenH323 version is ${OPENH323_VERSION}"
58
59AC_DEFINE_UNQUOTED(OPENH323_MAJOR,   ${MAJOR_VERSION}, [Major version])
60AC_DEFINE_UNQUOTED(OPENH323_MINOR,   ${MINOR_VERSION}, [Minor version])
61AC_DEFINE_UNQUOTED(OPENH323_BUILD,   ${BUILD_NUMBER},  [Build number])
62AC_DEFINE_UNQUOTED(OPENH323_VERSION, "$OPENH323_VERSION", [Full version number])
63
64dnl ########################################################################
65dnl look for ptlib, use a preference order of explicit PTLIBDIR, directory
66dnl at same level, home directory, /usr/local or /usr, pkgconfig.
67
68if test "${PTLIBDIR:-unset}" != "unset" ; then
69  AC_CHECK_HEADER(${PTLIBDIR}/version.h, HAS_PTLIB=1)
70fi
71
72if test "${HAS_PTLIB:-unset}" = "unset" ; then
73  AC_CHECK_HEADER(${OPENH323DIR}/../ptlib/version.h, HAS_PTLIB=1)
74  if test "${HAS_PTLIB:-unset}" != "unset" ; then
75    PTLIBDIR="${OPENH323DIR}/../ptlib"
76  else
77    AC_CHECK_HEADER(${HOME}/ptlib/version.h, HAS_PTLIB=1)
78    if test "${HAS_PTLIB:-unset}" != "unset" ; then
79      PTLIBDIR="${HOME}/ptlib"
80    else
81      if test "${HAS_PTLIB:-unset}" = "unset" ; then
82        AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin:/usr/bin:/opt/local/bin)
83      else
84        if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
85          AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/share/ptlib/make/)
86        else
87          if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
88            AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/share/ptlib/make/)
89          fi
90        fi
91      fi
92    fi
93  fi
94fi
95if test "${PTLIB_CONFIG:-unset}" != "unset" ; then
96  PTLIBDIR=`$PTLIB_CONFIG --prefix`
97  HAS_PTLIB=1
98fi
99
100if test "${HAS_PTLIB:-unset}" = "unset" ; then
101  echo "Cannot find ptlib - please install or set PTLIBDIR and try again"
102  exit
103fi
104
105if test "x$PTLIBDIR" = "x/usr" -o "x$PTLIBDIR" = "x/usr/"; then
106  PTLIBDIR="/usr/share/ptlib/"
107fi
108if test "x$PTLIBDIR" = "x/usr/local" -o "x$PTLIBDIR" = "x/usr/local/"; then
109  PTLIBDIR="/usr/local/share/ptlib/"
110fi
111
112AC_CHECK_FILE(${PTLIBDIR}/make/lib.mak, HAS_PTLIB_LIB_MAK=1)
113
114if test "${HAS_PTLIB_LIB_MAK:-unset}" = "unset" ; then
115  PKG_PROG_PKG_CONFIG
116  PKG_CHECK_MODULES([PTLIB], [ptlib], HAS_PTLIB=1)
117  if test ${HAS_PTLIB}x = 1x; then
118    PTLIBDIR=`${PKG_CONFIG} --variable=prefix ptlib`
119    PTVERSION=`${PKG_CONFIG} --modversion ptlib`
120    target_os=`${PKG_CONFIG} --variable=target_os ptlib`
121    target_cpu=`${PKG_CONFIG} --variable=target_cpu ptlib`
122    PTLIB_CXXFLAGS=`${PKG_CONFIG} --cflags ptlib`
123    PT_LIBDIR=`${PKG_CONFIG} --variable=libdir ptlib`
124    PT_LIBDIR=${PTLIBDIR}
125    PT_MAJOR_VERSION=`echo $PTVERSION | cut -d'.' -f1`
126    PT_MINOR_VERSION=`echo $PTVERSION | cut -d'.' -f2`
127    PT_BUILD_NUMBER=`echo $PTVERSION | cut -d'.' -f3`
128    AC_SUBST(PT_LIBDIR)
129    AC_SUBST(target_os)
130    AC_SUBST(target_cpu)
131    AC_SUBST(PTLIB_CXXFLAGS)
132    AC_SUBST(PT_LIBDIR)
133  fi
134fi
135
136echo "PTLib prefix set to.... $PTLIBDIR"
137
138if test "${PTLIB_CONFIG:-unset}" != "unset" ; then
139  PTVERSION=`$PTLIB_CONFIG --version`
140  PT_MAJOR_VERSION=`echo $PTVERSION | cut -d'.' -f1`
141  PT_MINOR_VERSION=`echo $PTVERSION | cut -d'.' -f2`
142  PT_BUILD_NUMBER=`echo $PTVERSION | cut -d'.' -f3`
143
144elif test "${PTVERSION:-unset}" = "unset" ; then
145  PT_MAJOR_VERSION=`cat ${PTLIBDIR}/version.h | grep MAJOR_VERSION | cut -f3 -d' '`
146  PT_MINOR_VERSION=`cat ${PTLIBDIR}/version.h | grep MINOR_VERSION | cut -f3 -d' '`
147  PT_BUILD_NUMBER=`cat ${PTLIBDIR}/version.h | grep BUILD_NUMBER | cut -f3 -d' '`
148  PTVERSION="${PT_MAJOR_VERSION}.${PT_MINOR_VERSION}.${PT_BUILD_NUMBER}"
149fi
150
151
152AC_ARG_ENABLE(versioncheck,
153		[  --disable-versioncheck  disable PTLib version check],
154		PTLIB_VERSION_CHECK=$enableval)
155
156AC_MSG_CHECKING(Checking PTLib version ${PTVERSION})
157if test "${PTLIB_VERSION_CHECK}x" = "nox" ; then
158  AC_MSG_RESULT(check disabled)
159else
160  if test $PT_MAJOR_VERSION -lt $REQUIRED_PTLIB_MAJOR ; then
161    AC_MSG_RESULT(Major version less than required $REQUIRED_PTLIB_MAJOR)
162    exit 1
163  fi
164  if test $PT_MAJOR_VERSION -eq $REQUIRED_PTLIB_MAJOR ; then
165    if test $PT_MINOR_VERSION -lt $REQUIRED_PTLIB_MINOR ; then
166      AC_MSG_RESULT(Minor version less than required $REQUIRED_PTLIB_MINOR)
167      exit 1
168  	fi
169  fi
170  if test $PT_MAJOR_VERSION -eq $REQUIRED_PTLIB_MAJOR ; then
171    if test $PT_MINOR_VERSION -eq $REQUIRED_PTLIB_MINOR ; then
172      if test $PT_BUILD_NUMBER -lt $REQUIRED_PTLIB_BUILD ; then
173        AC_MSG_RESULT(Build version less than required $REQUIRED_PTLIB_BUILD)
174        exit 1
175      fi
176    fi
177  fi
178  AC_MSG_RESULT(ok)
179fi
180
181AC_SUBST(PTLIBDIR)
182AC_SUBST(HAS_PTLIB_LIB_MAK)
183AC_DEFINE_UNQUOTED(PT_MAJOR_VERSION, ${PT_MAJOR_VERSION}, [PTLib Major version])
184AC_DEFINE_UNQUOTED(PT_MINOR_VERSION, ${PT_MINOR_VERSION}, [PTLib Minor version])
185AC_DEFINE_UNQUOTED(PT_BUILD_NUMBER, ${PT_BUILD_NUMBER}, [PTLib Build number])
186
187dnl ########################################################################
188dnl check for setting minimum size
189
190AC_ARG_ENABLE(minsize,
191       [  --enable-minsize        minimise the size of the lib by disabling least used options])
192
193dnl these are the default configure settings
194default_audio=yes
195default_video=yes
196default_h450=yes
197default_h501=yes
198default_t38=yes
199default_h224=yes
200default_h230=yes
201default_h235=no
202default_h235_256=no
203default_h239=yes
204default_h248=yes
205default_h249=no
206default_h341=yes
207default_h350=yes
208default_h460=yes
209default_h4609=yes
210default_h46017=no
211default_h46018=yes
212default_h46019m=yes
213default_h46023=yes
214default_h46025=no
215default_h46026=no
216default_h461=no
217default_h460p=no
218default_h460pre=no
219default_h460com=no
220default_t120=no
221default_t140=no
222default_gnugk=yes
223default_file=yes
224default_aec=no
225default_tls=yes
226
227if test "${enable_minsize}x" = "yesx" ; then
228  default_audio=yes
229  default_video=yes
230  default_h450=no
231  default_h501=no
232  default_t38=no
233  default_h224=no
234  default_h230=no
235  default_h235=no
236  default_h235_256=no
237  default_h239=no
238  default_h248=no
239  default_h249=no
240  default_h341=no
241  default_h350=no
242  default_h460=no
243  default_h4609=no
244  default_h46017=no
245  default_h46018=no
246  default_h46019m=no
247  default_h46023=no
248  default_h46025=no
249  default_h46026=no
250  default_h461=no
251  default_hh460p=no
252  default_h460pre=no
253  default_h460com=no
254  default_t120=no
255  default_t140=no
256  default_gnugk=no
257  default_file=no
258  default_aec=no
259  default_tls=no
260fi
261
262
263dnl ########################################################################
264dnl check for disbling ASN tracing
265
266AC_ARG_ENABLE(asntracing,
267       [  --disable-asntracing    disable ASN tracing])
268
269if test "${enable_asntracing}z" = "z" ; then
270  enable_asntracing=$default_asntracing
271fi
272
273if test "$enable_asntracing" = "no" ; then
274  AC_MSG_NOTICE(Disabling ASN tracing)
275  AC_SUBST(NOTRACE, 1)
276fi
277
278dnl ########################################################################
279dnl Enable audio subsystems
280
281dnl MSWIN_DISPLAY audio,Audio Software Codecs
282dnl MSWIN_DEFINE  audio,H323_AUDIO_CODECS
283
284AC_ARG_ENABLE(audio,
285       [  --disable-audio         disable audio codecs])
286
287if test "${enable_audio}z" = "z" ; then
288  enable_audio=yes
289fi
290
291if test "$enable_audio" = "no" ; then
292  AC_MSG_NOTICE(Disabling audio functions)
293  AC_SUBST(NOAUDIOCODECS, 1)
294else
295  AC_DEFINE(H323_AUDIO_CODECS, 1, [Include audio codecs])
296
297  AC_ARG_ENABLE(embeddedgsm,
298         [  --enable-embeddedgsm    embed GSM codec via static linking],
299         EMBEDDED_GSM=$enableval)
300  if test "${EMBEDDED_GSM}x" != "x" ; then
301    AC_MSG_NOTICE(Embedding GSM codec)
302    LDFLAGS="$LDFLAGS -L${OPENH323DIR}/plugins/audio/GSM0610"
303    ENDLDLIBS="$ENDLDLIBS -lgsm0610_audio_s"
304    AC_CHECK_LIB(gsm, gsm_create, GSM=1)
305    if test "x$GSM" != "x"; then
306      ENDLDLIBS="$ENDLDLIBS -lgsm"
307    fi
308    AC_DEFINE(H323_EMBEDDED_GSM, , [Use embdedded GSM codec])
309  fi
310fi
311
312dnl ########################################################################
313dnl Enable video subsystems
314
315dnl MSWIN_DISPLAY video,Video Software Codecs
316dnl MSWIN_DEFINE  video,H323_VIDEO
317
318AC_ARG_ENABLE(video,
319       [  --disable-video         disable video functions])
320
321if test "${enable_video}z" = "z" ; then
322  enable_video=$default_video
323fi
324
325if test "$enable_video" = "no" ; then
326  AC_MSG_NOTICE(Disabling video functions)
327  AC_SUBST(NOVIDEO, 1)
328else
329  AC_DEFINE(H323_VIDEO, 1, [Enable H.323 video support])
330fi
331
332dnl ########################################################################
333dnl check for disabling H.224
334
335dnl MSWIN_DISPLAY h224,H.224
336dnl MSWIN_DEFINE  h224,H323_H224
337
338AC_ARG_ENABLE(h224,
339       [  --disable-h224          disable H.224])
340if test "${enable_h224}x" = "x" ; then
341  enable_h224=$default_h224
342fi
343if test "$enable_h224" = "yes" ; then
344  H323_H224=1
345  AC_DEFINE(H323_H224, 1, [Enable H.244 support])
346  AC_MSG_NOTICE(Enabling H.224)
347else
348  H323_H224=
349  AC_MSG_NOTICE(Disabling H.224)
350fi
351AC_SUBST(H323_H224)
352
353dnl ########################################################################
354dnl check for disabling H.230
355
356dnl MSWIN_DISPLAY h230,H.230
357dnl MSWIN_DEFINE  h230,H323_H230
358
359AC_ARG_ENABLE(h230,
360       [  --disable-h230          disable H.230])
361if test "${enable_h230}x" = "x" ; then
362  enable_h230=$default_h230
363fi
364if test "$enable_h230" = "yes" ; then
365  H323_H230=1
366  AC_DEFINE(H323_H230, 1, [Enable H.230 support])
367  AC_MSG_NOTICE(Enabling H.230)
368else
369  H323_H230=
370  AC_MSG_NOTICE(Disabling H.230)
371fi
372AC_SUBST(H323_H230)
373
374dnl ########################################################################
375dnl check for en/disabling H.235
376
377dnl MSWIN_DISPLAY h235,H.235.6 (128 bit)
378dnl MSWIN_DEFINE  h235,H323_H235
379
380AC_ARG_ENABLE(h235,
381       [  --disable-h235          disable H.235.6 (128 bit)])
382if test "${enable_h235}x" = "x" ; then
383  enable_h235=$default_h235
384fi
385if test "$enable_h235" = "yes" ; then
386  H323_H235=1
387  AC_DEFINE(H323_H235, 1, [Enable H.235 support])
388  AC_MSG_NOTICE(Enabling H.235.6)
389else
390  H323_H235=
391  AC_MSG_NOTICE(Disabling H.235.6)
392fi
393AC_SUBST(H323_H235)
394
395dnl ########################################################################
396dnl check for en/disabling H.235 with 256 bits
397
398dnl MSWIN_DISPLAY h235_256,H.235.6 (256 bit)
399dnl MSWIN_DEFAULT h235_256,Disabled
400dnl MSWIN_DEFINE  h235_256,H323_H235_AES256
401
402AC_ARG_ENABLE(h235_256,
403       [  --disable-h235-256      disable H.235.6 (256 bit)])
404if test "${enable_h235_256}x" = "x" ; then
405  enable_h235_256=$default_h235_256
406fi
407if test "$enable_h235" != "yes" ; then
408  enable_h235_256="no"
409fi
410if test "$enable_h235_256" = "yes" ; then
411  H323_H235_AES256=1
412  AC_DEFINE(H323_H235_AES256, 1, [Enable H.235 AES256 support])
413  AC_MSG_NOTICE(Enabling H.235.6 (256 bit))
414else
415  H323_H235_AES256=
416  AC_MSG_NOTICE(Disabling H.235.6 (256 bit))
417fi
418AC_SUBST(H323_H235_AES256)
419
420dnl ########################################################################
421dnl check for disabling H.239
422
423dnl MSWIN_DISPLAY h239,H.239
424dnl MSWIN_DEFINE  h239,H323_H239
425
426AC_ARG_ENABLE(h239,
427       [  --disable-h239          disable H.239])
428if test "${enable_h239}x" = "x" ; then
429  enable_h239=$default_h239
430fi
431if test "$enable_h239" = "yes" ; then
432  H323_H239=1
433  AC_DEFINE(H323_H239, 1, [Enable H.239 support])
434  AC_MSG_NOTICE(Enabling H.239)
435else
436  H323_H239=
437  AC_MSG_NOTICE(Disabling H.239)
438fi
439AC_SUBST(H323_H239)
440
441dnl ########################################################################
442dnl check for disabling H.248
443
444dnl MSWIN_DISPLAY h248,H.248
445dnl MSWIN_DEFINE  h248,H323_H248
446
447AC_ARG_ENABLE(h248,
448       [  --disable-h248          enable H.248])
449if test "${enable_h248}x" = "x" ; then
450  enable_h248=$default_h248
451fi
452if test "$enable_h248" = "yes" ; then
453  H323_H248=1
454  AC_DEFINE(H323_H248, 1, [Enable H.248 support])
455  AC_MSG_NOTICE(Enabling H.248)
456else
457  H323_H248=
458  AC_MSG_NOTICE(Disabling H.248)
459fi
460AC_SUBST(H323_H248)
461
462dnl ########################################################################
463dnl check for disabling H.249
464
465dnl MSWIN_DISPLAY h249,H.249
466dnl MSWIN_DEFINE  h249,H323_H249
467
468AC_ARG_ENABLE(h249,
469       [  --disable-h249          disable H.249])
470if test "${enable_h249}x" = "x" ; then
471  enable_h249=$default_h249
472fi
473if test "$enable_h249" = "yes" ; then
474  H323_H249=1
475  AC_DEFINE(H323_H249, 1, [Enable H.249 support])
476  AC_MSG_NOTICE(Enabling H.249)
477else
478  H323_H249=
479  AC_MSG_NOTICE(Disabling H.249)
480fi
481AC_SUBST(H323_H249)
482
483dnl ########################################################################
484dnl check for disabling H.341
485
486dnl MSWIN_DISPLAY h341,H.341
487dnl MSWIN_DEFINE  h341,H323_H341
488
489AC_ARG_ENABLE(h341,
490       [  --disable-h341          disable H.341])
491if test "${enable_h341}x" = "x" ; then
492  enable_h341=$default_h341
493fi
494if test "$enable_h341" = "yes" ; then
495  H323_H341=1
496  AC_DEFINE(H323_H341, 1, [Enable H.341 support])
497  AC_MSG_NOTICE(Enabling H.341)
498else
499  H323_H341=
500  AC_MSG_NOTICE(Disabling H.341)
501fi
502AC_SUBST(H323_H341)
503
504dnl ########################################################################
505dnl check for disabling H.350
506
507dnl MSWIN_DISPLAY h350,H.350
508dnl MSWIN_DEFINE  h350,H323_H350
509
510AC_ARG_ENABLE(h350,
511       [  --disable-h350          disable H.350])
512if test "${enable_h350}x" = "x" ; then
513  enable_h350=$default_h350
514fi
515if test "$enable_h350" = "yes" ; then
516  H323_H350=1
517  AC_DEFINE(H323_H350, 1, [Enable H.350 support])
518  AC_MSG_NOTICE(Enabling H.350)
519else
520  H323_H350=
521  AC_MSG_NOTICE(Disabling H.350)
522fi
523AC_SUBST(H323_H350)
524
525dnl ########################################################################
526dnl check for disabling H.450
527
528dnl MSWIN_DISPLAY h450,H.450
529dnl MSWIN_DEFINE  h450,H323_H450
530
531AC_ARG_ENABLE(h450,
532       [  --disable-h450          disable H.450])
533if test "${enable_h450}x" = "x" ; then
534  enable_h450=$default_h450
535fi
536if test "$enable_h450" = "yes" ; then
537  H323_H450=1
538  AC_DEFINE(H323_H450, 1, [Enable H.450 support])
539  AC_MSG_NOTICE(Enabling H.450)
540else
541  H323_H450=
542  AC_MSG_NOTICE(Disabling H.450)
543fi
544AC_SUBST(H323_H450)
545
546dnl ########################################################################
547dnl check for disabling H.460
548
549dnl MSWIN_DISPLAY h460,H.460
550dnl MSWIN_DEFINE  h460,H323_H460
551
552AC_ARG_ENABLE(h460,
553       [  --disable-h460          disable H.460])
554if test "${enable_h460}x" = "x" ; then
555  enable_h460=$default_h460
556fi
557if test "$enable_h460" = "yes" ; then
558  H323_H460=1
559  AC_DEFINE(H323_H460, 1, [Enable H.460 support])
560  AC_MSG_NOTICE(Enabling H.460)
561else
562  H323_H460=
563  AC_MSG_NOTICE(Disabling H.460)
564fi
565AC_SUBST(H323_H460)
566
567dnl ########################################################################
568dnl check for enabling H.460.9
569
570dnl MSWIN_DISPLAY h4609,H.460.9
571dnl MSWIN_DEFINE  h4609,H323_H4609
572
573AC_ARG_ENABLE(h4609,
574       [  --disable-h4609         disable H.460.9])
575if test "${enable_h4609}x" = "x" ; then
576  enable_h4609=$default_h4609
577fi
578if test "$enable_h4609" = "yes" ; then
579  H323_h4609=1
580  AC_DEFINE(H323_H4609, 1, [Enable H.460.9 support])
581  AC_MSG_NOTICE(Enabling H.460.9)
582else
583  H323_h4609=
584  AC_MSG_NOTICE(Disabling H.460.9)
585fi
586AC_SUBST(H323_H4609)
587
588dnl ########################################################################
589dnl check for enabling H.460.17
590
591dnl MSWIN_DISPLAY h46017,H.460.17
592dnl MSWIN_DEFINE  h46017,H323_H46017
593
594AC_ARG_ENABLE(h46017,
595       [  --disable-h46017        disable H.460.17])
596if test "${enable_h46017}x" = "x" ; then
597  enable_h46017=$default_h46017
598fi
599if test "$enable_h46017" = "yes" ; then
600  H323_H46017=1
601  AC_DEFINE(H323_H46017, 1, [Enable H.460.17 support])
602  AC_MSG_NOTICE(Enabling H.460.17)
603else
604  H323_H46017=
605  AC_MSG_NOTICE(Disabling H.460.17)
606fi
607AC_SUBST(H323_H46017)
608
609dnl ########################################################################
610dnl check for enabling H.460.18/.19
611
612dnl MSWIN_DISPLAY h46018,H.460.18/.19
613dnl MSWIN_DEFINE  h46018,H323_H46018
614
615AC_ARG_ENABLE(h46018,
616       [  --disable-h46018        disable H.460.18/.19])
617if test "${enable_h46018}x" = "x" ; then
618  enable_h46018=$default_h46018
619fi
620if test "$enable_h46018" = "yes" ; then
621  H323_H46018=1
622  AC_DEFINE(H323_H46018, 1, [Enable H.460.18/.19 support])
623  AC_MSG_NOTICE(Enabling H.460.18/.19)
624else
625  H323_H46018=
626  AC_MSG_NOTICE(Disabling H.460.18/.19)
627fi
628AC_SUBST(H323_H46018)
629
630dnl ########################################################################
631dnl check for enabling H.460.19 RTP multiplexing
632
633dnl MSWIN_DISPLAY h46019m,H.460.19 RTP multiplexing
634dnl MSWIN_DEFINE  h46019m,H323_H46019M
635
636AC_ARG_ENABLE(h46019m,
637       [  --disable-h46019m       disable H.460.19 RTP multiplexing])
638if test "${enable_h46019m}x" = "x" ; then
639  enable_h46019m=$default_h46019m
640fi
641if test "$enable_h46019m" = "yes" ; then
642  H323_H46019M=1
643  AC_DEFINE(H323_H46019M, 1, [Enable H.460.19 support])
644  AC_MSG_NOTICE(Enabling H.460.19 RTP multiplexing)
645else
646  H323_H46019M=
647  AC_MSG_NOTICE(Disabling H.460.19 RTP multiplexing)
648fi
649AC_SUBST(H323_H46019M)
650
651dnl ########################################################################
652dnl check for disabling H.460.23/.24
653
654dnl MSWIN_DISPLAY h46023,H.460.23/.24
655dnl MSWIN_DEFINE  h46023,H323_H46023
656
657AC_ARG_ENABLE(h46023,
658       [  --disable-h46023        disable H.460.23/.24])
659if test "${enable_h46023}x" = "x" ; then
660  enable_h46023=$default_h46023
661fi
662if test "$enable_h46023" = "yes" ; then
663  H323_H46023=1
664  AC_DEFINE(H323_H46023, 1, [Enable H.460.23 support])
665  AC_MSG_NOTICE(Enabling H.460.23/.24)
666else
667  H323_H46023=
668  AC_MSG_NOTICE(Disabling H.460.23/.24)
669fi
670AC_SUBST(H323_H46023)
671
672dnl ########################################################################
673dnl check for disabling H.460.25
674
675dnl MSWIN_DISPLAY h46025,H.460.25
676dnl MSWIN_DEFINE  h46025,H323_H46025
677
678AC_ARG_ENABLE(h46025,
679       [  --disable-h46025        disable H.460.25])
680if test "${enable_h46025}x" = "x" ; then
681  enable_h46023=$default_h46025
682fi
683if test "$enable_h46025" = "yes" ; then
684  H323_H46025=1
685  AC_DEFINE(H323_H46025, 1, [Enable H.460.25 support])
686  AC_MSG_NOTICE(Enabling H.460.25)
687else
688  H323_H46025=
689  AC_MSG_NOTICE(Disabling H.460.25)
690fi
691
692dnl ########################################################################
693dnl check for disabling H.460.26
694
695dnl MSWIN_DISPLAY h46026,H.460.26
696dnl MSWIN_DEFINE  h46026,H323_H46026
697
698AC_ARG_ENABLE(h46026,
699       [  --disable-h46026        disable H.460.26])
700if test "${enable_h46026}x" = "x" ; then
701  enable_h46023=$default_h46026
702fi
703if test "$enable_h46026" = "yes" ; then
704  H323_H46026=1
705  AC_DEFINE(H323_H46026, 1, [Enable H.460.26 support])
706  AC_MSG_NOTICE(Enabling H.460.26)
707else
708  H323_H46026=
709  AC_MSG_NOTICE(Disabling H.460.26)
710fi
711AC_SUBST(H323_H46026)
712
713dnl ########################################################################
714dnl check for disabling H.460 Presence
715
716dnl MSWIN_DISPLAY h460p,H.460 Presence
717dnl MSWIN_DEFINE  h460p,H323_H460P
718
719AC_ARG_ENABLE(h460p,
720       [  --enable-h460p          enable H.460 Presence])
721if test "${enable_h460p}x" = "x" ; then
722  enable_h460p=$default_h460p
723fi
724if test "$enable_h460p" = "yes" ; then
725  H323_H460P=1
726  AC_DEFINE(H323_H460P, 1, [Enable H.460P support])
727  AC_MSG_NOTICE(Enabling H.460 Presence)
728else
729  H323_H460P=
730  AC_MSG_NOTICE(Disabling H.460 Presence)
731fi
732AC_SUBST(H323_H460P)
733
734dnl ########################################################################
735dnl check for Enable H.460 PreEmption
736
737dnl MSWIN_DISPLAY h460pre,H.460 PreEmption
738dnl MSWIN_DEFINE  h460pre,H323_H460PRE
739
740AC_ARG_ENABLE(h460pre,
741       [  --enable-h460pre        enable H.460 PreEmption])
742if test "${enable_h460pre}x" = "x" ; then
743  enable_h460pre=$default_h460pre
744fi
745if test "$enable_h460pre" = "yes" ; then
746  H323_H460PRE=1
747  AC_DEFINE(H323_H460PRE, 1, [Enable H.460PRE support])
748  AC_MSG_NOTICE(Enabling H.460 PreEmption)
749else
750  H323_H460PRE=
751  AC_MSG_NOTICE(Disabling H.460 PreEmption)
752fi
753AC_SUBST(H323_H460PRE)
754
755dnl ########################################################################
756dnl check for Enable H.460 Compatibility
757
758dnl MSWIN_DISPLAY h460com,H.460 Compat Feature
759dnl MSWIN_DEFINE  h460com,H323_H460COM
760
761AC_ARG_ENABLE(h460com,
762       [  --enable-h460com        enable H.460 Compat Feature])
763if test "${enable_h460com}x" = "x" ; then
764  enable_h460com=$default_h460com
765fi
766if test "$enable_h460com" = "yes" ; then
767  H323_H460COM=1
768  AC_DEFINE(H323_H460COM, 1, [Enable H.460COM support])
769  AC_MSG_NOTICE(Enabling H.460 Compat Feature)
770else
771  H323_H460COM=
772  AC_MSG_NOTICE(Disabling H.460 Compat Feature)
773fi
774AC_SUBST(H323_H460COM)
775
776dnl ########################################################################
777dnl check for Enable H.460 Text Message
778
779dnl MSWIN_DISPLAY h460im,H.460 Text Message
780dnl MSWIN_DEFINE  h460im,H323_H460IM
781
782AC_ARG_ENABLE(h460im,
783       [  --enable-h460im         enable H.460 Text Message])
784if test "${enable_h460im}x" = "x" ; then
785  enable_h460im=$default_h460im
786fi
787if test "$enable_h460im" = "yes" ; then
788  H323_H460IM=1
789  AC_DEFINE(H323_H460IM, 1, [Enable H.460IM support])
790  AC_MSG_NOTICE(Enabling H.460 Text Message)
791else
792  H323_H460IM=
793  AC_MSG_NOTICE(Disabling H.460 Text Message)
794fi
795AC_SUBST(H323_H460IM)
796
797dnl ########################################################################
798dnl check for Enable H.461 ASSET Feature
799
800dnl MSWIN_DISPLAY h461,H.461 ASSET Feature
801dnl MSWIN_DEFINE  h461,H323_H461
802
803AC_ARG_ENABLE(h461,
804       [  --enable-h461           enable H.461 ASSET Feature])
805if test "${enable_h461}x" = "x" ; then
806  enable_h461=$default_h461
807fi
808if test "$enable_h461" = "yes" ; then
809  H323_H461=1
810  AC_DEFINE(H323_H461, 1, [Enabling H.461 ASSET Feature])
811  AC_MSG_NOTICE(Enabling H.461 ASSET Feature)
812else
813  H323_H461=
814  AC_MSG_NOTICE(Disabling H.461 ASSET Feature)
815fi
816AC_SUBST(H323_H461)
817
818dnl ########################################################################
819dnl check for disabling H.501
820
821dnl MSWIN_DISPLAY h501,H.501
822dnl MSWIN_DEFINE  h501,H323_H501
823
824AC_ARG_ENABLE(h501,
825       [  --disable-h501          disable H.501])
826if test "${enable_h501}x" = "x" ; then
827  enable_h501=$default_h501
828fi
829if test "$enable_h501" = "yes" ; then
830  H323_H501=1
831  AC_DEFINE(H323_H501, 1, [Enable H.501 support])
832  AC_MSG_NOTICE(Enabling H.501)
833else
834  H323_H501=
835  AC_MSG_NOTICE(Disabling H.501)
836fi
837AC_SUBST(H323_H501)
838
839dnl ########################################################################
840dnl check for disabling T.38
841
842dnl MSWIN_DISPLAY t38,T.38
843dnl MSWIN_DEFINE  t38,H323_T38
844
845AC_ARG_ENABLE(t38,
846       [  --disable-t38           disable T.38])
847if test "${enable_t38}x" = "x" ; then
848  enable_t38=$default_t38
849fi
850if test "$enable_t38" = "yes" ; then
851  AC_MSG_NOTICE(Enabling T.38)
852  H323_T38=1
853  AC_DEFINE(H323_T38, 1, [Enable T.38 support])
854  AC_MSG_NOTICE(Enabling T.38)
855else
856  H323_T38=
857  AC_MSG_NOTICE(Disabling T.38)
858fi
859AC_SUBST(H323_T38)
860
861dnl ########################################################################
862dnl check for enabling T.120
863
864dnl MSWIN_DISPLAY t120,T.120
865dnl MSWIN_DEFINE  t120,H323_T120
866
867AC_ARG_ENABLE(t120,
868       [  --disable-t120          disable T.120])
869if test "${enable_t120}x" = "x" ; then
870  enable_t120=$default_t120
871fi
872if test "$enable_t120" = "no" ; then
873  H323_T120=
874  AC_MSG_NOTICE(Disabling T.120)
875else
876  H323_T20=1
877  AC_DEFINE(H323_T120, 1, [Enable T.120 support])
878  AC_MSG_NOTICE(Enabling T.120)
879fi
880AC_SUBST(H323_T120)
881
882dnl ########################################################################
883dnl check for enabling T.140
884
885dnl MSWIN_DISPLAY t140,T.140
886dnl MSWIN_DEFINE  t140,H323_T140
887
888AC_ARG_ENABLE(t140,
889       [  --disable-t140          disable T.140])
890if test "${enable_t140}x" = "x" ; then
891  enable_t140=$default_t140
892fi
893if test "$enable_t140" = "no" ; then
894  H323_T140=
895  AC_MSG_NOTICE(Disabling T.140)
896else
897  H323_T140=1
898  AC_DEFINE(H323_T140, 1, [Enable T.140 support])
899  AC_MSG_NOTICE(Enabling T.140)
900fi
901AC_SUBST(H323_T140)
902
903dnl ########################################################################
904dnl check for disabling GNUGK Support
905
906dnl MSWIN_DISPLAY gnugk,GNUGKnat
907dnl MSWIN_DEFINE  gnugk,H323_GNUGK
908
909AC_ARG_ENABLE(gnugk,
910       [  --disable-gnugk         disable GnuGk NAT])
911if test "${enable_gnugk}x" = "x" ; then
912  enable_gnugk=$default_gnugk
913fi
914if test "$enable_gnugk" = "yes" ; then
915  H323_GNUGK=1
916  AC_DEFINE(H323_GNUGK, 1, [Enable GNU GateKeeper NAT support])
917  AC_MSG_NOTICE(Enabling GnuGk NAT)
918else
919  H323_GNUGK=
920  AC_MSG_NOTICE(Disabling GnuGk NAT)
921fi
922AC_SUBST(H323_GNUGK)
923
924dnl ########################################################################
925dnl check for disabling File Transfer Support
926
927dnl MSWIN_DISPLAY file,FileTransfer
928dnl MSWIN_DEFINE  file,H323_FILE
929
930AC_ARG_ENABLE(file,
931       [  --disable-file          disable File Transfer])
932if test "${enable_file}x" = "x" ; then
933  enable_file=$default_file
934fi
935if test "$enable_file" = "yes" ; then
936  H323_FILE=1
937  AC_DEFINE(H323_FILE, 1, [Enable H323 file support])
938  AC_MSG_NOTICE(Enabling File Transfer)
939else
940  H323_FILE=
941  AC_MSG_NOTICE(Disabling File Transfer)
942fi
943AC_SUBST(H323_FILE)
944
945dnl ########################################################################
946dnl look for Speex AEC
947
948dnl MSWIN_DISPLAY    aec,AEC (Acoustic Echo Cancellation)
949dnl MSWIN_CHECK_FILE aec,include\speex\speex_echo.h,H323_AEC=1
950dnl MSWIN_DIR_SYMBOL aec,AEC_DIR
951dnl MSWIN_CHECK_DIR  aec,c:\speex-1.2rc1\
952
953AC_ARG_ENABLE([aec],
954	      AS_HELP_STRING([--enable-aec],[enable Acoustic Echo Cancellation]),
955	      [enable_aec=$enableval],
956	      [enable_aec=$default_aec]
957	     )
958
959if test "$enable_aec" = "no" ; then
960  AC_MSG_NOTICE(AEC disabled)
961else
962  if test "x${H323_AEC}" = "x1" ; then
963    AC_DEFINE(H323_AEC, 1, "AEC found")
964    STDCCFLAGS="$STDCCFLAGS $AEC_CFLAGS"
965    ENDLDLIBS="$ENDLDLIBS $AEC_LIBS"
966    AC_MSG_NOTICE(AEC enabled)
967  fi
968fi
969AC_SUBST(H323_AEC)
970
971dnl ########################################################################
972dnl check for disabling TLS support
973
974dnl MSWIN_DISPLAY tls,TLS
975dnl MSWIN_DEFINE  tls,H323_TLS
976
977AC_ARG_ENABLE(tls,
978       [  --disable-tls           disable TLS support])
979if test "${enable_tls}x" = "x" ; then
980  enable_tls=$default_tls
981fi
982if test "$enable_tls" = "yes" ; then
983  H323_TLS=1
984  AC_DEFINE(H323_TLS, 1, [Enable TLS support])
985  AC_MSG_NOTICE(Enabling TLS support)
986else
987  H323_TLS=
988  AC_MSG_NOTICE(Disabling TLS support)
989fi
990AC_SUBST(H323_TLS)
991
992dnl ########################################################################
993dnl make directives
994
995AC_SUBST(STDCCFLAGS)
996AC_SUBST(LDFLAGS)
997AC_SUBST(LDLIBS)
998AC_SUBST(ENDLDLIBS)
999AC_PROG_INSTALL
1000
1001AC_CONFIG_FILES(openh323u.mak)
1002AC_CONFIG_FILES(Makefile)
1003AC_CONFIG_FILES(h323plus_cfg.dxy)
1004
1005
1006dnl ########################################################################
1007dnl Header file
1008
1009AC_CONFIG_HEADERS(include/openh323buildopts.h)
1010
1011
1012dnl ########################################################################
1013dnl Output configured files
1014
1015AC_CONFIG_SUBDIRS(plugins)
1016
1017AC_OUTPUT()
1018
1019