Remove debug output.
[asterisk-bristuff.git] / configure.ac
blob432dbbaf6e3aaf9aced32567d055ccfdd40c4a9a
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([GNUTLS], [GNU TLS support (used for iksemel only)], [gnutls])
180 AST_EXT_LIB_SETUP([GSM], [GSM], [gsm], [, or 'internal'])
181 AST_EXT_LIB_SETUP([IKSEMEL], [Iksemel Jabber Library], [iksemel])
182 AST_EXT_LIB_SETUP([IMAP_TK], [UW IMAP Toolkit], [imap])
183 AST_EXT_LIB_SETUP([ISDNNET], [ISDN4Linux Library], [isdnnet])
184 AST_EXT_LIB_SETUP([KDE], [KDE], [kde])
185 AST_EXT_LIB_SETUP([LTDL], [libtool], [ltdl])
186 AST_EXT_LIB_SETUP([MISDN], [mISDN User Library], [misdn])
187 AST_EXT_LIB_SETUP([NBS], [Network Broadcast Sound], [nbs])
188 AST_EXT_LIB_SETUP([NCURSES], [ncurses], [ncurses])
189 AST_EXT_LIB_SETUP([NETSNMP], [Net-SNMP], [netsnmp])
190 AST_EXT_LIB_SETUP([NEWT], [newt], [newt])
191 AST_EXT_LIB_SETUP([UNIXODBC], [unixODBC], [odbc])
192 AST_EXT_LIB_SETUP([OGG], [OGG], [ogg])
193 AST_EXT_LIB_SETUP([OSPTK], [OSP Toolkit], [osptk])
194 AST_EXT_LIB_SETUP([OSS], [Open Sound System], [oss])
195 AST_EXT_LIB_SETUP([POPT], [popt], [popt])
196 AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres])
197 AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri])
198 AST_EXT_LIB_SETUP([PWLIB], [PWlib], [pwlib])
199 AST_EXT_LIB_SETUP([OPENH323], [OpenH323], [h323])
200 AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])
201 AST_EXT_LIB_SETUP([SPEEX], [Speex], [speex])
202 AST_EXT_LIB_SETUP([SPEEXDSP], [Speexdsp], [speexdsp])
203 AST_EXT_LIB_SETUP([SQLITE], [SQLite], [sqlite])
204 AST_EXT_LIB_SETUP([SUPPSERV], [mISDN Supplemental Services], [suppserv])
205 AST_EXT_LIB_SETUP([OPENSSL], [OpenSSL], [ssl])
206 AST_EXT_LIB_SETUP([FREETDS], [FreeTDS], [tds])
207 AST_EXT_LIB_SETUP([TERMCAP], [Termcap], [termcap])
208 AST_EXT_LIB_SETUP([TINFO], [Term Info], [tinfo])
209 AST_EXT_LIB_SETUP([TONEZONE], [tonezone], [tonezone])
210 AST_EXT_LIB_SETUP([USB], [usb], [usb])
211 AST_EXT_LIB_SETUP([VORBIS], [Vorbis], [vorbis])
212 AST_EXT_LIB_SETUP([VPB], [Voicetronix API], [vpb])
213 AST_EXT_LIB_SETUP([ZLIB], [zlib], [z])
214 AST_EXT_LIB_SETUP([ZAPTEL], [Zaptel], [zaptel])
216 # check for basic system features and functionality before
217 # checking for package libraries
219 AC_FUNC_ALLOCA
220 AC_HEADER_DIRENT
221 AC_HEADER_STDC
222 AC_HEADER_SYS_WAIT
223 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])
225 AC_SYS_LARGEFILE
227 # Checks for typedefs, structures, and compiler characteristics.
228 AC_HEADER_STDBOOL
229 AC_C_CONST
230 AC_TYPE_UID_T
231 AC_C_INLINE
232 AC_TYPE_MODE_T
233 AC_TYPE_OFF_T
234 AC_TYPE_PID_T
235 AC_TYPE_SIZE_T
236 AC_CHECK_MEMBERS([struct stat.st_blksize])
237 AC_HEADER_TIME
238 AC_STRUCT_TM
239 AC_C_VOLATILE
240 AC_CHECK_TYPES([ptrdiff_t])
242 # Checks for library functions.
243 AC_FUNC_CHOWN
244 AC_FUNC_CLOSEDIR_VOID
245 AC_FUNC_ERROR_AT_LINE
246 AST_FUNC_FORK
247 AC_FUNC_FSEEKO
248 AC_PROG_GCC_TRADITIONAL
249 # XXX: these are commented out until we determine whether it matters if our malloc()
250 # acts exactly like glibc's or not
251 # AC_FUNC_MALLOC
252 # AC_FUNC_REALLOC
253 AC_FUNC_MEMCMP
254 AC_FUNC_MMAP
255 AC_FUNC_SELECT_ARGTYPES
256 AC_FUNC_SETVBUF_REVERSED
257 AC_TYPE_SIGNAL
258 AC_FUNC_STAT
259 AC_FUNC_STRCOLL
260 AC_FUNC_STRFTIME
261 AC_FUNC_STRNLEN
262 AC_FUNC_STRTOD
263 AC_FUNC_UTIME_NULL
264 AC_FUNC_VPRINTF
265 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])
267 # some systems already have gethostbyname_r so we don't need to build ours in main/utils.c
268 AC_SEARCH_LIBS(gethostbyname_r, [socket nsl])
270 AC_MSG_CHECKING(for gethostbyname_r with 6 arguments)
271 AC_LINK_IFELSE(
272         AC_LANG_PROGRAM([#include <stdlib.h>
273                          #include <netdb.h>],
274                         [struct hostent *he = gethostbyname_r((const char *)NULL, (struct hostent *)NULL, (char *)NULL, (int)0, (struct hostent **)NULL, (int *)NULL);]),
275         AC_MSG_RESULT(yes)
276         AC_DEFINE([HAVE_GETHOSTBYNAME_R_6], 1, [Define to 1 if your system has gethostbyname_r with 6 arguments.]),
277         AC_MSG_RESULT(no)
280 AC_MSG_CHECKING(for gethostbyname_r with 5 arguments)
281 AC_LINK_IFELSE(
282         AC_LANG_PROGRAM([#include <stdlib.h>
283                          #include <netdb.h>],
284                         [struct hostent *he = gethostbyname_r((const char *)NULL, (struct hostent *)NULL, (char *)NULL, (int)0, (int *)NULL);]),
285         AC_MSG_RESULT(yes)
286         AC_DEFINE([HAVE_GETHOSTBYNAME_R_5], 1, [Define to 1 if your system has gethostbyname_r with 5 arguments.]),
287         AC_MSG_RESULT(no)
290 AC_MSG_CHECKING(for PTHREAD_RWLOCK_INITIALIZER)
291 AC_LINK_IFELSE(
292         AC_LANG_PROGRAM([#include <pthread.h>],
293                         [int foo = PTHREAD_RWLOCK_INITIALIZER;]),
294         AC_MSG_RESULT(yes)
295         AC_DEFINE([HAVE_PTHREAD_RWLOCK_INITIALIZER], 1, [Define to 1 if your system has PTHREAD_RWLOCK_INITIALIZER.]),
296         AC_MSG_RESULT(no)
299 AC_MSG_CHECKING(for PTHREAD_RWLOCK_PREFER_WRITER_NP)
300 AC_LINK_IFELSE(
301         AC_LANG_PROGRAM([#include <pthread.h>],
302                         [int foo = PTHREAD_RWLOCK_PREFER_WRITER_NP;]),
303         AC_MSG_RESULT(yes)
304         AC_DEFINE([HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NP], 1, [Define to 1 if your system has PTHREAD_RWLOCK_PREFER_WRITER_NP.]),
305         AC_MSG_RESULT(no)
308 AC_MSG_CHECKING(for compiler atomic operations)
309 AC_LINK_IFELSE(
310 AC_LANG_PROGRAM([], [int foo1; int foo2 = __sync_fetch_and_add(&foo1, 1);]),
311 AC_MSG_RESULT(yes)
312 AC_DEFINE([HAVE_GCC_ATOMICS], 1, [Define to 1 if your GCC C compiler provides atomic operations.]),
313 AC_MSG_RESULT(no)
316 AST_GCC_ATTRIBUTE(pure)
317 AST_GCC_ATTRIBUTE(malloc)
318 AST_GCC_ATTRIBUTE(const)
319 AST_GCC_ATTRIBUTE(unused)
320 AST_GCC_ATTRIBUTE(always_inline)
321 AST_GCC_ATTRIBUTE(deprecated)
323 AC_MSG_CHECKING(for -ffunction-sections support)
324 saved_CFLAGS="${CFLAGS}"
325 CFLAGS="${CFLAGS} -ffunction-sections"
326 AC_COMPILE_IFELSE(
327         AC_LANG_PROGRAM([], [int x = 1;]),
328         AC_MSG_RESULT(yes)
329         [saved_LDFLAGS="${LDFLAGS}"]
330         [LDFLAGS="${LDFLAGS} -Wl,--gc-sections"]
331         AC_MSG_CHECKING(for --gc-sections support)
332         AC_LINK_IFELSE(
333                 AC_LANG_PROGRAM([], [int x = 1;]),
334                 AC_MSG_RESULT(yes)
335                 [GC_CFLAGS="-ffunction-sections"]
336                 [[GC_LDFLAGS="-Wl,--gc-sections"]],
337                 AC_MSG_RESULT(no)
338         )
339         [LDFLAGS="${saved_LDFLAGS}"],
340         AC_MSG_RESULT(no)
342 CFLAGS="${saved_CFLAGS}"
343 AC_SUBST(GC_CFLAGS)
344 AC_SUBST(GC_LDFLAGS)
346 AC_MSG_CHECKING(for -Wdeclaration-after-statement support)
347 if $(${CC} -Wdeclaration-after-statement -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
348    AC_MSG_RESULT(yes)
349    AST_DECLARATION_AFTER_STATEMENT=-Wdeclaration-after-statement
350 else
351         AC_MSG_RESULT(no)
352         AST_DECLARATION_AFTER_STATEMENT=
354 AC_SUBST(AST_DECLARATION_AFTER_STATEMENT)
356 AC_MSG_CHECKING(for -fno-strict-overflow)
357 if $(${CC} -O2 -fno-strict-overflow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
358    AC_MSG_RESULT(yes)
359    AST_NO_STRICT_OVERFLOW=-fno-strict-overflow
360 else
361         AC_MSG_RESULT(no)
362         AST_NO_STRICT_OVERFLOW=
364 AC_SUBST(AST_NO_STRICT_OVERFLOW)
366 AC_MSG_CHECKING(for res_ninit)
367 AC_LINK_IFELSE(
368         AC_LANG_PROGRAM([#include <resolv.h>],
369                         [int foo = res_ninit(NULL);]),
370         AC_MSG_RESULT(yes)
371         AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.])
372         AC_MSG_CHECKING(for res_ndestroy)
373         AC_LINK_IFELSE(
374                 AC_LANG_PROGRAM([#include <resolv.h>],
375                                 [int foo = res_ndestroy(NULL);]),
376                 AC_MSG_RESULT(yes)
377                 AC_DEFINE([HAVE_RES_NDESTROY], 1, [Define to 1 if your system has the ndestroy resolver function.]),
378                 AC_MSG_RESULT(no)
379         ),
380         AC_MSG_RESULT(no)
383 AC_MSG_CHECKING(for RTLD_NOLOAD)
384 AC_LINK_IFELSE(
385         AC_LANG_PROGRAM([#include <dlfcn.h>],
386                         [int foo = RTLD_NOLOAD;]),
387         AC_MSG_RESULT(yes)
388         AC_DEFINE([HAVE_RTLD_NOLOAD], 1, [Define to 1 if your system has a dynamic linker that supports RTLD_NOLOAD.]),
389         AC_MSG_RESULT(no)
392 AC_MSG_CHECKING(for IP_MTU_DISCOVER)
393 AC_LINK_IFELSE(
394         AC_LANG_PROGRAM([#include <netinet/in.h>],
395                         [int foo = IP_MTU_DISCOVER;]),
396         AC_MSG_RESULT(yes)
397         AC_DEFINE([HAVE_IP_MTU_DISCOVER], 1, [Define to 1 if your system has PMTU discovery on UDP sockets.]),
398         AC_MSG_RESULT(no)
401 AC_CHECK_HEADER([libkern/OSAtomic.h],
402                 [AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
404 AC_CHECK_SIZEOF(int)
406 # do the package library checks now
408 AST_EXT_LIB_CHECK([ALSA], [asound], [snd_spcm_init], [alsa/asoundlib.h], [-lm -ldl])
410 AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
412 if test "x${host_os}" = "xlinux-gnu" ; then
413   AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h])
416 AST_C_COMPILE_CHECK([GETIFADDRS], [struct ifaddrs *p; getifaddrs(&p)], [ifaddrs.h])
418 GSM_INTERNAL="yes"
419 AC_SUBST(GSM_INTERNAL)
420 GSM_SYSTEM="yes"
421 if test "${USE_GSM}" != "no"; then
422    if test "${GSM_DIR}" = "internal"; then
423       GSM_SYSTEM="no"
424    elif test "${GSM_DIR}" != ""; then
425       GSM_INTERNAL="no"
426    fi
427    if test "${GSM_SYSTEM}" = "yes"; then
428       gsmlibdir=""
429       if test "x${GSM_DIR}" != "x"; then
430          if test -d ${GSM_DIR}/lib; then
431             gsmlibdir="-L${GSM_DIR}/lib"
432          else
433             gsmlibdir="-L${GSM_DIR}"
434          fi
435       fi
436       AC_CHECK_LIB([gsm], [gsm_create], AC_DEFINE_UNQUOTED([HAVE_GSM], 1,
437       [Define to indicate the GSM library]), [], ${gsmlibdir})
438       if test "${ac_cv_lib_gsm_gsm_create}" = "yes"; then
439          if test "x${GSM_DIR}" != "x" ; then
440             AC_CHECK_HEADER([${GSM_DIR}/include/gsm.h], [GSM_HEADER_FOUND=1], [GSM_HEADER_FOUND=0])
441             AC_CHECK_HEADER([${GSM_DIR}/include/gsm/gsm.h], [GSM_GSM_HEADER_FOUND=1], [GSM_GSM_HEADER_FOUND=0])
442          else
443             AC_CHECK_HEADER([gsm.h], [GSM_HEADER_FOUND=1], [GSM_HEADER_FOUND=0])
444             AC_CHECK_HEADER([gsm/gsm.h], [GSM_GSM_HEADER_FOUND=1], [GSM_GSM_HEADER_FOUND=0])
445          fi
446          if test "${GSM_HEADER_FOUND}" = "0" ; then
447             if test "{GSM_GSM_HEADER_FOUND}" = "0" ; then
448                if test "x${GSM_MANDATORY}" = "xyes" ; then
449                   AC_MSG_NOTICE([***])
450                   AC_MSG_NOTICE([*** It appears that you do not have the gsm development package installed.])
451                   AC_MSG_NOTICE([*** Please install it to include ${GSM_DESCRIP} support, or re-run configure])
452                   AC_MSG_NOTICE([*** without explicitly specifying --with-${GSM_OPTION}])
453                   exit 1
454                fi
455             fi
456          fi
457          GSM_OK=0
458          if test "${GSM_HEADER_FOUND}" = "1" ; then
459             AC_DEFINE_UNQUOTED([HAVE_GSM_HEADER], 1, [Define to indicate that gsm.h has no prefix for its location])
460             GSM_OK=1
461          else
462             if test "${GSM_GSM_HEADER_FOUND}" = "1" ; then
463                AC_DEFINE_UNQUOTED([HAVE_GSM_GSM_HEADER], 1, [Define to indicate that gsm.h is in gsm/gsm.h])
464                GSM_OK=1
465             fi
466          fi
467          if test "${GSM_OK}" = "1" ; then
468             GSM_LIB="-lgsm"
469             if test "x${GSM_DIR}" != "x"; then
470                GSM_LIB="${gsmlibdir} ${GSM_LIB}"
471                GSM_INCLUDE="-I${GSM_DIR}/include"
472             fi
473             PBX_GSM=1
474             GSM_INTERNAL="no"
475          fi
476       fi
477    fi
478    if test "${GSM_INTERNAL}" = "yes"; then
479       PBX_GSM=1
480       AC_DEFINE_UNQUOTED([HAVE_GSM_HEADER], 1, [Define to indicate that gsm.h has no prefix for its location])
481    fi
484 AST_EXT_LIB_CHECK([IKSEMEL], [iksemel], [iks_start_sasl], [iksemel.h])
486 if test "${PBX_IKSEMEL}" = 1; then
487    AST_EXT_LIB_CHECK([GNUTLS], [gnutls], [gnutls_bye], [gnutls/gnutls.h], [-lz -lgcrypt -lgpg-error])
490 if test "${USE_IMAP_TK}" != "no"; then
491         saved_cppflags="${CPPFLAGS}"
492         saved_libs="${LIBS}"
493         switch_to_system_on_failure="no"
494         if test "${IMAP_TK_DIR}" = ""; then
495                 IMAP_TK_DIR=`pwd`"/../imap-2004g"
496                 switch_to_system_on_failure="yes"
497         fi
498         if test "${IMAP_TK_DIR}" != "system"; then
499                 AC_MSG_CHECKING(for UW IMAP Toolkit c-client library)
500                 if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then
501                 imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS`
502                 fi
503                 imap_libs="${IMAP_TK_DIR}/c-client/c-client.a"
504                 imap_include="-I${IMAP_TK_DIR}/c-client"
505         CPPFLAGS="${CPPFLAGS} ${imap_include}"
506                 LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
507                 AC_LINK_IFELSE(
508                 AC_LANG_PROGRAM(
509                                 [#include "c-client.h"
510                                 void mm_searched (MAILSTREAM *stream,unsigned long number)
511                                 {
512                                 }
513                                 void mm_exists (MAILSTREAM *stream,unsigned long number)
514                                 {
515                                 }
516                                 void mm_expunged (MAILSTREAM *stream,unsigned long number)
517                                 {
518                                 }
519                                 void mm_flags (MAILSTREAM *stream,unsigned long number)
520                                 {
521                                 }
522                                 void mm_notify (MAILSTREAM *stream,char *string,long errflg)
523                                 {
524                                 }
525                                 void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
526                                 {
527                                 }
528                                 void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
529                                 {
530                                 }
531                                 void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
532                                 {
533                                 }
534                                 void mm_log (char *string,long errflg)
535                                 {
536                                 }
537                                 void mm_dlog (char *string)
538                                 {
539                                 }
540                                 void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
541                                 {
542                                 }
543                                 void mm_critical (MAILSTREAM *stream)
544                                 {
545                                 }
546                                 void mm_nocritical (MAILSTREAM *stream)
547                                 {
548                                 }
549                                 long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
550                                 {
551                                 }
552                                 void mm_fatal (char *string)
553                                 {
554                                 }],
555                                 [
556                                 MAILSTREAM *foo = mail_open(NULL, "", 0);
557                                 ]
558                         ),
559                         [ac_cv_imap_tk="yes"],
560                         [ac_cv_imap_tk="no"]
561                 )
562                 if test "${ac_cv_imap_tk}" = "yes"; then
563                         AC_LINK_IFELSE(
564                                 AC_LANG_PROGRAM(
565                                         [#include "c-client.h"
566                                         void mm_searched (MAILSTREAM *stream,unsigned long number)
567                                         {
568                                         }
569                                         void mm_exists (MAILSTREAM *stream,unsigned long number)
570                                         {
571                                         }
572                                         void mm_expunged (MAILSTREAM *stream,unsigned long number)
573                                         {
574                                         }
575                                         void mm_flags (MAILSTREAM *stream,unsigned long number)
576                                         {
577                                         }
578                                         void mm_notify (MAILSTREAM *stream,char *string,long errflg)
579                                         {
580                                         }
581                                         void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
582                                         {
583                                         }
584                                         void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
585                                         {
586                                         }
587                                         void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
588                                         {
589                                         }
590                                         void mm_log (char *string,long errflg)
591                                         {
592                                         }
593                                         void mm_dlog (char *string)
594                                         {
595                                         }
596                                         void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
597                                         {
598                                         }
599                                         void mm_critical (MAILSTREAM *stream)
600                                         {
601                                         }
602                                         void mm_nocritical (MAILSTREAM *stream)
603                                         {
604                                         }
605                                         long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
606                                         {
607                                         }
608                                         void mm_fatal (char *string)
609                                         {
610                                         }],
611                                         [
612                                         long check = mail_expunge_full(NULL, "", 0);
613                                         ]
614                                 ),
615                                 [ac_cv_imap_tk2006="yes"],
616                                 [ac_cv_imap_tk2006="no"]
617                         )
618                 fi
619                 CPPFLAGS="${saved_cppflags}"
620                 LIBS="${saved_libs}"
621                 if test "${ac_cv_imap_tk}" = "no"; then
622                         AC_MSG_RESULT(no)
623                         if test "${switch_to_system_on_failure}" = "yes"; then 
624                                 IMAP_TK_DIR="system"
625                         else #This means they specified a directory. Search for a package installation there too
626                                 AC_MSG_CHECKING([for system c-client library...])
627                                 CPPFLAGS="${saved_cppflags}"
628                                 LIBS="${saved_libs}"
629                                 imap_include="-I${IMAP_TK_DIR}/include"
630                                 imap_ldflags="-L${IMAP_TK_DIR}/lib"
631                                 imap_libs="-lc-client"
632                                 CPPFLAGS="${CPPFLAGS} ${imap_include}"
633                                 LIBS="${LIBS} ${imap_libs} ${imap_ldflags}"
634                                 AC_LINK_IFELSE(
635                                 AC_LANG_PROGRAM(
636                                                 [#include "c-client.h"
637                                                 void mm_searched (MAILSTREAM *stream,unsigned long number)
638                                                 {
639                                                 }
640                                                 void mm_exists (MAILSTREAM *stream,unsigned long number)
641                                                 {
642                                                 }
643                                                 void mm_expunged (MAILSTREAM *stream,unsigned long number)
644                                                 {
645                                                 }
646                                                 void mm_flags (MAILSTREAM *stream,unsigned long number)
647                                                 {
648                                                 }
649                                                 void mm_notify (MAILSTREAM *stream,char *string,long errflg)
650                                                 {
651                                                 }
652                                                 void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
653                                                 {
654                                                 }
655                                                 void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
656                                                 {
657                                                 }
658                                                 void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
659                                                 {
660                                                 }
661                                                 void mm_log (char *string,long errflg)
662                                                 {
663                                                 }
664                                                 void mm_dlog (char *string)
665                                                 {
666                                                 }
667                                                 void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
668                                                 {
669                                                 }
670                                                 void mm_critical (MAILSTREAM *stream)
671                                                 {
672                                                 }
673                                                 void mm_nocritical (MAILSTREAM *stream)
674                                                 {
675                                                 }
676                                                 long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
677                                                 {
678                                                 }
679                                                 void mm_fatal (char *string)
680                                                 {
681                                                 }],
682                                                 [
683                                                 MAILSTREAM *foo = mail_open(NULL, "", 0);
684                                                 ]
685                                         ),
686                                         [ac_cv_imap_tk="yes"],
687                                         [ac_cv_imap_tk="no"]
688                                 )
689                                 if test "${ac_cv_imap_tk}" = "yes"; then
690                                         AC_LINK_IFELSE(
691                                                 AC_LANG_PROGRAM(
692                                                         [#include "c-client.h"
693                                                         void mm_searched (MAILSTREAM *stream,unsigned long number)
694                                                         {
695                                                         }
696                                                         void mm_exists (MAILSTREAM *stream,unsigned long number)
697                                                         {
698                                                         }
699                                                         void mm_expunged (MAILSTREAM *stream,unsigned long number)
700                                                         {
701                                                         }
702                                                         void mm_flags (MAILSTREAM *stream,unsigned long number)
703                                                         {
704                                                         }
705                                                         void mm_notify (MAILSTREAM *stream,char *string,long errflg)
706                                                         {
707                                                         }
708                                                         void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
709                                                         {
710                                                         }
711                                                         void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
712                                                         {
713                                                         }
714                                                         void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
715                                                         {
716                                                         }
717                                                         void mm_log (char *string,long errflg)
718                                                         {
719                                                         }
720                                                         void mm_dlog (char *string)
721                                                         {
722                                                         }
723                                                         void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
724                                                         {
725                                                         }
726                                                         void mm_critical (MAILSTREAM *stream)
727                                                         {
728                                                         }
729                                                         void mm_nocritical (MAILSTREAM *stream)
730                                                         {
731                                                         }
732                                                         long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
733                                                         {
734                                                         }
735                                                         void mm_fatal (char *string)
736                                                         {
737                                                         }],
738                                                         [
739                                                         long check = mail_expunge_full(NULL, "", 0);
740                                                         ]
741                                                 ),
742                                                 [ac_cv_imap_tk2006="yes"],
743                                                 [ac_cv_imap_tk2006="no"]
744                                         )
745                                 fi
746                         fi
747                 fi
748         fi 
749         if test "${IMAP_TK_DIR}" = "system"; then
750                 #We will enter here if user specified "system" or if any of above checks failed
751                 AC_MSG_CHECKING([for system c-client library...])
752                 CPPFLAGS="${saved_cppflags}"
753                 LIBS="${saved_libs}"
754                 imap_ldflags=""
755                 imap_libs="-lc-client"
756                 imap_include="-DUSE_SYSTEM_IMAP" #Try the imap directory first
757                 CPPFLAGS="${CPPFLAGS} ${imap_include}"
758                 LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
759                 AC_LINK_IFELSE(
760                 AC_LANG_PROGRAM(
761                                 [#include <stdio.h>
762                                 #include <imap/c-client.h>
763                                 void mm_searched (MAILSTREAM *stream,unsigned long number)
764                                 {
765                                 }
766                                 void mm_exists (MAILSTREAM *stream,unsigned long number)
767                                 {
768                                 }
769                                 void mm_expunged (MAILSTREAM *stream,unsigned long number)
770                                 {
771                                 }
772                                 void mm_flags (MAILSTREAM *stream,unsigned long number)
773                                 {
774                                 }
775                                 void mm_notify (MAILSTREAM *stream,char *string,long errflg)
776                                 {
777                                 }
778                                 void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
779                                 {
780                                 }
781                                 void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
782                                 {
783                                 }
784                                 void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
785                                 {
786                                 }
787                                 void mm_log (char *string,long errflg)
788                                 {
789                                 }
790                                 void mm_dlog (char *string)
791                                 {
792                                 }
793                                 void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
794                                 {
795                                 }
796                                 void mm_critical (MAILSTREAM *stream)
797                                 {
798                                 }
799                                 void mm_nocritical (MAILSTREAM *stream)
800                                 {
801                                 }
802                                 long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
803                                 {
804                                 }
805                                 void mm_fatal (char *string)
806                                 {
807                                 }],
808                                 [
809                                 MAILSTREAM *foo = mail_open(NULL, "", 0);
810                                 ]
811                         ),
812                         [ac_cv_imap_tk="yes"],
813                         [ac_cv_imap_tk="no"]
814                 )
815                 if test "${ac_cv_imap_tk}" = "yes"; then
816                         AC_LINK_IFELSE(
817                                 AC_LANG_PROGRAM(
818                                         [#include <stdio.h>
819                                         #include <imap/c-client.h>
820                                         void mm_searched (MAILSTREAM *stream,unsigned long number)
821                                         {
822                                         }
823                                         void mm_exists (MAILSTREAM *stream,unsigned long number)
824                                         {
825                                         }
826                                         void mm_expunged (MAILSTREAM *stream,unsigned long number)
827                                         {
828                                         }
829                                         void mm_flags (MAILSTREAM *stream,unsigned long number)
830                                         {
831                                         }
832                                         void mm_notify (MAILSTREAM *stream,char *string,long errflg)
833                                         {
834                                         }
835                                         void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
836                                         {
837                                         }
838                                         void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
839                                         {
840                                         }
841                                         void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
842                                         {
843                                         }
844                                         void mm_log (char *string,long errflg)
845                                         {
846                                         }
847                                         void mm_dlog (char *string)
848                                         {
849                                         }
850                                         void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
851                                         {
852                                         }
853                                         void mm_critical (MAILSTREAM *stream)
854                                         {
855                                         }
856                                         void mm_nocritical (MAILSTREAM *stream)
857                                         {
858                                         }
859                                         long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
860                                         {
861                                         }
862                                         void mm_fatal (char *string)
863                                         {
864                                         }],
865                                         [
866                                         long check = mail_expunge_full(NULL, "", 0);
867                                         ]
868                                 ),
869                                 [ac_cv_imap_tk2006="yes"],
870                                 [ac_cv_imap_tk2006="no"]
871                         )
872                 else #looking in imap directory didn't work, try c-client
873                         imap_ldflags=""
874                         imap_libs="-lc-client"
875                         imap_include="-DUSE_SYSTEM_CCLIENT"
876                         CPPFLAGS="${saved_cppflags}"
877                         LIBS="${saved_libs}"
878                         CPPFLAGS="${CPPFLAGS} ${imap_include}"
879                         LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
880                         AC_LINK_IFELSE(
881                         AC_LANG_PROGRAM(
882                                         [#include <stdio.h>
883                                         #include <c-client/c-client.h>
884                                         void mm_searched (MAILSTREAM *stream,unsigned long number)
885                                         {
886                                         }
887                                         void mm_exists (MAILSTREAM *stream,unsigned long number)
888                                         {
889                                         }
890                                         void mm_expunged (MAILSTREAM *stream,unsigned long number)
891                                         {
892                                         }
893                                         void mm_flags (MAILSTREAM *stream,unsigned long number)
894                                         {
895                                         }
896                                         void mm_notify (MAILSTREAM *stream,char *string,long errflg)
897                                         {
898                                         }
899                                         void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
900                                         {
901                                         }
902                                         void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
903                                         {
904                                         }
905                                         void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
906                                         {
907                                         }
908                                         void mm_log (char *string,long errflg)
909                                         {
910                                         }
911                                         void mm_dlog (char *string)
912                                         {
913                                         }
914                                         void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
915                                         {
916                                         }
917                                         void mm_critical (MAILSTREAM *stream)
918                                         {
919                                         }
920                                         void mm_nocritical (MAILSTREAM *stream)
921                                         {
922                                         }
923                                         long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
924                                         {
925                                         }
926                                         void mm_fatal (char *string)
927                                         {
928                                         }],
929                                         [
930                                         MAILSTREAM *foo = mail_open(NULL, "", 0);
931                                         ]
932                                 ),
933                                 [ac_cv_imap_tk="yes"],
934                                 [ac_cv_imap_tk="no"]
935                         )
936                         if test "${ac_cv_imap_tk}" = "yes"; then
937                                 AC_LINK_IFELSE(
938                                         AC_LANG_PROGRAM(
939                                                 [#include <stdio.h>
940                                                 #include <c-client/c-client.h>
941                                                 void mm_searched (MAILSTREAM *stream,unsigned long number)
942                                                 {
943                                                 }
944                                                 void mm_exists (MAILSTREAM *stream,unsigned long number)
945                                                 {
946                                                 }
947                                                 void mm_expunged (MAILSTREAM *stream,unsigned long number)
948                                                 {
949                                                 }
950                                                 void mm_flags (MAILSTREAM *stream,unsigned long number)
951                                                 {
952                                                 }
953                                                 void mm_notify (MAILSTREAM *stream,char *string,long errflg)
954                                                 {
955                                                 }
956                                                 void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
957                                                 {
958                                                 }
959                                                 void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
960                                                 {
961                                                 }
962                                                 void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
963                                                 {
964                                                 }
965                                                 void mm_log (char *string,long errflg)
966                                                 {
967                                                 }
968                                                 void mm_dlog (char *string)
969                                                 {
970                                                 }
971                                                 void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
972                                                 {
973                                                 }
974                                                 void mm_critical (MAILSTREAM *stream)
975                                                 {
976                                                 }
977                                                 void mm_nocritical (MAILSTREAM *stream)
978                                                 {
979                                                 }
980                                                 long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
981                                                 {
982                                                 }
983                                                 void mm_fatal (char *string)
984                                                 {
985                                                 }],
986                                                 [
987                                                 long check = mail_expunge_full(NULL, "", 0);
988                                                 ]
989                                         ),
990                                         [ac_cv_imap_tk2006="yes"],
991                                         [ac_cv_imap_tk2006="no"]
992                                 )
993                         fi
994                 fi
995         fi
996         if test "${ac_cv_imap_tk}" = "yes"; then
997                 AC_MSG_RESULT(yes)
998                 IMAP_TK_LIB="${imap_libs} "`echo ${imap_ldflags}`
999                 IMAP_TK_INCLUDE="${imap_include}"
1000                 PBX_IMAP_TK=1
1001                 AC_DEFINE([HAVE_IMAP_TK], 1, [Define if your system has the UW IMAP Toolkit c-client library.])
1002                 if test "${ac_cv_imap_tk2006}" = "yes"; then
1003                         AC_DEFINE([HAVE_IMAP_TK2006], 1, [Define if your system has the UW IMAP Toolkit c-client library version 2006 or greater.])
1004                 fi
1005         elif test -n "${IMAP_TK_MANDATORY}"; then
1006                 AC_MSG_RESULT(no) 
1007                 AC_MSG_NOTICE([***])
1008                 AC_MSG_NOTICE([*** The UW IMAP Toolkit installation on this system appears to be broken.])
1009                 AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1010                 AC_MSG_NOTICE([*** including --without-imap.])
1011                 exit 1
1012         else
1013                 AC_MSG_RESULT(no)
1014         fi
1015         CPPFLAGS="${saved_cppflags}"
1016         LIBS="${saved_libs}"
1019 # Needed by unixodbc
1020 AST_EXT_LIB_CHECK([LTDL], [ltdl], [lt_dlinit], [ltdl.h], [])
1022 AC_LANG_PUSH(C++)
1024 if test "${USE_KDE}" != "no"; then
1025    AC_MSG_CHECKING(for crashHandler in -lkdecore)
1026    saved_libs="${LIBS}"
1027    saved_cppflags="${CPPFLAGS}"
1028    CPPFLAGS="${CPPFLAGS} -I${KDE_DIR}/include"
1029    if test -d ${KDE_DIR}/lib; then
1030       kdelibdir="${KDE_DIR}/lib"
1031    else
1032       kdelibdir="${KDE_DIR}"
1033    fi
1034    LIBS="${LIBS} -L${kdelibdir} -lkdecore"
1036    AC_LINK_IFELSE(
1037         [AC_LANG_PROGRAM(
1038                         [#include "kcrash.h"],
1039                         [KCrash::defaultCrashHandler(1);])
1040         ],
1041         [ac_cv_lib_kde_crash="yes"],
1042         [ac_cv_lib_kde_crash="no"])
1043                 
1044    LIBS="${saved_libs}"
1045    CPPFLAGS="${saved_cppflags}"
1046         
1047    if test "${ac_cv_lib_kde_crash}" = "yes"; then
1048       AC_MSG_RESULT(yes) 
1049       KDE_LIB="-lkdecore -lkdeui"
1050       if test "${KDE_DIR}" != ""; then
1051          KDE_LIB="-L${kdelibdir} ${KDE_LIB}"
1052          KDE_INCLUDE="-I${KDE_DIR}/include"
1053       fi
1054       PBX_KDE=1
1055       AC_DEFINE([HAVE_LIBKDE], 1, [Define if your system has the KDE libraries.])
1056    elif test -n "${KDE_MANDATORY}"; then
1057       AC_MSG_RESULT(no) 
1058       AC_MSG_NOTICE([***])
1059       AC_MSG_NOTICE([*** The KDE installation on this system appears to be broken.])
1060       AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1061       AC_MSG_NOTICE([*** including --without-kde.])
1062       exit 1
1063    else
1064       AC_MSG_RESULT(no) 
1065    fi
1067 if test "${PBX_KDE}" = 1; then
1068    AC_PATH_TOOL(KDEINIT, kdeinit, No)
1069    if test ! x"${KDEINIT}" = xNo; then
1070       KDEDIR=$(${DIRNAME} ${KDEINIT})
1071       KDEDIR=$(${DIRNAME} ${KDEDIR})
1072    fi
1073    AC_SUBST([KDEDIR])
1076 AC_LANG_POP
1078 AST_EXT_LIB_CHECK([MISDN], [mISDN], [mISDN_open], [mISDNuser/mISDNlib.h])
1080 if test "${PBX_MISDN}" = 1; then
1081    AST_EXT_LIB_CHECK([ISDNNET], [isdnnet], [init_manager], [mISDNuser/isdn_net.h], [-lmISDN -lpthread])
1082    AST_EXT_LIB_CHECK([SUPPSERV], [suppserv], [encodeFac], [mISDNuser/suppserv.h])
1083    AC_CHECK_HEADER([linux/mISDNdsp.h], [AC_DEFINE_UNQUOTED([MISDN_1_2], 1, [Build chan_misdn for mISDN 1.2 or later.])])
1086 AST_EXT_LIB_CHECK([NBS], [nbs], [nbs_connect], [nbs.h])
1088 AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])
1090 NETSNMP_CONFIG=No
1091 if test "${USE_NETSNMP}" != "no"; then  
1092    if test "x${NETSNMP_DIR}" != "x"; then
1093       AC_PATH_TOOL([NETSNMP_CONFIG], [net-snmp-config], No, [${NETSNMP_DIR}/bin])
1094       if test x"${NETSNMP_CONFIG}" = xNo; then
1095          AC_MSG_NOTICE([***])
1096          AC_MSG_NOTICE([*** net-snmp-config was not found in the path you specified:])
1097          AC_MSG_NOTICE([*** ${NETSNMP_DIR}/bin])
1098          AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1099          AC_MSG_NOTICE([*** including --without-netsnmp])
1100          exit 1
1101       fi
1102    else
1103       AC_PATH_TOOL([NETSNMP_CONFIG], [net-snmp-config], No)
1104    fi
1106 if test x"${NETSNMP_CONFIG}" != xNo; then
1107    NETSNMP_libs=`${NETSNMP_CONFIG} --agent-libs`
1108    
1109    AC_CHECK_LIB([netsnmp], [snmp_register_callback], AC_DEFINE_UNQUOTED([HAVE_NETSNMP], 1,
1110    [Define to indicate the Net-SNMP library]), [], ${NETSNMP_libs})
1112    if test "${ac_cv_lib_netsnmp_snmp_register_callback}" = "yes"; then
1113       NETSNMP_LIB="${NETSNMP_libs}"
1114       PBX_NETSNMP=1
1115    elif test -n "${NETSNMP_MANDATORY}";
1116    then
1117       AC_MSG_NOTICE([***])
1118       AC_MSG_NOTICE([*** The Net-SNMP installation on this system appears to be broken.])
1119       AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1120       AC_MSG_NOTICE([*** including --without-netsnmp])
1121       exit 1
1122    fi
1123 elif test -n "${NETSNMP_MANDATORY}";
1124 then
1125    AC_MSG_NOTICE([***])
1126    AC_MSG_NOTICE([*** The Net-SNMP installation on this system appears to be broken.])
1127    AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1128    AC_MSG_NOTICE([*** including --without-netsnmp])
1129    exit 1
1132 AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
1134 AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], [])
1136 AST_EXT_LIB_CHECK([OGG], [ogg], [ogg_sync_init], [])
1138 if test "${USE_OSS}" != "no"; then
1139 PBX_OSS=0
1140 AC_CHECK_HEADER([linux/soundcard.h],
1141                 [
1142                 PBX_OSS=1
1143                 AC_DEFINE_UNQUOTED([HAVE_OSS], 1, [Define to indicate the Open Sound System library])
1144                 ])
1145 if test "$PBX_OSS" = "0"; then
1146    AC_CHECK_HEADER([sys/soundcard.h],
1147                    [
1148                    PBX_OSS=1
1149                    AC_DEFINE_UNQUOTED([HAVE_OSS], 1, [Define to indicate the Open Sound System library])
1150                    ])
1152 if test "$PBX_OSS" = "0"; then
1153    AST_EXT_LIB_CHECK([OSS], [ossaudio], [oss_ioctl_mixer], [soundcard.h])
1157 PG_CONFIG=No
1158 if test "${USE_PGSQL}" != "no"; then    
1159    if test "x${PGSQL_DIR}" != "x"; then
1160       AC_PATH_TOOL([PG_CONFIG], [pg_config], No, [${PGSQL_DIR}/bin])
1161       if test x"${PG_CONFIG}" = xNo; then
1162          AC_MSG_NOTICE([***])
1163          AC_MSG_NOTICE([*** pg_config was not found in the path you specified:])
1164          AC_MSG_NOTICE([*** ${PGSQL_DIR}/bin])
1165          AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1166          AC_MSG_NOTICE([*** including --without-postgres])
1167          exit 1
1168       fi
1169    else
1170       AC_PATH_TOOL([PG_CONFIG], [pg_config], No)
1171    fi
1173 if test "${PG_CONFIG}" != No; then
1174    PGSQL_libdir=`${PG_CONFIG} --libdir`
1175    PGSQL_includedir=`${PG_CONFIG} --includedir`
1177    if test "x$?" != "x0" ; then
1178       if test -n "${PGSQL_MANDATORY}" ; then
1179          AC_MSG_NOTICE([***])
1180          AC_MSG_NOTICE([*** The PostgreSQL installation on this system appears to be broken.])
1181          AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1182          AC_MSG_NOTICE([*** including --without-postgres])
1183          exit 1
1184           fi
1185    else 
1186       AC_CHECK_LIB([pq], [PQescapeStringConn], AC_DEFINE_UNQUOTED([HAVE_PGSQL], 1,
1187       [Define to indicate the PostgreSQL library]), [], -L${PGSQL_libdir} -lz)
1189       if test "${ac_cv_lib_pq_PQescapeStringConn}" = "yes"; then
1190          PGSQL_LIB="-L${PGSQL_libdir} -lpq -lz"
1191          PGSQL_INCLUDE="-I${PGSQL_includedir}"
1192          PBX_PGSQL=1
1193       elif test -n "${PGSQL_MANDATORY}";
1194       then
1195          AC_MSG_NOTICE([***])
1196          AC_MSG_NOTICE([*** The PostgreSQL installation on this system appears to be broken.])
1197          AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1198          AC_MSG_NOTICE([*** including --without-postgres])
1199          exit 1
1200       fi
1201    fi
1202 elif test -n "${PGSQL_MANDATORY}";
1203 then
1204    AC_MSG_NOTICE([***])
1205    AC_MSG_NOTICE([*** The PostgreSQL installation on this system appears to be broken.])
1206    AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1207    AC_MSG_NOTICE([*** including --without-postgres])
1208    exit 1
1211 AST_EXT_LIB_CHECK([POPT], [popt], [poptStrerror], [popt.h])
1213 AST_EXT_LIB_CHECK([PRI], [pri], [pri_keypad_facility], [libpri.h])
1215 AST_EXT_LIB_CHECK([PRI_VERSION], [pri], [pri_get_version], [libpri.h])
1217 if test "${USE_PWLIB}" != "no"; then
1218         if test -n "${PWLIB_DIR}"; then
1219                 PWLIBDIR="${PWLIB_DIR}"
1220         fi
1221         AST_CHECK_PWLIB()
1222         AST_CHECK_PWLIB_VERSION([PWLib], [PWLIB], [ptbuildopts.h], [1], [9], [2])
1223                 
1224         if test "${HAS_PWLIB:-unset}" != "unset"; then
1225                 AST_CHECK_OPENH323_PLATFORM()
1227                 PLATFORM_PWLIB="pt_${PWLIB_PLATFORM}_r"
1229                 AST_CHECK_PWLIB_BUILD([PWLib], [PWLIB],
1230                         [Define if your system has the PWLib libraries.],
1231                         [#include "ptlib.h"],
1232                         [BOOL q = PTime::IsDaylightSavings();])
1233         fi
1236 if test "${USE_PWLIB}" != "no" -a "x${ac_cv_lib_PWLIB}" != "xyes" -a -n "${PWLIB_MANDATORY}"; then
1237    AC_MSG_NOTICE([***])
1238    AC_MSG_NOTICE([*** The PWLIB installation on this system appears to be broken.])
1239    AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1240    AC_MSG_NOTICE([*** including --without-pwlib])
1241    exit 1
1244 if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then
1245         if test -n "${OPENH323_DIR}"; then
1246                 OPENH323DIR="${OPENH323_DIR}"
1247         fi
1248         AST_CHECK_OPENH323()
1249         AST_CHECK_PWLIB_VERSION([OpenH323], [OPENH323], [openh323buildopts.h], [1], [17], [3])
1250         AST_CHECK_OPENH323_BUILD()
1251         PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}"
1252         AST_CHECK_PWLIB_BUILD([OpenH323], [OPENH323],
1253                 [Define if your system has the OpenH323 libraries.],
1254                 [#include "ptlib.h"
1255                 #include "h323.h"
1256                 #include "h323ep.h"],
1257                 [H323EndPoint ep = H323EndPoint();],
1258                 [${PWLIB_INCLUDE}], [${PWLIB_LIB}])
1260 if test "${USE_OPENH323}" != "no" -a "x${ac_cv_lib_OPENH323}" != "xyes" -a -n "${OPENH323_MANDATORY}"; then
1261    AC_MSG_NOTICE([***])
1262    AC_MSG_NOTICE([*** The OPENH323 installation on this system appears to be broken.])
1263    AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1264    AC_MSG_NOTICE([*** including --without-h323])
1265    exit 1
1268 AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])
1270 AST_EXT_LIB_CHECK([SPEEX], [speex], [speex_encode], [speex/speex.h], [-lm])
1272 # See if the main speex library contains the preprocess functions
1273 AST_EXT_LIB_CHECK([SPEEX_PREPROCESS], [speex], [speex_preprocess_ctl], [speex/speex.h], [-lm])
1274 if test "${PBX_SPEEX_PREPROCESS}" = 1; then
1275    PBX_SPEEX_PREPROCESS=1
1278 AST_EXT_LIB_CHECK([SPEEXDSP], [speexdsp], [speex_preprocess_ctl], [speex/speex.h], [-lm])
1279 if test "${PBX_SPEEXDSP}" = 1; then
1280    PBX_SPEEX_PREPROCESS=1
1283 AC_SUBST(PBX_SPEEX_PREPROCESS)
1285 AST_EXT_LIB_CHECK([SQLITE], [sqlite], [sqlite_exec], [sqlite.h])
1287 AST_EXT_LIB_CHECK([OPENSSL], [ssl], [ssl2_connect], [openssl/ssl.h], [-lcrypto])
1288 if test "$PBX_OPENSSL" = "1";
1289 then
1290     AST_EXT_LIB_CHECK([OSPTK], [osptk], [OSPPCryptoDecrypt], [osp/osp.h], [-lcrypto -lssl])
1293 AST_EXT_LIB_CHECK([FREETDS], [tds], [tds_version], [tds.h])
1294 if test "${PBX_FREETDS}" != "0";
1295 then
1296     if test "${FREETDS_DIR}x" = "x";
1297     then
1298         for tds_dir in /usr /usr/local;
1299         do
1300             if test -f "${tds_dir}/include/tdsver.h";
1301             then
1302                 FREETDS_DIR="${tds_dir}"
1303             fi
1304         done
1305     fi
1306     case `${GREP} TDS_VERSION_NO ${FREETDS_DIR:-/usr}/include/tdsver.h` in
1307     *0.64*)
1308         FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_64"
1309         ;;
1310     *0.63*)
1311         FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_63"
1312         ;;
1313     *0.62*)
1314         FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_62"
1315         ;;
1316     *)
1317         FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_PRE_0_62"
1318         ;;
1319     esac
1322 AST_EXT_LIB_CHECK([TERMCAP], [termcap], [tgetent], [])
1324 AST_EXT_LIB_CHECK([TINFO], [tinfo], [tgetent], [])
1326 if test "${host_os}" != "linux-gnu" ; then
1327   tonezone_extra="-lm"
1330 AST_EXT_LIB_CHECK([TONEZONE], [tonezone], [tone_zone_find], [zaptel/tonezone.h], [${tonezone_extra}])
1332 AST_EXT_LIB_CHECK([USB], [usb], [usb_init], [usb.h], [])
1334 AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc])
1336 AC_LANG_PUSH(C++)
1338 if test "${USE_VPB}" != "no"; then
1339    AC_MSG_CHECKING(for vpb_open in -lvpb)
1340    saved_libs="${LIBS}"
1341    saved_cppflags="${CPPFLAGS}"
1342    if test "x${VPB_DIR}" != "x"; then
1343       if test -d ${VPB_DIR}/lib; then
1344          vpblibdir=${VPB_DIR}/lib
1345       else
1346          vpblibdir=${VPB_DIR}
1347       fi
1348       LIBS="${LIBS} -L${vpblibdir}"
1349       CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include"
1350    fi
1351    LIBS="${LIBS} -lvpb -lpthread"
1352    AC_LINK_IFELSE(
1353         [
1354         AC_LANG_PROGRAM(
1355         [#include <vpbapi.h>],
1356         [int q = vpb_open(0,0);])
1357         ],
1358         [       AC_MSG_RESULT(yes) 
1359                 ac_cv_lib_vpb_vpb_open="yes" 
1360         ],
1361         [       AC_MSG_RESULT(no) 
1362                 ac_cv_lib_vpb_vpb_open="no" 
1363         ]
1364         )
1365    LIBS="${saved_libs}"
1366    CPPFLAGS="${saved_cppflags}"
1367    if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
1368         VPB_LIB="-lvpb"
1369         if test "${VPB_DIR}" != ""; then
1370            VPB_LIB="-L${vpblibdir}  ${VPB_LIB}"
1371            VPB_INCLUDE="-I${VPB_DIR}/include"
1372         fi
1373         PBX_VPB=1
1374         AC_DEFINE([HAVE_VPB], 1, [Define if your system has the VoiceTronix API libraries.])
1375    elif test -n "${VPB_MANDATORY}"; then
1376       AC_MSG_NOTICE([***])
1377       AC_MSG_NOTICE([*** The VoiceTronix (vpb) installation on this system appears to be broken.])
1378       AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1379       AC_MSG_NOTICE([*** including --without-vpb.])
1380       exit 1
1381    fi
1384 AC_LANG_POP
1386 AST_EXT_LIB_CHECK([ZLIB], [z], [compress], [zlib.h])
1388 if test "${USE_ZAPTEL}" != "no"; then
1389    AC_MSG_CHECKING(for ZT_DIAL_OP_CANCEL in zaptel/zaptel.h)
1390    saved_cppflags="${CPPFLAGS}"
1391    if test "x${ZAPTEL_DIR}" != "x"; then
1392       CPPFLAGS="${CPPFLAGS} -I${ZAPTEL_DIR}/include"
1393    fi
1394    AC_COMPILE_IFELSE(
1395         [
1396         AC_LANG_PROGRAM(
1397         [#include <zaptel/zaptel.h>],
1398         [int foo = ZT_DIAL_OP_CANCEL;])
1399         ],
1400         [       AC_MSG_RESULT(yes) 
1401                 ac_cv_zaptel_h="yes" 
1402         ],
1403         [       AC_MSG_RESULT(no) 
1404                 ac_cv_zaptel_h="no" 
1405         ]
1406         )
1407    CPPFLAGS="${saved_cppflags}"
1408    if test "${ac_cv_zaptel_h}" = "yes"; then
1409         if test "${ZAPTEL_DIR}" != ""; then
1410            ZAPTEL_INCLUDE="-I${ZAPTEL_DIR}/include"
1411         fi
1412         PBX_ZAPTEL=1
1413         AC_DEFINE([HAVE_ZAPTEL], 1, [Define if your system has the Zaptel headers.])
1414    elif test -n "${ZAPTEL_MANDATORY}"; 
1415    then
1416       AC_MSG_NOTICE([***])
1417       AC_MSG_NOTICE([*** The Zaptel installation on this system appears to be broken.])
1418       AC_MSG_NOTICE([*** Either correct the installation, or run configure])
1419       AC_MSG_NOTICE([*** including --without-zaptel.])
1420       exit 1
1421    fi
1424 if test "${PBX_ZAPTEL}" = 1; then
1425    AC_MSG_CHECKING(for ZT_EVENT_REMOVED in zaptel/zaptel.h)
1426    saved_cppflags="${CPPFLAGS}"
1427    if test "x${ZAPTEL_DIR}" != "x"; then
1428       CPPFLAGS="${CPPFLAGS} -I${ZAPTEL_DIR}/include"
1429    fi
1430    AC_COMPILE_IFELSE(
1431         [
1432         AC_LANG_PROGRAM(
1433         [#include <zaptel/zaptel.h>],
1434         [int foo = ZT_EVENT_REMOVED;])
1435         ],
1436         [       AC_MSG_RESULT(yes) 
1437                 ac_cv_zaptel_vldtmf="yes" 
1438         ],
1439         [       AC_MSG_RESULT(no) 
1440                 ac_cv_zaptel_vldtmf="no" 
1441         ]
1442         )
1443    CPPFLAGS="${saved_cppflags}"
1444    if test "${ac_cv_zaptel_vldtmf}" = "yes"; then
1445         PBX_ZAPTEL_VLDTMF=1
1446    fi
1447    AC_MSG_CHECKING(for ZT_TCOP_ALLOCATE in zaptel/zaptel.h)
1448    saved_cppflags="${CPPFLAGS}"
1449    if test "x${ZAPTEL_DIR}" != "x"; then
1450       CPPFLAGS="${CPPFLAGS} -I${ZAPTEL_DIR}/include"
1451    fi
1452    AC_COMPILE_IFELSE(
1453         [
1454         AC_LANG_PROGRAM(
1455         [#include <zaptel/zaptel.h>],
1456         [int foo = ZT_TCOP_ALLOCATE;])
1457         ],
1458         [       AC_MSG_RESULT(yes) 
1459                 ac_cv_zaptel_transcode="yes" 
1460         ],
1461         [       AC_MSG_RESULT(no) 
1462                 ac_cv_zaptel_transcode="no" 
1463         ]
1464         )
1465    CPPFLAGS="${saved_cppflags}"
1466    if test "${ac_cv_zaptel_transcode}" = "yes"; then
1467         PBX_ZAPTEL_TRANSCODE=1
1468    fi
1470 AC_SUBST(PBX_ZAPTEL_VLDTMF)
1471 AC_SUBST(PBX_ZAPTEL_TRANSCODE)
1473 EDITLINE_LIB=""
1474 if test "x$TERMCAP_LIB" != "x" ; then
1475   EDITLINE_LIB="$TERMCAP_LIB"
1476 elif test "x$TINFO_LIB" != "x" ; then
1477   EDITLINE_LIB="$TINFO_LIB"
1478 elif test "x$CURSES_LIB" != "x" ; then
1479   EDITLINE_LIB="$CURSES_LIB"
1480 elif test "x$NCURSES_LIB" != "x" ; then
1481   EDITLINE_LIB="$NCURSES_LIB"
1482 else
1483   AC_MSG_ERROR(*** termcap support not found)
1485 AC_SUBST(EDITLINE_LIB)
1487 AC_CHECK_HEADER([h323.h], [PBX_H323=1], [PBX_H323=0])
1488 AC_SUBST(PBX_H323)
1490 AC_CHECK_HEADER([linux/compiler.h],
1491                 [AC_DEFINE_UNQUOTED([HAVE_LINUX_COMPILER_H], 1, [Define to 1 if your system has linux/compiler.h.])])
1493 AC_CHECK_HEADER([linux/ixjuser.h], [PBX_IXJUSER=1], [PBX_IXJUSER=0], [
1494                                    #include <linux/version.h>
1495                                    #ifdef HAVE_LINUX_COMPILER_H
1496                                    #include <linux/compiler.h>
1497                                    #endif
1498                                    ])
1499 AC_SUBST(PBX_IXJUSER)
1501 if test "${cross_compiling}" = "no";
1502 then
1503   AC_CHECK_FILE(/sbin/launchd, AC_DEFINE([HAVE_SBIN_LAUNCHD], 1, [Define to 1 if your system has /sbin/launchd.]))
1506 PBX_GTK=0
1507 AC_CHECK_TOOL(GTKCONFIG, gtk-config, No)
1508 if test ! "x${GTKCONFIG}" = xNo; then
1509    GTK_INCLUDE=$(${GTKCONFIG} --cflags gthread)
1510    GTK_LIB=$(${GTKCONFIG} --libs gthread)
1511    PBX_GTK=1
1512    AC_DEFINE([HAVE_GTK], 1, [Define if your system has the GTK libraries.])
1514 AC_SUBST(PBX_GTK)
1515 AC_SUBST(GTK_INCLUDE)
1516 AC_SUBST(GTK_LIB)
1518 PBX_GTK2=0
1519 AC_CHECK_TOOL(PKGCONFIG, pkg-config, No)
1520 if test ! "x${PKGCONFIG}" = xNo; then
1521    GTK2_INCLUDE=$(${PKGCONFIG} gtk+-2.0 --cflags 2>/dev/null)
1522    GTK2_LIB=$(${PKGCONFIG} gtk+-2.0 --libs)
1523    PBX_GTK2=1
1524    AC_DEFINE([HAVE_GTK2], 1, [Define if your system has the GTK2 libraries.])
1526 AC_SUBST(PBX_GTK2)
1527 AC_SUBST(GTK2_INCLUDE)
1528 AC_SUBST(GTK2_LIB)
1530 if test "${USE_CURL}" != "no"; then
1531    AC_PATH_TOOL([CURL_CONFIG], [curl-config], No)
1532    if test ! x"${CURL_CONFIG}" = xNo; then
1533    # check for version
1534       if test $(printf "%d" 0x$(${CURL_CONFIG} --vernum)) -ge $(printf "%d" 0x070907); then
1535          CURL_INCLUDE=$(${CURL_CONFIG} --cflags)
1536          CURL_LIB=$(${CURL_CONFIG} --libs)
1538          AC_MSG_CHECKING(for curl_version() in curl/curl.h)
1539          saved_cppflags="${CPPFLAGS}"
1540          CPPFLAGS="${CPPFLAGS} ${CURL_INCLUDE}"
1541          AC_COMPILE_IFELSE(
1542             [AC_LANG_PROGRAM(
1543                 [#include <curl/curl.h>],
1544                     [curl_version();])
1545             ],[
1546                 AC_MSG_RESULT(yes)
1547                 ac_cv_curl_h="yes"
1548             ],[
1549                 AC_MSG_RESULT(no)
1550                 ac_cv_curl_h="no"
1551             ]
1552          )
1553          CPPFLAGS="${saved_cppflags}"
1554          if test "${ac_cv_curl_h}" = "yes"; then
1555              PBX_CURL=1
1556              AC_DEFINE([HAVE_CURL], 1, [Define if your system has the curl libraries.])
1557          fi
1558       fi
1559    fi
1562 AC_CONFIG_FILES([build_tools/menuselect-deps makeopts channels/h323/Makefile])
1563 AC_OUTPUT
1565 if test "x${silent}" != "xyes" ; then
1566 echo
1567 echo "               .\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$=..      "
1568 echo "            .\$7\$7..          .7\$\$7:.    "
1569 echo "          .\$\$:.                 ,\$7.7   "
1570 echo "        .\$7.     7\$\$\$\$           .\$\$77  "
1571 echo "     ..\$\$.       \$\$\$\$\$            .\$\$\$7 "
1572 echo "    ..7\$   .?.   \$\$\$\$\$   .?.       7\$\$\$."
1573 echo "   \$.\$.   .\$\$\$7. \$\$\$\$7 .7\$\$\$.      .\$\$\$."
1574 echo " .777.   .\$\$\$\$\$\$77\$\$\$77\$\$\$\$\$7.      \$\$\$,"
1575 echo " \$\$\$~      .7\$\$\$\$\$\$\$\$\$\$\$\$\$7.       .\$\$\$."
1576 echo ".\$\$7          .7\$\$\$\$\$\$\$7:          ?\$\$\$."
1577 echo "\$\$\$          ?7\$\$\$\$\$\$\$\$\$\$I        .\$\$\$7 "
1578 echo "\$\$\$       .7\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$      :\$\$\$. "
1579 echo "\$\$\$       \$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$\$\$\$    .\$\$\$.  "
1580 echo "\$\$\$        \$\$\$   7\$\$\$7  .\$\$\$    .\$\$\$.   "
1581 echo "\$\$\$\$             \$\$\$\$7         .\$\$\$.    "
1582 echo "7\$\$\$7            7\$\$\$\$        7\$\$\$      "
1583 echo " \$\$\$\$\$                        \$\$\$       "
1584 echo "  \$\$\$\$7.                       \$\$  (TM)     "
1585 echo "   \$\$\$\$\$\$\$.           .7\$\$\$\$\$\$  \$\$      "
1586 echo "     \$\$\$\$\$\$\$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$.\$\$\$\$\$\$      "
1587 echo "       \$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$.                "
1588 echo
1591 AC_MSG_NOTICE(Package configured for: )
1592 AC_MSG_NOTICE( OS type  : $host_os)
1593 AC_MSG_NOTICE( Host CPU : $host_cpu)
1594 if test "${cross_compiling}" = "yes"; then
1595    AC_MSG_NOTICE( Cross Compilation = YES)