[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112839: Add HAVE_GLIB check instead
From: |
Jan D. |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112839: Add HAVE_GLIB check instead of checking individual libraries that use GLib. |
Date: |
Mon, 03 Jun 2013 20:47:35 +0200 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 112839
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Mon 2013-06-03 20:47:35 +0200
message:
Add HAVE_GLIB check instead of checking individual libraries that use GLib.
* configure.ac (HAVE_GLIB): Add GLib check. Set XGSELOBJ if GLib is
used. Remove xgselect.o from XOBJ.
* src/Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
* src/process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
* src/xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
modified:
ChangeLog
configure.ac
src/ChangeLog
src/Makefile.in
src/process.c
src/xgselect.c
=== modified file 'ChangeLog'
--- a/ChangeLog 2013-06-03 13:03:05 +0000
+++ b/ChangeLog 2013-06-03 18:47:35 +0000
@@ -1,3 +1,8 @@
+2013-06-03 Jan Djärv <address@hidden>
+
+ * configure.ac (HAVE_GLIB): Add GLib check. Set XGSELOBJ if GLib is
+ used. Remove xgselect.o from XOBJ.
+
2013-06-03 Michael Albinus <address@hidden>
* configure.ac (file-notification): New option, replaces inotify option.
=== modified file 'configure.ac'
--- a/configure.ac 2013-06-03 13:03:05 +0000
+++ b/configure.ac 2013-06-03 18:47:35 +0000
@@ -3612,6 +3612,23 @@
AC_CHECK_FUNCS(snprintf)
+dnl Check this late. It depends on what other libraries (lrsvg, Gtk+ etc)
+dnl Emacs uses.
+XGSELOBJ=
+AC_MSG_CHECKING([whether GLib is linked in])
+AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[#include <glib.h>
+ ]],
+ [[g_print ("Hello world");]])],
+ [links_glib=yes],
+ [links_glib=no])
+AC_MSG_RESULT([$links_glib])
+if test "${links_glib}" = "yes"; then
+ AC_DEFINE(HAVE_GLIB, 1, [Define to 1 if GLib is linked in.])
+ XGSELOBJ=xgselect.o
+fi
+AC_SUBST(XGSELOBJ)
+
dnl Adapted from Haible's version.
AC_CACHE_CHECK([for nl_langinfo and CODESET], emacs_cv_langinfo_codeset,
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
@@ -4398,7 +4415,7 @@
AC_DEFINE(HAVE_X_WINDOWS, 1,
[Define to 1 if you want to use the X window system.])
XMENU_OBJ=xmenu.o
- XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
+ XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
FONT_OBJ=xfont.o
if test "$HAVE_XFT" = "yes"; then
FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-06-03 18:29:30 +0000
+++ b/src/ChangeLog 2013-06-03 18:47:35 +0000
@@ -1,3 +1,11 @@
+2013-06-03 Jan Djärv <address@hidden>
+
+ * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
+
+ * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
+
+ * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
+
2013-06-03 Paul Eggert <address@hidden>
Fix minor problems found by static checking.
=== modified file 'src/Makefile.in'
--- a/src/Makefile.in 2013-06-03 13:03:05 +0000
+++ b/src/Makefile.in 2013-06-03 18:47:35 +0000
@@ -205,10 +205,13 @@
## xmenu.o if HAVE_X_WINDOWS, else empty.
address@hidden@
-## xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o if
+## xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o if
## HAVE_X_WINDOWS, else empty.
address@hidden@
+# xgselect.o if linking with GLib, else empty
address@hidden@
+
address@hidden@
## Only used if HAVE_X11, in LIBX_OTHER.
@@ -371,7 +374,7 @@
doprnt.o intervals.o textprop.o composite.o xml.o $(NOTIFY_OBJ) \
profiler.o \
$(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \
- $(W32_OBJ) $(WINDOW_SYSTEM_OBJ)
+ $(W32_OBJ) $(WINDOW_SYSTEM_OBJ) $(XGSELOBJ)
obj = $(base_obj) $(NS_OBJC_OBJ)
## Object files used on some machine or other.
=== modified file 'src/process.c'
--- a/src/process.c 2013-06-03 18:29:30 +0000
+++ b/src/process.c 2013-06-03 18:47:35 +0000
@@ -4528,7 +4528,7 @@
}
#endif
-#if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS)
+#if defined (HAVE_GLIB)
nfds = xg_select
#elif defined (HAVE_NS)
nfds = ns_select
=== modified file 'src/xgselect.c'
--- a/src/xgselect.c 2013-04-07 04:41:19 +0000
+++ b/src/xgselect.c 2013-06-03 18:47:35 +0000
@@ -21,7 +21,7 @@
#include "xgselect.h"
-#if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS)
+#ifdef HAVE_GLIB
#include <glib.h>
#include <errno.h>
@@ -140,4 +140,4 @@
return retval;
}
-#endif /* USE_GTK || HAVE_GCONF || HAVE_GSETTINGS */
+#endif /* HAVE_GLIB */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112839: Add HAVE_GLIB check instead of checking individual libraries that use GLib.,
Jan D. <=