File: configure.ac

package info (click to toggle)
openh323 1.18.0.dfsg-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 27,616 kB
  • ctags: 26,979
  • sloc: cpp: 178,986; ansic: 33,179; sh: 3,483; makefile: 937
file content (594 lines) | stat: -rw-r--r-- 17,338 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
AC_INIT(include/h323.h)

AC_PROG_CXX
AC_HEADER_STDC


dnl ########################################################################
dnl set the OpenH323 directory to the current directory

OPENH323DIR=`pwd`
AC_SUBST(OPENH323DIR)

dnl ########################################################################
dnl set the PREFIX accordingly
if test "x$prefix" = "xNONE"; then
   INSTALLPREFIX="/usr/local"
else
   INSTALLPREFIX="${prefix}"
fi

AC_SUBST(INSTALLPREFIX)


dnl ########################################################################
dnl set LIBDIR accordingly
LIBDIR="${libdir}"

AC_SUBST(LIBDIR)


dnl ########################################################################
dnl extract the OpenH323 version
MAJOR_VERSION=`cat ${OPENH323DIR}/version.h | grep MAJOR_VERSION | cut -f3 -d' '`
MINOR_VERSION=`cat ${OPENH323DIR}/version.h | grep MINOR_VERSION | cut -f3 -d' '`
BUILD_NUMBER=`cat ${OPENH323DIR}/version.h | grep BUILD_NUMBER | cut -f3 -d' '`
OPENH323_VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${BUILD_NUMBER}"
AC_SUBST(MAJOR_VERSION)
AC_SUBST(MINOR_VERSION)
AC_SUBST(BUILD_NUMBER)
AC_SUBST(OPENH323_VERSION)
AC_SUBST(MAJOR_VERSION, $MAJOR_VERSION)
AC_SUBST(MINOR_VERSION, $MINOR_VERSION)
AC_SUBST(BUILD_NUMBER, $BUILD_NUMBER)

echo "OpenH323 version is ${OPENH323_VERSION}"

AC_DEFINE_UNQUOTED(OPENH323_MAJOR,   ${MAJOR_VERSION})
AC_DEFINE_UNQUOTED(OPENH323_MINOR,   ${MINOR_VERSION})
AC_DEFINE_UNQUOTED(OPENH323_BUILD,   ${BUILD_NUMBER})
AC_DEFINE_UNQUOTED(OPENH323_VERSION, "$OPENH323_VERSION")

dnl ########################################################################
dnl look for ptlib, use a preference order of explicit PWLIBDIR, directory
dnl at same level, home directory, /usr/local or /usr.

if test "${PWLIBDIR:-unset}" != "unset" ; then
  AC_CHECK_FILE(${PWLIBDIR}/version.h, HAS_PTLIB=1)
fi
if test "${HAS_PTLIB:-unset}" = "unset" ; then
  AC_CHECK_FILE(${OPENH323DIR}/../pwlib/version.h, HAS_PTLIB=1)
  if test "${HAS_PTLIB:-unset}" != "unset" ; then
    PWLIBDIR="${OPENH323DIR}/../pwlib"
  else
    AC_CHECK_FILE(${HOME}/pwlib/include/ptlib.h, HAS_PTLIB=1)
    if test "${HAS_PTLIB:-unset}" != "unset" ; then
      PWLIBDIR="${HOME}/pwlib"
    else
      AC_CHECK_FILE(/usr/local/include/ptlib.h, HAS_PTLIB=1)
      if test "${HAS_PTLIB:-unset}" != "unset" ; then
        AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin)
      else
        AC_CHECK_FILE(/usr/include/ptlib.h, HAS_PTLIB=1)
        if test "${HAS_PTLIB:-unset}" != "unset" ; then
          AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/share/pwlib/make/)
        fi
      fi
    fi
  fi
fi

if test "${HAS_PTLIB:-unset}" = "unset" ; then
  echo "Cannot find pwlib - please install or set PWLIBDIR and try again"
  exit
fi

