Commit f72d6689 authored by Diego Elio Pettenò's avatar Diego Elio Pettenò Committed by 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's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 24968037
*.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
SUBDIRS = src test doc
DIST_SUBDIRS = $(SUBDIRS)
EXTRA_DIST = libdvdcss.spec bootstrap
AUTOMAKE_OPTIONS = foreign dist-bzip2 subdir-objects
doc-dummy:
doc: doc-dummy
......
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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment