Blame configure.ac

Packit Service 271c72
AC_PREREQ(2.59)
Packit Service 271c72
AC_INIT([EXIF library], [0.6.22], [libexif-devel@lists.sourceforge.net], [libexif])
Packit Service 271c72
AC_CONFIG_SRCDIR([libexif/exif-data.h])
Packit Service 271c72
AC_CONFIG_HEADERS([config.h])
Packit Service 271c72
AC_CONFIG_MACRO_DIR([auto-m4])
Packit Service 271c72
AM_INIT_AUTOMAKE([-Wall gnu 1.9 dist-bzip2 dist-zip check-news subdir-objects])
Packit Service 271c72
AM_MAINTAINER_MODE
Packit Service 271c72
Packit Service 271c72
# Use the silent-rules feature when possible.
Packit Service 271c72
m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
Packit Service 271c72
AM_SILENT_RULES([yes])
Packit Service 271c72
Packit Service 271c72
GP_CHECK_SHELL_ENVIRONMENT
Packit Service 271c72
GP_CONFIG_MSG([Build])
Packit Service 271c72
GP_CONFIG_MSG([Source code location],[${srcdir}])
Packit Service 271c72
Packit Service 271c72
dnl ---------------------------------------------------------------------------
Packit Service 271c72
dnl Advanced information about versioning:
Packit Service 271c72
dnl   * "Writing shared libraries" by Mike Hearn
Packit Service 271c72
dnl         http://plan99.net/~mike/writing-shared-libraries.html
Packit Service 271c72
dnl   * libtool.info chapter "Versioning"
Packit Service 271c72
dnl   * libtool.info chapter "Updating library version information"
Packit Service 271c72
dnl ---------------------------------------------------------------------------
Packit Service 271c72
dnl Versioning:
Packit Service 271c72
dnl  - CURRENT (Major):  Increment if the interface has changes. AGE is always
Packit Service 271c72
dnl                      *changed* at the same time.
Packit Service 271c72
dnl  - AGE (Micro):      Increment if any interfaces have been added; set to 0
Packit Service 271c72
dnl		         if any interfaces have been removed. Removal has 
Packit Service 271c72
dnl                      precedence over adding, so set to 0 if both happened.
Packit Service 271c72
dnl                      It denotes upward compatibility.
Packit Service 271c72
dnl  - REVISION (Minor): Increment any time the source changes; set to 
Packit Service 271c72
dnl			 0 if you incremented CURRENT.
Packit Service 271c72
dnl
Packit Service 271c72
dnl  To summarize. Any interface *change* increment CURRENT. If that interface
Packit Service 271c72
dnl  change does not break upward compatibility (ie it is an addition), 
Packit Service 271c72
dnl  increment AGE, Otherwise AGE is reset to 0. If CURRENT has changed, 
Packit Service 271c72
dnl  REVISION is set to 0, otherwise REVISION is incremented.
Packit Service 271c72
dnl ---------------------------------------------------------------------------
Packit Service 271c72
dnl C:A:R
Packit Service 271c72
dnl 12:0:1   0.6.13
Packit Service 271c72
dnl 13:1:0   added EXIF_DATA_OPTION_DONT_CHANGE_MAKER_NOTE (for 0.6.14)
Packit Service 271c72
dnl 14:2:0   added XP_ WinXP tags (for 0.6.15)
Packit Service 271c72
dnl 14:2:1   0.6.17
Packit Service 271c72
dnl 15:3:0   added exif_loader_get_buf (for 0.6.18)
Packit Service 271c72
dnl 15:3:1   0.6.19
Packit Service 271c72
dnl 15:3:2   0.6.20
Packit Service 271c72
dnl 15:3:3   0.6.21
Packit Service 271c72
dnl 15:3:4   0.6.22
Packit Service 271c72
LIBEXIF_CURRENT=15
Packit Service 271c72
LIBEXIF_AGE=3
Packit Service 271c72
LIBEXIF_REVISION=4
Packit Service 271c72
AC_SUBST([LIBEXIF_AGE])
Packit Service 271c72
AC_SUBST([LIBEXIF_REVISION])
Packit Service 271c72
AC_SUBST([LIBEXIF_CURRENT])
Packit Service 271c72
AC_SUBST([LIBEXIF_CURRENT_MIN],[`expr $LIBEXIF_CURRENT - $LIBEXIF_AGE`])
Packit Service 271c72
LIBEXIF_VERSION_INFO="$LIBEXIF_CURRENT:$LIBEXIF_REVISION:$LIBEXIF_AGE"
Packit Service 271c72
AC_SUBST([LIBEXIF_VERSION_INFO])
Packit Service 271c72
Packit Service 271c72
AM_PROG_CC_C_O
Packit Service 271c72
AC_C_CONST
Packit Service 271c72
AC_C_INLINE
Packit Service 271c72
dnl FIXME: AC_LIBTOOL_WIN32_DLL
Packit Service 271c72
AM_PROG_AR
Packit Service 271c72
AM_PROG_LIBTOOL
Packit Service 271c72
AM_CPPFLAGS="$CPPFLAGS"
Packit Service 271c72
GP_CONFIG_MSG([Compiler],[${CC}])
Packit Service 271c72
Packit Service 271c72
AC_SYS_LARGEFILE
Packit Service 271c72
Packit Service 271c72
dnl Create a stdint.h-like file containing size-specific integer definitions
Packit Service 271c72
dnl that will always be available
Packit Service 271c72
AX_NEED_STDINT_H([libexif/_stdint.h])
Packit Service 271c72
Packit Service 271c72
Packit Service 271c72
dnl ------------------------------------------------------------------------
Packit Service 271c72
dnl Whether we're supposed to ship binaries in the tarball
Packit Service 271c72
dnl ------------------------------------------------------------------------
Packit Service 271c72
Packit Service 271c72
ship_binaries=false
Packit Service 271c72
AC_ARG_ENABLE([ship-binaries],
Packit Service 271c72
[AS_HELP_STRING([--enable-ship-binaries],
Packit Service 271c72
[Whether to ship binaries in the tarball [default=no]])],[
Packit Service 271c72
	if test x$enableval = xyes; then
Packit Service 271c72
		ship_binaries=true
Packit Service 271c72
	fi
Packit Service 271c72
])
Packit Service 271c72
AM_CONDITIONAL([SHIP_BINARIES],[$ship_binaries])
Packit Service 271c72
GP_CONFIG_MSG([Ship binaries in tarball],[$ship_binaries])
Packit Service 271c72
Packit Service 271c72
Packit Service 271c72
dnl ---------------------------------------------------------------------------
Packit Service 271c72
dnl Whether -lm is required for our math functions
Packit Service 271c72
dnl ---------------------------------------------------------------------------
Packit Service 271c72
Packit Service 271c72
# we need sqrt and pow which may be in libm
Packit Service 271c72
# We cannot use AC_CHECK_FUNC because if CFLAGS contains
Packit Service 271c72
# -Wall -Werror here the check fails because
Packit Service 271c72
# char *sqrt() conflicts with double sqrt(double xx)
Packit Service 271c72
Packit Service 271c72
# Start by assuming -lm is needed, because it's possible that the little
Packit Service 271c72
# test program below will be optimized to in-line floating point code that
Packit Service 271c72
# doesn't require -lm, whereas the library itself cannot be so optimized
Packit Service 271c72
# (this actually seems to be the case on x86 with gcc 4.2). Assuming the
Packit Service 271c72
# reverse means that -lm could be needed but wouldn't be detected below.
Packit Service 271c72
Packit Service 271c72
LIBS_orig="$LIBS"
Packit Service 271c72
LIBS="$LIBS -lm"
Packit Service 271c72
AC_MSG_CHECKING([for math functions in libm])
Packit Service 271c72
AC_LINK_IFELSE([AC_LANG_PROGRAM([
Packit Service 271c72
	  #include <math.h>
Packit Service 271c72
	  ],[
Packit Service 271c72
	    double s = sqrt(0);
Packit Service 271c72
	    double p = pow(s,s);
Packit Service 271c72
	  ])],
Packit Service 271c72
	[AC_MSG_RESULT(yes)], [
Packit Service 271c72
	AC_MSG_RESULT(no)
Packit Service 271c72
	LIBS="$LIBS_orig"
Packit Service 271c72
	AC_MSG_CHECKING([for math functions without libm])
Packit Service 271c72
	AC_LINK_IFELSE([AC_LANG_PROGRAM([
Packit Service 271c72
		#include <math.h>
Packit Service 271c72
		],[
Packit Service 271c72
		  double s = sqrt(0);
Packit Service 271c72
		  double p = pow(s,s);
Packit Service 271c72
		])],
Packit Service 271c72
	[
Packit Service 271c72
		AC_MSG_RESULT(yes)
Packit Service 271c72
	],[
Packit Service 271c72
		AC_MSG_RESULT(no)
Packit Service 271c72
		AC_MSG_ERROR([*** Could not find sqrt() & pow() functions])
Packit Service 271c72
	])
Packit Service 271c72
])
Packit Service 271c72
Packit Service 271c72
# Check whether libfailmalloc is available for tests
Packit Service 271c72
CHECK_FAILMALLOC
Packit Service 271c72
Packit Service 271c72
# doc support
Packit Service 271c72
GP_CHECK_DOC_DIR
Packit Service 271c72
GP_CHECK_DOXYGEN
Packit Service 271c72
Packit Service 271c72
# Whether to enable the internal docs build.
Packit Service 271c72
#
Packit Service 271c72
# This takes quite some time due to the generation of lots of call
Packit Service 271c72
# graphs, so it is disabled by default.
Packit Service 271c72
set_enable_internal_docs=no
Packit Service 271c72
AC_ARG_ENABLE([internal-docs], [dnl
Packit Service 271c72
AS_HELP_STRING([--enable-internal-docs], 
Packit Service 271c72
[Build internal code docs if doxygen available])], [dnl
Packit Service 271c72
dnl If either --enable-foo nor --disable-foo were given, execute this.
Packit Service 271c72
  if   test "x$enableval" = xno \
Packit Service 271c72
    || test "x$enableval" = xoff \
Packit Service 271c72
    || test "x$enableval" = xfalse; 
Packit Service 271c72
  then
Packit Service 271c72
    set_enable_internal_docs=no
Packit Service 271c72
  elif test "x$enableval" = xyes \
Packit Service 271c72
    || test "x$enableval" = xon \
Packit Service 271c72
    || test "x$enableval" = xtrue
Packit Service 271c72
  then
Packit Service 271c72
    set_enable_internal_docs=yes
Packit Service 271c72
  fi
Packit Service 271c72
])
Packit Service 271c72
AC_MSG_CHECKING([whether to create internal code docs])
Packit Service 271c72
AC_MSG_RESULT([${set_enable_internal_docs}])
Packit Service 271c72
AM_CONDITIONAL([ENABLE_INTERNAL_DOCS], [test "x${set_enable_internal_docs}" = "xyes"])
Packit Service 271c72
Packit Service 271c72
Packit Service 271c72
# ---------------------------------------------------------------------------
Packit Service 271c72
# i18n support
Packit Service 271c72
# ---------------------------------------------------------------------------
Packit Service 271c72
ALL_LINGUAS="be bs cs da de en_AU en_CA en_GB es fr it ja ms nl pl pt pt_BR ru sk sq sr sv tr uk vi zh_CN"
Packit Service 271c72
AM_PO_SUBDIRS
Packit Service 271c72
GP_GETTEXT_HACK([${PACKAGE}-${LIBEXIF_CURRENT_MIN}],
Packit Service 271c72
                [Lutz Mueller and others])
