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])
70 PKG_CHECK_MODULES(INIPARSER, iniparser)
71 AC_SUBST(INIPARSER_CFLAGS)
72 AC_SUBST(INIPARSER_LIBS)
74 PKG_CHECK_MODULES(AVCODEC, libavcodec)
75 AC_SUBST(AVCODEC_CFLAGS)
76 AC_SUBST(AVCODEC_LIBS)
78 PKG_CHECK_MODULES(AVUTIL, libavutil)
79 AC_SUBST(AVUTIL_CFLAGS)
82 PKG_CHECK_MODULES(AVFORMAT, libavformat)
83 AC_SUBST(AVFORMAT_CFLAGS)
84 AC_SUBST(AVFORMAT_LIBS)
86 PKG_CHECK_MODULES(SWSCALE, libswscale)
87 AC_SUBST(SWSCALE_CFLAGS)
88 AC_SUBST(SWSACLE_LIBS)
90 PKG_CHECK_MODULES(ICU, icu-i18n)
94 PKG_CHECK_MODULES(VCONF, vconf)
95 AC_SUBST(VCONF_CFLAGS)
98 dnl use dyn --------------------------------------------------------------------------
99 AC_ARG_ENABLE(dyn, AC_HELP_STRING([--enable-dyn], [using dyn]),
101 case "${enableval}" in
104 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dyn) ;;
107 AM_CONDITIONAL(USE_DYN, test "x$USE_DYN" = "xyes")
108 AC_MSG_RESULT(checking for USE_DYN ... $USE_DYN)
110 dnl use iommap --------------------------------------------------------------------------
111 AC_ARG_ENABLE(iommap, AC_HELP_STRING([--enable-iommap], [using iommap]),
113 case "${enableval}" in
114 yes) USE_IOMMAP=yes ;;
116 *) AC_MSG_ERROR(bad value ${enableval} for --enable-iommap) ;;
119 AM_CONDITIONAL(USE_IOMMAP, test "x$USE_IOMMAP" = "xyes")
120 AC_MSG_RESULT(checking for USE_IOMMAP ... $USE_IOMMAP)
122 dnl use testmode --------------------------------------------------------------------------
123 AC_ARG_ENABLE(testmode, AC_HELP_STRING([--enable-testmode], [using testmode]),
125 case "${enableval}" in
126 yes) USE_TESTMODE=yes ;;
127 no) USE_TESTMODE=no ;;
128 *) AC_MSG_ERROR(bad value ${enableval} for --enable-testmode) ;;
131 AM_CONDITIONAL(USE_TESTMODE, test "x$USE_TESTMODE" = "xyes")
132 AC_MSG_RESULT(checking for USE_TESTMODE ... $USE_TESTMODE)
134 dnl use thumbnail dump --------------------------------------------------------------------------
135 AC_ARG_ENABLE(dump, AC_HELP_STRING([--enable-dump], [using dump]),
137 case "${enableval}" in
140 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dump) ;;
143 AM_CONDITIONAL(USE_DUMP, test "x$USE_DUMP" = "xyes")
144 AC_MSG_RESULT(checking for USE_DUMP ... $USE_DUMP)
147 dnl use disable gtk --------------------------------------------------------------------------
148 AC_ARG_ENABLE(gtk, AC_HELP_STRING([--enable-gtk], [using gtk]),
150 case "${enableval}" in
153 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk) ;;
156 AM_CONDITIONAL(USE_GTK, test "x$USE_GTK" = "xyes")
157 AC_MSG_RESULT(checking for USE_GTK ... $USE_GTK)
160 AC_CONFIG_FILES([Makefile
162 codecs/ffmpeg/Makefile
164 formats/ffmpeg/Makefile