2
2
set -o errexit # Exit the script with error if any of the commands fail
3
3
4
4
# Supported/used environment variables:
5
- # MARCH Machine Architecture. Defaults to lowercase uname -m
6
- # RELEASE Use the fully qualified release archive
7
-
8
- RELEASE=${RELEASE:- no}
9
-
5
+ # MARCH Machine Architecture. Defaults to lowercase uname -m
6
+ # LIBMONGOC_VERSION Optional libmongoc version (regenerate version file if set)
10
7
11
8
# Automatically retrieve the machine architecture, lowercase, unless provided
12
9
# as an environment variable (e.g. to force 32bit)
13
10
[ -z " $MARCH " ] && MARCH=$( uname -m | tr ' [:upper:]' ' [:lower:]' )
14
-
15
- # Get the kernel name, lowercased
16
- OS=$( uname -s | tr ' [:upper:]' ' [:lower:]' )
17
- echo " OS: $OS "
18
-
19
- # --strip-components is an GNU tar extension. Check if the platform
20
- # (e.g. Solaris) has GNU tar installed as `gtar`, otherwise we assume to be on
21
- # platform that supports it
22
- # command -v returns success error code if found and prints the path to it
23
- if command -v gtar 2> /dev/null; then
24
- TAR=gtar
25
- else
26
- TAR=tar
27
- fi
11
+ echo " MARCH: $MARCH "
28
12
29
13
# Any architecture specific configuration here
30
14
case " $MARCH " in
@@ -39,6 +23,9 @@ case "$MARCH" in
39
23
;;
40
24
esac
41
25
26
+ # Get the kernel name, lowercased
27
+ OS=$( uname -s | tr ' [:upper:]' ' [:lower:]' )
28
+ echo " OS: $OS "
42
29
43
30
# Operating system specific tweaks
44
31
case " $OS " in
@@ -57,11 +44,15 @@ case "$OS" in
57
44
;;
58
45
esac
59
46
60
- echo " MARCH: $MARCH "
61
- echo " RELEASE: $RELEASE "
62
- echo " OS: $OS "
63
- echo " PHP: $PHP_VERSION (` php --version | head -1` )"
47
+ # Report the current PHP version
48
+ echo " PHP: ` php --version | head -1` "
64
49
65
50
phpize
66
51
./configure --enable-mongodb-developer-flags
52
+
53
+ # If we're testing a specific version of libmongoc, regenerate the version file
54
+ if [ -n " $LIBMONGOC_VERSION " ]; then
55
+ make libmongoc-version-current
56
+ fi
57
+
67
58
make
0 commit comments