📄 libopts.m4
字号:
dnl -*- buffer-read-only: t -*- vi: set ro:dnl dnl DO NOT EDIT THIS FILE (libopts.m4)dnl dnl It has been AutoGen-ed Saturday May 5, 2007 at 12:02:37 PM PDTdnl From the definitions libopts.defdnl and the template file conftest.tpldnldnl do always before generated macros:dnlAC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[[if test X${INVOKE_LIBOPTS_MACROS_FIRST_done} != Xyes ; then] # ================= # AC_HEADER_STDC # ================= AC_HEADER_STDC # ================= # AC_HEADER_DIRENT # ================= AC_HEADER_DIRENT # ================= # AC_CHECK_HEADERS # ================= AC_CHECK_HEADERS(dlfcn.h errno.h fcntl.h libgen.h memory.h netinet/in.h \ setjmp.h sys/mman.h sys/param.h sys/poll.h sys/procset.h sys/select.h \ sys/socket.h sys/stropts.h sys/time.h sys/un.h sys/wait.h unistd.h \ utime.h sysexits.h) # -------------------------------------------- # Verify certain entries from AC_CHECK_HEADERS # -------------------------------------------- [for f in sys_types sys_mman sys_param sys_stat sys_wait \ string errno stdlib memory setjmp do eval as_ac_var=\${ac_cv_header_${f}_h+set} test "${as_ac_var}" = set] || \ AC_MSG_ERROR([You must have ${f}.h on your system]) done # ================================================ # AC_CHECK_HEADERS: stdarg.h is present define HAVE_STDARG_H, otherwise # if varargs.h is present define HAVE_VARARGS_H. # ================================================ AC_CHECK_HEADERS(stdarg.h varargs.h, break) [if test `eval echo '${'$as_ac_Header'}'` != yes; then] AC_MSG_ERROR([You must have stdarg.h or varargs.h on your system]) fi # ================================================ # Similarly for the string.h and strings.h headers # ================================================ AC_CHECK_HEADERS(string.h strings.h, break) [if test `eval echo '${'$as_ac_Header'}'` != yes; then] AC_MSG_ERROR([You must have string.h or strings.h on your system]) fi # ===================== # ...and limits headers # ===================== AC_CHECK_HEADERS(limits.h sys/limits.h values.h, break) [if test `eval echo '${'$as_ac_Header'}'` != yes; then] AC_MSG_ERROR([You must have one of limits.h, sys/limits.h or values.h]) fi # ======================== # ...and int types headers # ======================== AC_CHECK_HEADERS(stdint.h inttypes.h, break) AC_CHECK_TYPES([int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, intptr_t, uint_t]) # ==================== # uintptr type & sizes # ==================== AC_CHECK_TYPES([uintptr_t], , [AC_DEFINE([uintptr_t], unsigned long, [Alternate uintptr_t for systems without it.])]) AC_CHECK_SIZEOF(char*, 4) AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(long, 4) AC_CHECK_SIZEOF(short, 2) # ---------------------------------------------------------------------- # AC_CHECK_LIB for SVR4 libgen, and use it if it defines pathfind. # ---------------------------------------------------------------------- AC_CHECK_LIB(gen, pathfind) AC_FUNC_VPRINTF AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr strrchr])[ INVOKE_LIBOPTS_MACROS_FIRST_done=yesfi]])dnldnl @synopsis INVOKE_LIBOPTS_MACROSdnldnl This macro will invoke the AutoConf macros specified in libopts.defdnl that have not been disabled with "omit-invocation".dnlAC_DEFUN([LIBOPTS_WITH_REGEX_HEADER],[ AC_ARG_WITH([regex-header], AC_HELP_STRING([--with-regex-header], [a reg expr header is specified]), [libopts_cv_with_regex_header=${with_regex_header}], AC_CACHE_CHECK([whether a reg expr header is specified], libopts_cv_with_regex_header, libopts_cv_with_regex_header=no) ) # end of AC_ARG_WITH if test "X${libopts_cv_with_regex_header}" != Xno then AC_DEFINE_UNQUOTED([REGEX_HEADER],[<${libopts_cv_with_regex_header}>]) else AC_DEFINE([REGEX_HEADER],[<regex.h>],[name of regex header file]) fi ]) # end of AC_DEFUN of LIBOPTS_WITH_REGEX_HEADERAC_DEFUN([LIBOPTS_WITHLIB_REGEX],[ AC_ARG_WITH([libregex], AC_HELP_STRING([--with-libregex], [libregex installation prefix]), [libopts_cv_with_libregex_root=${with_libregex}], AC_CACHE_CHECK([whether with-libregex was specified], libopts_cv_with_libregex_root, libopts_cv_with_libregex_root=no) ) # end of AC_ARG_WITH libregex if test "${with_libguile+set}" = set && \ test "${withval}" = no then ## disabled by request libopts_cv_with_libregex_root=no libopts_cv_with_libregex_cflags=no libopts_cv_with_libregex_libs=no else AC_ARG_WITH([libregex-cflags], AC_HELP_STRING([--with-libregex-cflags], [libregex compile flags]), [libopts_cv_with_libregex_cflags=${with_regex_cflags}], AC_CACHE_CHECK([whether with-libregex-cflags was specified], libopts_cv_with_libregex_cflags, libopts_cv_with_libregex_cflags=no) ) # end of AC_ARG_WITH libregex-cflags AC_ARG_WITH([libregex-libs], AC_HELP_STRING([--with-libregex-libs], [libregex link command arguments]), [libopts_cv_with_libregex_libs=${with_regex_libs}], AC_CACHE_CHECK([whether with-libregex-libs was specified], libopts_cv_with_libregex_libs, libopts_cv_with_libregex_libs=no) ) # end of AC_ARG_WITH libregex-libs case "X${libopts_cv_with_libregex_cflags}" in Xyes|Xno|X ) case "X${libopts_cv_with_libregex_root}" in Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;; * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;; esac esac case "X${libopts_cv_with_libregex_libs}" in Xyes|Xno|X ) case "X${libopts_cv_with_libregex_root}" in Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;; * ) libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex";; esac esac libopts_save_CPPFLAGS="${CPPFLAGS}" libopts_save_LIBS="${LIBS}" fi ## disabled by request case "X${libopts_cv_with_libregex_cflags}" in Xyes|Xno|X ) libopts_cv_with_libregex_cflags="" ;; * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;; esac case "X${libopts_cv_with_libregex_libs}" in Xyes|Xno|X ) libopts_cv_with_libregex_libs="" ;; * ) LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;; esac LIBREGEX_CFLAGS="" LIBREGEX_LIBS="" AC_MSG_CHECKING([whether libregex functions properly]) AC_CACHE_VAL([libopts_cv_with_libregex],[ AC_TRY_RUN([@%:@include <stdio.h>@%:@include <stdlib.h>@%:@include <sys/types.h>@%:@include REGEX_HEADERstatic regex_t re;void comp_re( char const* pzPat ) { int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE ); if (res == 0) return; exit( res ); }int main() { regmatch_t m@<:@2@:>@; comp_re( "^.*\@S|@" ); comp_re( "()|no.*" ); comp_re( "." ); if (regexec( &re, "X", 2, m, 0 ) != 0) return 1; if ((m@<:@0@:>@.rm_so != 0) || (m@<:@0@:>@.rm_eo != 1)) { fputs( "error: regex -->.<-- did not match\n", stderr ); return 1; } return 0; }], [libopts_cv_with_libregex=yes], [libopts_cv_with_libregex=no], [libopts_cv_with_libregex=no]) # end of AC_TRY_RUN ]) # end of AC_CACHE_VAL for libopts_cv_with_libregex AC_MSG_RESULT([${libopts_cv_with_libregex}]) if test "X${libopts_cv_with_libregex}" != Xno then AC_DEFINE([WITH_LIBREGEX],[1], [Define this if a working libregex can be found]) else CPPFLAGS="${libopts_save_CPPFLAGS}" LIBS="${libopts_save_LIBS}" fi ]) # end of AC_DEFUN of LIBOPTS_WITHLIB_REGEXAC_DEFUN([LIBOPTS_RUN_PATHFIND],[ AC_MSG_CHECKING([whether pathfind(3) works]) AC_CACHE_VAL([libopts_cv_run_pathfind],[ AC_TRY_RUN([@%:@include <string.h>@%:@include <stdlib.h>int main (int argc, char** argv) { char* pz = pathfind( getenv( "PATH" ), "sh", "x" ); return (pz == 0) ? 1 : 0;}], [libopts_cv_run_pathfind=yes],[libopts_cv_run_pathfind=no],[libopts_cv_run_pathfind=no] ) # end of TRY_RUN ]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind AC_MSG_RESULT([${libopts_cv_run_pathfind}]) if test "X${libopts_cv_run_pathfind}" != Xno then AC_DEFINE([HAVE_PATHFIND],[1], [Define this if pathfind(3) works]) fi ]) # end of AC_DEFUN of LIBOPTS_RUN_PATHFINDAC_DEFUN([LIBOPTS_TEST_DEV_ZERO],[ AC_MSG_CHECKING([whether /dev/zero is readable device]) AC_CACHE_VAL([libopts_cv_test_dev_zero],[ libopts_cv_test_dev_zero=`exec 2> /dev/nulldzero=\`ls -lL /dev/zero | egrep ^c......r\`test -z "${dzero}" && exit 1echo ${dzero}` if test $? -ne 0 then libopts_cv_test_dev_zero=no elif test -z "$libopts_cv_test_dev_zero" then libopts_cv_test_dev_zero=no fi ]) # end of CACHE_VAL of libopts_cv_test_dev_zero AC_MSG_RESULT([${libopts_cv_test_dev_zero}]) if test "X${libopts_cv_test_dev_zero}" != Xno then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -