2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# Process this file with autoconf to produce a configure script.
							 
						 
					
						
							
								
									
										
										
										
											2006-10-03 15:48:57 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								#
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# Make sure we use autoconf 2.60 to generate the "configure" script,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# in case we want to commit it. Other than that, version 2.59 is
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# perfectly fine for our purposes, so people who want to modify
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# this file just have to remember to set the AC_PREREQ argument
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# to something that suits their needs.
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-09-28 14:35:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_PREREQ(2.60)
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-02-03 06:43:57 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_INIT(asterisk, 1.6, www.asterisk.org)
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# cross-compile macros
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_CANONICAL_BUILD
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_CANONICAL_HOST
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# check existence of the package
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CONFIG_SRCDIR([main/asterisk.c])
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# specify output header file
							 
						 
					
						
							
								
									
										
										
										
											2006-06-07 19:05:35 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CONFIG_HEADER(include/asterisk/autoconfig.h)
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_COPYRIGHT("Asterisk")
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_REVISION($Revision$)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-01-19 09:44:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_USE_SYSTEM_EXTENSIONS	# note- does not work on FreeBSD
							 
						 
					
						
							
								
									
										
										
										
											2006-12-25 17:06:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								case "${host_os}" in
							 
						 
					
						
							
								
									
										
										
										
											2006-09-18 19:30:10 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     freebsd*)
							 
						 
					
						
							
								
									
										
										
										
											2006-06-22 12:55:49 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     ac_default_prefix=/usr/local
							 
						 
					
						
							
								
									
										
										
										
											2006-10-04 22:59:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     CPPFLAGS=-I/usr/local/include
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     LDFLAGS=-L/usr/local/lib
							 
						 
					
						
							
								
									
										
										
										
											2006-05-19 18:54:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     ;;
							 
						 
					
						
							
								
									
										
										
										
											2007-01-19 09:44:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										
											
												Merged revisions 182847 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk
................
r182847 | russell | 2009-03-17 21:28:55 -0500 (Tue, 17 Mar 2009) | 52 lines
Merged revisions 182810 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r182810 | russell | 2009-03-17 21:09:13 -0500 (Tue, 17 Mar 2009) | 44 lines
Fix cases where the internal poll() was not being used when it needed to be.
We have seen a number of problems caused by poll() not working properly on 
Mac OSX.  If you search around, you'll find a number of references to using 
select() instead of poll() to work around these issues.  In Asterisk, we've 
had poll.c which implements poll() using select() internally.  However, we 
were still getting reports of problems.
vadim investigated a bit and realized that at least on his system, even 
though we were compiling in poll.o, the system poll() was still being used.  
So, the primary purpose of this patch is to ensure that we're using the 
internal poll() when we want it to be used.
The changes are:
1) Remove logic for when internal poll should be used from the Makefile.  
   Instead, put it in the configure script.  The logic in the configure 
   script is the same as it was in the Makefile.  Ideally, we would have 
   a functionality test for the problem, but that's not actually possible, 
   since we would have to be able to run an application on the _target_ 
   system to test poll() behavior.
2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT
   is not defined.
3) Change uses of poll() throughout the source tree to ast_poll().  I feel 
   that it is good practice to give the API call a new name when we are 
   changing its behavior and not using the system version directly in all cases.
   So, normally, ast_poll() is just redefined to poll().  On systems where 
   AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll().
