1name: ./configure
2inputs:
3  configurationParameters:
4    default: ''
5    required: false
6runs:
7  using: composite
8  steps:
9    - shell: bash
10      run: |
11        set -x
12        BREW_OPT="$(brew --prefix)"/opt
13        export PATH="/usr/local/opt/bison/bin:$PATH"
14        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl@1.1/lib/pkgconfig"
15        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/curl/lib/pkgconfig"
16        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/krb5/lib/pkgconfig"
17        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig"
18        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig"
19        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxslt/lib/pkgconfig"
20        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/zlib/lib/pkgconfig"
21        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/icu4c/lib/pkgconfig"
22        sed -i -e 's/Requires.private:.*//g' "$BREW_OPT/curl/lib/pkgconfig/libcurl.pc"
23        ./buildconf --force
24        ./configure \
25          CFLAGS="-Wno-strict-prototypes -Wno-unused-but-set-variable -Wno-single-bit-bitfield-constant-conversion" \
26          --enable-option-checking=fatal \
27          --prefix=/usr/local \
28          --enable-fpm \
29          --with-pdo-mysql=mysqlnd \
30          --with-mysqli=mysqlnd \
31          --with-pgsql=/usr/local/opt/libpq \
32          --with-pdo-pgsql=/usr/local/opt/libpq \
33          --with-pdo-sqlite \
34          --without-pear \
35          --enable-gd \
36          --with-jpeg \
37          --with-webp \
38          --with-freetype \
39          --enable-exif \
40          --with-zip \
41          --with-zlib \
42          --enable-soap \
43          --enable-xmlreader \
44          --with-xsl \
45          --with-tidy=/usr/local/opt/tidy-html5 \
46          --with-libxml \
47          --enable-sysvsem \
48          --enable-sysvshm \
49          --enable-shmop \
50          --enable-pcntl \
51          --with-readline=/usr/local/opt/readline \
52          --enable-mbstring \
53          --with-curl \
54          --with-gettext=/usr/local/opt/gettext \
55          --enable-sockets \
56          --with-bz2=/usr/local/opt/bzip2 \
57          --with-openssl \
58          --with-gmp=/usr/local/opt/gmp \
59          --with-iconv=/usr/local/opt/libiconv \
60          --enable-bcmath \
61          --enable-calendar \
62          --enable-ftp \
63          --with-pspell=/usr/local/opt/aspell \
64          --with-kerberos \
65          --enable-sysvmsg \
66          --with-ffi \
67          --enable-zend-test \
68          --enable-dl-test=shared \
69          --enable-intl \
70          --with-mhash \
71          --with-sodium \
72          --enable-dba \
73          --enable-werror \
74          --with-config-file-path=/etc \
75          --with-config-file-scan-dir=/etc/php.d \
76          ${{ inputs.configurationParameters }}
77