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 dyn --------------------------------------------------------------------------
96 AC_ARG_ENABLE(dyn, AC_HELP_STRING([--enable-dyn], [using dyn]),
98 case "${enableval}" in
101 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dyn) ;;
104 AM_CONDITIONAL(USE_DYN, test "x$USE_DYN" = "xyes")
105 AC_MSG_RESULT(checking for USE_DYN ... $USE_DYN)
107 dnl use iommap --------------------------------------------------------------------------
108 AC_ARG_ENABLE(iommap, AC_HELP_STRING([--enable-iommap], [using iommap]),
110 case "${enableval}" in
111 yes) USE_IOMMAP=yes ;;
113 *) AC_MSG_ERROR(bad value ${enableval} for --enable-iommap) ;;
116 AM_CONDITIONAL(USE_IOMMAP, test "x$USE_IOMMAP" = "xyes")
117 AC_MSG_RESULT(checking for USE_IOMMAP ... $USE_IOMMAP)
119 dnl use testmode --------------------------------------------------------------------------
120 AC_ARG_ENABLE(testmode, AC_HELP_STRING([--enable-testmode], [using testmode]),
122 case "${enableval}" in
123 yes) USE_TESTMODE=yes ;;
124 no) USE_TESTMODE=no ;;
125 *) AC_MSG_ERROR(bad value ${enableval} for --enable-testmode) ;;
128 AM_CONDITIONAL(USE_TESTMODE, test "x$USE_TESTMODE" = "xyes")
129 AC_MSG_RESULT(checking for USE_TESTMODE ... $USE_TESTMODE)
131 dnl use thumbnail dump --------------------------------------------------------------------------
132 AC_ARG_ENABLE(dump, AC_HELP_STRING([--enable-dump], [using dump]),
134 case "${enableval}" in
137 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dump) ;;
140 AM_CONDITIONAL(USE_DUMP, test "x$USE_DUMP" = "xyes")
141 AC_MSG_RESULT(checking for USE_DUMP ... $USE_DUMP)
144 dnl use disable gtk --------------------------------------------------------------------------
145 AC_ARG_ENABLE(gtk, AC_HELP_STRING([--enable-gtk], [using gtk]),
147 case "${enableval}" in
150 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk) ;;
153 AM_CONDITIONAL(USE_GTK, test "x$USE_GTK" = "xyes")
154 AC_MSG_RESULT(checking for USE_GTK ... $USE_GTK)
157 AC_CONFIG_FILES([Makefile
159 codecs/ffmpeg/Makefile
161 formats/ffmpeg/Makefile