Commit Graph

170 Commits

Author SHA1 Message Date
Kevin P. Fleming
7c82c2b240 Fix 'inconsistent line endings' when autoconf 2.63 is used
Attempt to make configure script regeneration 'safe' using autoconf 2.63, which embeds a bare CR into the script, thus making Subversion complain about inconsistent line endings

This commit changes the MIME type of the configure script to be 'binary' thus making Subversion no longer inspect line endings, and as a bonus 'svn diff' will no longer try to generate diff output for it, which is not generally useful anyway.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@190721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-27 19:29:46 +00:00
Tilghman Lesher
c922eca9a8 Detect availability of pthread_rwlock_timedwrlock() before using it.
(closes issue #14930)
 Reported by: tilghman
 Patches: 
       20090420__bug14930.diff.txt uploaded by tilghman (license 14)
 Tested by: mvanbaak, tilghman


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@190092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-22 21:35:03 +00:00
Doug Bailey
9d266db16a Add check in configure script to check for GLOB_NOMAGIC and GLOB_BRACE in glob.h
This allows config.c to compile when linked against uclibc that does not support these parameters


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@189601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-21 14:00:55 +00:00
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
Jeff Peeler
3849208a99 fix typo which broke configure
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 20:02:40 +00:00
Jeff Peeler
c59e2a92d0 Allow H.323 Plus library to be used in addition to the OpenH323 library
Chan_h323 can now be compiled against both the previously supported versions of
OpenH323 as well as the current H.323 Plus (version 1.20.2). The configure
script has been modified to look in the default install location of h323 to
hopefully help avoid using the environment variables OPENH323DIR and PWLIBDIR.
Also, the CLI command "h323 show version" has been added which indicates which
version of h323 is in use.

(closes issue 0011261)
Reported by: vhatz
Patches:
      asterisk-1.6.0.6-h323plus.patch uploaded by jthurman (license 614)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 19:57:05 +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
Tilghman Lesher
c257ffeed0 Lose the CAP_NET_ADMIN at every fork, instead of at startup. Otherwise, if
Asterisk runs as a non-root user and the administrator does a 'restart now',
Asterisk loses the ability to set QOS on packets.
(closes issue #14004)
 Reported by: nemo
 Patches: 
       20090105__bug14004.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@172438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-29 22:54:29 +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
53c3cdab37 revert this change... non-functional changes don't belong here
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 11:58:41 +00:00
Kevin P. Fleming
350cec723a correct minor syntax error... no functional change
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 11:51:27 +00:00
Kevin P. Fleming
fe3cd94ec6 break up acinclude.m4 into individual files, which will make it easier to maintain, easier to add new macros (less patching) and will ease maintenance of these macros across Asterisk branches
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@151240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-20 04:45:56 +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
Sean Bright
42e0a95c2f Fix detection of PWLIB and OpenH323 version when spacing in the headers
isn't consistent.

(closes issue #13426)
Reported by: bamby
Patches:
      detect_openh323.diff uploaded by bamby (license 430)
      (Modified by me to use sed instead of tr)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-10 19:05:46 +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
Joshua Colp
9ecb9277ad Expand the test function for GCC attributes so that more complex attributes are properly recognized.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-04 02:09:44 +00:00
Joshua Colp
65e2b0a8fb Treat warnings as errors when checking if a GCC attribute exists. We have to do this as GCC will just ignore the attribute and pop up a warning, it won't actually fail to compile.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-04 01:43:26 +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