$ brew install gmp
NOTE. If you use bison 2.x which come with OSX, it will fail to build "settings_parser.y", so please ensure the bison is version 3.x by "bison -V".
To install the new bison and make it will be executed in building process, you can do:
$ brew install bison
$ brew link bison --force
$ source ~/.bash_profile
For building in OSX, try to put the source in case-insensitive filesystem (the default filesystem), or when use the Android Studio to build the app, it will complains the file system setting is not the same as IDE.
# Make source folder
$ git clone https://github.com/Ed-Yang/strongswan-android.git
$ cd strongswan-android
# Get strongswan latest source
$ git clone git://git.strongswan.org/strongswan.git
$ export SS_HOME=`pwd`/strongswan
$ cd ./strongswan/src/frontends/android/app/src/main/jni
# Get boringssl source
$ git clone git://git.strongswan.org/android-ndk-boringssl.git -b ndk-static openssl
or
# Get openssl source (NOT WORK !!!!)
$ git clone git://git.strongswan.org/android-ndk-openssl.git -b ndk-static openssl
$ cd ${SS_HOME}
# See Alexandre Duret Lutz's Autotools tutorial for aclocal (I did not read....)
$ aclocal -I m4
$ ./autogen.sh
$ ./configure
$ make dist
Done
Take a note, if we want to clean the source tree:
$ make maintainer-clean
#APP_ABI := armeabi arm64-v8a x86 x86_64 mips mips64
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
$ cd ${SS_HOME}/src/frontends/android/app/src/main/jni
$ ~/Library/Android/sdk/ndk-bundle/ndk-build
Edward Yang, June 16, 2018.