Skip to content
Browse files

Import pjproject-2.0.1

  • Loading branch information...
0 parents commit f3ab456a17af1c89a6e3be4d20c5944853df1cb0 @leedm777 leedm777 committed Jan 7, 2013
Showing with 56,818 additions and 0 deletions.
  1. +352 −0 COPYING
  2. +48 −0 INSTALL.txt
  3. +121 −0 Makefile
  4. +87 −0 README-RTEMS
  5. +964 −0 README.txt
  6. +8,596 −0 aconfigure
  7. +1,465 −0 aconfigure.ac
  8. +169 −0 build.mak.in
  9. +7 −0 build.symbian/00.bat
  10. +7 −0 build.symbian/01.bat
  11. +37 −0 build.symbian/bld.inf
  12. +56 −0 build.symbian/libg7221codec.mmp
  13. +72 −0 build.symbian/libgsmcodec.mmp
  14. +27 −0 build.symbian/libpassthroughcodec.mmp
  15. +26 −0 build.symbian/libresample.mmp
  16. +74 −0 build.symbian/libspeexcodec.mmp
  17. +60 −0 build.symbian/libsrtp.mmp
  18. +80 −0 build.symbian/makedef.sh
  19. +40 −0 build.symbian/null_audio.mmp
  20. +12 −0 build.symbian/null_audioU.def
  21. +122 −0 build.symbian/pjlib.mmp
  22. +323 −0 build.symbian/pjlibU.def
  23. +83 −0 build.symbian/pjlib_test.mmp
  24. +19 −0 build.symbian/pjlib_test.pkg
  25. +83 −0 build.symbian/pjlib_util.mmp
  26. +92 −0 build.symbian/pjlib_utilU.def
  27. +136 −0 build.symbian/pjmedia.mmp
  28. +193 −0 build.symbian/pjmediaU.def
  29. +33 −0 build.symbian/pjmedia_audiodev.mmp
  30. +65 −0 build.symbian/pjnath.mmp
  31. +88 −0 build.symbian/pjnathU.def
  32. +386 −0 build.symbian/pjproject.cww
  33. +46 −0 build.symbian/pjsdp.mmp
  34. +45 −0 build.symbian/pjsdpU.def
  35. +69 −0 build.symbian/pjsip.mmp
  36. +280 −0 build.symbian/pjsipU.def
  37. +54 −0 build.symbian/pjsip_simple.mmp
  38. +96 −0 build.symbian/pjsip_simpleU.def
  39. +52 −0 build.symbian/pjsip_ua.mmp
  40. +58 −0 build.symbian/pjsip_uaU.def
  41. +41 −0 build.symbian/pjstun_client.mmp
  42. +55 −0 build.symbian/pjsua_lib.mmp
  43. +122 −0 build.symbian/pjsua_libU.def
  44. +47 −0 build.symbian/symbian_audio.mmp
  45. +12 −0 build.symbian/symbian_audioU.def
  46. +84 −0 build.symbian/symbian_ua.mmp
  47. +19 −0 build.symbian/symbian_ua.pkg
  48. +21 −0 build.symbian/symbian_ua_udeb.pkg
  49. +21 −0 build.symbian/symbian_ua_urel.pkg
  50. +51 −0 build.symbian/symsndtest.mmp
  51. +19 −0 build.symbian/symsndtest.pkg
  52. +21 −0 build/cc-auto.mak.in
  53. +22 −0 build/cc-gcc.mak
  54. +20 −0 build/cc-vc.mak
  55. +63 −0 build/common.mak
  56. +13 −0 build/host-mingw.mak
  57. +13 −0 build/host-unix.mak
  58. +12 −0 build/host-win32.mak
  59. +4 −0 build/m-alpha.mak
  60. +4 −0 build/m-arm.mak
  61. +1 −0 build/m-auto.mak
  62. +4 −0 build/m-i386.mak
  63. +4 −0 build/m-m68k.mak
  64. +9 −0 build/m-mpc860.mak
  65. +4 −0 build/m-powerpc.mak
  66. +4 −0 build/m-sparc.mak
  67. +4 −0 build/m-x86_64.mak
  68. +11 −0 build/os-auto.mak.in
  69. +9 −0 build/os-darwinos.mak
  70. +43 −0 build/os-linux-kernel.mak
  71. +9 −0 build/os-linux.mak
  72. +32 −0 build/os-palmos.mak
  73. +17 −0 build/os-rtems.mak
  74. +13 −0 build/os-sunos.mak
  75. +12 −0 build/os-win32.mak
  76. +194 −0 build/rules.mak
  77. +27 −0 build/vs/pjproject-vs8-common-defaults.vsprops
  78. +19 −0 build/vs/pjproject-vs8-debug-defaults.vsprops
  79. +12 −0 build/vs/pjproject-vs8-debug-dynamic-defaults.vsprops
  80. +12 −0 build/vs/pjproject-vs8-debug-static-defaults.vsprops
  81. +17 −0 build/vs/pjproject-vs8-release-defaults.vsprops
  82. +12 −0 build/vs/pjproject-vs8-release-dynamic-defaults.vsprops
  83. +12 −0 build/vs/pjproject-vs8-release-static-defaults.vsprops
  84. +20 −0 build/vs/pjproject-vs8-win32-common-defaults.vsprops
  85. +8 −0 build/vs/pjproject-vs8-win32-release-defaults.vsprops
  86. +30 −0 build/vs/pjproject-vs8-wm2003-common-defaults.vsprops
  87. +8 −0 build/vs/pjproject-vs8-wm2003-release-defaults.vsprops
  88. +28 −0 build/vs/pjproject-vs8-wm5-common-defaults.vsprops
  89. +8 −0 build/vs/pjproject-vs8-wm5-release-defaults.vsprops
  90. +28 −0 build/vs/pjproject-vs8-wm6-common-defaults.vsprops
  91. +8 −0 build/vs/pjproject-vs8-wm6-release-defaults.vsprops
  92. +20 −0 c++-build.mak
  93. +1,317 −0 config.guess
  94. +1,572 −0 config.sub
  95. +7 −0 configure
  96. +38 −0 configure-bb10
  97. +142 −0 configure-iphone
  98. +148 −0 configure-legacy
  99. +251 −0 install-sh
  100. 0 lib/.keep
  101. +13 −0 libpjproject.pc.in
  102. 0 pjlib-util/bin/.keep
  103. +104 −0 pjlib-util/build/Makefile
  104. +3 −0 pjlib-util/build/os-auto.mak.in
  105. +2 −0 pjlib-util/build/os-rtems.mak
  106. 0 pjlib-util/build/output/.keep
  107. +71 −0 pjlib-util/build/pjlib_util.dsw
  108. +4,808 −0 pjlib-util/build/pjlib_util.vcproj
  109. +3,375 −0 pjlib-util/build/pjlib_util_test.vcproj
  110. 0 pjlib-util/build/wince-evc4/output/.keep
  111. +10,346 −0 pjlib-util/build/wince-evc4/pjlib_util_test_wince.vcp
  112. +10,710 −0 pjlib-util/build/wince-evc4/pjlib_util_wince.vcp
  113. +59 −0 pjlib-util/build/wince-evc4/pjlib_util_wince.vcw
  114. +1,053 −0 pjlib-util/docs/doxygen.cfg
  115. +305 −0 pjlib-util/docs/doxygen.css
  116. +11 −0 pjlib-util/docs/footer.html
  117. +9 −0 pjlib-util/docs/header.html
  118. +66 −0 pjlib-util/include/pjlib-util.h
  119. +92 −0 pjlib-util/include/pjlib-util/base64.h
  120. +274 −0 pjlib-util/include/pjlib-util/config.h
  121. +96 −0 pjlib-util/include/pjlib-util/crc32.h
  122. +445 −0 pjlib-util/include/pjlib-util/dns.h
  123. +117 −0 pjlib-util/include/pjlib-util/dns_server.h
  124. +393 −0 pjlib-util/include/pjlib-util/errno.h
  125. +146 −0 pjlib-util/include/pjlib-util/getopt.h
  126. +109 −0 pjlib-util/include/pjlib-util/hmac_md5.h
  127. +107 −0 pjlib-util/include/pjlib-util/hmac_sha1.h
  128. +494 −0 pjlib-util/include/pjlib-util/http_client.h
  129. +74 −0 pjlib-util/include/pjlib-util/md5.h
  130. +196 −0 pjlib-util/include/pjlib-util/pcap.h
  131. +460 −0 pjlib-util/include/pjlib-util/resolver.h
  132. +555 −0 pjlib-util/include/pjlib-util/scanner.h
  133. +97 −0 pjlib-util/include/pjlib-util/scanner_cis_bitwise.h
  134. +84 −0 pjlib-util/include/pjlib-util/scanner_cis_uint.h
  135. +80 −0 pjlib-util/include/pjlib-util/sha1.h
  136. +215 −0 pjlib-util/include/pjlib-util/srv_resolver.h
  137. +102 −0 pjlib-util/include/pjlib-util/string.h
  138. +209 −0 pjlib-util/include/pjlib-util/stun_simple.h
  139. +95 −0 pjlib-util/include/pjlib-util/types.h
  140. +246 −0 pjlib-util/include/pjlib-util/xml.h
  141. 0 pjlib-util/lib/.keep
  142. +766 −0 pjlib-util/src/pjlib-util-test/encryption.c
  143. +955 −0 pjlib-util/src/pjlib-util-test/http_client.c
  144. +63 −0 pjlib-util/src/pjlib-util-test/main.c
  145. +11 −0 pjlib-util/src/pjlib-util-test/main_rtems.c
  146. +1 −0 pjlib-util/src/pjlib-util-test/main_win32.c