if test "${PWLIBDIR:-unset}" = "unset" ; then
  if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
    echo "Cannot find ptlib-config - please install and try again"
    exit
  fi
  PWLIBDIR=`$PTLIB_CONFIG --prefix`
fi

if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then
  PWLIBDIR="/usr/share/pwlib/"
fi
if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then
  PWLIBDIR="/usr/local/share/pwlib/"
fi

echo "PWLib prefix set to.... $PWLIBDIR"

AC_SUBST(PWLIBDIR)

dnl ########################################################################
dnl check for setting minimum size

AC_ARG_ENABLE(minsize,
       [  --enable-minsize        minimise the size of the lib by disabling least used options])

dnl these are the default configure settings
default_ixj=yes
default_audio=yes
default_video=yes
default_asntracing=yes
default_h450=yes
default_h501=yes
default_t38=yes
default_h248=yes
default_h460=yes
default_t120=yes
default_transnexusosp=yes
default_h263avcodec=no
default_vich263=no

if test "${enable_minsize}x" = "yesx" ; then
  default_ixj=no
  default_audio=yes
  default_video=yes
  default_asntracing=no
  default_h450=no
  default_h501=no
  default_t38=no
  default_h248=no
  default_h460=no
  default_t120=no
  default_transnexusosp=no
  default_h263avcodec=no
  default_vich263=no
fi


dnl ########################################################################
dnl check for disbling ASN tracing

AC_ARG_ENABLE(asntracing,
       [  --disable-asntracing    disable ASN tracing])

if test "${enable_asntracing}z" = "z" ; then
  enable_asntracing=$default_asntracing
fi

if test "$enable_asntracing" = "no" ; then
  AC_MSG_NOTICE(Disabling ASN tracing)
  AC_SUBST(NOTRACE, 1)
fi

dnl ########################################################################
dnl Enable audio subsystems

dnl MSWIN_DISPLAY audio,Audio Software Codecs
dnl MSWIN_DEFINE  audio,H323_AUDIO_CODECS

AC_ARG_ENABLE(audio,
       [  --disable-audio         disable audio codecs])

if test "${enable_audio}z" = "z" ; then
  enable_audio=yes
fi

if test "$enable_audio" = "no" ; then
  AC_MSG_NOTICE(Disabling audio functions)
  AC_SUBST(NOAUDIOCODECS, 1)
else
  AC_DEFINE(H323_AUDIO_CODECS, 1)

  AC_ARG_ENABLE(embeddedgsm,
         [  --enable-embeddedgsm    embed GSM codec via static linking],
         EMBEDDED_GSM=$enableval)
  if test "${EMBEDDED_GSM}x" != "x" ; then
    AC_MSG_NOTICE(Embedding GSM codec)
    LDFLAGS="$LDFLAGS -L${OPENH323DIR}/plugins/audio/GSM0610"
    ENDLDLIBS="$ENDLDLIBS -lgsm0610_audio_s"
    AC_CHECK_LIB(gsm, gsm_create, GSM=1)
    if test "x$GSM" != "x"; then
      ENDLDLIBS="$ENDLDLIBS -lgsm"
    fi
    AC_DEFINE(H323_EMBEDDED_GSM)
  fi
fi

dnl ########################################################################
dnl Enable video subsystems

dnl MSWIN_DISPLAY video,Video System
dnl MSWIN_DEFINE  video,H323_VIDEO

AC_ARG_ENABLE(video,
       [  --disable-video         disable video functions])

if test "${enable_video}z" = "z" ; then
  enable_video=$default_video
fi

if test "$enable_video" = "no" ; then
  AC_MSG_NOTICE(Disabling video support)
  AC_SUBST(NOVIDEO, 1)
else
  AC_DEFINE(H323_VIDEO, 1)
fi

dnl ########################################################################
dnl look for avcodec compatible with RFC 2190

