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="$BREW_OPT/bison/bin:$PATH"
14        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/openssl@1.1/lib/pkgconfig"
15        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/curl/lib/pkgconfig"
16        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/libffi/lib/pkgconfig"
17        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/libxml2/lib/pkgconfig"
18        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/libxslt/lib/pkgconfig"
19        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/zlib/lib/pkgconfig"
20        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/icu4c/lib/pkgconfig"
21        sed -i -e 's/Requires.private:.*//g' "$BREW_OPT/curl/lib/pkgconfig/libcurl.pc"
22        ./buildconf --force
23        ./configure \
24          --enable-option-checking=fatal \
25          --prefix=/usr/local \
26          --enable-fpm \
27          --with-pdo-mysql=mysqlnd \
28          --with-mysqli=mysqlnd \
29          --with-pgsql="$BREW_OPT"/libpq \
30          --with-pdo-pgsql="$BREW_OPT"/libpq \
31          --with-pdo-sqlite \
32          --without-pear \
33          --enable-gd \
34          --with-jpeg \
35          --with-webp \
36          --with-freetype \
37          --enable-exif \
38          --with-zip \
39          --with-zlib \
40          --enable-soap \
41          --enable-xmlreader \
42          --with-xsl \
43          --with-tidy="$BREW_OPT"/tidy-html5 \
44          --with-libxml \
45          --enable-sysvsem \
46          --enable-sysvshm \
47          --enable-shmop \
48          --enable-pcntl \
49          --with-readline="$BREW_OPT"/readline \
50          --enable-mbstring \
51          --with-curl \
52          --with-gettext="$BREW_OPT"/gettext \
53          --enable-sockets \
54          --with-bz2="$BREW_OPT"/bzip2 \
55          --with-openssl \
56          --with-gmp="$BREW_OPT"/gmp \
57          --with-iconv="$BREW_OPT"/libiconv \
58          --enable-bcmath \
59          --enable-calendar \
60          --enable-ftp \
61          --enable-sysvmsg \
62          --with-ffi \
63          --enable-zend-test \
64          --enable-dl-test=shared \
65          --enable-intl \
66          --with-mhash \
67          --with-sodium \
68          --enable-dba \
69          --enable-werror \
70          --with-config-file-path=/etc \
71          --with-config-file-scan-dir=/etc/php.d \
72          ${{ inputs.configurationParameters }}
73