use tzafrir's patch to fix this problem properly... i made the previous set of change...
[asterisk-bristuff.git] / configure.ac
blobab04ba3824af44894d40c4be834c39057a5db281
1 # Process this file with autoconf to produce a configure script.
3 AC_PREREQ(2.60)
5 AC_INIT(asterisk, 1.4, www.asterisk.org)
7 # cross-compile macros
8 AC_CANONICAL_BUILD
9 AC_CANONICAL_HOST
11 # check existence of the package
12 AC_CONFIG_SRCDIR([main/asterisk.c])
14 # specify output header file
15 AC_CONFIG_HEADER(include/asterisk/autoconfig.h)
17 AC_COPYRIGHT("Asterisk")
18 AC_REVISION($Revision$)
20 AC_GNU_SOURCE
21 AC_USE_SYSTEM_EXTENSIONS        # note- does not work on FreeBSD
23 case "${host_os}" in
24      freebsd*)
25      ac_default_prefix=/usr/local
26      CPPFLAGS=-I/usr/local/include
27      LDFLAGS=-L/usr/local/lib
28      ;;
29      *)
30      ac_default_prefix=/usr
31      if test ${sysconfdir} = '${prefix}/etc'; then
32         sysconfdir=/etc
33      fi
34      if test ${mandir} = '${prefix}/man'; then
35         mandir=/usr/share/man
36      fi
37      ;;
38 esac
40 if test ${localstatedir} = '${prefix}/var'; then
41      localstatedir=/var
44 BUILD_PLATFORM=${build}
45 BUILD_CPU=${build_cpu}
46 BUILD_VENDOR=${build_vendor}
47 BUILD_OS=${build_os}
49 AC_SUBST(BUILD_PLATFORM)
50 AC_SUBST(BUILD_CPU)
51 AC_SUBST(BUILD_VENDOR)
52 AC_SUBST(BUILD_OS)
54 HOST_PLATFORM=${host}
55 HOST_CPU=${host_cpu}
56 HOST_VENDOR=${host_vendor}
57 HOST_OS=${host_os}
59 AC_SUBST(HOST_PLATFORM)
60 AC_SUBST(HOST_CPU)
61 AC_SUBST(HOST_VENDOR)
62 AC_SUBST(HOST_OS)
64 case "${host_os}" in
65      freebsd*)
66      OSARCH=FreeBSD
67      ;;
68      netbsd*)
69      OSARCH=NetBSD
70      ;;
71      openbsd*)
72      OSARCH=OpenBSD
73      ;;
74      solaris*)
75      OSARCH=SunOS
76      ;;
77      *)
78      OSARCH=${HOST_OS}
79      ;;
80 esac
82 AC_SUBST(OSARCH)
84 #  check for uname
85 AC_PATH_TOOL([UNAME], [uname], No)
86 if test ! x"${UNAME}" = xNo; then
87    PBX_OSREV=$(${UNAME} -r)
89 AC_SUBST(PBX_OSREV)
91 AH_TOP(
92 #ifndef ASTERISK_AUTOCONFIG_H
93 #define ASTERISK_AUTOCONFIG_H
95 #include "asterisk/buildopts.h"
99 AH_BOTTOM(
100 #endif
103 # cross-compile checks
104 if test "${cross_compiling}" = "yes"; 
105 then
106    AC_CHECK_TOOL(CC, gcc, :)
107    AC_CHECK_TOOL(CXX, g++, :)
108    AC_CHECK_TOOL(LD, ld, :)
109    AC_CHECK_TOOL(RANLIB, ranlib, :)
112 # Checks for programs.
113 AC_PROG_CC
114 AC_PROG_CXX
115 AC_PROG_CPP
116 AC_PROG_CXXCPP
117 # This macro is just copied into our local acinclude.m4 from libtool.m4 so that
118 # the developers regenerating the configure script don't have to install libtool.
119 AST_PROG_LD     # note - does not work on freebsd
120 AC_PROG_AWK
121 AC_PROG_INSTALL
122 AC_PROG_LN_S
123 AC_PROG_RANLIB
124 AST_CHECK_GNU_MAKE
126 AC_PATH_TOOL([STRIP], [strip], :)
127 AC_PATH_TOOL([AR], [ar], :)
129 GNU_LD=0
130 if test "x$with_gnu_ld" = "xyes" ; then
131    GNU_LD=1
133 AC_SUBST(GNU_LD)
135 AC_PATH_PROG([AWK], [awk], :)
136 AC_PATH_PROG([GREP], [grep], :)
137 AC_PATH_PROG([FIND], [find], :)
138 AC_PATH_PROG([COMPRESS], [compress], :)
139 AC_PATH_PROG([BASENAME], [basename], :)
140 AC_PATH_PROG([ID], [id], :)
141 AC_PATH_PROG([DIRNAME], [dirname], :)
142 AC_PATH_PROG([SHELL], [sh], :)
143 AC_PATH_PROG([LN], [ln], :)
144 AC_PATH_PROG([DOT], [dot], :)
145 AC_PATH_PROG([WGET], [wget], :)
146 if test "${WGET}" != ":" ; then
147   DOWNLOAD=${WGET}
148 else
149   AC_PATH_PROG([FETCH], [fetch], [:])
150   DOWNLOAD=${FETCH}
152 AC_SUBST(DOWNLOAD)
154 AC_CHECK_TOOL([SOXMIX], [soxmix], [:])
155 if test "${SOXMIX}" != ":" ; then
156         AC_DEFINE([HAVE_SOXMIX], 1, [Define to 1 if your system has soxmix application.])
159 ACX_PTHREAD
161 AC_LANG(C)
163 AC_ARG_ENABLE(dev-mode,
164         [  --enable-dev-mode    Turn on developer mode],
165         [case "${enableval}" in
166               y|ye|yes) AST_DEVMODE=yes ;;
167               n|no)  AST_DEVMODE=no ;;
168               *) AC_MSG_ERROR(bad value ${enableval} for --enable-dev-mode)  ;;
169         esac])
170 AC_SUBST(AST_DEVMODE)
172 # package option names should be in alphabetical order
173 # by the --with option name, to make things easier for the users :-)
175 AST_EXT_LIB_SETUP([ALSA], [Advanced Linux Sound Architecture], [asound])
176 AST_EXT_LIB_SETUP([CURL], [cURL], [curl])
177 AST_EXT_LIB_SETUP([CAP], [POSIX 1.e capabilities], [cap])
178 AST_EXT_LIB_SETUP([CURSES], [curses], [curses])
179 AST_EXT_LIB_SETUP([DAHDI], [DAHDI], [dahdi])
180 AST_EXT_LIB_SETUP([GNUTLS], [GNU TLS support (used for iksemel only)], [gnutls])
181 AST_EXT_LIB_SETUP([GSM], [GSM], [gsm], [, or 'internal'])
182 AST_EXT_LIB_SETUP([IKSEMEL], [Iksemel Jabber Library], [iksemel])
183 AST_EXT_LIB_SETUP([IMAP_TK], [UW IMAP Toolkit], [imap])
184 AST_EXT_LIB_SETUP([ISDNNET], [ISDN4Linux Library], [isdnnet])
185 AST_EXT_LIB_SETUP([KDE], [KDE], [kde])
186 AST_EXT_LIB_SETUP([LTDL], [libtool], [ltdl])
187 AST_EXT_LIB_SETUP([MISDN], [mISDN User Library], [misdn])
188 AST_EXT_LIB_SETUP([NBS], [Network Broadcast Sound], [nbs])
189 AST_EXT_LIB_SETUP([NCURSES], [ncurses], [ncurses])
190 AST_EXT_LIB_SETUP([NETSNMP], [Net-SNMP], [netsnmp])
191 AST_EXT_LIB_SETUP([NEWT], [newt], [newt])
192 AST_EXT_LIB_SETUP([UNIXODBC], [unixODBC], [odbc])
193 AST_EXT_LIB_SETUP([OGG], [OGG], [ogg])
194 AST_EXT_LIB_SETUP([OSPTK], [OSP Toolkit], [osptk])
195 AST_EXT_LIB_SETUP([OSS], [Open Sound System], [oss])
196 AST_EXT_LIB_SETUP([POPT], [popt], [popt])
197 AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres])
198 AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri])
199 AST_EXT_LIB_SETUP([PWLIB], [PWlib], [pwlib])
200 AST_EXT_LIB_SETUP([OPENH323], [OpenH323], [h323])
201 AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])
202 AST_EXT_LIB_SETUP([SPEEX], [Speex], [speex])
203 AST_EXT_LIB_SETUP([SPEEXDSP], [Speexdsp], [speexdsp])
204 AST_EXT_LIB_SETUP([SQLITE], [SQLite], [sqlite])
205 AST_EXT_LIB_SETUP([SUPPSERV], [mISDN Supplemental Services], [suppserv])
206 AST_EXT_LIB_SETUP([OPENSSL], [OpenSSL], [ssl])
207 AST_EXT_LIB_SETUP([FREETDS], [FreeTDS], [tds])
208 AST_EXT_LIB_SETUP([TERMCAP], [Termcap], [termcap])
209 AST_EXT_LIB_SETUP([TINFO], [Term Info], [tinfo])
210 AST_EXT_LIB_SETUP([TONEZONE], [tonezone], [tonezone])
211 AST_EXT_LIB_SETUP([USB], [usb], [usb])
212 AST_EXT_LIB_SETUP([VORBIS], [Vorbis], [vorbis])
213 AST_EXT_LIB_SETUP([VPB], [Voicetronix API], [vpb])
214 AST_EXT_LIB_SETUP([ZLIB], [zlib], [z])
215 AST_EXT_LIB_SETUP([ZAPTEL], [Zaptel], [zaptel])
217 # check for basic system features and functionality before
218 # checking for package libraries
220 AC_FUNC_ALLOCA
221 AC_HEADER_DIRENT
222 AC_HEADER_STDC
223 AC_HEADER_SYS_WAIT
224 AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h])
226 AC_SYS_LARGEFILE
228 # Checks for typedefs, structures, and compiler characteristics.
229 AC_HEADER_STDBOOL
230 AC_C_CONST
231 AC_TYPE_UID_T
232 AC_C_INLINE
233 AC_TYPE_MODE_T
234 AC_TYPE_OFF_T
235 AC_TYPE_PID_T
236 AC_TYPE_SIZE_T
237 AC_CHECK_MEMBERS([struct stat.st_blksize])
238 AC_HEADER_TIME
239 AC_STRUCT_TM
240 AC_C_VOLATILE
241 AC_CHECK_TYPES([ptrdiff_t])
243 # Checks for library functions.
244 AC_FUNC_CHOWN
245 AC_FUNC_CLOSEDIR_VOID
246 AC_FUNC_ERROR_AT_LINE
247 AST_FUNC_FORK
248 AC_FUNC_FSEEKO
249 AC_PROG_GCC_TRADITIONAL
250 # XXX: these are commented out until we determine whether it matters if our malloc()
251 # acts exactly like glibc's or not
252 # AC_FUNC_MALLOC
253 # AC_FUNC_REALLOC
254 AC_FUNC_MEMCMP
255 AC_FUNC_MMAP
256 AC_FUNC_SELECT_ARGTYPES
257 AC_FUNC_SETVBUF_REVERSED
258 AC_TYPE_SIGNAL
259 AC_FUNC_STAT
260 AC_FUNC_STRCOLL
261 AC_FUNC_STRFTIME
262 AC_FUNC_STRNLEN
263 AC_FUNC_STRTOD
264 AC_FUNC_UTIME_NULL
265 AC_FUNC_VPRINTF
266 AC_CHECK_FUNCS([asprintf atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strtoq unsetenv utime vasprintf])
268 # some systems already have gethostbyname_r so we don't need to build ours in main/utils.c
269 AC_SEARCH_LIBS(gethostbyname_r, [socket nsl])
271 AC_MSG_CHECKING(for gethostbyname_r with 6 arguments)
272 AC_LINK_IFELSE(
273         AC_LANG_PROGRAM([#include <stdlib.h>
274                          #include <netdb.h>],
275                         [struct hostent *he = gethostbyname_r((const char *)NULL, (struct hostent *)NULL, (char *)NULL, (int)0, (struct hostent **)NULL, (int *)NULL);]),
276         AC_MSG_RESULT(yes)
277         AC_DEFINE([HAVE_GETHOSTBYNAME_R_6], 1, [Define to 1 if your system has gethostbyname_r with 6 arguments.]),
278         AC_MSG_RESULT(no)
281 AC_MSG_CHECKING(for gethostbyname_r with 5 arguments)
282 AC_LINK_IFELSE(
283         AC_LANG_PROGRAM([#include <stdlib.h>
284                          #include <netdb.h>],
285                         [struct hostent *he = gethostbyname_r((const char *)NULL, (struct hostent *)NULL, (char *)NULL, (int)0, (int *)NULL);]),
286         AC_MSG_RESULT(yes)
287         AC_DEFINE([HAVE_GETHOSTBYNAME_R_5], 1, [Define to 1 if your system has gethostbyname_r with 5 arguments.]),
288         AC_MSG_RESULT(no)
291 AC_MSG_CHECKING(for PTHREAD_RWLOCK_INITIALIZER)
292 AC_LINK_IFELSE(
293         AC_LANG_PROGRAM([#include <pthread.h>],
294                         [int foo = PTHREAD_RWLOCK_INITIALIZER;]),
295         AC_MSG_RESULT(yes)
296         AC_DEFINE([HAVE_PTHREAD_RWLOCK_INITIALIZER], 1, [Define to 1 if your system has PTHREAD_RWLOCK_INITIALIZER.]),
297         AC_MSG_RESULT(no)
300 AC_MSG_CHECKING(for PTHREAD_RWLOCK_PREFER_WRITER_NP)
301 AC_LINK_IFELSE(
302         AC_LANG_PROGRAM([#include <pthread.h>],
303                         [int foo = PTHREAD_RWLOCK_PREFER_WRITER_NP;]),
304         AC_MSG_RESULT(yes)
305         AC_DEFINE([HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NP], 1, [Define to 1 if your system has PTHREAD_RWLOCK_PREFER_WRITER_NP.]),
306         AC_MSG_RESULT(no)
309 AC_MSG_CHECKING(for compiler atomic operations)
310 AC_LINK_IFELSE(
311 AC_LANG_PROGRAM([], [int foo1; int foo2 = __sync_fetch_and_add(&foo1, 1);]),
312 AC_MSG_RESULT(yes)
313 AC_DEFINE([HAVE_GCC_ATOMICS], 1, [Define to 1 if your GCC C compiler provides atomic operations.]),
314 AC_MSG_RESULT(no)
317 AST_GCC_ATTRIBUTE(pure)
318 AST_GCC_ATTRIBUTE(malloc)
319 AST_GCC_ATTRIBUTE(const)
320 AST_GCC_ATTRIBUTE(unused)
321 AST_GCC_ATTRIBUTE(always_inline)
322 AST_GCC_ATTRIBUTE(deprecated)
324 AC_MSG_CHECKING(for -ffunction-sections support)
325 saved_CFLAGS="${CFLAGS}"
326 CFLAGS="${CFLAGS} -ffunction-sections"
327 AC_COMPILE_IFELSE(
328         AC_LANG_PROGRAM([], [int x = 1;]),
329         AC_MSG_RESULT(yes)
330         [saved_LDFLAGS="${LDFLAGS}"]
331         [LDFLAGS="${LDFLAGS} -Wl,--gc-sections"]
332         AC_MSG_CHECKING(for --gc-sections support)
333         AC_LINK_IFELSE(
334                 AC_LANG_PROGRAM([], [int x = 1;]),
335                 AC_MSG_RESULT(yes)
336                 [GC_CFLAGS="-ffunction-sections"]
337                 [[GC_LDFLAGS="-Wl,--gc-sections"]],
338                 AC_MSG_RESULT(no)
339         )
340         [LDFLAGS="${saved_LDFLAGS}"],
341         AC_MSG_RESULT(no)
343 CFLAGS="${saved_CFLAGS}"
344 AC_SUBST(GC_CFLAGS)
345 AC_SUBST(GC_LDFLAGS)
347 AC_MSG_CHECKING(for -Wdeclaration-after-statement support)
348 if $(${CC} -Wdeclaration-after-statement -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
349    AC_MSG_RESULT(yes)
350    AST_DECLARATION_AFTER_STATEMENT=-Wdeclaration-after-statement
351 else
352         AC_MSG_RESULT(no)
353         AST_DECLARATION_AFTER_STATEMENT=
355 AC_SUBST(AST_DECLARATION_AFTER_STATEMENT)
357 AC_MSG_CHECKING(for -fno-strict-overflow)
358 if $(${CC} -O2 -fno-strict-overflow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
359    AC_MSG_RESULT(yes)
360    AST_NO_STRICT_OVERFLOW=-fno-strict-overflow
361 else
362         AC_MSG_RESULT(no)
363         AST_NO_STRICT_OVERFLOW=
365 AC_SUBST(AST_NO_STRICT_OVERFLOW)
367 AC_SEARCH_LIBS(res_9_ninit, resolv)
368 AC_MSG_CHECKING(for res_ninit)
369 AC_LINK_IFELSE(
370         AC_LANG_PROGRAM([
371                         #ifdef HAVE_SYS_SOCKET_H
372                         #include <sys/socket.h>
373                         #endif
374                         #ifdef HAVE_NETINET_IN_H
375                         #include <netinet/in.h>
376                         #endif
377                         #ifdef HAVE_ARPA_NAMESER_H
378                         #include <arpa/nameser.h>
379                         #endif
380                         #include <resolv.h>],
381                         [int foo = res_ninit(NULL);]),
382         AC_MSG_RESULT(yes)
383         AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.])
384         AC_SEARCH_LIBS(res_9_ndestroy, resolv)
385         AC_MSG_CHECKING(for res_ndestroy)
386         AC_LINK_IFELSE(
387                 AC_LANG_PROGRAM([
388                                 #ifdef HAVE_SYS_SOCKET_H
389                                 #include <sys/socket.h>
390                                 #endif
391                                 #ifdef HAVE_NETINET_IN_H
392                                 #include <netinet/in.h>
393                                 #endif
394                                 #ifdef HAVE_ARPA_NAMESER_H
395                                 #include <arpa/nameser.h>
396                                 #endif
397                                 #include <resolv.h>],
398                                 [res_ndestroy(NULL);]),
399                 AC_MSG_RESULT(yes)
400                 AC_DEFINE([HAVE_RES_NDESTROY], 1, [Define to 1 if your system has the ndestroy resolver function.]),
401                 AC_MSG_RESULT(no)
402         ),
403         AC_MSG_RESULT(no)
406 AC_MSG_CHECKING(for RTLD_NOLOAD)
407 AC_LINK_IFELSE(
408         AC_LANG_PROGRAM([#include <dlfcn.h>],
409                         [int foo = RTLD_NOLOAD;]),
410         AC_MSG_RESULT(yes)
411         AC_DEFINE([HAVE_RTLD_NOLOAD], 1, [Define to 1 if your system has a dynamic linker that supports RTLD_NOLOAD.]),
412         AC_MSG_RESULT(no)
415 AC_MSG_CHECKING(for IP_MTU_DISCOVER)
416 AC_LINK_IFELSE(
417         AC_LANG_PROGRAM([#include <netinet/in.h>],
418                         [int foo = IP_MTU_DISCOVER;]),
419         AC_MSG_RESULT(yes)
420         AC_DEFINE([HAVE_IP_MTU_DISCOVER], 1, [Define to 1 if your system has PMTU discovery on UDP sockets.]),
421         AC_MSG_RESULT(no)
424 AC_CHECK_HEADER([libkern/OSAtomic.h],
425                 [AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
427 AC_CHECK_SIZEOF(int)
429 # do the package library checks now
431 AST_EXT_LIB_CHECK([ALSA], [asound], [snd_spcm_init], [alsa/asoundlib.h], [-lm -ldl])
433 AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
435 if test "x${host_os}" = "xlinux-gnu" ; then
436   AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h])
439 if test "${USE_DAHDI}" != "no" ; then
440         AST_C_DEFINE_CHECK([DAHDI], [DAHDI_CODE], [dahdi/user.h])
441         if test "x${PBX_DAHDI}" = "x1" ; then
442                 PBX_ZAPTEL_TRANSCODE=1
443                 AC_SUBST(PBX_ZAPTEL_TRANSCODE)
444         fi
447 AST_C_COMPILE_CHECK([GETIFADDRS], [struct ifaddrs *p; getifaddrs(&p)], [ifaddrs.h])
449 GSM_INTERNAL="yes"
450 AC_SUBST(GSM_INTERNAL)
451 GSM_SYSTEM="yes"
452 if test "${USE_GSM}" != "no"; then
453    if test "${GSM_DIR}" = "internal"; then
454       GSM_SYSTEM="no"
455    elif test "${GSM_DIR}" != ""; then
456       GSM_INTERNAL="no"
457    fi
458    if test "${GSM_SYSTEM}" = "yes"; then
459       gsmlibdir=""
460       if test "x${GSM_DIR}" != "x"; then
461          if test -d ${GSM_DIR}/lib; then
462             gsmlibdir="-L${GSM_DIR}/lib"
463          else
464             gsmlibdir="-L${GSM_DIR}"
465          fi
466       fi
467       AC_CHECK_LIB([gsm], [gsm_create], AC_DEFINE_UNQUOTED([HAVE_GSM], 1,
468       [Define to indicate the GSM library]), [], ${gsmlibdir})
469       if test "${ac_cv_lib_gsm_gsm_create}" = "yes"; then
470          if test "x${GSM_DIR}" != "x" ; then
471             AC_CHECK_HEADER([${GSM_DIR}/include/gsm.h], [GSM_HEADER_FOUND=1], [GSM_HEADER_FOUND=0])
472             AC_CHECK_HEADER([${GSM_DIR}/include/gsm/gsm.h], [GSM_GSM_HEADER_FOUND=1], [GSM_GSM_HEADER_FOUND=0])
473          else
474             AC_CHECK_HEADER([gsm.h], [GSM_HEADER_FOUND=1], [GSM_HEADER_FOUND=0])
475             AC_CHECK_HEADER([gsm/gsm.h], [GSM_GSM_HEADER_FOUND=1], [GSM_GSM_HEADER_FOUND=0])
476          fi
477          if test "${GSM_HEADER_FOUND}" = "0" ; then
478             if test "{GSM_GSM_HEADER_FOUND}" = "0" ; then
479                if test "x${GSM_MANDATORY}" = "xyes" ; then
480                   AC_MSG_NOTICE([***])
481                   AC_MSG_NOTICE([*** It appears that you do not have the gsm development package installed.])
482                   AC_MSG_NOTICE([*** Please install it to include ${GSM_DESCRIP} support, or re-run configure])
483                   AC_MSG_NOTICE([*** without explicitly specifying --with-${GSM_OPTION}])
484                   exit 1
485                fi
486             fi
487          fi
488          GSM_OK=0
489          if test "${GSM_HEADER_FOUND}" = "1" ; then
490             AC_DEFINE_UNQUOTED([HAVE_GSM_HEADER], 1, [Define to indicate that gsm.h has no prefix for its location])
491             GSM_OK=1
492          else
493             if test "${GSM_GSM_HEADER_FOUND}" = "1" ; then
494                AC_DEFINE_UNQUOTED([HAVE_GSM_GSM_HEADER], 1, [Define to indicate that gsm.h is in gsm/gsm.h])
495                GSM_OK=1
496             fi
497          fi
498          if test "${GSM_OK}" = "1" ; then
499             GSM_LIB="-lgsm"
500             if test "x${GSM_DIR}" != "x"; then
501                GSM_LIB="${gsmlibdir} ${GSM_LIB}"
502                GSM_INCLUDE="-I${GSM_DIR}/include"
503             fi
504             PBX_GSM=1
505             GSM_INTERNAL="no"
506          fi
507       fi
508    fi
509    if test "${GSM_INTERNAL}" = "yes"; then
510       PBX_GSM=1
511       AC_DEFINE_UNQUOTED([HAVE_GSM_HEADER], 1, [Define to indicate that gsm.h has no prefix for its location])
512    fi
515 AST_EXT_LIB_CHECK([IKSEMEL], [iksemel], [iks_start_sasl], [iksemel.h])
517 if test "${PBX_IKSEMEL}" = 1; then
518    AST_EXT_LIB_CHECK([GNUTLS], [gnutls], [gnutls_bye], [gnutls/gnutls.h], [-lz -lgcrypt -lgpg-error])
521 if test "${USE_IMAP_TK}" != "no"; then
522         saved_cppflags="${CPPFLAGS}"
523         saved_libs="${LIBS}"
524         switch_to_system_on_failure="no"
525         if test "${IMAP_TK_DIR}" = ""; then
526                 IMAP_TK_DIR=`pwd`"/../imap-2004g"
527                 switch_to_system_on_failure="yes"
528         fi
529         if test "${IMAP_TK_DIR}" != "system"; then
530                 AC_MSG_CHECKING(for UW IMAP Toolkit c-client library)
531                 if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then
532                 imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS`
533                 fi
534                 imap_libs="${IMAP_TK_DIR}/c-client/c-client.a"
535                 imap_include="-I${IMAP_TK_DIR}/c-client"
536         CPPFLAGS="${CPPFLAGS} ${imap_include}"
537                 LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
538                 AC_LINK_IFELSE(
539                 AC_LANG_PROGRAM(
540                                 [#include "c-client.h"
541                                 void mm_searched (MAILSTREAM *stream,unsigned long number)
542                                 {
543                                 }
544                                 void mm_exists (MAILSTREAM *stream,unsigned long number)
545                                 {
546                                 }
547                                 void mm_expunged (MAILSTREAM *stream,unsigned long number)
548                                 {
549                                 }
550                                 void mm_flags (MAILSTREAM *stream,unsigned long number)
551                                 {
552                                 }
553                                 void mm_notify (MAILSTREAM *stream,char *string,long errflg)
554                                 {
555                                 }
556                                 void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
557                                 {
558                                 }
559                                 void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
560                                 {
561                                 }
562                                 void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
563                                 {
564                                 }
565                                 void mm_log (char *string,long errflg)
566                                 {
567                                 }
568                                 void mm_dlog (char *string)
569                                 {
570                                 }
571                                 void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
572                                 {
573                                 }
574                                 void mm_critical (MAILSTREAM *stream)
575                                 {
576                                 }
577                                 void mm_nocritical (MAILSTREAM *stream)
578                                 {
579                                 }
580                                 long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
581                                 {
582                                 }
583                                 void mm_fatal (char *string)
584                                 {
585                                 }],
586                                 [
587                                 MAILSTREAM *foo = mail_open(NULL, "", 0);
588                                 ]
589                         ),
590                         [ac_cv_imap_tk="yes"],
591                         [ac_cv_imap_tk="no"]
592                 )
593                 if test "${ac_cv_imap_tk}" = "yes"; then
594                         AC_LINK_IFELSE(
595                                 AC_LANG_PROGRAM(
596                                         [#include "c-client.h"
597                                         void mm_searched (MAILSTREAM *stream,unsigned long number)
598                                         {
599                                         }
600                                         void mm_exists (MAILSTREAM *stream,unsigned long number)
601                                         {
602                                         }
603                                         void mm_expunged (MAILSTREAM *stream,unsigned long number)
604                                         {
605                                         }
606                                         void mm_flags (MAILSTREAM *stream,unsigned long number)
607                                         {
608                                         }
609                                         void mm_notify (MAILSTREAM *stream,char *string,long errflg)
610                                         {
611                                         }
612                                         void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
613                                         {
614                                         }
615                                         void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
616                                         {
617                                         }
618                                         void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
619                                         {
620                                         }
621                                         void mm_log (char *string,long errflg)
622                                         {
623                                         }
624                                         void mm_dlog (char *string)
625                                         {
626                                         }
627                                         void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
628                                         {
629                                         }
630                                         void mm_critical (MAILSTREAM *stream)
631                                         {
632                                         }
633                                         void mm_nocritical (MAILSTREAM *stream)
634                                         {
635                                         }
636                                         long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
637                                         {
638                                         }
639                                         void mm_fatal (char *string)
640                                         {
641                                         }],
642                                         [
643                                         long check = mail_expunge_full(NULL, "", 0);
644                                         ]
645                                 ),
646                                 [ac_cv_imap_tk2006="yes"],
647                                 [ac_cv_imap_tk2006="no"]
648                         )
649                 fi
650                 CPPFLAGS="${saved_cppflags}"
651                 LIBS="${saved_libs}"
652                 if test "${ac_cv_imap_tk}" = "no"; then
653                         AC_MSG_RESULT(no)
654                         if test "${switch_to_system_on_failure}" = "yes"; then 
655                                 IMAP_TK_DIR="system"
656                         else #This means they specified a directory. Search for a package installation there too
657                                 AC_MSG_CHECKING([for system c-client library...])
658                                 CPPFLAGS="${saved_cppflags}"
659                                 LIBS="${saved_libs}"
660                                 imap_include="-I${IMAP_TK_DIR}/include"
661                                 imap_ldflags="-L${IMAP_TK_DIR}/lib"
662                                 imap_libs="-lc-client"
663                                 CPPFLAGS="${CPPFLAGS} ${imap_include}"
664                                 LIBS="${LIBS} ${imap_libs} ${imap_ldflags}"
665                                 AC_LINK_IFELSE(
666                                 AC_LANG_PROGRAM(
667                                                 [#include "c-client.h"
668                                                 void mm_searched (MAILSTREAM *stream,unsigned long number)
669                                                 {
670                                                 }
671                                                 void mm_exists (MAILSTREAM *stream,unsigned long number)
672                                                 {
673                                                 }
674                                                 void mm_expunged (MAILSTREAM *stream,unsigned long number)
675                                                 {
676                                                 }
677                                                 void mm_flags (MAILSTREAM *stream,unsigned long number)
678                                                 {
679                                                 }
680                                                 void mm_notify (MAILSTREAM *stream,char *string,long errflg)
681                                                 {
682                                                 }
683                                                 void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
684                                                 {
685                                                 }
686                                                 void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
687                                                 {
688                                                 }
689                                                 void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
690                                                 {
691                                                 }
692                                                 void mm_log (char *string,long errflg)
693                                                 {
694                                                 }
695                                                 void mm_dlog (char *string)
696                                                 {
697                                                 }
698                                                 void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
699                                                 {
700                                                 }
701                                                 void mm_critical (MAILSTREAM *stream)
702                                                 {
703                                                 }
704                                                 void mm_nocritical (MAILSTREAM *stream)
705                                                 {
706                                                 }
707                                                 long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
708                                                 {
709                                                 }
710                                                 void mm_fatal (char *string)
711                                                 {
712                                                 }],
713                                                 [
714                                                 MAILSTREAM *foo = mail_open(NULL, "", 0);
715                                                 ]
716                                         ),
717                                         [ac_cv_imap_tk="yes"],
718                                         [ac_cv_imap_tk="no"]
719                                 )
720                                 if test "${ac_cv_imap_tk}" = "yes"; then
721                                         AC_LINK_IFELSE(
722                                                 AC_LANG_PROGRAM(
723                                                         [#include "c-client.h"
724                                                         void mm_searched (MAILSTREAM *stream,unsigned long number)
725                                                         {
726                                                         }
727                                                         void mm_exists (MAILSTREAM *stream,unsigned long number)
728                                                         {
729                                                         }
730                                                         void mm_expunged (MAILSTREAM *stream,unsigned long number)
731                                                         {
732                                                         }
733                                                         void mm_flags (MAILSTREAM *stream,unsigned long number)
734                                                         {
735                                                         }
736                                                         void mm_notify (MAILSTREAM *stream,char *string,long errflg)
737                                                         {
738                                                         }
739                                                         void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
740                                                         {
741                                                         }
742                                                         void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
743                                                         {
744                                                         }
745                                                         void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
746                                                         {
747                                                         }
748                                                         void mm_log (char *string,long errflg)
749                                                         {
750                                                         }
751                                                         void mm_dlog (char *string)
752                                                         {
753                                                         }
754                                                         void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
755                                                         {
756                                                         }
757                                                         void mm_critical (MAILSTREAM *stream)
758                                                         {
759                                                         }
760                                                         void mm_nocritical (MAILSTREAM *stream)
761                                                         {
762                                                         }
763                                                         long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
764                                                         {
765                                                         }
766                                                         void mm_fatal (char *string)
767                                                         {
768                                                         }],
769                                                         [
770                                                         long check = mail_expunge_full(NULL, "", 0);
771                                                         ]
772                                                 ),
773                                                 [ac_cv_imap_tk2006="yes"],
774                                                 [ac_cv_imap_tk2006="no"]
775                                         )
776                                 fi
777                         fi
778                 fi
779         fi 
780         if test "${IMAP_TK_DIR}" = "system"; then
781                 #We will enter here if user specified "system" or if any of above checks failed
782                 AC_MSG_CHECKING([for system c-client library...])
783                 CPPFLAGS="${saved_cppflags}"
784                 LIBS="${saved_libs}"
785                 imap_ldflags=""
786                 imap_libs="-lc-client"
787                 imap_include="-DUSE_SYSTEM_IMAP" #Try the imap directory first
788                 CPPFLAGS="${CPPFLAGS} ${imap_include}"
789                 LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
790                 AC_LINK_IFELSE(
791                 AC_LANG_PROGRAM(
792                                 [#include <stdio.h>
793                                 #include <imap/c-client.h>
794                                 void mm_searched (MAILSTREAM *stream,unsigned long number)
795                                 {
796                                 }
797                                 void mm_exists (MAILSTREAM *stream,unsigned long number)
798                                 {
799                                 }
800                                 void mm_expunged (MAILSTREAM *stream,unsigned long number)
801                                 {
802                                 }
803                                 void mm_flags (MAILSTREAM *stream,unsigned long number)
804                                 {
805                                 }
806                                 void mm_notify (MAILSTREAM *stream,char *string,long errflg)
807                                 {
808                                 }
809                                 void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
810                                 {
811                                 }
812                                 void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
813                                 {
814                                 }
815                                 void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
816                                 {
817                                 }
818                                 void mm_log (char *string,long errflg)
819                                 {
820                                 }
821                                 void mm_dlog (char *string)
822                                 {
823                                 }
824                                 void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
825                                 {
826                                 }
827                                 void mm_critical (MAILSTREAM *stream)
828                                 {
829                                 }
830                                 void mm_nocritical (MAILSTREAM *stream)
831                                 {
832                                 }
833                                 long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
834                                 {
835                                 }
836                                 void mm_fatal (char *string)
837                                 {
838                                 }],
839                                 [
840                                 MAILSTREAM *foo = mail_open(NULL, "", 0);
841                                 ]
842                         ),
843                         [ac_cv_imap_tk="yes"],
844                         [ac_cv_imap_tk="no"]
845                 )
846                 if test "${ac_cv_imap_tk}" = "yes"; then
847                         AC_LINK_IFELSE(
848                                 AC_LANG_PROGRAM(
849                                         [#include <stdio.h>
850                                         #include <imap/c-client.h>
851                                         void mm_searched (MAILSTREAM *stream,unsigned long number)
852                                         {
853                                         }
854                                         void mm_exists (MAILSTREAM *stream,unsigned long number)
855                                         {
856                                         }
857                                         void mm_expunged (MAILSTREAM *stream,unsigned long number)
858                                         {
859                                         }
860                                         void mm_flags (MAILSTREAM *stream,unsigned long number)
861                                         {
862                                         }
863                                         void mm_notify (MAILSTREAM *stream,char *string,long errflg)
864                                         {
865                                         }
866                                         void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
867                                         {
868                                         }
869                                         void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
870                                         {
871                                         }
872                                         void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
873                                         {
874                                         }
875                                         void mm_log (char *string,long errflg)
876                                         {
877                                         }
878                                         void mm_dlog (char *string)
879                                         {
880                                         }
881                                         void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
882                                         {
883                                         }
884                                         void mm_critical (MAILSTREAM *stream)
885                                         {
886                                         }
887                                         void mm_nocritical (MAILSTREAM *stream)
888                                         {
889                                         }
890                                         long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
891                                         {
892                                         }
893                                         void mm_fatal (char *string)
894                                         {
895                                         }],
896                                         [
897                                         long check = mail_expunge_full(NULL, "", 0);
898                                         ]
899                                 ),
900                                 [ac_cv_imap_tk2006="yes"],
901                                 [ac_cv_imap_tk2006="no"]
902                         )
903                 else #looking in imap directory didn't work, try c-client
904                         imap_ldflags=""
905                         imap_libs="-lc-client"
906                         imap_include="-DUSE_SYSTEM_CCLIENT"
907                         CPPFLAGS="${saved_cppflags}"
908                         LIBS="${saved_libs}"
909                         CPPFLAGS="${CPPFLAGS} ${imap_include}"
910                         LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
911                         AC_LINK_IFELSE(
912                         AC_LANG_PROGRAM(
913                                         [#include <stdio.h>
914                                         #include <c-client/c-client.h>
915                                         void mm_searched (MAILSTREAM *stream,unsigned long number)
916                                         {
917                                         }
918                                         void mm_exists (MAILSTREAM *stream,unsigned long number)
919                                         {
920                                         }
921                                         void mm_expunged (MAILSTREAM *stream,unsigned long number)
922                                         {
923                                         }
924                                         void mm_flags (MAILSTREAM *stream,unsigned long number)
925                                         {
926                                         }
927                                         void mm_notify (MAILSTREAM *stream,char *string,long errflg)
928                                         {
929                                         }
930                                         void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
931                                         {
932                                         }
933                                         void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
934                                         {
935                                         }
936                                         void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
937                                         {
938                                         }
939                                         void mm_log (char *string,long errflg)
940                                         {
941                                         }
942                                         void mm_dlog (char *string)
943                                         {
944                                         }
945                                         void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
946                                         {
947                                         }
948                                         void mm_critical (MAILSTREAM *stream)
949                                         {
950                                         }
951                                         void mm_nocritical (MAILSTREAM *stream)
952                                         {
953                                         }
954                                         long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
955                                         {
956                                         }
957                                         void mm_fatal (char *string)
958                                         {
959                                         }],
960                                         [
961                                         MAILSTREAM *foo = mail_open(NULL, "", 0);
962                                         ]
963                                 ),
964                                 [ac_cv_imap_tk="yes"],
965                                 [ac_cv_imap_tk="no"]
966                         )
967                         if test "${ac_cv_imap_tk}" = "yes"; then
968                                 AC_LINK_IFELSE(
969                                         AC_LANG_PROGRAM(
970                                                 [#include <stdio.h>
971                                                 #include <c-client/c-client.h>
972                                                 void mm_searched (MAILSTREAM *stream,unsigned long number)
973                                                 {
974                                                 }
975                                                 void mm_exists (MAILSTREAM *stream,unsigned long number)
976                                                 {
977                                                 }
978                                                 void mm_expunged (MAILSTREAM *stream,unsigned long number)
979                                                 {
980                                                 }
981                                                 void mm_flags (MAILSTREAM *stream,unsigned long number)
982                                                 {
983                                                 }
984                                                 void mm_notify (MAILSTREAM *stream,char *string,long errflg)
985                                                 {
986                                                 }
987                                                 void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
988                                                 {
989                                                 }
990                                                 void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
991                                                 {
992                                                 }
993                                                 void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
994                                                 {
995                                                 }
996                                                 void mm_log (char *string,long errflg)
997                                                 {
998                                                 }
999                                                 void mm_dlog (char *string)
1000                                                 {
1001                                                 }
1002                                                 void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
1003                                                 {
1004                                                 }
1005                                                 void mm_critical (MAILSTREAM *stream)
1006                                                 {
1007                                                 }
1008                                                 void mm_nocritical (MAILSTREAM *stream)
1009                                                 {
1010                                                 }
1011                                                 long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
1012                                                 {
1013                                                 }
1014                                                 void mm_fatal (char *string)
1015                                                 {
1016                                                 }],
1017                                                 [
1018                                                 long check = mail_expunge_full(NULL, "", 0);
1019                                                 ]
1020                                         ),
1021                                         [ac_cv_imap_tk2006="yes"],
1022                                         [ac_cv_imap_tk2006="no"]
1023                                 )
1024                         fi
1025                 fi
1026         fi
1027         if test "${ac_cv_imap_tk}" = "yes"; then
1028                 AC_MSG_RESULT(yes)
1029                 IMAP_TK_LIB="${imap_libs} "`echo ${imap_ldflags}`
1030                 IMAP_TK_INCLUDE="${imap_include}"
1031                 PBX_IMAP_TK=1
1032                 AC_DEFINE([HAVE_IMAP_TK], 1, [Define if your system has the UW IMAP Toolkit c-client library.])
1033                 if test "${ac_cv_imap_tk2006}" = "yes"; then
1034                         AC_DEFINE([HAVE_IMAP_TK2006], 1, [Define if your system has the UW IMAP Toolkit c-client library version 2006 or greater.])
1035                 fi
1036         elif test -n "${IMAP_TK_MANDATORY}"; then
1037                 AC_MSG_RESULT(no) 
1038                 AC_MSG_NOTICE([***])
1039                 AC_MSG_NOTICE([*** The UW IMAP Toolkit installation on this system appears to be broken.])
1040                 AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1041                 AC_MSG_NOTICE([*** including --without-imap.])
1042                 exit 1
1043         else
1044                 AC_MSG_RESULT(no)
1045         fi
1046         CPPFLAGS="${saved_cppflags}"
1047         LIBS="${saved_libs}"
1050 # Needed by unixodbc
1051 AST_EXT_LIB_CHECK([LTDL], [ltdl], [lt_dlinit], [ltdl.h], [])
1053 AC_LANG_PUSH(C++)
1055 if test "${USE_KDE}" != "no"; then
1056    AC_MSG_CHECKING(for crashHandler in -lkdecore)
1057    saved_libs="${LIBS}"
1058    saved_cppflags="${CPPFLAGS}"
1059    CPPFLAGS="${CPPFLAGS} -I${KDE_DIR}/include"
1060    if test -d ${KDE_DIR}/lib; then
1061       kdelibdir="${KDE_DIR}/lib"
1062    else
1063       kdelibdir="${KDE_DIR}"
1064    fi
1065    LIBS="${LIBS} -L${kdelibdir} -lkdecore"
1067    AC_LINK_IFELSE(
1068         [AC_LANG_PROGRAM(
1069                         [#include "kcrash.h"],
1070                         [KCrash::defaultCrashHandler(1);])
1071         ],
1072         [ac_cv_lib_kde_crash="yes"],
1073         [ac_cv_lib_kde_crash="no"])
1074                 
1075    LIBS="${saved_libs}"
1076    CPPFLAGS="${saved_cppflags}"
1077         
1078    if test "${ac_cv_lib_kde_crash}" = "yes"; then
1079       AC_MSG_RESULT(yes) 
1080       KDE_LIB="-lkdecore -lkdeui"
1081       if test "${KDE_DIR}" != ""; then
1082          KDE_LIB="-L${kdelibdir} ${KDE_LIB}"
1083          KDE_INCLUDE="-I${KDE_DIR}/include"
1084       fi
1085       PBX_KDE=1
1086       AC_DEFINE([HAVE_LIBKDE], 1, [Define if your system has the KDE libraries.])
1087    elif test -n "${KDE_MANDATORY}"; then
1088       AC_MSG_RESULT(no) 
1089       AC_MSG_NOTICE([***])
1090       AC_MSG_NOTICE([*** The KDE installation on this system appears to be broken.])
1091       AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1092       AC_MSG_NOTICE([*** including --without-kde.])
1093       exit 1
1094    else
1095       AC_MSG_RESULT(no) 
1096    fi
1098 if test "${PBX_KDE}" = 1; then
1099    AC_PATH_TOOL(KDEINIT, kdeinit, No)
1100    if test ! x"${KDEINIT}" = xNo; then
1101       KDEDIR=$(${DIRNAME} ${KDEINIT})
1102       KDEDIR=$(${DIRNAME} ${KDEDIR})
1103    fi
1104    AC_SUBST([KDEDIR])
1107 AC_LANG_POP
1109 AST_EXT_LIB_CHECK([MISDN], [mISDN], [mISDN_open], [mISDNuser/mISDNlib.h])
1111 if test "${PBX_MISDN}" = 1; then
1112    AST_EXT_LIB_CHECK([ISDNNET], [isdnnet], [init_manager], [mISDNuser/isdn_net.h], [-lmISDN -lpthread])
1113    AST_EXT_LIB_CHECK([SUPPSERV], [suppserv], [encodeFac], [mISDNuser/suppserv.h])
1114    AC_CHECK_HEADER([linux/mISDNdsp.h], [AC_DEFINE_UNQUOTED([MISDN_1_2], 1, [Build chan_misdn for mISDN 1.2 or later.])])
1117 AST_EXT_LIB_CHECK([NBS], [nbs], [nbs_connect], [nbs.h])
1119 AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])
1121 NETSNMP_CONFIG=No
1122 if test "${USE_NETSNMP}" != "no"; then  
1123    if test "x${NETSNMP_DIR}" != "x"; then
1124       AC_PATH_TOOL([NETSNMP_CONFIG], [net-snmp-config], No, [${NETSNMP_DIR}/bin])
1125       if test x"${NETSNMP_CONFIG}" = xNo; then
1126          AC_MSG_NOTICE([***])
1127          AC_MSG_NOTICE([*** net-snmp-config was not found in the path you specified:])
1128          AC_MSG_NOTICE([*** ${NETSNMP_DIR}/bin])
1129          AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1130          AC_MSG_NOTICE([*** including --without-netsnmp])
1131          exit 1
1132       fi
1133    else
1134       AC_PATH_TOOL([NETSNMP_CONFIG], [net-snmp-config], No)
1135    fi
1137 if test x"${NETSNMP_CONFIG}" != xNo; then
1138    NETSNMP_libs=`${NETSNMP_CONFIG} --agent-libs`
1139    
1140    AC_CHECK_LIB([netsnmp], [snmp_register_callback], AC_DEFINE_UNQUOTED([HAVE_NETSNMP], 1,
1141    [Define to indicate the Net-SNMP library]), [], ${NETSNMP_libs})
1143    if test "${ac_cv_lib_netsnmp_snmp_register_callback}" = "yes"; then
1144       NETSNMP_LIB="${NETSNMP_libs}"
1145       PBX_NETSNMP=1
1146    elif test -n "${NETSNMP_MANDATORY}";
1147    then
1148       AC_MSG_NOTICE([***])
1149       AC_MSG_NOTICE([*** The Net-SNMP installation on this system appears to be broken.])
1150       AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1151       AC_MSG_NOTICE([*** including --without-netsnmp])
1152       exit 1
1153    fi
1154 elif test -n "${NETSNMP_MANDATORY}";
1155 then
1156    AC_MSG_NOTICE([***])
1157    AC_MSG_NOTICE([*** The Net-SNMP installation on this system appears to be broken.])
1158    AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1159    AC_MSG_NOTICE([*** including --without-netsnmp])
1160    exit 1
1163 AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
1165 AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], [])
1167 AST_EXT_LIB_CHECK([OGG], [ogg], [ogg_sync_init], [])
1169 if test "${USE_OSS}" != "no"; then
1170 PBX_OSS=0
1171 AC_CHECK_HEADER([linux/soundcard.h],
1172                 [
1173                 PBX_OSS=1
1174                 AC_DEFINE_UNQUOTED([HAVE_OSS], 1, [Define to indicate the Open Sound System library])
1175                 ])
1176 if test "$PBX_OSS" = "0"; then
1177    AC_CHECK_HEADER([sys/soundcard.h],
1178                    [
1179                    PBX_OSS=1
1180                    AC_DEFINE_UNQUOTED([HAVE_OSS], 1, [Define to indicate the Open Sound System library])
1181                    ])
1183 if test "$PBX_OSS" = "0"; then
1184    AST_EXT_LIB_CHECK([OSS], [ossaudio], [oss_ioctl_mixer], [soundcard.h])
1188 PG_CONFIG=No
1189 if test "${USE_PGSQL}" != "no"; then    
1190    if test "x${PGSQL_DIR}" != "x"; then
1191       AC_PATH_TOOL([PG_CONFIG], [pg_config], No, [${PGSQL_DIR}/bin])
1192       if test x"${PG_CONFIG}" = xNo; then
1193          AC_MSG_NOTICE([***])
1194          AC_MSG_NOTICE([*** pg_config was not found in the path you specified:])
1195          AC_MSG_NOTICE([*** ${PGSQL_DIR}/bin])
1196          AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1197          AC_MSG_NOTICE([*** including --without-postgres])
1198          exit 1
1199       fi
1200    else
1201       AC_PATH_TOOL([PG_CONFIG], [pg_config], No)
1202    fi
1204 if test "${PG_CONFIG}" != No; then
1205    PGSQL_libdir=`${PG_CONFIG} --libdir`
1206    PGSQL_includedir=`${PG_CONFIG} --includedir`
1208    if test "x$?" != "x0" ; then
1209       if test -n "${PGSQL_MANDATORY}" ; then
1210          AC_MSG_NOTICE([***])
1211          AC_MSG_NOTICE([*** The PostgreSQL installation on this system appears to be broken.])
1212          AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1213          AC_MSG_NOTICE([*** including --without-postgres])
1214          exit 1
1215           fi
1216    else 
1217       AC_CHECK_LIB([pq], [PQescapeStringConn], AC_DEFINE_UNQUOTED([HAVE_PGSQL], 1,
1218       [Define to indicate the PostgreSQL library]), [], -L${PGSQL_libdir} -lz)
1220       if test "${ac_cv_lib_pq_PQescapeStringConn}" = "yes"; then
1221          PGSQL_LIB="-L${PGSQL_libdir} -lpq -lz"
1222          PGSQL_INCLUDE="-I${PGSQL_includedir}"
1223          PBX_PGSQL=1
1224       elif test -n "${PGSQL_MANDATORY}";
1225       then
1226          AC_MSG_NOTICE([***])
1227          AC_MSG_NOTICE([*** The PostgreSQL installation on this system appears to be broken.])
1228          AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1229          AC_MSG_NOTICE([*** including --without-postgres])
1230          exit 1
1231       fi
1232    fi
1233 elif test -n "${PGSQL_MANDATORY}";
1234 then
1235    AC_MSG_NOTICE([***])
1236    AC_MSG_NOTICE([*** The PostgreSQL installation on this system appears to be broken.])
1237    AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1238    AC_MSG_NOTICE([*** including --without-postgres])
1239    exit 1
1242 AST_EXT_LIB_CHECK([POPT], [popt], [poptStrerror], [popt.h])
1244 AST_EXT_LIB_CHECK([PRI], [pri], [pri_keypad_facility], [libpri.h])
1246 AST_EXT_LIB_CHECK([PRI_VERSION], [pri], [pri_get_version], [libpri.h])
1248 if test "${USE_PWLIB}" != "no"; then
1249         if test -n "${PWLIB_DIR}"; then
1250                 PWLIBDIR="${PWLIB_DIR}"
1251         fi
1252         AST_CHECK_PWLIB()
1253         AST_CHECK_PWLIB_VERSION([PWLib], [PWLIB], [ptbuildopts.h], [1], [9], [2])
1254                 
1255         if test "${HAS_PWLIB:-unset}" != "unset"; then
1256                 AST_CHECK_OPENH323_PLATFORM()
1258                 PLATFORM_PWLIB="pt_${PWLIB_PLATFORM}_r"
1260                 AST_CHECK_PWLIB_BUILD([PWLib], [PWLIB],
1261                         [Define if your system has the PWLib libraries.],
1262                         [#include "ptlib.h"],
1263                         [BOOL q = PTime::IsDaylightSavings();])
1264         fi
1267 if test "${USE_PWLIB}" != "no" -a "x${ac_cv_lib_PWLIB}" != "xyes" -a -n "${PWLIB_MANDATORY}"; then
1268    AC_MSG_NOTICE([***])
1269    AC_MSG_NOTICE([*** The PWLIB installation on this system appears to be broken.])
1270    AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1271    AC_MSG_NOTICE([*** including --without-pwlib])
1272    exit 1
1275 if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then
1276         if test -n "${OPENH323_DIR}"; then
1277                 OPENH323DIR="${OPENH323_DIR}"
1278         fi
1279         AST_CHECK_OPENH323()
1280         AST_CHECK_PWLIB_VERSION([OpenH323], [OPENH323], [openh323buildopts.h], [1], [17], [3])
1281         AST_CHECK_OPENH323_BUILD()
1282         PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}"
1283         AST_CHECK_PWLIB_BUILD([OpenH323], [OPENH323],
1284                 [Define if your system has the OpenH323 libraries.],
1285                 [#include "ptlib.h"
1286                 #include "h323.h"
1287                 #include "h323ep.h"],
1288                 [H323EndPoint ep = H323EndPoint();],
1289                 [${PWLIB_INCLUDE}], [${PWLIB_LIB}])
1291 if test "${USE_OPENH323}" != "no" -a "x${ac_cv_lib_OPENH323}" != "xyes" -a -n "${OPENH323_MANDATORY}"; then
1292    AC_MSG_NOTICE([***])
1293    AC_MSG_NOTICE([*** The OPENH323 installation on this system appears to be broken.])
1294    AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1295    AC_MSG_NOTICE([*** including --without-h323])
1296    exit 1
1299 AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])
1301 AST_EXT_LIB_CHECK([SPEEX], [speex], [speex_encode], [speex/speex.h], [-lm])
1303 # See if the main speex library contains the preprocess functions
1304 AST_EXT_LIB_CHECK([SPEEX_PREPROCESS], [speex], [speex_preprocess_ctl], [speex/speex.h], [-lm])
1305 if test "${PBX_SPEEX_PREPROCESS}" = 1; then
1306    PBX_SPEEX_PREPROCESS=1
1309 AST_EXT_LIB_CHECK([SPEEXDSP], [speexdsp], [speex_preprocess_ctl], [speex/speex.h], [-lm])
1310 if test "${PBX_SPEEXDSP}" = 1; then
1311    PBX_SPEEX_PREPROCESS=1
1314 AC_SUBST(PBX_SPEEX_PREPROCESS)
1316 AST_EXT_LIB_CHECK([SQLITE], [sqlite], [sqlite_exec], [sqlite.h])
1318 AST_EXT_LIB_CHECK([OPENSSL], [ssl], [ssl2_connect], [openssl/ssl.h], [-lcrypto])
1319 if test "$PBX_OPENSSL" = "1";
1320 then
1321     AST_EXT_LIB_CHECK([OSPTK], [osptk], [OSPPCryptoDecrypt], [osp/osp.h], [-lcrypto -lssl])
1324 AST_EXT_LIB_CHECK([FREETDS], [tds], [tds_version], [tds.h])
1325 if test "${PBX_FREETDS}" != "0";
1326 then
1327     if test "${FREETDS_DIR}x" = "x";
1328     then
1329         for tds_dir in /usr /usr/local;
1330         do
1331             if test -f "${tds_dir}/include/tdsver.h";
1332             then
1333                 FREETDS_DIR="${tds_dir}"
1334             fi
1335         done
1336     fi
1337     case `${GREP} TDS_VERSION_NO ${FREETDS_DIR:-/usr}/include/tdsver.h` in
1338     *0.64*)
1339         FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_64"
1340         ;;
1341     *0.63*)
1342         FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_63"
1343         ;;
1344     *0.62*)
1345         FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_62"
1346         ;;
1347     *)
1348         FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_PRE_0_62"
1349         ;;
1350     esac
1353 AST_EXT_LIB_CHECK([TERMCAP], [termcap], [tgetent], [])
1355 AST_EXT_LIB_CHECK([TINFO], [tinfo], [tgetent], [])
1357 if test "${host_os}" != "linux-gnu" ; then
1358   tonezone_extra_lib="-lm"
1361 if test "${PBX_DAHDI}" = "1" || test "${USE_ZAPTEL}" = "no"; then
1362   tonezone_dir="dahdi"
1363    if test "x${DAHDI_DIR}" != "x"; then
1364       tonezone_extra_inc="${DAHDI_INCLUDE}"
1365    fi
1366 else
1367   tonezone_dir="zaptel"
1368    if test "x${ZAPTEL_DIR}" != "x"; then
1369       tonezone_extra_inc="${ZAPTEL_INCLUDE}"
1370    fi
1373 AST_EXT_LIB_CHECK([TONEZONE], [tonezone], [tone_zone_find], [${tonezone_dir}/tonezone.h], [${tonezone_extra_lib}], [${tonezone_extra_inc}])
1375 AST_EXT_LIB_CHECK([USB], [usb], [usb_init], [usb.h], [])
1377 AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc])
1379 AC_LANG_PUSH(C++)
1381 if test "${USE_VPB}" != "no"; then
1382    AC_MSG_CHECKING(for vpb_open in -lvpb)
1383    saved_libs="${LIBS}"
1384    saved_cppflags="${CPPFLAGS}"
1385    if test "x${VPB_DIR}" != "x"; then
1386       if test -d ${VPB_DIR}/lib; then
1387          vpblibdir=${VPB_DIR}/lib
1388       else
1389          vpblibdir=${VPB_DIR}
1390       fi
1391       LIBS="${LIBS} -L${vpblibdir}"
1392       CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include"
1393    fi
1394    LIBS="${LIBS} -lvpb -lpthread"
1395    AC_LINK_IFELSE(
1396         [
1397         AC_LANG_PROGRAM(
1398         [#include <vpbapi.h>],
1399         [int q = vpb_open(0,0);])
1400         ],
1401         [       AC_MSG_RESULT(yes) 
1402                 ac_cv_lib_vpb_vpb_open="yes" 
1403         ],
1404         [       AC_MSG_RESULT(no) 
1405                 ac_cv_lib_vpb_vpb_open="no" 
1406         ]
1407         )
1408    LIBS="${saved_libs}"
1409    CPPFLAGS="${saved_cppflags}"
1410    if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
1411         VPB_LIB="-lvpb"
1412         if test "${VPB_DIR}" != ""; then
1413            VPB_LIB="-L${vpblibdir}  ${VPB_LIB}"
1414            VPB_INCLUDE="-I${VPB_DIR}/include"
1415         fi
1416         PBX_VPB=1
1417         AC_DEFINE([HAVE_VPB], 1, [Define if your system has the VoiceTronix API libraries.])
1418    elif test -n "${VPB_MANDATORY}"; then
1419       AC_MSG_NOTICE([***])
1420       AC_MSG_NOTICE([*** The VoiceTronix (vpb) installation on this system appears to be broken.])
1421       AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1422       AC_MSG_NOTICE([*** including --without-vpb.])
1423       exit 1
1424    fi
1427 AC_LANG_POP
1429 AST_EXT_LIB_CHECK([ZLIB], [z], [compress], [zlib.h])
1431 if test "${USE_ZAPTEL}" != "no" && test "x${PBX_DAHDI}" != "x1"; then
1432    AC_MSG_CHECKING(for ZT_DIAL_OP_CANCEL in zaptel/zaptel.h)
1433    saved_cppflags="${CPPFLAGS}"
1434    if test "x${ZAPTEL_DIR}" != "x"; then
1435       CPPFLAGS="${CPPFLAGS} -I${ZAPTEL_DIR}/include"
1436    fi
1437    AC_COMPILE_IFELSE(
1438         [
1439         AC_LANG_PROGRAM(
1440         [#include <zaptel/zaptel.h>],
1441         [int foo = ZT_DIAL_OP_CANCEL;])
1442         ],
1443         [       AC_MSG_RESULT(yes) 
1444                 ac_cv_zaptel_h="yes" 
1445         ],
1446         [       AC_MSG_RESULT(no) 
1447                 ac_cv_zaptel_h="no" 
1448         ]
1449         )
1450    CPPFLAGS="${saved_cppflags}"
1451    if test "${ac_cv_zaptel_h}" = "yes"; then
1452         if test "${ZAPTEL_DIR}" != ""; then
1453            ZAPTEL_INCLUDE="-I${ZAPTEL_DIR}/include"
1454         fi
1455         PBX_ZAPTEL=1
1456         AC_DEFINE([HAVE_ZAPTEL], 1, [Define if your system has the Zaptel headers.])
1457    elif test -n "${ZAPTEL_MANDATORY}"; 
1458    then
1459       AC_MSG_NOTICE([***])
1460       AC_MSG_NOTICE([*** The Zaptel installation on this system appears to be broken.])
1461       AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1462       AC_MSG_NOTICE([*** including --without-zaptel.])
1463       exit 1
1464    fi
1467 if test "${PBX_ZAPTEL}" = 1 && test "x${PBX_DAHDI}" != "x1"; then
1468    AC_MSG_CHECKING(for ZT_EVENT_REMOVED in zaptel/zaptel.h)
1469    saved_cppflags="${CPPFLAGS}"
1470    if test "x${ZAPTEL_DIR}" != "x"; then
1471       CPPFLAGS="${CPPFLAGS} -I${ZAPTEL_DIR}/include"
1472    fi
1473    AC_COMPILE_IFELSE(
1474         [
1475         AC_LANG_PROGRAM(
1476         [#include <zaptel/zaptel.h>],
1477         [int foo = ZT_EVENT_REMOVED;])
1478         ],
1479         [       AC_MSG_RESULT(yes) 
1480                 ac_cv_zaptel_vldtmf="yes" 
1481         ],
1482         [       AC_MSG_RESULT(no) 
1483                 ac_cv_zaptel_vldtmf="no" 
1484         ]
1485         )
1486    CPPFLAGS="${saved_cppflags}"
1487    if test "${ac_cv_zaptel_vldtmf}" = "yes"; then
1488         PBX_ZAPTEL_VLDTMF=1
1489    fi
1490    AC_MSG_CHECKING(for ZT_TCOP_ALLOCATE in zaptel/zaptel.h)
1491    saved_cppflags="${CPPFLAGS}"
1492    if test "x${ZAPTEL_DIR}" != "x"; then
1493       CPPFLAGS="${CPPFLAGS} -I${ZAPTEL_DIR}/include"
1494    fi
1495    AC_COMPILE_IFELSE(
1496         [
1497         AC_LANG_PROGRAM(
1498         [#include <zaptel/zaptel.h>],
1499         [int foo = ZT_TCOP_ALLOCATE;])
1500         ],
1501         [       AC_MSG_RESULT(yes) 
1502                 ac_cv_zaptel_transcode="yes" 
1503         ],
1504         [       AC_MSG_RESULT(no) 
1505                 ac_cv_zaptel_transcode="no" 
1506         ]
1507         )
1508    CPPFLAGS="${saved_cppflags}"
1509    if test "${ac_cv_zaptel_transcode}" = "yes"; then
1510         PBX_ZAPTEL_TRANSCODE=1
1511    fi
1513 AC_SUBST(PBX_ZAPTEL_VLDTMF)
1514 AC_SUBST(PBX_ZAPTEL_TRANSCODE)
1516 if test "x${PBX_ZAPTEL}" = "x1" ; then
1517         PBX_DAHDI=1
1518         AC_SUBST(PBX_DAHDI)
1521 EDITLINE_LIB=""
1522 if test "x$TERMCAP_LIB" != "x" ; then
1523   EDITLINE_LIB="$TERMCAP_LIB"
1524 elif test "x$TINFO_LIB" != "x" ; then
1525   EDITLINE_LIB="$TINFO_LIB"
1526 elif test "x$CURSES_LIB" != "x" ; then
1527   EDITLINE_LIB="$CURSES_LIB"
1528 elif test "x$NCURSES_LIB" != "x" ; then
1529   EDITLINE_LIB="$NCURSES_LIB"
1530 else
1531   AC_MSG_ERROR(*** termcap support not found)
1533 AC_SUBST(EDITLINE_LIB)
1535 AC_CHECK_HEADER([h323.h], [PBX_H323=1], [PBX_H323=0])
1536 AC_SUBST(PBX_H323)
1538 AC_CHECK_HEADER([linux/compiler.h],
1539                 [AC_DEFINE_UNQUOTED([HAVE_LINUX_COMPILER_H], 1, [Define to 1 if your system has linux/compiler.h.])])
1541 AC_CHECK_HEADER([linux/ixjuser.h], [PBX_IXJUSER=1], [PBX_IXJUSER=0], [
1542                                    #include <linux/version.h>
1543                                    #ifdef HAVE_LINUX_COMPILER_H
1544                                    #include <linux/compiler.h>
1545                                    #endif
1546                                    ])
1547 AC_SUBST(PBX_IXJUSER)
1549 if test "${cross_compiling}" = "no";
1550 then
1551   AC_CHECK_FILE(/sbin/launchd, AC_DEFINE([HAVE_SBIN_LAUNCHD], 1, [Define to 1 if your system has /sbin/launchd.]))
1554 PBX_GTK=0
1555 AC_CHECK_TOOL(GTKCONFIG, gtk-config, No)
1556 if test ! "x${GTKCONFIG}" = xNo; then
1557    GTK_INCLUDE=$(${GTKCONFIG} --cflags gthread)
1558    GTK_LIB=$(${GTKCONFIG} --libs gthread)
1559    PBX_GTK=1
1560    AC_DEFINE([HAVE_GTK], 1, [Define if your system has the GTK libraries.])
1562 AC_SUBST(PBX_GTK)
1563 AC_SUBST(GTK_INCLUDE)
1564 AC_SUBST(GTK_LIB)
1566 PBX_GTK2=0
1567 AC_CHECK_TOOL(PKGCONFIG, pkg-config, No)
1568 if test ! "x${PKGCONFIG}" = xNo; then
1569    GTK2_INCLUDE=$(${PKGCONFIG} gtk+-2.0 --cflags 2>/dev/null)
1570    GTK2_LIB=$(${PKGCONFIG} gtk+-2.0 --libs)
1571    PBX_GTK2=1
1572    AC_DEFINE([HAVE_GTK2], 1, [Define if your system has the GTK2 libraries.])
1574 AC_SUBST(PBX_GTK2)
1575 AC_SUBST(GTK2_INCLUDE)
1576 AC_SUBST(GTK2_LIB)
1578 if test "${USE_CURL}" != "no"; then
1579    AC_PATH_TOOL([CURL_CONFIG], [curl-config], No)
1580    if test ! x"${CURL_CONFIG}" = xNo; then
1581    # check for version
1582       if test $(printf "%d" 0x$(${CURL_CONFIG} --vernum)) -ge $(printf "%d" 0x070907); then
1583          CURL_INCLUDE=$(${CURL_CONFIG} --cflags)
1584          CURL_LIB=$(${CURL_CONFIG} --libs)
1586          AC_MSG_CHECKING(for curl_version() in curl/curl.h)
1587          saved_cppflags="${CPPFLAGS}"
1588          CPPFLAGS="${CPPFLAGS} ${CURL_INCLUDE}"
1589          AC_COMPILE_IFELSE(
1590             [AC_LANG_PROGRAM(
1591                 [#include <curl/curl.h>],
1592                     [curl_version();])
1593             ],[
1594                 AC_MSG_RESULT(yes)
1595                 ac_cv_curl_h="yes"
1596             ],[
1597                 AC_MSG_RESULT(no)
1598                 ac_cv_curl_h="no"
1599             ]
1600          )
1601          CPPFLAGS="${saved_cppflags}"
1602          if test "${ac_cv_curl_h}" = "yes"; then
1603              PBX_CURL=1
1604              AC_DEFINE([HAVE_CURL], 1, [Define if your system has the curl libraries.])
1605          fi
1606       fi
1607    fi
1610 AC_CONFIG_FILES([build_tools/menuselect-deps makeopts channels/h323/Makefile])
1611 AC_OUTPUT
1613 if test "x${silent}" != "xyes" ; then
1614 echo
1615 echo "               .\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$=..      "
1616 echo "            .\$7\$7..          .7\$\$7:.    "
1617 echo "          .\$\$:.                 ,\$7.7   "
1618 echo "        .\$7.     7\$\$\$\$           .\$\$77  "
1619 echo "     ..\$\$.       \$\$\$\$\$            .\$\$\$7 "
1620 echo "    ..7\$   .?.   \$\$\$\$\$   .?.       7\$\$\$."
1621 echo "   \$.\$.   .\$\$\$7. \$\$\$\$7 .7\$\$\$.      .\$\$\$."
1622 echo " .777.   .\$\$\$\$\$\$77\$\$\$77\$\$\$\$\$7.      \$\$\$,"
1623 echo " \$\$\$~      .7\$\$\$\$\$\$\$\$\$\$\$\$\$7.       .\$\$\$."
1624 echo ".\$\$7          .7\$\$\$\$\$\$\$7:          ?\$\$\$."
1625 echo "\$\$\$          ?7\$\$\$\$\$\$\$\$\$\$I        .\$\$\$7 "
1626 echo "\$\$\$       .7\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$      :\$\$\$. "
1627 echo "\$\$\$       \$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$\$\$\$    .\$\$\$.  "
1628 echo "\$\$\$        \$\$\$   7\$\$\$7  .\$\$\$    .\$\$\$.   "
1629 echo "\$\$\$\$             \$\$\$\$7         .\$\$\$.    "
1630 echo "7\$\$\$7            7\$\$\$\$        7\$\$\$      "
1631 echo " \$\$\$\$\$                        \$\$\$       "
1632 echo "  \$\$\$\$7.                       \$\$  (TM)     "
1633 echo "   \$\$\$\$\$\$\$.           .7\$\$\$\$\$\$  \$\$      "
1634 echo "     \$\$\$\$\$\$\$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$.\$\$\$\$\$\$      "
1635 echo "       \$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$.                "
1636 echo
1639 AC_MSG_NOTICE(Package configured for: )
1640 AC_MSG_NOTICE( OS type  : $host_os)
1641 AC_MSG_NOTICE( Host CPU : $host_cpu)
1642 if test "${cross_compiling}" = "yes"; then
1643    AC_MSG_NOTICE( Cross Compilation = YES)