[lttng-dev] [Babeltrace PATCH 01/23] Add MinGW32 libraries to executables
Ikaheimonen, JP
jp_ikaheimonen at mentor.com
Wed May 22 04:05:09 EDT 2013
Make configure.ac aware of MinGW, and set up a variable we can use
in make files.
Under MinGW, add platform specific libraries to all link commands.
---
configure.ac | 9 +++++++++
converter/Makefile.am | 5 +++++
formats/ctf/metadata/Makefile.am | 3 +++
3 files changed, 17 insertions(+)
diff --git a/configure.ac b/configure.ac
index 83822d6..17efc87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,15 @@ AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_CHECK_FUNCS([bzero gettimeofday munmap strtoul])
+# Check for MinGW32.
+MINGW32=no
+case $host in
+ *-*-mingw*)
+ MINGW32=yes;;
+esac
+
+AM_CONDITIONAL([BABELTRACE_BUILD_WITH_MINGW], [test "x$MINGW32" = "xyes"])
+
# Check for libuuid
AC_CHECK_LIB([uuid], [uuid_generate],
[
diff --git a/converter/Makefile.am b/converter/Makefile.am
index de70313..8ef71a2 100644
--- a/converter/Makefile.am
+++ b/converter/Makefile.am
@@ -29,3 +29,8 @@ endif
if BABELTRACE_BUILD_WITH_LIBC_UUID
babeltrace_log_LDADD += -lc
endif
+
+if BABELTRACE_BUILD_WITH_MINGW
+babeltrace_log_LDADD += -lrpcrt4 -lintl -liconv -lole32 -lpopt -lpthread
+babeltrace_LDADD += -lrpcrt4 -lintl -liconv -lole32 -lpopt -lpthread
+endif
diff --git a/formats/ctf/metadata/Makefile.am b/formats/ctf/metadata/Makefile.am
index b33ce55..69f7127 100644
--- a/formats/ctf/metadata/Makefile.am
+++ b/formats/ctf/metadata/Makefile.am
@@ -27,6 +27,9 @@ endif
if BABELTRACE_BUILD_WITH_LIBC_UUID
libctf_ast_la_LIBADD += -lc
endif
+if BABELTRACE_BUILD_WITH_MINGW
+libctf_ast_la_LIBADD += -lrpcrt4 -lintl -liconv -lole32 -lpopt
+endif
noinst_PROGRAMS = ctf-parser-test
ctf_parser_test_SOURCES = ctf-parser-test.c
--
1.8.1.msysgit.1
More information about the lttng-dev
mailing list