Sorry, we could not display the entire diff because too many files (2,051) changed.
352 COPYING
@@ -0,0 +1,352 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+========
+
+The licenses for most software are designed to take away your freedom
+to share and change it. By contrast, the GNU General Public License is
+intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not price.
+Our General Public Licenses are designed to make sure that you have
+the freedom to distribute copies of free software (and charge for this
+service if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone
+to deny you these rights or to ask you to surrender the rights. These
+restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis
+or for a fee, you must give the recipients all the rights that you
+have. You must make sure that they, too, receive or can get the source
+code. And you must show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+Finally, any free program is threatened constantly by software patents.
+We wish to avoid the danger that redistributors of a free program will
+individually obtain patent licenses, in effect making the program
+proprietary. To prevent this, we have made it clear that any patent
+must be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+ 0. This License applies to any program or other work which contains a
+ notice placed by the copyright holder saying it may be distributed
+ under the terms of this General Public License. The "Program",
+ below, refers to any such program or work, and a "work based on
+ the Program" means either the Program or any derivative work under
+ copyright law: that is to say, a work containing the Program or a
+ portion of it, either verbatim or with modifications and/or
+ translated into another language. (Hereinafter, translation is
+ included without limitation in the term "modification".) Each
+ licensee is addressed as "you".
+
+ Activities other than copying, distribution and modification are
+ not covered by this License; they are outside its scope. The act
+ of running the Program is not restricted, and the output from the
+ Program is covered only if its contents constitute a work based on
+ the Program (independent of having been made by running the
+ Program). Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+ source code as you receive it, in any medium, provided that you
+ conspicuously and appropriately publish on each copy an appropriate
+ copyright notice and disclaimer of warranty; keep intact all the
+ notices that refer to this License and to the absence of any
+ warranty; and give any other recipients of the Program a copy of
+ this License along with the Program.
+
+ You may charge a fee for the physical act of transferring a copy,
+ and you may at your option offer warranty protection in exchange
+ for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+ of it, thus forming a work based on the Program, and copy and
+ distribute such modifications or work under the terms of Section 1
+ above, provided that you also meet all of these conditions:
+
+ a. You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b. You must cause any work that you distribute or publish, that
+ in whole or in part contains or is derived from the Program
+ or any part thereof, to be licensed as a whole at no charge
+ to all third parties under the terms of this License.
+
+ c. If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display
+ an announcement including an appropriate copyright notice and
+ a notice that there is no warranty (or else, saying that you
+ provide a warranty) and that users may redistribute the
+ program under these conditions, and telling the user how to
+ view a copy of this License. (Exception: if the Program
+ itself is interactive but does not normally print such an
+ announcement, your work based on the Program is not required
+ to print an announcement.)
+
+ These requirements apply to the modified work as a whole. If
+ identifiable sections of that work are not derived from the
+ Program, and can be reasonably considered independent and separate
+ works in themselves, then this License, and its terms, do not
+ apply to those sections when you distribute them as separate
+ works. But when you distribute the same sections as part of a
+ whole which is a work based on the Program, the distribution of
+ the whole must be on the terms of this License, whose permissions
+ for other licensees extend to the entire whole, and thus to each
+ and every part regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or
+ contest your rights to work written entirely by you; rather, the
+ intent is to exercise the right to control the distribution of
+ derivative or collective works based on the Program.
+
+ In addition, mere aggregation of another work not based on the
+ Program with the Program (or with a work based on the Program) on
+ a volume of a storage or distribution medium does not bring the
+ other work under the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+ under Section 2) in object code or executable form under the terms
+ of Sections 1 and 2 above provided that you also do one of the
+ following:
+
+ a. Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of
+ Sections 1 and 2 above on a medium customarily used for
+ software interchange; or,
+
+ b. Accompany it with a written offer, valid for at least three
+ years, to give any third-party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a
+ medium customarily used for software interchange; or,
+
+ c. Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with
+ such an offer, in accord with Subsection b above.)
+
+ The source code for a work means the preferred form of the work for
+ making modifications to it. For an executable work, complete
+ source code means all the source code for all modules it contains,
+ plus any associated interface definition files, plus the scripts
+ used to control compilation and installation of the executable.
+ However, as a special exception, the source code distributed need
+ not include anything that is normally distributed (in either
+ source or binary form) with the major components (compiler,
+ kernel, and so on) of the operating system on which the executable
+ runs, unless that component itself accompanies the executable.
+
+ If distribution of executable or object code is made by offering
+ access to copy from a designated place, then offering equivalent
+ access to copy the source code from the same place counts as
+ distribution of the source code, even though third parties are not
+ compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+ except as expressly provided under this License. Any attempt
+ otherwise to copy, modify, sublicense or distribute the Program is
+ void, and will automatically terminate your rights under this
+ License. However, parties who have received copies, or rights,
+ from you under this License will not have their licenses
+ terminated so long as such parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+ signed it. However, nothing else grants you permission to modify
+ or distribute the Program or its derivative works. These actions
+ are prohibited by law if you do not accept this License.
+ Therefore, by modifying or distributing the Program (or any work
+ based on the Program), you indicate your acceptance of this
+ License to do so, and all its terms and conditions for copying,
+ distributing or modifying the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+ Program), the recipient automatically receives a license from the
+ original licensor to copy, distribute or modify the Program
+ subject to these terms and conditions. You may not impose any
+ further restrictions on the recipients' exercise of the rights
+ granted herein. You are not responsible for enforcing compliance
+ by third parties to this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+ infringement or for any other reason (not limited to patent
+ issues), conditions are imposed on you (whether by court order,
+ agreement or otherwise) that contradict the conditions of this
+ License, they do not excuse you from the conditions of this
+ License. If you cannot distribute so as to satisfy simultaneously
+ your obligations under this License and any other pertinent
+ obligations, then as a consequence you may not distribute the
+ Program at all. For example, if a patent license would not permit
+ royalty-free redistribution of the Program by all those who
+ receive copies directly or indirectly through you, then the only
+ way you could satisfy both it and this License would be to refrain
+ entirely from distribution of the Program.
+
+ If any portion of this section is held invalid or unenforceable
+ under any particular circumstance, the balance of the section is
+ intended to apply and the section as a whole is intended to apply
+ in other circumstances.
+
+ It is not the purpose of this section to induce you to infringe any
+ patents or other property right claims or to contest validity of
+ any such claims; this section has the sole purpose of protecting
+ the integrity of the free software distribution system, which is
+ implemented by public license practices. Many people have made
+ generous contributions to the wide range of software distributed
+ through that system in reliance on consistent application of that
+ system; it is up to the author/donor to decide if he or she is
+ willing to distribute software through any other system and a
+ licensee cannot impose that choice.
+
+ This section is intended to make thoroughly clear what is believed
+ to be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+ certain countries either by patents or by copyrighted interfaces,
+ the original copyright holder who places the Program under this
+ License may add an explicit geographical distribution limitation
+ excluding those countries, so that distribution is permitted only
+ in or among countries not thus excluded. In such case, this
+ License incorporates the limitation as if written in the body of
+ this License.
+
+ 9. The Free Software Foundation may publish revised and/or new
+ versions of the General Public License from time to time. Such
+ new versions will be similar in spirit to the present version, but
+ may differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+ Program specifies a version number of this License which applies
+ to it and "any later version", you have the option of following
+ the terms and conditions either of that version or of any later
+ version published by the Free Software Foundation. If the Program
+ does not specify a version number of this License, you may choose
+ any version ever published by the Free Software Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+ programs whose distribution conditions are different, write to the
+ author to ask for permission. For software which is copyrighted
+ by the Free Software Foundation, write to the Free Software
+ Foundation; we sometimes make exceptions for this. Our decision
+ will be guided by the two goals of preserving the free status of
+ all derivatives of our free software and of promoting the sharing
+ and reuse of software generally.
+
+ NO WARRANTY
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
+ WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
+ LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
+ WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
+ NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
+ QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
+ SERVICING, REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
+ MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
+ LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
+ INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
+ INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
+ OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
+ OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+How to Apply These Terms to Your New Programs
+=============================================
+
+If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these
+terms.
+
+To do so, attach the following notices to the program. It is safest to
+attach them to the start of each source file to most effectively convey
+the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
+ Copyright (C) YYYY NAME OF AUTHOR
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the
+appropriate parts of the General Public License. Of course, the
+commands you use may be called something other than `show w' and `show
+c'; they could even be mouse-clicks or menu items--whatever suits your
+program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ SIGNATURE OF TY COON, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library,
+you may consider it more useful to permit linking proprietary
+applications with the library. If this is what you want to do, use the
+GNU Library General Public License instead of this License.
+
48 INSTALL.txt
@@ -0,0 +1,48 @@
+[Last update: 2007/02/18]
+
+-= INTRO=-
+
+This top level projects:
+
+ - pjlib: portability and basic framework library
+ - pjlib-util: lexical scanner, XML, STUN, MD5, DNS, etc.
+ - pjmedia: media framework and codecs
+ - pjsip: SIP stacks (core, UA layer, SIMPLE, etc.)
+ - pjsip-apps: SIP apps (pjsua, pjsip-perf)
+
+
+-= COMPILING =-
+
+On Windows:
+ - Visual Studio 6: open pjproject.dsw
+ - Visual Studio 8/2005: open pjproject-vs8.sln
+ - Embedded VisualC 4: open open pjsip-apps\build\wince-evc4\wince_demos.vcw
+ - Build pjsua
+
+With Makefile:
+ - on top level dir (e.g. ~/pjproject)
+ - ./configure && make dep && make clean && make
+
+Binaries will be in pjsip-apps/bin.
+
+
+-= PYTHON MODULE =-
+
+On Windows:
+ - Visual Studio 6: open pjsip-apps\build\pjsip_apps.dsw
+ - Build py_pjsua module
+
+With GNU and Python:
+ - cd pjsip-apps/src/py_pjsua
+ - python setup.py install
+
+One Python sample application is provided:
+ pjsip-apps/src/py_pjsua/pjsua_app.py
+
+
+-= PORTING =-
+
+ - Just need to port pjlib.
+ - PJLIB doc has detailed info how to do this.
+ - Must pass pjlib-test!
+
121 Makefile
@@ -0,0 +1,121 @@
+include build.mak
+include build/host-$(HOST_NAME).mak
+-include user.mak
+include version.mak
+
+LIB_DIRS = pjlib/build pjlib-util/build pjnath/build third_party/build pjmedia/build pjsip/build
+DIRS = $(LIB_DIRS) pjsip-apps/build $(EXTRA_DIRS)
+
+ifdef MINSIZE
+MAKE_FLAGS := MINSIZE=1
+endif
+
+all clean dep depend distclean print realclean:
+ for dir in $(DIRS); do \
+ if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ done
+
+lib:
+ for dir in $(LIB_DIRS); do \
+ if $(MAKE) $(MAKE_FLAGS) -C $$dir all; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ done; \
+
+
+.PHONY: lib
+
+doc:
+ @if test \( ! "$(WWWDIR)" == "" \) -a \( ! -d $(WWWDIR)/pjlib/docs/html \) ; then \
+ echo 'Directory "$(WWWDIR)" does not look like a valid pjsip web directory'; \
+ exit 1; \
+ fi
+ for dir in $(DIRS); do \
+ if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ done
+
+LIBS = pjlib/lib/libpj-$(TARGET_NAME).a \
+ pjlib-util/lib/libpjlib-util-$(TARGET_NAME).a \
+ pjnath/lib/libpjnath-$(TARGET_NAME).a \
+ pjmedia/lib/libpjmedia-$(TARGET_NAME).a \
+ pjmedia/lib/libpjmedia-audiodev-$(TARGET_NAME).a \
+ pjmedia/lib/libpjmedia-codec-$(TARGET_NAME).a \
+ pjsip/lib/libpjsip-$(TARGET_NAME).a \
+ pjsip/lib/libpjsip-ua-$(TARGET_NAME).a \
+ pjsip/lib/libpjsip-simple-$(TARGET_NAME).a \
+ pjsip/lib/libpjsua-$(TARGET_NAME).a
+BINS = pjsip-apps/bin/pjsua-$(TARGET_NAME)$(HOST_EXE)
+
+size:
+ @echo -n 'Date: '
+ @date
+ @echo
+ @for lib in $(LIBS); do \
+ echo "$$lib:"; \
+ size -t $$lib | awk '{print $$1 "\t" $$2 "\t" $$3 "\t" $$6}'; \
+ echo; \
+ done
+ @echo
+ @for bin in $(BINS); do \
+ echo "size $$bin:"; \
+ size $$bin; \
+ done
+
+#dos2unix:
+# for f in `find . | egrep '(mak|h|c|S|s|Makefile)$$'`; do \
+# dos2unix "$$f" > dos2unix.tmp; \
+# cp dos2unix.tmp "$$f"; \
+# done
+# rm -f dos2unix.tmp
+
+xhdrid:
+ for f in `find . | egrep '\.(h|c|S|s|cpp|hpp)$$'`; do \
+ echo Processing $$f...; \
+ cat $$f | sed 's/.*\$$Author\$$/ */' > /tmp/id; \
+ cp /tmp/id $$f; \
+ done
+
+selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test
+
+pjlib-test: pjlib/bin/pjlib-test-$(TARGET_NAME)
+ cd pjlib/build && ../bin/pjlib-test-$(TARGET_NAME)
+
+pjlib-util-test: pjlib-util/bin/pjlib-util-test-$(TARGET_NAME)
+ cd pjlib-util/build && ../bin/pjlib-util-test-$(TARGET_NAME)
+
+pjnath-test: pjnath/bin/pjnath-test-$(TARGET_NAME)
+ cd pjnath/build && ../bin/pjnath-test-$(TARGET_NAME)
+
+pjmedia-test: pjmedia/bin/pjmedia-test-$(TARGET_NAME)
+ cd pjmedia/build && ../bin/pjmedia-test-$(TARGET_NAME)
+
+pjsip-test: pjsip/bin/pjsip-test-$(TARGET_NAME)
+ cd pjsip/build && ../bin/pjsip-test-$(TARGET_NAME)
+
+pjsua-test:
+ cd tests/pjsua && python runall.py
+
+prefix = $(ac_prefix)
+
+install:
+ mkdir -p $(DESTDIR)$(prefix)/lib
+ cp -f $(APP_LIB_FILES) $(DESTDIR)$(prefix)/lib/
+ mkdir -p $(DESTDIR)$(prefix)/include
+ for d in pjlib pjlib-util pjnath pjmedia pjsip; do \
+ cp -RLf $$d/include/* $(DESTDIR)$(prefix)/include/; \
+ done
+ mkdir -p $(DESTDIR)$(prefix)/lib/pkgconfig
+ sed -e "s!@PREFIX@!$(DESTDIR)$(prefix)!" libpjproject.pc.in | \
+ sed -e "s/@PJ_VERSION@/$(PJ_VERSION)/" | \
+ sed -e "s!@PJ_LDLIBS@!$(PJ_LDLIBS)!" | \
+ sed -e "s!@PJ_INSTALL_CFLAGS@!$(PJ_INSTALL_CFLAGS)!" > $(DESTDIR)/$(prefix)/lib/pkgconfig/libpjproject.pc
87 README-RTEMS
@@ -0,0 +1,87 @@
+
+
+
+ Build Instructions for PJLIB/PJMEDIA/PJSIP RTEMS Port
+
+
+
+The RTEMS port uses the POSIX abstraction layer at the moment, and has been
+tested with RTEMS 4.6 on i386 target.
+
+
+Building RTEMS
+---------------
+I use RTEMS 4.6 on a cygwin host with i386/pc386 as target, but I think it
+should work with different RTEMS versions/hosts/targets.
+
+RTEMS was built with the following commands:
+
+ $ /opt/src/rtems-4.6.6/configure --enable-cxx --enable-posix --enable-networking --enable-rdbg --enable-tests --enable-rtemsbsp=pc386 --target=i386-rtems
+ $ make
+ $ make install
+
+
+Supported Targets
+-----------------
+At the moment, pjlib supports i386 and mpc860 CPU target. For other targets,
+you would need to create/tweak the appropriate "m-xxx.mak" in "build" directory
+and the corresponding "m_xxx.h" header file in "pj/compat" directory.
+
+Please refer to pjlib porting guide about how to port PJLIB to new CPU target.
+
+
+Building PJLIB/PJMEDIA/PJSIP
+----------------------------
+Use the following steps to build the libraries:
+
+
+1. Set RTEMS_LIBRARY_PATH environment variable to point to your BSP directory
+ (which is <RTEMS INSTALLATION POINT>/<BOARD SUPPORT PACKAGE>).
+
+ For example (with sh):
+
+ $ export RTEMS_LIBRARY_PATH=/opt/rtems-4.6/i386-rtems/pc386
+
+
+2. Unfortunately pjproject's configure script is unable to create "build.mak"
+ for cross compilation (but this may change in the future), so we need to
+ create "build.mak" manually.
+
+ The file "README-configure" has some info about the variables in "build.mak".
+
+ For example, the "build.mak" for i386 target:
+
+ export MACHINE_NAME := i386
+ export OS_NAME := rtems
+ export HOST_NAME := mingw
+ export CC_NAME := gcc
+ export TARGET_NAME := i386-rtems
+ export CROSS_COMPILE := i386-rtems-
+
+
+3. Put additional CFLAGS or LDFLAGS that are specific to your target in
+ "user.mak".
+
+ For example, my "user.mak" looks like this:
+
+ export CFLAGS +=
+ export LDFLAGS += -Wl,-Ttext,0x00100000 -Wl,--defsym -Wl,HeapSize=0x400000
+
+
+4. Build the libraries:
+
+ $ make dep && make distclean && make
+
+
+5. That should be it. The libraries should be in "lib" directory and
+ applications in "bin" directory.
+
+
+
+Acknowledgements
+----------------
+Many thanks for Phil Torre <ptorre at zetron dot com>, who did most of the
+initial porting and testing with pjlib etc. All credits go to him.
+
+
+
964 README.txt
@@ -0,0 +1,964 @@
+ Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+ Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 2 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program. If not, see http://www.gnu.org/licenses/.
+
+
+Getting Started: Building and Using PJSIP and PJMEDIA
+
+ [Last Update: $Date: 2007-02-02 20:42:44 +0000 (Fri, 02 Feb 2007) $]
+
+ Print Friendly Page
+ _________________________________________________________________
+
+ This article describes how to download, customize, build, and use the open
+ source PJSIP and PJMEDIA SIP and media stack. The online (and HTML) version
+ of this file can be downloaded from http://www.pjsip.org/using.htm
+
+
+Quick Info
+ _________________________________________________________________
+
+ Building with GNU tools (Linux, *BSD, MacOS X, mingw, etc.)
+ Generally these should be all that are needed to build the libraries,
+ applications, and samples:
+
+ $ ./configure
+ $ make dep && make clean && make
+
+ Building Win32 Target with Microsoft Visual Studio
+ Generally we can just do these steps:
+
+ 1. Visual Studio 6: open pjproject.dsw workspace,
+ 2. Visual Studio 2005: open pjproject-vs8.sln solution,
+ 3. Create an empty pjlib/include/pj/config_site.h, and
+ 4. build the pjsua application.
+
+ Building for Windows Mobile
+ Generally these are all that are needed:
+
+ 1. Open pjsip-apps/build/wince-evc4/wince_demos.vcw EVC4 workspace,
+ 2. Create an empty pjlib/include/pj/config_site.h, and
+ 3. build the pjsua_wince application.
+
+ Invoking Older Build System (e.g. for RTEMS)
+ Generally these should be all that are needed to build the libraries,
+ applications, and samples:
+
+ $ ./configure-legacy
+ $ make dep && make clean && make
+
+ Locating Output Binaries/Libraries
+ Libraries will be put in lib directory, and binaries will be put in
+ bin directory, under each projects.
+
+ Running the Applications
+ After successful build, you can try running pjsua application on
+ pjsip-apps/bin directory. PJSUA manual can be found in
+ http://www.pjsip.org/pjsua.htm page.
+
+
+Table of Contents:
+ _________________________________________________________________
+
+ 1. Getting the Source Distribution
+
+ 1.1 Getting the Release tarball
+
+ 1.2 Getting from Subversion trunk
+
+ 1.3 Source Directories Layout
+
+ 2. Build Preparation
+
+ 2.1 config_site.h file
+
+ 2.2 Disk Space Requirements
+
+ 3. Building Linux, *nix, *BSD, and MacOS X Targets with GNU Build
+ Systems
+
+ 3.1 Supported Targets
+
+ 3.2 Requirements
+
+ 3.3 Running configure
+
+ 3.4 Running make
+
+ 3.5 Cross Compilation
+
+ 3.6 Build Customizations
+
+ 4. Building for Windows Targets with Microsoft Visual Studio
+
+ 4.1 Requirements
+
+ 4.2 Building the Projects
+
+ 4.3 Debugging the Sample Application
+
+ 5. Building for Windows Mobile Targets (Windows CE/WinCE/PDA/SmartPhone)
+
+ 5.1 Requirements
+
+ 5.2 Building the Projects
+
+ 6. Older PJLIB Build System for Non-Autoconf Targets (e.g. RTEMS)
+
+ 6.1 Supported Targets
+
+ 6.2 Invoking the Build System
+
+ 7. Running the Applications
+
+ 7.1 pjsua
+
+ 7.2 Sample Applications
+
+ 7.3 pjlib-test
+
+ 7.4 pjsip-test
+
+ 8. Using PJPROJECT with Applications
+
+
+ Appendix I: Common Problems/Frequently Asked Question (FAQ)
+
+ I.1 fatal error C1083: Cannot open include file: 'pj/config_site.h':
+ No such file or directory
+
+
+1. Getting the Source Code Distribution
+ _________________________________________________________________
+
+ All libraries (PJLIB, PJLIB-UTIL, PJSIP, PJMEDIA, and PJMEDIA-CODEC) are
+ currently distributed under a single source tree, collectively named as
+ PJPROJECT or just PJ libraries. These libraries can be obtained by either
+ downloading the release tarball or getting them from the Subversion trunk.
+
+
+1.1 Getting the Release tarball
+ _________________________________________________________________
+
+ Getting the released tarball is a convenient way to obtain stable version of
+ PJPROJECT. The tarball may not contain the latest features or bug-fixes, but
+ normally it is considered more stable as each will be tested more rigorously
+ before released.
+
+ The latest released tarball can be downloaded from the
+ http://www.pjsip.org/download.htm.
+
+
+1.2 Getting from Subversion trunk
+ _________________________________________________________________
+
+ PJPROJECT Subversion repository will always contain the latest/most
+ up-to-date version of the sources. Normally the Subversion repository is
+ always kept in a "good" state. However, there's always a chance that things
+ break and the tree doesn't build correctly (particularly for the
+ "not-so-popular" targets), so please consult the mailing list should there
+ be any problems.
+
+ Using Subversion also has benefits of keeping the local copy of the source
+ up to date with the main PJ source tree and to easily track the changes made
+ to the local copy, if any.
+
+
+What is Subversion
+
+ Subversion (SVN) is Open Source version control system similar to CVS.
+ Subversion homepage is in http://subversion.tigris.org/
+
+
+Getting Subversion Client
+
+ A Subversion (SVN) client is needed to download the PJ source files from
+ pjsip.org SVN tree. SVN client binaries can be downloaded from
+ http://subversion.tigris.org/, and the program should be available for
+ Windows, Linux, MacOS X, and many more platforms.
+
+
+Getting the Source for The First Time
+
+ Once Subversion client is installed, we can use these commands to initially
+ retrieve the latest sources from the Subversion trunk:
+
+
+
+ $ svn co http://svn.pjproject.net/repos/pjproject/trunk pjproject
+ $ cd pjproject
+
+
+Keeping The Local Copy Up-to-Date
+
+ Once sources have been downloaded, we can keep the local copy up to date by
+ periodically synchronizing the local source with the latest revision from
+ the PJ's Subversion trunk. The mailing list provides best source of
+ information about the availability of new updates in the trunk.
+
+ To update the local copy with the latest changes in the main PJ's
+ repository:
+
+
+
+ $ cd pjproject
+ $ svn update
+
+
+Tracking Local and Remote Changes
+
+ To see what files have been changed locally:
+
+
+
+ $ cd pjproject
+ $ svn status
+
+ The above command only compares local file against the original local copy,
+ so it doesn't require Internet connection while performing the check.
+
+ To see both what files have been changed locally and what files have been
+ updated in the PJ's Subversion repository:
+
+
+
+ $ cd pjproject
+ $ svn status -u
+
+ Note that this command requires active Internet connection to query the
+ status of PJPROJECT's source repository.
+
+
+1.3 Source Directories Layout
+ _________________________________________________________________
+
+Top-Level Directory Layout
+
+ The top-level directories (denoted as $TOP here) in the source distribution
+ contains the following sub-directories:
+
+ $TOP/build
+ Contains makefiles that are common for all projects.
+
+ $TOP/pjlib
+ Contains header and source files of PJLIB. PJLIB is the base
+ portability and framework library which is used by all other
+ libraries
+
+ $TOP/pjlib-util
+ Contains PJLIB-UTIL header and source files. PJLIB-UTIL is an
+ auxiliary library that contains utility functions such as scanner,
+ XML, STUN, MD5 algorithm, getopt() implementation, etc.
+
+ $TOP/pjmedia
+ Contains PJMEDIA and PJMEDIA-CODEC header and source files. The
+ sources of various codecs (such as GSM, Speex, and iLBC) can be found
+ under this directory.
+
+ $TOP/pjsip
+ Contains PJSIP header and source files.
+
+ $TOP/pjsip-apps
+ Contains source code for PJSUA and various sample applications.
+
+
+Individual Directory Inside Each Project
+
+ Each library directory further contains these sub-directories:
+
+ bin
+ Contains binaries produced by the build process.
+
+ build
+ Contains build scripts/makefiles, project files, project workspace,
+ etc. to build the project. In particular, it contains one Makefile
+ file to build the project with GNU build systems, and a *.dsw
+ workspace file to build the library with Microsoft Visual Studio 6 or
+ later.
+
+ build/output
+ The build/output directory contains the object files and other files
+ generated by the build process. To support building multiple targets
+ with a single source tree, each build target will occupy a different
+ subdirectory under this directory.
+
+ build/wince-evc4
+ This directory contains the project/workspace files to build Windows
+ CE/WinCE version of the project using Microsoft Embedded Visual C++
+ 4.
+
+ build/wince-evc4/output
+ This directory contains the library, executable, and object files
+ generated by Windows Mobile build process.
+
+ docs
+ Contains Doxygen configuration file (doxygen.cfg) to generate online
+ documentation from the source files. The output documentation will be
+ put in this directory as well (for example, docs/html directory for
+ the HTML files).
+
+ (to generate Doxygen documentation from the source tree, just run
+ "doxygen docs/doxygen.cfg" in the individual project directory. The
+ generated files will reside in docs directory).
+
+ include
+ Contains the header files for the project.
+
+ lib
+ Contains libraries produced by the build process.
+
+ src
+ Contains the source files of the project.
+
+
+2. Build Preparation
+ _________________________________________________________________
+
+2.1 Create config_site.h file
+ _________________________________________________________________
+
+ Before source files can be built, the pjlib/include/pj/config_site.h file
+ must be created (it can just be an empty file).
+
+ Note:
+ When the Makefile based build system is used, this process is taken
+ care by the Makefiles. But when non-Makefile based build system (such
+ as Visual Studio) is used, the config_site.h file must be created
+ manually.
+
+
+What is config_site.h File
+
+ The pjlib/include/pj/config_site.h contains local customizations to the
+ libraries.
+
+ All customizations should be put in this file instead of modifying PJ's
+ files, because if PJ's files get modified, then those modified files will
+ not be updated the next time the source is synchronized. Or in other case,
+ the local modification may be overwritten with the fresh copy from the SVN.
+
+ Putting the local customization to the config_site.h solves this problem,
+ because this file is not included in the version control, so it will never
+ be overwritten by "svn update" command.
+
+ Please find list of configuration macros that can be overriden from these
+ files:
+ * PJLIB Configuration (the pjlib/config.h file)
+ * PJLIB-UTIL Configuration (the pjlib-util/config.h file)
+ * PJMEDIA Configuration (the pjmedia/config.h file)
+ * PJSIP Configuration (the pjsip/sip_config.h file)
+
+ A sample config_site.h file is also available in
+ pjlib/include/config_site_sample.h.
+
+
+Creating config_site.h file
+
+ The simplest way is just to create an empty file, to use whetever default
+ values set by the libraries.
+
+ Another way to create the config_site.h file is to write something like the
+ following:
+
+
+ // Uncomment to get minimum footprint (suitable for 1-2 concurrent calls
+ only)
+ //#define PJ_CONFIG_MINIMAL_SIZE
+ // Uncomment to get maximum performance
+ //#define PJ_CONFIG_MAXIMUM_SPEED
+ #include <pj/config_site_sample.h>
+
+
+2.2 Disk Space Requirements
+ _________________________________________________________________
+
+ The building process needs:
+ about 50-60 MB of disk space to store the uncompressed source files, and
+ * about 30-50 MB of additional space for building each target
+
+ (Visual Studio Debug and Release are considered as separate targets)
+
+
+3. Building Linux, *nix, *BSD, and MacOS X Targets with GNU Build Systems
+ _________________________________________________________________
+
+3.1 Supported Targets
+ _________________________________________________________________
+
+ The new, autoconf based GNU build system can be used to build the
+ libraries/applications for the following targets:
+ * Linux/uC-Linux (i386, Opteron, Itanium, MIPS, PowerPC, etc.),
+ * MacOS X (PowerPC),
+ * mingw (i386),
+ * FreeBSD and maybe other BSD's (i386, Opteron, etc.),
+ * RTEMS with cross compilation (ARM, powerpc),
+ * etc.
+
+
+3.2 Requirements
+ _________________________________________________________________
+
+ In order to use PJ's GNU build system, these typical GNU tools are needed:
+ * GNU make (other make will not work),
+ * GNU binutils for the target, and
+ * GNU gcc for the target.
+ * OpenSSL header files/libraries (optional) if TLS support is wanted.
+
+ In addition, the appropriate "SDK" must be installed for the particular
+ target (this could just be a libc and the appropriate system abstraction
+ library such as Posix).
+
+ The build system is known to work on the following hosts:
+ * Linux, many types of distributions.
+ * MacOS X 10.2
+ * mingw (Win2K, XP)
+ * FreeBSD (must use gmake instead of make)
+
+ Building Win32 applications with Cygwin is currently not supported by the
+ autoconf script (there is some Windows header conflicts), but one can still
+ use the old configure script by calling ./configure-legacy. More over,
+ cross-compilations might also work with Cygwin.
+
+
+3.3 Running configure
+ _________________________________________________________________
+
+Using Default Settings
+
+ Run "./configure" without any options to let the script detect the
+ appropriate settings for the host:
+
+
+
+ $ cd pjproject
+ $ ./configure
+ ...
+
+ Notes:
+ The default settings build the libraries in "release" mode, with
+ default CFLAGS set to "-O2 -DNDEBUG". To change the default CFLAGS,
+ we can use the usual "./configure CFLAGS='-g'" construct.
+
+ Features Customization
+
+ With the new autoconf based build system, most configuration/customization
+ can be specified as configure arguments. The list of customizable features
+ can be viewed by running "./configure --help" command:
+
+
+
+ $ cd pjproject
+ $ ./configure --help
+ ...
+ Optional Features:
+ --disable-floating-point Disable floating point where possible
+ --disable-sound Exclude sound (i.e. use null sound)
+ --disable-small-filter Exclude small filter in resampling
+ --disable-large-filter Exclude large filter in resampling
+ --disable-g711-plc Exclude G.711 Annex A PLC
+ --disable-speex-aec Exclude Speex Acoustic Echo Canceller/AEC
+ --disable-g711-codec Exclude G.711 codecs from the build
+ --disable-l16-codec Exclude Linear/L16 codec family from the build
+ --disable-gsm-codec Exclude GSM codec in the build
+ --disable-speex-codec Exclude Speex codecs in the build
+ --disable-ilbc-codec Exclude iLBC codec in the build
+ --disable-tls Force excluding TLS support (default is autodetected based on
+ OpenSSL availability)
+ ...
+
+ Configuring Debug Version and Other Customizations
+
+ The configure script accepts standard customization, which details can be
+ obtained by executing ./configure --help.
+
+ Below is an example of specifying CFLAGS in configure:
+
+
+
+ $ ./configure CFLAGS="-O3 -DNDEBUG -msoft-float -fno-builtin"
+ ...
+
+ Configuring TLS Support
+
+ By default, TLS support is configured based on the availability of OpenSSL
+ header files and libraries. If OpenSSL is available at the default include
+ and library path locations, TLS will be enabled by the configure script.
+
+ You can explicitly disable TLS support by giving the configure script
+ --disable-tls option.
+
+
+ 3.4 Cross Compilation
+ _________________________________________________________________
+
+ Cross compilation should be supported, using the usual autoconf syntax:
+
+
+
+ $ ./configure --host=arm-elf-linux
+ ...
+
+ Since cross-compilation is not tested as often as the "normal" build, please
+ watch for the ./configure output for incorrect settings (well ideally this
+ should be done for normal build too).
+
+ Please refer to Porting Guide for further information about porting PJ
+ software.
+
+
+ 3.5 Running make
+ _________________________________________________________________
+
+ Once the configure script completes successfully, start the build process by
+ invoking these commands:
+
+
+
+ $ cd pjproject
+ $ make dep
+ $ make
+
+ Note:
+ gmake may need to be specified instead of make for some hosts, to
+ invoke GNU make instead of the native make.
+
+
+ Description of all make targets supported by the Makefile's:
+
+ all
+ The default (or first) target to build the libraries/binaries.
+
+ dep, depend
+ Build dependencies rule from the source files.
+
+ clean
+ Clean the object files for current target, but keep the output
+ library/binary files intact.
+
+ distclean, realclean
+ Remove all generated files (object, libraries, binaries, and
+ dependency files) for current target.
+
+
+ Note:
+ make can be invoked either in the top-level PJ directory or in build
+ directory under each project to build only the particular project.
+
+
+ 3.6 Build Customizations
+ _________________________________________________________________
+
+ Build features can be customized by specifying the options when running
+ ./configure as described in Running Configure above.
+
+ In addition, additional CFLAGS and LDFLAGS options can be put in user.mak
+ file in PJ root directory (this file may need to be created if it doesn't
+ exist). Below is a sample of user.mak file contents:
+
+
+
+ export CFLAGS += -msoft-float -fno-builtin
+ export LDFLAGS +=
+
+
+4. Building for Windows Targets with Microsoft Visual Studio
+ _________________________________________________________________
+
+ 4.1 Requirements
+ _________________________________________________________________
+
+ The Microsoft Visual Studio based project files can be used with one of the
+ following:
+
+ * Microsoft Visual Studio 6,
+ * Microsoft Visual Studio .NET 2002,
+ * Microsoft Visual Studio .NET 2003,
+ * Microsoft Visual C++ 2005 (including Express edition),
+
+ In addition, the following SDK's are needed:
+ * Platform SDK, if you're using Visual Studio 2005 Express (tested with
+ Platform SDK for Windows Server 2003 SP1),
+ * DirectX SDK (tested with DirectX version 8 and 9),
+ * OpenSSL development kit would be needed if TLS support is wanted, or
+ otherwise this is optional.
+
+ For the host, the following are required:
+ * Windows NT, 2000, XP, 2003, or later ,
+ * Windows 95/98 should work too, but this has not been tested,
+ * Sufficient amount of RAM for the build process (at least 256MB).
+
+
+ Enabling TLS Support with OpenSSL
+
+ If TLS support is wanted, then OpenSSL SDK must be installed in the
+ development host.
+
+ To install OpenSSL SDK from the Win32 binary distribution:
+ 1. Install OpenSSL SDK to any folder (e.g. C:\OpenSSL)
+ 2. Add OpenSSL DLL location to the system PATH.
+ 3. Add OpenSSL include path to Visual Studio includes search directory.
+ Make sure that OpenSSL header files can be accessed from the program
+ with #include <openssl/ssl.h> construct.
+ 4. Add OpenSSL library path to Visual Studio library search directory. Make
+ sure the following libraries are accessible:
+ + For Debug build: libeay32MTd and ssleay32MTd.
+ + For Release build: libeay32MT and ssleay32MT.
+
+ Then to enable TLS transport support in PJSIP, just add
+
+ #define PJSIP_HAS_TLS_TRANSPORT 1
+
+ in your pj/config_site.h. When this macro is defined, OpenSSL libraries will
+ be automatically linked to the application via the #pragma construct in
+ sip_transport_tls_ossl.c file.
+
+
+ 4.2 Building the Projects
+ _________________________________________________________________
+
+ Follow the steps below to build the libraries/application using Visual
+ Studio:
+ 1. For Visual Studio 6: open pjproject.dsw workspace file.
+ 2. For Visual Studio 8 (VS 2005): open pjproject-vs8.sln solution file.
+ 3. Set pjsua as Active Project.
+ 4. Select Debug or Release build as appropriate.
+ 5. Build the project. This will build pjsua application and all libraries
+ needed by pjsua.
+ 6. After successful build, the pjsua application will be placed in
+ pjsip-apps/bin directory, and the libraries in lib directory under each
+ projects.
+
+ To build the samples:
+ 1. (Still using the same workspace)
+ 2. Set samples project as Active Project
+ 3. Select Debug or Release build as appropriate.
+ 4. Build the project. This will build all sample applications and all
+ libraries needed.
+ 5. After successful build, the sample applications will be placed in
+ pjsip-apps/bin/samples directory, and the libraries in lib directory
+ under each projects.
+
+ 4.3 Debugging the Sample Application
+ _________________________________________________________________
+
+ The sample applications are build using Samples.mak makefile, therefore it
+ is difficult to setup debugging session in Visual Studio for these
+ applications. To solve this issue, the pjsip_apps workspace contain one
+ project called sample_debug which can be used to debug the sample
+ application.
+
+ To setup debugging using sample_debug project:
+ 1. (Still using pjsip_apps workspace)
+ 2. Set sample_debug project as Active Project
+ 3. Edit debug.c file inside this project.
+ 4. Modify the #include line to include the particular sample application to
+ debug
+ 5. Select Debug build.
+ 6. Build and debug the project.
+
+
+5. Building for Windows Mobile Targets (Windows CE/WinCE/PDA/SmartPhone)
+ _________________________________________________________________
+
+ PJ supports building SIP and media stacks and applications for Windows
+ Mobile targets. A very simple WinCE SIP user agent (with media) application
+ is provided just as proof of concept that the port works.
+
+ 5.1 Requirements
+ _________________________________________________________________
+
+ One of the following development tools is needed to build SIP and media
+ components for Windows Mobile:
+ * Microsoft Embedded Visual C++ 4 with appropriate SDKs, or
+ * Microsoft Visual Studio 2005 for Windows Mobile with appropriate SDKs.
+
+ Note that VS2005 is not directly supported (as I don't have the tools), but
+ it is reported to work (I assumed that VS2005 for Windows Mobile can import
+ EVC4 workspace file).
+
+ 5.2 Building the Projects
+ _________________________________________________________________
+
+ The Windows Mobile port is included in the main source distribution. Please
+ follow the following steps to build the WinCE libraries and sample
+ application:
+ 1. Open pjsip-apps/build/wince-evc4/wince_demos.vcw workspace file. If
+ later version of EVC4 is being used, this may cause the workspace file
+ to be converted to the appropriate format.
+ 2. Select pjsua_wince project as the Active Project.
+ 3. Select the appropriate SDK (for example Pocket PC 2003 SDK or SmartPhone
+ 2003 SDK)
+ 4. Select the appropriate configuration (for example, Win32 (WCE Emulator
+ Debug) to debug the program in emulator, or other configurations such as
+ ARMV4, MIPS, SH3, SH4, or whatever suitable for the device)
+ 5. Select the appropriate device (Emulator or the actual Device).
+ 6. Build the project. This will build the sample WinCE application and all
+ libraries (SIP, Media, etc.) needed by this application.
+
+ Notes
+
+ + If the config_site.h includes config_site_sample.h file, then
+ there are certain configuration in config_site_sample.h that get
+ activated for Windows CE targets. Please make sure that these
+ configurations are suitable for the application.
+ + The libraries, binaries and object files produced by the build
+ process are located under build/wince-evc4/output directory of each
+ projects.
+
+
+6. Older PJLIB Build System for Non-Autoconf Targets (e.g. RTEMS)
+ _________________________________________________________________
+
+ The old PJLIB build system can still be used for building PJ libraries, for
+ example for RTEMS target. Please see the Porting PJLIB page in PJLIB
+ Reference documentation for information on how to support new target using
+ this build system.
+
+ 6.1 Supported Targets
+ _________________________________________________________________
+
+ The older build system supports building PJ libraries for the following
+ operating systems:
+ * RTEMS
+ * Linux
+ * MacOS X
+ * Cygwin and Mingw
+
+ And it supports the following target architectures:
+ * i386, x86_64, itanium
+ * ARM
+ * mips
+ * powerpc
+ * mpc860
+ * etc.
+
+ For other targets, specific files need to be added to the build system,
+ please see the Porting PJLIB page in PJLIB Reference documentation for
+ details.
+
+ 6.2 Invoking the Build System
+ _________________________________________________________________
+
+ To invoke the older build system, run the following:
+
+
+
+ $ cd pjproject
+ $ ./configure-legacy
+ $ make dep && make clean && make
+
+
+
+7. Running the Applications
+ _________________________________________________________________
+
+ Upon successful build, the output libraries (PJLIB, PJLIB-UTIL, PJMEDIA,
+ PJSIP, etc.) are put under ./lib sub-directory under each project directory.
+ In addition, some applications may also be built, and such applications will
+ be put in ./bin sub-directory under each project directory.
+
+
+ 7.1 pjsua
+ _________________________________________________________________
+
+ pjsua is the reference implementation for both PJSIP and PJMEDIA stack, and
+ is the main target of the build system. Upon successful build, pjsua
+ application will be put in pjsip-apps/bin directory.
+
+ pjsua manual can be found in pjsua Manual Page.
+
+
+ 7.2 Sample Applications
+ _________________________________________________________________
+
+ Sample applications will be built with the Makefile build system. For Visual
+ Studio, you have to build the samples manually by selecting and building the
+ Samples project inside pjsip-apps/build/pjsip_apps.dsw project workspace.
+
+ Upon successful build, the sample applications are put in
+ pjsip-apps/bin/samples directory.
+
+ The sample applications are described in PJMEDIA Samples Page and
+ PJSIP Samples Page in the website.
+
+
+ 7.3 pjlib-test
+ _________________________________________________________________
+
+ pjlib-test contains comprehensive tests for testing PJLIB functionality.
+ This application will only be built when the Makefile build system is used;
+ with Visual Studio, one has to open pjlib.dsw project in pjlib/build
+ directory to build this application.
+
+ If you're porting PJLIB to new target, it is recommended to run this
+ application to make sure that all functionalities works as expected.
+
+
+ 7.4 pjsip-test
+ _________________________________________________________________
+
+ pjsip-test contains codes for testing various SIP functionalities in PJSIP
+ and also to benchmark static performance metrics such as message parsing per
+ second.
+
+
+
+8. Using PJPROJECT with Applications
+ _________________________________________________________________
+
+ Regardless of the build system being used, the following tasks are normally
+ needed to be done in order to build application to use PJSIP and PJMEDIA:
+ 1. Put these include directories in the include search path:
+ + pjlib/include
+ + pjlib-util/include
+ + pjmedia/include
+ + pjsip/include
+ 2. Put these library directories in the library search path:
+ + pjlib/lib
+ + pjlib-util/lib
+ + pjmedia/lib
+ + pjsip/lib
+ 3. Include the relevant PJ header files in the application source file. For
+ example, using these would include ALL APIs exported by PJ:
+
+ #include <pjlib.h>
+ #include <pjlib-util.h>
+ #include <pjsip.h>
+ #include <pjsip_ua.h>
+ #include <pjsip_simple.h>
+ #include <pjsua.h>
+ #include <pjmedia.h>
+ #include <pjmedia-codec.h>
+ (Note: the documentation of the relevant libraries should say which
+ header files should be included to get the declaration of the APIs).
+ 4. Declare the OS macros.
+ + For Windows applications built with Visual Studio, we need to
+ declare PJ_WIN32=1 macro in the project settings (declaring the
+ macro in the source file may not be sufficient).
+ + For Windows Mobile applications build with Visual C++, we need to
+ declare PJ_WIN32_WINCE=1 macro in the project settings.
+ + For GNU build system/autoconf based build system, we need to
+ declare PJ_AUTOCONF=1 macro when compiling the applications.
+ (Note: the old PJ build system requires declaring the target processor
+ with PJ_M_XXX=1 macro, but this has been made obsolete. The target
+ processor will be detected from compiler's predefined macro by
+ pjlib/config.h file).
+ 5. Link with the appropriate PJ libraries. The following libraries will
+ need to be included in the library link specifications:
+
+ pjlib
+ Base library used by all libraries.
+
+ pjlib-util
+ Auxiliary library containing scanner, XML, STUN, MD5, getopt,
+ etc, used by the SIP and media stack.
+
+ pjsip
+ SIP core stack library.
+
+ pjsip-ua
+ SIP user agent library containing INVITE session, call
+ transfer, client registration, etc.
+
+ pjsip-simple
+ SIP SIMPLE library for base event framework, presence, instant
+ messaging, etc.
+
+ pjsua
+ High level SIP UA library, combining SIP and media stack into
+ high-level easy to use API.
+
+ pjmedia
+ The media framework.
+
+ pjmedia-codec
+ Container library for various codecs such as GSM, Speex, and
+ iLBC.
+
+
+ Note: the actual library names will be appended with the target name and the
+ build configuration. For example:
+
+ For Visual Studio builds
+ The actual library names will look like
+ pjlib-i386-win32-vc6-debug.lib,
+ pjlib-i386-win32-vc6-release.lib, etc., depending on whether we
+ are building the Debug or Release version of the library.
+
+ An easier way to link with the libraries is to include PJ
+ project files in the workspace, and to configure project
+ dependencies so that the application depends on the PJ
+ libraries. This way, we don't need to manually add each PJ
+ libraries to the input library file specification, since VS
+ will automatically link the dependency libraries with the
+ application.
+
+ For Windows Mobile builds
+ Unfortunately the PJ libraries built for Windows Mobile will
+ not be placed in the usual lib directory, but rather under the
+ output directory under build/wince-evc4 project directory.
+
+ An easier way to link with the libraries is to include PJ
+ project files in the workspace, and to configure project
+ dependencies so that the application depends on the PJ
+ libraries. This way, we don't need to manually add each PJ
+ libraries to the input library file specification, since VS
+ will automatically link the dependency libraries with the
+ application.
+
+ For GNU builds
+ Application's Makefile can get the PJ library suffix by
+ including PJ's build.mak file from the root PJ directory (the
+ suffix is contained in TARGET_NAME variable). For example, to
+ link with PJLIB and PJMEDIA, we can use this syntax in the
+ LDFLAGS: "-lpj-$(TARGET_NAME) -lpjmedia-$(TARGET_NAME)"
+
+
+ 6. Link with system spesific libraries:
+
+ Windows
+ Add (among other things): wsock32.lib, ws2_32.lib, ole32.lib,
+ dsound.lib
+
+ Linux, *nix, *BSD
+ Add (among other things): '-lpthread -lm' (at least).
+
+ MacOS X
+ Add (among other things): '-framework CoreAudio -lpthread -lm'.
+
+
+Appendix I: Common Problems/Frequently Asked Question (FAQ)
+ _________________________________________________________________
+
+ I.1 fatal error C1083: Cannot open include file: 'pj/config_site.h': No such
+ file or directory
+
+ This error normally occurs when the config_site.h file has not been created.
+ This file needs to be created manually (an empty file is sufficient). Please
+ follow the Build Preparation instructions above to create this file.
+
+
+
+
+
+
+
+
+ _________________________________________________________________
+
+ Feedback:
+ Thanks for using PJ libraries and for reading this document. Please
+ send feedbacks or general comments to <bennylp at pjsip dot org>.
+
8,596 aconfigure
8,596 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
1,465 aconfigure.ac
@@ -0,0 +1,1465 @@
+AC_INIT(pjproject,2.x)
+
+host_orig="$host"
+
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+AC_CONFIG_HEADER([pjlib/include/pj/compat/os_auto.h
+ pjlib/include/pj/compat/m_auto.h
+ pjmedia/include/pjmedia/config_auto.h
+ pjmedia/include/pjmedia-codec/config_auto.h
+ pjsip/include/pjsip/sip_autoconf.h
+ ])
+AC_CONFIG_FILES([build.mak
+ build/os-auto.mak
+ build/cc-auto.mak
+ pjlib/build/os-auto.mak
+ pjlib-util/build/os-auto.mak
+ pjmedia/build/os-auto.mak
+ pjsip/build/os-auto.mak
+ third_party/build/os-auto.mak
+ third_party/build/portaudio/os-auto.mak
+ ])
+
+
+dnl
+dnl Setup default CFLAGS
+dnl
+if test "$CFLAGS" = ""; then
+ CFLAGS="-O2"
+else
+ CFLAGS="$CFLAGS"
+fi
+
+CXXFLAGS="$CFLAGS $CXXFLAGS"
+
+dnl #
+dnl # Configure tools
+dnl #
+AC_PROG_CC
+AC_PROG_CXX
+AC_LANG_C
+
+dnl #
+dnl # Setup CROSS_COMPILE variable
+dnl #
+if test -z "$CROSS_COMPILE"; then
+ CROSS_COMPILE=`echo ${CC} | sed 's/gcc//'`
+fi
+
+if test "$AR" = ""; then AR="${CROSS_COMPILE}ar rv"; fi
+AC_SUBST(AR)
+if test "$LD" = ""; then LD="$CC"; fi
+AC_SUBST(LD)
+if test "$LDOUT" = ""; then LDOUT="-o "; fi
+AC_SUBST(LDOUT)
+if test "$RANLIB" = ""; then RANLIB="${CROSS_COMPILE}ranlib"; fi
+AC_SUBST(RANLIB)
+if test "$OBJEXT" = ""; then OBJEXT='o'; fi
+AC_SUBST(OBJEXT)
+if test "$LIBEXT" = ""; then LIBEXT='a'; fi
+AC_SUBST(LIBEXT)
+if test "$LIBEXT2" = ""; then LIBEXT2=""; fi
+AC_SUBST(LIBEXT2)
+if test "$CC_OUT" = ""; then CC_OUT="-o "; fi
+AC_SUBST(CC_OUT)
+if test "$CC_INC" = ""; then CC_INC="-I"; fi
+AC_SUBST(CC_INC)
+if test "$CC_DEF" = ""; then CC_DEF="-D"; fi
+AC_SUBST(CC_DEF)
+if test "$CC_OPTIMIZE" = ""; then CC_OPTIMIZE="-O2"; fi
+AC_SUBST(CC_OPTIMIZE)
+if test "$CC_CFLAGS" = ""; then CC_CFLAGS="-Wall"; fi
+AC_SUBST(CC_CFLAGS)
+
+
+
+AC_SUBST(ac_pjdir)
+AC_SUBST(ac_build_mak_vars)
+
+case $host in
+ *mingw* | *cygw* | *win32* | *w32* )
+ if pwd -W 2&> /dev/null; then
+ ac_pjdir=`pwd -W`
+ else
+ # We're probably cross-compiling mingw on Linux
+ ac_pjdir=`pwd`
+ fi
+ ;;
+ *)
+ ac_pjdir=`pwd`
+ ;;
+esac
+
+AC_SUBST(ac_shlib_suffix)
+case $target in
+ *mingw* | *cygw* | *win32* | *w32* )
+ ac_shlib_suffix=dll
+ ;;
+ *darwin*)
+ ac_shlib_suffix=dylib
+ ;;
+ *)
+ ac_shlib_suffix=so
+ ;;
+esac
+
+AC_SUBST(ac_cross_compile)
+if test "$build" = "$host"; then
+ ac_cross_compile=
+else
+ ac_cross_compile=${host_orig}-
+fi
+
+AC_CHECK_LIB(pthread,pthread_create)
+AC_CHECK_LIB(wsock32,puts)
+AC_CHECK_LIB(ws2_32,puts)
+AC_CHECK_LIB(ole32,puts)
+AC_CHECK_LIB(winmm,puts)
+AC_CHECK_LIB(socket,puts)
+AC_CHECK_LIB(rt,puts)
+AC_CHECK_LIB(nsl,puts)
+AC_CHECK_LIB(uuid,uuid_generate)
+AC_CHECK_LIB(uuid,uuid_generate,[ac_has_uuid_lib=1])
+
+AC_MSG_RESULT([Setting PJ_M_NAME to $target_cpu])
+AC_DEFINE_UNQUOTED(PJ_M_NAME,["$target_cpu"])
+
+dnl
+dnl Memory alignment detection
+dnl
+AC_MSG_CHECKING([memory alignment])
+case $target in
+ sparc64-* | ia64-* | x86_64-* )
+ AC_DEFINE(PJ_POOL_ALIGNMENT, 8)
+ AC_MSG_RESULT([8 bytes])
+ ;;
+ * )
+ AC_DEFINE(PJ_POOL_ALIGNMENT, 4)
+ AC_MSG_RESULT([4 bytes (default)])
+ ;;
+esac
+
+
+dnl
+dnl Endianness detection
+dnl
+AC_C_BIGENDIAN
+
+if test "x$ac_cv_c_bigendian" = "xyes"; then
+ CFLAGS="$CFLAGS -DPJ_IS_BIG_ENDIAN=1 -DPJ_IS_LITTLE_ENDIAN=0"
+else
+ CFLAGS="$CFLAGS -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1"
+fi
+
+dnl
+dnl Legacy macros
+dnl
+case $target in
+ *mingw* | *cygw* | *win32* | *w32* )
+ AC_DEFINE(PJ_WIN32,1)
+ AC_DEFINE(PJ_WIN32_WINNT,0x0400)
+ AC_DEFINE(WIN32_LEAN_AND_MEAN)
+ ;;
+ *darwin*)
+ AC_DEFINE(PJ_DARWINOS,1)
+ ;;
+ *linux*)
+ AC_DEFINE(PJ_LINUX,1)
+ ;;
+ *rtems*)
+ AC_DEFINE(PJ_RTEMS,1)
+ ;;
+ *sunos* | *solaris* )
+ AC_DEFINE(PJ_SUNOS,1)
+ ;;
+ *)
+ ;;
+esac
+
+
+
+
+dnl # --disable-floating-point option
+AC_ARG_ENABLE(floating-point,
+ AC_HELP_STRING([--disable-floating-point],
+ [Disable floating point where possible]),
+ [if test "$enable_floating_point" = "no"; then
+ AC_DEFINE(PJ_HAS_FLOATING_POINT,0)
+ AC_MSG_RESULT([Checking if floating point is disabled... yes])
+ fi],
+ [
+ AC_DEFINE(PJ_HAS_FLOATING_POINT,1)
+ AC_MSG_RESULT([Checking if floating point is disabled... no])
+ AC_CHECK_LIB(m,fmod)
+ ])
+
+
+AC_CHECK_HEADER(arpa/inet.h,[AC_DEFINE(PJ_HAS_ARPA_INET_H,1)])
+AC_CHECK_HEADER(assert.h,[AC_DEFINE(PJ_HAS_ASSERT_H,1)])
+AC_CHECK_HEADER(ctype.h,[AC_DEFINE(PJ_HAS_CTYPE_H,1)])
+
+case $target in
+ *mingw* | *cygw* | *win32* | *w32* )
+ AC_DEFINE(PJ_HAS_ERRNO_H,0)
+ ;;
+ *)
+ AC_CHECK_HEADER(errno.h,[AC_DEFINE(PJ_HAS_ERRNO_H,1)])
+ ;;
+esac
+
+AC_CHECK_HEADER(fcntl.h,[AC_DEFINE(PJ_HAS_FCNTL_H,1)])
+AC_CHECK_HEADER(linux/socket.h,[AC_DEFINE(PJ_HAS_LINUX_SOCKET_H,1)])
+AC_CHECK_HEADER(limits.h,[AC_DEFINE(PJ_HAS_LIMITS_H,1)])
+AC_CHECK_HEADER(malloc.h,[AC_DEFINE(PJ_HAS_MALLOC_H,1)])
+AC_CHECK_HEADER(netdb.h,[AC_DEFINE(PJ_HAS_NETDB_H,1)])
+AC_CHECK_HEADER(netinet/in_systm.h,[AC_DEFINE(PJ_HAS_NETINET_IN_SYSTM_H,1)])
+AC_CHECK_HEADER(netinet/in.h,[AC_DEFINE(PJ_HAS_NETINET_IN_H,1)])
+AC_CHECK_HEADER(netinet/ip.h,[AC_DEFINE(PJ_HAS_NETINET_IP_H,1)],[],
+ [#if PJ_HAS_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #if PJ_HAS_NETINET_IN_SYSTM_H
+ # include <netinet/in_systm.h>
+ #endif
+ #if PJ_HAS_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ ])
+AC_CHECK_HEADER(netinet/tcp.h,[AC_DEFINE(PJ_HAS_NETINET_TCP_H,1)])
+AC_CHECK_HEADER(ifaddrs.h,
+ [AC_CHECK_FUNC(getifaddrs,[AC_DEFINE(PJ_HAS_IFADDRS_H,1)])])
+AC_CHECK_HEADER(semaphore.h,[AC_DEFINE(PJ_HAS_SEMAPHORE_H,1)])
+AC_CHECK_HEADER(setjmp.h,[AC_DEFINE(PJ_HAS_SETJMP_H,1)])
+AC_CHECK_HEADER(stdarg.h,[AC_DEFINE(PJ_HAS_STDARG_H,1)])
+AC_CHECK_HEADER(stddef.h,[AC_DEFINE(PJ_HAS_STDDEF_H,1)])
+AC_CHECK_HEADER(stdio.h,[AC_DEFINE(PJ_HAS_STDIO_H,1)])
+AC_CHECK_HEADER(stdint.h,[AC_DEFINE(PJ_HAS_STDINT_H,1)])
+AC_CHECK_HEADER(stdlib.h,[AC_DEFINE(PJ_HAS_STDLIB_H,1)])
+AC_CHECK_HEADER(string.h,[AC_DEFINE(PJ_HAS_STRING_H,1)])
+AC_CHECK_HEADER(sys/ioctl.h,[AC_DEFINE(PJ_HAS_SYS_IOCTL_H,1)])
+AC_CHECK_HEADER(sys/select.h,[AC_DEFINE(PJ_HAS_SYS_SELECT_H,1)])
+AC_CHECK_HEADER(sys/socket.h,[AC_DEFINE(PJ_HAS_SYS_SOCKET_H,1)])
+AC_CHECK_HEADER(sys/time.h,[AC_DEFINE(PJ_HAS_SYS_TIME_H,1)])
+AC_CHECK_HEADER(sys/timeb.h,[AC_DEFINE(PJ_HAS_SYS_TIMEB_H,1)])
+AC_CHECK_HEADER(sys/types.h,[AC_DEFINE(PJ_HAS_SYS_TYPES_H,1)])
+AC_CHECK_HEADER(sys/filio.h,[AC_DEFINE(PJ_HAS_SYS_FILIO_H,1)])
+AC_CHECK_HEADER(sys/sockio.h,[AC_DEFINE(PJ_HAS_SYS_SOCKIO_H,1)])
+AC_CHECK_HEADER(sys/utsname.h,[AC_DEFINE(PJ_HAS_SYS_UTSNAME_H,1)])
+AC_CHECK_HEADER(time.h,[AC_DEFINE(PJ_HAS_TIME_H,1)])
+AC_CHECK_HEADER(unistd.h,[AC_DEFINE(PJ_HAS_UNISTD_H,1)])
+AC_CHECK_HEADER(winsock.h,[AC_DEFINE(PJ_HAS_WINSOCK_H,1)])
+AC_CHECK_HEADER(winsock2.h,[AC_DEFINE(PJ_HAS_WINSOCK2_H,1)])
+AC_CHECK_HEADER(mswsock.h,[AC_DEFINE(PJ_HAS_MSWSOCK_H,1)],[],
+ [#if PJ_HAS_WINSOCK2_H
+ # include <winsock2.h>
+ #elif PJ_HAS_WINSOCK_H
+ # include <winsock.h>
+ #endif
+ ])
+AC_CHECK_HEADER(ws2tcpip.h,[AC_DEFINE(PJ_HAS_WS2TCPIP_H,1)])
+AC_CHECK_HEADER(uuid/uuid.h,[ac_has_uuid_h=1])
+AC_CHECK_HEADER(net/if.h,[AC_DEFINE(PJ_HAS_NET_IF_H,1)],[],
+ [#if PJ_HAS_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #if PJ_HAS_SYS_SOCKET_H
+
+ # include <sys/socket.h>
+ #endif
+ ])
+AC_MSG_RESULT([Setting PJ_OS_NAME to $target])
+AC_DEFINE_UNQUOTED(PJ_OS_NAME,["$target"])
+
+AC_MSG_RESULT([Setting PJ_HAS_ERRNO_VAR to 1])
+AC_DEFINE(PJ_HAS_ERRNO_VAR,1)
+
+AC_MSG_RESULT([Setting PJ_HAS_HIGH_RES_TIMER to 1])
+AC_DEFINE(PJ_HAS_HIGH_RES_TIMER,1)
+
+AC_MSG_RESULT([Setting PJ_HAS_MALLOC to 1])
+AC_DEFINE(PJ_HAS_MALLOC,1)
+
+AC_MSG_RESULT([Setting PJ_NATIVE_STRING_IS_UNICODE to 0])
+AC_DEFINE(PJ_NATIVE_STRING_IS_UNICODE,0)
+
+AC_MSG_RESULT([Setting PJ_ATOMIC_VALUE_TYPE to long])
+AC_DEFINE(PJ_ATOMIC_VALUE_TYPE,long)
+
+dnl # Determine if inet_aton() is available
+AC_MSG_CHECKING([if inet_aton() is available])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <arpa/inet.h>]],
+ [inet_aton(0, 0);])],
+ [AC_DEFINE(PJ_SOCK_HAS_INET_ATON,1)
+ AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)])
+
+dnl # Determine if inet_pton() is available
+AC_MSG_CHECKING([if inet_pton() is available])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <arpa/inet.h>]],
+ [inet_pton(0, 0, 0);])],
+ [AC_DEFINE(PJ_SOCK_HAS_INET_PTON,1)
+ AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)])
+
+dnl # Determine if inet_ntop() is available
+AC_MSG_CHECKING([if inet_ntop() is available])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <arpa/inet.h>]],
+ [inet_ntop(0, 0, 0, 0);])],
+ [AC_DEFINE(PJ_SOCK_HAS_INET_NTOP,1)
+ AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)])
+
+dnl # Determine if getaddrinfo() is available
+AC_MSG_CHECKING([if getaddrinfo() is available])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>]],
+ [getaddrinfo(0, 0, 0, 0);])],
+ [AC_DEFINE(PJ_SOCK_HAS_GETADDRINFO,1)
+ AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)])
+
+dnl # Determine if sockaddr_in has sin_len member
+AC_MSG_CHECKING([if sockaddr_in has sin_len member])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>]],
+ [struct sockaddr_in a; a.sin_len=0;])],
+ [AC_DEFINE(PJ_SOCKADDR_HAS_LEN,1)
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no))
+
+dnl # Determine if socklen_t is available
+AC_MSG_CHECKING([if socklen_t is available])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+ #include <sys/socket.h>]],
+ [socklen_t xxx = 0;])],
+ [AC_DEFINE(PJ_HAS_SOCKLEN_T,1)
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no))
+
+dnl # Determine if SO_ERROR is available
+AC_MSG_CHECKING([if SO_ERROR is available])
+case $target in
+ *mingw* | *cygw* | *win32* | *w32* )
+ AC_DEFINE(PJ_HAS_SO_ERROR,1)
+ AC_MSG_RESULT(yes)
+ ;;
+ *)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>]],
+ [int i=SO_ERROR;])],
+ [AC_DEFINE(PJ_HAS_SO_ERROR,1)
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no))
+ ;;
+esac
+
+
+dnl # Determine if RW-mutex is available
+AC_MSG_CHECKING([if pthread_rwlock_t is available])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+ [pthread_rwlock_t *x;])],
+ [AC_DEFINE(PJ_EMULATE_RWMUTEX,0)
+ ac_rwmutex="yes"
+ AC_MSG_RESULT(yes)],
+ [AC_DEFINE(PJ_EMULATE_RWMUTEX,1)
+ ac_rwmutex="no"
+ AC_MSG_RESULT(no)])
+
+dnl # If rwmutex is not detected, check again but this time
+dnl # with _POSIX_READER_WRITER_LOCKS defined (newlib needs this)
+if test "$ac_rwmutex" = "no"; then
+ AC_MSG_CHECKING([if pthread_rwlock_t is available with _POSIX_READER_WRITER_LOCKS])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _POSIX_READER_WRITER_LOCKS
+ #include <pthread.h>]],
+ [pthread_rwlock_t *x;])],
+ [AC_DEFINE(PJ_EMULATE_RWMUTEX,0)
+ CFLAGS="$CFLAGS -D_POSIX_THREADS -D_POSIX_READER_WRITER_LOCKS"
+ AC_MSG_RESULT(yes)],
+ [AC_DEFINE(PJ_EMULATE_RWMUTEX,1)
+ AC_MSG_RESULT(no)])
+fi
+
+dnl # Do we have pthread_mutexattr_settype()?
+AC_MSG_CHECKING([if pthread_mutexattr_settype() is available])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+ [pthread_mutexattr_settype(0,PTHREAD_MUTEX_FAST_NP);])],
+ [AC_DEFINE(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE,1)
+ AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)])
+
+dnl # Does pthread_mutexattr_t has "recursive" member?
+AC_MSG_CHECKING([if pthread_mutexattr_t has recursive member])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+ [[pthread_mutexattr_t attr;
+ attr.recursive=1;]])],
+ [AC_DEFINE(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE,1)
+ AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)])
+
+dnl ######################
+dnl # ioqueue selection
+dnl #
+AC_SUBST(ac_os_objs)
+AC_MSG_CHECKING([ioqueue backend])
+AC_ARG_ENABLE(epoll,
+ AC_HELP_STRING([--enable-epoll],
+ [Use /dev/epoll ioqueue on Linux (experimental)]),
+ [
+ ac_os_objs=ioqueue_epoll.o
+ AC_MSG_RESULT([/dev/epoll])
+ ],
+ [
+ ac_os_objs=ioqueue_select.o
+ AC_MSG_RESULT([select()])
+ ])
+
+
+dnl ######################
+dnl # OS specific files
+dnl #
+case $target in
+ *mingw* | *cygw* | *win32* | *w32* )
+ ac_os_objs="$ac_os_objs file_access_win32.o file_io_win32.o os_core_win32.o os_error_win32.o os_time_win32.o os_timestamp_win32.o guid_win32.o"
+ ;;
+ *)
+ ac_os_objs="$ac_os_objs file_access_unistd.o file_io_ansi.o os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o"
+ case $target in
+ arm-apple-darwin*)
+ ac_os_objs="$ac_os_objs os_info_iphone.o"
+ ;;
+ esac
+ # UUID
+ if test "$ac_has_uuid_lib" = "1" -a "$ac_has_uuid_h" = "1"; then
+ ac_os_objs="$ac_os_objs guid_uuid.o"
+ else
+ ac_os_objs="$ac_os_objs guid_simple.o"
+ fi
+ ;;
+esac
+
+case $target in
+ *darwin*)
+ ac_os_objs="$ac_os_objs os_core_darwin.o"
+ ;;
+esac
+
+dnl ##########################################
+dnl #
+dnl # PJMEDIA
+dnl #
+
+dnl # Use external Speex installation
+AC_SUBST(ac_external_speex,0)
+AC_ARG_WITH(external-speex,
+ AC_HELP_STRING([--with-external-speex],
+ [Use external Speex development files, not the one in "third_party" directory. When this option is set, make sure that Speex is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]),
+ [
+ if test "x$with_external_speex" != "xno"; then
+ # Test Speex installation
+ AC_MSG_CHECKING([if external Speex devkit is installed])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <speex/speex.h>
+ #include <speex/speex_echo.h>
+ ]],
+ [speex_echo_state_init(0, 0); speex_encoder_init(0); ])],
+ [AC_MSG_RESULT(yes!!)
+ AC_DEFINE(PJMEDIA_EXTERNAL_SPEEX_CODEC, 1)
+ ac_external_speex="1"
+ ],
+ [AC_MSG_ERROR([Unable to use external Speex library. If Speex development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])])
+ fi
+ ]
+ )
+
+dnl # Use external GSM codec library installation
+AC_SUBST(ac_external_gsm,0)
+AC_ARG_WITH(external-gsm,
+ AC_HELP_STRING([--with-external-gsm],
+ [Use external GSM codec library, not the one in "third_party" directory. When this option is set, make sure that the GSM include/lib files are accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]),
+ [
+ if test "x$with_external_gsm" != "xno"; then
+ # Test GSM library installation
+ AC_MSG_CHECKING([if external GSM devkit is installed as gsm/gsm.h])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <gsm/gsm.h> ]], [gsm_create(); ]) ],
+ [AC_MSG_RESULT(yes!!)
+ AC_DEFINE(PJMEDIA_EXTERNAL_GSM_CODEC, 1)
+ AC_DEFINE(PJMEDIA_EXTERNAL_GSM_GSM_H, 1)
+ ac_external_gsm="1"
+ ],
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_CHECKING([if external GSM devkit is installed as gsm.h])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <gsm.h> ]], [gsm_create(); ]) ],
+ [AC_MSG_RESULT(yes!!)
+ AC_DEFINE(PJMEDIA_EXTERNAL_GSM_CODEC, 1)
+ AC_DEFINE(PJMEDIA_EXTERNAL_GSM_H, 1)
+ ac_external_gsm="1"
+ ],
+ [AC_MSG_ERROR([Unable to use external GSM library. If GSM development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])
+ ]
+ )
+ ]
+ )
+ fi
+ ]
+ )
+
+
+
+dnl # Sound device backend selection
+AC_SUBST(ac_pjmedia_snd)
+AC_ARG_ENABLE(sound,
+ AC_HELP_STRING([--disable-sound],
+ [Exclude sound (i.e. use null sound)]),
+ [if test "$enable_sound" = "no"; then
+ [ac_pjmedia_snd=null]
+ AC_MSG_RESULT([Checking if sound is disabled... yes])
+ fi]
+ )
+
+dnl # Use external PortAudio installation
+AC_SUBST(ac_external_pa,0)
+AC_ARG_WITH(external-pa,
+ AC_HELP_STRING([--with-external-pa],
+ [Use external PortAudio development files, not the one in "third_party" directory. When this option is set, make sure that PortAudio is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]),
+ [
+ if test "x$with_external_pa" != "xno"; then
+ # Test PortAudio installation
+ AC_MSG_CHECKING([if external PortAudio devkit is installed])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <portaudio.h>
+ ]],
+ [Pa_Initialize();])],
+ [AC_MSG_RESULT(yes!!)
+ ac_external_pa="1"
+ ],
+ [AC_MSG_ERROR([Unable to use PortAudio. If PortAudio development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])])
+ fi
+ ]
+ )
+
+AC_SUBST(ac_pa_cflags)
+AC_CHECK_HEADER(sys/soundcard.h,
+ [ac_pa_cflags="$ac_pa_cflags -DHAVE_SYS_SOUNDCARD_H"])
+AC_CHECK_HEADER(linux/soundcard.h,
+ [ac_pa_cflags="$ac_pa_cflags -DHAVE_LINUX_SOUNDCARD_H"])
+AC_CHECK_HEADER(machine/soundcard.h,
+ [ac_pa_cflags="$ac_pa_cflags -DHAVE_MACHINE_SOUNDCARD_H"])
+
+if test "x$ac_cv_c_bigendian" = "xyes"; then
+ ac_pa_cflags="$ac_pa_cflags -DPA_BIG_ENDIAN"
+else
+ ac_pa_cflags="$ac_pa_cflags -DPA_LITTLE_ENDIAN"
+fi
+
+if test "$enable_sound" = "no"; then
+ true;
+else
+ case $target in
+ arm-apple-darwin*)
+ LIBS="$LIBS -framework CoreAudio -framework CoreFoundation -framework AudioToolbox -framework CFNetwork -framework UIKit"
+ AC_MSG_RESULT([Checking sound device backend... AudioUnit])
+ ;;
+ *darwin*)
+ LIBS="$LIBS -framework CoreAudio -framework CoreServices -framework AudioUnit -framework AudioToolbox"
+ if test "`uname -r`" = "6.8"; then
+ #ac_pa_cflags="$ac_pa_cflags -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS"
+ #AC_MSG_RESULT([Setting additional PortAudio CFLAGS.. -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS])
+ ac_pjmedia_snd=pa_old_darwinos
+ AC_MSG_RESULT([Checking sound device backend... old coreaudio])
+ else
+ ac_pjmedia_snd=pa_darwinos
+ AC_MSG_RESULT([Checking sound device backend... coreaudio])
+ fi
+ ;;
+ *cygwin* | *mingw*)
+ ac_pjmedia_snd=pa_win32
+ AC_MSG_RESULT([Checking sound device backend... win32 sound])
+ ;;
+ *rtems*)
+ ac_pjmedia_snd=null
+ AC_MSG_RESULT([Checking sound device backend... null sound])
+ ;;
+ *)
+ dnl # Check if ALSA is available
+ ac_pjmedia_snd=pa_unix
+ AC_CHECK_HEADER(alsa/version.h,
+ [AC_SUBST(ac_pa_use_alsa,1)
+ LIBS="$LIBS -lasound"
+ ],
+ [AC_SUBST(ac_pa_use_alsa,0)])
+ AC_MSG_RESULT([Checking sound device backend... unix])
+
+ dnl # Check if OSS is disabled
+ AC_SUBST(ac_pa_use_oss,1)
+ AC_ARG_ENABLE(oss,
+ AC_HELP_STRING([--disable-oss],
+ [Disable OSS audio (default: not disabled)]),
+ [
+ if test "$enable_oss" = "no"; then
+ [ac_pa_use_oss=0]
+ AC_MSG_RESULT([Checking if OSS audio is disabled... yes])
+ fi
+ ])
+ ;;
+ esac
+fi
+
+AC_SUBST(ac_pjmedia_video)
+
+dnl # --disable-video option
+AC_ARG_ENABLE(video,
+ AC_HELP_STRING([--disable-video],
+ [Disable video feature]),
+ [if test "$enable_video" = "no"; then
+ #AC_DEFINE(PJMEDIA_HAS_VIDEO,0)
+ AC_MSG_RESULT([Video is disabled])
+ enable_sdl="no"
+ enable_ffmpeg="no"
+ enable_v4l2="no"
+ fi],
+ [])
+
+case $target in
+ arm-apple-darwin*)
+ LIBS="$LIBS -framework UIKit"
+ ;;
+ *darwin*)
+ LIBS="$LIBS -framework Foundation -framework AppKit"
+ ;;
+esac
+
+if test "$enable_video" = "no"; then
+ true;
+else
+ case $target in
+ arm-apple-darwin*)
+ ac_pjmedia_video=iphone_os
+ AC_SUBST(ac_pjmedia_video_has_ios)
+ AC_SUBST(ac_ios_cflags)
+ SAVED_LIBS="$LIBS"
+ LIBS="-framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[ac_pjmedia_video_has_ios=yes],[ac_pjmedia_video_has_ios=no])
+ LIBS="$SAVED_LIBS"
+ if test "$ac_pjmedia_video_has_ios" = "yes"; then
+ ac_ios_cflags="-DPJMEDIA_VIDEO_DEV_HAS_IOS=1"
+ LIBS="$LIBS -framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia"
+ AC_MSG_RESULT([Checking if AVFoundation framework is available... yes])
+ else
+ AC_MSG_RESULT([Checking if AVFoundation framework is available... no])
+ fi
+ ;;
+ *darwin*)
+ ac_pjmedia_video=mac_os
+ AC_SUBST(ac_pjmedia_video_has_qt)
+ AC_SUBST(ac_qt_cflags)
+ SAVED_LIBS="$LIBS"
+ LIBS="-framework QTKit"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[ac_pjmedia_video_has_qt=yes],[ac_pjmedia_video_has_qt=no])
+ LIBS="$SAVED_LIBS"
+ if test "$ac_pjmedia_video_has_qt" = "yes"; then
+ ac_qt_cflags="-DPJMEDIA_VIDEO_DEV_HAS_QT=1"
+ LIBS="$LIBS -framework QTKit -framework QuartzCore -framework OpenGL"
+ AC_MSG_RESULT([Checking if QTKit framework is available... yes])
+ else
+ AC_MSG_RESULT([Checking if QTKit framework is available... no])
+ fi
+ ;;
+ esac
+fi
+
+AC_ARG_ENABLE(ext_sound,
+ AC_HELP_STRING([--enable-ext-sound],
+ [PJMEDIA will not provide any sound device backend]),
+ [if test "$enable_ext_sound" = "yes"; then
+ [ac_pjmedia_snd=external]
+ AC_MSG_RESULT([Checking if external sound is set... yes])
+ fi]
+ )
+
+dnl # Include resampling small filter
+AC_SUBST(ac_no_small_filter)
+AC_ARG_ENABLE(small-filter,
+ AC_HELP_STRING([--disable-small-filter],
+ [Exclude small filter in resampling]),
+ [if test "$enable_small_filter" = "no"; then
+ [ac_no_small_filter='-DPJMEDIA_HAS_SMALL_FILTER=0']
+ AC_MSG_RESULT([Checking if small filter is disabled... yes])
+ fi],
+ AC_MSG_RESULT([Checking if small filter is disabled... no]))
+
+dnl # Include resampling large filter
+AC_SUBST(ac_no_large_filter)
+AC_ARG_ENABLE(large-filter,
+ AC_HELP_STRING([--disable-large-filter],
+ [Exclude large filter in resampling]),
+ [if test "$enable_large_filter" = "no"; then
+ [ac_no_large_filter='-DPJMEDIA_HAS_LARGE_FILTER=0']
+ AC_MSG_RESULT([Checking if large filter is disabled... yes])
+ fi],
+ AC_MSG_RESULT([Checking if large filter is disabled... no]))
+
+dnl # Include Speex AEC
+AC_SUBST(ac_no_speex_aec)
+AC_ARG_ENABLE(speex-aec,
+ AC_HELP_STRING([--disable-speex-aec],
+ [Exclude Speex Acoustic Echo Canceller/AEC]),
+ [if test "$enable_speex_aec" = "no"; then
+ [ac_no_speex_aec='-DPJMEDIA_HAS_SPEEX_AEC=0']
+ AC_MSG_RESULT([Checking if Speex AEC is disabled...yes])
+ fi],
+ AC_MSG_RESULT([Checking if Speex AEC is disabled...no]))
+
+dnl # Include G711 codec
+AC_SUBST(ac_no_g711_codec)
+AC_ARG_ENABLE(g711-codec,
+ AC_HELP_STRING([--disable-g711-codec],
+ [Exclude G.711 codecs from the build]),
+ [if test "$enable_g711_codec" = "no"; then
+ [ac_no_g711_codec=1]
+ AC_DEFINE(PJMEDIA_HAS_G711_CODEC,0)
+ AC_MSG_RESULT([Checking if G.711 codec is disabled...yes])
+ fi],
+ AC_MSG_RESULT([Checking if G.711 codec is disabled...no]))
+
+
+dnl # Include L16 codec
+AC_SUBST(ac_no_l16_codec)
+AC_ARG_ENABLE(l16-codec,
+ AC_HELP_STRING([--disable-l16-codec],
+ [Exclude Linear/L16 codec family from the build]),
+ [if test "$enable_l16_codec" = "no"; then
+ [ac_no_l16_codec=1]
+ AC_DEFINE(PJMEDIA_HAS_L16_CODEC,0)
+ AC_MSG_RESULT([Checking if L16 codecs are disabled...yes])
+ fi],
+ AC_MSG_RESULT([Checking if L16 codec is disabled...no]))
+
+
+dnl # Include GSM codec
+AC_SUBST(ac_no_gsm_codec)
+AC_ARG_ENABLE(gsm-codec,
+ AC_HELP_STRING([--disable-gsm-codec],
+ [Exclude GSM codec in the build]),
+ [if test "$enable_gsm_codec" = "no"; then
+ [ac_no_gsm_codec=1]
+ AC_DEFINE(PJMEDIA_HAS_GSM_CODEC,0)
+ AC_MSG_RESULT([Checking if GSM codec is disabled...yes])
+ fi],
+ AC_MSG_RESULT([Checking if GSM codec is disabled...no]))
+
+dnl # Include G.722 codec
+AC_SUBST(ac_no_g722_codec)
+AC_ARG_ENABLE(g722-codec,
+ AC_HELP_STRING([--disable-g722-codec],
+ [Exclude G.722 codec in the build]),
+ [if test "$enable_g722_codec" = "no"; then
+ [ac_no_g722_codec=1]
+ AC_DEFINE(PJMEDIA_HAS_G722_CODEC,0)
+ AC_MSG_RESULT([Checking if G.722 codec is disabled...yes])
+ fi],
+ AC_MSG_RESULT([Checking if G.722 codec is disabled...no]))
+
+dnl # Include G722.1 codec
+AC_SUBST(ac_no_g7221_codec)
+AC_ARG_ENABLE(g7221-codec,
+ AC_HELP_STRING([--disable-g7221-codec],
+ [Exclude G.7221 codec in the build]),
+ [if test "$enable_g7221_codec" = "no"; then
+ [ac_no_g7221_codec=1]
+ AC_DEFINE(PJMEDIA_HAS_G7221_CODEC,0)
+ AC_MSG_RESULT([Checking if G.722.1 codec is disabled...yes])
+ fi],
+ AC_MSG_RESULT([Checking if G.722.1 codec is disabled...no]))
+
+dnl # Include Speex codec
+AC_SUBST(ac_no_speex_codec)
+AC_ARG_ENABLE(speex-codec,
+ AC_HELP_STRING([--disable-speex-codec],
+ [Exclude Speex codecs in the build]),
+ [if test "$enable_speex_codec" = "no"; then
+ [ac_no_speex_codec=1]
+ AC_DEFINE(PJMEDIA_HAS_SPEEX_CODEC,0)
+ AC_MSG_RESULT([Checking if Speex codec is disabled...yes])
+ fi],
+ AC_MSG_RESULT([Checking if Speex codec is disabled...no]))
+
+dnl # Include iLBC codec
+AC_SUBST(ac_no_ilbc_codec)
+AC_ARG_ENABLE(ilbc-codec,
+ AC_HELP_STRING([--disable-ilbc-codec],
+ [Exclude iLBC codec in the build]),
+ [if test "$enable_ilbc_codec" = "no"; then
+ [ac_no_ilbc_codec=1]
+ AC_DEFINE(PJMEDIA_HAS_ILBC_CODEC,0)
+ AC_MSG_RESULT([Checking if iLBC codec is disabled...yes])
+ fi],
+ AC_MSG_RESULT([Checking if iLBC codec is disabled...no]))
+
+dnl # Include libsamplerate
+AC_ARG_ENABLE(libsamplerate,
+ AC_HELP_STRING([--enable-libsamplerate],
+ [Link with libsamplerate when available. Note that PJMEDIA_RESAMPLE_IMP must also be configured]),
+ [ AC_CHECK_LIB(samplerate,src_new) ],
+ AC_MSG_RESULT([Skipping libsamplerate detection])