This article describes the steps to generate pjsip on Mac OS X 10.5.5
Get PjSIP from subversion repository:
svn checkout http
:
//svn.pjsip.org/repos/pjproject/trunk pjproject
In aconfigure.ac file add the lines below displayed with '+'. Of course copy without '+' ;-)
if test "$enable_sound" = "no" ; then
true ;
else
case $target in
+ arm - apple - darwin *)
+ LIBS = "$LIBS -framework CoreAudio -framework CoreFoundation -framework AudioToolbox"
+ ac_pjmedia_snd = iphone
+ AC_MSG_RESULT ([ Checking sound device backend ... AudioQueue ])
+ ;;
* darwin *)
LIBS = "$LIBS -framework CoreAudio -framework CoreServices -framework AudioUnit -framework AudioToolbox"
if test "`uname -r`" = "6.8" ; then
In rules.mak modify, remove lines with '-' and add lines with '+':
$ ( LIB ): $ ( OBJDIRS ) $ ( OBJS ) $ ( $ ( APP ) _EXTRA_DEP )
if test ! - d $ ( LIBDIR ); then $ ( subst @@, $ ( subst /, $ ( HOST_PSEP ), $ ( LIBDIR )), $ ( HOST_MKDIR )); fi
- $ ( AR ) $ ( LIB ) $ ( OBJS )
- $ ( RANLIB ) $ ( LIB )
+ $ ( RANLIB ) - static - o $ ( LIB ) $ ( OBJS )
In os_darwinos.h find and comment the following lines :
/*
* Socket related
*/
//typedef int socklen_t;
Without this, you will get an error when you will compile, because socklen_t is redefined.
It can be necessary to define some macro. For example :
#undef PJ_HAS_FLOATING_POINT
#define PJ_HAS_FLOATING_POINT 1
/* SRTP has not been ported to iPhone yet */
# undef PJMEDIA_HAS_SRTP
# define PJMEDIA_HAS_SRTP 0
/* Disable some codecs for now */
# define PJMEDIA_HAS_GSM_CODEC 1
# define PJMEDIA_HAS_L16_CODEC 0
# define PJMEDIA_HAS_ILBC_CODEC 0
# define PJMEDIA_HAS_SPEEX_CODEC 0
# define PJMEDIA_HAS_G722_CODEC 0
In os-auto.mak.in , add the line with '+'
# - ds: Win32 DirectSound (dsound.c)
+ # - iphone: iPhone AudioQueue (iphonesound.c)
# - null: Null sound device (nullsound.c)
Add the line below, for example between "Win 32 Direct Sound" and " Null Sound Device"
#
# iPod/iPhone
#
ifeq ( $ ( AC_PJMEDIA_SND ), iphone )
export SOUND_OBJS = iphonesound . o
export CFLAGS += - DPJMEDIA_SOUND_IMPLEMENTATION = PJMEDIA_SOUND_IPHONE_SOUND
endif
We have defined a new target for sound device.
in config.h add the lines below with '+':
/** Constant for Win32 MME sound backend. */
#define PJMEDIA_SOUND_WIN32_MME_SOUND 3
+ /** Constant for AudioQueue sound backend. */
+ #define PJMEDIA_SOUND_IPHONE_SOUND 4
For the moment I didn't upload iphonesound.c so we need to compile with null_sound.
Generate configuration script
autoconf aconfigure . ac > aconfigure
iPhone SDK doesn't provide some programs without version number, so we create symbolic link. We should test before create link, but we are very lazy. Copy the lines below in file with name like compile.sh in the root of pjsip.
#!/bin/sh
export DEV = /Developer/ Platforms / iPhoneOS . platform / Developer
export SDK = $ { DEV }/ SDKs / iPhoneOS2 . 1.sdk
pushd $ { DEV }/ usr / bin
ln - s arm - apple - darwin9 - gcc - 4.0 . 1 arm - apple - darwin9 - gcc
ln - s arm - apple - darwin9 - g ++- 4.0 . 1 arm - apple - darwin9 - g ++
ln - s ranlib arm - apple - darwin9 - ranlib
popd
export PATH = $ { DEV }/ usr / bin : $ { PATH }
export CFLAGS = "-O2 -arch armv6 -isysroot ${SDK}"
export LDFLAGS = "-O2 -arch armv6 -isysroot ${SDK}"
export CPP = "${DEV}/usr/bin/cpp"
./ aconfigure -- host = arm - apple - darwin9 -- disable - speex - aec /
-- disable - speex - codec -- disable - l16 - codec -- disable - g722 - codec /
-- disable - ilbc - codec -- disable - ssl -- disable - sound
make dep
make
We must not forget to change access right to allow execution. We can run compile.sh after some minutes pjsip is compiled.
Get Siphon from subversion repository:
svn checkout http : //siphon.googlecode.com/svn/trunk/ siphon-read-only
Create directory to install pjsip in Siphon:
mkdir - p pjsip / include
mkdir - p pjsip / lib
Put these pjsip include directories in the pjsip/include path:
Put these pjsip library directories in the pjsip/lib path:
pushd settings
make
popd
pushd src
make
popd
For installation read the Manual .
The preferred method of installing Siphon is through the AppTapp Installer . However, if you are unable to or prefer not to use the Installer, you can follow the steps below to install Siphon manually.
NOTE: Siphon requires firmware version 1.1.X.
The three directories are in 'dist' directory.
Next, run the following command to complete the installation:
/Applications/ Siphon . app / Siphon -- installPrefBundle
Finally, restart the SpringBoard:
killall SpringBoard