1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 16:49:41 +02:00
audacity/lib-src/id3lib/configure.in
2010-01-24 09:19:39 +00:00

227 lines
6.2 KiB
Plaintext

# $Id: configure.in,v 1.1 2001-08-27 00:12:02 dmazzoni 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=8
ID3LIB_PATCH_VERSION=0
ID3LIB_ADDED_VERSION=pre1
ID3LIB_VERSION=$ID3LIB_MAJOR_VERSION.$ID3LIB_MINOR_VERSION.$ID3LIB_PATCH_VERSION$ID3LIB_ADDED_VERSION
ID3LIB_INTERFACE_AGE=0
ID3LIB_BINARY_AGE=0
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_FULLNAME=$ID3LIB_NAME-$ID3LIB_VERSION
AC_SUBST(ID3LIB_FULLNAME)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
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(ansi, [ --enable-ansi turn on strict ansi [default=no]], , enable_ansi=no)
dnl
AC_SUBST(ID3LIB_DEBUG_FLAGS)
dnl Checks for programs
AC_PROG_CC
AC_PROG_CXX
AC_ISC_POSIX
AC_PROG_CXXCPP
AC_PROG_INSTALL
dnl for executable extensions
AC_EXEEXT
dnl Checks for libraries.
AC_CHECK_LIB(z,uncompress,AC_DEFINE_UNQUOTED(HAVE_ZLIB))#,,
# AC_MSG_ERROR([id3lib requires zlib to process compressed frames]))
AM_CONDITIONAL(ID3_NEEDZLIB, test x$ac_cv_lib_z_uncompress = xno)
AM_CONDITIONAL(ID3_NEEDDEBUG, test x$enable_debug = xyes)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(zlib.h wchar.h sys/param.h unistd.h iconv.h)
dnl Check for c++ features
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_HEADERS(libcw/sys.h)
AC_CHECK_HEADERS(cctype climits cstdio cstdlib cstring)
AC_CHECK_HEADERS(fstream iostream iomanip)
AC_CHECK_HEADERS( \
string \
fstream.h \
iostream.h \
iomanip.h \
,,AC_MSG_ERROR([Missing a vital header file for id3lib])
)
dnl Checks for the portability of certain c++ features: the bool type and
dnl for-loop scoping
ID3_CXX_PORTABILITY
ID3_CXX_WARNINGS
AC_LANG_RESTORE
ID3_DEBUG
ID3_UNICODE
dnl Check for functions.
# AC_FUNC_MEMCMP
AC_CHECK_FUNCS(getopt_long)
AM_CONDITIONAL(ID3_NEEDGETOPT_LONG, test x$ac_cv_func_getopt_long = xno)
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 Provides a --honor-std option to the configure script that honors the
dnl std namespace. Must be used AFTER configuring ALL compilers.
dnl LF_HONOR_STD
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 HAVE_ZLIB
dnl #undef HAVE_GETOPT_LONG
dnl #undef _ID3LIB_NAME
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_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}")
CONDITIONAL_SUBDIRS=
if test "x$ac_cv_lib_z_uncompress" = "xno"; then
CONDITIONAL_SUBDIRS="$CONDITIONAL_SUBDIRS zlib"
fi
AC_CONFIG_SUBDIRS(zlib)
CFLAGS="$CFLAGS -Wall"
AC_OUTPUT( \
Makefile \
doc/Makefile \
m4/Makefile \
include/Makefile \
include/id3/Makefile \
src/Makefile \
examples/Makefile \
)