Commit 65714ffc authored by Reinhard Tartler's avatar Reinhard Tartler

Imported Upstream version 0.9.4

parents
This code is Copyright (C) 2000, 2001 by:
Bjrn Englund <d4bjorn@dtek.chalmers.se>,
Hkan Hjort <d95hjort@dtek.chalmers.se>,
Billy Biggs <vektor@dumbterm.net>,
Christian Wolff <scarabaeus@convergence.de>
This diff is collapsed.
This diff is collapsed.
Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the `--target=TYPE' option to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
will cause the specified gcc to be used as the C compiler (unless it is
overridden in the site shell script).
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
SUBDIRS = dvdread src
EXTRA_DIST = bootstrap
This diff is collapsed.
Version 0.9.4
Environment variable DVDREAD_NOKEYS can be used to turn off reading all key.
Only export the functions in the public interface.
New functions DVDDiscID, DVDUDFVolumeInfo and DVDISOVolumeInfo.
Can optionally link with libdvdcss instead of trying to dlopen it.
Several data structures now have more fields that where unknown earlier.
Compilable with Sun's Forte compiler.
Remove all asserts, now just print an error message and continues.
Use swap functions in FreeBSD 5.
Add types, read and print functions for VTS_TMAPT (Time map table).
Add Multichannel Extension, correct PLT_MAIT (Parental Management) info.
More Doxygen markup and comments.
Fix a seg fault and key issue for access to DVDs as a collection of files.
Build fixes.
Version 0.9.3
Support for MacOS X/Darwin have been added.
Ported to use libdvdcss2 (1.2.0 and later).
Can now use libdvdcss to also decrypt files on a normal filsystem.
A bit more tolerant of incorrectly mastered DVDs.
Build robustness fixes from Mark Espie.
Added some Doxygen markup and comments.
Version 0.9.2
Add support for BSD/OS. Make sure that the raw device is used on all
BSD variants for the CSS ioctls to work correctly. Small bug fix for
access to mounted DVD via soft-links and a malloc/free mistake.
Increase an assert level for pgcn numbers in the part of title list.
Version 0.9.1
Change the way the endian swaps are defined and make sure Solaris x86 works.
Fix from Juergen Keil for a bug that caused libdvdread to close random fds.
Update the limit on the number of pgcs in the pgcit to 10000.
Correct bug in 0.9.0 that made using a DVD located on a normal filsystem
impossible.
Version 0.9.0
API breakage, new types to not be influenced by differing off_t types
and DVDReadBlocks now returns blocks read not bytes read.
Changed to use libdvdcss (from VideoLAN).
Add support for finding the raw devices of a DVD on Solaris.
FreeBSD fixes from Marc van Woerkom and OpenBSD fixes from Björn Sandell.
Configure fixes to work better on *BSD and other systems.
Version 0.8.0
Initial public release.
libdvdread
==========
libdvdread provides a simple foundation for reading DVD-Video images.
It offers DVD applications:
1. A simple abstraction for reading the files on a DVD image
(dvd_reader.h).
2. A simple library for parsing the information (IFO) files
(ifo_read.h/ifo_types.h).
3. A simple library for parsing the navigation (NAV) packets
(nav_read.h/nav_types.h).
This allows application designers to access some of the more advanced
features of the DVD format.
libdvdread currently uses libdl to dynamically probe for libdvdcss at
runtime. If libdvdcss is found, then it will be used to decrypt the
encrypted sections of a DVD.
* we don't have any functions for reading / printing TXT_MGI
* rename zero_1 and add bitfields / macro constants in pgcit_srpt
- done, are any of the other pgci_t pgci_ut_t pgci_lu_t affected?
* if an encrypted block is being read and libdvdcss is unavailable,
we should probably return 0 to help it fail.
dnl AC_C_ATTRIBUTE_PACKED
dnl set ATTRIBUTE_PACKED if this is supported
AC_DEFUN([AC_C_ATTRIBUTE_PACKED],
[AC_CACHE_CHECK([__attribute__ ((packed)) support],
[ac_cv_c_attribute_packed],
[AC_TRY_COMPILE([],
[static struct { int a; } __attribute__ ((packed)) c = {0};],
[ac_cv_c_attribute_packed=yes],
[ac_cv_c_attribute_packed=no])
])
if test x"$ac_cv_c_attribute_packed" = x"yes"; then
ATTRIBUTE_PACKED="__attribute__ ((packed))"
fi])
dnl The following AC macros are from mpeg2dec.
dnl Written by Michel Lespinasse <walken@zoy.org>
dnl AC_C_ATTRIBUTE_ALIGNED
dnl define ATTRIBUTE_ALIGNED_MAX to the maximum alignment if this is supported
AC_DEFUN([AC_C_ATTRIBUTE_ALIGNED],
[AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
[ac_cv_c_attribute_aligned],
[ac_cv_c_attribute_aligned=0
for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
AC_TRY_COMPILE([],
[static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) = 0; return c;],
[ac_cv_c_attribute_aligned=$ac_cv_c_attr_align_try])
done])
if test x"$ac_cv_c_attribute_aligned" != x"0"; then
AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
[$ac_cv_c_attribute_aligned],[maximum supported data alignment])
fi])
dnl AC_TRY_CFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS])
dnl check if $CC supports a given set of cflags
AC_DEFUN([AC_TRY_CFLAGS],
[AC_MSG_CHECKING([if $CC supports $1 flags])
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$1"
AC_TRY_COMPILE([],[],[ac_cv_try_cflags_ok=yes],[ac_cv_try_cflags_ok=no])
CFLAGS="$SAVE_CFLAGS"
AC_MSG_RESULT([$ac_cv_try_cflags_ok])
if test x"$ac_cv_try_cflags_ok" = x"yes"; then
ifelse([$2],[],[:],[$2])
else
ifelse([$3],[],[:],[$3])
fi])
dnl AC_CHECK_GENERATE_INTTYPES_H (INCLUDE-DIRECTORY)
dnl generate a default inttypes.h if the header file does not exist already
dnl Written by: Michel Lespinasse <walken@zoy.org>
AC_DEFUN([AC_CHECK_GENERATE_INTTYPES],
[rm -f $1/inttypes.h
AC_CHECK_HEADER([inttypes.h],[],
[AC_CHECK_SIZEOF([char])
AC_CHECK_SIZEOF([short])
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([long long])
if test x"$ac_cv_sizeof_char" != x"1" -o \
x"$ac_cv_sizeof_short" != x"2" -o \
x"$ac_cv_sizeof_int" != x"4" -o \
x"$ac_cv_sizeof_long_long" != x"8"; then
AC_MSG_ERROR([can not build a default inttypes.h])
fi
cat >$1/inttypes.h << EOF
/* default inttypes.h for people who do not have it on their system */
#ifndef _INTTYPES_H
#define _INTTYPES_H
#if (!defined __int8_t_defined) && (!defined __BIT_TYPES_DEFINED__)
#define __int8_t_defined
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef signed long long int64_t;
#endif
#if (!defined _LINUX_TYPES_H)
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
#endif
#endif
EOF
])])
dnl AC_COMPILE_CHECK_SIZEOF (TYPE SUPPOSED-SIZE)
dnl abort if the given type does not have the supposed size
AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
[AC_MSG_CHECKING(that size of $1 is $2)
AC_TRY_COMPILE([],[switch (0) case 0: case (sizeof ($1) == $2):;],[],
[AC_MSG_ERROR([can not build a default inttypes.h])])
AC_MSG_RESULT([yes])])
This diff is collapsed.
#! /bin/sh
set -x
libtoolize --force --copy
aclocal
autoheader
#add --include-deps if you want to bootstrap with any other compiler than gcc
#automake --add-missing --copy --include-deps
automake --add-missing --force --copy
autoconf
rm -f config.cache
This diff is collapsed.
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the <byteswap.h> header file. */
#undef HAVE_BYTESWAP_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <dvdcss/dvdcss.h> header file. */
#undef HAVE_DVDCSS_DVDCSS_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* 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/bswap.h> header file. */
#undef HAVE_SYS_BSWAP_H
/* Define to 1 if you have the <sys/endian.h> header file. */
#undef HAVE_SYS_ENDIAN_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* 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
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The size of a `char', as computed by sizeof. */
#undef SIZEOF_CHAR
/* The size of a `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of a `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG
/* The size of a `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Have a Mac OS X system */
#undef __DARWIN__
/* 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
This diff is collapsed.
This diff is collapsed.
AC_INIT(dvdread/dvd_reader.c)
AM_INIT_AUTOMAKE(libdvdread, 0.9.4)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
AC_PROG_CC
AC_STDC_HEADERS
dnl
dnl Check the operating system
dnl
case x"$host_os" in
xdarwin*)
CFLAGS="${CFLAGS} -no-cpp-precomp"
AC_DEFINE(__DARWIN__, 1, Have a Mac OS X system)
;;
x*)
;;
esac
dnl
dnl non-gcc flags - we probably need exact configuration triplets here.
dnl
if test x"$GCC" != x"yes"; then
case x"$host" in
xsparc-sun-solaris*)
dnl #pragma pack(1) doesn't seem to change Fortes oppinion about what it
dnl can assume about packing when accessing things of the types that where
dnl declared within region of #pragma pack(1), so we are forced to use the
dnl *big hammer* and tell it that it can't make any assumptions at all for
dnl anyting anywhere... to bad really. Even worse, code using the libdvdread
dnl headers for ifo and/or nav structures must be compiled in the same way ;(
OPT_CFLAGS="$CFLAGS -xCC -xmemalign"
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
dnl AC_MSG_ERROR(You must use GCC to compile this code)
;;
esac
fi
dnl
dnl Checks for libtool - this must be done after we set cflags (abi issues)
dnl
AM_PROG_LIBTOOL
dnl
dnl We use dlopen for libdvdcss access by default but if --with-libdvdcss
dnl is given we link with it instead.
dnl
link_dvdcss=no
dvdcss_path=""
AC_ARG_WITH([libdvdcss],
[ --with-libdvdcss[=PATH] force linking against libdvdcss],
[if test x"$withval" != xno; then
link_dvdcss=yes
fi
if test x"$withval" != xyes; then
dvdcss_path=$withval
fi])
if test x"$link_dvdcss" != xyes; then
dnl dlopen libdvdcss
AC_CHECK_FUNC(dlopen,
[ DL_LIBS="" ],
AC_CHECK_LIB(dl, dlopen,
[ DL_LIBS=-ldl ],
AC_MSG_ERROR(You need libdl (dlopen))
)
)
else
dnl link with libdvdcss
if test -z "$dvdcss_path"; then
AC_CHECK_LIB(dvdcss, dvdcss_interface_2,
[ CSS_LIBS=-ldvdcss ],
AC_MSG_ERROR(You need libdvdcss.so.2 or later)
)
AC_CHECK_HEADERS(dvdcss/dvdcss.h,
[ ],
AC_MSG_ERROR(You need libdvdcss (dvdcss.h))
)
else
saved_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -L$dvdcss_path/lib"
AC_CHECK_LIB(dvdcss, dvdcss_interface_2,
[ CSS_LIBS="-L$dvdcss_path/lib -R$dvdcss_path/lib -ldvdcss"
CSS_CFLAGS=-I$dvdcss_path/include ],
AC_MSG_ERROR(You need libdvdcss.so.2 or later)
)
CFLAGS=$saved_CFLAGS
dnl -w added to shutup GCC3.1's cpp warning about -I/usr/local
saved_CPPFLAGS=$CPPFLAGS
CPPFLAGS="-w $CPPFLAGS -I$dvdcss_path/include"
AC_CHECK_HEADERS(dvdcss/dvdcss.h,
[ ],
AC_MSG_ERROR(You need libdvdcss (dvdcss.h))
)
CPPFLAGS=$saved_CPPFLAGS
fi
fi
AC_SUBST(DL_LIBS)
AC_SUBST(CSS_LIBS)
AC_SUBST(CSS_CFLAGS)
dnl
dnl Check for inttype.h, if not present on the system generate one in ".".
dnl
AC_CHECK_GENERATE_INTTYPES(.)
dnl
dnl Checks for header files.
dnl
AC_CHECK_HEADERS([byteswap.h sys/bswap.h sys/endian.h sys/param.h limits.h])
AC_C_BIGENDIAN
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
dnl
dnl Linux and Solaris needs this to make lseek and others be 64 bit
dnl
CFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $CFLAGS"
dnl
dnl It's nice to have clean code...
dnl
AC_ARG_ENABLE([warnings],
[ --enable-warnings enable -Wall and treat warnings as errors])
if test x"$enable_warnings" = xyes; then
if test x"$GCC" = xyes; then
OPT_CFLAGS="-Wall -Werror $CFLAGS"
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
fi
fi
dnl
dnl It's good to be paranoid ;-)
dnl
AC_ARG_ENABLE([pedantic],
[ --enable-pedantic enable various extra warnings for gcc])
if test x"$enable_pedantic" = xyes; then
if test x"$GCC" = xyes; then
dnl -Wtraditional is not included here!
CFLAGS="$CFLAGS -pedantic -Wall -W -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -Wformat -Wid-clash-30 -Wimplicit -Wimplicit-function-delcaration -Wimplicit-int -Wlong-long -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-import -Wno-parentheses -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch -Wtrigraphs -Wunused -Wwrite-strings"
fi
fi
AC_OUTPUT([
Makefile
src/Makefile
dvdread/Makefile
])
This diff is collapsed.
INCLUDES = -I$(top_srcdir) @CSS_CFLAGS@
lib_LTLIBRARIES = libdvdread.la
libdvdread_la_SOURCES = dvd_input.c dvd_reader.c dvd_udf.c ifo_read.c \
ifo_print.c nav_read.c nav_print.c bswap.h dvd_udf.h dvd_input.h \
dvdread_internal.h \
md5.c md5.h
libdvdread_la_LIBADD = @DL_LIBS@ @CSS_LIBS@
libdvdread_la_LDFLAGS = -version-info 3:0:0 -export-symbols-regex "(DVD.*|ifo.*|nav.*)"
pkgincludedir = $(includedir)/dvdread
pkginclude_HEADERS = dvd_reader.h ifo_types.h ifo_read.h \
ifo_print.h nav_types.h nav_read.h nav_print.h
This diff is collapsed.
#ifndef BSWAP_H_INCLUDED
#define BSWAP_H_INCLUDED
/*
* Copyright (C) 2000, 2001 Billy Biggs <vektor@dumbterm.net>,
* Hkan Hjort <d95hjort@dtek.chalmers.se>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <config.h>
#if defined(WORDS_BIGENDIAN)
/* All bigendian systems are fine, just ignore the swaps. */
#define B2N_16(x) (void)(x)
#define B2N_32(x) (void)(x)
#define B2N_64(x) (void)(x)
#else
/* For __FreeBSD_version */
#if defined(HAVE_SYS_PARAM_H)
#include <sys/param.h>
#endif
#if defined(__linux__)
#include <byteswap.h>
#define B2N_16(x) x = bswap_16(x)
#define B2N_32(x) x = bswap_32(x)
#define B2N_64(x) x = bswap_64(x)
#elif defined(__NetBSD__)
#include <sys/endian.h>
#define B2N_16(x) BE16TOH(x)