-
Notifications
You must be signed in to change notification settings - Fork 18
/
configure
executable file
·62 lines (51 loc) · 1.22 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh
detect () {
cc -o /dev/null detect/detect.c $@ > /dev/null 2>&1
return $?
}
include_base=""
mariadb_connector="false"
mariadb_as_mysql="false"
if detect -lmariadb; then
include_base="mariadb"
mariadb_connector="true"
elif detect -lmariadbclient -DMARIADB_CLIENT; then
include_base="mysql"
elif detect -lmysqlclient -DMARIADB_CLIENT; then
include_base="mysql"
mariadb_as_mysql="true"
fi
if [ -z "$include_base" ]; then
echo "Could not detect a MariaDB client library" 1>&2
exit 1
fi
echo "mariadb_connector: ................................... $mariadb_connector"
echo "mariadb_include_base: ................................ $include_base"
echo "mariadb_as_mysql: .................................... $mariadb_as_mysql"
cat << EOF > setup.data
mariadb_include_base="$include_base"
mariadb_connector="$mariadb_connector"
mariadb_as_mysql="$mariadb_as_mysql"
EOF
# OASIS_START
# DO NOT EDIT (digest: dc86c2ad450f91ca10c931b6045d0499)
set -e
FST=true
for i in "$@"; do
if $FST; then
set --
FST=false
fi
case $i in
--*=*)
ARG=${i%%=*}
VAL=${i##*=}
set -- "$@" "$ARG" "$VAL"
;;
*)
set -- "$@" "$i"
;;
esac
done
ocaml setup.ml -configure "$@"
# OASIS_STOP