summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-05 17:16:40 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-09 14:33:50 +0300
commit4e4d3ca931a7151402f84385781a0700a981b05d (patch)
tree9d8b86ad079c69870fc6264dd292b13f14387e27 /build.sh
parentecc0d45eab935d3800fd43dc1926b162a6b35978 (diff)
downloadhercules-4e4d3ca931a7151402f84385781a0700a981b05d.tar.gz
hercules-4e4d3ca931a7151402f84385781a0700a981b05d.tar.bz2
hercules-4e4d3ca931a7151402f84385781a0700a981b05d.tar.xz
hercules-4e4d3ca931a7151402f84385781a0700a981b05d.zip
Add way for detect what db to use mysql or mariadb.
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 784ce37ab..681aded4f 100755
--- a/build.sh
+++ b/build.sh
@@ -6,7 +6,15 @@ if [[ -z "${CMD}" ]]; then
export CMD="default"
fi
-export COMMON="--disable-lto --enable-packetver=20150000 --enable-debug=gdb --with-mysql=/usr/bin/mariadb_config"
+if [ -x "/usr/bin/mariadb_config" ]; then
+ export SQL=" --with-mysql=/usr/bin/mariadb_config"
+elif [ -x "/usr/bin/mysql_config" ]; then
+ export SQL=" --with-mysql=/usr/bin/mysql_config"
+else
+ export SQL=""
+fi
+
+export COMMON="--disable-lto --enable-packetver=20150000 --enable-debug=gdb${SQL}"
autoreconf
if [[ "${CMD}" == "default" || "${CMD}" == "all" ]]; then