diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c512bb29..c988ef56c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,13 @@ set(CMAKE_MODULE_PATH "${SDL2_SOURCE_DIR}/cmake") include(${SDL2_SOURCE_DIR}/cmake/macros.cmake) include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake) +# Enable large file support on 32-bit glibc, so that we can access files +# with large inode numbers +check_symbol_exists("__GLIBC__" "stdlib.h" LIBC_IS_GLIBC) +if (LIBC_IS_GLIBC AND CMAKE_SIZEOF_VOID_P EQUAL 4) + add_compile_definitions(PRIVATE _FILE_OFFSET_BITS=64) +endif() + # See docs/release_checklist.md set(SDL_MAJOR_VERSION 2) set(SDL_MINOR_VERSION 23) diff --git a/configure.ac b/configure.ac index 2686db6b3..8bba0af0c 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,7 @@ dnl AC_CANONICAL_HOST dnl Check for tools AC_PROG_CC AC_PROG_CXX +AC_SYS_LARGEFILE AC_PROG_INSTALL AC_PROG_MAKE_SET PKG_PROG_PKG_CONFIG