Packit Service 271c72
AM_GNU_GETTEXT_VERSION([0.14.1])
Packit Service 271c72
AM_GNU_GETTEXT([external])
Packit Service 271c72
AM_ICONV()
Packit Service 271c72
GP_GETTEXT_FLAGS()
Packit Service 271c72
Packit Service 271c72
Packit Service 271c72
dnl ---------------------------------------------------------------------------
Packit Service 271c72
dnl Thread-safe functions
Packit Service 271c72
dnl ---------------------------------------------------------------------------
Packit Service 271c72
AC_CHECK_FUNCS(localtime_r)
Packit Service 271c72
Packit Service 271c72
dnl ---------------------------------------------------------------------------
Packit Service 271c72
dnl Compiler/Linker Options and Warnings
Packit Service 271c72
dnl ---------------------------------------------------------------------------
Packit Service 271c72
AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)"
Packit Service 271c72
AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_builddir)"
Packit Service 271c72
AM_LDFLAGS="$LDFLAGS"
Packit Service 271c72
if test "x$GCC" = "xyes"; then
Packit Service 271c72
    AM_CFLAGS="$AM_CFLAGS -ansi -pedantic-error"
Packit Service 271c72
    AM_CXXFLAGS="$AM_CXXFLAGS -ansi -pedantic-error"
