haha. switch from m4/ to m4m/
[platform/upstream/libexif.git] / configure.ac
1 AC_PREREQ(2.59)
2 AC_INIT([EXIF library],[0.6.13],[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])
6
7 GP_CHECK_SHELL_ENVIRONMENT
8
9 GP_CONFIG_MSG([Source code location],[${srcdir}])
10
11 dnl ---------------------------------------------------------------------------
12 dnl Versioning:
13 dnl  - AGE (Micro):      Increment if any interfaces have been added; set to 0
14 dnl                      if any interfaces have been removed. Removal has 
15 dnl                      precedence over adding, so set to 0 if both happened.
16 dnl  - REVISION (Minor): Increment any time the source changes; set to 
17 dnl                      0 if you incremented CURRENT.
18 dnl  - CURRENT (Major):  Increment if the interface has additions, changes,
19 dnl                      removals.
20 dnl ---------------------------------------------------------------------------
21 LIBEXIF_AGE=0
22 LIBEXIF_REVISION=0
23 LIBEXIF_CURRENT=12
24 AC_SUBST([LIBEXIF_AGE])
25 AC_SUBST([LIBEXIF_REVISION])
26 AC_SUBST([LIBEXIF_CURRENT])
27 LIBEXIF_VERSION_INFO=`expr $LIBEXIF_CURRENT + $LIBEXIF_REVISION`:$LIBEXIF_AGE:$LIBEXIF_REVISION
28 AC_SUBST([LIBEXIF_VERSION_INFO])
29
30 AC_PROG_CC
31 AC_C_CONST
32 dnl FIXME: AC_LIBTOOL_WIN32_DLL
33 AM_PROG_LIBTOOL
34 AM_CPPFLAGS="$CPPFLAGS"
35 GP_CONFIG_MSG([Compiler],[${CC}])
36
37
38 dnl Create a stdint.h-like file containing size-specific integer definitions
39 dnl that will always be available
40 AX_NEED_STDINT_H([libexif/_stdint.h])
41
42
43 dnl ---------------------------------------------------------------------------
44 dnl Whether -lm is required for our math functions
45 dnl ---------------------------------------------------------------------------
46
47 # we need sqrt and pow, but checking for sqrt should be sufficient
48 AC_CHECK_FUNC([sqrt],,[
49 AC_CHECK_LIB([m],[sqrt],[MATHLIBS="-lm"],AC_MSG_ERROR([
50 *** Could not find sqrt() function
51 ]))])
52 AC_SUBST([MATHLIBS])
53
54
55 # ---------------------------------------------------------------------------
56 # i18n support
57 # ---------------------------------------------------------------------------
58 GP_GETTEXT_HACK([${PACKAGE}-${LIBEXIF_CURRENT}],
59                 [Lutz Müller and others])
60 ALL_LINGUAS="de es fr"
61 AM_GNU_GETTEXT_VERSION([0.14.1])
62 AM_GNU_GETTEXT([external])
63 AM_PO_SUBDIRS()
64 AM_ICONV()
65 GP_GETTEXT_FLAGS()
66
67 dnl We cannot use AC_DEFINE_UNQUOTED() for these definitions, as
68 dnl we require make to do insert the proper $(datadir) value
69 localedir="\$(datadir)/locale"
70 AC_SUBST(localedir)
71 AM_CPPFLAGS="$AM_CPPFLAGS -DLOCALEDIR=\\\"${localedir}\\\""
72
73
74 dnl ---------------------------------------------------------------------------
75 dnl Compiler/Linker Options and Warnings
76 dnl ---------------------------------------------------------------------------
77 AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)"
78 AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)/libexif"
79 AM_LDFLAGS="$LDFLAGS"
80 if test "x$GCC" = "xyes"; then
81     AM_CPPFLAGS="$AM_CPPFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes"
82     AM_LDFLAGS="$AM_LDFLAGS -g -Wall"
83 fi
84
85
86
87 AC_SUBST(AM_CPPFLAGS)
88 AC_SUBST(AM_LDFLAGS)
89
90
91 dnl ---------------------------------------------------------------------------
92 dnl Output files
93 dnl ---------------------------------------------------------------------------
94 AC_CONFIG_FILES([ 
95   po/Makefile.in
96   Makefile
97   libexif.spec
98   libexif/Makefile
99   libexif/canon/Makefile
100   libexif/olympus/Makefile
101   libexif/pentax/Makefile
102   test/Makefile
103   test/nls/Makefile
104   m4m/Makefile
105   libexif/libexif.pc
106 ])
107 AC_OUTPUT
108
109 GP_CONFIG_OUTPUT