simplified gettext macros, improved config output
[platform/upstream/libexif.git] / configure.in
1 AC_PREREQ(2.59)
2 AC_INIT([EXIF library],[0.6.12],[libexif-devel@lists.sourceforge.net],[libexif])
3 AC_CONFIG_SRCDIR([libexif/exif-data.h])
4 AM_CONFIG_HEADER([config.h])
5 AM_INIT_AUTOMAKE([gnu 1.8 dist-bzip2])
6 GP_CONFIG_INIT
7 GP_CONFIG_MSG([Source code location],[${srcdir}])
8
9 dnl ---------------------------------------------------------------------------
10 dnl Versioning:
11 dnl  - AGE (Micro):      Increment if any interfaces have been added; set to 0
12 dnl                      if any interfaces have been removed. Removal has 
13 dnl                      precedence over adding, so set to 0 if both happened.
14 dnl  - REVISION (Minor): Increment any time the source changes; set to 
15 dnl                      0 if you incremented CURRENT.
16 dnl  - CURRENT (Major):  Increment if the interface has additions, changes,
17 dnl                      removals.
18 dnl ---------------------------------------------------------------------------
19 LIBEXIF_AGE=0
20 LIBEXIF_REVISION=0
21 LIBEXIF_CURRENT=12
22 AC_SUBST([LIBEXIF_AGE])
23 AC_SUBST([LIBEXIF_REVISION])
24 AC_SUBST([LIBEXIF_CURRENT])
25 LIBEXIF_VERSION_INFO=`expr $LIBEXIF_CURRENT + $LIBEXIF_REVISION`:$LIBEXIF_AGE:$LIBEXIF_REVISION
26 AC_SUBST([LIBEXIF_VERSION_INFO])
27
28 AC_PROG_CC
29 AM_PROG_CC_STDC
30 AC_C_CONST
31 AM_PROG_LIBTOOL
32 AM_CFLAGS="$CFLAGS"
33 GP_CONFIG_MSG([Compiler],[${CC}])
34
35
36 dnl Create a stdint.h-like file containing size-specific integer definitions
37 dnl that will always be available
38 AC_NEED_STDINT_H([libexif/_stdint.h])
39
40
41 dnl ---------------------------------------------------------------------------
42 dnl Whether -lm is required for our math functions
43 dnl ---------------------------------------------------------------------------
44
45 # we need sqrt and pow, but checking for sqrt should be sufficient
46 AC_CHECK_FUNC([sqrt],,[
47 AC_CHECK_LIB([m],[sqrt],[MATHLIBS="-lm"],AC_MSG_ERROR([
48 *** Couldn't find sqrt
49 ]))])
50 AC_SUBST(MATHLIBS)
51
52
53 dnl ---------------------------------------------------------------------------
54 dnl i18n support
55 dnl ---------------------------------------------------------------------------
56 GP_GETTEXT_HACK([${PACKAGE}-${LIBEXIF_CURRENT}],
57                 [Lutz Müller and others])
58 ALL_LINGUAS="de es fr"
59 AM_GNU_GETTEXT_VERSION([0.14.1])
60 AM_GNU_GETTEXT
61 GP_GETTEXT_FLAGS
62
63 AC_DEFINE_UNQUOTED([LIBEXIF_LOCALEDIR],["${datadir}/locale"],
64                    [The locale directory used with libexif translations])
65 AC_DEFINE_UNQUOTED([LIBMNOTE_LOCALEDIR],["${datadir}/locale"],
66                    [The locale directory used with libexif translations])
67
68
69 dnl ---------------------------------------------------------------------------
70 dnl Compiler/Linker Options and Warnings
71 dnl ---------------------------------------------------------------------------
72 AM_CFLAGS="$AM_CFLAGS -I\$(top_srcdir)"
73 AM_CFLAGS="$AM_CFLAGS -I\$(top_srcdir)/libexif"
74 AM_CFLAGS="$AM_CFLAGS -I\$(top_srcdir)/libjpeg"
75 AM_LDFLAGS="$LDFLAGS"
76 if test "x$GCC" = "xyes"; then
77     AM_CFLAGS="$AM_CFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes"
78     AM_LDFLAGS="$AM_LDFLAGS -g -Wall"
79 fi
80 AC_SUBST(AM_CFLAGS)
81 AC_SUBST(AM_LDFLAGS)
82
83 dnl ---------------------------------------------------------------------------
84 dnl Output files
85 dnl ---------------------------------------------------------------------------
86 AC_CONFIG_FILES([ 
87   intl/Makefile
88   po/Makefile.in
89   Makefile
90   libexif.spec
91   libexif/Makefile
92   libexif/canon/Makefile
93   libexif/olympus/Makefile
94   libexif/pentax/Makefile
95   libjpeg/Makefile
96   test/Makefile
97   m4/Makefile
98   libexif/libexif.pc
99 ])
100 AC_OUTPUT
101
102 GP_CONFIG_OUTPUT