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