SYSTEM_TYPE=berkeley-unix
;;
gnu-linux | gnu-kfreebsd )
- LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
- START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
;;
hpux10-20 | hpux11 )
- LIB_STANDARD=-lc
- START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
;;
+ mingw32 )
+ LIB_MATH=
+ ;;
dnl NB this may be adjusted below.
netbsd | openbsd )
- LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
- START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
SYSTEM_TYPE=berkeley-unix
;;
HAVE_W32=no
W32_OBJ=
W32_LIBS=
+ W32_RES=
+ W32_RES_LINK=
if test "${with_w32}" != no; then
if test "${opsys}" != "cygwin"; then
- AC_MSG_ERROR([Using w32 with an autotools build is only supported for Cygwin.])
+ if test "${opsys}" != "mingw32"; then
+ AC_MSG_ERROR([Using w32 with an autotools build is only supported for Cygwin and MinGW32.])
+ fi
fi
AC_CHECK_HEADER([windows.h], [HAVE_W32=yes],
[AC_MSG_ERROR([`--with-w32' was specified, but windows.h
cannot be found.])])
+fi
+if test "${opsys}" = "mingw32"; then
+ AC_CHECK_HEADER([windows.h], [HAVE_W32=yes],
+ [AC_MSG_ERROR([The windows.h header file is required,
+ but cannot be found.])])
+ AC_MSG_CHECKING([whether Windows API headers are recent enough])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <windows.h>
+ #include <usp10.h>]],
+ [[void test(PIMAGE_NT_HEADERS pHeader)
+ {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);}]])],
+ emacs_cv_w32api=yes, emacs_cv_w32api=no)
+ AC_MSG_RESULT($emacs_cv_w32api)
+ if test "${emacs_cv_w32api}" = "no"; then
+ AC_MSG_ERROR([the Windows API headers are too old to support this build.])
+ fi
+fi
+
+if test "${HAVE_W32}" = "yes"; then
AC_DEFINE(HAVE_NTGUI, 1, [Define to use native MS Windows GUI.])
+ AC_CHECK_TOOL(WINDRES, [windres],
+ [AC_MSG_ERROR([No resource compiler found.])])
W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
- W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
- W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
- W32_RES="emacs.res"
- # Tell the linker that emacs.res is an object (which we compile from
- # the rc file), not a linker script.
- W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res"
+ if test "${opsys}" = "cygwin"; then
+ W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
+ W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
++ W32_RES="emacs.res"
++ # Tell the linker that emacs.res is an object (which we compile from
++ # the rc file), not a linker script.
++ W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res"
+ else
+ W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
+ W32_LIBS="$W32_LIBS -lwinmm -ladvapi32 -lgdi32 -lcomdlg32 -luser32"
+ W32_LIBS="$W32_LIBS -lmpr -lshell32 -lwinspool -lole32 -lcomctl32 -lusp10"
+ fi
fi
AC_SUBST(W32_OBJ)
AC_SUBST(W32_LIBS)
GTK_OBJ=
check_gtk2=no
gtk3_pkg_errors=
-if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
- GLIB_REQUIRED=2.28
- GTK_REQUIRED=3.0
- GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
-
- dnl Checks for libraries.
- PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no)
- if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
- AC_MSG_ERROR($GTK_PKG_ERRORS)
- fi
- if test "$pkg_check_gtk" = "yes"; then
- AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.])
- GTK_OBJ=emacsgtkfixed.o
- term_header=gtkutil.h
- USE_GTK_TOOLKIT="GTK3"
- if test "x$ac_enable_gtk_deprecation_warnings" = x; then
- GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
- fi
- else
- check_gtk2=yes
- gtk3_pkg_errors="$GTK_PKG_ERRORS "
+if test "${opsys}" != "mingw32"; then
+ if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
+ GLIB_REQUIRED=2.28
+ GTK_REQUIRED=3.0
+ GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
+
+ dnl Checks for libraries.
+ PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no)
+ if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
+ AC_MSG_ERROR($GTK_PKG_ERRORS)
+ fi
+ if test "$pkg_check_gtk" = "yes"; then
+ AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.])
+ GTK_OBJ=emacsgtkfixed.o
+ term_header=gtkutil.h
+ USE_GTK_TOOLKIT="GTK3"
++ if test "x$ac_enable_gtk_deprecation_warnings" = x; then
++ GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
++ fi
+ else
+ check_gtk2=yes
+ gtk3_pkg_errors="$GTK_PKG_ERRORS "
+ fi
fi
-fi
-if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
- GLIB_REQUIRED=2.10
- GTK_REQUIRED=2.10
- GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
-
- dnl Checks for libraries.
- PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no)
- if test "$pkg_check_gtk" = "no" &&
- { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
- then
- AC_MSG_ERROR($gtk3_pkg_errors$GTK_PKG_ERRORS)
+ if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
+ GLIB_REQUIRED=2.10
+ GTK_REQUIRED=2.10
+ GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
+
+ dnl Checks for libraries.
+ PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no)
+ if test "$pkg_check_gtk" = "no" &&
+ { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
+ then
+ AC_MSG_ERROR($gtk3_pkg_errors$GTK_PKG_ERRORS)
+ fi
+ test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
fi
- test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
fi
if test x"$pkg_check_gtk" = xyes; then