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

📄 acinclude.m4

📁 Motion JPEG编解码器源代码
💻 M4
📖 第 1 页 / 共 3 页
字号:
     AC_PATH_LIB_ERROR     AC_PATH_LIB_ERROR([If you have an old version installed, it is best to remove])     AC_PATH_LIB_ERROR([it, although you may also be able to get things to work by])     AC_PATH_LIB_ERROR([modifying LD_LIBRARY_PATH])    ],    [AC_PATH_LIB_ERROR([The test program failed to compile or link.  See the file])     AC_PATH_LIB_ERROR([config.log for the exact error that occured.  This usually])     AC_PATH_LIB_ERROR([means UP was incorrectly installed or that you have])     AC_PATH_LIB_ERROR([moved UP since it was installed.  In the latter case,])     AC_PATH_LIB_ERROR([you may want to edit the $LDOWN[]_config script:])     AC_PATH_LIB_ERROR([$UP[]_CONFIG])    ])firm -f RUNLOGm4_popdef([RUNLOG])dnlm4_popdef([MAJOR])dnlm4_popdef([MINOR])dnlm4_popdef([MICRO])dnlm4_popdef([DEFMAJOR])dnlm4_popdef([DEFMINOR])dnlm4_popdef([DEFMICRO])dnl])# _AC_PATH_LIB_CHECK_TEST_COMPILE_DEFAULT# _AC_PATH_LIB_CHECK_VERSION_DEFAULT# ----------------------------------# Check that the library version (config) is greater than or equal to# the requested (minimum) version.AC_DEFUN([_AC_PATH_LIB_CHECK_VERSION],[m4_if([$2], , ,       [if test x$LDOWN[]_present_avoidcache = xyes ; then         if test \             "$LDOWN[]_config_major_version" -lt "$LDOWN[]_min_major_version" -o \             "$LDOWN[]_config_major_version" -eq "$LDOWN[]_min_major_version" -a \             "$LDOWN[]_config_minor_version" -lt "$LDOWN[]_min_minor_version" -o \             "$LDOWN[]_config_major_version" -eq "$LDOWN[]_min_major_version" -a \             "$LDOWN[]_config_minor_version" -eq "$LDOWN[]_min_minor_version" -a \             "$LDOWN[]_config_micro_version" -lt "$LDOWN[]_min_micro_version" ; then           CACHE[]_present="no"           LDOWN[]_version_test_error="yes"           AC_PATH_LIB_ERROR([$UP[]_CONFIG --version' returned $LDOWN[]_config_major_version.$LDOWN[]_config_minor_version.$LDOWN[]_config_micro_version, but])           AC_PATH_LIB_ERROR([UP (>= $LDOWN[]_min_version) was needed.])           AC_PATH_LIB_ERROR           AC_PATH_LIB_ERROR([If $]LDOWN[_config was wrong, set the environment])           AC_PATH_LIB_ERROR([variable ]UP[_CONFIG to point to the correct copy of])           AC_PATH_LIB_ERROR([$]LDOWN[_config, and remove the file config.cache])           AC_PATH_LIB_ERROR([before re-running configure.])         else           CACHE[]_present="yes"         fi       fi])])# _AC_PATH_LIB_CHECK_VERSION_DEFAULT# _AC_PATH_LIB_CHECK_LINK_DEFAULT(SUCCESS, FAIL)# ----------------------------------------------# Check if the library will link successfully.  If specified, run# SUCCESS or FAIL on success or failureAC_DEFUN([_AC_PATH_LIB_CHECK_LINK],[ac_save_CFLAGS="$CFLAGS"ac_save_LIBS="$LIBS"CFLAGS="$CFLAGS $UP[]_CFLAGS"LIBS="$LIBS $UP[]_LIBS"AC_TRY_LINK([ #include <stdio.h> ], ,            [m4_if([$1], , :, [$1])],            [m4_if([$2], , :, [$2])])CFLAGS="$ac_save_CFLAGS"LIBS="$ac_save_LIBS"])# _AC_PATH_LIB_CHECK_LINK_DEFAULT## ------------------- #### 4. Error reporting. #### ------------------- ### AC_PATH_LIB_ERROR(MESSAGE)# --------------------------# Print an error message, MESSAGE, to the error log.AC_DEFUN([AC_PATH_LIB_ERROR],[echo '*** m4_if([$1], , , [$1])' >>ERRORLOG])# _AC_PATH_LIB_ERROR_DUMP# -----------------------# Print the error log (after main AC_CACHE_CHECK completes).AC_DEFUN([_AC_PATH_LIB_ERROR_DUMP],[if test -f ERRORLOG ; then  cat ERRORLOG  rm -f ERRORLOGfi])## ------------------ #### 5. Feature macros. #### ------------------ ### AC_PATH_LIB_PKGCONFIG# ---------------------# Enable pkgconfig support in libconfig script (default).AC_DEFUN([AC_PATH_LIB_PKGCONFIG],[m4_define([AC_PATH_LIB_USEPKGCONFIG], [true])])dnl# AC_PATH_LIB_LIBCONFIG# ---------------------# Disable pkgconfig support in libconfig script.AC_DEFUN([AC_PATH_LIB_LIBCONFIG],[m4_define([AC_PATH_LIB_USEPKGCONFIG], [false])])dnl# AC_PATH_LIB_REGISTER (MACRO, REPLACEMENT)# -----------------------------------------# Register a macro to replace the default checks.  Use the REPLACEMENT# macro for the check macro MACRO.## Possible MACROs are:#   _AC_PATH_LIB_CHECK_COMPILE and#   _AC_PATH_LIB_CHECK_VERSION# You should make sure that replacement macros use the same arguments# (if any), and do error logging in the same manner and behave in the# same way as the original.# Non-default header names may be specified, as well as version# variable names in the library itself (needed for# _AC_PATH_LIB_CHECK_COMPILE):#   _AC_PATH_LIB_HEADER#   _AC_PATH_LIB_VERSION_PREFIX (default library_)#   _AC_PATH_LIB_VERSION_MAJOR (default major)#   _AC_PATH_LIB_VERSION_MINOR (default minor)#   _AC_PATH_LIB_VERSION_MICRO (default micro)#   _AC_PATH_LIB_VERSION_SUFFIX (default _version)#   _AC_PATH_LIB_DEFVERSION_PREFIX (default LIBRARY_)#   _AC_PATH_LIB_DEFVERSION_MAJOR (default MAJOR)#   _AC_PATH_LIB_DEFVERSION_MINOR (default MINOR)#   _AC_PATH_LIB_DEFVERSION_MICRO (default MICRO)#   _AC_PATH_LIB_DEFVERSION_SUFFIX (default _VERSION)# For example, library_major_version.AC_DEFUN([AC_PATH_LIB_REGISTER],[m4_define([$1], [$2])])# AC_PATH_LIB_CHECK_REGISTER_DEFAULTS# -----------------------------------# Restore the default check macros.AC_DEFUN([AC_PATH_LIB_CHECK_REGISTER_DEFAULTS],[_AC_PATH_LIB_CHECK_REGISTER_DEFAULTS([_AC_PATH_LIB_CHECK_COMPILE],                                       [_AC_PATH_LIB_CHECK_VERSION],                                       [_AC_PATH_LIB_HEADER],                                       [_AC_PATH_LIB_VERSION_PREFIX],                                       [_AC_PATH_LIB_VERSION_MAJOR],                                       [_AC_PATH_LIB_VERSION_MINOR],                                       [_AC_PATH_LIB_VERSION_MICRO],                                       [_AC_PATH_LIB_VERSION_SUFFIX],                                       [_AC_PATH_LIB_DEFVERSION_PREFIX],                                       [_AC_PATH_LIB_DEFVERSION_MAJOR],                                       [_AC_PATH_LIB_DEFVERSION_MINOR],                                       [_AC_PATH_LIB_DEFVERSION_MICRO],                                       [_AC_PATH_LIB_DEFVERSION_SUFFIX])])# AC_PATH_LIB_CHECK_REGISTER_DEFAULTS# _AC_PATH_LIB_CHECK_REGISTER_DEFAULTS(MACROs ...)# ------------------------------------------------# Undefine MACROs.AC_DEFUN([AC_PATH_LIB_CHECK_REGISTER_DEFAULTS],[m4_if([$1], , ,       [m4_ifdef([$1],                 [m4_undefine([$1])])        AC_PATH_LIB_CHECK_REGISTER_DEFAULTS(m4_shift($@))       ])])dnl *************************************************************************dnl AX_CONFIG_PREFIXED_HEADER and AX_PREFIXED_DEFINEdnldnl @synopsis AX_CONFIG_PREFIXED_HEADER(OUTPUT, PREFIX, INPUT)dnl @synopsis AX_PREFIXED_DEFINE(PREFIX, SYMBOL)dnldnl This pair of macros is used to create an installable version of adnl configure-generated config file (such as the usual 'config.h', whichdnl itself should never be installed by a package).dnldnl The classic example is the creation of a "mypkg-config.h" filednl which will be installed along with mypkg's other header files.dnl Your configure.ac should contain:dnldnl    AC_CONFIG_HEADERS([config.h])dnl    ...dnl    AX_CONFIG_PREFIXED_HEADER([mypkg-config.h], [MYPKG], [config.h])dnldnl This declares that 'mypkg-config.h' will be generated at the end ofdnl config.status from 'config.h' by prefixing the desired symbols withdnl "MYPKG_".  To schedule symbols for inclusion in 'mypkg-config.h',dnl you would add the following to configure.ac:dnldnl    AX_PREFIXED_DEFINE([MYPKG], [HAVE_FEATURE_Q])dnl    ...dnl    AX_PREFIXED_DEFINE([MYPKG], [HAVE_ALLOCA_H])dnl    ...dnl    AX_PREFIXED_DEFINE([MYPKG], [SPECIAL_PRINTING_STRING])dnl        etc.dnldnl Each instance of AX_PREFIXED_DEFINE() should correspond to an instancednl of the usual AC_DEFINE(); the AX_PREFIXED_DEFINE() merely declares thatdnl the DEFINE'd symbol should be prefixed with "MYPKG_" and added to thednl 'mypkg-config.h' output file.  dnldnl AX_CONFIG_PREFIXED_HEADER will only transfer over "#define SYMBOL ..."dnl and "/* #undef SYMBOL ... */" declarations.  It will also attempt todnl transfer an immediately preceding (no intervening blank lines) C-stylednl comment block.dnldnl The mutual ordering of AC_CONFIG_PREFIXED_HEADER, AC_CONFIG_HEADERS,dnl AX_PREFIXED_DEFINE, and AC_DEFINE is unimportant.  All the real workdnl is done at AC_OUTPUT and during execution of config.status.dnldnl @version v1.0 (last modified: 2004-08-08)dnl @author Matthew Marjanovic <maddog@mir.com>dnldnl *************************************************************************AC_DEFUN([AX_CONFIG_PREFIXED_HEADER],[dnlAC_CONFIG_COMMANDS([$1],[dnlAS_VAR_PUSHDEF([_OUT],[ax_config_prefixed_OUT])dnlAS_VAR_PUSHDEF([_PFX],[ax_config_prefixed_PFX])dnlAS_VAR_PUSHDEF([_INP],[ax_config_prefixed_INP])dnlAS_VAR_PUSHDEF([_DFN],[ax_config_prefixed_DFN])dnlAS_VAR_PUSHDEF([_TMP],[ax_config_prefixed_TMP])dnlAS_VAR_PUSHDEF([_SCRIPT],[ax_config_prefixed_SCRIPT])dnl_OUT="$1"_PFX=AS_TR_CPP([$2])_INP=`echo "$3" | sed -e 's/ *//'`_DFN=AS_TR_CPP([_$_OUT])_TMP="$tmp/$_OUT"_SCRIPT="$tmp/${_OUT}.sed"if test -z "$_PFX" ; then   AC_MSG_ERROR([missing prefix in [$0]])else  if test ! -f "$_INP" ; then     if test -f "$srcdir/$_INP" ; then       _INP="$srcdir/$_INP"    fi  fi  AC_MSG_NOTICE([creating $_OUT (prefix $_PFX for $_INP)])  if test ! -f $_INP ; then    AC_MSG_ERROR([input file $_INP does not exist])  else    # Create the transformation script    cat <<_EOF >$_SCRIPT@%:@ look for requested keywords and prefix themm4_ifdef([_AX_PREFIXED_DEFINE_VARS($2)],         [AC_FOREACH([AC_Var], m4_defn([_AX_PREFIXED_DEFINE_VARS($2)]),[s/@%:@\\( *\\)\\(def[]ine\\|undef\\)  *\\(AC_Var\\)\\(.*\\)/@%:@\\1\\2 ${_PFX}_\\3 \\4/])])dnl@%:@ successful?  then go printtPrint@%:@ else, try to collect a comment\\,/\\*, bCommentBegin@%:@ else, clear comment if a blank li[]ne is encountered/ */ hd@%:@ Comments:  collect lines in hold buffer until end marker found.:CommentBegin\\,\\*/, bCommentEndN; bCommentBegin:CommentEndh; d@%:@ append pattern/nl to hold buffer, remove any blank, print, clear hold.:Prints/\\(.*\\)/\\1\\n/H; x; s/^\\n//; ps/.*//; x; d_EOF    # Run _INP through _SCRIPT to create _TMP    cat <<_EOF >$_TMP/*   $_OUT   This is an architecture-specific fi[]le which was generated   automatically by configure.   Do not edit it manually.*/@%:@ifndef $_DFN@%:@def[]ine $_DFN_EOF    sed -nf $_SCRIPT $_INP >>$_TMP    cat <<_EOF >>$_TMP@%:@endif /* $_DFN */_EOF    # Check if new output is different from existing...    # ...move to destination if so.    if cmp -s $_OUT $_TMP 2>/dev/null; then      AC_MSG_NOTICE([$_OUT is unchanged])    else      ac_dir=`AS_DIRNAME(["$_OUT"])`      AS_MKDIR_P(["$ac_dir"])      rm -f "$_OUT"      mv "$_TMP" "$_OUT"    fi  fifiAS_VAR_POPDEF([_SCRIPT])dnlAS_VAR_POPDEF([_TMP])dnlAS_VAR_POPDEF([_DFN])dnlAS_VAR_POPDEF([_INP])dnlAS_VAR_POPDEF([_PFX])dnlAS_VAR_POPDEF([_OUT])dnl],[PACKAGE_TARNAME="$PACKAGE_TARNAME"])])# AX_CONFIG_PREFIXED_HEADERAC_DEFUN([AX_PREFIXED_DEFINE],[m4_append_uniq([_AX_PREFIXED_DEFINE_VARS($1)], [$2], [ ])dnl])# AX_PREFIXED_DEFINE

⌨️ 快捷键说明

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