2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([libmm-fileinfo],[0.0.1])
6 AC_CONFIG_SRCDIR([mm_file.c])
7 AC_CONFIG_HEADER([config.h])
8 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
9 AC_CONFIG_MACRO_DIR([m4])
11 # Checks for programs.
12 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
18 # Checks for libraries.
19 # FIXME: Replace `main' with a function in `-lavcodec':
20 #AC_CHECK_LIB([avcodec], [main])
21 # FIXME: Replace `main' with a function in `-lavformat':
22 #AC_CHECK_LIB([avformat], [main])
23 # FIXME: Replace `main' with a function in `-lavutil':
24 #AC_CHECK_LIB([avutil], [main])
25 # FIXME: Replace `main' with a function in `-lm':
26 AC_CHECK_LIB([m], [main])
28 # Checks for header files.
31 AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h sys/time.h unistd.h])
33 # Checks for typedefs, structures, and compiler characteristics.
40 # Checks for library functions.
43 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
48 AC_CHECK_FUNCS([gettimeofday memset munmap strcasecmp strdup])
50 PKG_CHECK_MODULES(MMCOMMON,mm-common)
51 AC_SUBST(MMCOMMON_CFLAGS)
52 AC_SUBST(MMCOMMON_LIBS)
54 #PKG_CHECK_MODULES(MMMHAL,mm-mhal)
55 #AC_SUBST(MMMHAL_CFLAGS)
56 #AC_SUBST(MMMHAL_LIBS)
58 PKG_CHECK_MODULES(DLOG,dlog)
62 PKG_CHECK_MODULES(GLIB, glib-2.0)
66 PKG_CHECK_MODULES(GTK, gtk+-2.0, [HAVE_GTK=yes], [HAVE_GTK=no])
71 PKG_CHECK_MODULES(AVCODEC, libavcodec)
72 AC_SUBST(AVCODEC_CFLAGS)
73 AC_SUBST(AVCODEC_LIBS)
75 PKG_CHECK_MODULES(AVUTIL, libavutil)
76 AC_SUBST(AVUTIL_CFLAGS)
79 PKG_CHECK_MODULES(AVFORMAT, libavformat)
80 AC_SUBST(AVFORMAT_CFLAGS)
81 AC_SUBST(AVFORMAT_LIBS)
83 PKG_CHECK_MODULES(SWSCALE, libswscale)
84 AC_SUBST(SWSCALE_CFLAGS)
85 AC_SUBST(SWSACLE_LIBS)
87 PKG_CHECK_MODULES(ICU, icu-i18n)
91 PKG_CHECK_MODULES(VCONF, vconf)
92 AC_SUBST(VCONF_CFLAGS)
95 dnl use drm --------------------------------------------------------------------------
96 AC_ARG_ENABLE(drm, AC_HELP_STRING([--enable-drm], [using drm]),
98 case "${enableval}" in
101 *) AC_MSG_ERROR(bad value ${enableval} for --enable-drm) ;;
104 if test "x$USE_DRM" = "xyes"; then
105 PKG_CHECK_MODULES(DRMCLIENT, drm-client)
106 AC_SUBST(DRMCLIENT_CFLAGS)
107 AC_SUBST(DRMCLIENT_LIBS)
109 PKG_CHECK_MODULES(DRMTRUSTED, drm-trusted)
110 AC_SUBST(DRMTRUSTED_CFLAGS)
111 AC_SUBST(DRMTRUSTED_LIBS)
113 AM_CONDITIONAL(USE_DRM, test "x$USE_DRM" = "xyes")
115 dnl use dyn --------------------------------------------------------------------------
116 AC_ARG_ENABLE(dyn, AC_HELP_STRING([--enable-dyn], [using dyn]),
118 case "${enableval}" in
121 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dyn) ;;
124 AM_CONDITIONAL(USE_DYN, test "x$USE_DYN" = "xyes")
125 AC_MSG_RESULT(checking for USE_DYN ... $USE_DYN)
127 dnl use iommap --------------------------------------------------------------------------
128 AC_ARG_ENABLE(iommap, AC_HELP_STRING([--enable-iommap], [using iommap]),
130 case "${enableval}" in
131 yes) USE_IOMMAP=yes ;;
133 *) AC_MSG_ERROR(bad value ${enableval} for --enable-iommap) ;;
136 AM_CONDITIONAL(USE_IOMMAP, test "x$USE_IOMMAP" = "xyes")
137 AC_MSG_RESULT(checking for USE_IOMMAP ... $USE_IOMMAP)
139 dnl use testmode --------------------------------------------------------------------------
140 AC_ARG_ENABLE(testmode, AC_HELP_STRING([--enable-testmode], [using testmode]),
142 case "${enableval}" in
143 yes) USE_TESTMODE=yes ;;
144 no) USE_TESTMODE=no ;;
145 *) AC_MSG_ERROR(bad value ${enableval} for --enable-testmode) ;;
148 AM_CONDITIONAL(USE_TESTMODE, test "x$USE_TESTMODE" = "xyes")
149 AC_MSG_RESULT(checking for USE_TESTMODE ... $USE_TESTMODE)
151 dnl use thumbnail dump --------------------------------------------------------------------------
152 AC_ARG_ENABLE(dump, AC_HELP_STRING([--enable-dump], [using dump]),
154 case "${enableval}" in
157 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dump) ;;
160 AM_CONDITIONAL(USE_DUMP, test "x$USE_DUMP" = "xyes")
161 AC_MSG_RESULT(checking for USE_DUMP ... $USE_DUMP)
164 dnl use disable gtk --------------------------------------------------------------------------
165 AC_ARG_ENABLE(gtk, AC_HELP_STRING([--enable-gtk], [using gtk]),
167 case "${enableval}" in
170 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk) ;;
173 AM_CONDITIONAL(USE_GTK, test "x$USE_GTK" = "xyes")
174 AC_MSG_RESULT(checking for USE_GTK ... $USE_GTK)
177 AC_CONFIG_FILES([Makefile
179 codecs/ffmpeg/Makefile
181 formats/ffmpeg/Makefile