⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aclocal.m4

📁 ALSA驱动的一些调试测试工具
💻 M4
📖 第 1 页 / 共 3 页
字号:
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,# 2005  Free Software Foundation, Inc.# This file is free software; the Free Software Foundation# 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.dnl Configure Paths for Alsadnl Some modifications by Richard Boulton <richard-alsa@tartarus.org>dnl Christopher Lansdown <lansdoct@cs.alfred.edu>dnl Jaroslav Kysela <perex@perex.cz>dnl Last modification: $Id: alsa.m4,v 1.24 2004/09/15 18:48:07 tiwai Exp $dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate.dnl enables arguments --with-alsa-prefix=dnl                   --with-alsa-enc-prefix=dnl                   --disable-alsatestdnldnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.dnlAC_DEFUN([AM_PATH_ALSA],[dnl Save the original CFLAGS, LDFLAGS, and LIBSalsa_save_CFLAGS="$CFLAGS"alsa_save_LDFLAGS="$LDFLAGS"alsa_save_LIBS="$LIBS"alsa_found=yesdnldnl Get the cflags and libraries for alsadnlAC_ARG_WITH(alsa-prefix,[  --with-alsa-prefix=PFX  Prefix where Alsa library is installed(optional)],[alsa_prefix="$withval"], [alsa_prefix=""])AC_ARG_WITH(alsa-inc-prefix,[  --with-alsa-inc-prefix=PFX  Prefix where include libraries are (optional)],[alsa_inc_prefix="$withval"], [alsa_inc_prefix=""])dnl FIXME: this is not yet implementedAC_ARG_ENABLE(alsatest,[  --disable-alsatest      Do not try to compile and run a test Alsa program],[enable_alsatest="$enableval"],[enable_alsatest=yes])dnl Add any special include directoriesAC_MSG_CHECKING(for ALSA CFLAGS)if test "$alsa_inc_prefix" != "" ; then	ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix"	CFLAGS="$CFLAGS -I$alsa_inc_prefix"fiAC_MSG_RESULT($ALSA_CFLAGS)dnl add any special lib dirsAC_MSG_CHECKING(for ALSA LDFLAGS)if test "$alsa_prefix" != "" ; then	ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix"	LDFLAGS="$LDFLAGS $ALSA_LIBS"fidnl add the alsa libraryALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread"LIBS="$ALSA_LIBS $LIBS"AC_MSG_RESULT($ALSA_LIBS)dnl Check for a working version of libasound that is of the right version.min_alsa_version=ifelse([$1], ,0.1.1,$1)AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version)no_alsa=""    alsa_min_major_version=`echo $min_alsa_version | \           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`    alsa_min_minor_version=`echo $min_alsa_version | \           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`    alsa_min_micro_version=`echo $min_alsa_version | \           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`AC_LANG_SAVEAC_LANG_CAC_TRY_COMPILE([#include <alsa/asoundlib.h>], [/* ensure backward compatibility */#if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)#define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR#endif#if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)#define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR#endif#if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)#define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR#endif#  if(SND_LIB_MAJOR > $alsa_min_major_version)  exit(0);#  else#    if(SND_LIB_MAJOR < $alsa_min_major_version)#       error not present#    endif#   if(SND_LIB_MINOR > $alsa_min_minor_version)  exit(0);#   else#     if(SND_LIB_MINOR < $alsa_min_minor_version)#          error not present#      endif#      if(SND_LIB_SUBMINOR < $alsa_min_micro_version)#        error not present#      endif#    endif#  endifexit(0);],  [AC_MSG_RESULT(found.)],  [AC_MSG_RESULT(not present.)   ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)])   alsa_found=no])AC_LANG_RESTOREdnl Now that we know that we have the right version, let's see if we have the library and not just the headers.if test "x$enable_alsatest" = "xyes"; thenAC_CHECK_LIB([asound], [snd_ctl_open],,	[ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)])	 alsa_found=no])fiif test "x$alsa_found" = "xyes" ; then   ifelse([$2], , :, [$2])   LIBS=`echo $LIBS | sed 's/-lasound//g'`   LIBS=`echo $LIBS | sed 's/  //'`   LIBS="-lasound $LIBS"fiif test "x$alsa_found" = "xno" ; then   ifelse([$3], , :, [$3])   CFLAGS="$alsa_save_CFLAGS"   LDFLAGS="$alsa_save_LDFLAGS"   LIBS="$alsa_save_LIBS"   ALSA_CFLAGS=""   ALSA_LIBS=""fidnl That should be it.  Now just export out symbols:AC_SUBST(ALSA_CFLAGS)AC_SUBST(ALSA_LIBS)])# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.## This file is free software; the Free Software Foundation# gives unlimited permission to copy and/or distribute it,# with or without modifications, as long as this notice is preserved.# AM_AUTOMAKE_VERSION(VERSION)# ----------------------------# Automake X.Y traces this macro to ensure aclocal.m4 has been# generated from the m4 files accompanying Automake X.Y.AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])# AM_SET_CURRENT_AUTOMAKE_VERSION# -------------------------------# Call AM_AUTOMAKE_VERSION so it can be traced.# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],	 [AM_AUTOMAKE_VERSION([1.9.6])])# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.## This file is free software; the Free Software Foundation# gives unlimited permission to copy and/or distribute it,# with or without modifications, as long as this notice is preserved.# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to# `$srcdir', `$srcdir/..', or `$srcdir/../..'.## Of course, Automake must honor this variable whenever it calls a# tool from the auxiliary directory.  The problem is that $srcdir (and# therefore $ac_aux_dir as well) can be either absolute or relative,# depending on how configure is run.  This is pretty annoying, since# it makes $ac_aux_dir quite unusable in subdirectories: in the top# source directory, any form will work fine, but in subdirectories a# relative path needs to be adjusted first.## $ac_aux_dir/missing#    fails when called from a subdirectory if $ac_aux_dir is relative# $top_srcdir/$ac_aux_dir/missing#    fails if $ac_aux_dir is absolute,#    fails when called from a subdirectory in a VPATH build with#          a relative $ac_aux_dir## The reason of the latter failure is that $top_srcdir and $ac_aux_dir# are both prefixed by $srcdir.  In an in-source build this is usually# harmless because $srcdir is `.', but things will broke when you# start a VPATH build or use an absolute $srcdir.## So we could use something similar to $top_srcdir/$ac_aux_dir/missing,# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`# and then we would define $MISSING as#   MISSING="\${SHELL} $am_aux_dir/missing"# This will work as long as MISSING is not called from configure, because# unfortunately $(top_srcdir) has no meaning in configure.# However there are other variables, like CC, which are often used in# configure, and could therefore not use this "fixed" $ac_aux_dir.## Another solution, used here, is to always expand $ac_aux_dir to an# absolute PATH.  The drawback is that using absolute paths prevent a# configured tree to be moved without reconfiguration.AC_DEFUN([AM_AUX_DIR_EXPAND],[dnl Rely on autoconf to set up CDPATH properly.AC_PREREQ([2.50])dnl# expand $ac_aux_dir to an absolute patham_aux_dir=`cd $ac_aux_dir && pwd`])# AM_CONDITIONAL                                            -*- Autoconf -*-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005# Free Software Foundation, Inc.## This file is free software; the Free Software Foundation# gives unlimited permission to copy and/or distribute it,# with or without modifications, as long as this notice is preserved.# serial 7# AM_CONDITIONAL(NAME, SHELL-CONDITION)# -------------------------------------# Define a conditional.AC_DEFUN([AM_CONDITIONAL],[AC_PREREQ(2.52)dnl ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnlAC_SUBST([$1_TRUE])AC_SUBST([$1_FALSE])if $2; then  $1_TRUE=  $1_FALSE='#'else  $1_TRUE='#'  $1_FALSE=fiAC_CONFIG_COMMANDS_PRE([if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then  AC_MSG_ERROR([[conditional "$1" was never defined.Usually this means the macro was only invoked conditionally.]])fi])])# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005# Free Software Foundation, Inc.## This file is free software; the Free Software Foundation# gives unlimited permission to copy and/or distribute it,# with or without modifications, as long as this notice is preserved.# serial 8# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be# written in clear, in which case automake, when reading aclocal.m4,# will think it sees a *use*, and therefore will trigger all it's# C support machinery.  Also note that it means that autoscan, seeing# CC etc. in the Makefile, will ask for an AC_PROG_CC use...# _AM_DEPENDENCIES(NAME)# ----------------------# See how the compiler implements dependency checking.# NAME is "CC", "CXX", "GCJ", or "OBJC".# We try a few techniques and use that to set a single cache variable.## We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular# dependency, and given that the user is not expected to run this macro,# just rely on AC_PROG_CC.AC_DEFUN([_AM_DEPENDENCIES],[AC_REQUIRE([AM_SET_DEPDIR])dnlAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnlAC_REQUIRE([AM_MAKE_INCLUDE])dnlAC_REQUIRE([AM_DEP_TRACK])dnlifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],                   [depcc="$$1"   am_compiler_list=])AC_CACHE_CHECK([dependency style of $depcc],               [am_cv_$1_dependencies_compiler_type],[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then  # We make a subdir and do the tests there.  Otherwise we can end up  # making bogus files that we don't know about and never remove.  For  # instance it was reported that on HP-UX the gcc test will end up  # making a dummy file named `D' -- because `-MD' means `put the output  # in D'.  mkdir conftest.dir  # Copy depcomp to subdir because otherwise we won't find it if we're  # using a relative directory.  cp "$am_depcomp" conftest.dir  cd conftest.dir  # We will build objects and dependencies in a subdirectory because  # it helps to detect inapplicable dependency modes.  For instance  # both Tru64's cc and ICC support -MD to output dependencies as a  # side effect of compilation, but ICC will put the dependencies in  # the current directory while Tru64 will put them in the object  # directory.  mkdir sub  am_cv_$1_dependencies_compiler_type=none  if test "$am_compiler_list" = ""; then     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`  fi  for depmode in $am_compiler_list; do    # Setup a source with many dependencies, because some compilers    # like to wrap large dependency lists on column 80 (with \), and    # we should not choose a depcomp mode which is confused by this.    #    # We need to recreate these files for each test, as the compiler may    # overwrite some of them when testing with obscure command lines.    # This happens at least with the AIX C compiler.    : > sub/conftest.c    for i in 1 2 3 4 5 6; do      echo '#include "conftst'$i'.h"' >> sub/conftest.c      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with      # Solaris 8's {/usr,}/bin/sh.      touch sub/conftst$i.h

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -