INSTALL: binary build of a source RPM/DEB package
[cdimgtools.git] / configure.ac
blob4ebdd5ca1ca213a8b4103855222f7fa92400eca7
1 # -*- Autoconf -*-
2 # configure.ac - process this file with autoconf to produce a configure script
3 # Copyright © 2012 Géraud Meyer <graud@gmx.com>
4 #   This file is part of CDimgtools.
6 #   CDimgtools is free software; you can redistribute it and/or modify it under
7 #   the terms of the GNU General Public License version 2 as published by the
8 #   Free Software Foundation.
10 #   This package is distributed in the hope that it will be useful, but WITHOUT
11 #   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 #   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13 #   more details.
15 #   You should have received a copy of the GNU General Public License
16 #   along with CDimgtools.  If not, see <http://www.gnu.org/licenses/>.
18 AC_PREREQ([2.62])
19 define([dynamic_version], [esyscmd(./version.sh | tr -d '\n')])
20 AC_INIT([CDimgtools], [dynamic_version], [g_raud@gna.org], [cdimgtools])
21 AC_CONFIG_SRCDIR([cssdec.c])
22 AC_CONFIG_HEADERS([config.h])
24 # Checks for programs.
25 AC_PROG_SED
26 AC_PROG_CC
27 AC_PROG_INSTALL
28 AC_PROG_LN_S
29 AC_PROG_MAKE_SET
31 AC_CHECK_PROGS(ASCIIDOC, [asciidoc], [false])
32 AC_CHECK_PROGS(POD2MAN, [pod2man], [false])
33 AC_CHECK_PROGS(POD2HTML, [pod2html], [false])
34 AC_CHECK_PROGS(XMLTO, [xmlto], [false])
36 # Checks for libraries.
37 AC_CHECK_LIB([dvdcss], [dvdcss_open], [], [AC_MSG_ERROR([Could not find libdvdcss])])
38 AC_CHECK_LIB([dvdread], [UDFFindFile], [], [AC_MSG_ERROR([Could not find libdvdread])])
40 # Checks for header files.
41 AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h unistd.h])
42 AC_SYS_LARGEFILE
44 # Checks for typedefs, structures, and compiler characteristics.
45 AC_TYPE_OFF_T
46 AC_TYPE_SIZE_T
47 AC_TYPE_SSIZE_T
48 AC_CHECK_MEMBERS([struct stat.st_rdev])
49 AC_TYPE_UINT32_T
51 # Checks for library functions.
52 AC_FUNC_MALLOC
53 AC_CHECK_FUNCS([strerror strtol])
55 # Runtime dependencies
56 AC_SYS_INTERPRETER
57 if test x$interpval = xno; then
58         AC_MSG_WARN([the scripts provided may be unusable])
60 AC_PATH_PROG(PERL, perl perl5.004 perl5.003 perl5.002 perl5.001 perl5, no)
61 if test x$PERL = xno; then
62         PERL=/usr/bin/perl
63         AC_MSG_WARN([perl not found; default of $PERL used])
66 AC_CONFIG_FILES([config.make])
67 AC_OUTPUT