ref: 2bc0f84e01dfb29b9253d7b7313a0f0bd619f5a1
dir: /common/id3lib/configure.in/
# $Id: configure.in,v 1.1 2002/01/21 08:16:20 menno Exp $
# Copyright 1999, 2000 Scott Thomas Haug <eldamitri@users.sourceforge.net>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# require autoconf 2.13
AC_PREREQ(2.13)
# init autoconf (and check for presence fo reconf)
AC_INIT(reconf)
ID3LIB_NAME=id3lib
dnl The following has been adapted from glib (http://www.gtk.org)
dnl
dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
dnl are available for $ac_help expansion (don't we all *love* autoconf?)
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
# Making releases:
# ID3LIB_PATCH_VERSION += 1;
# ID3LIB_INTERFACE_AGE += 1;
# ID3LIB_BINARY_AGE += 1;
# if any functions have been added, set ID3LIB_INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set ID3LIB_BINARY_AGE _and_ ID3LIB_INTERFACE_AGE to 0.
#
ID3LIB_MAJOR_VERSION=3
ID3LIB_MINOR_VERSION=7
ID3LIB_PATCH_VERSION=9
ID3LIB_INTERFACE_AGE=2
ID3LIB_BINARY_AGE=3
ID3LIB_VERSION=$ID3LIB_MAJOR_VERSION.$ID3LIB_MINOR_VERSION.$ID3LIB_PATCH_VERSION
AC_DIVERT_POP()dnl
AC_SUBST(ID3LIB_NAME)
AC_SUBST(ID3LIB_MAJOR_VERSION)
AC_SUBST(ID3LIB_MINOR_VERSION)
AC_SUBST(ID3LIB_PATCH_VERSION)
AC_SUBST(ID3LIB_VERSION)
AC_SUBST(ID3LIB_INTERFACE_AGE)
AC_SUBST(ID3LIB_BINARY_AGE)
# for documentation purposes
DOX_DIR_HTML=api
DOX_DIR_LATEX=latex
DOX_DIR_MAN=man
DOX_DIR_RTF=rtf
AC_SUBST(DOX_DIR_HTML)
AC_SUBST(DOX_DIR_LATEX)
AC_SUBST(DOX_DIR_MAN)
AC_SUBST(DOX_DIR_RTF)
# libtool versioning
LT_RELEASE=$ID3LIB_MAJOR_VERSION.$ID3LIB_MINOR_VERSION
LT_CURRENT=`expr $ID3LIB_PATCH_VERSION - $ID3LIB_INTERFACE_AGE`
LT_REVISION=$ID3LIB_INTERFACE_AGE
LT_AGE=`expr $ID3LIB_BINARY_AGE - $ID3LIB_INTERFACE_AGE`
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
VERSION=$ID3LIB_VERSION
PACKAGE=$ID3LIB_NAME
dnl This is a hack to get the release date using cvs checkin macros
ID3LIB_DATE="$Date: 2002/01/21 08:16:20 $ID3LIB_UNDEFINED"
ID3LIB_FULLNAME=$ID3LIB_NAME-$ID3LIB_VERSION
AC_SUBST(ID3LIB_DATE)
AC_SUBST(ID3LIB_FULLNAME)
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
AM_CONFIG_HEADER(config.h)
dnl Initialize libtool
AM_PROG_LIBTOOL
dnl Initialize maintainer mode
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
dnl figure debugging default, prior to $ac_help setup
dnl
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
if test `expr $ID3LIB_MINOR_VERSION \% 2` = 1 ; then
debug_default=yes
else
debug_default=minimum
fi
AC_DIVERT_POP()dnl
dnl declare --enable-* args and collect ac_help strings
AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
, enable_ansi=no)
if test "x$enable_debug" = "xyes"; then
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
ID3LIB_DEBUG_FLAGS="-DID3_ENABLE_DEBUG"
else
if test "x$enable_debug" = "xno"; then
ID3LIB_DEBUG_FLAGS="-DID3_DISABLE_ASSERT -DID3_DISABLE_CHECKS"
fi
fi
dnl
AC_SUBST(ID3LIB_DEBUG_FLAGS)
dnl Checks for programs
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_RANLIB
AC_PROG_INSTALL
dnl Checks for libraries.
AC_CHECK_LIB(z,uncompress)#,,
# AC_MSG_ERROR([id3lib requires zlib to process compressed frames]))
AM_CONDITIONAL(ID3_NEEDZLIB, test x$ac_cv_lib_z_uncompress = xno)
dnl Checks for header files.
AC_HEADER_STDC
AC_HAVE_HEADERS(zlib.h wchar.h sys/param.h)
AC_HAVE_HEADERS( \
ctype.h \
limits.h \
memory.h \
stdio.h \
unistd.h \
,,AC_MSG_ERROR([Missing a vital header file for id3lib])
)
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_HEADER(iostream.h)
dnl Check for functions.
AC_FUNC_MEMCMP
AC_CHECK_FUNCS(mkstemp)
AC_CHECK_FUNCS(
truncate \
,,AC_MSG_ERROR([Missing a vital function for id3lib])
)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
dnl
dnl Checks with local macros
dnl
dnl Checks for the portability of certain c++ features: the bool type and
dnl for-loop scoping
LF_CXX_PORTABILITY
dnl Provides a --with-warnings option to the configure script that turns on
dnl compiler warnings. Must be used AFTER configuring ALL compilers.
LF_SET_WARNINGS
dnl ACCONFIG TEMPLATE
dnl
dnl /* config.h defines these preprocesser symbols to be used by id3lib for
dnl * determining internal versioning information. The intent is that these
dnl * macros will be made available in the library via constants, functions,
dnl * or static methods.
dnl */
dnl #undef __ID3LIB_NAME
dnl #undef __ID3LIB_DATE
dnl #undef __ID3LIB_VERSION
dnl #undef __ID3LIB_FULLNAME
dnl #undef __ID3LIB_MAJOR_VERSION
dnl #undef __ID3LIB_MINOR_VERSION
dnl #undef __ID3LIB_PATCH_VERSION
dnl #undef __ID3LIB_INTERFACE_AGE
dnl #undef __ID3LIB_BINARY_AGE
dnl #undef __ID3_COMPILED_WITH_DEBUGGING
dnl /* */
dnl END ACCONFIG
AC_DEFINE_UNQUOTED(__ID3LIB_NAME, "$ID3LIB_NAME")
AC_DEFINE_UNQUOTED(__ID3LIB_DATE, "$ID3LIB_DATE")
AC_DEFINE_UNQUOTED(__ID3LIB_VERSION, "$ID3LIB_VERSION")
AC_DEFINE_UNQUOTED(__ID3LIB_FULLNAME, "$ID3LIB_FULLNAME")
AC_DEFINE_UNQUOTED(__ID3LIB_MAJOR_VERSION, $ID3LIB_MAJOR_VERSION)
AC_DEFINE_UNQUOTED(__ID3LIB_MINOR_VERSION, $ID3LIB_MINOR_VERSION)
AC_DEFINE_UNQUOTED(__ID3LIB_PATCH_VERSION, $ID3LIB_PATCH_VERSION)
AC_DEFINE_UNQUOTED(__ID3LIB_INTERFACE_AGE, $ID3LIB_INTERFACE_AGE)
AC_DEFINE_UNQUOTED(__ID3LIB_BINARY_AGE, $ID3LIB_BINARY_AGE)
AC_DEFINE_UNQUOTED(__ID3_COMPILED_WITH_DEBUGGING, "${enable_debug}")
AC_OUTPUT( \
Makefile \
doc/Makefile \
m4/Makefile \
zlib/Makefile \
zlib/include/Makefile \
zlib/lib/Makefile \
zlib/prj/Makefile \
zlib/src/Makefile \
include/Makefile \
include/id3/Makefile \
src/Makefile \
examples/Makefile \
)