The error you're getting:
> /linphone-iphone/submodules/build/..//externals/exosip/configure: line 12616: syntax error near unexpected token `OSIP,'
> /linphone-iphone/submodules/build/..//externals/exosip/configure: line 12616: `PKG_CHECK_MODULES(OSIP, libosip2 >= 3.4
indicates a problem with the generation of the configure script. The configure script is generated by autoconf, using configure.ac (or configure.in).
PKG_CHECK_MODULES is an m4 macro which should be substituted into the configure script, but autoconf cannot find the definition, so it leaves it undefined. The macro is part of pkg-config. If pkg-config is installed on your system, it should have put a
file called pkg.m4 somewhere that autotools would find it, like /usr/share/aclocal/. You could check to see if there is a copy of pkg.m4 on your system, and you could try putting it in a different place so that autoconf will use it wihile generating the configure
script.
I experienced this problem a lot while trying to build linphone on win32-mingw. It's just a matter of having a properly set-up build environment.