SDL: remove autotools build system

From 7b21eaddce4fb80f94e7ac54744edc9cdb733c36 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Thu, 24 Nov 2022 17:50:00 +0300
Subject: [PATCH] remove autotools build system

- TODO: update INSTALL.txt to replace the autotools configure
        instructions with cmake.
- TODO: update make build system to provide an equivalent to
        autotools' `make dist` ?
- TODO: update / revise github actions, replace autotools-only
        ones with cmake (e.g.: vmactions.yml for FreeBSD.)

Reference issue: https://github.com/libsdl-org/SDL/issues/6571
---
 .github/workflows/main.yml                |   108 +-
 .github/workflows/riscos.yml              |    19 -
 Makefile.in                               |   262 -
 acinclude/ac_check_define.m4              |    14 -
 acinclude/alsa.m4                         |   144 -
 acinclude/ax_check_compiler_flags.m4      |    76 -
 acinclude/ax_compute_relative_paths.m4    |   173 -
 acinclude/ax_gcc_archflag.m4              |   215 -
 acinclude/ax_gcc_x86_cpuid.m4             |    79 -
 acinclude/ax_normalize_path.m4            |   115 -
 acinclude/ax_recursive_eval.m4            |    56 -
 acinclude/libtool.m4                      |  8386 ------
 acinclude/ltoptions.m4                    |   437 -
 acinclude/ltsugar.m4                      |   124 -
 acinclude/ltversion.m4                    |    23 -
 acinclude/lt~obsolete.m4                  |    99 -
 acinclude/pkg.m4                          |   275 -
 autogen.sh                                |    21 -
 build-scripts/checker-buildbot.sh         |    62 -
 build-scripts/clang++-fat.sh              |   102 -
 build-scripts/clang-fat.sh                |   105 -
 build-scripts/config.guess                |  1768 --
 build-scripts/config.sub                  |  1890 --
 build-scripts/emscripten-buildbot.sh      |    76 -
 build-scripts/install-sh                  |   541 -
 build-scripts/ltmain.sh                   | 11181 -------
 build-scripts/raspberrypi-buildbot.sh     |    58 -
 build-scripts/test-versioning.sh          |    22 -
 build-scripts/update-version.sh           |     7 -
 build-scripts/windows-buildbot-zipper.bat |    28 -
 configure                                 | 31430 --------------------
 configure.ac                              |  4544 ---
 include/SDL_config.h.in                   |   468 -
 test/Makefile.in                          |   445 -
 test/acinclude.m4                         |   337 -
 test/autogen.sh                           |     9 -
 test/configure                            |  6092 ----
 test/configure.ac                         |   276 -
 38 files changed, 4 insertions(+), 70063 deletions(-)
 delete mode 100644 Makefile.in
 delete mode 100644 acinclude/ac_check_define.m4
 delete mode 100644 acinclude/alsa.m4
 delete mode 100644 acinclude/ax_check_compiler_flags.m4
 delete mode 100644 acinclude/ax_compute_relative_paths.m4
 delete mode 100644 acinclude/ax_gcc_archflag.m4
 delete mode 100644 acinclude/ax_gcc_x86_cpuid.m4
 delete mode 100644 acinclude/ax_normalize_path.m4
 delete mode 100644 acinclude/ax_recursive_eval.m4
 delete mode 100644 acinclude/libtool.m4
 delete mode 100644 acinclude/ltoptions.m4
 delete mode 100644 acinclude/ltsugar.m4
 delete mode 100644 acinclude/ltversion.m4
 delete mode 100644 acinclude/lt~obsolete.m4
 delete mode 100644 acinclude/pkg.m4
 delete mode 100755 autogen.sh
 delete mode 100755 build-scripts/checker-buildbot.sh
 delete mode 100755 build-scripts/clang++-fat.sh
 delete mode 100755 build-scripts/clang-fat.sh
 delete mode 100755 build-scripts/config.guess
 delete mode 100755 build-scripts/config.sub
 delete mode 100755 build-scripts/emscripten-buildbot.sh
 delete mode 100755 build-scripts/install-sh
 delete mode 100644 build-scripts/ltmain.sh
 delete mode 100755 build-scripts/raspberrypi-buildbot.sh
 delete mode 100644 build-scripts/windows-buildbot-zipper.bat
 delete mode 100755 configure
 delete mode 100644 configure.ac
 delete mode 100644 include/SDL_config.h.in
 delete mode 100644 test/Makefile.in
 delete mode 100644 test/acinclude.m4
 delete mode 100755 test/autogen.sh
 delete mode 100755 test/configure
 delete mode 100644 test/configure.ac

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index a705d2c69262..d174e79586d0 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -20,12 +20,9 @@ jobs:
         - { name: Windows (clang32),        os: windows-latest, shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686 }
         - { name: Windows (clang64),        os: windows-latest, shell: 'msys2 {0}', msystem: clang64, msys-env: mingw-w64-clang-x86_64 }
         - { name: Windows (ucrt64),         os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64,  msys-env: mingw-w64-ucrt-x86_64 }
