Add configure and make script

This commit is contained in:
Ugljesa Jovanovic authored and Ugljesa Jovanovic committed 2020-05-28 23:02:30 +02:00
1 parent 55007cb911
commit 1a4c07b961
3 files changed
+32 -2

No files matched your search

Vendored Executable
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
## and then borrowed and slightly modified from https://github.com/datkt/sodium/configure
## borrowed from https://github.com/sodium-friends/sodium-native/blob/master/configure
PREFIX="${PREFIX:-$PWD}"
KONAN="${KONAN:-$HOME/.konan}"
ARCH=${ARCH:-$(uname -m)}
cd libsodium
./autogen.sh -s -f
if [ -z "$SYSROOT" ]; then
case $(uname -a) in
**Linux*x86_64**)
GCC=${GCC:-gcc}
GCC=gcc
;;
**Darwin*x86_64**)
GCC=${GCC:-clang}
;;
esac
export CC=$(find $KONAN/dependencies -wholename *${ARCH/_/-}/bin/*$GCC | head -n1)
fi
./configure --prefix=$PREFIX "$@"