2005-03-30 Lutz Mueller <lutz@users.sourceforge.net>
[platform/upstream/libexif.git] / configure.in
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 AM_PROG_LIBTOOL
33 AM_CFLAGS="$CFLAGS"
34 GP_CONFIG_MSG([Compiler],[${CC}])
35
36
37 dnl Create a stdint.h-like file containing size-specific integer definitions
38 dnl that will always be available
39 AX_NEED_STDINT_H([libexif/_stdint.h])
40
41
42 dnl ---------------------------------------------------------------------------
43 dnl Whether -lm is required for our math functions
44 dnl ---------------------------------------------------------------------------
45
46 # we need sqrt and pow, but checking for sqrt should be sufficient
47 AC_CHECK_FUNC([sqrt],,[
48 AC_CHECK_LIB([m],[sqrt],[MATHLIBS="-lm"],AC_MSG_ERROR([
49 *** Could not find sqrt() function
50 ]))])
51 AC_SUBST([MATHLIBS])
52
53
54 # ---------------------------------------------------------------------------
55 # i18n support
56 # ---------------------------------------------------------------------------
57 GP_GETTEXT_HACK([${PACKAGE}-${LIBEXIF_CURRENT}],
58                 [Lutz Müller and others])
59 ALL_LINGUAS="de es fr"
60 AM_GNU_GETTEXT_VERSION([0.14.1])
61 AM_GNU_GETTEXT([external])
62 AM_PO_SUBDIRS()
63 AM_ICONV()
64 GP_GETTEXT_FLAGS()
65
66 dnl We cannot use AC_DEFINE_UNQUOTED() for these definitions, as
67 dnl we require make to do insert the proper $(datadir) value
68 localedir="\$(datadir)/locale"
69 AC_SUBST(localedir)
70 AM_CFLAGS="$AM_CFLAGS -DLOCALEDIR=\\\"${localedir}\\\""
71
72
73 dnl ---------------------------------------------------------------------------
74 dnl Compiler/Linker Options and Warnings
75 dnl ---------------------------------------------------------------------------
76 AM_CFLAGS="$AM_CFLAGS -I\$(top_srcdir)"
77 AM_CFLAGS="$AM_CFLAGS -I\$(top_srcdir)/libexif"
78 AM_LDFLAGS="$LDFLAGS"
79 if test "x$GCC" = "xyes"; then
80     AM_CFLAGS="$AM_CFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes"
81     AM_LDFLAGS="$AM_LDFLAGS -g -Wall"
82 fi
83 AC_SUBST(AM_CFLAGS)
84 AC_SUBST(AM_LDFLAGS)
85
86
87 dnl ---------------------------------------------------------------------------
88 dnl Output files
89 dnl ---------------------------------------------------------------------------
90 AC_CONFIG_FILES([ 
91   po/Makefile.in
92   Makefile
93   libexif.spec
94   libexif/Makefile
95   libexif/canon/Makefile
96   libexif/olympus/Makefile
97   libexif/pentax/Makefile
98   test/Makefile
99   test/nls/Makefile
100   m4/Makefile
101   libexif/libexif.pc
102 ])
103 AC_OUTPUT
104
105 GP_CONFIG_OUTPUT