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

📄 aclocal.m4

📁 MIDI解码程序(用VC编写)
💻 M4
📖 第 1 页 / 共 5 页
字号:
dnl            [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])dnl Search for a library defining FUNC, if it's not already available.AC_DEFUN(MY_SEARCH_LIBS,[AC_CACHE_CHECK([for library containing $1], [timidity_cv_search_$1],[ac_func_search_save_LIBS="$LIBS"timidity_cv_search_$1="no"for i in $2; do  LIBS="$i $5 $ac_func_search_save_LIBS"  AC_TRY_LINK_FUNC([$1], [timidity_cv_search_$1="$i"; break])doneLIBS="$ac_func_search_save_LIBS"])if test "$timidity_cv_search_$1" != "no"; then  $3else :  $4fi])# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003#   Free Software Foundation, Inc.# This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2, or (at your option)# any later version.# This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.# You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA# 02111-1307, USA.# serial 7# AM_PATH_LISPDIR# ---------------AC_DEFUN([AM_PATH_LISPDIR],[AC_ARG_WITH(lispdir, [  --with-lispdir          Override the default lisp directory ], [ lispdir="$withval"   AC_MSG_CHECKING([where .elc files should go])   AC_MSG_RESULT([$lispdir])], [ # If set to t, that means we are running in a shell under Emacs. # If you have an Emacs named "t", then use the full path. test x"$EMACS" = xt && EMACS= AC_CHECK_PROGS(EMACS, emacs xemacs, no) if test $EMACS != "no"; then   if test x${lispdir+set} != xset; then     AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir],       [# If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly  # Some emacsen will start up in interactive mode, requiring C-x C-c to exit,  #  which is non-obvious for non-emacs users.  # Redirecting /dev/null should help a bit; pity we can't detect "broken"  #  emacsen earlier and avoid running this altogether.  AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out])        am_cv_lispdir=`sed -n \       -e 's,/$,,' \       -e '/.*\/lib\/x\?emacs\/site-lisp$/{s,.*/lib/\(x\?emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \       -e '/.*\/share\/x\?emacs\/site-lisp$/{s,.*/share/\(x\?emacs/site-lisp\),${datadir}/\1,;p;q;}' \       conftest.out`       rm conftest.out       if test -z "$am_cv_lispdir"; then         am_cv_lispdir='${datadir}/emacs/site-lisp'       fi     ])     lispdir="$am_cv_lispdir"   fi fi])AC_SUBST(lispdir)])# AM_PATH_LISPDIRAU_DEFUN([ud_PATH_LISPDIR], [AM_PATH_LISPDIR])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@suse.cz>dnl Modified for TiMidity++ by URABE, Shyouhei <root@mput.dip.jp>dnl Original    : alsa.m4,v 1.22 2002/05/27 11:14:20 tiwai Expdnl This version: alsa.m4,       2002/10/08 22:30:18 JSTdnl 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-alsatest  (this has no effect, as yet)dnldnl 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=no],[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=`echo $LIBS | sed 's/-lm//'`LIBS=`echo $LIBS | sed 's/-ldl//'`LIBS=`echo $LIBS | sed 's/-lpthread//'`LIBS=`echo $LIBS | sed 's/  //'`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/'`dnl This is the test program.AC_DEFUN([MPUT_ALSA_TRY],[/* 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);])dnl macro MPUT_ALSA_TRYAC_LANG_SAVEAC_LANG_CAC_TRY_COMPILE([#include <alsa/asoundlib.h>],  MPUT_ALSA_TRY(),  [AC_MSG_RESULT(found.)],  [AC_TRY_COMPILE([#include <sys/asoundlib.h>],   MPUT_ALSA_TRY(),  [AC_MSG_RESULT(found.)],  [AC_MSG_RESULT(not present.)   ifelse([$3], ,[AC_MSG_RESULT(libasound was not found anywhere.)])   alsa_found=no])   ifelse([$3], ,[AC_MSG_RESULT(Sufficiently new version of libasound not found.)])])AC_LANG_RESTOREdnl Now that we know we have the right version, why not see if wednl have the library and not just the headers.AC_CHECK_LIB([asound],[snd_ctl_open], ,  [ifelse([$3], ,[AC_MSG_RESULT(No linkable libasound was found.)])   alsa_found=no])if test "x$alsa_found" = "xyes" ; then   ifelse([$2], , :, [$2])   LIBS=`echo $LIBS | sed 's/-lasound//g'`   LIBS=`echo $LIBS | sed 's/  //'`   LIBS="-lasound $LIBS"else   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)])dnl This should be pulled in from arts.m4dnldnl Oh my word, I've never hacked automake before - let me know if this is adnl complete rubbish!dnl Peter L Jones 2002-05-12dnl Snarfed from the ESD code below - but the faults are all mine!dnl AM_PATH_ARTS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])dnl Test for aRts, and define ARTS_CFLAGS and ARTS_LIBSdnlAC_DEFUN(AM_PATH_ARTS,	[dnl dnl Get the cflags and libraries from the arts-config scriptdnlAC_ARG_WITH(arts-prefix,[  --with-arts-prefix=PFX   Prefix where ARTS is installed (optional)],	arts_prefix="$withval", arts_prefix="")AC_ARG_ENABLE(artstest, [  --disable-artstest       Do not try to compile and run a test ARTS program],	, enable_artstest=yes)  if test x$arts_prefix != x ; then     arts_args="$arts_args --prefix=$arts_prefix"     if test x${ARTS_CONFIG+set} != xset ; then        ARTS_CONFIG=$arts_prefix/bin/artsc-config     fi  fi  AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)  min_arts_version=ifelse([$1], ,0.9.5,$1)  AC_MSG_CHECKING(for ARTS - version >= $min_arts_version)  no_arts=""  if test "$ARTS_CONFIG" = "no" ; then    no_arts=yes  else    ARTS_CFLAGS=`$ARTS_CONFIG $artsconf_args --cflags`    ARTS_LIBS=`$ARTS_CONFIG $artsconf_args --libs`    arts_major_version=`$ARTS_CONFIG $arts_args --version | \           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`    arts_minor_version=`$ARTS_CONFIG $arts_args --version | \           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`    arts_micro_version=`$ARTS_CONFIG $arts_config_args --version | \           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`    if test "x$enable_artstest" = "xyes" ; then      ac_save_CFLAGS="$CFLAGS"      ac_save_LIBS="$LIBS"      CFLAGS="$CFLAGS $ARTS_CFLAGS"      LIBS="$LIBS $ARTS_LIBS"dnldnl Now check if the installed ARTS is sufficiently new. (Also sanitydnl checks the results of arts-config to some extentdnl      rm -f conf.artstest      AC_TRY_RUN([#include <stdio.h>#include <stdlib.h>#include <string.h>#include <artsc.h>char*my_strdup (char *str){  char *new_str;    if (str)    {      new_str = malloc ((strlen (str) + 1) * sizeof(char));      strcpy (new_str, str);    }  else    new_str = NULL;    return new_str;}int main (){  int major, minor, micro;  char *tmp_version;  system ("touch conf.artstest");  /* HP/UX 9 (%@#!) writes to sscanf strings */  tmp_version = my_strdup("$min_arts_version");  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {     printf("%s, bad version string\n", "$min_arts_version");     exit(1);   }   if (($arts_major_version > major) ||      (($arts_major_version == major) && ($arts_minor_version > minor)) ||      (($arts_major_version == major) && ($arts_minor_version == minor) && ($arts_micro_version >= micro)))    {      return 0;    }  else    {      printf("\n*** 'artsc-config --version' returned %d.%d.%d, but the minimum version\n", $arts_major_version, $arts_minor_version, $arts_micro_version);      printf("*** of ARTS required is %d.%d.%d. If artsc-config is correct, then it is\n", major, minor, micro);      printf("*** best to upgrade to the required version.\n");      printf("*** If artsc-config was wrong, set the environment variable ARTS_CONFIG\n");      printf("*** to point to the correct copy of artsc-config, and remove the file\n");      printf("*** config.cache before re-running configure\n");      return 1;    }}],, no_arts=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])       CFLAGS="$ac_save_CFLAGS"       LIBS="$ac_save_LIBS"     fi  fi  if test "x$no_arts" = x ; then     AC_MSG_RESULT(yes)     ifelse([$2], , :, [$2])       else     AC_MSG_RESULT(no)     if test "$ARTS_CONFIG" = "no" ; then       echo "*** The artsc-config script installed by ARTS could not be found"       echo "*** If ARTS was installed in PREFIX, make sure PREFIX/bin is in"       echo "*** your path, or set the ARTS_CONFIG environment variable to the"       echo "*** full path to artsc-config."     else       if test -f conf.artstest ; then        :       else          echo "*** Could not run ARTS test program, checking why..."          CFLAGS="$CFLAGS $ARTS_CFLAGS"          LIBS="$LIBS $ARTS_LIBS"          AC_TRY_LINK([#include <stdio.h>#include <artsc.h>],      [ return 0; ],        [ echo "*** The test program compiled, but did not run. This usually means"          echo "*** that the run-time linker is not finding ARTS or finding the wrong"          echo "*** version of ARTS. If it is not finding ARTS, you'll need to set your"          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"          echo "*** to the installed location  Also, make sure you have run ldconfig if that"          echo "*** is required on your system"	  echo "***"          echo "*** If you have an old version installed, it is best to remove it, although"          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],        [ echo "*** The test program failed to compile or link. See the file config.log for the"          echo "*** exact error that occured. This usually means ARTS was incorrectly installed"          echo "*** or that you have moved ARTS since it was installed. In the latter case, you"          echo "*** may want to edit the arts-config script: $ARTS_CONFIG" ])          CFLAGS="$ac_save_CFLAGS"          LIBS="$ac_save_LIBS"       fi     fi     ARTS_CFLAGS=""     ARTS_LIBS=""

⌨️ 快捷键说明

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