Add MinGW32 libraries to executables
authorJP Ikaheimonen <jp_ikaheimonen@mentor.com>
Mon, 8 Jul 2013 13:48:24 +0000 (09:48 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 8 Jul 2013 13:48:24 +0000 (09:48 -0400)
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.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
configure.ac
converter/Makefile.am
formats/ctf/metadata/Makefile.am

index b21aa7ef3a4e7968f6fe20bb1eb7962f470356ec..8a636075a756813a29b8ef88ed93dbc75574de63 100644 (file)
@@ -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],
 [
index de70313e3273463dc8085d6980d9be187dc66a53..8ef71a23ec91d7b1b22e9eb3299e4ed139b059d0 100644 (file)
@@ -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
index b33ce5536b4124284100a52f1bc60c664987065a..69f71275528e4a945a208bfa0c77f5dfe566dd3b 100644 (file)
@@ -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
This page took 0.026176 seconds and 4 git commands to generate.