Packit Service 271c72
    AM_CPPFLAGS="$AM_CPPFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes"
Packit Service 271c72
    AM_LDFLAGS="$AM_LDFLAGS -g -Wall"
Packit Service 271c72
fi
Packit Service 271c72
Packit Service 271c72
Packit Service 271c72
Packit Service 271c72
AC_SUBST(AM_CPPFLAGS)
Packit Service 271c72
AC_SUBST(AM_LDFLAGS)
Packit Service 271c72
Packit Service 271c72
Packit Service 271c72
dnl ---------------------------------------------------------------------------
Packit Service 271c72
dnl Output files
Packit Service 271c72
dnl ---------------------------------------------------------------------------
Packit Service 271c72
AC_CONFIG_FILES([  po/Makefile.in
Packit Service 271c72
  Makefile
Packit Service 271c72
  libexif.spec
Packit Service 271c72
  libexif/Makefile
Packit Service 271c72
  test/Makefile
Packit Service 271c72
  test/check-vars.sh
Packit Service 271c72
  test/nls/Makefile
Packit Service 271c72
  m4m/Makefile
Packit Service 271c72
  doc/Makefile
Packit Service 271c72
  doc/Doxyfile
Packit Service 271c72
  doc/Doxyfile-internals
Packit Service 271c72
  libexif.pc
Packit Service 271c72
  libexif-uninstalled.pc
Packit Service 271c72
  binary-dist/Makefile
Packit Service 271c72
  contrib/Makefile
Packit Service 271c72
  contrib/examples/Makefile
Packit Service 271c72
])
Packit Service 271c72
AC_OUTPUT
Packit Service 271c72
Packit Service 271c72
GP_CONFIG_OUTPUT