ref: 3adf615d8ed7c70804844131e808ffaec923cb10
parent: 39b65aab22b68d7fe0f12380044e1f2d16cc30e2
author: Sam Hocevar <sam@videolan.org>
date: Mon Oct 7 12:37:15 EDT 2002
* ./src/Makefile.am: -no-undefined is now only used under BeOS because it causes the Win32 compilation to fail. * ./configure.in, src/Makefile.am: used AM_CONDITIONAL to conditionally build the BSDi stuff.
--- a/configure.in
+++ b/configure.in
@@ -25,6 +25,7 @@
;;
xbeos*)
AC_DEFINE(SYS_BEOS, 1, Have a BeOS system.)
+ SYS_BEOS=1
;;
x*)
;;
@@ -81,7 +82,6 @@
AC_EGREP_HEADER(dvd_struct,dvd.h,[
AC_DEFINE(DVD_STRUCT_IN_DVD_H, 1,
Define if <dvd.h> defines DVD_STRUCT.)
- EXTRA_LIB="${EXTRA_LIB} -ldvd"
LINUX_DVD_STRUCT=1
],[
dnl
@@ -90,7 +90,7 @@
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.)
- EXTRA_SOURCES="${EXTRA_SOURCES} bsdi_ioctl.c"
+ SYS_BSDI=1
LINUX_DVD_STRUCT=1
])
])
@@ -136,8 +136,8 @@
CFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DDVDCSS_DIST $CFLAGS"
-AC_SUBST(EXTRA_LIB)
-AC_SUBST(EXTRA_SOURCES)
+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/Makefile.am
+++ b/src/Makefile.am
@@ -2,12 +2,29 @@
lib_LTLIBRARIES = libdvdcss.la
-libdvdcss_la_SOURCES = libdvdcss.c device.c error.c css.c ioctl.c
+libdvdcss_la_SOURCES = \
+ libdvdcss.c libdvdcss.h \
+ device.c device.h \
+ css.c css.h csstables.h \
+ ioctl.c ioctl.h \
+ error.c \
+ common.h \
+ $(bsdi_sources)
-EXTRA_libdvdcss_la_SOURCES = bsdi_ioctl.c
-libdvdcss_la_DEPENDENCIES = @EXTRA_SOURCES@
+EXTRA_libdvdcss_la_SOURCES = \
+ $(bsdi_extras)
-libdvdcss_la_LIBADD = @EXTRA_SOURCES@ @EXTRA_LIB@
-libdvdcss_la_LDFLAGS = -version-info 2:2:0 -no-undefined
+libdvdcss_la_LIBADD = $(bsdi_libadd)
+libdvdcss_la_LDFLAGS = -version-info 2:2:0 $(beos_ldflags)
-noinst_HEADERS = csstables.h ioctl.h device.h common.h css.h libdvdcss.h bsdi_dvd.h
+bsdi_extras = bsdi_ioctl.c bsdi_dvd.h
+
+if SYS_BSDI
+bsdi_sources = $(bsdi_extras)
+bsdi_libadd = -ldvd
+endif
+
+if SYS_BEOS
+beos_ldflags = -no-undefined
+endif
+
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -1,83 +1,122 @@
-/* src/config.h.in. Generated automatically from configure.in by autoheader 2.13. */
+/* src/config.h.in. Generated from configure.in by autoheader. */
-/* Define to empty if the keyword does not work. */
-#undef const
+/* Have IOKit DVD IOCTL headers */
+#undef DARWIN_DVD_IOCTL
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
+/* Define if <extras/BSDI_dvdioctl/dvd.h> defines DVD_STRUCT. */
+#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
+/* Define if <dvd.h> defines DVD_STRUCT. */
+#undef DVD_STRUCT_IN_DVD_H
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
+/* Define if <linux/cdrom.h> defines DVD_STRUCT. */
+#undef DVD_STRUCT_IN_LINUX_CDROM_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/cdio.h> defines dvd_struct. */
+#undef DVD_STRUCT_IN_SYS_CDIO_H
-/* Define if you have the <dlfcn.h> header file. */
+/* 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 to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
-/* Define if you have the <dvd.h> header file. */
+/* Define to 1 if you have the <dvd.h> header file. */
#undef HAVE_DVD_H
-/* Define if you have the <linux/cdrom.h> header file. */
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <linux/cdrom.h> header file. */
#undef HAVE_LINUX_CDROM_H
-/* Define if you have the <sys/cdio.h> header file. */
+/* Define if Linux-like dvd_struct is defined. */
+#undef HAVE_LINUX_DVD_STRUCT
+
+/* Define to 1 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 to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/cdio.h> header file. */
#undef HAVE_SYS_CDIO_H
-/* Define if you have the <sys/dvdio.h> header file. */
+/* Define to 1 if you have the <sys/dvdio.h> header file. */
#undef HAVE_SYS_DVDIO_H
-/* Define if you have the <sys/ioctl.h> header file. */
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define if you have the <winioctl.h> header file. */
+/* Define to 1 if you have the <winioctl.h> header file. */
#undef HAVE_WINIOCTL_H
+/* Define to 1 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
-/* Version number of package */
-#undef VERSION
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
-/* Have a BeOS system. */
-#undef SYS_BEOS
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
-/* Define if <sys/cdio.h> defines dvd_struct. */
-#undef DVD_STRUCT_IN_SYS_CDIO_H
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
-/* Define if <sys/dvdio.h> defines dvd_struct. */
-#undef DVD_STRUCT_IN_SYS_DVDIO_H
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
-/* Define if <linux/cdrom.h> defines DVD_STRUCT. */
-#undef DVD_STRUCT_IN_LINUX_CDROM_H
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
-/* Define if <dvd.h> defines DVD_STRUCT. */
-#undef DVD_STRUCT_IN_DVD_H
-
-/* Define if <extras/BSDI_dvdioctl/dvd.h> defines DVD_STRUCT. */
-#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H
-
/* Have userspace SCSI headers. */
#undef SOLARIS_USCSI
-/* Define if <sys/scsi.h> defines sctl_io. */
-#undef HPUX_SCTL_IO
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
-/* Have IOKit DVD IOCTL headers */
-#undef DARWIN_DVD_IOCTL
+/* Have a BeOS system. */
+#undef SYS_BEOS
-/* Define if Linux-like dvd_struct is defined. */
-#undef HAVE_LINUX_DVD_STRUCT
+/* Version number of package */
+#undef VERSION
-/* Define if OpenBSD-like dvd_struct is defined. */
-#undef HAVE_OPENBSD_DVD_STRUCT
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
-/* Define if FreeBSD-like dvd_struct is defined. */
-#undef HAVE_BSD_DVD_STRUCT
+/* 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