shithub: libdvdcss

Download patch

ref: f72d6689a0dfd86667ac18d2ae48fa1a9271aeed
parent: 24968037296bdb623fc5d47a699c226c4122d213
author: Diego Elio Pettenò <flameeyes@flameeyes.eu>
date: Wed Feb 13 12:24:49 EST 2013

build: update autotools to modern format.

This includes quite a bit of fixes all around that allows it to build
with automake 1.13 and autoconf 2.68.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>

--- a/.gitignore
+++ b/.gitignore
@@ -1,25 +1,30 @@
-*.o
-*.lo
-*.la
+*-stamp
 *.a
 *.exe
+*.la
+*.lo
+*.o
 *.pc
 .auto
-.libs
 .deps
+.libs
 Makefile
 Makefile.in
 aclocal.m4
 autom4te.cache
-config.h.in
+config.guess
 config.h
+config.h.in
 config.log
 config.status
+config.sub
 configure
-libtool
-stamp-*
-*-stamp
 doc/doxygen.cfg
 doc/html
 doc/latex
+install-sh
+libtool
+ltmain.sh
+missing
+stamp-*
 test/csstest
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,6 @@
 SUBDIRS = src test doc
-DIST_SUBDIRS = $(SUBDIRS)
 
 EXTRA_DIST = libdvdcss.spec bootstrap
-
-AUTOMAKE_OPTIONS = foreign dist-bzip2 subdir-objects
 
 doc-dummy:
 
--- a/configure.ac
+++ b/configure.ac
@@ -1,14 +1,14 @@
-AC_INIT(src/libdvdcss.c)
+AC_INIT(libdvdcss, 1.2.12)
+AC_CONFIG_SRCDIR([src/libdvdcss.c])
 
 AC_PREREQ(2.50)
-AC_CONFIG_AUX_DIR(.auto)
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_HOST
 
-AM_INIT_AUTOMAKE(libdvdcss, 1.2.12)
-AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
+AC_CONFIG_HEADER(config.h)
 
 AC_PROG_CC
-AC_STDC_HEADERS
+AC_HEADER_STDC
 
 AC_LIBTOOL_WIN32_DLL
 AM_PROG_LIBTOOL
@@ -19,10 +19,13 @@
 
 AC_CHECK_HEADERS(unistd.h sys/param.h sys/uio.h limits.h pwd.h errno.h)
 
+AC_SYS_LARGEFILE
+
 dnl
 dnl  Check the operating system
 dnl
-case x"${target_os}" in
+
+case x"${host_os}" in
   xdarwin*)
     CFLAGS="${CFLAGS} -no-cpp-precomp"
     ;;
@@ -156,7 +159,7 @@
 AC_CACHE_CHECK([if \$CC accepts -Wall],
     [ac_cv_c_Wall],
     [CFLAGS="-Wall ${CFLAGS_save}"
-     AC_TRY_COMPILE([],,ac_cv_c_Wall=yes, ac_cv_c_Wall=no)])
+     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_c_Wall=yes],[ac_cv_c_Wall=no])])
 if test "${ac_cv_c_Wall}" != "no"; then
     CFLAGS_save="-Wall ${CFLAGS_save}"
 fi
@@ -164,7 +167,7 @@
 AC_CACHE_CHECK([if \$CC accepts -Wsign-compare],
     [ac_cv_c_Wsign_compare],
     [CFLAGS="-Wsign-compare ${CFLAGS_save}"
-     AC_TRY_COMPILE([],,ac_cv_c_Wsign_compare=yes, ac_cv_c_Wsign_compare=no)])
+     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_c_Wsign_compare=yes],[ac_cv_c_Wsign_compare=no])])
 if test "${ac_cv_c_Wsign_compare}" != "no"; then
     CFLAGS_save="-Wsign-compare ${CFLAGS_save}"
 fi
@@ -179,9 +182,7 @@
 AC_CACHE_CHECK([if \$CC supports ELF visibility],
     [ac_cv_c_visibility],
     [CFLAGS="-fvisibility=hidden ${CFLAGS_save}"
-     AC_TRY_COMPILE([],
-                    [__attribute__((visibility("default"))) extern int visible],
-                    ac_cv_c_visibility=yes, ac_cv_c_visibility=no)])
+     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[__attribute__((visibility("default"))) extern int visible]])],[ac_cv_c_visibility=yes],[ac_cv_c_visibility=no])])
 if test "${ac_cv_c_visibility}" != "no"; then
     CFLAGS_save="-fvisibility=hidden ${CFLAGS_save}";
     AC_DEFINE(HAVE_VISIBILITY, 1, Support ELF visibility.)
@@ -188,11 +189,6 @@
 fi
 
 CFLAGS="${CFLAGS_save}"
-
-dnl
-dnl  Use 64 bits offsets
-dnl
-CFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ${CFLAGS}"
 
 AM_CONDITIONAL(SYS_BSDI, test "${SYS_BSDI}" = "1")
 AM_CONDITIONAL(SYS_BSDI_LIBDVD, test "${SYS_BSDI_LIBDVD}" = "1")