2 AC_INIT([EXIF library], [0.6.21], [libexif-devel@lists.sourceforge.net], [libexif])
3 AC_CONFIG_SRCDIR([libexif/exif-data.h])
4 AC_CONFIG_HEADERS([config.h])
5 AC_CONFIG_MACRO_DIR([auto-m4])
6 AM_INIT_AUTOMAKE([-Wall gnu 1.9 dist-bzip2 dist-zip check-news])
9 # Use the silent-rules feature when possible.
10 m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
13 # Checks for programs.
14 m4_pattern_allow([AM_PROG_AR])
17 if test ! -d "$srcdir/m4m"; then
19 You are missing the m4m/ directory in your top
20 $PACKAGE_TARNAME source directory.
22 You are probably using an ill-maintained CVS tree.
28 and re-running autogen.sh might help.
32 GP_CHECK_SHELL_ENVIRONMENT
33 GP_CONFIG_MSG([Build])
34 GP_CONFIG_MSG([Source code location],[${srcdir}])
36 dnl ---------------------------------------------------------------------------
37 dnl Advanced information about versioning:
38 dnl * "Writing shared libraries" by Mike Hearn
39 dnl http://plan99.net/~mike/writing-shared-libraries.html
40 dnl * libtool.info chapter "Versioning"
41 dnl * libtool.info chapter "Updating library version information"
42 dnl ---------------------------------------------------------------------------
44 dnl - CURRENT (Major): Increment if the interface has changes. AGE is always
45 dnl *changed* at the same time.
46 dnl - AGE (Micro): Increment if any interfaces have been added; set to 0
47 dnl if any interfaces have been removed. Removal has
48 dnl precedence over adding, so set to 0 if both happened.
49 dnl It denotes upward compatibility.
50 dnl - REVISION (Minor): Increment any time the source changes; set to
51 dnl 0 if you incremented CURRENT.
53 dnl To summarize. Any interface *change* increment CURRENT. If that interface
54 dnl change does not break upward compatibility (ie it is an addition),
55 dnl increment AGE, Otherwise AGE is reset to 0. If CURRENT has changed,
56 dnl REVISION is set to 0, otherwise REVISION is incremented.
57 dnl ---------------------------------------------------------------------------
60 dnl 13:1:0 added EXIF_DATA_OPTION_DONT_CHANGE_MAKER_NOTE (for 0.6.14)
61 dnl 14:2:0 added XP_ WinXP tags (for 0.6.15)
63 dnl 15:3:0 added exif_loader_get_buf (for 0.6.18)
70 AC_SUBST([LIBEXIF_AGE])
71 AC_SUBST([LIBEXIF_REVISION])
72 AC_SUBST([LIBEXIF_CURRENT])
73 AC_SUBST([LIBEXIF_CURRENT_MIN],[`expr $LIBEXIF_CURRENT - $LIBEXIF_AGE`])
74 LIBEXIF_VERSION_INFO="$LIBEXIF_CURRENT:$LIBEXIF_REVISION:$LIBEXIF_AGE"
75 AC_SUBST([LIBEXIF_VERSION_INFO])
80 dnl FIXME: AC_LIBTOOL_WIN32_DLL
82 AM_CPPFLAGS="$CPPFLAGS"
83 GP_CONFIG_MSG([Compiler],[${CC}])
86 dnl Create a stdint.h-like file containing size-specific integer definitions
87 dnl that will always be available
88 AX_NEED_STDINT_H([libexif/_stdint.h])
91 dnl ------------------------------------------------------------------------
92 dnl Whether we're supposed to ship binaries in the tarball
93 dnl ------------------------------------------------------------------------
96 AC_ARG_ENABLE([ship-binaries],
97 [AS_HELP_STRING([--enable-ship-binaries],
98 [Whether to ship binaries in the tarball [default=no]])],[
99 if test x$enableval = xyes; then
103 AM_CONDITIONAL([SHIP_BINARIES],[$ship_binaries])
104 GP_CONFIG_MSG([Ship binaries in tarball],[$ship_binaries])
107 AM_CONDITIONAL([BUILD_DOCS],[$enable_docs])
108 AM_CONDITIONAL([HAVE_DOXYGEN],[$enable_docs])
111 dnl ---------------------------------------------------------------------------
112 dnl Whether -lm is required for our math functions
113 dnl ---------------------------------------------------------------------------
115 # we need sqrt and pow which may be in libm
116 # We cannot use AC_CHECK_FUNC because if CFLAGS contains
117 # -Wall -Werror here the check fails because
118 # char *sqrt() conflicts with double sqrt(double xx)
120 # Start by assuming -lm is needed, because it's possible that the little
121 # test program below will be optimized to in-line floating point code that
122 # doesn't require -lm, whereas the library itself cannot be so optimized
123 # (this actually seems to be the case on x86 with gcc 4.2). Assuming the
124 # reverse means that -lm could be needed but wouldn't be detected below.
128 AC_MSG_CHECKING([for math functions in libm])
136 ], [AC_MSG_RESULT(yes)], [
139 AC_MSG_CHECKING([for math functions without libm])
151 AC_MSG_ERROR([*** Could not find sqrt() & pow() functions])
159 # Whether to enable the internal docs build.
161 # This takes quite some time due to the generation of lots of call
162 # graphs, so it is disabled by default.
163 set_enable_internal_docs=no
164 AC_ARG_ENABLE([internal-docs], [dnl
165 AS_HELP_STRING([--enable-internal-docs],
166 [Build internal code docs if doxygen available])], [dnl
167 dnl If either --enable-foo nor --disable-foo were given, execute this.
168 if test "x$enableval" = xno \
169 || test "x$enableval" = xoff \
170 || test "x$enableval" = xfalse;
172 set_enable_internal_docs=no
173 elif test "x$enableval" = xyes \
174 || test "x$enableval" = xon \
175 || test "x$enableval" = xtrue
177 set_enable_internal_docs=yes
180 AC_MSG_CHECKING([whether to create internal code docs])
181 AC_MSG_RESULT([${set_enable_internal_docs}])
182 AM_CONDITIONAL([ENABLE_INTERNAL_DOCS], [test "x${set_enable_internal_docs}" = "xyes"])
185 # ---------------------------------------------------------------------------
187 # ---------------------------------------------------------------------------
188 ALL_LINGUAS="be bs cs da de en_AU en_CA en_GB es fr it ja nl pl pt pt_BR ru sk sq sr sv tr uk vi zh_CN"
190 GP_GETTEXT_HACK([${PACKAGE}-${LIBEXIF_CURRENT_MIN}],
191 [Lutz Mueller and others])
192 AM_GNU_GETTEXT_VERSION([0.14.1])
193 AM_GNU_GETTEXT([external])
198 dnl ---------------------------------------------------------------------------
199 dnl Thread-safe functions
200 dnl ---------------------------------------------------------------------------
201 AC_CHECK_FUNCS(localtime_r)
203 dnl ---------------------------------------------------------------------------
204 dnl Compiler/Linker Options and Warnings
205 dnl ---------------------------------------------------------------------------
206 AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)"
207 AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_builddir)"
208 AM_LDFLAGS="$LDFLAGS"
209 if test "x$GCC" = "xyes"; then
210 AM_CFLAGS="$AM_CFLAGS -ansi -pedantic-error"
211 AM_CXXFLAGS="$AM_CXXFLAGS -ansi -pedantic-error"
212 AM_CPPFLAGS="$AM_CPPFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes"
213 AM_LDFLAGS="$AM_LDFLAGS -g -Wall"
218 AC_SUBST(AM_CPPFLAGS)
222 dnl ---------------------------------------------------------------------------
224 dnl ---------------------------------------------------------------------------
225 AC_CONFIG_FILES([ po/Makefile.in
234 doc/Doxyfile-internals
236 libexif-uninstalled.pc
239 contrib/examples/Makefile