[libdvdcss-devel] build: update autotools to modern format.
Diego Elio Pettenò
git at videolan.org
Thu Feb 14 12:56:22 CET 2013
libdvdcss | branch: master | Diego Elio Pettenò <flameeyes at flameeyes.eu> | Wed Feb 13 17:24:49 2013 -0800| [f72d6689a0dfd86667ac18d2ae48fa1a9271aeed] | committer: Jean-Baptiste Kempf
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 at videolan.org>
> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=f72d6689a0dfd86667ac18d2ae48fa1a9271aeed
---
.gitignore | 21 +++++++++++++--------
Makefile.am | 3 ---
configure.ac | 30 +++++++++++++-----------------
3 files changed, 26 insertions(+), 28 deletions(-)
diff --git a/.gitignore b/.gitignore
index 3ef4ebe..8125441 100644
--- 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
diff --git a/Makefile.am b/Makefile.am
index 8cfaef6..c73573d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,10 +1,7 @@
SUBDIRS = src test doc
-DIST_SUBDIRS = $(SUBDIRS)
EXTRA_DIST = libdvdcss.spec bootstrap
-AUTOMAKE_OPTIONS = foreign dist-bzip2 subdir-objects
-
doc-dummy:
doc: doc-dummy
diff --git a/configure.ac b/configure.ac
index f9e6b84..2dd3e61 100644
--- 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_TYPE_SIZE_T
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 @@ CFLAGS_save="${CFLAGS}"
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 @@ fi
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 @@ CFLAGS_save="$CFLAGS"
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.)
@@ -189,11 +190,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")
AM_CONDITIONAL(SYS_MSVC, test "${SYS_MSVC}" = "1")
More information about the libdvdcss-devel
mailing list