* builds/unix/configure.raw [mmap support]: Correctly handle Windows.
Fixes #1024.
This commit is contained in:
parent
689402418f
commit
5635d5edc4
|
@ -1,3 +1,9 @@
|
||||||
|
2021-01-31 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
* builds/unix/configure.raw [mmap support]: Correctly handle Windows.
|
||||||
|
|
||||||
|
Fixes #1024.
|
||||||
|
|
||||||
2021-01-31 Werner Lemberg <wl@gnu.org>
|
2021-01-31 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
* builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`.
|
* builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`.
|
||||||
|
|
|
@ -192,39 +192,51 @@ AC_SUBST(INSTALL_FT2_CONFIG, [$enable_freetype_config])
|
||||||
AC_SYS_LARGEFILE
|
AC_SYS_LARGEFILE
|
||||||
|
|
||||||
# Here we check whether we can use our mmap file component.
|
# Here we check whether we can use our mmap file component.
|
||||||
|
#
|
||||||
|
# Note that `ftsystem.c` for Windows has its own mmap-like implementation
|
||||||
|
# not covered by `AC_FUNC_MMAP` and/or `FT_UNMAP_PARAM`.
|
||||||
|
|
||||||
AC_ARG_ENABLE([mmap],
|
AC_ARG_ENABLE([mmap],
|
||||||
AS_HELP_STRING([--disable-mmap],
|
AS_HELP_STRING([--disable-mmap],
|
||||||
[do not check mmap() and do not use]),
|
[do not check mmap() and do not use]),
|
||||||
[enable_mmap="no"], [enable_mmap="yes"])
|
[enable_mmap="no"], [enable_mmap="yes"])
|
||||||
if test "x${enable_mmap}" != "xno"; then
|
if test "x${enable_mmap}" != "xno"; then
|
||||||
AC_FUNC_MMAP
|
case "$host" in
|
||||||
|
*-*-mingw*)
|
||||||
|
ac_cv_func_mmap_fixed_mapped="yes"
|
||||||
|
AC_MSG_CHECKING([for working mmap])
|
||||||
|
AC_MSG_RESULT([using Windows-specific equivalent])
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_FUNC_MMAP
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
if test "x${enable_mmap}" = "xno" \
|
if test "x${enable_mmap}" = "xno" \
|
||||||
-o "$ac_cv_func_mmap_fixed_mapped" != "yes"; then
|
-o "$ac_cv_func_mmap_fixed_mapped" != "yes"; then
|
||||||
case "$host" in
|
FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
|
||||||
*-*-mingw*)
|
|
||||||
FTSYS_SRC='$(PLATFORM_DIR)/ftsystem.c'
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
|
|
||||||
esac
|
|
||||||
else
|
else
|
||||||
FTSYS_SRC='$(PLATFORM_DIR)/ftsystem.c'
|
FTSYS_SRC='$(PLATFORM_DIR)/ftsystem.c'
|
||||||
|
|
||||||
AC_CHECK_DECLS([munmap],
|
case "$host" in
|
||||||
[],
|
*-*-mingw*)
|
||||||
[],
|
;;
|
||||||
[
|
*)
|
||||||
|
AC_CHECK_DECLS([munmap],
|
||||||
|
[],
|
||||||
|
[],
|
||||||
|
[
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
||||||
FT_MUNMAP_PARAM
|
FT_MUNMAP_PARAM
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
AC_SUBST([FTSYS_SRC])
|
AC_SUBST([FTSYS_SRC])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue