added russian.
[platform/upstream/libexif.git] / configure.ac
1 AC_PREREQ(2.59)
2 AC_INIT([EXIF library],[0.6.14],[libexif-devel@lists.sourceforge.net],[libexif])
3 AC_CONFIG_SRCDIR([libexif/exif-data.h])
4 AC_CONFIG_HEADERS([config.h])
5 AM_INIT_AUTOMAKE([gnu 1.8 dist-bzip2 dist-zip])
6
7 if test ! -d "$srcdir/m4m"; then
8 AC_MSG_ERROR([
9 You are missing the m4m/ directory in your top
10 $PACKAGE_TARNAME source directory.
11
12 You are probably using an ill-maintained CVS tree.
13 Running
14
15     cd $srcdir
16     cvs co m4m
17
18 and re-running autogen.sh might help.
19 ])
20 fi
21
22 GP_CHECK_SHELL_ENVIRONMENT
23 GP_CONFIG_MSG([Build])
24 GP_CONFIG_MSG([Source code location],[${srcdir}])
25
26 dnl ---------------------------------------------------------------------------
27 dnl Advanced information about versioning:
28 dnl   * "Writing shared libraries" by Mike Hearn
29 dnl         http://navi.cx/~mike/writing-shared-libraries.html
30 dnl   * libtool.info chapter "Versioning"
31 dnl   * libtool.info chapter "Updating library version information"
32 dnl ---------------------------------------------------------------------------
33 dnl Versioning:
34 dnl  - CURRENT (Major):  Increment if the interface has changes. AGE is always
35 dnl                      *changed* at the same time.
36 dnl  - AGE (Micro):      Increment if any interfaces have been added; set to 0
37 dnl                      if any interfaces have been removed. Removal has 
38 dnl                      precedence over adding, so set to 0 if both happened.
39 dnl                      It denotes upward compatibility.
40 dnl  - REVISION (Minor): Increment any time the source changes; set to 
41 dnl                      0 if you incremented CURRENT.
42 dnl
43 dnl  To summarize. Any interface *change* increment CURRENT. If that interface
44 dnl  change does not break upward compatibility (ie it is an addition), 
45 dnl  increment AGE, Otherwise AGE is reset to 0. If CURRENT has changed, 
46 dnl  REVISION is set to 0, otherwise REVISION is incremented.
47 dnl ---------------------------------------------------------------------------
48 LIBEXIF_AGE=0
49 LIBEXIF_REVISION=1
50 LIBEXIF_CURRENT=12
51 AC_SUBST([LIBEXIF_AGE])
52 AC_SUBST([LIBEXIF_REVISION])
53 AC_SUBST([LIBEXIF_CURRENT])
54 AC_SUBST([LIBEXIF_CURRENT_MIN],[`expr $LIBEXIF_CURRENT - $LIBEXIF_AGE`])
55 LIBEXIF_VERSION_INFO="$LIBEXIF_CURRENT:$LIBEXIF_REVISION:$LIBEXIF_AGE"
56 AC_SUBST([LIBEXIF_VERSION_INFO])
57
58 AC_PROG_CC
59 AC_C_CONST
60 dnl FIXME: AC_LIBTOOL_WIN32_DLL
61 AM_PROG_LIBTOOL
62 AM_CPPFLAGS="$CPPFLAGS"
63 GP_CONFIG_MSG([Compiler],[${CC}])
64
65
66 dnl Create a stdint.h-like file containing size-specific integer definitions
67 dnl that will always be available
68 AX_NEED_STDINT_H([libexif/_stdint.h])
69
70
71 dnl ------------------------------------------------------------------------
72 dnl Whether we're supposed to ship binaries in the tarball
73 dnl ------------------------------------------------------------------------
74
75 ship_binaries=false
76 AC_ARG_ENABLE([ship-binaries],
77 [AS_HELP_STRING([--enable-ship-binaries],
78 [Whether to ship binaries in the tarball [default=no]])],[
79         if test x$enableval = xyes; then
80                 ship_binaries=true
81         fi
82 ])
83 AM_CONDITIONAL([SHIP_BINARIES],[$ship_binaries])
84 GP_CONFIG_MSG([Ship binaries in tarball],[$ship_binaries])
85
86
87 dnl ---------------------------------------------------------------------------
88 dnl Whether -lm is required for our math functions
89 dnl ---------------------------------------------------------------------------
90
91 # we need sqrt and pow, but checking for sqrt should be sufficient
92 AC_ARG_VAR([MATHLIBS],[The libraries required for mathematical functions, e.g. -lm])
93 if test "x$MATHLIBS" = "x"; then
94         # We must not compile with -Wall -Werror here:
95         # char *sqrt() conflicts with double sin(const double xx) in any case.
96         CFLAGS_save="$CFLAGS"
97         CPPFLAGS_save="$CPPFLAGS"
98         CPPFLAGS=""
99         CFLAGS=""
100         AC_CHECK_FUNC([sqrt],[
101                 MATHLIBS=""
102         ],[
103                 AC_CHECK_LIB([m],[sqrt],[
104                         MATHLIBS="-lm"
105                 ],[
106                         AC_MSG_ERROR([
107 *** Could not find sqrt() function
108 ])
109                 ])
110         ])
111         CFLAGS="$CFLAGS_save"
112         CPPFLAGS="$CPPFLAGS_save"
113 fi
114 AC_SUBST([MATHLIBS])
115
116
117 # doc support
118 GP_CHECK_DOC_DIR
119 GP_CHECK_DOXYGEN
120
121
122 # ---------------------------------------------------------------------------
123 # i18n support
124 # ---------------------------------------------------------------------------
125 GP_GETTEXT_HACK([${PACKAGE}-${LIBEXIF_CURRENT_MIN}],
126                 [Lutz Mueller and others])
127 ALL_LINGUAS="de es fr pl ru"
128 AM_GNU_GETTEXT_VERSION([0.14.1])
129 AM_GNU_GETTEXT([external])
130 AM_PO_SUBDIRS()
131 AM_ICONV()
132 GP_GETTEXT_FLAGS()
133
134 dnl We cannot use AC_DEFINE_UNQUOTED() for these definitions, as
135 dnl we require make to do insert the proper $(datadir) value
136 localedir="\$(datadir)/locale"
137 AC_SUBST(localedir)
138 AM_CPPFLAGS="$AM_CPPFLAGS -DLOCALEDIR=\\\"${localedir}\\\""
139
140
141 dnl ---------------------------------------------------------------------------
142 dnl Compiler/Linker Options and Warnings
143 dnl ---------------------------------------------------------------------------
144 AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)"
145 AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)/libexif"
146 AM_LDFLAGS="$LDFLAGS"
147 if test "x$GCC" = "xyes"; then
148     AM_CPPFLAGS="$AM_CPPFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes"
149     AM_LDFLAGS="$AM_LDFLAGS -g -Wall"
150 fi
151
152
153
154 AC_SUBST(AM_CPPFLAGS)
155 AC_SUBST(AM_LDFLAGS)
156
157
158 dnl ---------------------------------------------------------------------------
159 dnl Output files
160 dnl ---------------------------------------------------------------------------
161 AC_CONFIG_FILES([ 
162   po/Makefile.in
163   Makefile
164   libexif.spec
165   libexif/Makefile
166   libexif/canon/Makefile
167   libexif/olympus/Makefile
168   libexif/pentax/Makefile
169   test/Makefile
170   test/nls/Makefile
171   m4m/Makefile
172   doc/Makefile
173   doc/Doxyfile
174   doc/Doxyfile-internals
175   libexif/libexif.pc
176   binary/Makefile
177 ])
178 AC_OUTPUT
179
180 GP_CONFIG_OUTPUT