This page describes how to build PTLib revision 2.8.x (Sirius) or later as of 8 April 2010 Earlier versions of PTLib had only partial MacOSX support and may required patches
Building PTLib from source is almost to identical to building from source on other Unix platforms
There are additional prerequisites and OSX-specific features to be aware of.
You will need the following.
brew install autoconf automake expat openssl openldap unixodbc lua v8 sdl2 ffmpeg gstreamer imagemagick wxwidgets@3.0
Set the PTLIBDIR environment variable to point to srcdir as follows. This allows other libraries that use PTLib to find the code without using pkg-config.
IMPORTANT: you must set the environment variable before executing the configure script or the system will get very confused.
It is also necessary to set the DYLD_LIBRARY_PATH environment variable so that programs can find the PTLib libraries at link or run time. If you are using plugins, the PTLIBPLUGINDIR environment variable also must be set to the location of the compiled plugins. Finally, it is usually the case that pkg-manager needs to know where PTLib is too. Thus, typically it is:
export PTLIBDIR=$HOME/Wherever/ptlib export DYLD_LIBRARY_PATH=${PTLIBDIR}/lib_Darwin_`uname -p` export PTLIBPLUGINDIR=${PTLIBDIR}/lib_Darwin_`uname -p`/devices export PKG_CONFIG_PATH=${PTLIBDIR}:/opt/homebrew/opt/openssl@1.1/lib/pkgconfig:/opt/homebrew/opt/openldap/lib/pkgconfig
Once this is done, you can build the system by simply going:
cd $PTLIBDIR make