dnl MSWIN_DISPLAY    rfc2190,ffmpeg RFC2190 AVCODEC Library
dnl MSWIN_CHECK_FILE rfc2190,avcodec_rfc2190.h,H323_RFC2190_AVCODEC=1
dnl MSWIN_DIR_SYMBOL rfc2190,H323_RFC2190_AVCODEC_DIR
dnl MSWIN_CHECK_DIR  rfc2190,..\ffmpeg\libavcodec\
dnl MSWIN_CHECK_DIR  rfc2190,..\external\ffmpeg\libavcodec\
dnl MSWIN_CHECK_DIR  rfc2190,\ffmpeg\libavcodec\
dnl MSWIN_CHECK_DIR  rfc2190,c:\ffmpeg\libavcodec\

H323_RFC2190_AVCODEC=
H323_RFC2190_AVCODEC_DIR=
H323_AVCODEC=
H323_VICH263=

if test "$enable_video" = "yes" ; then

  AC_ARG_ENABLE(rfc2190avcodec,
         [  --enable-rfc2190avcodec   set directory for H263 using RFC2190-compatible ffmpeg])

  if test "${enable_rfc2190avcodec}x" = "x" ; then
    AC_MSG_NOTICE(Skipping tests for RFC 2190 H.263 support)
  else
    AC_MSG_NOTICE(Checking for RFC2190 H.263 codec)
    H323_RFC2190_AVCODEC_DIR=$enable_rfc2190avcodec
    AC_CHECK_HEADER(${H323_RFC2190_AVCODEC_DIR}/avcodec.h, H323_RFC2190_AVCODEC=1)
    if test "${H323_RFC2190_AVCODEC}" == "1" ; then
      AC_DEFINE(H323_RFC2190_AVCODEC)
      H323_RFC2190_AVCODEC=1
      H323_RFC2190_AVCODEC_DIR=${H323_RFC2190_AVCODEC_DIR}
      STDCCFLAGS="${STDCCFLAGS} -I${H323_RFC2190_AVCODEC_DIR}"
    fi
  fi

  dnl ########################################################################
  dnl look for avcodec from library.

  dnl MSWIN_DISPLAY    ffh263,ffmpeg AVCODEC Library
  dnl MSWIN_CHECK_FILE ffh263,avcodec.h,H323_AVCODEC=1
  dnl MSWIN_DIR_SYMBOL ffh263,H323_AVCODEC_DIR
  dnl MSWIN_CHECK_DIR  ffh263,..\ffmpeg\libavcodec\
  dnl MSWIN_CHECK_DIR  ffh263,..\external\ffmpeg\libavcodec\
  dnl MSWIN_CHECK_DIR  ffh263,\ffmpeg\libavcodec\
  dnl MSWIN_CHECK_DIR  ffh263,c:\ffmpeg\libavcodec\
  dnl MSWIN_IF_FEATURE ffh263,!rfc2190

  AC_ARG_ENABLE(h263avcodec,
         [  --enable-h263avcodec  enable search for H.263 using non-RFC2190-compatible ffmpeg])
  if test "${enable_h263avcodec}z" = "z" ; then
    enable_h263avcodec=$default_h263avcodec
  fi

  if test "$enable_h263avcodec" = "no" ; then
    AC_MSG_NOTICE(Disabled non-RFC2190 H.263 using ffmpeg)
  else
    AC_CHECK_HEADERS(avcodec.h, H323_AVCODEC=1)

    if test "${H323_AVCODEC}z" != "z" ; then
      AC_CHECK_LIB(avcodec, avcodec_open, H323_AVCODEC=1, H323_AVCODEC=)
    fi

    if test "${H323_AVCODEC}z" != "z" ; then
      AC_CHECK_FILE(/usr/local/include/ffmpeg/avcodec.h, H323_AVCODEC=1)
    fi

    if test "${H323_AVCODEC}z" = "z" ; then
      AC_MSG_NOTICE(Unable to find non-RFC2190 H.263 using ffmpeg)
    else
      H323_AVCODEC=1
      AC_DEFINE(H323_AVCODEC, 1, "ffmpeg based avodec found")
      AVCODECINCLUDEDIR=/usr/local/include/ffmpeg
      AVCODECLIBDIR=/usr/local/lib
      STDCCFLAGS="$STDCCFLAGS -I${AVCODECINCLUDEDIR}"

      AC_MSG_NOTICE(Enabled non-RFC2190 H.263 using ffmpeg)
    fi
  fi

  dnl ########################################################################
  dnl look for vich263 library

  dnl MSWIN_DISPLAY    vich263,VIC H.263 Library
  dnl MSWIN_CHECK_FILE vich263,encoder-h263.h,H323_VICH263=1
  dnl MSWIN_DIR_SYMBOL vich263,H323_VICH263_DIR
  dnl MSWIN_CHECK_DIR  vich263,..\vich263\
  dnl MSWIN_CHECK_DIR  vich263,..\external\vich263\
  dnl MSWIN_CHECK_DIR  vich263,\vich263\
  dnl MSWIN_CHECK_DIR  vich263,c:\vich263\
  dnl MSWIN_IF_FEATURE vich263,!rfc2190,!ffh263

  AC_ARG_ENABLE(vich263,
         [  --enable-vich263        enable search for H.263 using VIC])
  if test "${enable_vich263}z" = "z" ; then
    enable_vich263=$default_vich263
  fi

  if test "$enable_vich263" = "no" ; then
    AC_MSG_NOTICE(Disabled H.263 using VIC)
  else
    AC_CHECK_HEADERS(encoder-h263.h, H323_VICH263=1)
    if test "${H323_VICH263}z" != "z" ; then
      AC_CHECK_FILE(/usr/local/lib/libvich263.so, H323_VICH263=1, H323_VICH263=)
    fi

    if test "${H323_VICH263}z" != "z" ; then
     AC_CHECK_FILE(/usr/local/include/vich263/encoder-h263.h, H323_VICH263=1)
    fi

    if test "${H323_VICH263}z" = "z" ; then
      AC_MSG_NOTICE(Unable to find H.263 using VIC)
    else
      H323_VICH263=1
      AC_DEFINE(H323_VICH263, 1, "vic H263 codec found")
      VICH263INCLUDEDIR=/usr/local/include/vich263
      VICH263LIBDIR=/usr/local/lib
      STDCCFLAGS="$STDCCFLAGS -I${VICH263INCLUDEDIR}"
      AC_MSG_NOTICE(Enabled H.263 using VIC)
    fi
  fi