-        - { name: Ubuntu 20.04 (CMake),     os: ubuntu-20.04,   shell: sh }
-        - { name: Ubuntu 20.04 (autotools), os: ubuntu-20.04,   shell: sh,    autotools: true }
-        - { name: Ubuntu 22.04 (CMake),     os: ubuntu-22.04,   shell: sh }
-        - { name: Ubuntu 22.04 (autotools), os: ubuntu-22.04,   shell: sh,    autotools: true }
-        - { name: MacOS (CMake),            os: macos-latest,   shell: sh,    cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"' }
-        - { name: MacOS (autotools),        os: macos-latest,   shell: sh,    autotools: true }
+        - { name: Ubuntu 20.04,             os: ubuntu-20.04,   shell: sh }
+        - { name: Ubuntu 22.04,             os: ubuntu-22.04,   shell: sh }
+        - { name: MacOS,                    os: macos-latest,   shell: sh,    cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"' }
 
     steps:
     - name: Set up MSYS2
@@ -63,10 +60,9 @@ jobs:
     - uses: actions/checkout@v3
     - name: Check that versioning is consistent
       # We only need to run this once: arbitrarily use the Linux/CMake build
-      if: "runner.os == 'Linux' && ! matrix.platform.autotools"
+      if: "runner.os == 'Linux'"
       run: ./build-scripts/test-versioning.sh
     - name: Configure (CMake)
-      if: "! matrix.platform.autotools"
       run: |
         cmake -S . -B build -G Ninja \
         -DSDL_TESTS=ON \
@@ -77,11 +73,9 @@ jobs:
         -DCMAKE_BUILD_TYPE=Release \
         ${{ matrix.platform.cmake }}
     - name: Build (CMake)
-      if: "! matrix.platform.autotools"
       run: |
         cmake --build build/ --config Release --verbose --parallel
     - name: Run build-time tests (CMake)
-      if: "! matrix.platform.autotools"
       run: |
         set -eu
         export SDL_TESTS_QUICK=1
@@ -91,76 +85,11 @@ jobs:
           strings build/libSDL3.so.0 | grep SDL-
         fi
     - name: Install (CMake)
-      if: "! matrix.platform.autotools"
       run: |
         set -eu
         cmake --install build/ --config Release
         echo "SDL3_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
         ( cd cmake_prefix; find . ) | LC_ALL=C sort -u
-    - name: Configure (Autotools)
-      if: matrix.platform.autotools
-      run: |
-        set -eu
-        rm -fr build-autotools
-        mkdir build-autotools
-        ./autogen.sh
-        (
-          cd build-autotools
-          ${{ github.workspace }}/configure \
-            --enable-vendor-info="Github Workflow" \
-            --enable-werror \
-            --prefix=${{ github.workspace }}/autotools_prefix \
-        )
-        if test "${{ runner.os }}" != "macOS" ; then
-          curdir="$(pwd)"
-          multiarch="$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
-          (
-            mkdir -p build-autotools/test
-            cd build-autotools/test
-            ${{ github.workspace }}/test/configure \
-              --enable-werror \
-              --x-includes=/usr/include \
-              --x-libraries="/usr/lib/${multiarch}" \
-              --prefix=${{ github.workspace }}/autotools_prefix \
-              SDL_CFLAGS="-I${curdir}/include" \
-              SDL_LIBS="-L${curdir}/build-autotools/build/.libs -lSDL3" \
-              ac_cv_lib_SDL3_ttf_TTF_Init=no \
-              ${NULL+}
-          )
-        fi
-    - name: Build (Autotools)
-      if: matrix.platform.autotools
-      run: |
-        set -eu
-        parallel="$(getconf _NPROCESSORS_ONLN)"
-        make -j"${parallel}" -C build-autotools V=1
-        if test "${{ runner.os }}" != "macOS" ; then
-          make -j"${parallel}" -C build-autotools/test V=1
-        fi
-    - name: Run build-time tests (Autotools)
-      if: ${{ matrix.platform.autotools && (runner.os != 'macOS') }}
-      run: |
-        set -eu
-        curdir="$(pwd)"
-        parallel="$(getconf _NPROCESSORS_ONLN)"
-        export SDL_TESTS_QUICK=1
-        make -j"${parallel}" -C build-autotools/test check LD_LIBRARY_PATH="${curdir}/build-autotools/build/.libs"
-        if test "${{ runner.os }}" = "Linux"; then
-          # This should show us the SDL_REVISION
-          strings "${curdir}/build-autotools/build/.libs/libSDL3.so.0" | grep SDL-
-        fi
-    - name: Install (Autotools)
-      if: matrix.platform.autotools
-      run: |
-        set -eu
-        curdir="$(pwd)"
-        parallel="$(getconf _NPROCESSORS_ONLN)"
-        make -j"${parallel}" -C build-autotools install V=1
-        if test "${{ runner.os }}" != "macOS" ; then
-          make -j"${parallel}" -C build-autotools/test install V=1
-        fi
-        ( cd autotools_prefix; find . ) | LC_ALL=C sort -u
-        echo "SDL3_DIR=$(pwd)/autotools_prefix" >> $GITHUB_ENV
     - name: Verify CMake configuration files
       run: |
         cmake -S cmake/test -B cmake_config_build -G Ninja \
@@ -175,32 +104,3 @@ jobs:
       run: |
         export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
         cmake/test/test_pkgconfig.sh
-    - name: Distcheck (Autotools)
-      if: matrix.platform.autotools
-      run: |
-        set -eu
-        parallel="$(getconf _NPROCESSORS_ONLN)"
-        make -j"${parallel}" -C build-autotools dist V=1
-        # Similar to Automake `make distcheck`: check that the tarball
-        # release is sufficient to do a new build
-        mkdir distcheck
-        tar -C distcheck -zxf build-autotools/SDL3-*.tar.gz
-        ( cd distcheck/SDL3-* && ./configure )
-        make -j"${parallel}" -C distcheck/SDL3-*
-    - name: Run installed-tests (Autotools)
-      if: "runner.os == 'Linux' && matrix.platform.autotools"
-      run: |
-        set -eu
-        parallel="$(getconf _NPROCESSORS_ONLN)"
-        sudo make -j"${parallel}" -C build-autotools install
-        sudo make -j"${parallel}" -C build-autotools/test install
-        export SDL_TESTS_QUICK=1
-        # We need to set LD_LIBRARY_PATH because it isn't in the default
-        # linker search path. We don't need to set XDG_DATA_DIRS for
-        # ginsttest-runner, because /usr/local/share *is* in the default
-        # search path for that.
-        env --chdir=/ \
-            LD_LIBRARY_PATH=/usr/local/lib \
-            SDL_AUDIODRIVER=dummy \
-            SDL_VIDEODRIVER=dummy \
-            ginsttest-runner --tap SDL3
diff --git a/.github/workflows/riscos.yml b/.github/workflows/riscos.yml
index 2f4aca27d7c9..9317ce4466cb 100644
--- a/.github/workflows/riscos.yml
+++ b/.github/workflows/riscos.yml
@@ -12,31 +12,12 @@ jobs:
       fail-fast: false
       matrix:
         platform:
-          - { name: autotools, test_args: '-DTEST_SHARED=FALSE' } # FIXME: autotools should build and install shared libraries
           - { name: CMake }
 
     steps:
     - name: Setup dependencies
       run: apt-get update && apt-get install -y cmake ninja-build
     - uses: actions/checkout@v3
-    - name: Configure (autotools)
-      if: ${{ contains(matrix.platform.name, 'autotools') }}
-      run: |
-        mkdir build_autotools
-        cd build_autotools
-        ../configure \
-          --host=arm-unknown-riscos \
-          --disable-gcc-atomics \
-          --prefix=${{ github.workspace }}/prefix_autotools
-    - name: Build (autotools)
-      if: ${{ contains(matrix.platform.name, 'autotools') }}
-      run: make -C build_autotools -j`nproc` V=1
-    - name: Install (autotools)
-      if: ${{ contains(matrix.platform.name, 'autotools') }}
-      run: |
-        echo "SDL3_DIR=${{ github.workspace }}/prefix_autotools" >> $GITHUB_ENV
-        make -C build_autotools install
-        ( cd ${{ github.workspace }}/prefix_autotools; find ) | LC_ALL=C sort -u
     - name: Configure (CMake)
       if: ${{ contains(matrix.platform.name, 'CMake') }}
       run: |
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644
index 490a2b37b6be..000000000000
--- a/Makefile.in
+++ /dev/null
@@ -1,262 +0,0 @@
-# Makefile to build and install the SDL library
-
-top_builddir = .
-srcdir  = @srcdir@
-objects = build
-gen = gen
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir	= @bindir@
-libdir  = @libdir@
-includedir = @includedir@
-datarootdir = @datarootdir@
-datadir	= @datadir@
-auxdir	= @ac_aux_dir@
-distpath = $(srcdir)/..
-distdir = SDL3-@SDL_VERSION@
-distfile = $(distdir).tar.gz
-
-@SET_MAKE@
-SHELL	= @SHELL@
-CC      = @CC@
-CXX     = @CXX@
-INCLUDE = @INCLUDE@
-CFLAGS  = @BUILD_CFLAGS@
-EXTRA_CFLAGS = @EXTRA_CFLAGS@
-LDFLAGS = @BUILD_LDFLAGS@
-EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
-LIBTOOL = @LIBTOOL@
-INSTALL = @INSTALL@
-FGREP	= @FGREP@
-AR	= @AR@
-RANLIB	= @RANLIB@
-RC	= @RC@
-LINKER = @LINKER@
-LIBTOOLLINKERTAG = @LIBTOOLLINKERTAG@
-SDL_VENDOR_INFO = @SDL_VENDOR_INFO@
-
-TARGET  = libSDL3.la
-OBJECTS = @OBJECTS@
-GEN_HEADERS = @GEN_HEADERS@
-GEN_OBJECTS = @GEN_OBJECTS@
-VERSION_OBJECTS = @VERSION_OBJECTS@
-
-SDLMAIN_TARGET = libSDL3main.la
-SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
-
-SDLTEST_TARGET = libSDL3_test.la
-SDLTEST_OBJECTS = @SDLTEST_OBJECTS@
-
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CODE_MODE = @WAYLAND_SCANNER_CODE_MODE@
-
-INSTALL_SDL3_CONFIG = @INSTALL_SDL3_CONFIG@
-
-SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* mingw sdl3-config.cmake.in sdl3-config-version.cmake.in sdl3-config.in sdl3.m4 sdl3.pc.in SDL3.spec.in SDL3Config.cmake.in src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
-GEN_DIST = SDL3.spec
-
-ifneq ($V,1)
-RUN_CMD_AR     = @echo "  AR    " $@;
-RUN_CMD_CC     = @echo "  CC    " $@;
-RUN_CMD_CXX    = @echo "  CXX   " $@;
-RUN_CMD_LTLINK = @echo "  LTLINK" $@;
-RUN_CMD_RANLIB = @echo "  RANLIB" $@;
-RUN_CMD_RC     = @echo "  RC    " $@;
-RUN_CMD_GEN    = @echo "  GEN   " $@;
-LIBTOOL += --quiet
-endif
-
-HDRS = \
-	SDL.h \
-	SDL_assert.h \
-	SDL_atomic.h \
-	SDL_audio.h \
-	SDL_bits.h \
-	SDL_blendmode.h \
-	SDL_clipboard.h \
-	SDL_cpuinfo.h \
-	SDL_egl.h \
-	SDL_endian.h \
-	SDL_error.h \
-	SDL_events.h \
-	SDL_filesystem.h \
-	SDL_gamecontroller.h \
-	SDL_gesture.h \
-	SDL_guid.h \
-	SDL_haptic.h \
-	SDL_hidapi.h \
-	SDL_hints.h \
-	SDL_joystick.h \
-	SDL_keyboard.h \
-	SDL_keycode.h \
-	SDL_loadso.h \
-	SDL_locale.h \
-	SDL_log.h \
-	SDL_main.h \
-	SDL_messagebox.h \
-	SDL_metal.h \
-	SDL_misc.h \
-	SDL_mouse.h \
-	SDL_mutex.h \
-	SDL_name.h \
-	SDL_opengl.h \
-	SDL_opengl_glext.h \
-	SDL_opengles.h \
-	SDL_opengles2_gl2ext.h \
-	SDL_opengles2_gl2.h \
-	SDL_opengles2_gl2platform.h \
-	SDL_opengles2.h \
-	SDL_opengles2_khrplatform.h \
-	SDL_pixels.h \
-	SDL_platform.h \
-	SDL_power.h \
-	SDL_quit.h \
-	SDL_rect.h \
-	SDL_render.h \
-	SDL_rwops.h \
-	SDL_scancode.h \
-	SDL_sensor.h \
-	SDL_shape.h \
-	SDL_stdinc.h \
-	SDL_surface.h \
-	SDL_system.h \
-	SDL_syswm.h \
-	SDL_thread.h \
-	SDL_timer.h \
-	SDL_touch.h \
-	SDL_types.h \
-	SDL_version.h \
-	SDL_video.h \
-	SDL_vulkan.h \
-	begin_code.h \
-	close_code.h
-
-SDLTEST_HDRS = $(shell ls $(srcdir)/include | $(FGREP) SDL_test)
-
-LT_AGE      = @LT_AGE@
-LT_CURRENT  = @LT_CURRENT@
-LT_REVISION = @LT_REVISION@
-LT_LDFLAGS  = -no-undefined -rpath $(libdir) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
-
-all: $(srcdir)/configure Makefile $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
-
-$(srcdir)/configure: $(srcdir)/configure.ac
-	@echo "Warning, configure is out of date, please re-run autogen.sh"
-
-Makefile: $(srcdir)/Makefile.in
-	$(SHELL) config.status $@
-
-Makefile.in:;
-
-$(objects)/.created:
-	$(SHELL) $(auxdir)/mkinstalldirs $(objects)
-	touch $@
-
-update-revision:
-	$(SHELL) $(auxdir)/updaterev.sh --vendor "$(SDL_VENDOR_INFO)"
-
-.PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
-
-$(objects)/$(TARGET): $(GEN_HEADERS) $(GEN_OBJECTS) $(OBJECTS) $(VERSION_OBJECTS)
-	$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=$(LIBTOOLLINKERTAG) --mode=link $(LINKER) -o $@ $(OBJECTS) $(GEN_OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
-
-$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
-	$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=$(LIBTOOLLINKERTAG) --mode=link $(LINKER) -static -o $@ $(SDLMAIN_OBJECTS) -rpath $(libdir)
-
-$(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
-	$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=$(LIBTOOLLINKERTAG) --mode=link $(LINKER) -static -o $@ $(SDLTEST_OBJECTS) -rpath $(libdir)
-
-install: all install-bin install-hdrs install-lib install-data
-install-bin:
-ifeq ($(INSTALL_SDL3_CONFIG),TRUE)
-	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
-	$(INSTALL) -m 755 sdl3-config $(DESTDIR)$(bindir)/sdl3-config
-endif
-
-install-hdrs: update-revision
-	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL3
-	for file in $(HDRS) $(SDLTEST_HDRS); do \
-	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL3/$$file; \
-	done
-	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL3/SDL_config.h
-	if test -f include/SDL_revision.h; then \
-	    $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL3/SDL_revision.h; \
-	else \
-	    $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL3/SDL_revision.h; \
-	fi
-
-install-lib: $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
-	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
-	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
-	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
-	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
-install-data:
-	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
-	$(INSTALL) -m 644 $(srcdir)/sdl3.m4 $(DESTDIR)$(datadir)/aclocal/sdl3.m4
-	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
-	$(INSTALL) -m 644 sdl3.pc $(DESTDIR)$(libdir)/pkgconfig
-ifeq ($(INSTALL_SDL3_CONFIG),TRUE)
-	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL3
-	$(INSTALL) -m 644 sdl3-config.cmake $(DESTDIR)$(libdir)/cmake/SDL3
-	$(INSTALL) -m 644 sdl3-config-version.cmake $(DESTDIR)$(libdir)/cmake/SDL3
-endif
-
-uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
-uninstall-bin:
-	rm -f $(DESTDIR)$(bindir)/sdl3-config
-uninstall-hdrs:
-	for file in $(HDRS) $(SDLTEST_HDRS); do \
-	    rm -f $(DESTDIR)$(includedir)/SDL3/$$file; \
-	done
-	rm -f $(DESTDIR)$(includedir)/SDL3/SDL_config.h
-	rm -f $(DESTDIR)$(includedir)/SDL3/SDL_revision.h
-	-rmdir $(DESTDIR)$(includedir)/SDL3
-uninstall-lib:
-	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
-	rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
-	rm -f $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
-uninstall-data:
-	rm -f $(DESTDIR)$(datadir)/aclocal/sdl3.m4
-	rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl3.pc
-	rm -f $(DESTDIR)$(libdir)/cmake/SDL3/sdl3-config.cmake
-	rm -f $(DESTDIR)$(libdir)/cmake/SDL3/sdl3-config-version.cmake
-
-clean:
-	rm -rf $(objects)
-	rm -rf $(gen)
-	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
-
-distclean: clean
-	rm -f Makefile Makefile.rules sdl3-config
-	rm -f config.status config.cache config.log libtool
-	rm -rf $(srcdir)/autom4te*
-	find $(srcdir) \( \
-	    -name '*~' -o \
-	    -name '*.bak' -o \
-	    -name '*.old' -o \
-	    -name '*.rej' -o \
-	    -name '*.orig' -o \
-	    -name '.#*' \) \
-	    -exec rm -f {} \;
-	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
-
-dist $(distfile):
-	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
-	(cd $(srcdir); tar cf - $(SRC_DIST)) | (cd $(distdir); tar xf -)
-	tar cf - $(GEN_DIST) | (cd $(distdir); tar xf -)
-	find $(distdir) \( \
-	    -name '*~' -o \
-	    -name '*.bak' -o \
-	    -name '*.old' -o \
-	    -name '*.rej' -o \
-	    -name '*.orig' -o \
-	    -name '.#*' \) \
-	    -exec rm -f {} \;
-	if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
-	# Intentionally no vendor suffix: that's a property of the build, not the source
-	(cd $(distdir); $(srcdir)/build-scripts/updaterev.sh --dist)
-	tar cvf - $(distdir) | gzip --best >$(distfile)
-	rm -rf $(distdir)
-
-rpm: $(distfile)
-	rpmbuild -ta $?
diff --git a/acinclude/ac_check_define.m4 b/acinclude/ac_check_define.m4
deleted file mode 100644
index d0e4c0c67adb..000000000000
--- a/acinclude/ac_check_define.m4
+++ /dev/null
@@ -1,14 +0,0 @@
-AC_DEFUN([AC_CHECK_DEFINE],[AC_REQUIRE([AC_PROG_CPP])dnl
-  AC_CACHE_CHECK(for $1 in $2, ac_cv_define_$1,
-    AC_EGREP_CPP([YES_IS_DEFINED], [
-#include <$2>
-#ifdef $1
-YES_IS_DEFINED
-#endif
-    ], ac_cv_define_$1=yes, ac_cv_define_$1=no)
-  )
-  if test "$ac_cv_define_$1" = "yes" ; then
-    AC_DEFINE([HAVE_$1],[],[Added by AC_CHECK_DEFINE])
-  fi
-])dnl
-
diff --git a/acinclude/alsa.m4 b/acinclude/alsa.m4
deleted file mode 100644
index 1a276a23d3be..000000000000
--- a/acinclude/alsa.m4
+++ /dev/null
@@ -1,144 +0,0 @@
-dnl Configure Paths for Alsa
-dnl Some modifications by Richard Boulton <richard-alsa@tartarus.org>
-dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
-dnl Jaroslav Kysela <perex@suse.cz>
-dnl Last modification: alsa.m4,v 1.23 2004/01/16 18:14:22 tiwai Exp
-dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate.
-dnl enables arguments --with-alsa-prefix=
-dnl                   --with-alsa-inc-prefix=
-dnl                   --disable-alsatest
-dnl
-dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,
-dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.
-dnl
-
-AC_DEFUN([AM_PATH_ALSA],
-[dnl Save the original CFLAGS, LDFLAGS, and LIBS
-alsa_save_CFLAGS="$CFLAGS"
-alsa_save_LDFLAGS="$LDFLAGS"
-alsa_save_LIBS="$LIBS"
-alsa_found=yes
-
-dnl
-dnl Get the cflags and libraries for alsa
-dnl
-AC_ARG_WITH(alsa-prefix,
-[  --with-alsa-prefix=PFX  Prefix where Alsa library is installed(optional)],
-[alsa_prefix="$withval"], [alsa_prefix=""])
-
-AC_ARG_WITH(alsa-inc-prefix,
-[  --with-alsa-inc-prefix=PFX  Prefix where include libraries are (optional)],
-[alsa_inc_prefix="$withval"], [alsa_inc_prefix=""])
-
-dnl FIXME: this is not yet implemented
-AC_ARG_ENABLE(alsatest,
-[  --disable-alsatest      Do not try to compile and run a test Alsa program],
-[enable_alsatest="$enableval"],
-[enable_alsatest=yes])
-
-dnl Add any special include directories
-AC_MSG_CHECKING(for ALSA CFLAGS)
-if test "$alsa_inc_prefix" != "" ; then
-	ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix"
-	CFLAGS="$CFLAGS -I$alsa_inc_prefix"
-fi
-AC_MSG_RESULT($ALSA_CFLAGS)
-
-dnl add any special lib dirs
-AC_MSG_CHECKING(for ALSA LDFLAGS)
-if test "$alsa_prefix" != "" ; then
-	ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix"
-	LDFLAGS="$LDFLAGS $ALSA_LIBS"
-fi
-
-dnl add the alsa library
-ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread"
-LIBS=`echo $LIBS | sed 's/-lm//'`
-LIBS=`echo $LIBS | sed 's/-ldl//'`
-LIBS=`echo $LIBS | sed 's/-lpthread//'`
-LIBS=`echo $LIBS | sed 's/  //'`
-LIBS="$ALSA_LIBS $LIBS"
-AC_MSG_RESULT($ALSA_LIBS)
-
-dnl Check for a working version of libasound that is of the right version.
-min_alsa_version=ifelse([$1], ,0.1.1, $1)
-AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version)
-no_alsa=""
-    alsa_min_major_version=`echo $min_alsa_version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-    alsa_min_minor_version=`echo $min_alsa_version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-    alsa_min_micro_version=`echo $min_alsa_version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
-AC_LANG_PUSH([C])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <alsa/asoundlib.h>
-]], [[
-/* ensure backward compatibility */
-#if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
-#define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
-#endif
-#if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
-#define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
-#endif
-#if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
-#define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
-#endif
-
-#  if(SND_LIB_MAJOR > $alsa_min_major_version)
-  exit(0);
-#  else
-#    if(SND_LIB_MAJOR < $alsa_min_major_version)
-#       error not present
-#    endif
-
-#   if(SND_LIB_MINOR > $alsa_min_minor_version)
-  exit(0);
-#   else
-#     if(SND_LIB_MINOR < $alsa_min_minor_version)
-#          error not present
-#      endif
-
-#      if(SND_LIB_SUBMINOR < $alsa_min_micro_version)
-#        error not present
-#      endif
-#    endif
-#  endif
-exit(0);
-]])],
-  [AC_MSG_RESULT(found.)],
-  [AC_MSG_RESULT(not present.)
-   ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)])
-   alsa_found=no]
-)
-AC_LANG_POP([C])
-
-dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
-if test "x$enable_alsatest" = "xyes"; then
-AC_CHECK_LIB([asound], [snd_ctl_open],,
-	[ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)])
-	 alsa_found=no]
-)
-fi
-
-if test "x$alsa_found" = "xyes" ; then
-   ifelse([$2], , :, [$2])
-   LIBS=`echo $LIBS | sed 's/-lasound//g'`
-   LIBS=`echo $LIBS | sed 's/  //'`
-   LIBS="-lasound $LIBS"
-fi
-if test "x$alsa_found" = "xno" ; then
-   ifelse([$3], , :, [$3])
-   CFLAGS="$alsa_save_CFLAGS"
-   LDFLAGS="$alsa_save_LDFLAGS"
-   LIBS="$alsa_save_LIBS"
-   ALSA_CFLAGS=""
-   ALSA_LIBS=""
-fi
-
-dnl That should be it.  Now just export out symbols:
-AC_SUBST(ALSA_CFLAGS)
-AC_SUBST(ALSA_LIBS)
-])
diff --git a/acinclude/ax_check_compiler_flags.m4 b/acinclude/ax_check_compiler_flags.m4
deleted file mode 100644
index 35bfd2a5a274..000000000000
--- a/acinclude/ax_check_compiler_flags.m4
+++ /dev/null
@@ -1,76 +0,0 @@
-# ===========================================================================
-#  http://www.gnu.org/software/autoconf-archive/ax_check_compiler_flags.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
-#
-# DESCRIPTION
-#
-#   Check whether the given compiler FLAGS work with the current language's
-#   compiler, or whether they give an error. (Warnings, however, are
-#   ignored.)
-#
-#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
-#   success/failure.
-#
-# LICENSE
-#
-#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
-#   Copyright (c) 2009 Matteo Frigo
-#
-#   This program is free software: you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation, either version 3 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
-
-#serial 9
-
-AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
-[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
-AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
-dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
-AS_LITERAL_IF([$1],
-  [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1]), [
-      ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
-      _AC_LANG_PREFIX[]FLAGS="$1"
-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
-        AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes,
-        AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no)
-      _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
-  [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
-   _AC_LANG_PREFIX[]FLAGS="$1"
-   AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
-     eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes,
-     eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no)
-   _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
-eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])
-AC_MSG_RESULT($ax_check_compiler_flags)
-if test "x$ax_check_compiler_flags" = xyes; then
-	m4_default([$2], :)
-else
-	m4_default([$3], :)
-fi
-])dnl AX_CHECK_COMPILER_FLAGS
diff --git a/acinclude/ax_compute_relative_paths.m4 b/acinclude/ax_compute_relative_paths.m4
deleted file mode 100644
index 102470798f21..000000000000
--- a/acinclude/ax_compute_relative_paths.m4
+++ /dev/null
@@ -1,173 +0,0 @@
-# ==============================================================================
-#  https://www.gnu.org/software/autoconf-archive/ax_compute_relative_paths.html
-# ==============================================================================
-#
-# SYNOPSIS
-#
-#   AX_COMPUTE_RELATIVE_PATHS(PATH_LIST)
-#
-# DESCRIPTION
-#
-#   PATH_LIST is a space-separated list of colon-separated triplets of the
-#   form 'FROM:TO:RESULT'. This function iterates over these triplets and
-#   set $RESULT to the relative path from $FROM to $TO. Note that $FROM and
-#   $TO needs to be absolute filenames for this macro to success.
-#
-#   For instance,
-#
-#     first=/usr/local/bin
-#     second=/usr/local/share
-#     AX_COMPUTE_RELATIVE_PATHS([first:second:fs second:first:sf])
-#     # $fs is set to ../share
-#     # $sf is set to ../bin
-#
-#   $FROM and $TO are both eval'ed recursively and normalized, this means
-#   that you can call this macro with autoconf's dirnames like `prefix' or
-#   `datadir'. For example:
-#
-#     AX_COMPUTE_RELATIVE_PATHS([bindir:datadir:bin_to_data])
-#
-#   AX_COMPUTE_RELATIVE_PATHS should also works with DOS filenames.
-#
-#   You may want to use this macro in order to make your package
-#   relocatable. Instead of hardcoding $datadir into your programs just
-#   encode $bin_to_data and try to determine $bindir at run-time.
-#
-#   This macro requires AX_NORMALIZE_PATH and AX_RECURSIVE_EVAL.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Alexandre Duret-Lu

(Patch may be truncated, please check the link at the top of this post.)