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

📄 libopts.m4

📁 基于ntp协议的网络时间服务程序
💻 M4
📖 第 1 页 / 共 2 页
字号:
    AC_DEFINE([HAVE_DEV_ZERO],[1],        [Define this if /dev/zero is readable device])  fi  ]) # end of AC_DEFUN of LIBOPTS_TEST_DEV_ZEROAC_DEFUN([LIBOPTS_RUN_REALPATH],[  AC_MSG_CHECKING([whether we have a functional realpath(3C)])  AC_CACHE_VAL([libopts_cv_run_realpath],[  AC_TRY_RUN([@%:@include <limits.h>@%:@include <stdlib.h>int main (int argc, char** argv) {@%:@ifndef PATH_MAXchoke me!!@%:@else   char zPath@<:@PATH_MAX+1@:>@;@%:@endif   char *pz = realpath(argv@<:@0@:>@, zPath);   return (pz == zPath) ? 0 : 1;}],    [libopts_cv_run_realpath=yes],[libopts_cv_run_realpath=no],[libopts_cv_run_realpath=no]  ) # end of TRY_RUN  ]) # end of AC_CACHE_VAL for libopts_cv_run_realpath  AC_MSG_RESULT([${libopts_cv_run_realpath}])  if test "X${libopts_cv_run_realpath}" != Xno  then    AC_DEFINE([HAVE_REALPATH],[1],        [Define this if we have a functional realpath(3C)])  fi  ]) # end of AC_DEFUN of LIBOPTS_RUN_REALPATHAC_DEFUN([LIBOPTS_RUN_STRFTIME],[  AC_MSG_CHECKING([whether strftime() works])  AC_CACHE_VAL([libopts_cv_run_strftime],[  AC_TRY_RUN([@%:@include <time.h>@%:@include <string.h>char t_buf@<:@ 64 @:>@;int main() {  static char const z@<:@@:>@ = "Thursday Aug 28 240";  struct tm tm;  tm.tm_sec   = 36;  /* seconds after the minute @<:@0, 61@:>@  */  tm.tm_min   = 44;  /* minutes after the hour @<:@0, 59@:>@ */  tm.tm_hour  = 12;  /* hour since midnight @<:@0, 23@:>@ */  tm.tm_mday  = 28;  /* day of the month @<:@1, 31@:>@ */  tm.tm_mon   =  7;  /* months since January @<:@0, 11@:>@ */  tm.tm_year  = 86;  /* years since 1900 */  tm.tm_wday  =  4;  /* days since Sunday @<:@0, 6@:>@ */  tm.tm_yday  = 239; /* days since January 1 @<:@0, 365@:>@ */  tm.tm_isdst =  1;  /* flag for daylight savings time */  strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );  return (strcmp( t_buf, z ) != 0); }],    [libopts_cv_run_strftime=yes],[libopts_cv_run_strftime=no],[libopts_cv_run_strftime=no]  ) # end of TRY_RUN  ]) # end of AC_CACHE_VAL for libopts_cv_run_strftime  AC_MSG_RESULT([${libopts_cv_run_strftime}])  if test "X${libopts_cv_run_strftime}" != Xno  then    AC_DEFINE([HAVE_STRFTIME],[1],        [Define this if strftime() works])  fi  ]) # end of AC_DEFUN of LIBOPTS_RUN_STRFTIMEAC_DEFUN([LIBOPTS_RUN_FOPEN_BINARY],[  AC_MSG_CHECKING([whether fopen accepts "b" mode])  AC_CACHE_VAL([libopts_cv_run_fopen_binary],[  AC_TRY_RUN([@%:@include <stdio.h>int main (int argc, char** argv) {FILE* fp = fopen("conftest.@S|@ac_ext", "rb");return (fp == NULL) ? 1 : fclose(fp); }],    [libopts_cv_run_fopen_binary=yes],[libopts_cv_run_fopen_binary=no],[libopts_cv_run_fopen_binary=no]  ) # end of TRY_RUN  ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary  AC_MSG_RESULT([${libopts_cv_run_fopen_binary}])  if test "X${libopts_cv_run_fopen_binary}" != Xno  then    AC_DEFINE([FOPEN_BINARY_FLAG],"b",	[fopen(3) accepts a 'b' in the mode flag])  else    AC_DEFINE([FOPEN_BINARY_FLAG],"",	[fopen(3) accepts a 'b' in the mode flag])  fi  ]) # end of AC_DEFUN of LIBOPTS_RUN_FOPEN_BINARYAC_DEFUN([LIBOPTS_RUN_FOPEN_TEXT],[  AC_MSG_CHECKING([whether fopen accepts "t" mode])  AC_CACHE_VAL([libopts_cv_run_fopen_text],[  AC_TRY_RUN([@%:@include <stdio.h>int main (int argc, char** argv) {FILE* fp = fopen("conftest.@S|@ac_ext", "rt");return (fp == NULL) ? 1 : fclose(fp); }],    [libopts_cv_run_fopen_text=yes],[libopts_cv_run_fopen_text=no],[libopts_cv_run_fopen_text=no]  ) # end of TRY_RUN  ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text  AC_MSG_RESULT([${libopts_cv_run_fopen_text}])  if test "X${libopts_cv_run_fopen_text}" != Xno  then    AC_DEFINE([FOPEN_TEXT_FLAG],"t",	[fopen(3) accepts a 't' in the mode flag])  else    AC_DEFINE([FOPEN_TEXT_FLAG],"",	[fopen(3) accepts a 't' in the mode flag])  fi  ]) # end of AC_DEFUN of LIBOPTS_RUN_FOPEN_TEXTAC_DEFUN([LIBOPTS_DISABLE_OPTIONAL_ARGS],[  AC_ARG_ENABLE([optional-args],    AC_HELP_STRING([--disable-optional-args], [not wanting optional option args]),    [libopts_cv_enable_optional_args=${enable_optional_args}],    AC_CACHE_CHECK([whether not wanting optional option args], libopts_cv_enable_optional_args,      libopts_cv_enable_optional_args=yes)  ) # end of AC_ARG_ENABLE  if test "X${libopts_cv_enable_optional_args}" = Xno  then    AC_DEFINE([NO_OPTIONAL_OPT_ARGS], [1],          [Define this if optional arguments are disallowed])  fi  ]) # end of AC_DEFUN of LIBOPTS_DISABLE_OPTIONAL_ARGSAC_DEFUN([INVOKE_LIBOPTS_MACROS],[  INVOKE_LIBOPTS_MACROS_FIRST  # Check to see if a reg expr header is specified.  LIBOPTS_WITH_REGEX_HEADER  # Check to see if a working libregex can be found.  LIBOPTS_WITHLIB_REGEX  # Check to see if pathfind(3) works.  LIBOPTS_RUN_PATHFIND  # Check to see if /dev/zero is readable device.  LIBOPTS_TEST_DEV_ZERO  # Check to see if we have a functional realpath(3C).  LIBOPTS_RUN_REALPATH  # Check to see if strftime() works.  LIBOPTS_RUN_STRFTIME  # Check to see if fopen accepts "b" mode.  LIBOPTS_RUN_FOPEN_BINARY  # Check to see if fopen accepts "t" mode.  LIBOPTS_RUN_FOPEN_TEXT  # Check to see if not wanting optional option args.  LIBOPTS_DISABLE_OPTIONAL_ARGS]) # end AC_DEFUN of INVOKE_LIBOPTS_MACROSdnl @synopsis  LIBOPTS_CHECKdnldnl Time-stamp:        "2006-09-23 19:36:24 bkorb"dnl Last Committed:    $Date: 2006/09/24 02:59:00 $dnldnl If autoopts-config works, add the linking information to LIBS.dnl Otherwise, add ``libopts-${ao_rev}'' to SUBDIRS and run alldnl the config tests that the library needs.  Invoke thednl "INVOKE_LIBOPTS_MACROS" macro iff we are building libopts.dnldnl Default to system liboptsdnlAC_DEFUN([LIBOPTS_CHECK],[  [NEED_LIBOPTS_DIR='']  m4_pushdef([AO_Libopts_Dir],	    [ifelse($1, , [libopts], [$1])])  AC_SUBST(LIBOPTS_DIR, AO_Libopts_Dir)  AC_ARG_ENABLE([local-libopts],    AC_HELP_STRING([--enable-local-libopts],       [Force using the supplied libopts tearoff code]),[    if test x$enableval = xyes ; then       AC_MSG_NOTICE([Using supplied libopts tearoff])       LIBOPTS_LDADD='$(top_builddir)/AO_Libopts_Dir/libopts.la'       LIBOPTS_CFLAGS='-I$(top_srcdir)/AO_Libopts_Dir'       NEED_LIBOPTS_DIR=true    fi])  AC_ARG_ENABLE([libopts-install],    AC_HELP_STRING([--disable-libopts-install],       [Do not install libopts with client installation]))  AM_CONDITIONAL([INSTALL_LIBOPTS],[test "X${enable_libopts_install}" != Xno])  [if test -z "${NEED_LIBOPTS_DIR}" ; then]     AC_MSG_CHECKING([whether autoopts-config can be found])     AC_ARG_WITH([autoopts-config],        AC_HELP_STRING([--with-autoopts-config],             [specify the config-info script]),        [lo_cv_with_autoopts_config=${with_autoopts_config}],        AC_CACHE_CHECK([whether autoopts-config is specified],             [lo_cv_with_autoopts_config],             [if autoopts-config --help 2>/dev/null 1>&2        then lo_cv_with_autoopts_config=autoopts-config        elif libopts-config --help 2>/dev/null 1>&2        then lo_cv_with_autoopts_config=libopts-config        else lo_cv_with_autoopts_config=no ; fi])     ) # end of AC_ARG_WITH     AC_CACHE_VAL([lo_cv_test_autoopts],[        if test -z "${lo_cv_with_autoopts_config}" \                -o X"${lo_cv_with_autoopts_config}" = Xno        then           if autoopts-config --help 2>/dev/null 1>&2           then lo_cv_with_autoopts_config=autoopts-config           elif libopts-config --help 2>/dev/null 1>&2           then lo_cv_with_autoopts_config=libopts-config           else lo_cv_with_autoopts_config=false ; fi        fi        lo_cv_test_autoopts=`            ${lo_cv_with_autoopts_config} --libs` 2> /dev/null        if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"        then lo_cv_test_autoopts=no ; fi     ]) # end of CACHE_VAL     AC_MSG_RESULT([${lo_cv_test_autoopts}])     [if test "X${lo_cv_test_autoopts}" != Xno     then        LIBOPTS_LDADD="${lo_cv_test_autoopts}"        LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"     else        LIBOPTS_LDADD='$(top_builddir)/]AO_Libopts_Dir[/libopts.la'        LIBOPTS_CFLAGS='-I$(top_srcdir)/]AO_Libopts_Dir['        NEED_LIBOPTS_DIR=true     fi  fi # end of if test -z "${NEED_LIBOPTS_DIR}"]  AM_CONDITIONAL([NEED_LIBOPTS], [test -n "${NEED_LIBOPTS_DIR}"])  AC_SUBST(LIBOPTS_LDADD)  AC_SUBST(LIBOPTS_CFLAGS)  AC_SUBST(LIBOPTS_DIR, AO_Libopts_Dir)  AC_CONFIG_FILES(AO_Libopts_Dir/Makefile)  m4_popdef([AO_Libopts_Dir])  [if test -n "${NEED_LIBOPTS_DIR}" ; then]    INVOKE_LIBOPTS_MACROS  else    INVOKE_LIBOPTS_MACROS_FIRST  [fi# end of AC_DEFUN of LIBOPTS_CHECK]])

⌨️ 快捷键说明

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