shithub: libdvdcss

Download patch

ref: fd8c3e8443673203b43c06292719a8a14792556f
parent: f91c54a9ef1e65e9cecd9fa15f520d964e1f9f46
author: Sam Hocevar <[email protected]>
date: Fri Oct 11 06:03:48 EDT 2002

* ./configure.ac, ./bootstrap: used libdvbpsi's bootstrap, moved config.h
    to ., renamed configure.in into configure.ac, removed useless files that
    are autogenerated.
  * ./src/Makefile.am: instead of using -no-undefined "only under BeOS" we
    use it "never with MSVC".


--- a/.cvsignore
+++ b/.cvsignore
@@ -8,11 +8,16 @@
 config.status
 config.guess
 config.sub
+config.h
+config.h.in
 Makefile
 Makefile.in
 build-stamp
 stamp-h*
 aclocal.m4
+autom4te.cache
+compile
+depcomp
 install-sh
 libtool
 ltmain.sh
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,9 @@
-SUBDIRS = src test debian doc
-EXTRA_DIST = libdvdcss.spec
+SUBDIRS = src test
+DIST_SUBDIRS = $(SUBDIRS) debian doc
+
+EXTRA_DIST = libdvdcss.spec bootstrap
+
+AUTOMAKE_OPTIONS = foreign dist-bzip2 subdir-objects
 
 doc-dummy:
 
--- a/bootstrap
+++ b/bootstrap
@@ -1,11 +1,42 @@
 #! /bin/sh
 set -x
 
-aclocal || exit 1
+rm -f aclocal.m4 configure config.guess config.log config.sub ltmain.sh libtool ltconfig missing mkinstalldirs depcomp install-sh
+
+# Check for automake
+amvers="none"
+if automake-1.6 --version >/dev/null 2>&1
+then
+  amvers="-1.6"
+else
+  if automake-1.5 --version >/dev/null 2>&1
+  then
+    amvers="-1.5"
+  else
+    if automake --version > /dev/null 2>&1
+    then
+      amvers=`automake --version | sed -e '1s/[^0-9]*//' -e q`
+
+      if expr "$amvers" "<" "1.5" > /dev/null 2>&1
+      then amvers="none"
+      else amvers=""
+      fi        
+    fi
+  fi 
+fi
+
+if test x$amvers = xnone
+then
+  set +x
+  echo "you need automake version 1.5 or later"
+  exit 1
+fi
+
+aclocal${amvers} || exit 1
 libtoolize --force --copy || exit 1
 autoheader || exit 1
 #add --include-deps if you want to bootstrap with any other compiler than gcc
-#automake --add-missing --copy --include-deps || exit 1
-automake --add-missing --copy || exit 1
+#automake${amvers} --add-missing --copy --include-deps || exit 1
+automake${amvers} --add-missing --copy || exit 1
 autoconf || exit 1
 rm -f config.cache
