22set -o errexit # Exit the script with error if any of the commands fail
33
44# 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)
107
118# Automatically retrieve the machine architecture, lowercase, unless provided
129# as an environment variable (e.g. to force 32bit)
1310[ -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 "
2812
2913# Any architecture specific configuration here
3014case " $MARCH " in
@@ -39,6 +23,9 @@ case "$MARCH" in
3923 ;;
4024esac
4125
26+ # Get the kernel name, lowercased
27+ OS=$( uname -s | tr ' [:upper:]' ' [:lower:]' )
28+ echo " OS: $OS "
4229
4330# Operating system specific tweaks
4431case " $OS " in
@@ -57,11 +44,15 @@ case "$OS" in
5744 ;;
5845esac
5946
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` "
6449
6550phpize
6651./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+
6758make
0 commit comments