Merge from trunk, configury not fixed yet.
authorEli Zaretskii <eliz@gnu.org>
Wed, 15 May 2013 16:15:07 +0000 (19:15 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 15 May 2013 16:15:07 +0000 (19:15 +0300)
1  2 
configure.ac
lib/Makefile.am
lisp/subr.el
nt/inc/ms-w32.h
src/Makefile.in

diff --cc 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
  
diff --cc lib/Makefile.am
Simple merge
diff --cc lisp/subr.el
Simple merge
diff --cc nt/inc/ms-w32.h
Simple merge
diff --cc src/Makefile.in
Simple merge