mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-06 09:40:41 +03:00
52 lines
1.4 KiB
Bash
Executable File
52 lines
1.4 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
echo '---------------------------------------------------------------------'
|
|
echo 'SoftEther VPN for Unix'
|
|
echo
|
|
echo 'Copyright (c) all contributors on SoftEther VPN project in GitHub.'
|
|
echo 'Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.'
|
|
echo
|
|
echo 'Licensed under the Apache License, Version 2.0 (the License).'
|
|
echo
|
|
echo 'Read and understand README, LICENSE and WARNING before use.'
|
|
echo '---------------------------------------------------------------------'
|
|
echo
|
|
|
|
echo 'Welcome to the corner-cutting configure script !'
|
|
echo
|
|
|
|
if [ ! -d "tmp" ]; then
|
|
mkdir tmp
|
|
fi
|
|
|
|
if [ ! -z ${CMAKE_INSTALL_PREFIX+x} ]; then
|
|
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}"
|
|
fi
|
|
|
|
if [ -z ${OPENSSL_ROOT_DIR} ]; then
|
|
unameOut="$(uname -s)"
|
|
if [ "$unameOut" = "Darwin" ]; then
|
|
echo "Environment variable OPENSSL_ROOT_DIR not set, using default Homebrew path: /usr/local/opt/openssl/"
|
|
export OPENSSL_ROOT_DIR="/usr/local/opt/openssl/"
|
|
fi
|
|
fi
|
|
|
|
if [ -x "$(command -v rpm)" ]; then
|
|
echo "'rpm' executable found, CPack will generate RPM packages."
|
|
CMAKE_FLAGS="-DCPACK_GENERATOR='RPM' ${CMAKE_FLAGS}"
|
|
else
|
|
echo "'rpm' executable not found, CPack will generate DEB packages."
|
|
CMAKE_FLAGS="-DCPACK_GENERATOR='DEB' ${CMAKE_FLAGS}"
|
|
fi
|
|
|
|
echo ""
|
|
|
|
(cd tmp && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_FLAGS} .. || exit 1)
|
|
|
|
|
|
echo ""
|
|
|
|
echo "The Makefile is generated. Run 'make -C tmp' to build SoftEther VPN."
|