--- /dev/null
+++ b/configure.ac
@@ -1,0 +1,146 @@
+AC_INIT(src/libdvdcss.c)
+
+AC_CANONICAL_SYSTEM
+
+AM_INIT_AUTOMAKE(libdvdcss, 1.2.3)
+AM_CONFIG_HEADER(config.h)
+
+AC_PROG_CC
+AC_STDC_HEADERS
+
+AC_LIBTOOL_WIN32_DLL
+AM_PROG_LIBTOOL 
+
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_SIZE_T
+
+AC_CHECK_HEADERS(unistd.h)
+
+dnl
+dnl  Check the operating system
+dnl
+case x"${target_os}" in
+  xdarwin*)
+    CFLAGS="${CFLAGS} -no-cpp-precomp"
+    ;;
+  xbeos*)
+    AC_DEFINE(SYS_BEOS, 1, Have a BeOS system.)
+    ;;
+  x*msvc*)
+    SYS_MSVC=1
+    ;;
+  x*)
+    ;;
+esac
+
+dnl
+dnl  libdvdcss: check for DVD ioctls
+dnl
+
+dnl  default is no
+CAN_BUILD_LIBDVDCSS=0
+
+dnl  for windoze
+AC_CHECK_HEADERS(winioctl.h,[
+  CAN_BUILD_LIBDVDCSS=1
+])
+
+dnl  for Un*x and BeOS
+AC_CHECK_HEADERS(sys/ioctl.h,[
+  CAN_BUILD_LIBDVDCSS=1
+  AC_CHECK_HEADERS(sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h)
+  BSD_DVD_STRUCT=0
+  LINUX_DVD_STRUCT=0
+  OPENBSD_DVD_STRUCT=0
+  dnl
+  dnl Old FreeBSD: sys/cdio.h
+  dnl
+  AC_EGREP_HEADER(dvd_struct,sys/cdio.h,[
+    AC_DEFINE(DVD_STRUCT_IN_SYS_CDIO_H, 1,
+              Define if <sys/cdio.h> defines dvd_struct.)
+    AC_EGREP_HEADER(struct dvd_struct,sys/cdio.h,[
+                    BSD_DVD_STRUCT=1],[LINUX_DVD_STRUCT=1; OPENBSD_DVD_STRUCT=1])
+  ])
+  dnl
+  dnl Newer FreeBSD: sys/dvdio.h
+  dnl
+  AC_EGREP_HEADER(dvd_struct,sys/dvdio.h,[
+    AC_DEFINE(DVD_STRUCT_IN_SYS_DVDIO_H, 1,
+              Define if <sys/dvdio.h> defines dvd_struct.)
+    AC_EGREP_HEADER(struct dvd_struct,sys/dvdio.h,[
+                    BSD_DVD_STRUCT=1],[LINUX_DVD_STRUCT=1])
+  ])
+  dnl
+  dnl Linux: linux/cdrom.h
+  dnl
+  AC_EGREP_HEADER(dvd_struct,linux/cdrom.h,[
+    AC_DEFINE(DVD_STRUCT_IN_LINUX_CDROM_H, 1,
+              Define if <linux/cdrom.h> defines DVD_STRUCT.)
+    LINUX_DVD_STRUCT=1
+  ])
+  dnl
+  dnl BSDI: dvd.h
+  dnl
+  AC_EGREP_HEADER(dvd_struct,dvd.h,[
+    AC_DEFINE(DVD_STRUCT_IN_DVD_H, 1,
+              Define if <dvd.h> defines DVD_STRUCT.)
+    LINUX_DVD_STRUCT=1
+  ],[
+    dnl
+    dnl BSDI: /sys/dev/scsi/scsi_ioctl.h, using our own libdvd
+    dnl
+    AC_CHECK_HEADERS(/sys/dev/scsi/scsi_ioctl.h,[
+      AC_DEFINE(DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H, 1,
+                Define if <extras/BSDI_dvdioctl/dvd.h> defines DVD_STRUCT.)
+      SYS_BSDI=1
+      LINUX_DVD_STRUCT=1
+    ])
+  ])
+  dnl
+  dnl Solaris: sys/scsi/scsi_types.h, sys/scsi/impl/uscsi.h
+  dnl
+  AC_CHECK_HEADER(sys/scsi/scsi_types.h,[
+    AC_CHECK_HEADER(sys/scsi/impl/uscsi.h,[
+      AC_DEFINE(SOLARIS_USCSI, 1, Have userspace SCSI headers.)
+    ])
+  ])
+  dnl
+  dnl HP-UX: sys/scsi.h
+  dnl
+  AC_CHECK_HEADER(sys/scsi.h,[
+    AC_EGREP_HEADER(sctl_io,sys/scsi.h,[
+      AC_DEFINE(HPUX_SCTL_IO, 1, Define if <sys/scsi.h> defines sctl_io.)
+    ])
+  ])
+  dnl
+  dnl Darwin 
+  dnl
+  AC_CHECK_HEADER(IOKit/storage/IODVDMediaBSDClient.h,[
+    AC_DEFINE(DARWIN_DVD_IOCTL, 1, Have IOKit DVD IOCTL headers)
+  ])
+  dnl
+  dnl Final tests to check what was detected
+  dnl
+  if test x$LINUX_DVD_STRUCT = x1; then
+    AC_DEFINE(HAVE_LINUX_DVD_STRUCT, 1, 
+              Define if Linux-like dvd_struct is defined.)
+    if test x$OPENBSD_DVD_STRUCT = x1; then
+      AC_DEFINE(HAVE_OPENBSD_DVD_STRUCT, 1,
+                Define if OpenBSD-like dvd_struct is defined.)
+    fi
+  else
+    if test x$BSD_DVD_STRUCT = x1; then
+      AC_DEFINE(HAVE_BSD_DVD_STRUCT, 1,
+                Define if FreeBSD-like dvd_struct is defined.)
+    fi
+  fi
+])
+
+CFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DDVDCSS_DIST $CFLAGS"
+
+AM_CONDITIONAL(SYS_BSDI, test "x$SYS_BSDI" = "x1")
+AM_CONDITIONAL(SYS_MSVC, test "x$SYS_MSVC" = "x1")
+
+AC_OUTPUT([Makefile src/Makefile src/dvdcss/Makefile test/Makefile debian/Makefile doc/Makefile])
+
--- a/configure.in
+++ /dev/null
@@ -1,143 +1,0 @@
-AC_INIT(src/libdvdcss.c)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(libdvdcss, 1.2.3)
-AM_CONFIG_HEADER(src/config.h)
-
-AC_PROG_CC
-AC_STDC_HEADERS
-
-AM_PROG_LIBTOOL 
-
-AC_C_CONST
-AC_C_INLINE
-AC_TYPE_SIZE_T
-
-AC_CHECK_HEADERS(unistd.h)
-
-dnl
-dnl  Check the operating system
-dnl
-case x"${target_os}" in
-  xdarwin*)
-    CFLAGS="${CFLAGS} -no-cpp-precomp"
-    ;;
-  xbeos*)
-    AC_DEFINE(SYS_BEOS, 1, Have a BeOS system.)
-    SYS_BEOS=1
-    ;;
-  x*)
-    ;;
-esac
-
-dnl
-dnl  libdvdcss: check for DVD ioctls
-dnl
-
-dnl  default is no
-CAN_BUILD_LIBDVDCSS=0
-
-dnl  for windoze
-AC_CHECK_HEADERS(winioctl.h,[
-  CAN_BUILD_LIBDVDCSS=1
-])
-
-dnl  for Un*x and BeOS
-AC_CHECK_HEADERS(sys/ioctl.h,[
-  CAN_BUILD_LIBDVDCSS=1
-  AC_CHECK_HEADERS(sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h)
-  BSD_DVD_STRUCT=0
-  LINUX_DVD_STRUCT=0
-  OPENBSD_DVD_STRUCT=0
-  dnl
-  dnl Old FreeBSD: sys/cdio.h
-  dnl
-  AC_EGREP_HEADER(dvd_struct,sys/cdio.h,[
-    AC_DEFINE(DVD_STRUCT_IN_SYS_CDIO_H, 1,
-              Define if <sys/cdio.h> defines dvd_struct.)
-    AC_EGREP_HEADER(struct dvd_struct,sys/cdio.h,[
-                    BSD_DVD_STRUCT=1],[LINUX_DVD_STRUCT=1; OPENBSD_DVD_STRUCT=1])
-  ])
-  dnl
-  dnl Newer FreeBSD: sys/dvdio.h
-  dnl
-  AC_EGREP_HEADER(dvd_struct,sys/dvdio.h,[
-    AC_DEFINE(DVD_STRUCT_IN_SYS_DVDIO_H, 1,
-              Define if <sys/dvdio.h> defines dvd_struct.)
-    AC_EGREP_HEADER(struct dvd_struct,sys/dvdio.h,[
-                    BSD_DVD_STRUCT=1],[LINUX_DVD_STRUCT=1])
-  ])
-  dnl
-  dnl Linux: linux/cdrom.h
-  dnl
-  AC_EGREP_HEADER(dvd_struct,linux/cdrom.h,[
-    AC_DEFINE(DVD_STRUCT_IN_LINUX_CDROM_H, 1,
-              Define if <linux/cdrom.h> defines DVD_STRUCT.)
-    LINUX_DVD_STRUCT=1
-  ])
-  dnl
-  dnl BSDI: dvd.h
-  dnl
-  AC_EGREP_HEADER(dvd_struct,dvd.h,[
-    AC_DEFINE(DVD_STRUCT_IN_DVD_H, 1,
-              Define if <dvd.h> defines DVD_STRUCT.)
-    LINUX_DVD_STRUCT=1
-  ],[
-    dnl
-    dnl BSDI: /sys/dev/scsi/scsi_ioctl.h, using our own libdvd
-    dnl
-    AC_CHECK_HEADERS(/sys/dev/scsi/scsi_ioctl.h,[
-      AC_DEFINE(DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H, 1,
-                Define if <extras/BSDI_dvdioctl/dvd.h> defines DVD_STRUCT.)
-      SYS_BSDI=1
-      LINUX_DVD_STRUCT=1
-    ])
-  ])
-  dnl
-  dnl Solaris: sys/scsi/scsi_types.h, sys/scsi/impl/uscsi.h
-  dnl
-  AC_CHECK_HEADER(sys/scsi/scsi_types.h,[
-    AC_CHECK_HEADER(sys/scsi/impl/uscsi.h,[
-      AC_DEFINE(SOLARIS_USCSI, 1, Have userspace SCSI headers.)
-    ])
-  ])
-  dnl
-  dnl HP-UX: sys/scsi.h
-  dnl
-  AC_CHECK_HEADER(sys/scsi.h,[
-    AC_EGREP_HEADER(sctl_io,sys/scsi.h,[
-      AC_DEFINE(HPUX_SCTL_IO, 1, Define if <sys/scsi.h> defines sctl_io.)
-    ])
-  ])
-  dnl
-  dnl Darwin 
-  dnl
-  AC_CHECK_HEADER(IOKit/storage/IODVDMediaBSDClient.h,[
-    AC_DEFINE(DARWIN_DVD_IOCTL, 1, Have IOKit DVD IOCTL headers)
-  ])
-  dnl
-  dnl Final tests to check what was detected
-  dnl
-  if test x$LINUX_DVD_STRUCT = x1; then
-    AC_DEFINE(HAVE_LINUX_DVD_STRUCT, 1, 
-              Define if Linux-like dvd_struct is defined.)
-    if test x$OPENBSD_DVD_STRUCT = x1; then
-      AC_DEFINE(HAVE_OPENBSD_DVD_STRUCT, 1,
-                Define if OpenBSD-like dvd_struct is defined.)
-    fi
-  else
-    if test x$BSD_DVD_STRUCT = x1; then
-      AC_DEFINE(HAVE_BSD_DVD_STRUCT, 1,
-                Define if FreeBSD-like dvd_struct is defined.)
-    fi
-  fi
-])
-
-CFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DDVDCSS_DIST $CFLAGS"
-
-AM_CONDITIONAL(SYS_BSDI, test "x$SYS_BSDI" = "x1")
-AM_CONDITIONAL(SYS_BEOS, test "x$SYS_BEOS" = "x1")
-
-AC_OUTPUT([Makefile src/Makefile src/dvdcss/Makefile test/Makefile debian/Makefile doc/Makefile])
-
--- a/src/.cvsignore
+++ b/src/.cvsignore
@@ -3,5 +3,4 @@
 Makefile.in
 *.lo
 *.la
