From: Eli Zaretskii Date: Wed, 15 May 2013 16:15:07 +0000 (+0300) Subject: Merge from trunk, configury not fixed yet. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~229^2~63^2~7 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d14365f9411ab4b20db6c455aa9cf24ce6a0bcb1;p=emacs.git Merge from trunk, configury not fixed yet. --- d14365f9411ab4b20db6c455aa9cf24ce6a0bcb1 diff --cc configure.ac index ce99f086a42,a52e25249c6..54f499e2126 --- a/configure.ac +++ b/configure.ac @@@ -2999,8 -2796,57 +2981,58 @@@ if test "${HAVE_X11}" = "yes"; the fi AC_SUBST(LIBXSM) + ### Use XRandr (-lXrandr) if available + HAVE_XRANDR=no + if test "${HAVE_X11}" = "yes"; then + XRANDR_REQUIRED=1.2.2 + XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED" + PKG_CHECK_MODULES(XRANDR, $XRANDR_MODULES, HAVE_XRANDR=yes, HAVE_XRANDR=no) + if test $HAVE_XRANDR = no; then + # Test old way in case pkg-config doesn't have it (older machines). + AC_CHECK_HEADER(X11/extensions/Xrandr.h, + [AC_CHECK_LIB(Xrandr, XRRQueryExtension, HAVE_XRANDR=yes)]) + if test $HAVE_XRANDR = yes; then + XRANDR_LIBS=-lXrandr + AC_SUBST(XRANDR_LIBS) + fi + fi + if test $HAVE_XRANDR = yes; then + SAVE_CFLAGS="$CFLAGS" + SAVE_LIBS="$LIBS" + CFLAGS="$XRANDR_CFLAGS $CFLAGS" + LIBS="$XRANDR_LIBS $LIBS" + AC_CHECK_FUNCS(XRRGetOutputPrimary XRRGetScreenResourcesCurrent) + CFLAGS="$SAVE_CFLAGS" + LIBS="$SAVE_LIBS" + + AC_DEFINE(HAVE_XRANDR, 1, [Define to 1 if you have the XRandr extension.]) + fi + fi + + ### Use Xinerama (-lXinerama) if available + HAVE_XINERAMA=no + if test "${HAVE_X11}" = "yes"; then + XINERAMA_REQUIRED=1.0.2 + XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED" + PKG_CHECK_MODULES(XINERAMA, $XINERAMA_MODULES, HAVE_XINERAMA=yes, + HAVE_XINERAMA=no) + if test $HAVE_XINERAMA = no; then + # Test old way in case pkg-config doesn't have it (older machines). + AC_CHECK_HEADER(X11/extensions/Xinerama.h, + [AC_CHECK_LIB(Xinerama, XineramaQueryExtension, HAVE_XINERAMA=yes)]) + if test $HAVE_XINERAMA = yes; then + XINERAMA_LIBS=-lXinerama + AC_SUBST(XINERAMA_LIBS) + fi + fi + if test $HAVE_XINERAMA = yes; then + AC_DEFINE(HAVE_XINERAMA, 1, [Define to 1 if you have the Xinerama extension.]) + fi + fi + + ### Use libxml (-lxml2) if available +### mingw32 doesn't use -lxml2, since it loads the library dynamically. HAVE_LIBXML2=no if test "${with_xml2}" != "no"; then ### I'm not sure what the version number should be, so I just guessed. @@@ -4506,13 -4273,8 +4541,18 @@@ case "$opsys" i ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;; + mingw32) ++ ## MinGW64 does not prepend an underscore to symbols, so we must ++ ## pass a different -entry switch to linker. FIXME: It is better ++ ## to make the entry points the same by changing unexw32.c. + case "$canonical" in + x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,_start -Wl,-Map,./temacs.map" ;; + *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;; + esac + ;; + + openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;; + *) LD_SWITCH_SYSTEM_TEMACS= ;; esac