xref: /PHP-8.2/travis/compile.sh (revision f07a08df)
1#!/bin/bash
2set -ex
3if [[ "$ENABLE_ZTS" == 1 ]]; then
4	TS="--enable-zts";
5else
6	TS="";
7fi
8if [[ "$ENABLE_DEBUG" == 1 ]]; then
9	DEBUG="--enable-debug";
10else
11	DEBUG="";
12fi
13if [[ "$S390X" == 1 ]]; then
14	S390X_CONFIG="--without-pcre-jit";
15else
16	S390X_CONFIG="";
17fi
18
19./buildconf --force
20./configure \
21--enable-option-checking=fatal \
22--prefix="$HOME"/php-install \
23$CONFIG_QUIET \
24$DEBUG \
25$TS \
26$S390X_CONFIG \
27--enable-phpdbg \
28--enable-fpm \
29--with-pdo-mysql=mysqlnd \
30--with-mysqli=mysqlnd \
31--with-pgsql \
32--with-pdo-pgsql \
33--with-pdo-sqlite \
34--enable-intl \
35--without-pear \
36--enable-gd \
37--with-jpeg \
38--with-webp \
39--with-freetype \
40--with-xpm \
41--enable-exif \
42--with-zip \
43--with-zlib \
44--with-zlib-dir=/usr \
45--enable-soap \
46--enable-xmlreader \
47--with-xsl \
48--with-tidy \
49--enable-sysvsem \
50--enable-sysvshm \
51--enable-shmop \
52--enable-pcntl \
53--with-readline \
54--enable-mbstring \
55--with-curl \
56--with-gettext \
57--enable-sockets \
58--with-bz2 \
59--with-openssl \
60--with-gmp \
61--enable-bcmath \
62--enable-calendar \
63--enable-ftp \
64--with-pspell=/usr \
65--with-enchant=/usr \
66--with-kerberos \
67--enable-sysvmsg \
68--with-ffi \
69--with-sodium \
70--enable-zend-test=shared \
71--enable-dl-test=shared \
72--enable-werror \
73--with-pear
74
75if [[ -z "$CONFIG_ONLY" ]]; then
76	MAKE_JOBS=${MAKE_JOBS:-$(nproc)}
77	make "-j${MAKE_JOBS}" $MAKE_QUIET
78	make install
79fi
80