-config.h
 stamp-h*
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,7 +15,7 @@
 	$(bsdi_extras)
 
 libdvdcss_la_LIBADD = $(bsdi_libadd)
-libdvdcss_la_LDFLAGS = -version-info 2:2:0 $(beos_ldflags)
+libdvdcss_la_LDFLAGS = -version-info 2:3:0 $(libtool_flags)
 
 bsdi_extras = bsdi_ioctl.c bsdi_dvd.h
 
@@ -24,7 +24,8 @@
 bsdi_libadd = -ldvd
 endif
 
-if SYS_BEOS
-beos_ldflags = -no-undefined
+if SYS_MSVC
+else
+libtool_flags = -no-undefined
 endif
 
--- a/src/config.h.in
+++ /dev/null
@@ -1,104 +1,0 @@
-/* src/config.h.in.  Generated automatically from configure.in by autoheader.  */
-
-/* Have IOKit DVD IOCTL headers */
-#undef DARWIN_DVD_IOCTL
-
-/* Define if <extras/BSDI_dvdioctl/dvd.h> defines DVD_STRUCT. */
-#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H
-
-/* Define if <dvd.h> defines DVD_STRUCT. */
-#undef DVD_STRUCT_IN_DVD_H
-
-/* Define if <linux/cdrom.h> defines DVD_STRUCT. */
-#undef DVD_STRUCT_IN_LINUX_CDROM_H
-
-/* Define if <sys/cdio.h> defines dvd_struct. */
-#undef DVD_STRUCT_IN_SYS_CDIO_H
-
-/* Define if <sys/dvdio.h> defines dvd_struct. */
-#undef DVD_STRUCT_IN_SYS_DVDIO_H
-
-/* Define if FreeBSD-like dvd_struct is defined. */
-#undef HAVE_BSD_DVD_STRUCT
-
-/* Define if you have the <dvd.h> header file. */
-#undef HAVE_DVD_H
-
-/* Define if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define if you have the <linux/cdrom.h> header file. */
-#undef HAVE_LINUX_CDROM_H
-
-/* Define if Linux-like dvd_struct is defined. */
-#undef HAVE_LINUX_DVD_STRUCT
-
-/* Define if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define if OpenBSD-like dvd_struct is defined. */
-#undef HAVE_OPENBSD_DVD_STRUCT
-
-/* Define if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define if you have the <sys/cdio.h> header file. */
-#undef HAVE_SYS_CDIO_H
-
-/* Define if you have the <sys/dvdio.h> header file. */
-#undef HAVE_SYS_DVDIO_H
-
-/* Define if you have the <sys/ioctl.h> header file. */
-#undef HAVE_SYS_IOCTL_H
-
-/* Define if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define if you have the <winioctl.h> header file. */
-#undef HAVE_WINIOCTL_H
-
-/* Define if you have the </sys/dev/scsi/scsi_ioctl.h> header file. */
-#undef HAVE__SYS_DEV_SCSI_SCSI_IOCTL_H
-
-/* Define if <sys/scsi.h> defines sctl_io. */
-#undef HPUX_SCTL_IO
-
-/* Name of package */
-#undef PACKAGE
-
-/* Have userspace SCSI headers. */
-#undef SOLARIS_USCSI
-
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Have a BeOS system. */
-#undef SYS_BEOS
-
-/* Version number of package */
-#undef VERSION
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define as `__inline' if that's what the C compiler calls it, or to nothing
-   if it is not supported. */
-#undef inline
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t