2 AC_INIT([EXIF library], [0.6.20.1], [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 if test ! -d "$srcdir/m4m"; then
15 You are missing the m4m/ directory in your top
16 $PACKAGE_TARNAME source directory.
18 You are probably using an ill-maintained CVS tree.
24 and re-running autogen.sh might help.
28 GP_CHECK_SHELL_ENVIRONMENT
29 GP_CONFIG_MSG([Build])
30 GP_CONFIG_MSG([Source code location],[${srcdir}])
32 dnl ---------------------------------------------------------------------------
33 dnl Advanced information about versioning:
34 dnl * "Writing shared libraries" by Mike Hearn
35 dnl http://plan99.net/~mike/writing-shared-libraries.html
36 dnl * libtool.info chapter "Versioning"
37 dnl * libtool.info chapter "Updating library version information"
38 dnl ---------------------------------------------------------------------------
40 dnl - CURRENT (Major): Increment if the interface has changes. AGE is always
41 dnl *changed* at the same time.
42 dnl - AGE (Micro): Increment if any interfaces have been added; set to 0
43 dnl if any interfaces have been removed. Removal has
44 dnl precedence over adding, so set to 0 if both happened.
45 dnl It denotes upward compatibility.
46 dnl - REVISION (Minor): Increment any time the source changes; set to
47 dnl 0 if you incremented CURRENT.
49 dnl To summarize. Any interface *change* increment CURRENT. If that interface
50 dnl change does not break upward compatibility (ie it is an addition),
51 dnl increment AGE, Otherwise AGE is reset to 0. If CURRENT has changed,
52 dnl REVISION is set to 0, otherwise REVISION is incremented.
53 dnl ---------------------------------------------------------------------------
56 dnl 13:1:0 added EXIF_DATA_OPTION_DONT_CHANGE_MAKER_NOTE (for 0.6.14)
57 dnl 14:2:0 added XP_ WinXP tags (for 0.6.15)
59 dnl 15:3:0 added exif_loader_get_buf (for 0.6.18)
65 AC_SUBST([LIBEXIF_AGE])
66 AC_SUBST([LIBEXIF_REVISION])
67 AC_SUBST([LIBEXIF_CURRENT])
68 AC_SUBST([LIBEXIF_CURRENT_MIN],[`expr $LIBEXIF_CURRENT - $LIBEXIF_AGE`])
69 LIBEXIF_VERSION_INFO="$LIBEXIF_CURRENT:$LIBEXIF_REVISION:$LIBEXIF_AGE"
70 AC_SUBST([LIBEXIF_VERSION_INFO])
75 dnl FIXME: AC_LIBTOOL_WIN32_DLL
77 AM_CPPFLAGS="$CPPFLAGS"
78 GP_CONFIG_MSG([Compiler],[${CC}])
81 dnl Create a stdint.h-like file containing size-specific integer definitions
82 dnl that will always be available
83 AX_NEED_STDINT_H([libexif/_stdint.h])
86 dnl ------------------------------------------------------------------------
87 dnl Whether we're supposed to ship binaries in the tarball
88 dnl ------------------------------------------------------------------------
91 AC_ARG_ENABLE([ship-binaries],
92 [AS_HELP_STRING([--enable-ship-binaries],
93 [Whether to ship binaries in the tarball [default=no]])],[
94 if test x$enableval = xyes; then
98 AM_CONDITIONAL([SHIP_BINARIES],[$ship_binaries])
99 GP_CONFIG_MSG([Ship binaries in tarball],[$ship_binaries])
102 dnl ---------------------------------------------------------------------------
103 dnl Whether -lm is required for our math functions
104 dnl ---------------------------------------------------------------------------
106 # we need sqrt and pow which may be in libm
107 # We cannot use AC_CHECK_FUNC because if CFLAGS contains
108 # -Wall -Werror here the check fails because
109 # char *sqrt() conflicts with double sqrt(double xx)
111 # Start by assuming -lm is needed, because it's possible that the little
112 # test program below will be optimized to in-line floating point code that
113 # doesn't require -lm, whereas the library itself cannot be so optimized
114 # (this actually seems to be the case on x86 with gcc 4.2). Assuming the
115 # reverse means that -lm could be needed but wouldn't be detected below.
119 AC_MSG_CHECKING([for math functions in libm])
127 ], [AC_MSG_RESULT(yes)], [
130 AC_MSG_CHECKING([for math functions without libm])
142 AC_MSG_ERROR([*** Could not find sqrt() & pow() functions])
150 # Whether to enable the internal docs build.
152 # This takes quite some time due to the generation of lots of call
153 # graphs, so it is disabled by default.
154 set_enable_internal_docs=no
155 AC_ARG_ENABLE([internal-docs], [dnl
156 AS_HELP_STRING([--enable-internal-docs],
157 [Build internal code docs if doxygen available])], [dnl
158 dnl If either --enable-foo nor --disable-foo were given, execute this.
159 if test "x$enableval" = xno \
160 || test "x$enableval" = xoff \
161 || test "x$enableval" = xfalse;
163 set_enable_internal_docs=no
164 elif test "x$enableval" = xyes \
165 || test "x$enableval" = xon \
166 || test "x$enableval" = xtrue
168 set_enable_internal_docs=yes
171 AC_MSG_CHECKING([whether to create internal code docs])
172 AC_MSG_RESULT([${set_enable_internal_docs}])
173 AM_CONDITIONAL([ENABLE_INTERNAL_DOCS], [test "x${set_enable_internal_docs}" = "xyes"])
176 # ---------------------------------------------------------------------------
178 # ---------------------------------------------------------------------------
179 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"
181 GP_GETTEXT_HACK([${PACKAGE}-${LIBEXIF_CURRENT_MIN}],
182 [Lutz Mueller and others])
183 AM_GNU_GETTEXT_VERSION([0.14.1])
184 AM_GNU_GETTEXT([external])
189 dnl ---------------------------------------------------------------------------
190 dnl Thread-safe functions
191 dnl ---------------------------------------------------------------------------
192 AC_CHECK_FUNCS(localtime_r)
194 dnl ---------------------------------------------------------------------------
195 dnl Compiler/Linker Options and Warnings
196 dnl ---------------------------------------------------------------------------
197 AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)"
198 AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_builddir)"
199 AM_LDFLAGS="$LDFLAGS"
200 if test "x$GCC" = "xyes"; then
201 AM_CFLAGS="$AM_CFLAGS -ansi -pedantic-error"
202 AM_CXXFLAGS="$AM_CXXFLAGS -ansi -pedantic-error"
203 AM_CPPFLAGS="$AM_CPPFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes"
204 AM_LDFLAGS="$AM_LDFLAGS -g -Wall"
209 AC_SUBST(AM_CPPFLAGS)
213 dnl ---------------------------------------------------------------------------
215 dnl ---------------------------------------------------------------------------
216 AC_CONFIG_FILES([ po/Makefile.in
225 doc/Doxyfile-internals
227 libexif-uninstalled.pc
230 contrib/examples/Makefile