Commit Graph

163 Commits

Author SHA1 Message Date
Russell Bryant
47af9f8fd5 Remove the use of RTLD_NOLOAD, as it is not behaving like expected.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@183241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 17:52:52 +00:00
Russell Bryant
6efa254bea 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.4@182810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 02:09:13 +00:00
Jason Parker
e809699406 Allow prefix to set localstatedir (when used and different from the default).
This is similar to the /etc change that was made for the non-FreeBSD case.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 22:18:42 +00:00
Jason Parker
df31bb22c0 Make things happier when using autoconf 2.62+
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-10 22:02:18 +00:00
Jeff Peeler
1183bf1ad0 Modify h323 to build against PTLib as well as the older PWLib
Several changes in PTLib have occurred requiring build time detection. Changes
accounted for include the library name change, config option change, install
location change, and a boolean type change which is handled by ast_ptlib.h.
Also, the sed check has been modified to properly work with autoconf >= 2.62.

(closes issue #14224)
Reported by: bergolth
Patches:
      asterisk-autoconf-sed.patch uploaded by bergolth (license 661)
      asterisk-pwlib-v3.patch uploaded by bergolth (license 661)
Tested by: jpeeler



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-18 20:06:45 +00:00
Joshua Colp
b80ffd6d26 Use autoconf logic to determine whether the system has timersub or not. Do not blindly assume Solaris does not.
(closes issue #13838)
Reported by: ano


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@164343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 17:43:59 +00:00
Kevin P. Fleming
50515ed372 update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors
since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them

format attributes in a consistent way



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-29 16:58:29 +00:00
Tilghman Lesher
929c14e432 System call ioperm is non-portable, so check for its existence in autoconf.
(Closes issue #13863)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 04:50:00 +00:00
Kevin P. Fleming
bc51c18f3d rename this macro to properly reflect what it does
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@151241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-20 04:57:33 +00:00
Jason Parker
979e2cd58d Correctly allow chan_dahdi to compile against older versions of Zaptel.
Don't always define HAVE_ZAPTEL_CHANALARMS (since we check if it's defined..)
Minor cleanup to make things clear.

(closes issue #13726)
Reported by: tzafrir
Patches:
      dahdi_def.diff uploaded by tzafrir (license 46)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-17 15:31:35 +00:00
Russell Bryant
00605e78a4 Actually use Zaptel CFLAGS if using Zaptel instead of DAHDI
This fixes building against Zaptel when using a custom path


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-08 16:26:00 +00:00
Kevin P. Fleming
e2fc623d88 Backport support for Zaptel/DAHDI channel-level alarms from trunk/1.6, because not doing so just makes it difficult for people with channels that are in alarm when Asterisk starts up to get them going once the alarm is cleared
(closes issue #12160)
Reported by: tzafrir
Patches:
      asterisk-chanalarms_14.patch uploaded by tzafrir (license 46)
Tested by: tzafrir


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-20 19:35:59 +00:00
Kevin P. Fleming
e797e4ed72 add support for Zaptel versions that contain the new transcoder interface
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-14 02:02:15 +00:00
Russell Bryant
2f11017cc1 Ensure PBX_DAHDI_TRANSCODE will evaluate to 0 if not found instead of empty.
pointed out by tzafrir on #asterisk-dev


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-09 17:11:27 +00:00
Kevin P. Fleming
31446d74a7 change the required dependency for codec_dahdi to only be satisfied by DAHDI and not Zaptel, as the new transcoder interface is only in DAHDI
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07 18:25:31 +00:00
Tilghman Lesher
ef03217c4b Qwell pointed out, via IRC, that the previous fix only worked when explicitly
set.  When nothing is set, and the option is implied, it breaks, because
configure sets the prefix to 'NONE'.  Fixing.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@134649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-30 21:38:50 +00:00
Tilghman Lesher
932ad2c19c Only override sysconfdir and mandir when prefix=/usr
(closes issue #13093)
 Reported by: pabelanger


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@134536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-30 19:47:16 +00:00
Kevin P. Fleming
5ef465d386 make AST_C_COMPILE_CHECK able to print a 'pretty' description of what it is doing
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 20:49:41 +00:00
Kevin P. Fleming
0faccba9cb use renamed libpri API call for controlling this feature (was improperly named before)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 19:49:11 +00:00
Kevin P. Fleming
2ea77b3508 add support for a configuration parameter for 'inband audio during RELEASE', which is currently mandatory in libpri-1.4.4 but will become configurable in libpri-1.4.5 later today
(related to issue #13042)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 15:41:56 +00:00
Kevin P. Fleming
d227632177 use tzafrir's patch to fix this problem properly... i made the previous set of changes without thoroughly testing them, doh!
(closes issue #12911)
Reported by: tzafrir
Patches:
      custum_dahdi_configure_2.diff uploaded by tzafrir (license 46)
Tested by: tzafrir



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@128637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-07 16:51:50 +00:00
Kevin P. Fleming
3b34ed635e ensure that DAHDI_INCLUDE and ZAPTEL_INCLUDE are added in all the places needed
improve AST_EXT_LIB_CHECK to accept (and remember) additional CFLAGS data like it does in trunk already

(closes issue #12911)
Reported by: tzafrir



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@127754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-03 16:12:58 +00:00
Kevin P. Fleming
994998a9da allow tonezone to live in a different place than DAHDI/Zaptel, since dahdi-tools and dahdi-linux are now separate packages and can be installed in different places
don't include tonezone.h in dahdi_compat.h, because only a couple of modules need it

get app_rpt building again after the DAHDI changes

(closes issue #12911)
Reported by: tzafrir



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@125132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-25 22:21:30 +00:00
Jeff Peeler
20229139b5 (closes issue #12846)
Reported by: Netview
Tested by: jpeeler

Use correct location to search for tonezone.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@122613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-13 17:36:56 +00:00
Jeff Peeler
f9818af8dd Adds DAHDI support alongside Zaptel. DAHDI usage favored, but all Zap stuff should continue working. Release announcement to follow.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@122314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 19:08:20 +00:00
Joshua Colp
f0efe0d2b5 Improve res_ninit and res_ndestroy autoconf logic on the Darwin platform.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-09 16:34:08 +00:00
Joshua Colp
9c2bac0487 Add in missing argument.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-06 13:54:15 +00:00
Joshua Colp
6e6849f1a0 Make sure that either the main speex library contains preprocess functions or that speexdsp does. If both fail then speex stuff can not be built.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 22:10:05 +00:00
Brett Bryant
61bee5aa54 Add new "pri show version" command to show the libpri version for support reasons.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-02 20:25:42 +00:00
Sean Bright
eb8e9d5dc5 When we don't explicitly pass a path to the --with-tds configure option, we
may end up finding tds.h in /usr/local/include instead of /usr/include.  If
this happens, the grep that looks for the version (from tdsver.h) will fail
and we'll have some problems during the build.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-27 01:26:15 +00:00
Kevin P. Fleming
9569d74df5 stop checking for mktime() in the configure script... we don't use it, and the test is buggy under gcc 4.3
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 14:33:45 +00:00
Kevin P. Fleming
9f2d2cea4b check for compiler support for -fno-strict-overflow before using it (tested with Debian's gcc 4.3, 4.1 and 3.4)
(closes issue #12179)
Reported by: Netview


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 14:07:59 +00:00
Kevin P. Fleming
2bfb158faf fix small bug in IMAP toolkit testing
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 13:57:08 +00:00
Joshua Colp
4671e11a5c Don't look for launchd when cross compiling.
(closes issue #12029)
Reported by: ovi


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 17:31:32 +00:00
Mark Michelson
5de5636aa9 Final round of changes for configure script logic for IMAP
Now if a directory is specified, then we will search that directory for
a source installation of the IMAP toolkit. If none is found, then we will
use that directory as the basis for detecting a package installation of
the IMAP c-client. If that check fails, then configure will fail.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 17:26:37 +00:00
Mark Michelson
dbc1aa9de2 Fix a bit of wrong logic in the configure script that caused problems when trying to configure
without IMAP. Patch suggestion from phsultan, but I modified it slightly.

(closes issue #12003)
Reported by: pj
Tested by: putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 15:05:49 +00:00
Mark Michelson
2ee7626928 I apparently misunderstood one of the requirements of this configure change.
Now, if a source directory is specified with the --with-imap option, and a valid
source installation is not detected there, then configure will fail and will not
check for a package installation.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 00:50:49 +00:00
Mark Michelson
638ef8c5d2 Change to the configure logic regarding IMAP. Prior to this commit, if you wished to configure
Asterisk with IMAP support, you would use the --with-imap configure switch in one of the following
two ways:
--with-imap=/some/directory would look in the directory specified for a UW IMAP source installation
--with-imap would assume that you had imap-2004g installed in .. relative to the Asterisk source

With this set of changes the two above options still work the same, but there are two new behaviors, too.
--with-imap=system will assume that you have -libc-client.so where you store your shared objects and will
            attempt to find c-client headers in your include path either in the imap or c-client directory.
If either of the two original methods of specifying the imap option should fail, then the check for --with-imap
=system will be performed in addition. It is only after this "system" check that failure can happen.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 23:30:17 +00:00
Tilghman Lesher
0dafcac660 Cross-platform fix: OS X now deprecates the use of the daemon(3) API.
(closes issue #11908)
 Reported by: oej
 Patches: 
       20080204__bug11908.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@102323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-04 21:06:09 +00:00
Tilghman Lesher
1191559147 Change detection of getifaddrs to use AST_C_COMPILE_CHECK, backported from trunk (as suggested by kpfleming)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 19:36:12 +00:00
Tilghman Lesher
df1dc7741d Compatibility fix for OpenWRT (reported by Brian Capouch via the mailing list)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 15:55:58 +00:00
Joshua Colp
a0c14dbda3 Add autoconf logic for speexdsp. Later versions use a separate library for some things so we need to use it if present in codec_speex.
(closes issue #11693)
Reported by: yzg


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 01:13:27 +00:00
Russell Bryant
45f3890926 Backport the ability to set the ToS bits on Linux when not running as root.
Normally, we would not backport features into 1.4, but, I was convinced by the
justification supplied by the supplier of this patch.  He pointed out that this
patch removes a requirement for running as root, thus reducing the potential
impacts of security issues.

(closes issue #11742)
Reported by: paravoid
Patches:
      libcap.diff uploaded by paravoid (license 200)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 18:25:30 +00:00
Russell Bryant
742fd8127c Remove pbx_kdeconsole from the tree. It hasn't worked in ages, and nobody has
complained.
(closes issue #11706, reported by caio1982)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 16:10:09 +00:00
Russell Bryant
612d0b8f45 Check for the existence of the soxmix application on the target platform and have
the result available in autoconfig.h.
(part of issue #11589)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 22:48:48 +00:00
Kevin P. Fleming
627f595c58 In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html,
rizzo brought up some issues related to the way that the metadata required
for menuselect and the rest of the build system is extracted from the source
files. Since I had a few hours to kill on an airplane today, I decided to
improve this situation... so now the system caches the extracted metadata
and uses it to build the menuselect 'tree' as much as it can. The result
of this is that when a single source file is changed, only the metadata for
that file needs to be extracted again, and the rest is used from the cache
files. I also reduced the number of forked processes required to do the
metadata extraction; it was actually possible to do most of what we needed
in the Makefiles themselves without using any shell scripts at all! On my
laptop, these changes resulted in an 80% decrease in the time required
for the 'menuselect.makeopts' automatic check to occur after editing a single
source file.

While doing this work I also cleaned up a few minor things in the Makefiles,
adding a check for 'awk' to the configure script and changed all remaining
places we use 'grep' or 'awk' to use the ones found by the configure script,
and changed the 'prep_tarball' script to build the menuselect metadata so
that tarballs of Asterisk will include it and won't require the user to
wait while it is extracted after unpacking.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 06:44:51 +00:00
Tilghman Lesher
b4b34f080d Test directly for the API that fixed AST-2007-026, to ensure that older
versions of PostgreSQL are no longer acceptable.
(Closes issue #11526)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12 16:52:56 +00:00
Russell Bryant
fc232a9a27 Modify file.h to maintain API compatibility with earlier versions. If a recent
compiler is being used, then a warning will show up for any modules still using
the old name "private" instead of "_private".
(patch suggested by paravoid)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04 23:46:40 +00:00
Russell Bryant
5213f548f5 Add checking for libusb here, so nobody has to deal with conflicts in the
chan_usbradio-1.4 branch every time the configure script gets changed


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-14 15:50:49 +00:00
Joshua Colp
3e3aedb3c9 (closes issue #10383)
Reported by: rizzo
Include stdlib.h so NULL gets defined for gethostbyname_r checks.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 14:18:20 +00:00