[glib: 2/3] build: Conditionally add spawn and IO channel without using EXTRA_ prefix
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/3] build: Conditionally add spawn and IO channel without using EXTRA_ prefix
- Date: Tue, 31 Jul 2018 18:15:54 +0000 (UTC)
commit ca0110c34d1981e47aac6550ba912c720643971f
Author: Philip Withnall <withnall endlessm com>
Date: Tue Jul 31 14:49:17 2018 +0100
build: Conditionally add spawn and IO channel without using EXTRA_ prefix
See previous commit; same reasoning behind the commit, except that these
sources weren’t (yet) causing `make distcheck` to fail.
Signed-off-by: Philip Withnall <withnall endlessm com>
configure.ac | 16 ++++++++--------
glib/Makefile.am | 23 ++++++++++++++---------
2 files changed, 22 insertions(+), 17 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5fd2d5cda..11fde900f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1552,14 +1552,14 @@ dnl **********************
AC_MSG_CHECKING(for gspawn implementation)
case "$host" in
*-*-mingw*)
- GSPAWN=gspawn-win32.lo
+ g_spawn_impl=win32
;;
*)
- GSPAWN=gspawn.lo
+ g_spawn_impl=unix
;;
esac
-AC_MSG_RESULT($GSPAWN)
-AC_SUBST(GSPAWN)
+AC_MSG_RESULT($g_spawn_impl)
+AM_CONDITIONAL(G_SPAWN_WIN32, [test "$g_spawn_impl" = "win32"])
dnl *************************
dnl *** GIOChannel checks ***
@@ -1568,14 +1568,14 @@ dnl *************************
AC_MSG_CHECKING(for GIOChannel implementation)
case "$host" in
*-*-mingw*)
- GIO=giowin32.lo
+ g_io_channel_impl=win32
;;
*)
- GIO=giounix.lo
+ g_io_channel_impl=unix
;;
esac
-AC_MSG_RESULT($GIO)
-AC_SUBST(GIO)
+AC_MSG_RESULT($g_io_channel_impl)
+AM_CONDITIONAL(G_IO_CHANNEL_WIN32, [test "$g_io_channel_impl" = "win32"])
dnl *********************************
dnl *** Directory for GIO modules ***
diff --git a/glib/Makefile.am b/glib/Makefile.am
index 9234599e8..8f6536c6d 100644
--- a/glib/Makefile.am
+++ b/glib/Makefile.am
@@ -163,6 +163,7 @@ libglib_2_0_la_SOURCES = \
gshell.c \
gslice.c \
gslist.c \
+ gspawn-private.h \
gstdio.c \
gstdioprivate.h \
gstrfuncs.c \
@@ -226,13 +227,17 @@ if PLATFORM_WIN32
libglib_2_0_la_SOURCES += gwin32.c
endif
-EXTRA_libglib_2_0_la_SOURCES = \
- giounix.c \
- giowin32.c \
- gspawn.c \
- gspawn-private.h \
- gspawn-win32.c \
- $(NULL)
+if G_SPAWN_WIN32
+libglib_2_0_la_SOURCES += gspawn-win32.c
+else
+libglib_2_0_la_SOURCES += gspawn.c
+endif
+
+if G_IO_CHANNEL_WIN32
+libglib_2_0_la_SOURCES += giowin32.c
+else
+libglib_2_0_la_SOURCES += giounix.c
+endif
glibincludedir=$(includedir)/glib-2.0
glibinclude_HEADERS = \
@@ -364,8 +369,8 @@ pcre_inc =
endif
libglib_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS) $(LIBSYSTEMD_CFLAGS)
-libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @ICONV_LIBS@ @G_LIBS_EXTRA@
$(pcre_lib) $(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD) $(LIBSYSTEMD_LIBS)
-libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ $(glib_win32_res)
$(glib_def)
+libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib)
$(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD) $(LIBSYSTEMD_LIBS)
+libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) $(glib_win32_res) $(glib_def)
libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
$(glib_win32_res_ldflag) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]