[libdvbpsi-devel] configure.ac allow building with mingw32

Jean-Paul Saman git at videolan.org
Mon Sep 8 14:49:46 CEST 2014


libdvbpsi | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Mon Sep  8 12:24:32 2014 +0200| [7c9e74804b2236bb6d66d6c2dd326decb5227cca] | committer: Jean-Paul Saman

configure.ac allow building with mingw32

> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=7c9e74804b2236bb6d66d6c2dd326decb5227cca
---

 configure.ac |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 2a97e5b..66e5fec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,13 +23,23 @@ CFLAGS_save="${CFLAGS}"
 
 dnl add features to CFLAGS
 CFLAGS_dist="-Wall -Werror --std=gnu99 -D_GNU_SOURCE"
-CFLAGS_dist="${CFLAGS_dist} -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
+CFLAGS_dist="${CFLAGS_dist} -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
 
 dnl check the operating system
 case "${target_os}" in
   darwin*)
+    SYS=darwin
     CFLAGS_dist="${CFLAGS_dist} -no-cpp-precomp"
     ;;
+  *mingw32*)
+    SYS=mingw32
+    CFLAGS_dist="${CFLAGS_dist} -Wno-cast-qual"
+    AC_DEFINE([WIN32],[1],["Define to 1 if building for windows with mingw32"])
+    ;;
+   *)
+    SYS=linux
+    CFLAGS_dist="${CFLAGS_dist} -Wcast-qual"
+   ;;
 esac
 
 dnl --enable-debug
@@ -120,4 +130,5 @@ libdvbpsi version     : ${VERSION}
 debug                 : ${debug}
 release               : ${release}
 compile flags         : ${CFLAGS}
+build for             : ${SYS}
 "



More information about the libdvbpsi-devel mailing list