1998-08-13 15:43:39 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
|
|
AC_INIT(Makefile.conf.in)
|
|
|
|
AC_PREFIX_DEFAULT(/usr)
|
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
1998-08-31 09:21:36 +00:00
|
|
|
AC_CONFIG_HEADER(include/aconfig.h)
|
1998-08-30 21:10:35 +00:00
|
|
|
AC_CHECK_HEADERS(linux/asound.h sys/asoundlib.h)
|
1998-08-13 15:43:39 +00:00
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_HEADER_TIME
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
|
|
|
|
dnl Check for ALSA library package.
|
|
|
|
myprefix=$prefix
|
|
|
|
if test "$myprefix" = "NONE"; then
|
|
|
|
myprefix=$ac_default_prefix
|
|
|
|
fi
|
|
|
|
CFLAGS="-I$myprefix/include"
|
1998-08-30 21:10:35 +00:00
|
|
|
LIBS="-L$myprefix/lib -lasound"
|
1998-08-13 15:43:39 +00:00
|
|
|
#echo "CFLAGS=$CFLAGS"
|
|
|
|
#echo "LIBS=$LIBS"
|
|
|
|
AC_MSG_CHECKING(for alsa-lib package)
|
|
|
|
AC_TRY_RUN([
|
1998-08-30 21:10:35 +00:00
|
|
|
#include <sys/asoundlib.h>
|
1998-08-13 15:43:39 +00:00
|
|
|
void main(void)
|
|
|
|
{
|
|
|
|
snd_cards();
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
],
|
|
|
|
AC_MSG_RESULT("present"),
|
|
|
|
AC_MSG_RESULT("not found"); echo "Fatal error: Install alsa-lib package at first..."; exit 1;,
|
|
|
|
AC_MSG_RESULT("not supported"); echo "Fatal error: Cross-compiling isn't supported..."; exit 1;
|
|
|
|
)
|
|
|
|
|
|
|
|
dnl Check for version...
|
|
|
|
AC_MSG_CHECKING(for alsa-utils version)
|
|
|
|
SND_UTIL_VERSION=`cat $srcdir/version`
|
|
|
|
AC_DEFINE_UNQUOTED(SND_UTIL_VERSION, "$SND_UTIL_VERSION")
|
|
|
|
AC_SUBST(SND_UTIL_VERSION)
|
|
|
|
SND_UTIL_MAJOR=`echo $SND_UTIL_VERSION | cut -d . -f 1`
|
|
|
|
AC_SUBST(SND_UTIL_MAJOR)
|
|
|
|
SND_UTIL_MINOR=`echo $SND_UTIL_VERSION | cut -d . -f 2`
|
|
|
|
AC_SUBST(SND_UTIL_MINOR)
|
|
|
|
SND_UTIL_SUBMINOR=`echo $SND_UTIL_VERSION | cut -d . -f 3`
|
|
|
|
AC_SUBST(SND_UTIL_SUBMINOR)
|
|
|
|
AC_MSG_RESULT($SND_UTIL_VERSION)
|
|
|
|
|
|
|
|
AC_OUTPUT(Makefile.conf utils/alsa-utils.spec)
|