X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure.ac;h=f39b4f355ff5a92c12c9bea93daaa886efead6ba;hb=25a756cedfae72a78308b6de244978b05ed780e7;hp=28c9b09b04c1922a330594f3aab2f7c72738be06;hpb=5a91913fd7a0aceb16dfc85e8b5d5ce319a1d0f7;p=platform%2Fupstream%2Flibexif.git diff --git a/configure.ac b/configure.ac index 28c9b09..f39b4f3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,24 +1,14 @@ AC_PREREQ(2.59) -AC_INIT([EXIF library],[0.6.14.cvs1],[libexif-devel@lists.sourceforge.net],[libexif]) +AC_INIT([EXIF library], [0.6.21.1], [libexif-devel@lists.sourceforge.net], [libexif]) AC_CONFIG_SRCDIR([libexif/exif-data.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([auto-m4]) -AM_INIT_AUTOMAKE([-Wall gnu 1.9 dist-bzip2 dist-zip check-news]) +AM_INIT_AUTOMAKE([-Wall gnu 1.9 dist-bzip2 dist-zip check-news subdir-objects]) +AM_MAINTAINER_MODE -if test ! -d "$srcdir/m4m"; then -AC_MSG_ERROR([ -You are missing the m4m/ directory in your top -$PACKAGE_TARNAME source directory. - -You are probably using an ill-maintained CVS tree. -Running - - cd $srcdir - cvs co m4m - -and re-running autogen.sh might help. -]) -fi +# Use the silent-rules feature when possible. +m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])]) +AM_SILENT_RULES([yes]) GP_CHECK_SHELL_ENVIRONMENT GP_CONFIG_MSG([Build]) @@ -27,7 +17,7 @@ GP_CONFIG_MSG([Source code location],[${srcdir}]) dnl --------------------------------------------------------------------------- dnl Advanced information about versioning: dnl * "Writing shared libraries" by Mike Hearn -dnl http://navi.cx/~mike/writing-shared-libraries.html +dnl http://plan99.net/~mike/writing-shared-libraries.html dnl * libtool.info chapter "Versioning" dnl * libtool.info chapter "Updating library version information" dnl --------------------------------------------------------------------------- @@ -49,9 +39,15 @@ dnl --------------------------------------------------------------------------- dnl C:A:R dnl 12:0:1 0.6.13 dnl 13:1:0 added EXIF_DATA_OPTION_DONT_CHANGE_MAKER_NOTE (for 0.6.14) -LIBEXIF_AGE=1 -LIBEXIF_REVISION=0 -LIBEXIF_CURRENT=13 +dnl 14:2:0 added XP_ WinXP tags (for 0.6.15) +dnl 14:2:1 0.6.17 +dnl 15:3:0 added exif_loader_get_buf (for 0.6.18) +dnl 15:3:1 0.6.19 +dnl 15:3:2 0.6.20 +dnl 15:3:3 0.6.21 +LIBEXIF_CURRENT=15 +LIBEXIF_AGE=3 +LIBEXIF_REVISION=3 AC_SUBST([LIBEXIF_AGE]) AC_SUBST([LIBEXIF_REVISION]) AC_SUBST([LIBEXIF_CURRENT]) @@ -59,13 +55,16 @@ AC_SUBST([LIBEXIF_CURRENT_MIN],[`expr $LIBEXIF_CURRENT - $LIBEXIF_AGE`]) LIBEXIF_VERSION_INFO="$LIBEXIF_CURRENT:$LIBEXIF_REVISION:$LIBEXIF_AGE" AC_SUBST([LIBEXIF_VERSION_INFO]) -AC_PROG_CC +AM_PROG_CC_C_O AC_C_CONST +AC_C_INLINE dnl FIXME: AC_LIBTOOL_WIN32_DLL +AM_PROG_AR AM_PROG_LIBTOOL AM_CPPFLAGS="$CPPFLAGS" GP_CONFIG_MSG([Compiler],[${CC}]) +AC_SYS_LARGEFILE dnl Create a stdint.h-like file containing size-specific integer definitions dnl that will always be available @@ -92,55 +91,94 @@ dnl --------------------------------------------------------------------------- dnl Whether -lm is required for our math functions dnl --------------------------------------------------------------------------- -# we need sqrt and pow, but checking for sqrt should be sufficient -AC_ARG_VAR([MATHLIBS],[The libraries required for mathematical functions, e.g. -lm]) -if test "x$MATHLIBS" = "x"; then - # We must not compile with -Wall -Werror here: - # char *sqrt() conflicts with double sin(const double xx) in any case. - CFLAGS_save="$CFLAGS" - CPPFLAGS_save="$CPPFLAGS" - CPPFLAGS="" - CFLAGS="" - AC_CHECK_FUNC([sqrt],[ - MATHLIBS="" - ],[ - AC_CHECK_LIB([m],[sqrt],[ - MATHLIBS="-lm" +# we need sqrt and pow which may be in libm +# We cannot use AC_CHECK_FUNC because if CFLAGS contains +# -Wall -Werror here the check fails because +# char *sqrt() conflicts with double sqrt(double xx) + +# Start by assuming -lm is needed, because it's possible that the little +# test program below will be optimized to in-line floating point code that +# doesn't require -lm, whereas the library itself cannot be so optimized +# (this actually seems to be the case on x86 with gcc 4.2). Assuming the +# reverse means that -lm could be needed but wouldn't be detected below. + +LIBS_orig="$LIBS" +LIBS="$LIBS -lm" +AC_MSG_CHECKING([for math functions in libm]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([ + #include + ],[ + double s = sqrt(0); + double p = pow(s,s); + ])], + [AC_MSG_RESULT(yes)], [ + AC_MSG_RESULT(no) + LIBS="$LIBS_orig" + AC_MSG_CHECKING([for math functions without libm]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([ + #include ],[ - AC_MSG_ERROR([ -*** Could not find sqrt() function -]) - ]) + double s = sqrt(0); + double p = pow(s,s); + ])], + [ + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([*** Could not find sqrt() & pow() functions]) ]) - CFLAGS="$CFLAGS_save" - CPPFLAGS="$CPPFLAGS_save" -fi -AC_SUBST([MATHLIBS]) +]) +# Check whether libfailmalloc is available for tests +CHECK_FAILMALLOC # doc support GP_CHECK_DOC_DIR GP_CHECK_DOXYGEN +# Whether to enable the internal docs build. +# +# This takes quite some time due to the generation of lots of call +# graphs, so it is disabled by default. +set_enable_internal_docs=no +AC_ARG_ENABLE([internal-docs], [dnl +AS_HELP_STRING([--enable-internal-docs], +[Build internal code docs if doxygen available])], [dnl +dnl If either --enable-foo nor --disable-foo were given, execute this. + if test "x$enableval" = xno \ + || test "x$enableval" = xoff \ + || test "x$enableval" = xfalse; + then + set_enable_internal_docs=no + elif test "x$enableval" = xyes \ + || test "x$enableval" = xon \ + || test "x$enableval" = xtrue + then + set_enable_internal_docs=yes + fi +]) +AC_MSG_CHECKING([whether to create internal code docs]) +AC_MSG_RESULT([${set_enable_internal_docs}]) +AM_CONDITIONAL([ENABLE_INTERNAL_DOCS], [test "x${set_enable_internal_docs}" = "xyes"]) + # --------------------------------------------------------------------------- # i18n support # --------------------------------------------------------------------------- +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" +AM_PO_SUBDIRS GP_GETTEXT_HACK([${PACKAGE}-${LIBEXIF_CURRENT_MIN}], [Lutz Mueller and others]) -ALL_LINGUAS="de es fr pl ru vi" 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_CPPFLAGS="$AM_CPPFLAGS -DLOCALEDIR=\\\"${localedir}\\\"" +dnl --------------------------------------------------------------------------- +dnl Thread-safe functions +dnl --------------------------------------------------------------------------- +AC_CHECK_FUNCS(localtime_r) dnl --------------------------------------------------------------------------- dnl Compiler/Linker Options and Warnings @@ -164,15 +202,12 @@ AC_SUBST(AM_LDFLAGS) dnl --------------------------------------------------------------------------- dnl Output files dnl --------------------------------------------------------------------------- -AC_CONFIG_FILES([ - po/Makefile.in +AC_CONFIG_FILES([ po/Makefile.in Makefile libexif.spec libexif/Makefile - libexif/canon/Makefile - libexif/olympus/Makefile - libexif/pentax/Makefile test/Makefile + test/check-vars.sh test/nls/Makefile m4m/Makefile doc/Makefile @@ -181,6 +216,8 @@ AC_CONFIG_FILES([ libexif.pc libexif-uninstalled.pc binary/Makefile + contrib/Makefile + contrib/examples/Makefile ]) AC_OUTPUT