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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT([libmm-fileinfo],[0.0.1])
AC_CONFIG_SRCDIR([mm_file.c])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lavcodec':
#AC_CHECK_LIB([avcodec], [main])
# FIXME: Replace `main' with a function in `-lavformat':
#AC_CHECK_LIB([avformat], [main])
# FIXME: Replace `main' with a function in `-lavutil':
#AC_CHECK_LIB([avutil], [main])
# FIXME: Replace `main' with a function in `-lm':
AC_CHECK_LIB([m], [main])
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_INT64_T
AC_HEADER_TIME
# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_LSTAT
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_CHECK_FUNCS([gettimeofday memset munmap strcasecmp strdup])
PKG_CHECK_MODULES(MMCOMMON,mm-common)
AC_SUBST(MMCOMMON_CFLAGS)
AC_SUBST(MMCOMMON_LIBS)
#PKG_CHECK_MODULES(MMMHAL,mm-mhal)
#AC_SUBST(MMMHAL_CFLAGS)
#AC_SUBST(MMMHAL_LIBS)
PKG_CHECK_MODULES(MMLOG,mm-log)
AC_SUBST(MMLOG_CFLAGS)
AC_SUBST(MMLOG_LIBS)
PKG_CHECK_MODULES(GLIB, glib-2.0)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
PKG_CHECK_MODULES(GTK, gtk+-2.0, [HAVE_GTK=yes], [HAVE_GTK=no])
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
PKG_CHECK_MODULES(AVCODEC, libavcodec)
AC_SUBST(AVCODEC_CFLAGS)
AC_SUBST(AVCODEC_LIBS)
PKG_CHECK_MODULES(AVUTIL, libavutil)
AC_SUBST(AVUTIL_CFLAGS)
AC_SUBST(AVUTIL_LIBS)
PKG_CHECK_MODULES(AVFORMAT, libavformat)
AC_SUBST(AVFORMAT_CFLAGS)
AC_SUBST(AVFORMAT_LIBS)
PKG_CHECK_MODULES(SWSCALE, libswscale)
AC_SUBST(SWSCALE_CFLAGS)
AC_SUBST(SWSACLE_LIBS)
dnl use drm --------------------------------------------------------------------------
AC_ARG_ENABLE(drm, AC_HELP_STRING([--enable-drm], [using drm]),
[
case "${enableval}" in
yes) USE_DRM=yes ;;
no) USE_DRM=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-drm) ;;
esac
],[USE_DRM=yes])
if test "x$USE_DRM" = "xyes"; then
PKG_CHECK_MODULES(DRMCLIENT, drm-client)
AC_SUBST(DRMCLIENT_CFLAGS)
AC_SUBST(DRMCLIENT_LIBS)
fi
AM_CONDITIONAL(USE_DRM, test "x$USE_DRM" = "xyes")
dnl use dyn --------------------------------------------------------------------------
AC_ARG_ENABLE(dyn, AC_HELP_STRING([--enable-dyn], [using dyn]),
[
case "${enableval}" in
yes) USE_DYN=yes ;;
no) USE_DYN=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-dyn) ;;
esac
],[USE_DYN=yes])
AM_CONDITIONAL(USE_DYN, test "x$USE_DYN" = "xyes")
AC_MSG_RESULT(checking for USE_DYN ... $USE_DYN)
dnl use iommap --------------------------------------------------------------------------
AC_ARG_ENABLE(iommap, AC_HELP_STRING([--enable-iommap], [using iommap]),
[
case "${enableval}" in
yes) USE_IOMMAP=yes ;;
no) USE_IOMMAP=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-iommap) ;;
esac
],[USE_IOMMAP=no])
AM_CONDITIONAL(USE_IOMMAP, test "x$USE_IOMMAP" = "xyes")
AC_MSG_RESULT(checking for USE_IOMMAP ... $USE_IOMMAP)
dnl use testmode --------------------------------------------------------------------------
AC_ARG_ENABLE(testmode, AC_HELP_STRING([--enable-testmode], [using testmode]),
[
case "${enableval}" in
yes) USE_TESTMODE=yes ;;
no) USE_TESTMODE=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-testmode) ;;
esac
],[USE_TESTMODE=no])
AM_CONDITIONAL(USE_TESTMODE, test "x$USE_TESTMODE" = "xyes")
AC_MSG_RESULT(checking for USE_TESTMODE ... $USE_TESTMODE)
dnl use thumbnail dump --------------------------------------------------------------------------
AC_ARG_ENABLE(dump, AC_HELP_STRING([--enable-dump], [using dump]),
[
case "${enableval}" in
yes) USE_DUMP=yes ;;
no) USE_DUMP=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-dump) ;;
esac
],[USE_DUMP=no])
AM_CONDITIONAL(USE_DUMP, test "x$USE_DUMP" = "xyes")
AC_MSG_RESULT(checking for USE_DUMP ... $USE_DUMP)
dnl use disable gtk --------------------------------------------------------------------------
AC_ARG_ENABLE(gtk, AC_HELP_STRING([--enable-gtk], [using gtk]),
[
case "${enableval}" in
yes) USE_GTK=yes ;;
no) USE_GTK=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk) ;;
esac
],[USE_GTK=yes])
AM_CONDITIONAL(USE_GTK, test "x$USE_GTK" = "xyes")
AC_MSG_RESULT(checking for USE_GTK ... $USE_GTK)
AC_CONFIG_FILES([Makefile
codecs/Makefile
codecs/ffmpeg/Makefile
formats/Makefile
formats/ffmpeg/Makefile
utils/Makefile
tests/Makefile
mm-fileinfo.pc
])
AC_OUTPUT
|