fi

AC_SUBST(H323_RFC2190_AVCODEC)
AC_SUBST(H323_RFC2190_AVCODEC_DIR)
AC_SUBST(H323_AVCODEC)
AC_SUBST(H323_VICH263)


dnl ########################################################################
dnl look for Transnexus OSP Toolkit

dnl MSWIN_DISPLAY    transnexus_osp,Transnexus OSP Toolkit
dnl MSWIN_CHECK_FILE transnexus_osp,include/osp/ospcryptowrap.h,H323_TRANSNEXUS_OSP=1
dnl MSWIN_DIR_SYMBOL transnexus_osp,H323_TRANSNEXUS_OSP_DIR
dnl MSWIN_CHECK_DIR  transnexus_osp,lib\
dnl MSWIN_CHECK_DIR  transnexus_osp,pthread\lib
dnl MSWIN_CHECK_DIR  transnexus_osp,pthread\include

AC_ARG_ENABLE(transnexusosp,
       [  --disable-transnexusosp disable support for the Transnexus OSP toolkit])

if test "${enable_transnexusosp}z" = "z" ; then
  enable_transnexusosp=$default_transnexusosp
fi

if test "$enable_transnexusosp" = "no" ; then
  AC_MSG_NOTICE(Disabling support for the Transnexus OSP toolkit)
