mirror of
https://github.com/litespeedtech/openlitespeed.git
synced 2026-06-19 07:37:10 +00:00
da2bd3c78a
https://github.com/litespeedtech/third-party/commit/fdd896b34476cdff81e6bd5764347e611d50268a
49 lines
1.1 KiB
Bash
Executable File
49 lines
1.1 KiB
Bash
Executable File
#! /bin/sh
|
|
|
|
cd `dirname "$0"`
|
|
CURDIR=`pwd`
|
|
|
|
echo "Checking libmaxminddb ..."
|
|
|
|
DLCMD=
|
|
source dist/functions.sh 2>/dev/null
|
|
if [ $? != 0 ] ; then
|
|
. dist/functions.sh
|
|
if [ $? != 0 ] ; then
|
|
echo [ERROR] Can not include 'functions.sh'.
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
|
|
VERSION=1.5.2
|
|
URL=https://github.com/maxmind/libmaxminddb/archive/$VERSION.tar.gz
|
|
|
|
if [ ! -f "libmaxminddb/src/.libs/libmaxminddb.a" ] ; then
|
|
|
|
detectdlcmd
|
|
echo -e "\033[38;5;148mDownloading libmaxminddb version $VERSION and building, it will take several minutes ...\033[39m"
|
|
|
|
$DLCMD mmdb.tgz $URL
|
|
tar xf mmdb.tgz
|
|
mv libmaxminddb-$VERSION ../libmaxminddb
|
|
cd ../libmaxminddb
|
|
|
|
./bootstrap
|
|
./configure --disable-tests
|
|
make
|
|
|
|
if [ ! -f "src/.libs/libmaxminddb.a" ] ; then
|
|
echo -e "\033[38;5;148mError: failed to make libmaxminddb library.\033[39m"
|
|
exit 1
|
|
else
|
|
echo -e "\033[38;5;148mGood, libmaxminddb made.\033[39m"
|
|
cd ..
|
|
mv libmaxminddb $CURDIR/
|
|
exit 0
|
|
fi
|
|
else
|
|
echo -e "\033[38;5;148mlibmaxminddb library exist.\033[39m"
|
|
exit 0
|
|
fi
|