AC_PREREQ(2.59) AC_INIT([EXIF library],[0.6.13],[libexif-devel@lists.sourceforge.net],[libexif]) AC_CONFIG_SRCDIR([libexif/exif-data.h]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([gnu 1.8 dist-bzip2]) GP_CHECK_SHELL_ENVIRONMENT GP_CONFIG_MSG([Source code location],[${srcdir}]) dnl --------------------------------------------------------------------------- dnl Versioning: dnl - AGE (Micro): Increment if any interfaces have been added; set to 0 dnl if any interfaces have been removed. Removal has dnl precedence over adding, so set to 0 if both happened. dnl - REVISION (Minor): Increment any time the source changes; set to dnl 0 if you incremented CURRENT. dnl - CURRENT (Major): Increment if the interface has additions, changes, dnl removals. dnl --------------------------------------------------------------------------- LIBEXIF_AGE=0 LIBEXIF_REVISION=0 LIBEXIF_CURRENT=12 AC_SUBST([LIBEXIF_AGE]) AC_SUBST([LIBEXIF_REVISION]) AC_SUBST([LIBEXIF_CURRENT]) LIBEXIF_VERSION_INFO=`expr $LIBEXIF_CURRENT + $LIBEXIF_REVISION`:$LIBEXIF_AGE:$LIBEXIF_REVISION AC_SUBST([LIBEXIF_VERSION_INFO]) AC_PROG_CC AC_C_CONST AM_PROG_LIBTOOL AM_CFLAGS="$CFLAGS" GP_CONFIG_MSG([Compiler],[${CC}]) dnl Create a stdint.h-like file containing size-specific integer definitions dnl that will always be available AX_NEED_STDINT_H([libexif/_stdint.h]) dnl --------------------------------------------------------------------------- dnl Whether -lm is required for our math functions dnl --------------------------------------------------------------------------- # we need sqrt and pow, but checking for sqrt should be sufficient AC_CHECK_FUNC([sqrt],,[ AC_CHECK_LIB([m],[sqrt],[MATHLIBS="-lm"],AC_MSG_ERROR([ *** Could not find sqrt() function ]))]) AC_SUBST([MATHLIBS]) # --------------------------------------------------------------------------- # i18n support # --------------------------------------------------------------------------- GP_GETTEXT_HACK([${PACKAGE}-${LIBEXIF_CURRENT}], [Lutz Müller and others]) ALL_LINGUAS="de es fr" AM_GNU_GETTEXT_VERSION([0.14.1]) AM_GNU_GETTEXT([external]) AM_PO_SUBDIRS() AM_ICONV() GP_GETTEXT_FLAGS() dnl We cannot use AC_DEFINE_UNQUOTED() for these definitions, as dnl we require make to do insert the proper $(datadir) value localedir="\$(datadir)/locale" AC_SUBST(localedir) AM_CFLAGS="$AM_CFLAGS -DLOCALEDIR=\\\"${localedir}\\\"" dnl --------------------------------------------------------------------------- dnl Compiler/Linker Options and Warnings dnl --------------------------------------------------------------------------- AM_CFLAGS="$AM_CFLAGS -I\$(top_srcdir)" AM_CFLAGS="$AM_CFLAGS -I\$(top_srcdir)/libexif" AM_LDFLAGS="$LDFLAGS" if test "x$GCC" = "xyes"; then AM_CFLAGS="$AM_CFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes" AM_LDFLAGS="$AM_LDFLAGS -g -Wall" fi AC_SUBST(AM_CFLAGS) AC_SUBST(AM_LDFLAGS) dnl --------------------------------------------------------------------------- dnl Output files dnl --------------------------------------------------------------------------- AC_CONFIG_FILES([ po/Makefile.in Makefile libexif.spec libexif/Makefile libexif/canon/Makefile libexif/olympus/Makefile libexif/pentax/Makefile test/Makefile test/nls/Makefile m4/Makefile libexif/libexif.pc ]) AC_OUTPUT GP_CONFIG_OUTPUT