else
  AC_CHECK_HEADERS(osp/osp.h, HAS_TRANSNEXUS_OSP=1)
  if test "${HAS_TRANSNEXUS_OSP}x" = "1x" ; then
    OLD_LDFLAGS=$LDFLAGS
    AC_CHECK_LIB(osp, OSPPInit, HAS_TRANSNEXUS_OSP=1, HAS_TRANSNEXUS_OSP=, -lssl)
    if test "${HAS_TRANSNEXUS_OSP}x" = "1x" ; then
      H323_TRANSNEXUS_OSP=1
      AC_DEFINE(H323_TRANSNEXUS_OSP)
      LDLIBS="${LDLIBS} -losp"
      OSP_INCLUDE="#include <osp/osp.h>"
    else
      unset ac_cv_lib_osp_OSPPInit
      LDFLAGS="-L/usr/local/lib $OLD_LDFLAGS"
      AC_CHECK_LIB(osp, OSPPInit, HAS_TRANSNEXUS_OSP=1, HAS_TRANSNEXUS_OSP=, -lssl)
      if test "${HAS_TRANSNEXUS_OSP}x" = "x" ; then
        LDFLAGS=$OLD_LDFLAGS
      else
        H323_TRANSNEXUS_OSP=1
        AC_DEFINE(H323_TRANSNEXUS_OSP)
        STDCCFLAGS="$STDCCFLAGS -I/usr/local/include"
        LDLIBS="${LDLIBS} -losp"
        OSP_INCLUDE='#include "/usr/local/include/osp/osp.h"'
      fi
    fi
  fi
fi

if test "${H323_TRANSNEXUS_OSP}x" != "x" ; then
  if test "${OSP_INCLUDE}x" != "x" ; then
    AC_MSG_CHECKING(for new OSP toolkit API)
    AC_TRY_COMPILE(${OSP_INCLUDE},
      [int main(int ac,char **av) { OSPTTRANHANDLE h; OSPTTIME t; OSPPTransactionReportUsage(h, 0, t, 0, 0, 0, 0, NULL, NULL); return 0; } ], H323_NEW_OSP_API=, H323_NEW_OSP_API=1)
    if test "${H323_NEW_OSP_API}x" != "x" ; then
      AC_MSG_RESULT(yes)
      AC_DEFINE(H323_NEW_OSP_API)
    else
      AC_MSG_RESULT(no)
    fi
  fi
fi

AC_SUBST(H323_TRANSNEXUS_OSP)

dnl ########################################################################
dnl check for disabling T.38

dnl MSWIN_DISPLAY t38,T.38
dnl MSWIN_DEFINE  t38,H323_T38

AC_ARG_ENABLE(t38,
       [  --disable-t38           disable T.38])
if test "${enable_t38}x" = "x" ; then
  enable_t38=$default_t38
fi
if test "$enable_t38" = "yes" ; then
  AC_MSG_NOTICE(Enabling T.38)
  H323_T38=1
  AC_DEFINE(H323_T38, 1)
else
  H323_T38=
  AC_MSG_NOTICE(Disabling T.38)
fi
AC_SUBST(H323_T38)

dnl ########################################################################
dnl check for disabling H.248

dnl MSWIN_DISPLAY h248,H.248
dnl MSWIN_DEFINE  h248,H323_H248

AC_ARG_ENABLE(h248,
       [  --disable-h248          enable H.248])
if test "${enable_h248}x" = "x" ; then
  enable_h248=$default_h248
fi
if test "$enable_h248" = "yes" ; then
  H323_H248=1
  AC_DEFINE(H323_H248, 1)
else
  H323_H248=
  AC_MSG_NOTICE(Disabling H.248)
fi
AC_SUBST(H323_H248)

dnl ########################################################################
dnl check for disabling H.450

dnl MSWIN_DISPLAY h450,H.450
dnl MSWIN_DEFINE  h450,H323_H450

AC_ARG_ENABLE(h450,
       [  --disable-h450          disable H.450])
if test "${enable_h450}x" = "x" ; then
  enable_h450=$default_h450
fi
if test "$enable_h450" = "yes" ; then
  H323_H450=1
  AC_DEFINE(H323_H450, 1)
else
  H323_H450=
  AC_MSG_NOTICE(Disabling H.450)
fi
AC_SUBST(H323_H450)

dnl ########################################################################
dnl check for disabling H.460

