configure.in 2.14 KB
dnl Process this file with autoconf to produce a configure script.
AC_INIT(libaudiofile/aiff.c)

PACKAGE=audiofile
AUDIOFILE_MAJOR_VERSION=0
AUDIOFILE_MINOR_VERSION=2
AUDIOFILE_MICRO_VERSION=3
AUDIOFILE_VERSION=${AUDIOFILE_MAJOR_VERSION}.${AUDIOFILE_MINOR_VERSION}.${AUDIOFILE_MICRO_VERSION}

dnl set version info for libaudiofile.so to package rev - $MAJOR + $MINOR : $MICRO : $MINOR
AUDIOFILE_VERSION_INFO=2:3:2

AC_SUBST(AUDIOFILE_MAJOR_VERSION)
AC_SUBST(AUDIOFILE_MINOR_VERSION)
AC_SUBST(AUDIOFILE_MICRO_VERSION)
AC_SUBST(AUDIOFILE_VERSION)
AC_SUBST(AUDIOFILE_VERSION_INFO)

VERSION=$AUDIOFILE_VERSION

AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AM_CONFIG_HEADER(config.h)
AM_PROG_LIBTOOL

dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET

dnl Checks for libraries.
dnl Check for the ldexp function in the math library.
AC_CHECK_LIB(m, ldexp)

dnl Check for the SGI Audio Library function alOpenPort.
AC_CHECK_LIB(audio, alOpenPort, AUDIO_LIB=-laudio)
AC_SUBST(AUDIO_LIB)

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h unistd.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_BIGENDIAN
AC_TYPE_OFF_T
AC_TYPE_SIZE_T

AC_CHECK_SIZEOF(off_t)
AC_CHECK_SIZEOF(size_t)
AC_CHECK_SIZEOF(long)

dnl Workaround the lack of these types.
AC_CHECK_TYPE(u_int8_t, unsigned char)
AC_CHECK_TYPE(u_int16_t, unsigned short)
AC_CHECK_TYPE(u_int32_t, unsigned int)
AC_CHECK_TYPE(int8_t, signed char)
AC_CHECK_TYPE(int16_t, short)
AC_CHECK_TYPE(int32_t, int)

dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_CHECK_FUNCS(strdup)

dnl Set up platform specific stuff
platform=none
AC_MSG_CHECKING([for platform specific tests to compile])
case "$host_os" in
  linux*)
    TEST_BIN="linuxtest"
    platform=linux
    ;;
  irix5* | irix6*)
    TEST_BIN="irixread irixtestloop"
    platform=irix
    ;;
esac
AC_MSG_RESULT($platform)
AC_SUBST(TEST_BIN)

AC_OUTPUT([
	audiofile.spec
	audiofile.pc
	sfcommands/Makefile 
	test/Makefile 
	libaudiofile/Makefile 
	libaudiofile/modules/Makefile 
	docs/Makefile 
	Makefile 
	audiofile-config], [case "$CONFIG_FILES" in *audiofile-config*) chmod +x audiofile-config;; esac])