diff options
author | Siraj Razick <siraj.razick@collabora.co.uk> | 2012-03-12 19:47:22 -0400 |
---|---|---|
committer | Siraj Razick <siraj.razick@collabora.co.uk> | 2012-03-12 20:32:36 -0400 |
commit | 1dd6a66ea92477803b6d7959e55707251ba29519 (patch) | |
tree | f3fc20d762f88b98774692e1126bafef8d59a6cc | |
parent | 5d706cc7571f5c15fbbab8bf0a0577f9876c77cb (diff) |
build: Use gio-windows-2.0 when cross compiling
The current windows build fails since we are unconditionally looking
for gio-unix-2.0, when building for windows we should look for
gio-windows-2.0, and then export the flags accordingly.
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | src/Makefile.am | 14 |
2 files changed, 17 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 9dd9354a..28fd4028 100644 --- a/configure.ac +++ b/configure.ac @@ -178,10 +178,18 @@ PKG_CHECK_MODULES(GLIB, AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) + +if test "$platform" = "win32"; then +PKG_CHECK_MODULES(GIO_WINDOWS, + [gio-windows-2.0]) +AC_SUBST(GIO_WINDOWS_CFLAGS) +AC_SUBST(GIO_WINDOWS_LIBS) +else PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0]) AC_SUBST(GIO_UNIX_CFLAGS) AC_SUBST(GIO_UNIX_LIBS) +fi GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` AC_SUBST(GLIB_GENMARSHAL) diff --git a/src/Makefile.am b/src/Makefile.am index 4210f9e8..43dd959a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -226,15 +226,10 @@ AM_CFLAGS = \ @LIBSOUP_CFLAGS@ \ $(NULL) -if OS_WINDOWS - AM_CFLAGS += -D_WIN32_WINNT=0x0501 -endif - AM_LDFLAGS = \ $(GCOV_LIBS) \ @LIBXML2_LIBS@ \ @GLIB_LIBS@ \ - @GIO_UNIX_CFLAGS@ \ @GMODULE_LIBS@ \ @WOCKY_LIBS@ \ @DBUS_LIBS@ \ @@ -243,6 +238,15 @@ AM_LDFLAGS = \ @LIBSOUP_LIBS@ \ $(NULL) +if OS_WINDOWS + AM_CFLAGS += -D_WIN32_WINNT=0x0501 \ + @GIO_WINDOWS_CFLAGS@ + AM_LDFLAGS += @GIO_WINDOWS_LIBS@ +else + AM_CFLAGS += @GIO_UNIX_CFLAGS@ + AM_LDFLAGS += @GIO_UNIX_LIBS@ +endif + if USE_BACKEND_AVAHI AM_LDFLAGS += @AVAHI_LIBS@ AM_CFLAGS += @AVAHI_CFLAGS@ |