test doxygen for API docs (read doc/README.apidocs first)
[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 # doc support
56 GP_CHECK_DOC_DIR
57 GP_CHECK_DOXYGEN
58
59
60 # ---------------------------------------------------------------------------
61 # i18n support
62 # ---------------------------------------------------------------------------
63 GP_GETTEXT_HACK([${PACKAGE}-${LIBEXIF_CURRENT}],
64                 [Lutz Müller and others])
65 ALL_LINGUAS="de es fr"
66 AM_GNU_GETTEXT_VERSION([0.14.1])
67 AM_GNU_GETTEXT([external])
68 AM_PO_SUBDIRS()
69 AM_ICONV()
70 GP_GETTEXT_FLAGS()
71
72 dnl We cannot use AC_DEFINE_UNQUOTED() for these definitions, as
73 dnl we require make to do insert the proper $(datadir) value
74 localedir="\$(datadir)/locale"
75 AC_SUBST(localedir)
76 AM_CPPFLAGS="$AM_CPPFLAGS -DLOCALEDIR=\\\"${localedir}\\\""
77
78
79 dnl ---------------------------------------------------------------------------
80 dnl Compiler/Linker Options and Warnings
81 dnl ---------------------------------------------------------------------------
82 AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)"
83 AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)/libexif"
84 AM_LDFLAGS="$LDFLAGS"
85 if test "x$GCC" = "xyes"; then
86     AM_CPPFLAGS="$AM_CPPFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes"
87     AM_LDFLAGS="$AM_LDFLAGS -g -Wall"
88 fi
89
90
91
92 AC_SUBST(AM_CPPFLAGS)
93 AC_SUBST(AM_LDFLAGS)
94
95
96 dnl ---------------------------------------------------------------------------
97 dnl Output files
98 dnl ---------------------------------------------------------------------------
99 AC_CONFIG_FILES([ 
100   po/Makefile.in
101   Makefile
102   libexif.spec
103   libexif/Makefile
104   libexif/canon/Makefile
105   libexif/olympus/Makefile
106   libexif/pentax/Makefile
107   test/Makefile
108   test/nls/Makefile
109   m4m/Makefile
110   doc/Makefile
111   doc/Doxyfile
112   libexif/libexif.pc
113 ])
114 AC_OUTPUT
115
116 GP_CONFIG_OUTPUT