aclocal.m4

来自「Windows NT声卡驱动VXD」· M4 代码 · 共 848 行 · 第 1/2 页

M4
848
字号
/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */int dld_preloaded_symbol_count = $ac_count;/* The mapping between symbol names and symbols. */struct {  char *name;  __ptr_t address;}changequote(,)dnldld_preloaded_symbols[] =changequote([,])dnl{EOF        sed 's/^\(.*\) \(.*\)$/  {"\1", (__ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c        cat <<\EOF >> conftest.c  {0, (__ptr_t) 0}};#ifdef __cplusplus}#endifEOF        # Now try linking the two files.        mv conftest.$ac_objext conftestm.$ac_objext	ac_save_LIBS="$LIBS"	ac_save_CFLAGS="$CFLAGS"        LIBS="conftestm.$ac_objext"	CFLAGS="$CFLAGS$no_builtin_flag"        if AC_TRY_EVAL(ac_link) && test -s conftest; then          ac_pipe_works=yes        else          echo "configure: failed program was:" >&AC_FD_CC          cat conftest.c >&AC_FD_CC        fi        LIBS="$ac_save_LIBS"	CFLAGS="$ac_save_CFLAGS"      else        echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC      fi    else      echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC    fi  else    echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC  fielse  echo "$progname: failed program was:" >&AC_FD_CC  cat conftest.c >&AC_FD_CCfirm -rf conftest*# Do not use the global_symbol_pipe unless it works.test "$ac_pipe_works" = yes || ac_cv_sys_global_symbol_pipe=])ac_result=yesif test -z "$ac_cv_sys_global_symbol_pipe"; then   ac_result=nofiAC_MSG_RESULT($ac_result)])# AM_SYS_LIBTOOL_CYGWIN32 - find tools needed on cygwin32AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN32,[AC_CHECK_TOOL(DLLTOOL, dlltool, false)AC_CHECK_TOOL(AS, as, false)])# AM_SYS_SYMBOL_UNDERSCORE - does the compiler prefix global symbols#                            with an underscore?AC_DEFUN(AM_SYS_SYMBOL_UNDERSCORE,[AC_REQUIRE([AM_PROG_NM])dnlAC_REQUIRE([AM_SYS_NM_PARSE])dnlAC_MSG_CHECKING([for _ prefix in compiled symbols])AC_CACHE_VAL(ac_cv_sys_symbol_underscore,[ac_cv_sys_symbol_underscore=nocat > conftest.$ac_ext <<EOFvoid nm_test_func(){}int main(){nm_test_func;return 0;}EOFif AC_TRY_EVAL(ac_compile); then  # Now try to grab the symbols.  ac_nlist=conftest.nm  if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then    # See whether the symbols have a leading underscore.    if egrep '^_nm_test_func' "$ac_nlist" >/dev/null; then      ac_cv_sys_symbol_underscore=yes    else      if egrep '^nm_test_func ' "$ac_nlist" >/dev/null; then        :      else        echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC      fi    fi  else    echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC  fielse  echo "configure: failed program was:" >&AC_FD_CC  cat conftest.c >&AC_FD_CCfirm -rf conftest*])AC_MSG_RESULT($ac_cv_sys_symbol_underscore)if test x$ac_cv_sys_symbol_underscore = xyes; then  AC_DEFINE(WITH_SYMBOL_UNDERSCORE,1,  [define if compiled symbols have a leading underscore])fi])# Configure paths for AUDIOFILE# Bertrand Guiheneuf 98-10-21# stolen from esd.m4 in esound :# Manish Singh    98-9-30# stolen back from Frank Belew# stolen from Manish Singh# Shamelessly stolen from Owen Taylordnl AM_PATH_AUDIOFILE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])dnl Test for AUDIOFILE, and define AUDIOFILE_CFLAGS and AUDIOFILE_LIBSdnlAC_DEFUN(AM_PATH_AUDIOFILE,[dnl dnl Get the cflags and libraries from the audiofile-config scriptdnlAC_ARG_WITH(audiofile-prefix,[  --with-audiofile-prefix=PFX   Prefix where AUDIOFILE is installed (optional)],            audiofile_prefix="$withval", audiofile_prefix="")AC_ARG_WITH(audiofile-exec-prefix,[  --with-audiofile-exec-prefix=PFX Exec prefix where AUDIOFILE is installed (optional)],            audiofile_exec_prefix="$withval", audiofile_exec_prefix="")AC_ARG_ENABLE(audiofiletest, [  --disable-audiofiletest       Do not try to compile and run a test AUDIOFILE program],		    , enable_audiofiletest=yes)  if test x$audiofile_exec_prefix != x ; then     audiofile_args="$audiofile_args --exec-prefix=$audiofile_exec_prefix"     if test x${AUDIOFILE_CONFIG+set} != xset ; then        AUDIOFILE_CONFIG=$audiofile_exec_prefix/bin/audiofile-config     fi  fi  if test x$audiofile_prefix != x ; then     audiofile_args="$audiofile_args --prefix=$audiofile_prefix"     if test x${AUDIOFILE_CONFIG+set} != xset ; then        AUDIOFILE_CONFIG=$audiofile_prefix/bin/audiofile-config     fi  fi  AC_PATH_PROG(AUDIOFILE_CONFIG, audiofile-config, no)  min_audiofile_version=ifelse([$1], ,0.2.5,$1)  AC_MSG_CHECKING(for AUDIOFILE - version >= $min_audiofile_version)  no_audiofile=""  if test "$AUDIOFILE_CONFIG" = "no" ; then    no_audiofile=yes  else    AUDIOFILE_LIBS=`$AUDIOFILE_CONFIG $audiofileconf_args --libs`    AUDIOFILE_CFLAGS=`$AUDIOFILE_CONFIG $audiofileconf_args --cflags`    audiofile_major_version=`$AUDIOFILE_CONFIG $audiofile_args --version | \           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`    audiofile_minor_version=`$AUDIOFILE_CONFIG $audiofile_args --version | \           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`    audiofile_micro_version=`$AUDIOFILE_CONFIG $audiofile_config_args --version | \           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`    if test "x$enable_audiofiletest" = "xyes" ; then      ac_save_CFLAGS="$CFLAGS"      ac_save_LIBS="$LIBS"      CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS"      LIBS="$LIBS $AUDIOFILE_LIBS"dnldnl Now check if the installed AUDIOFILE is sufficiently new. (Also sanitydnl checks the results of audiofile-config to some extentdnl      rm -f conf.audiofiletest      AC_TRY_RUN([#include <stdio.h>#include <stdlib.h>#include <string.h>#include <audiofile.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.audiofiletest");  /* HP/UX 9 (%@#!) writes to sscanf strings */  tmp_version = my_strdup("$min_audiofile_version");  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {     printf("%s, bad version string\n", "$min_audiofile_version");     exit(1);   }   if (($audiofile_major_version > major) ||      (($audiofile_major_version == major) && ($audiofile_minor_version > minor)) ||      (($audiofile_major_version == major) && ($audiofile_minor_version == minor) && ($audiofile_micro_version >= micro)))    {      return 0;    }  else    {      printf("\n*** 'audiofile-config --version' returned %d.%d.%d, but the minimum version\n", $audiofile_major_version, $audiofile_minor_version, $audiofile_micro_version);      printf("*** of AUDIOFILE required is %d.%d.%d. If audiofile-config is correct, then it is\n", major, minor, micro);      printf("*** best to upgrade to the required version.\n");      printf("*** If audiofile-config was wrong, set the environment variable AUDIOFILE_CONFIG\n");      printf("*** to point to the correct copy of audiofile-config, and remove the file\n");      printf("*** config.cache before re-running configure\n");      return 1;    }}],, no_audiofile=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])       CFLAGS="$ac_save_CFLAGS"       LIBS="$ac_save_LIBS"     fi  fi  if test "x$no_audiofile" = x ; then     AC_MSG_RESULT(yes)     ifelse([$2], , :, [$2])       else     AC_MSG_RESULT(no)     if test "$AUDIOFILE_CONFIG" = "no" ; then       echo "*** The audiofile-config script installed by AUDIOFILE could not be found"       echo "*** If AUDIOFILE was installed in PREFIX, make sure PREFIX/bin is in"       echo "*** your path, or set the AUDIOFILE_CONFIG environment variable to the"       echo "*** full path to audiofile-config."     else       if test -f conf.audiofiletest ; then        :       else          echo "*** Could not run AUDIOFILE test program, checking why..."          CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS"          LIBS="$LIBS $AUDIOFILE_LIBS"          AC_TRY_LINK([#include <stdio.h>#include <audiofile.h>],      [ return 0; ],        [ echo "*** The test program compiled, but did not run. This usually means"          echo "*** that the run-time linker is not finding AUDIOFILE or finding the wrong"          echo "*** version of AUDIOFILE. If it is not finding AUDIOFILE, 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 AUDIOFILE was incorrectly installed"          echo "*** or that you have moved AUDIOFILE since it was installed. In the latter case, you"          echo "*** may want to edit the audiofile-config script: $AUDIOFILE_CONFIG" ])          CFLAGS="$ac_save_CFLAGS"          LIBS="$ac_save_LIBS"       fi     fi     AUDIOFILE_CFLAGS=""     AUDIOFILE_LIBS=""     ifelse([$3], , :, [$3])  fi  AC_SUBST(AUDIOFILE_CFLAGS)  AC_SUBST(AUDIOFILE_LIBS)  rm -f conf.audiofiletest])# Do all the work for Automake.  This macro actually does too much --# some checks are only needed if your package does certain things.# But this isn't really a big deal.# serial 1dnl Usage:dnl AM_INIT_AUTOMAKE(package,version, [no-define])AC_DEFUN(AM_INIT_AUTOMAKE,[AC_REQUIRE([AC_PROG_INSTALL])PACKAGE=[$1]AC_SUBST(PACKAGE)VERSION=[$2]AC_SUBST(VERSION)dnl test to see if srcdir already configuredif test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])fiifelse([$3],,AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))AC_REQUIRE([AM_SANITY_CHECK])AC_REQUIRE([AC_ARG_PROGRAM])dnl FIXME This is truly gross.missing_dir=`cd $ac_aux_dir && pwd`AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)AC_REQUIRE([AC_PROG_MAKE_SET])])## Check to make sure that the build environment is sane.#AC_DEFUN(AM_SANITY_CHECK,[AC_MSG_CHECKING([whether build environment is sane])# Just in casesleep 1echo timestamp > conftestfile# Do `set' in a subshell so we don't clobber the current shell's# arguments.  Must try -L first in case configure is actually a# symlink; some systems play weird games with the mod time of symlinks# (eg FreeBSD returns the mod time of the symlink's containing# directory).if (   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`   if test "[$]*" = "X"; then      # -L didn't work.      set X `ls -t $srcdir/configure conftestfile`   fi   if test "[$]*" != "X $srcdir/configure conftestfile" \      && test "[$]*" != "X conftestfile $srcdir/configure"; then      # If neither matched, then we have a broken ls.  This can happen      # if, for instance, CONFIG_SHELL is bash and it inherits a      # broken ls alias from the environment.  This has actually      # happened.  Such a system could not be considered "sane".      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a brokenalias in your environment])   fi   test "[$]2" = conftestfile   )then   # Ok.   :else   AC_MSG_ERROR([newly created file is older than distributed files!Check your system clock])firm -f conftest*AC_MSG_RESULT(yes)])dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)dnl The program must properly implement --version.AC_DEFUN(AM_MISSING_PROG,[AC_MSG_CHECKING(for working $2)# Run test in a subshell; some versions of sh will print an error if# an executable is not found, even if stderr is redirected.# Redirect stdin to placate older versions of autoconf.  Sigh.if ($2 --version) < /dev/null > /dev/null 2>&1; then   $1=$2   AC_MSG_RESULT(found)else   $1="$3/missing $2"   AC_MSG_RESULT(missing)fiAC_SUBST($1)])# Like AC_CONFIG_HEADER, but automatically create stamp file.AC_DEFUN(AM_CONFIG_HEADER,[AC_PREREQ([2.12])AC_CONFIG_HEADER([$1])dnl When config.status generates a header, we must update the stamp-h file.dnl This file resides in the same directory as the config headerdnl that is generated.  We must strip everything past the first ":",dnl and everything past the last "/".AC_OUTPUT_COMMANDS(changequote(<<,>>)dnlifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,<<am_indx=1for am_file in <<$1>>; do  case " <<$>>CONFIG_HEADERS " in  *" <<$>>am_file "*<<)>>    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx    ;;  esac  am_indx=`expr "<<$>>am_indx" + 1`done<<>>dnl>>)changequote([,]))])# Add --enable-maintainer-mode option to configure.# From Jim Meyering# serial 1AC_DEFUN(AM_MAINTAINER_MODE,[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])  dnl maintainer-mode is disabled by default  AC_ARG_ENABLE(maintainer-mode,[  --enable-maintainer-mode enable make rules and dependencies not useful                          (and sometimes confusing) to the casual installer],      USE_MAINTAINER_MODE=$enableval,      USE_MAINTAINER_MODE=no)  AC_MSG_RESULT($USE_MAINTAINER_MODE)  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)  MAINT=$MAINTAINER_MODE_TRUE  AC_SUBST(MAINT)dnl])# Define a conditional.AC_DEFUN(AM_CONDITIONAL,[AC_SUBST($1_TRUE)AC_SUBST($1_FALSE)if $2; then  $1_TRUE=  $1_FALSE='#'else  $1_TRUE='#'  $1_FALSE=fi])

⌨️ 快捷键说明

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