summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--configure.ac66
2 files changed, 54 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 41bc08262..3401cfd6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,7 +28,7 @@ xine-lib (1.0.1)
* updated vidix to 0.9.9
* plugin description accessor functions (may load plugins)
* fixed translations, they wasn't used in some cases
- * MSVC Win32 port update
+ * Win32 port updates: cross compilation of VCD, external ffmpeg with MSVC
xine-lib (1.0)
* unbreak DXR3 plugin
diff --git a/configure.ac b/configure.ac
index 9f15ae14c..a363e4ffb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1315,34 +1315,74 @@ if test x"$enable_vcd" = "xyes"; then
],ISOC99_PRAGMA=no)
AC_MSG_RESULT($ISOC99_PRAGMA)
+ dnl
dnl bitfield order
- AC_MSG_CHECKING(bitfield ordering in structs)
- AC_TRY_RUN([
-int
- main() {
+ dnl
+ AC_MSG_CHECKING([bitfield ordering in structs])
+
+ dnl basic compile test for all platforms
+ AC_COMPILE_IFELSE([
+int main() {
struct { char bit_0:1, bit_12:2, bit_345:3, bit_67:2; }
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
__attribute__((packed))
#endif
bf = { 1,1,1,1 };
- if (sizeof (bf) != 1) return 1;
- return *((unsigned char*) &bf) != 0x4b; }
-], bf_lsbf=1, AC_TRY_RUN([
-int
-main() {
+ switch (0) case 0: case sizeof(bf) == 1:;
+ return 0;
+}
+], [], AC_MSG_ERROR([compiler doesn't support bitfield structs]))
+
+
+ dnl run test
+ AC_RUN_IFELSE([
+int main() {
struct { char bit_0:1, bit_12:2, bit_345:3, bit_67:2; }
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
__attribute__((packed))
#endif
bf = { 1,1,1,1 };
if (sizeof (bf) != 1) return 1;
- return *((unsigned char*) &bf) != 0xa5; }
-], bf_lsbf=0, AC_MSG_ERROR([unsupported bitfield ordering])))
+ return *((unsigned char*) &bf) != 0x4b; }
+], bf_lsbf=1, [
+ AC_RUN_IFELSE([
+int main() {
+ struct { char bit_0:1, bit_12:2, bit_345:3, bit_67:2; }
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+ __attribute__((packed))
+#endif
+ bf = { 1,1,1,1 };
+ if (sizeof (bf) != 1) return 1;
+ return *((unsigned char*) &bf) != 0xa5; }
+], bf_lsbf=0, AC_MSG_ERROR([unsupported bitfield ordering]))
+ ],
+ [case "$host" in
+ *-*-mingw32* | *-*-cygwin*)
+ bf_lsbf=1
+ ;;
+ *)
+ AC_MSG_RESULT([unknown])
+ AC_MSG_ERROR([value of bitfield test isn't known for $host
+*********************************************************************
+Value of bitfield test can't be found out for cross-compiling and we
+don't know its value for host "$host".
+
+Because it's needed for VCD plugin, disable VCD by configure option
+--disable-vcd or use external VCD library.
+*********************************************************************])
+ esac]
+)
+
+ if test "x$cross_compiling" = "xyes"; then
+ TEXT=" (guessed)"
+ else
+ TEXT=""
+ fi
if test "x$bf_lsbf" = "x1"; then
- AC_MSG_RESULT(LSBF)
+ AC_MSG_RESULT(LSBF${TEXT})
AC_DEFINE(BITFIELD_LSBF, [], [compiler does lsbf in struct bitfields])
else
- AC_MSG_RESULT(MSBF)
+ AC_MSG_RESULT(MSBF${TEXT})
fi
AC_HAVE_HEADERS( errno.h fcntl.h \