shithub: libdvdcss

Download patch

ref: 217089d0d860a7535a2a947af271fc8d5773a63c
parent: 0d817799e4288afb6a7f9fe02f6c0aaca4175a79
author: Jon Lech Johansen <jlj@videolan.org>
date: Wed Apr 3 17:17:00 EST 2002

* ./configure.in: Darwin compile fix (added -no-cpp-precomp)


--- a/configure.in
+++ b/configure.in
@@ -1,9 +1,10 @@
 AC_INIT(src/libdvdcss.c)
 
+AC_CANONICAL_SYSTEM
+
 AM_INIT_AUTOMAKE(libdvdcss, 1.1.0)
 AM_CONFIG_HEADER(src/config.h)
 
-AC_CANONICAL_HOST
 AC_PROG_CC
 AC_STDC_HEADERS
 
@@ -15,6 +16,21 @@
 
 AC_CHECK_HEADERS(unistd.h)
 
+dnl
+dnl  Check the operating system
+dnl
+case x"${target_os}" in
+  x)
+    SYS=unknown
+    ;;
+  xdarwin*)
+    SYS=darwin
+    ;;
+  x*)
+    SYS=${target_os}
+    ;;
+esac
+
 dnl Check for boolean_t
 AC_CACHE_CHECK([for boolean_t in sys/types.h],
     [ac_cv_c_boolean_t_sys_types_h],
@@ -147,6 +163,11 @@
 ])
 
 CFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DDVDCSS_DIST $CFLAGS"
+
+if test x$SYS = xdarwin
+then
+  CFLAGS="${CFLAGS} -no-cpp-precomp"
+fi
 
 AC_SUBST(EXTRA_SRC)
 AC_SUBST(EXTRA_LIB)