AC_ARG_ENABLE(h460,
       [  --disable-h460          disable H.460])
if test "${enable_h460}x" = "x" ; then
  enable_460=$default_h460
fi
if test "$enable_h460" = "no" ; then
  AC_DEFINE(DISABLE_H460)
  AC_MSG_NOTICE(Disabling H.460)
fi

dnl ########################################################################
dnl check for disabling H.501

dnl MSWIN_DISPLAY h501,H.501
dnl MSWIN_DEFINE  h501,H323_H501

AC_ARG_ENABLE(h501,
       [  --disable-h501          disable H.501])
if test "${enable_h501}x" = "x" ; then
  enable_t38=$default_h501
fi
if test "$enable_h501" = "yes" ; then
  H323_H501=1
  AC_DEFINE(H323_H501, 1)
else
  H323_H501=
  AC_MSG_NOTICE(Disabling H.501)
fi
AC_SUBST(H323_H501)

dnl ########################################################################
dnl check for enabling T.120

dnl MSWIN_DISPLAY t120,T.120
dnl MSWIN_DEFINE  t120,H323_T120

AC_ARG_ENABLE(t120,
       [  --disable-t120          disable T.120])
if test "${enable_t120}x" = "x" ; then
  enable_t120=$default_t120
fi
if test "$enable_t120" = "no" ; then
  H323_T120=
  AC_MSG_NOTICE(Disabling T.120)
else
  H323_T20=1
  AC_DEFINE(H323_T120, 1)
fi
AC_SUBST(H323_T120)

dnl ########################################################################

dnl ########################################################################
dnl
dnl feature detections migrated from Makefile
dnl 
dnl MSWIN_DISPLAY ixj,Quicknet Internet xJACK cards
dnl MSWIN_DEFINE  ixj,HAS_IXJ

AC_ARG_ENABLE(ixj,
       [  --disable-ixj           disable Quicknet card support])
if test "${enable_ixj}x" = "x" ; then
  enable_ixj=$default_ixj
fi

HAS_IXJ=
H323_IXJ=
if test "$enable_ixj" = "no" ; then
  AC_MSG_NOTICE(Disabling IXJ support)
else
  AC_CHECK_HEADERS(linux/telephony.h sys/telephony.h /usr/local/include/sys/telephony.h, HAS_IXJ=1)
  if test "${HAS_IXJ}z" != "z" ; then
    AC_MSG_CHECKING(if ixjuser.h actually compiles)
    AC_TRY_COMPILE([#include <linux/ixjuser.h>],
                   [int main(int ac,char **av) { return 0; }], HAS_IXJ=1, HAS_IXJ=)
    if test "x$HAS_IXJ" != "x" ; then
      H323_IXJ=1
      AC_DEFINE(HAS_IXJ, 1)
      AC_MSG_RESULT(yes)
    else
      AC_MSG_RESULT(no)
    fi
  fi
fi
AC_SUBST(H323_IXJ)

dnl ########################################################################
dnl make directives

AC_SUBST(STDCCFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LDLIBS)
AC_SUBST(ENDLDLIBS)
AC_PROG_INSTALL

AC_CONFIG_FILES(openh323u.mak)
AC_CONFIG_FILES(Makefile)


dnl ########################################################################
dnl Header file

AC_CONFIG_HEADERS(include/openh323buildopts.h)


dnl ########################################################################
dnl Output configured files

AC_CONFIG_SUBDIRS(plugins)

AC_OUTPUT()


dnl ########################################################################
dnl check if upad128_t is defined (Solaris)

if test "${OSTYPE:-unknown}" = "solaris"; then
  AC_MSG_CHECKING(for upad128_t)
  AC_TRY_COMPILE([#include <sys/types.h>],
                 [upad128_t upad; upad._q = 0.0;], has_upad128_t=y)
  if test ${has_upad128_t} == "y"; then
    AC_MSG_RESULT(yes)
    AC_DEFINE(P_HAS_UPAD128_T)
  else
    AC_MSG_RESULT(no)
  fi
fi