4) Change poll() in main/poll.c to be ast_internal_poll().
It's worth noting that any code that still uses poll() directly will work fine 
(if they worked fine before).  So, for example, out of tree modules that are 
using poll() will not stop working or anything.  However, for modules to work 
properly on Mac OSX, ast_poll() needs to be used.
(closes issue #13404)
Reported by: agalbraith
Tested by: russell, vadim
http://reviewboard.digium.com/r/198/
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@182946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
											 
										 
										
											2009-03-18 14:32:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     darwin*)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     AC_DEFINE([AST_POLL_COMPAT], 1, [Define to 1 if internal poll should be used.])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     ;;
							 
						 
					
						
							
								
									
										
										
										
											2006-05-19 18:54:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     *)
							 
						 
					
						
							
								
									
										
										
										
											2006-06-22 12:55:49 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     ac_default_prefix=/usr
							 
						 
					
						
							
								
									
										
										
										
											2008-07-30 21:40:08 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     if test ${prefix} = '/usr' || test ${prefix} = 'NONE'; then
							 
						 
					
						
							
								
									
										
										
										
											2008-07-30 19:48:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        if test ${sysconfdir} = '${prefix}/etc'; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								           sysconfdir=/etc
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if test ${mandir} = '${prefix}/man'; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								           mandir=/usr/share/man
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        fi
							 
						 
					
						
							
								
									
										
										
										
											2006-05-25 22:05:12 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     fi
							 
						 
					
						
							
								
									
										
										
										
											2006-05-19 18:54:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     ;;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								esac
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-11 22:23:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test ${prefix} = ${ac_default_prefix} || test ${prefix} = 'NONE'; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     if test ${localstatedir} = '${prefix}/var'; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        localstatedir=/var
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     fi
							 
						 
					
						
							
								
									
										
										
										
											2006-05-19 18:54:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								BUILD_PLATFORM=${build}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								BUILD_CPU=${build_cpu}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								BUILD_VENDOR=${build_vendor}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								BUILD_OS=${build_os}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(BUILD_PLATFORM)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(BUILD_CPU)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(BUILD_VENDOR)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(BUILD_OS)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HOST_PLATFORM=${host}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HOST_CPU=${host_cpu}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HOST_VENDOR=${host_vendor}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HOST_OS=${host_os}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(HOST_PLATFORM)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(HOST_CPU)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(HOST_VENDOR)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(HOST_OS)
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-12-17 17:11:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								WINARCH=0
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 14:04:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								case "${host_os}" in
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     freebsd*)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     OSARCH=FreeBSD
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     ;;
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 14:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     netbsd*)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     OSARCH=NetBSD
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     ;;
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 14:24:14 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     openbsd*)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     OSARCH=OpenBSD
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     ;;
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 14:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     solaris*)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     OSARCH=SunOS
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     ;;
							 
						 
					
						
							
								
									
										
										
										
											2007-12-17 17:11:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     mingw32)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     OSARCH=mingw32
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     WINARCH=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     ;;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     cygwin)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     OSARCH=cygwin
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     WINARCH=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     ;;
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 14:04:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     *)
							 
						 
					
						
							
								
									
										
										
										
											2007-11-17 00:31:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     OSARCH=${host_os}
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 14:04:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     ;;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								esac
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(OSARCH)
							 
						 
					
						
							
								
									
										
										
										
											2007-12-17 17:11:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_SUBST(WINARCH)
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 14:04:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								#  check for uname
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PATH_TOOL([UNAME], [uname], No)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if test ! x"${UNAME}" = xNo; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   PBX_OSREV=$(${UNAME} -r)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(PBX_OSREV)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AH_TOP(
							 
						 
					
						
							
								
									
										
										
										
											2006-06-07 18:54:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								#ifndef ASTERISK_AUTOCONFIG_H
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#define ASTERISK_AUTOCONFIG_H
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-05-11 09:50:41 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								#include "asterisk/buildopts.h"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-06-07 18:54:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AH_BOTTOM(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#endif
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# cross-compile checks
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "${cross_compiling}" = "yes"; 
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   AC_CHECK_TOOL(CC, gcc, :)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   AC_CHECK_TOOL(CXX, g++, :)
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   AC_CHECK_TOOL(LD, ld, :)
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								   AC_CHECK_TOOL(RANLIB, ranlib, :)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# Checks for programs.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PROG_CC
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PROG_CXX
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PROG_CPP
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PROG_CXXCPP
							 
						 
					
						
							
								
									
										
										
										
											2006-11-08 16:36:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# This macro is just copied into our local acinclude.m4 from libtool.m4 so that
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# the developers regenerating the configure script don't have to install libtool.
							 
						 
					
						
							
								
									
										
										
										
											2007-01-19 09:44:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_PROG_LD	# note, does not work on FreeBSD
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								AC_PROG_AWK
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PROG_INSTALL
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PROG_LN_S
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PROG_RANLIB
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_CHECK_GNU_MAKE
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-05-24 20:44:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_PATH_TOOL([STRIP], [strip], :)
							 
						 
					
						
							
								
									
										
										
										
											2007-05-24 20:55:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_PATH_TOOL([AR], [ar], :)
							 
						 
					
						
							
								
									
										
										
										
											2007-05-24 20:44:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-11-01 22:35:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								GNU_LD=0
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if test "x$with_gnu_ld" = "xyes" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   GNU_LD=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(GNU_LD)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								AC_PATH_PROG([GREP], [grep], :)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PATH_PROG([FIND], [find], :)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PATH_PROG([COMPRESS], [compress], :)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PATH_PROG([BASENAME], [basename], :)
							 
						 
					
						
							
								
									
										
										
										
											2006-09-18 19:57:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_PATH_PROG([ID], [id], :)
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								AC_PATH_PROG([DIRNAME], [dirname], :)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PATH_PROG([SHELL], [sh], :)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PATH_PROG([LN], [ln], :)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PATH_PROG([DOT], [dot], :)
							 
						 
					
						
							
								
									
										
										
										
											2006-12-01 23:20:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_PATH_PROG([WGET], [wget], :)
							 
						 
					
						
							
								
									
										
										
										
											2007-03-15 22:29:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_PATH_PROG([RUBBER], [rubber], :)
							 
						 
					
						
							
								
									
										
										
										
											2008-01-11 23:57:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_PATH_PROG([KPATHSEA], [kpsewhich], :)
							 
						 
					
						
							
								
									
										
										
										
											2006-12-01 23:20:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "${WGET}" != ":" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  DOWNLOAD=${WGET}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								else
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  AC_PATH_PROG([FETCH], [fetch], [:])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  DOWNLOAD=${FETCH}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(DOWNLOAD)
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-12-19 22:51:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CHECK_TOOL([SOXMIX], [soxmix], [:])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if test "${SOXMIX}" != ":" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_DEFINE([HAVE_SOXMIX], 1, [Define to 1 if your system has soxmix application.])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-11-19 00:38:23 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CHECK_PROGS([MD5], [md5 md5sum gmd5sum digest])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if test "${MD5}" = "digest" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   MD5="${MD5} -a md5"   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-01-15 15:08:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								ACX_PTHREAD
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								AC_LANG(C)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_ARG_ENABLE(dev-mode,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									[  --enable-dev-mode    Turn on developer mode],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									[case "${enableval}" in
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									      y|ye|yes) AST_DEVMODE=yes ;;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									      n|no)  AST_DEVMODE=no ;;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									      *) AC_MSG_ERROR(bad value ${enableval} for --enable-dev-mode)  ;;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									esac])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(AST_DEVMODE)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-12-19 08:57:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# AST_EXT_LIB_SETUP is used to tell configure to handle variables for
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# various packages.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# $1 is the prefix for the variables in makeopts and autoconfig.h
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# $2 is the short comment, $4 is the long comment
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# $3 is the name used in --with- or --without- flags for configure.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# Package option names should be in alphabetical order
							 
						 
					
						
							
								
									
										
										
										
											2007-11-21 00:22:41 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# by the --with option name (the third field),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# to make things easier for the users.
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([ALSA], [Advanced Linux Sound Architecture], [asound])
							 
						 
					
						
							
								
									
										
										
										
											2007-01-19 09:39:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# BKTR is used for backtrace support on platforms that do not
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# have it natively.
							 
						 
					
						
							
								
									
										
										
										
											2007-01-19 09:32:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([BKTR], [Stack Backtrace support], [execinfo])
							 
						 
					
						
							
								
									
										
										
										
											2006-09-27 21:48:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([CAP], [POSIX 1.e capabilities], [cap])
							 
						 
					
						
							
								
									
										
										
										
											2006-09-29 18:54:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([CURL], [cURL], [curl])
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([CURSES], [curses], [curses])
							 
						 
					
						
							
								
									
										
										
										
											2007-05-25 15:07:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([CRYPTO], [OpenSSL Cryptography support], [crypto])
							 
						 
					
						
							
								
									
										
										
										
											2008-06-12 17:27:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([DAHDI], [DAHDI], [dahdi])
							 
						 
					
						
							
								
									
										
										
										
											2008-03-17 17:31:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([FFMPEG], [Ffmpeg and avcodec library], [avcodec])
							 
						 
					
						
							
								
									
										
										
										
											2007-11-21 00:22:41 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([GSM], [External GSM library], [gsm], [, use 'internal' GSM otherwise])
							 
						 
					
						
							
								
									
										
										
										
											2007-12-19 08:57:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([GTK], [gtk libraries], [gtk])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([GTK2], [gtk2 libraries], [gtk2])
							 
						 
					
						
							
								
									
										
										
										
											2008-03-17 22:10:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([GMIME], [GMime library], [gmime])
							 
						 
					
						
							
								
									
										
										
										
											2008-08-03 16:14:14 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([HOARD], [Hoard Memory Allocator], [hoard])
							 
						 
					
						
							
								
									
										
										
										
											2008-01-01 22:08:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([ICONV], [Iconv Library], [iconv])
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([IKSEMEL], [Iksemel Jabber Library], [iksemel])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([IMAP_TK], [UW IMAP Toolkit], [imap])
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([ISDNNET], [ISDN4Linux Library], [isdnnet])
							 
						 
					
						
							
								
									
										
										
										
											2008-01-13 18:08:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([JACK], [Jack Audio Connection Kit], [jack])
							 
						 
					
						
							
								
									
										
										
										
											2008-01-22 22:33:20 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([LDAP], [OpenLDAP], [ldap])
							 
						 
					
						
							
								
									
										
										
										
											2007-06-18 16:35:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([LTDL], [libtool], [ltdl])
							 
						 
					
						
							
								
									
										
										
										
											2007-11-02 15:36:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([LUA], [Lua], [lua])
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([MISDN], [mISDN User Library], [misdn])
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([NBS], [Network Broadcast Sound], [nbs])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([NCURSES], [ncurses], [ncurses])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([NETSNMP], [Net-SNMP], [netsnmp])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([NEWT], [newt], [newt])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([UNIXODBC], [unixODBC], [odbc])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([OGG], [OGG], [ogg])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([OSPTK], [OSP Toolkit], [osptk])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([OSS], [Open Sound System], [oss])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres])
							 
						 
					
						
							
								
									
										
										
										
											2007-12-31 15:20:30 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([POPT], [popt], [popt])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([PORTAUDIO], [PortAudio], [portaudio])
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri])
							 
						 
					
						
							
								
									
										
										
										
											2008-07-21 14:47:41 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([RESAMPLE], [LIBRESAMPLE], [resample])
							 
						 
					
						
							
								
									
										
										
										
											2008-06-02 15:43:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([SPANDSP], [SPANDSP], [spandsp])
							 
						 
					
						
							
								
									
										
										
										
											2006-09-21 18:41:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([SS7], [ISDN SS7], [ss7])
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([PWLIB], [PWlib], [pwlib])
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 17:07:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([OPENH323], [OpenH323], [h323])
							 
						 
					
						
							
								
									
										
										
										
											2008-03-18 00:28:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])
							 
						 
					
						
							
								
									
										
										
										
											2008-03-17 17:31:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([SDL], [Sdl], [sdl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([SDL_IMAGE], [Sdl Image library], [SDL_image])
							 
						 
					
						
							
								
									
										
										
										
											2008-07-01 17:22:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([OPENAIS], [OpenAIS], [openais])
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([SPEEX], [Speex], [speex])
							 
						 
					
						
							
								
									
										
										
										
											2008-12-01 21:46:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([SPEEX_PREPROCESS], [Speex preprocess routines], [speex])
							 
						 
					
						
							
								
									
										
										
										
											2008-01-16 01:17:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([SPEEXDSP], [Speexdsp], [speexdsp])
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([SQLITE], [SQLite], [sqlite])
							 
						 
					
						
							
								
									
										
										
										
											2007-03-13 21:22:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([SQLITE3], [SQLite], [sqlite3])
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([SUPPSERV], [mISDN Supplemental Services], [suppserv])
							 
						 
					
						
							
								
									
										
										
										
											2007-05-25 15:07:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([OPENSSL], [OpenSSL Secure Sockets Layer support], [ssl])
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([FREETDS], [FreeTDS], [tds])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([TERMCAP], [Termcap], [termcap])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([TINFO], [Term Info], [tinfo])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([TONEZONE], [tonezone], [tonezone])
							 
						 
					
						
							
								
									
										
										
										
											2007-09-14 15:52:28 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([USB], [usb], [usb])
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([VORBIS], [Vorbis], [vorbis])
							 
						 
					
						
							
								
									
										
										
										
											2008-01-28 21:07:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([VPB], [Voicetronix API], [vpb])
							 
						 
					
						
							
								
									
										
										
										
											2007-11-21 00:22:41 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([X11], [X11 support], [x11])
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_SETUP([ZLIB], [zlib], [z])
							 
						 
					
						
							
								
									
										
										
										
											2007-11-17 01:49:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# check for basic system features and functionality before
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# checking for package libraries
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 08:45:49 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_FUNC_ALLOCA
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_HEADER_DIRENT
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_HEADER_STDC
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_HEADER_SYS_WAIT
							 
						 
					
						
							
								
									
										
										
										
											2008-11-25 05:05:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								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 sys/io.h])
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-11-17 04:17:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CHECK_HEADERS([winsock.h winsock2.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										
											
												Merged revisions 182847 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk
................
r182847 | russell | 2009-03-17 21:28:55 -0500 (Tue, 17 Mar 2009) | 52 lines
Merged revisions 182810 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r182810 | russell | 2009-03-17 21:09:13 -0500 (Tue, 17 Mar 2009) | 44 lines
Fix cases where the internal poll() was not being used when it needed to be.
We have seen a number of problems caused by poll() not working properly on 
Mac OSX.  If you search around, you'll find a number of references to using 
select() instead of poll() to work around these issues.  In Asterisk, we've 
had poll.c which implements poll() using select() internally.  However, we 
were still getting reports of problems.
vadim investigated a bit and realized that at least on his system, even 
though we were compiling in poll.o, the system poll() was still being used.  
So, the primary purpose of this patch is to ensure that we're using the 
internal poll() when we want it to be used.
The changes are:
1) Remove logic for when internal poll should be used from the Makefile.  
   Instead, put it in the configure script.  The logic in the configure 
   script is the same as it was in the Makefile.  Ideally, we would have 
   a functionality test for the problem, but that's not actually possible, 
   since we would have to be able to run an application on the _target_ 
   system to test poll() behavior.
2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT
   is not defined.
3) Change uses of poll() throughout the source tree to ast_poll().  I feel 
   that it is good practice to give the API call a new name when we are 
   changing its behavior and not using the system version directly in all cases.
   So, normally, ast_poll() is just redefined to poll().  On systems where 
   AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll().
