
name: msys2autotool

on: 
  workflow_dispatch:

permissions:
  contents: read

jobs:
 msys2_autotools:
    runs-on: windows-latest
    defaults:
      run:
        shell: msys2 {0}
    env:
      PYTHONIOENCODING: "utf-8"
    steps:
    - uses: actions/checkout@v4
    - uses: msys2/setup-msys2@v2
      with:
        msystem: MINGW64
        update: true
        install: base-devel git autoconf automake libtool mingw-w64-x86_64-toolchain mingw-w64-x86_64-zlib
    - name: Configure
      run: autoreconf -vif && ./configure --disable-static --enable-shared
    - name: Build
      run:  make
    - name: Check
      run:  make check
    - name: Distcheck
      run: make distcheck DISTCHECK_CONFIGURE_FLAGS="--disable-static --enable-shared"
