shithub: aacdec

Download patch

ref: 55a7978edf3511760bb23a268780846e5a6f25c3
parent: 2cc7ab32cea062fa9f10241bf5a8195a34296ff7
author: menno <menno>
date: Thu Jun 13 04:01:17 EDT 2002

mp4v2 compilation fix

--- /dev/null
+++ b/common/mp4v2/acconfig.h
@@ -1,0 +1,12 @@
+@BOTTOM@
+#undef HAVE_IN_PORT_T
+
+#undef HAVE_SOCKLEN_T
+
+#undef HAVE_FPOS_T_POS
+
+#undef ARCH_X86
+
+#undef HAVE_IPv6
+
+#undef HAVE_ST_ADDRINFO
--- a/common/mp4v2/configure.in
+++ b/common/mp4v2/configure.in
@@ -13,6 +13,29 @@
 AC_CHECK_HEADERS(inttypes.h)
 
 AC_CHECK_FUNCS(strsep)
+AC_DEFUN(MY_CHECK_TYPEDEF_FROM_INCLUDE,
+[
+   AC_MSG_CHECKING([for $1])
+   AC_TRY_COMPILE([$2],
+                  [$1;],
+                  mpeg4ip_ok=yes, mpeg4ip_ok=no)
+   if test $mpeg4ip_ok = yes; then
+      AC_DEFINE($3)
+      AC_MSG_RESULT([yes])
+   else
+      AC_MSG_RESULT([no])
+   fi
+])
 
+MY_CHECK_TYPEDEF_FROM_INCLUDE([in_port_t temp], 
+        [#include <sys/types.h>
+         #include <netinet/in.h>], [HAVE_IN_PORT_T])
+MY_CHECK_TYPEDEF_FROM_INCLUDE([socklen_t temp], 
+        [#include <sys/types.h>
+         #include <sys/socket.h>], HAVE_SOCKLEN_T)
+MY_CHECK_TYPEDEF_FROM_INCLUDE([fpos_t foo; foo.__pos = 0;],
+        [#include <stdio.h>],
+        [HAVE_FPOS_T_POS])
+	
 
 AC_OUTPUT(Makefile)
--- a/common/mp4v2/systems.h
+++ b/common/mp4v2/systems.h
@@ -171,11 +171,6 @@
 #define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)(fpos)
 #define VAR_TO_FPOS(fpos, var) (fpos) = (var)
 
-#ifdef linux
-#define HAVE_SOCKLEN_T
-#endif
-
-
 #endif
 
 #define FOPEN_READ_BINARY "r"