Source

libtaginfo / configure.ac

dnl ------------------------------------------------------
dnl ### LibTagInfo ###
dnl This Library has been created for xnoise media player
dnl Copyright (C) 2012-2013  Jörn Magens <shuerhaaken@googlemail.com>
dnl
dnl This file is part of libtaginfo.
dnl
dnl ------------------------------------------------------

AC_PREREQ([2.59])
m4_define(libtaginfo_major_version, 0)
m4_define(libtaginfo_minor_version, 2)
m4_define(libtaginfo_micro_version, 0)
m4_define(libtaginfo_version, libtaginfo_major_version.libtaginfo_minor_version.libtaginfo_micro_version)
m4_define([libtaginfo_name], [libtaginfo])

LIBTAGINFO_MAJOR_VERSION=libtaginfo_major_version
LIBTAGINFO_MINOR_VERSION=libtaginfo_minor_version
LIBTAGINFO_MICRO_VERSION=libtaginfo_micro_version
LIBTAGINFO_VERSION=libtaginfo_version
LIBTAGINFO_NAME=libtaginfo_name
AC_SUBST(LIBTAGINFO_MAJOR_VERSION)
AC_SUBST(LIBTAGINFO_MINOR_VERSION)
AC_SUBST(LIBTAGINFO_MICRO_VERSION)
AC_SUBST(LIBTAGINFO_VERSION)
AC_SUBST(LIBTAGINFO_NAME)

AC_INIT([libtaginfo_name], 
        [libtaginfo_version], 
        [shuerhaaken@googlemail.com], 
        [libtaginfo],
        [https://bitbucket.org/shuerhaaken/libtaginfo])

AM_INIT_AUTOMAKE([1.11 -Wall no-define])
AC_CONFIG_HEADERS([config.h libtaginfoconfig.h])
AC_PROG_CXX
AM_PROG_CC_C_O

AC_DISABLE_STATIC

AM_PROG_AR
AC_CONFIG_MACRO_DIR([m4])

LT_INIT([disable-static])

dnl -------------------------------------------------
TAGLIB_C_REQUIRED=1.8

PKG_CHECK_MODULES(LIBTAGINFO, \
    taglib >= $TAGLIB_C_REQUIRED)

AC_SUBST(LIBTAGINFO_CFLAGS)
AC_SUBST(LIBTAGINFO_LIBS)
dnl -------------------------------------------------

AC_SUBST([LIBTAGINFO_SO_VERSION], [1:0:0])

### Doxygen Documentation

AC_ARG_ENABLE(doxygen-docs, AS_HELP_STRING([--enable-doxygen-docs],[build DOXYGEN documentation (requires Doxygen)]),enable_doxygen_docs=$enableval,enable_doxygen_docs=auto)

AC_PATH_PROG(DOXYGEN, doxygen, no)

AC_MSG_CHECKING([whether to build Doxygen documentation])

if test x$DOXYGEN = xno ; then
    have_doxygen=no
else
    have_doxygen=yes
fi

if test x$enable_doxygen_docs = xauto ; then
    if test x$have_doxygen = xno ; then
        enable_doxygen_docs=no
    else
        enable_doxygen_docs=yes
    fi
fi

if test x$enable_doxygen_docs = xyes; then
    if test x$have_doxygen = xno; then
        AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found])
        enable_doxygen_docs=no
    else
        AC_CONFIG_FILES([docs/Doxyfile_lib docs/libtaginfo.doc-base docs/Doxyfile_c])
    fi
fi

AM_CONDITIONAL(LIBTAGINFO_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes)
AC_MSG_RESULT($enable_doxygen_docs)

AM_SILENT_RULES([yes])

dnl ================================================================
dnl  VAPIDIR is used to place the vapi file (vala binding)
dnl  ${datadir}/vala/vapi is vala version independent
VAPIDIR="${datadir}/vala/vapi"
AC_SUBST(VAPIDIR)
dnl ================================================================


AC_CONFIG_FILES([
    Makefile
    libtaginfo/libtaginfo.pc:libtaginfo/libtaginfo.pc.in
    libtaginfo/Makefile
    bindings/Makefile
    bindings/c/Makefile
    bindings/c/libtaginfo_c.pc:bindings/c/libtaginfo_c.pc.in
    bindings/vala/Makefile
    examples/Makefile
    docs/Makefile
    packaging/Makefile
    tests/samples/Makefile
    tests/Makefile
])

AC_OUTPUT


bold=`tput bold`
normal=`tput sgr0`

echo "

  ${bold}${PACKAGE} ${VERSION}${normal}
  ~~~~~~~~~~~~~~~~~~
  
  ${bold}CONFIGURATION INFO${normal}
    Prefix:                        ${prefix}
    CFLAGS:                        ${CFLAGS}
    CXXFLAGS:                      ${CXXFLAGS}
    Build Doxygen docs:            ${enable_doxygen_docs}
  
  
"