diff options
author | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-09 18:51:52 +0000 |
---|---|---|
committer | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-09 18:51:52 +0000 |
commit | 722eb3c4c3cfa1c0cee915c949c5f95199ee24dd (patch) | |
tree | 25683963c5e51bdedd6211cd0ea92a85639505c3 /configure.ac | |
parent | 815b5b09da5e555add7bba3d8fca588e7611248a (diff) |
Merged revisions 285710 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
........
r285710 | bbryant | 2010-09-09 14:50:13 -0400 (Thu, 09 Sep 2010) | 8 lines
Fixes an issue with dialplan pattern matching where the specificity for pattern ranges and pattern special characters was inconsistent.
(closes issue #16903)
Reported by: Nick_Lewis
Patches:
pbx.c-specificity.patch uploaded by Nick Lewis (license 657)
Tested by: Nick_Lewis
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@285711 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 80 |
1 files changed, 79 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index dfc45a5e8..afd997092 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,7 @@ case "${host_os}" in ;; darwin*) AC_DEFINE([AST_POLL_COMPAT], 1, [Define to 1 if internal poll should be used.]) + AC_DEFINE([_DARWIN_UNLIMITED_SELECT], 1, [Define to 1 if running on Darwin.]) ;; *) AC_PREFIX_DEFAULT([/usr]) @@ -463,7 +464,7 @@ AC_FUNC_STRNLEN AC_FUNC_STRTOD AC_FUNC_UTIME_NULL AC_FUNC_VPRINTF -AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap ntohll newlocale putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl]) +AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii memchr memmove memset mkdir munmap ntohll newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl]) # NOTE: we use AC_CHECK_LIB to get -lm into the arguments for later checks, # so that AC_CHECK_FUNCS can detect functions in that library. @@ -738,6 +739,48 @@ AC_RUN_IFELSE( AC_MSG_RESULT(unknown) ) +AC_MSG_CHECKING(if we can increase the maximum select-able file descriptor) +AC_RUN_IFELSE( +AC_LANG_PROGRAM([ +#include <stdio.h> +#include <sys/select.h> +#include <sys/time.h> +#include <sys/resource.h> +#include <string.h> +#include <errno.h> +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> +], [[ + struct rlimit rlim = { FD_SETSIZE * 2, FD_SETSIZE * 2 }; + int fd0, fd1; + struct timeval tv = { 0, }; + struct ast_fdset { long fds_bits[[1024]]; } fds = { { 0, } }; + if (setrlimit(RLIMIT_NOFILE, &rlim)) { exit(1); } + if ((fd0 = open("/dev/null", O_RDONLY)) < 0) { exit(1); } + if (dup2(fd0, (fd1 = FD_SETSIZE + 1)) < 0) { exit(1); } + FD_SET(fd0, (fd_set *) &fds); + FD_SET(fd1, (fd_set *) &fds); + if (select(FD_SETSIZE + 2, (fd_set *) &fds, NULL, NULL, &tv) < 0) { exit(1); } + exit(0)]]), + AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_VARIABLE_FDSET], 1, [Define to 1 if your system can support larger than default select bitmasks.]), + AC_MSG_RESULT(no), + AC_MSG_RESULT(cross-compile) +) + +if test "${ac_cv_have_variable_fdset}x" = "0x"; then + AC_RUN_IFELSE( + AC_LANG_PROGRAM([ +#include <unistd.h> +#include <sys/types.h> +#include <stdlib.h> +], [if (getuid() != 0) { exit(1); }]), + AC_DEFINE([CONFIGURE_RAN_AS_ROOT], 1, [Some configure tests will unexpectedly fail if configure is run by a non-root user. These may be able to be tested at runtime.])) +fi + AST_GCC_ATTRIBUTE(pure) AST_GCC_ATTRIBUTE(malloc) AST_GCC_ATTRIBUTE(const) @@ -1807,6 +1850,41 @@ fi AST_EXT_LIB_CHECK([SRTP], [srtp], [srtp_init], [srtp/srtp.h]) +if test "$PBX_SRTP" = "1"; +then + saved_libs="${LIBS}" + saved_ldflags="${LDFLAGS}" + saved_cflags="${CFLAGS}" + LIBS="${LIBS} ${SRTP_LIB}" + LDFLAGS="${LDFLAGS} -shared -fPIC" + CFLAGS="${CFLAGS} ${SRTP_INCLUDE}" + AC_MSG_CHECKING(for the ability of -lsrtp to be linked in a shared object) + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM( + [#include <srtp/srtp.h>], + [srtp_init();] + ) + ], + [ AC_MSG_RESULT(yes) ], + [ + AC_MSG_RESULT(no) + AC_MSG_NOTICE(***) + AC_MSG_NOTICE(*** libsrtp could not be linked as a shared object) + AC_MSG_NOTICE(*** try compiling libsrtp manually and configuring with) + AC_MSG_NOTICE(*** ./configure CFLAGS=-fPIC --prefix=/usr) + AC_MSG_NOTICE(*** replacing /usr with the prefix of your choice) + AC_MSG_NOTICE(***) + AC_MSG_NOTICE(*** If you do not need SRTP support re-run configure) + AC_MSG_NOTICE(*** with the --without-srtp option.) + exit 1 + ] + ) + LIBS="${saved_libs}" + LDFLAGS="${saved_ldflags}" + CFLAGS="${saved_cflags}" +fi + AST_EXT_TOOL_CHECK([GMIME], [gmime-config], [], [], [#include <gmime/gmime.h>], [gboolean q = g_mime_check_version(0,0,0);]) AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], []) |