4) Change poll() in main/poll.c to be ast_internal_poll().
It's worth noting that any code that still uses poll() directly will work fine 
(if they worked fine before).  So, for example, out of tree modules that are 
using poll() will not stop working or anything.  However, for modules to work 
properly on Mac OSX, ast_poll() needs to be used.
(closes issue #13404)
Reported by: agalbraith
Tested by: russell, vadim
http://reviewboard.digium.com/r/198/
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@182946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
											 
										 
										
											2009-03-18 14:32:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CHECK_HEADER([sys/poll.h],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 [],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     AC_DEFINE([AST_POLL_COMPAT], 1, [Define to 1 if internal poll should be used.]))
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_SYS_LARGEFILE
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# Checks for typedefs, structures, and compiler characteristics.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_HEADER_STDBOOL
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_C_CONST
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_TYPE_UID_T
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_C_INLINE
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_TYPE_MODE_T
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_TYPE_OFF_T
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_TYPE_PID_T
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_TYPE_SIZE_T
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_CHECK_MEMBERS([struct stat.st_blksize])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_HEADER_TIME
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_STRUCT_TM
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_C_VOLATILE
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_CHECK_TYPES([ptrdiff_t])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# Checks for library functions.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_FUNC_CHOWN
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_FUNC_CLOSEDIR_VOID
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_FUNC_ERROR_AT_LINE
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 20:12:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_FUNC_FORK
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_FUNC_FSEEKO
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_PROG_GCC_TRADITIONAL
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# XXX: these are commented out until we determine whether it matters if our malloc()
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# acts exactly like glibc's or not
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# AC_FUNC_MALLOC
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# AC_FUNC_REALLOC
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_FUNC_MEMCMP
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_FUNC_MMAP
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_FUNC_SELECT_ARGTYPES
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_FUNC_SETVBUF_REVERSED
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_TYPE_SIGNAL
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_FUNC_STAT
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_FUNC_STRCOLL
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_FUNC_STRFTIME
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_FUNC_STRNLEN
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_FUNC_STRTOD
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_FUNC_UTIME_NULL
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_FUNC_VPRINTF
							 
						 
					
						
							
								
									
										
										
										
											2009-04-30 17:45:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CHECK_FUNCS([asprintf atexit dup2 eaccess endpwent euidaccess ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday ioperm inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strtoq unsetenv utime vasprintf])
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-11-17 00:31:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CHECK_FUNCS([glob])
							 
						 
					
						
							
								
									
										
										
										
											2007-11-18 16:43:08 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for timersub in time.h)
							 
						 
					
						
							
								
									
										
										
										
											2007-11-17 09:30:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_LANG_PROGRAM([#include <sys/time.h>],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										[struct timeval *a; timersub(a, a, a);]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_DEFINE([HAVE_TIMERSUB], 1, [Define to 1 if your system defines timersub.]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-11-17 06:33:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CHECK_HEADER([sys/poll.h], 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   [HAS_POLL=1]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   AC_DEFINE([HAVE_SYS_POLL_H], 1, [Define to 1 if your system has working sys/poll.h]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   )
							 
						 
					
						
							
								
									
										
										
										
											2008-07-28 19:53:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_ARG_ENABLE(internal-poll,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									[  --enable-internal-poll	Use Asterisk's poll implementation],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									[case "${enableval}" in
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										y|ye|yes) HAS_POLL="";;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										n|no) HAS_POLL="${HAS_POLL}" ;;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										*) AC_MSG_ERROR(bad value ${enableval} for --enable-internal-poll) ;;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									esac])
							 
						 
					
						
							
								
									
										
										
										
											2007-11-17 02:57:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_SUBST(HAS_POLL)
							 
						 
					
						
							
								
									
										
										
										
											2007-11-17 00:31:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-07-28 19:53:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-10-22 19:09:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# https support (in main/http.c) uses funopen on BSD systems,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# fopencookie on linux
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_CHECK_FUNCS([funopen fopencookie])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-11-17 14:11:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CHECK_FUNCS([inet_aton])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-11-06 15:01:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# check if we have IP_PKTINFO constant defined
							 
						 
					
						
							
								
									
										
										
										
											2007-11-18 16:43:08 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for IP_PKTINFO)
							 
						 
					
						
							
								
									
										
										
										
											2007-11-06 15:01:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_LANG_PROGRAM([#include <netinet/in.h>],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														[int pi = IP_PKTINFO;]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_DEFINE([HAVE_PKTINFO], 1, [Define to 1 if your system defines IP_PKTINFO.]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-10-22 19:09:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# some systems already have gethostbyname_r so we don't need to build ours in main/utils.c
							 
						 
					
						
							
								
									
										
										
										
											2007-08-01 17:47:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_SEARCH_LIBS(gethostbyname_r, [socket nsl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-08-01 17:27:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for gethostbyname_r with 6 arguments)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_LINK_IFELSE(
							 
						 
					
						
							
								
									
										
										
										
											2007-08-06 14:20:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        AC_LANG_PROGRAM([#include <stdlib.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                         #include <netdb.h>],
							 
						 
					
						
							
								
									
										
										
										
											2007-08-01 17:27:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        [struct hostent *he = gethostbyname_r((const char *)NULL, (struct hostent *)NULL, (char *)NULL, (int)0, (struct hostent **)NULL, (int *)NULL);]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        AC_DEFINE([HAVE_GETHOSTBYNAME_R_6], 1, [Define to 1 if your system has gethostbyname_r with 6 arguments.]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for gethostbyname_r with 5 arguments)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_LINK_IFELSE(
							 
						 
					
						
							
								
									
										
										
										
											2007-08-06 14:20:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        AC_LANG_PROGRAM([#include <stdlib.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									                 #include <netdb.h>],
							 
						 
					
						
							
								
									
										
										
										
											2007-08-01 17:27:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        [struct hostent *he = gethostbyname_r((const char *)NULL, (struct hostent *)NULL, (char *)NULL, (int)0, (int *)NULL);]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        AC_DEFINE([HAVE_GETHOSTBYNAME_R_5], 1, [Define to 1 if your system has gethostbyname_r with 5 arguments.]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
									
										
										
										
											2006-10-22 19:09:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-07-23 13:46:57 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CHECK_HEADER([byteswap.h], [AC_DEFINE_UNQUOTED([HAVE_BYTESWAP_H], 1, [Define to 1 if byteswap.h macros are available.])])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for __swap16 variant of <sys/endian.h> byteswapping macros)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_LANG_PROGRAM([#include <sys/endian.h>], [int a = 1; int b = __swap16(a);]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_DEFINE([HAVE_SYS_ENDIAN_SWAP16], 1, [Define to 1 if your sys/endian.h header file provides the __swap16 macro.]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for bswap16 variant of <sys/endian.h> byteswapping macros)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_LANG_PROGRAM([#include <sys/endian.h>], [int a = 1; int b = bswap16(a);]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_DEFINE([HAVE_SYS_ENDIAN_BSWAP16], 1, [Define to 1 if your sys/endian.h header file provides the bswap16 macro.]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-08-01 18:56:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "${cross_compiling}" = "no";
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  AC_CHECK_FILE(/dev/urandom, AC_DEFINE([HAVE_DEV_URANDOM], 1, [Define to 1 if your system has /dev/urandom.]))
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
									
										
										
										
											2007-07-21 14:39:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-11-02 16:28:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_C_DEFINE_CHECK([PTHREAD_RWLOCK_INITIALIZER], [PTHREAD_RWLOCK_INITIALIZER], [pthread.h])
							 
						 
					
						
							
								
									
										
										
										
											2008-01-02 22:40:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for PTHREAD_RWLOCK_PREFER_WRITER_NP in pthread.h)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_LANG_PROGRAM([#include <pthread.h>], [int a = PTHREAD_RWLOCK_PREFER_WRITER_NP;]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_DEFINE([HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NP], 1, [Define to 1 if your system defines PTHREAD_RWLOCK_PREFER_WRITER_NP in pthread.h]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE_NP in pthread.h)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_LANG_PROGRAM([#include <pthread.h>], [int a = PTHREAD_MUTEX_RECURSIVE_NP;]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE_NP], 1, [Define to 1 if your system defines PTHREAD_MUTEX_RECURSIVE_NP in pthread.h]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-04-22 21:42:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for pthread_rwlock_timedwrlock() in pthread.h)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  [AC_LANG_PROGRAM(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [#include <pthread.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     #include <time.h>],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [pthread_rwlock_t foo; struct timespec bar; pthread_rwlock_timedwrlock(&foo, &bar)])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  ],[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ac_cv_pthread_rwlock_timedwrlock="yes"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  ],[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ac_cv_pthread_rwlock_timedwrlock="no"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  ]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if test "${ac_cv_pthread_rwlock_timedwrlock}" = "yes"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  AC_DEFINE([HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK], 1, [Define if your system has pthread_rwlock_timedwrlock()])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-11-17 23:03:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_C_DEFINE_CHECK([PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], [PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], [pthread.h])
							 
						 
					
						
							
								
									
										
										
										
											2006-11-02 16:28:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-02-21 16:44:57 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								#if test "${cross_compiling}" = "no";
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#AC_MSG_CHECKING(for working epoll support)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#AC_LANG_PROGRAM([#include <sys/epoll.h>], [int res = epoll_create(10);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#					  if (res < 0)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#					     return 1;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#					  close (res);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#					  return 0;]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#AC_DEFINE([HAVE_EPOLL], 1, [Define to 1 if your system has working epoll support.]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#fi
							 
						 
					
						
							
								
									
										
										
										
											2007-08-08 21:44:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-08-31 01:48:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for compiler atomic operations)
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_LANG_PROGRAM([], [int foo1; int foo2 = __sync_fetch_and_add(&foo1, 1);]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_DEFINE([HAVE_GCC_ATOMICS], 1, [Define to 1 if your GCC C compiler provides atomic operations.]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-08-26 16:45:35 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_GCC_ATTRIBUTE(pure)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_GCC_ATTRIBUTE(malloc)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_GCC_ATTRIBUTE(const)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_GCC_ATTRIBUTE(unused)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_GCC_ATTRIBUTE(always_inline)
							 
						 
					
						
							
								
									
										
										
										
											2007-07-16 18:36:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_GCC_ATTRIBUTE(deprecated)
							 
						 
					
						
							
								
									
										
										
										
											2008-05-02 02:56:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_GCC_ATTRIBUTE(sentinel)
							 
						 
					
						
							
								
									
										
										
										
											2008-06-19 17:55:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_GCC_ATTRIBUTE(warn_unused_result)
							 
						 
					
						
							
								
									
										
										
										
											2009-06-16 19:28:00 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_GCC_ATTRIBUTE(weak)
							 
						 
					
						
							
								
									
										
										
										
											2006-08-26 16:45:35 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-08-31 01:48:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for -ffunction-sections support)
							 
						 
					
						
							
								
									
										
										
										
											2006-08-26 16:45:35 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								saved_CFLAGS="${CFLAGS}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								CFLAGS="${CFLAGS} -ffunction-sections"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_COMPILE_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_LANG_PROGRAM([], [int x = 1;]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									[saved_LDFLAGS="${LDFLAGS}"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									[LDFLAGS="${LDFLAGS} -Wl,--gc-sections"]
							 
						 
					
						
							
								
									
										
										
										
											2006-08-31 01:48:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									AC_MSG_CHECKING(for --gc-sections support)
							 
						 
					
						
							
								
									
										
										
										
											2006-08-26 16:45:35 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_LANG_PROGRAM([], [int x = 1;]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										[GC_CFLAGS="-ffunction-sections"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										[[GC_LDFLAGS="-Wl,--gc-sections"]],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									[LDFLAGS="${saved_LDFLAGS}"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								CFLAGS="${saved_CFLAGS}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(GC_CFLAGS)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(GC_LDFLAGS)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-06-28 21:31:00 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for -Wdeclaration-after-statement support)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if $(${CC} -Wdeclaration-after-statement -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_DECLARATION_AFTER_STATEMENT=-Wdeclaration-after-statement
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								else
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_DECLARATION_AFTER_STATEMENT=
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(AST_DECLARATION_AFTER_STATEMENT)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-11-29 18:16:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for _FORTIFY_SOURCE support)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if $(${CC} -D_FORTIFY_SOURCE=2 -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_FORTIFY_SOURCE=-D_FORTIFY_SOURCE=2
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								else
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_FORTIFY_SOURCE=
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(AST_FORTIFY_SOURCE)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-03-11 14:09:49 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for -fno-strict-overflow)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if $(${CC} -O2 -fno-strict-overflow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
							 
						 
					
						
							
								
									
										
										
										
											2008-08-08 18:19:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_NO_STRICT_OVERFLOW=-fno-strict-overflow
							 
						 
					
						
							
								
									
										
										
										
											2008-03-11 14:09:49 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								else
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_NO_STRICT_OVERFLOW=
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(AST_NO_STRICT_OVERFLOW)
							 
						 
					
						
							
								
									
										
										
										
											2007-06-28 21:31:00 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-08-08 18:19:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for -Wshadow)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if $(${CC} -Wshadow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_SHADOW_WARNINGS=-Wshadow
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								else
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_SHADOW_WARNINGS=
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(AST_SHADOW_WARNINGS)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-04-11 20:21:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for sysinfo)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        AC_LANG_PROGRAM([#include <sys/sysinfo.h>],
							 
						 
					
						
							
								
									
										
										
										
											2007-08-01 19:37:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        [struct sysinfo sys_info; int uptime = sys_info.uptime]),
							 
						 
					
						
							
								
									
										
										
										
											2007-04-11 20:21:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        AC_DEFINE([HAVE_SYSINFO], 1, [Define to 1 if your system has sysinfo support]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-05-09 16:36:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_SEARCH_LIBS(res_9_ninit, resolv)
							 
						 
					
						
							
								
									
										
										
										
											2006-08-31 01:48:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_CHECKING(for res_ninit)
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_LINK_IFELSE(
							 
						 
					
						
							
								
									
										
										
										
											2008-05-09 16:36:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									AC_LANG_PROGRAM([
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											#ifdef HAVE_SYS_SOCKET_H
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											#include <sys/socket.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											#endif
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											#ifdef HAVE_NETINET_IN_H
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											#include <netinet/in.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											#endif
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											#ifdef HAVE_ARPA_NAMESER_H
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											#include <arpa/nameser.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											#endif
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											#include <resolv.h>],
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											[int foo = res_ninit(NULL);]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
									
										
										
										
											2007-07-10 18:41:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.])
							 
						 
					
						
							
								
									
										
										
										
											2008-05-09 16:36:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									AC_SEARCH_LIBS(res_9_ndestroy, resolv)
							 
						 
					
						
							
								
									
										
										
										
											2007-07-10 18:41:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									AC_MSG_CHECKING(for res_ndestroy)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_LINK_IFELSE(
							 
						 
					
						
							
								
									
										
										
										
											2008-05-09 16:36:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										AC_LANG_PROGRAM([
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												#ifdef HAVE_SYS_SOCKET_H
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												#include <sys/socket.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												#endif
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												#ifdef HAVE_NETINET_IN_H
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												#include <netinet/in.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												#endif
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												#ifdef HAVE_ARPA_NAMESER_H
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												#include <arpa/nameser.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												#endif
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												#include <resolv.h>],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												[res_ndestroy(NULL);]),
							 
						 
					
						
							
								
									
										
										
										
											2007-07-10 18:41:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_DEFINE([HAVE_RES_NDESTROY], 1, [Define to 1 if your system has the ndestroy resolver function.]),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									),
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-04-21 15:20:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_C_DEFINE_CHECK([GLOB_NOMAGIC], [GLOB_NOMAGIC], [glob.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_C_DEFINE_CHECK([GLOB_BRACE], [GLOB_BRACE], [glob.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-10-13 15:47:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [IP_MTU_DISCOVER], [netinet/in.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CHECK_HEADER([libkern/OSAtomic.h],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                [AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_CHECK_SIZEOF(int)
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# do the package library checks now
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([ALSA], [asound], [snd_spcm_init], [alsa/asoundlib.h], [-lm -ldl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-09-27 21:48:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "x${host_os}" = "xlinux-gnu" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-06-12 17:27:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_C_DEFINE_CHECK([DAHDI], [DAHDI_CODE], [dahdi/user.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-07-07 16:44:57 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# BSD might not have exp2, and/or log2
							 
						 
					
						
							
								
									
										
										
										
											2007-07-08 21:01:28 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([EXP2L], [m], [exp2l])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([LOG2L], [m], [log2l])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([EXP10L], [m], [exp10l])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([LOG10L], [m], [log10l])
							 
						 
					
						
							
								
									
										
										
										
											2007-09-22 02:07:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([SINL], [m], [sinl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([COSL], [m], [cosl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([TANL], [m], [tanl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([ASINL], [m], [asinl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([ACOSL], [m], [acosl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([ATANL], [m], [atanl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([ATAN2L], [m], [atan2l])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([POWL], [m], [powl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([SQRTL], [m], [sqrtl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([RINTL], [m], [rintl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([EXPL], [m], [expl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([LOGL], [m], [logl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([REMAINDERL], [m], [remainderl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([FMODL], [m], [fmodl])
							 
						 
					
						
							
								
									
										
										
										
											2007-09-21 14:25:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([ROUNDL], [m], [roundl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([TRUNCL], [m], [truncl])
							 
						 
					
						
							
								
									
										
										
										
											2007-09-22 02:07:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([STRTOLD], [c], [strtold], [stdlib.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([FLOORL], [m], [floorl])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([CEILL], [m], [ceill])
							 
						 
					
						
							
								
									
										
										
										
											2007-07-07 16:44:57 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([EXP2], [m], [exp2])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([LOG2], [m], [log2])
							 
						 
					
						
							
								
									
										
										
										
											2007-07-08 21:01:28 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([EXP10], [m], [exp10])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([LOG10], [m], [log10])
							 
						 
					
						
							
								
									
										
										
										
											2007-09-22 02:07:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([SIN], [m], [sin])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([COS], [m], [cos])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([TAN], [m], [tan])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([ASIN], [m], [asin])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([ACOS], [m], [acos])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([ATAN], [m], [atan])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([ATAN2], [m], [atan2])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([POW], [m], [pow])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([SQRT], [m], [sqrt])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([RINT], [m], [rint])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([EXP], [m], [exp])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([LOG], [m], [log])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([REMAINDER], [m], [remainder])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([FMOD], [m], [fmod])
							 
						 
					
						
							
								
									
										
										
										
											2007-09-21 14:25:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([ROUND], [m], [round])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([TRUNC], [m], [trunc])
							 
						 
					
						
							
								
									
										
										
										
											2007-09-22 02:07:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([STRTOD], [c], [strtod], [stdlib.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([FLOOR], [m], [floor])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([CEIL], [m], [ceil])
							 
						 
					
						
							
								
									
										
										
										
											2007-07-07 16:44:57 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-07-22 20:54:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_C_COMPILE_CHECK([GETIFADDRS], [struct ifaddrs *p; getifaddrs(&p)], [ifaddrs.h], , [getifaddrs() support])
							 
						 
					
						
							
								
									
										
										
										
											2008-02-01 16:01:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								GSM_INTERNAL="yes"
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_SUBST(GSM_INTERNAL)
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								GSM_SYSTEM="yes"
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								if test "${USE_GSM}" != "no"; then
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 21:28:30 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   if test "${GSM_DIR}" = "internal"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      GSM_SYSTEM="no"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   elif test "${GSM_DIR}" != ""; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      GSM_INTERNAL="no"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   fi
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								   if test "${GSM_SYSTEM}" = "yes"; then
							 
						 
					
						
							
								
									
										
										
										
											2006-05-19 18:54:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      gsmlibdir=""
							 
						 
					
						
							
								
									
										
										
										
											2006-05-01 10:34:20 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      if test "x${GSM_DIR}" != "x"; then
							 
						 
					
						
							
								
									
										
										
										
											2007-01-30 23:27:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								         if test -d ${GSM_DIR}/lib; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            gsmlibdir="-L${GSM_DIR}/lib"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         else
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            gsmlibdir="-L${GSM_DIR}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         fi
							 
						 
					
						
							
								
									
										
										
										
											2006-05-01 10:34:20 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      fi
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								      AC_CHECK_LIB([gsm], [gsm_create], AC_DEFINE_UNQUOTED([HAVE_GSM], 1,
							 
						 
					
						
							
								
									
										
										
										
											2006-05-19 18:54:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      [Define to indicate the GSM library]), [], ${gsmlibdir})
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								      if test "${ac_cv_lib_gsm_gsm_create}" = "yes"; then
							 
						 
					
						
							
								
									
										
										
										
											2007-01-30 23:27:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								         if test "x${GSM_DIR}" != "x" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            AC_CHECK_HEADER([${GSM_DIR}/include/gsm.h], [GSM_HEADER_FOUND=1], [GSM_HEADER_FOUND=0])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            AC_CHECK_HEADER([${GSM_DIR}/include/gsm/gsm.h], [GSM_GSM_HEADER_FOUND=1], [GSM_GSM_HEADER_FOUND=0])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         else
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            AC_CHECK_HEADER([gsm.h], [GSM_HEADER_FOUND=1], [GSM_HEADER_FOUND=0])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            AC_CHECK_HEADER([gsm/gsm.h], [GSM_GSM_HEADER_FOUND=1], [GSM_GSM_HEADER_FOUND=0])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         if test "${GSM_HEADER_FOUND}" = "0" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if test "{GSM_GSM_HEADER_FOUND}" = "0" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               if test "x${GSM_MANDATORY}" = "xyes" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  AC_MSG_NOTICE([***])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  AC_MSG_NOTICE([*** It appears that you do not have the gsm development package installed.])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  AC_MSG_NOTICE([*** Please install it to include ${GSM_DESCRIP} support, or re-run configure])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  AC_MSG_NOTICE([*** without explicitly specifying --with-${GSM_OPTION}])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  exit 1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         GSM_OK=0
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         if test "${GSM_HEADER_FOUND}" = "1" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            AC_DEFINE_UNQUOTED([HAVE_GSM_HEADER], 1, [Define to indicate that gsm.h has no prefix for its location])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            GSM_OK=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         else
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if test "${GSM_GSM_HEADER_FOUND}" = "1" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               AC_DEFINE_UNQUOTED([HAVE_GSM_GSM_HEADER], 1, [Define to indicate that gsm.h is in gsm/gsm.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               GSM_OK=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         if test "${GSM_OK}" = "1" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            GSM_LIB="-lgsm"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if test "x${GSM_DIR}" != "x"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               GSM_LIB="${gsmlibdir} ${GSM_LIB}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               GSM_INCLUDE="-I${GSM_DIR}/include"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            PBX_GSM=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            GSM_INTERNAL="no"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         fi
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								      fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   if test "${GSM_INTERNAL}" = "yes"; then
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      PBX_GSM=1
							 
						 
					
						
							
								
									
										
										
										
											2007-01-30 23:27:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      AC_DEFINE_UNQUOTED([HAVE_GSM_HEADER], 1, [Define to indicate that gsm.h has no prefix for its location])
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								   fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-01-02 14:20:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "${host_os}" != "linux-gnu" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  AST_EXT_LIB_CHECK([ICONV], [iconv], [iconv_open], [iconv.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								else
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  PBX_ICONV=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
									
										
										
										
											2008-01-01 22:08:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([IKSEMEL], [iksemel], [iks_start_sasl], [iksemel.h])
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "${USE_IMAP_TK}" != "no"; then
							 
						 
					
						
							
								
									
										
										
										
											2008-02-15 15:11:23 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									saved_cppflags="${CPPFLAGS}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									saved_libs="${LIBS}"
							 
						 
					
						
							
								
									
										
										
										
											2008-02-15 00:59:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									switch_to_system_on_failure="no"
							 
						 
					
						
							
								
									
										
										
										
											2008-02-14 23:39:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if test "${IMAP_TK_DIR}" = ""; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										IMAP_TK_DIR=`pwd`"/../imap-2004g"
							 
						 
					
						
							
								
									
										
										
										
											2008-02-15 00:59:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										switch_to_system_on_failure="yes"
							 
						 
					
						
							
								
									
										
										
										
											2008-02-14 23:39:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if test "${IMAP_TK_DIR}" != "system"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_MSG_CHECKING(for UW IMAP Toolkit c-client library)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      		imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS`
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										imap_libs="${IMAP_TK_DIR}/c-client/c-client.a"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									  	imap_include="-I${IMAP_TK_DIR}/c-client"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      	CPPFLAGS="${CPPFLAGS} ${imap_include}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									  	LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									  	AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									    	AC_LANG_PROGRAM(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												[#include "c-client.h"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_searched (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_exists (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_expunged (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_flags (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_notify (MAILSTREAM *stream,char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_log (char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_dlog (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_critical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_nocritical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_fatal (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												MAILSTREAM *foo = mail_open(NULL, "", 0);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											[ac_cv_imap_tk="yes"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											[ac_cv_imap_tk="no"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									   	)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if test "${ac_cv_imap_tk}" = "yes"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												AC_LANG_PROGRAM(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													[#include "c-client.h"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_searched (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_exists (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_expunged (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_flags (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_notify (MAILSTREAM *stream,char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_log (char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_dlog (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_critical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_nocritical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_fatal (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													long check = mail_expunge_full(NULL, "", 0);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												[ac_cv_imap_tk2006="yes"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												[ac_cv_imap_tk2006="no"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										CPPFLAGS="${saved_cppflags}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										LIBS="${saved_libs}"
							 
						 
					
						
							
								
									
										
										
										
											2008-02-15 00:59:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										if test "${ac_cv_imap_tk}" = "no"; then
							 
						 
					
						
							
								
									
										
										
										
											2008-02-14 23:39:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											AC_MSG_RESULT(no)
							 
						 
					
						
							
								
									
										
										
										
											2008-02-15 00:59:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											if test "${switch_to_system_on_failure}" = "yes"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												IMAP_TK_DIR="system"
							 
						 
					
						
							
								
									
										
										
										
											2008-02-15 17:32:43 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											else #This means they specified a directory. Search for a package installation there too
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												AC_MSG_CHECKING([for system c-client library...])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												CPPFLAGS="${saved_cppflags}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												LIBS="${saved_libs}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												imap_include="-I${IMAP_TK_DIR}/include"
							 
						 
					
						
							
								
									
										
										
										
											2008-03-11 13:58:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												imap_ldflags="-L${IMAP_TK_DIR}/lib"
							 
						 
					
						
							
								
									
										
										
										
											2008-02-15 17:32:43 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												imap_libs="-lc-client"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												CPPFLAGS="${CPPFLAGS} ${imap_include}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												LIBS="${LIBS} ${imap_libs} ${imap_ldflags}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									    			AC_LANG_PROGRAM(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														[#include "c-client.h"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_searched (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_exists (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_expunged (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_flags (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_notify (MAILSTREAM *stream,char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_log (char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_dlog (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_critical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_nocritical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_fatal (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														MAILSTREAM *foo = mail_open(NULL, "", 0);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													[ac_cv_imap_tk="yes"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													[ac_cv_imap_tk="no"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									   			)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if test "${ac_cv_imap_tk}" = "yes"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														AC_LANG_PROGRAM(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															[#include "c-client.h"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															void mm_searched (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															void mm_exists (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															void mm_expunged (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															void mm_flags (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															void mm_notify (MAILSTREAM *stream,char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															void mm_log (char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															void mm_dlog (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															void mm_critical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															void mm_nocritical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															void mm_fatal (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															}],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															long check = mail_expunge_full(NULL, "", 0);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														[ac_cv_imap_tk2006="yes"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														[ac_cv_imap_tk2006="no"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												fi
							 
						 
					
						
							
								
									
										
										
										
											2008-02-15 00:59:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											fi
							 
						 
					
						
							
								
									
										
										
										
											2008-02-14 23:39:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									fi 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if test "${IMAP_TK_DIR}" = "system"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										#We will enter here if user specified "system" or if any of above checks failed
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_MSG_CHECKING([for system c-client library...])
							 
						 
					
						
							
								
									
										
										
										
											2008-02-15 17:32:43 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										CPPFLAGS="${saved_cppflags}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										LIBS="${saved_libs}"
							 
						 
					
						
							
								
									
										
										
										
											2008-02-14 23:39:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										imap_ldflags=""
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										imap_libs="-lc-client"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										imap_include="-DUSE_SYSTEM_IMAP" #Try the imap directory first
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										CPPFLAGS="${CPPFLAGS} ${imap_include}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									    	AC_LANG_PROGRAM(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												[#include <stdio.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												#include <imap/c-client.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_searched (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_exists (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_expunged (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_flags (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_notify (MAILSTREAM *stream,char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_log (char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_dlog (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_critical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_nocritical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												void mm_fatal (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												MAILSTREAM *foo = mail_open(NULL, "", 0);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											[ac_cv_imap_tk="yes"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											[ac_cv_imap_tk="no"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									   	)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if test "${ac_cv_imap_tk}" = "yes"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												AC_LANG_PROGRAM(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													[#include <stdio.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													#include <imap/c-client.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_searched (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_exists (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_expunged (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_flags (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_notify (MAILSTREAM *stream,char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_log (char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_dlog (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_critical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_nocritical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_fatal (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													long check = mail_expunge_full(NULL, "", 0);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												[ac_cv_imap_tk2006="yes"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												[ac_cv_imap_tk2006="no"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										else #looking in imap directory didn't work, try c-client
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											imap_ldflags=""
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											imap_libs="-lc-client"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											imap_include="-DUSE_SYSTEM_CCLIENT"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											CPPFLAGS="${saved_cppflags}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											LIBS="${saved_libs}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											CPPFLAGS="${CPPFLAGS} ${imap_include}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									    		AC_LANG_PROGRAM(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													[#include <stdio.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													#include <c-client/c-client.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_searched (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_exists (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_expunged (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_flags (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_notify (MAILSTREAM *stream,char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_log (char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_dlog (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_critical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_nocritical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													void mm_fatal (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													MAILSTREAM *foo = mail_open(NULL, "", 0);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												[ac_cv_imap_tk="yes"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												[ac_cv_imap_tk="no"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									   		)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if test "${ac_cv_imap_tk}" = "yes"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													AC_LANG_PROGRAM(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														[#include <stdio.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														#include <c-client/c-client.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_searched (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_exists (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_expunged (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_flags (MAILSTREAM *stream,unsigned long number)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_notify (MAILSTREAM *stream,char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_log (char *string,long errflg)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_dlog (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_critical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_nocritical (MAILSTREAM *stream)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														void mm_fatal (char *string)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														long check = mail_expunge_full(NULL, "", 0);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													[ac_cv_imap_tk2006="yes"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													[ac_cv_imap_tk2006="no"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										fi
							 
						 
					
						
							
								
									
										
										
										
											2008-02-15 00:59:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if test "${ac_cv_imap_tk}" = "yes"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										IMAP_TK_LIB="${imap_libs} "`echo ${imap_ldflags}`
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										IMAP_TK_INCLUDE="${imap_include}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										PBX_IMAP_TK=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_DEFINE([HAVE_IMAP_TK], 1, [Define if your system has the UW IMAP Toolkit c-client library.])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if test "${ac_cv_imap_tk2006}" = "yes"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											AC_DEFINE([HAVE_IMAP_TK2006], 1, [Define if your system has the UW IMAP Toolkit c-client library version 2006 or greater.])
							 
						 
					
						
							
								
									
										
										
										
											2008-02-14 23:39:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										fi
							 
						 
					
						
							
								
									
										
										
										
											2008-02-15 00:59:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									else
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AC_MSG_RESULT(no) 
							 
						 
					
						
							
								
									
										
										
										
											2008-02-14 23:39:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									fi
							 
						 
					
						
							
								
									
										
										
										
											2008-02-15 15:11:23 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									CPPFLAGS="${saved_cppflags}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									LIBS="${saved_libs}"
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-01-13 18:08:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([JACK], [jack], [jack_activate], [jack/jack.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-06-18 16:35:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# Needed by unixodbc
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([LTDL], [ltdl], [lt_dlinit], [ltdl.h], [])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-02-14 21:21:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([LDAP], [ldap], [ldap_initialize], [ldap.h])
							 
						 
					
						
							
								
									
										
										
										
											2008-01-22 22:33:20 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([MISDN], [mISDN], [mISDN_open], [mISDNuser/mISDNlib.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if test "${PBX_MISDN}" = 1; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   AST_EXT_LIB_CHECK([ISDNNET], [isdnnet], [init_manager], [mISDNuser/isdn_net.h], [-lmISDN -lpthread])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   AST_EXT_LIB_CHECK([SUPPSERV], [suppserv], [encodeFac], [mISDNuser/suppserv.h])
							 
						 
					
						
							
								
									
										
										
										
											2007-10-29 16:34:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   AST_C_DEFINE_CHECK([MISDN_FAC_RESULT], [Fac_RESULT], [mISDNuser/suppserv.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   AST_C_DEFINE_CHECK([MISDN_FAC_ERROR], [Fac_ERROR], [mISDNuser/suppserv.h])
							 
						 
					
						
							
								
									
										
										
										
											2007-03-26 15:59:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   AC_CHECK_HEADER([linux/mISDNdsp.h], [AC_DEFINE_UNQUOTED([MISDN_1_2], 1, [Build chan_misdn for mISDN 1.2 or later.])])
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([NBS], [nbs], [nbs_connect], [nbs.h])
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-01-16 23:08:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_TOOL_CHECK([NETSNMP], [net-snmp], , [--agent-libs],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[#include <net-snmp/net-snmp-config.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#include <net-snmp/net-snmp-includes.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#include <net-snmp/agent/net-snmp-agent-includes.h>],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[int callback = snmp_register_callback(0, 0, NULL, NULL)])
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-06-18 16:35:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], [])
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([OGG], [ogg], [ogg_sync_init], [])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-01-28 18:27:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# Non-glibc platforms require libexecinfo for backtrace support
							 
						 
					
						
							
								
									
										
										
										
											2007-11-21 21:30:24 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([BKTR], [execinfo], [backtrace], [execinfo.h])
							 
						 
					
						
							
								
									
										
										
										
											2008-01-28 18:27:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# Linux, however, has backtrace directly in glibc
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([BKTR], [c], [backtrace], [execinfo.h])
							 
						 
					
						
							
								
									
										
										
										
											2007-01-19 09:39:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-10-04 23:52:23 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# possible places for oss definitions
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([OSS], [ossaudio], [], [linux/soundcard.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([OSS], [ossaudio], [], [sys/soundcard.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([OSS], [ossaudio], [oss_ioctl_mixer], [soundcard.h])
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								PG_CONFIG=No
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "${USE_PGSQL}" != "no"; then	
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   if test "x${PGSQL_DIR}" != "x"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      AC_PATH_TOOL([PG_CONFIG], [pg_config], No, [${PGSQL_DIR}/bin])
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								      if test x"${PG_CONFIG}" = xNo; then
							 
						 
					
						
							
								
									
										
										
										
											2006-12-16 21:38:10 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								         AC_MSG_NOTICE([***])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         AC_MSG_NOTICE([*** pg_config was not found in the path you specified:])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         AC_MSG_NOTICE([*** ${PGSQL_DIR}/bin])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         AC_MSG_NOTICE([*** Either correct the installation, or run configure])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         AC_MSG_NOTICE([*** including --without-postgres])
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								         exit 1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   else
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      AC_PATH_TOOL([PG_CONFIG], [pg_config], No)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "${PG_CONFIG}" != No; then
							 
						 
					
						
							
								
									
										
										
										
											2007-01-08 03:56:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   PGSQL_libdir=`${PG_CONFIG} --libdir`
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   PGSQL_includedir=`${PG_CONFIG} --includedir`
							 
						 
					
						
							
								
									
										
										
										
											2007-02-17 01:11:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   if test "x$?" != "x0" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if test -n "${PGSQL_MANDATORY}" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         AC_MSG_NOTICE([***])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         AC_MSG_NOTICE([*** The PostgreSQL installation on this system appears to be broken.])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         AC_MSG_NOTICE([*** Either correct the installation, or run configure])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         AC_MSG_NOTICE([*** including --without-postgres])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         exit 1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									  fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   else 
							 
						 
					
						
							
								
									
										
										
										
											2007-12-12 16:56:12 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      AC_CHECK_LIB([pq], [PQescapeStringConn], AC_DEFINE_UNQUOTED([HAVE_PGSQL], 1,
							 
						 
					
						
							
								
									
										
										
										
											2007-02-17 01:11:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      [Define to indicate the PostgreSQL library]), [], -L${PGSQL_libdir} -lz)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-12-12 16:56:12 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      if test "${ac_cv_lib_pq_PQescapeStringConn}" = "yes"; then
							 
						 
					
						
							
								
									
										
										
										
											2007-02-17 01:11:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								         PGSQL_LIB="-L${PGSQL_libdir} -lpq -lz"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         PGSQL_INCLUDE="-I${PGSQL_includedir}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         PBX_PGSQL=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      elif test -n "${PGSQL_MANDATORY}";
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         AC_MSG_NOTICE([***])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         AC_MSG_NOTICE([*** The PostgreSQL installation on this system appears to be broken.])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         AC_MSG_NOTICE([*** Either correct the installation, or run configure])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         AC_MSG_NOTICE([*** including --without-postgres])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         exit 1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      fi
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								   fi
							 
						 
					
						
							
								
									
										
										
										
											2006-10-04 23:52:23 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([POPT], [popt], [poptStrerror], [popt.h])
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-12-31 15:20:30 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([PORTAUDIO], [portaudio], [Pa_GetDeviceCount], [portaudio.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-11-06 22:19:28 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([PRI], [pri], [pri_new_bri], [libpri.h])
							 
						 
					
						
							
								
									
										
										
										
											2006-05-01 10:03:44 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-07-22 19:59:10 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([PRI_INBANDDISCONNECT], [pri], [pri_set_inbanddisconnect], [libpri.h])
							 
						 
					
						
							
								
									
										
										
										
											2008-07-11 15:57:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-07-21 14:47:41 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([RESAMPLE], [resample], [resample_open], [libresample.h], [-lm])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-06-02 15:43:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_C_COMPILE_CHECK([SPANDSP], [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										#if SPANDSP_RELEASE_DATE < 20080516
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										#error "spandsp 0.0.5 or greater is required"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										#endif
							 
						 
					
						
							
								
									
										
										
										
											2008-07-22 20:54:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									], [spandsp/version.h], , [minimum version of SpanDSP])
							 
						 
					
						
							
								
									
										
										
										
											2008-06-02 15:43:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-06-02 15:57:43 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "x${PBX_SPANDSP}" = "x1" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									# We found the correct version in the header, now let's make sure it links
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									# properly, and that libtiff is available
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PBX_SPANDSP=0
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_EXT_LIB_CHECK([SPANDSP], [spandsp], [span_set_message_handler], [spandsp.h], [-ltiff])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-11-19 18:29:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "x${PBX_SPANDSP}" = "x1" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									# We also need t38_terminal_init()
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PBX_SPANDSP=0
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_EXT_LIB_CHECK([SPANDSP], [spandsp], [t38_terminal_init], [spandsp.h], [-ltiff])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-15 15:50:12 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "x${PBX_SPANDSP}" = "x1" ; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_CHECK_HEADER([spandsp/expose.h], [AC_DEFINE_UNQUOTED([HAVE_SPANDSP_EXPOSE_H], 1, [Define to 1 if spandsp/expose.h is available.])], [], [#include <spandsp.h>])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-05-11 03:23:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([SS7], [ss7], [ss7_pollflags], [libss7.h])
							 
						 
					
						
							
								
									
										
										
										
											2006-09-21 18:41:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "${USE_PWLIB}" != "no"; then
							 
						 
					
						
							
								
									
										
										
										
											2007-02-10 06:14:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if test -n "${PWLIB_DIR}"; then
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 17:07:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										PWLIBDIR="${PWLIB_DIR}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_CHECK_PWLIB()
							 
						 
					
						
							
								
									
										
										
										
											2009-02-18 20:16:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									AST_CHECK_PWLIB_VERSION([PWLib], [PWLIB], [ptbuildopts.h], [1], [9], [2], [P[[WT]]LIB_VERSION])
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 17:07:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if test "${HAS_PWLIB:-unset}" != "unset"; then
							 
						 
					
						
							
								
									
										
										
										
											2008-10-20 05:06:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										AST_CHECK_PWLIB_PLATFORM()
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 17:07:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										PLATFORM_PWLIB="pt_${PWLIB_PLATFORM}_r"
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 17:07:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										AST_CHECK_PWLIB_BUILD([PWLib], [PWLIB],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											[Define if your system has the PWLib libraries.],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											[#include "ptlib.h"],
							 
						 
					
						
							
								
									
										
										
										
											2009-02-18 20:16:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											[int q = (int) PTime::IsDaylightSavings();])
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 17:07:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then
							 
						 
					
						
							
								
									
										
										
										
											2007-02-10 06:14:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if test -n "${OPENH323_DIR}"; then
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 17:07:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										OPENH323DIR="${OPENH323_DIR}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_CHECK_OPENH323()
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_CHECK_PWLIB_VERSION([OpenH323], [OPENH323], [openh323buildopts.h], [1], [17], [3])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_CHECK_OPENH323_BUILD()
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AST_CHECK_PWLIB_BUILD([OpenH323], [OPENH323],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										[Define if your system has the OpenH323 libraries.],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										[#include "ptlib.h"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										#include "h323.h"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										#include "h323ep.h"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										[H323EndPoint ep = H323EndPoint();],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										[${PWLIB_INCLUDE}], [${PWLIB_LIB}])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-04-22 06:36:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([LUA], [lua5.1], [luaL_newstate], [lua5.1/lua.h], [-lm]) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# Some distributions (like SuSE) remove the 5.1 suffix.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([LUA], [lua], [luaL_register], [lua.h], [-lm]) 
							 
						 
					
						
							
								
									
										
										
										
											2007-11-02 15:36:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-07-01 17:22:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# This is a bit complex... in reality, Asterisk's AIS support is dependent on finding
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# *any* implementation of AIS, not just OpenAIS. However, the configure script needs
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# to know the specifics of each possible implementation, and then represent the one
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# that was found as 'AIS'.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								PBX_AIS=0
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# OpenAIS installs its libraries into /usr/lib/openais by default, so check there
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-10-16 21:24:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([OPENAIS], [SaClm], [saClmInitialize], [openais/saClm.h], [-L/usr/lib/openais -L/usr/lib64/openais])
							 
						 
					
						
							
								
									
										
										
										
											2008-07-01 17:22:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if test "${PBX_OPENAIS}" = 1; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   PBX_AIS=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   if test -n "${OPENAIS_DIR}"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      AIS_INCLUDE="${OPENAIS_INCLUDE}/openais"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      AIS_LIB="-lSaEvt ${OPENAIS_LIB}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   else
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      AIS_INCLUDE="-I/usr/include/openais"
							 
						 
					
						
							
								
									
										
										
										
											2008-10-16 21:24:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      AIS_LIB="-lSaClm -lSaEvt -L/usr/lib/openais -L/usr/lib64/openais"
							 
						 
					
						
							
								
									
										
										
										
											2008-07-01 17:22:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(PBX_AIS)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(AIS_INCLUDE)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(AIS_LIB)
							 
						 
					
						
							
								
									
										
										
										
											2008-06-10 00:43:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([SPEEX], [speex], [speex_encode], [speex/speex.h], [-lm])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-05-05 22:13:57 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# See if the main speex library contains the preprocess functions
							 
						 
					
						
							
								
									
										
										
										
											2008-05-06 13:55:44 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([SPEEX_PREPROCESS], [speex], [speex_preprocess_ctl], [speex/speex.h], [-lm])
							 
						 
					
						
							
								
									
										
										
										
											2008-05-05 22:13:57 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "${PBX_SPEEX_PREPROCESS}" = 1; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   PBX_SPEEX_PREPROCESS=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-01-16 01:17:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([SPEEXDSP], [speexdsp], [speex_preprocess_ctl], [speex/speex.h], [-lm])
							 
						 
					
						
							
								
									
										
										
										
											2008-05-05 22:13:57 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "${PBX_SPEEXDSP}" = 1; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   PBX_SPEEX_PREPROCESS=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(PBX_SPEEX_PREPROCESS)
							 
						 
					
						
							
								
									
										
										
										
											2008-01-16 01:17:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([SQLITE], [sqlite], [sqlite_exec], [sqlite.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-03-13 21:22:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([SQLITE3], [sqlite3], [sqlite3_open], [sqlite3.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-05-24 22:07:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([CRYPTO], [crypto], [AES_encrypt], [openssl/aes.h])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-05-25 15:07:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "$PBX_CRYPTO" = "1";
							 
						 
					
						
							
								
									
										
										
										
											2007-05-24 22:07:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    AST_EXT_LIB_CHECK([OPENSSL], [ssl], [ssl2_connect], [openssl/ssl.h], [-lcrypto])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
									
										
										
										
											2006-06-29 07:50:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-05-25 15:07:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "$PBX_OPENSSL" = "1";
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								then
							 
						 
					
						
							
								
									
										
										
										
											2009-05-26 22:42:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    AST_CHECK_OSPTK([3], [5], [0])
							 
						 
					
						
							
								
									
										
										
										
											2007-05-25 15:07:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-10-02 15:30:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_TOOL_CHECK([GMIME], [gmime], [], [], [#include <gmime/gmime.h>], [gboolean q = g_mime_check_version(0,0,0);])
							 
						 
					
						
							
								
									
										
										
										
											2008-10-01 23:54:44 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-08-03 16:14:14 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], [])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-06-28 21:28:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([FREETDS], [sybdb], [dbinit], [sybdb.h])
							 
						 
					
						
							
								
									
										
										
										
											2006-06-29 07:50:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([TERMCAP], [termcap], [tgetent], [])
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([TINFO], [tinfo], [tgetent], [])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-11 20:05:43 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CHECK_LIB([tonezone], [tone_zone_find_by_num], tonezone_does_not_need_lm=yes, tonezone_does_not_need_lm=no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if test "${tonezone_does_not_need_lm}" = "no" ; then
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  tonezone_extra="-lm"
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-07-03 16:22:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([TONEZONE], [tonezone], [tone_zone_find], [dahdi/tonezone.h], [${tonezone_extra} ${DAHDI_INCLUDE}])
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-09-14 15:52:28 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([USB], [usb], [usb_init], [usb.h], [])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc])
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-01-28 21:07:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_LANG_PUSH(C++)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if test "${USE_VPB}" != "no"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   AC_MSG_CHECKING(for vpb_open in -lvpb)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   saved_libs="${LIBS}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   saved_cppflags="${CPPFLAGS}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   if test "x${VPB_DIR}" != "x"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if test -d ${VPB_DIR}/lib; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         vpblibdir=${VPB_DIR}/lib
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      else
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         vpblibdir=${VPB_DIR}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      LIBS="${LIBS} -L${vpblibdir}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   LIBS="${LIBS} -lvpb -lpthread"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   AC_LINK_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_LANG_PROGRAM(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									[#include <vpbapi.h>],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									[int q = vpb_open(0,0);])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									[	AC_MSG_RESULT(yes) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										ac_cv_lib_vpb_vpb_open="yes" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									[	AC_MSG_RESULT(no) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										ac_cv_lib_vpb_vpb_open="no" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   LIBS="${saved_libs}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   CPPFLAGS="${saved_cppflags}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									VPB_LIB="-lvpb"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if test "${VPB_DIR}" != ""; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									   VPB_LIB="-L${vpblibdir}  ${VPB_LIB}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									   VPB_INCLUDE="-I${VPB_DIR}/include"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PBX_VPB=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									AC_DEFINE([HAVE_VPB], 1, [Define if your system has the VoiceTronix API libraries.])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_LANG_POP
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-07-05 19:59:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([ZLIB], [z], [compress], [zlib.h])
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 23:12:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								EDITLINE_LIB=""
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "x$TERMCAP_LIB" != "x" ; then
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 23:12:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  EDITLINE_LIB="$TERMCAP_LIB"
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								elif test "x$TINFO_LIB" != "x" ; then
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 23:12:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  EDITLINE_LIB="$TINFO_LIB"
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								elif test "x$CURSES_LIB" != "x" ; then
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 23:12:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  EDITLINE_LIB="$CURSES_LIB"
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								elif test "x$NCURSES_LIB" != "x" ; then
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 23:12:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  EDITLINE_LIB="$NCURSES_LIB"
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								else
							 
						 
					
						
							
								
									
										
										
										
											2006-08-14 00:08:35 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  AC_MSG_ERROR(*** termcap support not found)
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 23:12:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_SUBST(EDITLINE_LIB)
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_CHECK_HEADER([h323.h], [PBX_H323=1], [PBX_H323=0])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(PBX_H323)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-07-11 17:06:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CHECK_HEADER([linux/compiler.h],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                [AC_DEFINE_UNQUOTED([HAVE_LINUX_COMPILER_H], 1, [Define to 1 if your system has linux/compiler.h.])])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CHECK_HEADER([linux/ixjuser.h], [PBX_IXJUSER=1], [PBX_IXJUSER=0], [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												   #include <linux/version.h>
							 
						 
					
						
							
								
									
										
										
										
											2007-07-11 17:06:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												   #ifdef HAVE_LINUX_COMPILER_H
							 
						 
					
						
							
								
									
										
										
										
											2006-06-24 19:43:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												   #include <linux/compiler.h>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												   #endif
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												   ])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(PBX_IXJUSER)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-11-17 01:49:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_TOOL_CHECK([SDL], [sdl])
							 
						 
					
						
							
								
									
										
										
										
											2007-11-20 15:39:00 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([SDL_IMAGE], [SDL_image], [IMG_Load], [SDL_image.h], [${SDL_LIB}], [${SDL_INCLUDE}])
							 
						 
					
						
							
								
									
										
										
										
											2007-11-17 01:49:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([FFMPEG], [avcodec], [sws_getContext], [ffmpeg/avcodec.h], [-lpthread -lz -lm])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-11-21 01:29:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# possible places for video4linux version 1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_CHECK_HEADER([linux/videodev.h],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									[AC_DEFINE_UNQUOTED([HAVE_VIDEODEV_H], 1, [Define to 1 if your system has linux/videodev.h.])])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-11-21 00:22:41 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# possible places for X11
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([X11], [X11], [XOpenDisplay], [X11/Xlib.h],,, [standard_path])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AST_EXT_LIB_CHECK([X11], [X11], [XOpenDisplay], [X11/Xlib.h],, [-I/usr/X11R6/include], [X11R6])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-02-19 17:33:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "${cross_compiling}" = "no";
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  AC_CHECK_FILE(/sbin/launchd, AC_DEFINE([HAVE_SBIN_LAUNCHD], 1, [Define to 1 if your system has /sbin/launchd.]))
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
									
										
										
										
											2008-02-04 21:15:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-01-09 22:51:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								PBX_GTK=0
							 
						 
					
						
							
								
									
										
										
										
											2008-01-10 16:27:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_EXT_TOOL_CHECK([GTK], [gtk], [--cflags gthread], [--libs gthread])
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-03-15 23:56:10 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								PBX_GTK2=0
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_CHECK_TOOL(PKGCONFIG, pkg-config, No)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if test ! "x${PKGCONFIG}" = xNo; then
							 
						 
					
						
							
								
									
										
										
										
											2007-06-30 16:53:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   GTK2_INCLUDE=$(${PKGCONFIG} gtk+-2.0 --cflags 2>/dev/null)
							 
						 
					
						
							
								
									
										
										
										
											2007-03-15 23:56:10 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   GTK2_LIB=$(${PKGCONFIG} gtk+-2.0 --libs)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   PBX_GTK2=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   AC_DEFINE([HAVE_GTK2], 1, [Define if your system has the GTK2 libraries.])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(PBX_GTK2)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(GTK2_INCLUDE)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_SUBST(GTK2_LIB)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-09-29 18:54:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "${USE_CURL}" != "no"; then
							 
						 
					
						
							
								
									
										
										
										
											2007-01-08 03:56:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   AC_PATH_TOOL([CURL_CONFIG], [curl-config], No)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   if test ! x"${CURL_CONFIG}" = xNo; then
							 
						 
					
						
							
								
									
										
										
										
											2006-09-29 18:54:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   # check for version
							 
						 
					
						
							
								
									
										
										
										
											2007-01-08 03:56:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      if test $(printf "%d" 0x$(${CURL_CONFIG} --vernum)) -ge $(printf "%d" 0x070907); then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         CURL_INCLUDE=$(${CURL_CONFIG} --cflags)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         CURL_LIB=$(${CURL_CONFIG} --libs)
							 
						 
					
						
							
								
									
										
										
										
											2007-06-04 16:03:19 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         AC_MSG_CHECKING(for curl_version() in curl/curl.h)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         saved_cppflags="${CPPFLAGS}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         CPPFLAGS="${CPPFLAGS} ${CURL_INCLUDE}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         AC_COMPILE_IFELSE(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            [AC_LANG_PROGRAM(
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                [#include <curl/curl.h>],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    [curl_version();])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ],[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                AC_MSG_RESULT(yes)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                ac_cv_curl_h="yes"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ],[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                AC_MSG_RESULT(no)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                ac_cv_curl_h="no"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 CPPFLAGS="${saved_cppflags}"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         if test "${ac_cv_curl_h}" = "yes"; then
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								             PBX_CURL=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								             AC_DEFINE([HAVE_CURL], 1, [Define if your system has the curl libraries.])
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         fi
							 
						 
					
						
							
								
									
										
										
										
											2006-12-05 20:44:12 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   fi
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-09-19 17:07:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_CONFIG_FILES([build_tools/menuselect-deps makeopts channels/h323/Makefile])
							 
						 
					
						
							
								
									
										
										
										
											2006-10-05 15:42:14 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AST_CHECK_MANDATORY
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								AC_OUTPUT
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-08-14 00:08:35 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "x${silent}" != "xyes" ; then
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								echo
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "               .\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$=..      "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "            .\$7\$7..          .7\$\$7:.    "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "          .\$\$:.                 ,\$7.7   "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "        .\$7.     7\$\$\$\$           .\$\$77  "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "     ..\$\$.       \$\$\$\$\$            .\$\$\$7 "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "    ..7\$   .?.   \$\$\$\$\$   .?.       7\$\$\$."
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "   \$.\$.   .\$\$\$7. \$\$\$\$7 .7\$\$\$.      .\$\$\$."
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo " .777.   .\$\$\$\$\$\$77\$\$\$77\$\$\$\$\$7.      \$\$\$,"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo " \$\$\$~      .7\$\$\$\$\$\$\$\$\$\$\$\$\$7.       .\$\$\$."
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo ".\$\$7          .7\$\$\$\$\$\$\$7:          ?\$\$\$."
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "\$\$\$          ?7\$\$\$\$\$\$\$\$\$\$I        .\$\$\$7 "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "\$\$\$       .7\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$      :\$\$\$. "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "\$\$\$       \$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$\$\$\$    .\$\$\$.  "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "\$\$\$        \$\$\$   7\$\$\$7  .\$\$\$    .\$\$\$.   "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "\$\$\$\$             \$\$\$\$7         .\$\$\$.    "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "7\$\$\$7            7\$\$\$\$        7\$\$\$      "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo " \$\$\$\$\$                        \$\$\$       "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "  \$\$\$\$7.                       \$\$  (TM)     "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "   \$\$\$\$\$\$\$.           .7\$\$\$\$\$\$  \$\$      "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "     \$\$\$\$\$\$\$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$.\$\$\$\$\$\$      "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo "       \$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$.                "
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo
							 
						 
					
						
							
								
									
										
										
										
											2006-08-14 00:08:35 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								fi
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-08-14 00:08:35 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_NOTICE(Package configured for: )
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_NOTICE( OS type  : $host_os)
							 
						 
					
						
							
								
									
										
										
										
											2006-08-14 00:08:35 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_NOTICE( Host CPU : $host_cpu)
							 
						 
					
						
							
								
									
										
										
										
											2007-11-17 00:31:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								AC_MSG_NOTICE( build-cpu:vendor:os: $build_cpu : $build_vendor : $build_os :) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								AC_MSG_NOTICE( host-cpu:vendor:os: $host_cpu : $host_vendor : $host_os :) 
							 
						 
					
						
							
								
									
										
										
										
											2006-08-21 02:11:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if test "${cross_compiling}" = "yes"; then
							 
						 
					
						
							
								
									
										
										
										
											2006-08-14 00:08:35 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   AC_MSG_NOTICE( Cross Compilation = YES)
							 
						 
					
						
							
								
									
										
										
										
											2006-04-24 17:11:45 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								fi