File: configure.ac

package info (click to toggle)
dvdbackup 0.4.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,852 kB
  • sloc: sh: 4,455; ansic: 2,097; sed: 16; makefile: 16; perl: 9
file content (99 lines) | stat: -rw-r--r-- 2,817 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
dnl Process this file with autoconf to produce a configure script.

dnl ----------------------------------------------------------
dnl Initialization and Versioning
dnl ----------------------------------------------------------

AC_INIT([dvdbackup], [0.4.2])

# Where to generate output; srcdir location.
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/main.c])

dnl Must come before AM_INIT_AUTOMAKE.
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([dist-xz -Wall])

AM_GNU_GETTEXT_VERSION([0.17])
AM_GNU_GETTEXT([external])

AM_MAINTAINER_MODE

dnl ----------------------------------------------------------
dnl Checks for programs
dnl ----------------------------------------------------------

AC_PROG_CC_C99
AC_PROG_LN_S

dnl ----------------------------------------------------------
dnl Set build flags based on environment
dnl ----------------------------------------------------------

# enable extra warnings for gcc if they are not already enabled
if test -n "$GCC"; then
	case "$CFLAGS" in
	*-pedantic*) ;;
	*) CFLAGS="$CFLAGS -pedantic" ;;
	esac

	case "$CFLAGS" in
	*-Wall*) ;;
	*) CFLAGS="$CFLAGS -Wall" ;;
	esac

	case "$CFLAGS" in
	*-Wextra*) ;;
	*) CFLAGS="$CFLAGS -Wextra" ;;
	esac
fi

dnl ----------------------------------------------------------
dnl Checks for libraries
dnl ----------------------------------------------------------

AC_CHECK_LIB(dvdread, DVDOpen, , AC_MSG_ERROR([You need libdvdread]))
AC_CHECK_LIB(dvdread, DVDFileStat, [HAVE_DVDFileStat=yes], AC_MSG_ERROR([You have installed an incompatible version of libdvdread.
Have a look at http://dvdbackup.sourceforge.net for more details.]))

dnl ----------------------------------------------------------
dnl Checks for header files
dnl ----------------------------------------------------------

AC_CHECK_HEADERS(dvdread/dvd_reader.h, , AC_MSG_ERROR([You need libdvdread (dvd_reader.h)]))
AC_CHECK_HEADERS([fcntl.h libintl.h limits.h locale.h stdint.h stdlib.h string.h unistd.h])

dnl ----------------------------------------------------------
dnl Checks for types, structures and compilier characteristics
dnl ----------------------------------------------------------

AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_SIZE_T

dnl ----------------------------------------------------------
dnl Checks for library functions
dnl ----------------------------------------------------------

AC_FUNC_MALLOC
AC_FUNC_STAT
AC_CHECK_FUNCS([mkdir setlocale strstr])

dnl ----------------------------------------------------------
dnl Checks for system services
dnl ----------------------------------------------------------

AC_SYS_LARGEFILE
LFS_CFLAGS=$(getconf LFS_CFLAGS)
CFLAGS="${CFLAGS} ${LFS_CFLAGS}"

AC_CONFIG_FILES([
	Makefile
	man/Makefile
	po/Makefile.in
	src/Makefile
])
AC_OUTPUT