Merge from emacs-24; up to 2014-04-01T20:18:12Z!eggert@cs.ucla.edu
[bpt/emacs.git] / configure.ac
index bf40406..be2221d 100644 (file)
@@ -22,6 +22,7 @@ dnl  You should have received a copy of the GNU General Public License
 dnl  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_PREREQ(2.65)
+dnl Note this is parsed by (at least) make-dist and lisp/cedet/ede/emacs.el.
 AC_INIT(GNU Emacs, 24.4.50, bug-gnu-emacs@gnu.org)
 
 dnl We get MINGW64 with MSYS2
@@ -1834,11 +1835,6 @@ if test "${HAVE_W32}" = "yes"; then
   W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
   W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
   EMACSRES="emacs.res"
-  case "$canonical" in
-    x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
-    *) EMACS_MANIFEST="emacs-x86.manifest" ;;
-  esac
-  UPDATE_MANIFEST=update-game-score.exe.manifest
   if test "${opsys}" = "cygwin"; then
     W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
     W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
@@ -1846,6 +1842,11 @@ if test "${HAVE_W32}" = "yes"; then
     # the rc file), not a linker script.
     W32_RES_LINK="-Wl,emacs.res"
   else
+    case "$canonical" in
+      x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
+      *) EMACS_MANIFEST="emacs-x86.manifest" ;;
+    esac
+    UPDATE_MANIFEST=update-game-score.exe.manifest
     W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
     W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
     W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10"
@@ -2432,8 +2433,11 @@ HAVE_GSETTINGS=no
 if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
    PKG_CHECK_MODULES(GSETTINGS, gio-2.0 >= 2.26, HAVE_GSETTINGS=yes, HAVE_GSETTINGS=no)
    if test "$HAVE_GSETTINGS" = "yes"; then
+      old_CFLAGS=$CFLAGS
+      CFLAGS="$CFLAGS $GSETTINGS_CFLAGS"
+      old_LIBS=$LIBS
+      LIBS="$LIBS $GSETTINGS_LIBS"
       AC_MSG_CHECKING([whether GSettings is in gio])
-      GSETTINGS_COMPILES=no
       AC_LINK_IFELSE(
          [AC_LANG_PROGRAM(
             [[/* Check that gsettings really is present.  */
@@ -2444,14 +2448,16 @@ if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
               GSettings *settings;
               GVariant *val = g_settings_get_value (settings, "");
             ]])],
-        [GSETTINGS_COMPILES=yes])
-      AC_MSG_RESULT([$GSETTINGS_COMPILES])
+        [], HAVE_GSETTINGS=no)
+      AC_MSG_RESULT([$HAVE_GSETTINGS])
 
-      if test "$$GSETTINGS_COMPILES" = "yes"; then
+      if test "$HAVE_GSETTINGS" = "yes"; then
         AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.])
        SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
        SETTINGS_LIBS="$GSETTINGS_LIBS"
       fi
+      CFLAGS=$old_CFLAGS
+      LIBS=$old_LIBS
    fi
 fi