X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=readline%2Faclocal.m4;h=27228d7159c8e1156c0280de18cb3ac18ab83f4c;hb=99a5596592eda72c5c60b45cdfabb47e426132d5;hp=c277a0c61054b45867fb8c53248100677d6e5a45;hpb=c862e87b3ec8647ab6c1bb08443088ea81c74225;p=deliverable%2Fbinutils-gdb.git diff --git a/readline/aclocal.m4 b/readline/aclocal.m4 index c277a0c610..27228d7159 100644 --- a/readline/aclocal.m4 +++ b/readline/aclocal.m4 @@ -1,1301 +1,792 @@ -dnl -dnl Bash specific tests -dnl -dnl Some derived from PDKSH 5.1.3 autoconf tests -dnl -dnl -dnl Check if dup2() does not clear the close on exec flag -dnl -AC_DEFUN(BASH_DUP2_CLOEXEC_CHECK, -[AC_MSG_CHECKING(if dup2 fails to clear the close-on-exec flag) -AC_CACHE_VAL(bash_cv_dup2_broken, -[AC_TRY_RUN([ -#include -#include -main() -{ - int fd1, fd2, fl; - fd1 = open("/dev/null", 2); - if (fcntl(fd1, 2, 1) < 0) - exit(1); - fd2 = dup2(fd1, 1); - if (fd2 < 0) - exit(2); - fl = fcntl(fd2, 1, 0); - /* fl will be 1 if dup2 did not reset the close-on-exec flag. */ - exit(fl != 1); -} -], bash_cv_dup2_broken=yes, bash_cv_dup2_broken=no, - [AC_MSG_WARN(cannot check dup2 if cross compiling -- defaulting to no) - bash_cv_dup2_broken=no]) -]) -AC_MSG_RESULT($bash_cv_dup2_broken) -if test $bash_cv_dup2_broken = yes; then -AC_DEFINE(DUP2_BROKEN) -fi -]) - -dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7) -AC_DEFUN(BASH_SIGNAL_CHECK, -[AC_REQUIRE([AC_TYPE_SIGNAL]) -AC_MSG_CHECKING(for type of signal functions) -AC_CACHE_VAL(bash_cv_signal_vintage, -[ - AC_TRY_LINK([#include ],[ - sigset_t ss; - struct sigaction sa; - sigemptyset(&ss); sigsuspend(&ss); - sigaction(SIGINT, &sa, (struct sigaction *) 0); - sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); - ], bash_cv_signal_vintage=posix, - [ - AC_TRY_LINK([#include ], [ - int mask = sigmask(SIGINT); - sigsetmask(mask); sigblock(mask); sigpause(mask); - ], bash_cv_signal_vintage=4.2bsd, - [ - AC_TRY_LINK([ - #include - RETSIGTYPE foo() { }], [ - int mask = sigmask(SIGINT); - sigset(SIGINT, foo); sigrelse(SIGINT); - sighold(SIGINT); sigpause(SIGINT); - ], bash_cv_signal_vintage=svr3, bash_cv_signal_vintage=v7 - )] - )] -) -]) -AC_MSG_RESULT($bash_cv_signal_vintage) -if test "$bash_cv_signal_vintage" = posix; then -AC_DEFINE(HAVE_POSIX_SIGNALS) -elif test "$bash_cv_signal_vintage" = "4.2bsd"; then -AC_DEFINE(HAVE_BSD_SIGNALS) -elif test "$bash_cv_signal_vintage" = svr3; then -AC_DEFINE(HAVE_USG_SIGHOLD) -fi -]) - -dnl Check if the pgrp of setpgrp() can't be the pid of a zombie process. -AC_DEFUN(BASH_PGRP_SYNC, -[AC_REQUIRE([AC_FUNC_GETPGRP]) -AC_MSG_CHECKING(whether pgrps need synchronization) -AC_CACHE_VAL(bash_cv_pgrp_pipe, -[AC_TRY_RUN([ -#ifdef HAVE_UNISTD_H -# include -#endif -main() -{ -# ifdef GETPGRP_VOID -# define getpgID() getpgrp() -# else -# define getpgID() getpgrp(0) -# define setpgid(x,y) setpgrp(x,y) -# endif - int pid1, pid2, fds[2]; - int status; - char ok; - - switch (pid1 = fork()) { - case -1: - exit(1); - case 0: - setpgid(0, getpid()); - exit(0); - } - setpgid(pid1, pid1); - - sleep(2); /* let first child die */ - - if (pipe(fds) < 0) - exit(2); - - switch (pid2 = fork()) { - case -1: - exit(3); - case 0: - setpgid(0, pid1); - ok = getpgID() == pid1; - write(fds[1], &ok, 1); - exit(0); - } - setpgid(pid2, pid1); - - close(fds[1]); - if (read(fds[0], &ok, 1) != 1) - exit(4); - wait(&status); - wait(&status); - exit(ok ? 0 : 5); -} -], bash_cv_pgrp_pipe=no,bash_cv_pgrp_pipe=yes, - [AC_MSG_WARN(cannot check pgrp synchronization if cross compiling -- defaulting to no) - bash_cv_pgrp_pipe=no]) -]) -AC_MSG_RESULT($bash_cv_pgrp_pipe) -if test $bash_cv_pgrp_pipe = yes; then -AC_DEFINE(PGRP_PIPE) -fi -]) - -dnl -dnl check for typedef'd symbols in header files, but allow the caller to -dnl specify the include files to be checked in addition to the default -dnl -dnl BASH_CHECK_TYPE(TYPE, HEADERS, DEFAULT[, VALUE-IF-FOUND]) -AC_DEFUN(BASH_CHECK_TYPE, -[AC_REQUIRE([AC_HEADER_STDC])dnl -AC_MSG_CHECKING(for $1) -AC_CACHE_VAL(bash_cv_type_$1, -[AC_EGREP_CPP($1, [#include -#if STDC_HEADERS -#include -#endif -$2 -], bash_cv_type_$1=yes, bash_cv_type_$1=no)]) -AC_MSG_RESULT($bash_cv_type_$1) -ifelse($#, 4, [if test $bash_cv_type_$1 = yes; then - AC_DEFINE($4) - fi]) -if test $bash_cv_type_$1 = no; then - AC_DEFINE($1, $3) -fi -]) - -dnl -dnl Type of struct rlimit fields: some systems (OSF/1, NetBSD, RISC/os 5.0) -dnl have a rlim_t, others (4.4BSD based systems) use quad_t, others use -dnl long and still others use int (HP-UX 9.01, SunOS 4.1.3). To simplify -dnl matters, this just checks for rlim_t, quad_t, or long. -dnl -AC_DEFUN(BASH_RLIMIT_TYPE, -[AC_MSG_CHECKING(for size and type of struct rlimit fields) -AC_CACHE_VAL(bash_cv_type_rlimit, -[AC_TRY_COMPILE([#include -#include ], -[rlim_t xxx;], bash_cv_type_rlimit=rlim_t,[ -AC_TRY_RUN([ -#include -#include -#include -main() -{ -#ifdef HAVE_QUAD_T - struct rlimit rl; - if (sizeof(rl.rlim_cur) == sizeof(quad_t)) - exit(0); -#endif - exit(1); -}], bash_cv_type_rlimit=quad_t, bash_cv_type_rlimit=long, - [AC_MSG_WARN(cannot check quad_t if cross compiling -- defaulting to long) - bash_cv_type_rlimit=long])]) -]) -AC_MSG_RESULT($bash_cv_type_rlimit) -if test $bash_cv_type_rlimit = quad_t; then -AC_DEFINE(RLIMTYPE, quad_t) -elif test $bash_cv_type_rlimit = rlim_t; then -AC_DEFINE(RLIMTYPE, rlim_t) -fi -]) - -dnl -dnl Check for sys_siglist[] or _sys_siglist[] -dnl -AC_DEFUN(BASH_DECL_UNDER_SYS_SIGLIST, -[AC_MSG_CHECKING([for _sys_siglist in signal.h or unistd.h]) -AC_CACHE_VAL(bash_cv_decl_under_sys_siglist, -[AC_TRY_COMPILE([ -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif], [ char *msg = _sys_siglist[2]; ], - bash_cv_decl_under_sys_siglist=yes, bash_cv_decl_under_sys_siglist=no, - [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)])])dnl -AC_MSG_RESULT($bash_cv_decl_under_sys_siglist) -if test $bash_cv_decl_under_sys_siglist = yes; then -AC_DEFINE(UNDER_SYS_SIGLIST_DECLARED) -fi -]) - -AC_DEFUN(BASH_UNDER_SYS_SIGLIST, -[AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST]) -AC_MSG_CHECKING([for _sys_siglist in system C library]) -AC_CACHE_VAL(bash_cv_under_sys_siglist, -[AC_TRY_RUN([ -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifndef UNDER_SYS_SIGLIST_DECLARED -extern char *_sys_siglist[]; -#endif -main() -{ -char *msg = (char *)_sys_siglist[2]; -exit(msg == 0); -}], - bash_cv_under_sys_siglist=yes, bash_cv_under_sys_siglist=no, - [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no) - bash_cv_under_sys_siglist=no])]) -AC_MSG_RESULT($bash_cv_under_sys_siglist) -if test $bash_cv_under_sys_siglist = yes; then -AC_DEFINE(HAVE_UNDER_SYS_SIGLIST) -fi -]) - -AC_DEFUN(BASH_SYS_SIGLIST, -[AC_REQUIRE([AC_DECL_SYS_SIGLIST]) -AC_MSG_CHECKING([for sys_siglist in system C library]) -AC_CACHE_VAL(bash_cv_sys_siglist, -[AC_TRY_RUN([ -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifndef SYS_SIGLIST_DECLARED -extern char *sys_siglist[]; -#endif -main() -{ -char *msg = sys_siglist[2]; -exit(msg == 0); -}], - bash_cv_sys_siglist=yes, bash_cv_sys_siglist=no, - [AC_MSG_WARN(cannot check for sys_siglist if cross compiling -- defaulting to no) - bash_cv_sys_siglist=no])]) -AC_MSG_RESULT($bash_cv_sys_siglist) -if test $bash_cv_sys_siglist = yes; then -AC_DEFINE(HAVE_SYS_SIGLIST) -fi -]) - -dnl Check for sys_errlist[] and sys_nerr, check for declaration -AC_DEFUN(BASH_SYS_ERRLIST, -[AC_MSG_CHECKING([for sys_errlist and sys_nerr]) -AC_CACHE_VAL(bash_cv_sys_errlist, -[AC_TRY_LINK([#include ], -[extern char *sys_errlist[]; - extern int sys_nerr; - char *msg = sys_errlist[sys_nerr - 1];], - bash_cv_sys_errlist=yes, bash_cv_sys_errlist=no)])dnl -AC_MSG_RESULT($bash_cv_sys_errlist) -if test $bash_cv_sys_errlist = yes; then -AC_DEFINE(HAVE_SYS_ERRLIST) -fi -]) - -dnl Check to see if opendir will open non-directories (not a nice thing) -AC_DEFUN(BASH_FUNC_OPENDIR_CHECK, -[AC_REQUIRE([AC_HEADER_DIRENT])dnl -AC_MSG_CHECKING(if opendir() opens non-directories) -AC_CACHE_VAL(bash_cv_opendir_not_robust, -[AC_TRY_RUN([ -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif /* HAVE_UNISTD_H */ -#if defined(HAVE_DIRENT_H) -# include -#else -# define dirent direct -# ifdef HAVE_SYS_NDIR_H -# include -# endif /* SYSNDIR */ -# ifdef HAVE_SYS_DIR_H -# include -# endif /* SYSDIR */ -# ifdef HAVE_NDIR_H -# include -# endif -#endif /* HAVE_DIRENT_H */ -main() -{ -DIR *dir; -int fd; -unlink("/tmp/not_a_directory"); -fd = open("/tmp/not_a_directory", O_WRONLY|O_CREAT, 0666); -write(fd, "\n", 1); -close(fd); -dir = opendir("/tmp/not_a_directory"); -unlink("/tmp/not_a_directory"); -exit (dir == 0); -}], bash_cv_opendir_not_robust=yes,bash_cv_opendir_not_robust=no, - [AC_MSG_WARN(cannot check opendir if cross compiling -- defaulting to no) - bash_cv_opendir_not_robust=no] -)]) -AC_MSG_RESULT($bash_cv_opendir_not_robust) -if test $bash_cv_opendir_not_robust = yes; then -AC_DEFINE(OPENDIR_NOT_ROBUST) -fi -]) - -dnl -AC_DEFUN(BASH_TYPE_SIGHANDLER, -[AC_MSG_CHECKING([whether signal handlers are of type void]) -AC_CACHE_VAL(bash_cv_void_sighandler, -[AC_TRY_COMPILE([#include -#include -#ifdef signal -#undef signal -#endif -#ifdef __cplusplus -extern "C" -#endif -void (*signal ()) ();], -[int i;], bash_cv_void_sighandler=yes, bash_cv_void_sighandler=no)])dnl -AC_MSG_RESULT($bash_cv_void_sighandler) -if test $bash_cv_void_sighandler = yes; then -AC_DEFINE(VOID_SIGHANDLER) -fi -]) - -AC_DEFUN(BASH_TYPE_INT32_T, -[ -if test "$ac_cv_sizeof_int" = 4; then - AC_CHECK_TYPE(int32_t, int) -elif test "$ac_cv_sizeof_long" = 4; then - AC_CHECK_TYPE(int32_t, long) -else - AC_CHECK_TYPE(int32_t, int) -fi -]) - -AC_DEFUN(BASH_TYPE_U_INT32_T, -[ -if test "$ac_cv_sizeof_int" = 4; then - AC_CHECK_TYPE(u_int32_t, unsigned int) -elif test "$ac_cv_sizeof_long" = 4; then - AC_CHECK_TYPE(u_int32_t, unsigned long) -else - AC_CHECK_TYPE(u_int32_t, unsigned int) -fi -]) - -AC_DEFUN(BASH_TYPE_PTRDIFF_T, -[ -if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then - AC_CHECK_TYPE(ptrdiff_t, int) -elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then - AC_CHECK_TYPE(ptrdiff_t, long) -else - AC_CHECK_TYPE(ptrdiff_t, int) -fi -]) - -AC_DEFUN(BASH_TYPE_BITS64_T, -[ -if test "$ac_sv_sizeof_char_p" = 8; then - AC_CHECK_TYPE(bits64_t, char *) -elif test "$ac_cv_sizeof_double" = 8; then - AC_CHECK_TYPE(bits64_t, double) -elif test "$ac_cv_sizeof_long" = 8; then - AC_CHECK_TYPE(bits64_t, long) -else - AC_CHECK_TYPE(bits64_t, double) -fi -]) - -AC_DEFUN(BASH_FUNC_STRSIGNAL, -[AC_MSG_CHECKING([for the existence of strsignal]) -AC_CACHE_VAL(bash_cv_have_strsignal, -[AC_TRY_LINK([#include -#include ], -[char *s = (char *)strsignal(2);], - bash_cv_have_strsignal=yes, bash_cv_have_strsignal=no)]) -AC_MSG_RESULT($bash_cv_have_strsignal) -if test $bash_cv_have_strsignal = yes; then -AC_DEFINE(HAVE_STRSIGNAL) -fi -]) - -AC_DEFUN(BASH_FUNC_LSTAT, -[dnl Cannot use AC_CHECK_FUNCS(lstat) because Linux defines lstat() as an -dnl inline function in . -AC_CACHE_CHECK([for lstat], bash_cv_func_lstat, -[AC_TRY_LINK([ -#include -#include -],[ lstat(".",(struct stat *)0); ], -bash_cv_func_lstat=yes, bash_cv_func_lstat=no)]) -if test $bash_cv_func_lstat = yes; then - AC_DEFINE(HAVE_LSTAT) -fi -]) - -AC_DEFUN(BASH_STRUCT_TERMIOS_LDISC, -[AC_MSG_CHECKING([for a c_line member of struct termios]) -AC_CACHE_VAL(bash_cv_termios_ldisc, -[AC_TRY_COMPILE([#include -#include ],[struct termios t; int i; i = t.c_line;], - bash_cv_termios_ldisc=yes, bash_cv_termios_ldisc=no)])dnl -AC_MSG_RESULT($bash_cv_termios_ldisc) -if test $bash_cv_termios_ldisc = yes; then -AC_DEFINE(TERMIOS_LDISC) -fi -]) - -AC_DEFUN(BASH_STRUCT_TERMIO_LDISC, -[AC_MSG_CHECKING([for a c_line member of struct termio]) -AC_CACHE_VAL(bash_cv_termio_ldisc, -[AC_TRY_COMPILE([#include -#include ],[struct termio t; int i; i = t.c_line;], - bash_cv_termio_ldisc=yes, bash_cv_termio_ldisc=no)])dnl -AC_MSG_RESULT($bash_cv_termio_ldisc) -if test $bash_cv_termio_ldisc = yes; then -AC_DEFINE(TERMIO_LDISC) -fi -]) - -AC_DEFUN(BASH_FUNC_GETENV, -[AC_MSG_CHECKING(to see if getenv can be redefined) -AC_CACHE_VAL(bash_cv_getenv_redef, -[AC_TRY_RUN([ -#ifdef HAVE_UNISTD_H -# include -#endif -#ifndef __STDC__ -# ifndef const -# define const -# endif -#endif -char * -getenv (name) -#if defined (__linux__) || defined (__bsdi__) || defined (convex) - const char *name; -#else - char const *name; -#endif /* !__linux__ && !__bsdi__ && !convex */ -{ -return "42"; -} -main() -{ -char *s; -/* The next allows this program to run, but does not allow bash to link - when it redefines getenv. I'm not really interested in figuring out - why not. */ -#if defined (NeXT) -exit(1); -#endif -s = getenv("ABCDE"); -exit(s == 0); /* force optimizer to leave getenv in */ -} -], bash_cv_getenv_redef=yes, bash_cv_getenv_redef=no, - [AC_MSG_WARN(cannot check getenv redefinition if cross compiling -- defaulting to yes) - bash_cv_getenv_redef=yes] -)]) -AC_MSG_RESULT($bash_cv_getenv_redef) -if test $bash_cv_getenv_redef = yes; then -AC_DEFINE(CAN_REDEFINE_GETENV) -fi -]) - -AC_DEFUN(BASH_FUNC_PRINTF, -[AC_MSG_CHECKING(for declaration of printf in ) -AC_CACHE_VAL(bash_cv_printf_declared, -[AC_TRY_RUN([ -#include -#ifdef __STDC__ -typedef int (*_bashfunc)(const char *, ...); -#else -typedef int (*_bashfunc)(); -#endif -main() -{ -_bashfunc pf; -pf = (_bashfunc) printf; -exit(pf == 0); -} -], bash_cv_printf_declared=yes, bash_cv_printf_declared=no, - [AC_MSG_WARN(cannot check printf declaration if cross compiling -- defaulting to yes) - bash_cv_printf_declared=yes] -)]) -AC_MSG_RESULT($bash_cv_printf_declared) -if test $bash_cv_printf_declared = yes; then -AC_DEFINE(PRINTF_DECLARED) -fi -]) - -AC_DEFUN(BASH_FUNC_ULIMIT_MAXFDS, -[AC_MSG_CHECKING(whether ulimit can substitute for getdtablesize) -AC_CACHE_VAL(bash_cv_ulimit_maxfds, -[AC_TRY_RUN([ -main() -{ -long maxfds = ulimit(4, 0L); -exit (maxfds == -1L); -} -], bash_cv_ulimit_maxfds=yes, bash_cv_ulimit_maxfds=no, - [AC_MSG_WARN(cannot check ulimit if cross compiling -- defaulting to no) - bash_cv_ulimit_maxfds=no] -)]) -AC_MSG_RESULT($bash_cv_ulimit_maxfds) -if test $bash_cv_ulimit_maxfds = yes; then -AC_DEFINE(ULIMIT_MAXFDS) -fi -]) - -AC_DEFUN(BASH_CHECK_LIB_TERMCAP, -[ -if test "X$bash_cv_termcap_lib" = "X"; then -_bash_needmsg=yes +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.15' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.15.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.15.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' else -AC_MSG_CHECKING(which library has the termcap functions) -_bash_needmsg= -fi -AC_CACHE_VAL(bash_cv_termcap_lib, -[AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap, - [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses, - [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses, - bash_cv_termcap_lib=gnutermcap)])])]) -if test "X$_bash_needmsg" = "Xyes"; then -AC_MSG_CHECKING(which library has the termcap functions) -fi -AC_MSG_RESULT(using $bash_cv_termcap_lib) -if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then -LDFLAGS="$LDFLAGS -L./lib/termcap" -TERMCAP_LIB="./lib/termcap/libtermcap.a" -TERMCAP_DEP="./lib/termcap/libtermcap.a" -elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then -TERMCAP_LIB=-ltermcap -TERMCAP_DEP= -elif test $bash_cv_termcap_lib = libncurses; then -TERMCAP_LIB=-lncurses -TERMCAP_DEP= -else -TERMCAP_LIB=-lcurses -TERMCAP_DEP= -fi -]) - -AC_DEFUN(BASH_FUNC_GETCWD, -[AC_MSG_CHECKING([if getcwd() calls popen()]) -AC_CACHE_VAL(bash_cv_getcwd_calls_popen, -[AC_TRY_RUN([ -#include -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifndef __STDC__ -#ifndef const -#define const -#endif -#endif - -int popen_called; - -FILE * -popen(command, type) - const char *command; - const char *type; -{ - popen_called = 1; - return (FILE *)NULL; -} - -FILE *_popen(command, type) - const char *command; - const char *type; -{ - return (popen (command, type)); -} - -int -pclose(stream) -FILE *stream; -{ - return 0; -} - -int -_pclose(stream) -FILE *stream; -{ - return 0; -} - -main() -{ - char lbuf[32]; - popen_called = 0; - getcwd(lbuf, 32); - exit (popen_called); -} -], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes, - [AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no) - bash_cv_getcwd_calls_popen=no] -)]) -AC_MSG_RESULT($bash_cv_getcwd_calls_popen) -if test $bash_cv_getcwd_calls_popen = yes; then -AC_DEFINE(GETCWD_BROKEN) -fi -]) - -AC_DEFUN(BASH_STRUCT_DIRENT_D_INO, -[AC_REQUIRE([AC_HEADER_DIRENT]) -AC_MSG_CHECKING(if struct dirent has a d_ino member) -AC_CACHE_VAL(bash_cv_dirent_has_dino, -[AC_TRY_COMPILE([ -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif /* HAVE_UNISTD_H */ -#if defined(HAVE_DIRENT_H) -# include -#else -# define dirent direct -# ifdef HAVE_SYS_NDIR_H -# include -# endif /* SYSNDIR */ -# ifdef HAVE_SYS_DIR_H -# include -# endif /* SYSDIR */ -# ifdef HAVE_NDIR_H -# include -# endif -#endif /* HAVE_DIRENT_H */ -],[ -struct dirent d; int z; z = d.d_ino; -], bash_cv_dirent_has_dino=yes, bash_cv_dirent_has_dino=no)]) -AC_MSG_RESULT($bash_cv_dirent_has_dino) -if test $bash_cv_dirent_has_dino = yes; then -AC_DEFINE(STRUCT_DIRENT_HAS_D_INO) -fi -]) - -AC_DEFUN(BASH_STRUCT_DIRENT_D_FILENO, -[AC_REQUIRE([AC_HEADER_DIRENT]) -AC_MSG_CHECKING(if struct dirent has a d_fileno member) -AC_CACHE_VAL(bash_cv_dirent_has_d_fileno, -[AC_TRY_COMPILE([ -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif /* HAVE_UNISTD_H */ -#if defined(HAVE_DIRENT_H) -# include -#else -# define dirent direct -# ifdef HAVE_SYS_NDIR_H -# include -# endif /* SYSNDIR */ -# ifdef HAVE_SYS_DIR_H -# include -# endif /* SYSDIR */ -# ifdef HAVE_NDIR_H -# include -# endif -#endif /* HAVE_DIRENT_H */ -],[ -struct dirent d; int z; z = d.d_fileno; -], bash_cv_dirent_has_d_fileno=yes, bash_cv_dirent_has_d_fileno=no)]) -AC_MSG_RESULT($bash_cv_dirent_has_d_fileno) -if test $bash_cv_dirent_has_d_fileno = yes; then -AC_DEFINE(STRUCT_DIRENT_HAS_D_FILENO) -fi -]) - -AC_DEFUN(BASH_REINSTALL_SIGHANDLERS, -[AC_REQUIRE([AC_TYPE_SIGNAL]) -AC_REQUIRE([BASH_SIGNAL_CHECK]) -AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked]) -AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers, -[AC_TRY_RUN([ -#include -#ifdef HAVE_UNISTD_H -#include -#endif - -typedef RETSIGTYPE sigfunc(); - -int nsigint; - -#ifdef HAVE_POSIX_SIGNALS -sigfunc * -set_signal_handler(sig, handler) - int sig; - sigfunc *handler; -{ - struct sigaction act, oact; - act.sa_handler = handler; - act.sa_flags = 0; - sigemptyset (&act.sa_mask); - sigemptyset (&oact.sa_mask); - sigaction (sig, &act, &oact); - return (oact.sa_handler); -} -#else -#define set_signal_handler(s, h) signal(s, h) -#endif - -RETSIGTYPE -sigint(s) -int s; -{ - nsigint++; -} - -main() -{ - nsigint = 0; - set_signal_handler(SIGINT, sigint); - kill((int)getpid(), SIGINT); - kill((int)getpid(), SIGINT); - exit(nsigint != 2); -} -], bash_cv_must_reinstall_sighandlers=no, bash_cv_must_reinstall_sighandlers=yes, - [AC_MSG_WARN(cannot check signal handling if cross compiling -- defaulting to no) - bash_cv_must_reinstall_sighandlers=no] -)]) -AC_MSG_RESULT($bash_cv_must_reinstall_sighandlers) -if test $bash_cv_must_reinstall_sighandlers = yes; then -AC_DEFINE(MUST_REINSTALL_SIGHANDLERS) -fi -]) - -AC_DEFUN(BASH_FUNC_SBRK_DECLARED, -[AC_MSG_CHECKING(for declaration of sbrk in ) -AC_CACHE_VAL(bash_cv_sbrk_declared, -[AC_EGREP_HEADER(sbrk, unistd.h, - bash_cv_sbrk_declared=yes, bash_cv_sbrk_declared=no)]) -AC_MSG_RESULT($bash_cv_sbrk_declared) -if test $bash_cv_sbrk_declared = yes; then -AC_DEFINE(SBRK_DECLARED) -fi -]) - -dnl check that some necessary job control definitions are present -AC_DEFUN(BASH_JOB_CONTROL_MISSING, -[AC_REQUIRE([BASH_SIGNAL_CHECK]) -AC_MSG_CHECKING(for presence of necessary job control definitions) -AC_CACHE_VAL(bash_cv_job_control_missing, -[AC_TRY_RUN([ -#include -#ifdef HAVE_SYS_WAIT_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#include - -/* Add more tests in here as appropriate. */ -main() -{ -/* signal type */ -#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS) -exit(1); -#endif - -/* signals and tty control. */ -#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT) -exit (1); -#endif - -/* process control */ -#if !defined (WNOHANG) || !defined (WUNTRACED) -exit(1); -#endif - -/* Posix systems have tcgetpgrp and waitpid. */ -#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP) -exit(1); -#endif - -#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID) -exit(1); -#endif - -/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */ -#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3) -exit(1); -#endif - -exit(0); -}], bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing, - [AC_MSG_WARN(cannot check job control if cross-compiling -- defaulting to missing) - bash_cv_job_control_missing=missing] -)]) -AC_MSG_RESULT($bash_cv_job_control_missing) -if test $bash_cv_job_control_missing = missing; then -AC_DEFINE(JOB_CONTROL_MISSING) -fi -]) - -dnl check whether named pipes are present -dnl this requires a previous check for mkfifo, but that is awkward to specify -AC_DEFUN(BASH_SYS_NAMED_PIPES, -[AC_MSG_CHECKING(for presence of named pipes) -AC_CACHE_VAL(bash_cv_sys_named_pipes, -[AC_TRY_RUN([ -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif - -/* Add more tests in here as appropriate. */ -main() -{ -int fd; - -#if defined (HAVE_MKFIFO) -exit (0); -#endif - -#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO)) -exit (1); -#endif - -#if defined (NeXT) -exit (1); -#endif - -fd = mknod ("/tmp/sh-np-autoconf", 0666 | S_IFIFO, 0); -if (fd == -1) - exit (1); -close(fd); -unlink ("/tmp/sh-np-autoconf"); -exit(0); -}], bash_cv_sys_named_pipes=present, bash_cv_sys_named_pipes=missing, - [AC_MSG_WARN(cannot check for named pipes if cross-compiling -- defaulting to missing) - bash_cv_sys_named_pipes=missing] -)]) -AC_MSG_RESULT($bash_cv_sys_named_pipes) -if test $bash_cv_sys_named_pipes = missing; then -AC_DEFINE(NAMED_PIPES_MISSING) -fi -]) - -AC_DEFUN(BASH_FUNC_POSIX_SETJMP, -[AC_REQUIRE([BASH_SIGNAL_CHECK]) -AC_MSG_CHECKING(for presence of POSIX-style sigsetjmp/siglongjmp) -AC_CACHE_VAL(bash_cv_func_sigsetjmp, -[AC_TRY_RUN([ -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#include -#include - -main() -{ -#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS) -exit (1); -#else - -int code; -sigset_t set, oset; -sigjmp_buf xx; - -/* get the mask */ -sigemptyset(&set); -sigemptyset(&oset); -sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set); -sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset); - -/* save it */ -code = sigsetjmp(xx, 1); -if (code) - exit(0); /* could get sigmask and compare to oset here. */ - -/* change it */ -sigaddset(&set, SIGINT); -sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL); - -/* and siglongjmp */ -siglongjmp(xx, 10); -exit(1); -#endif -}], bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing, - [AC_MSG_WARN(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing) - bash_cv_func_sigsetjmp=missing] -)]) -AC_MSG_RESULT($bash_cv_func_sigsetjmp) -if test $bash_cv_func_sigsetjmp = present; then -AC_DEFINE(HAVE_POSIX_SIGSETJMP) -fi -]) - -AC_DEFUN(BASH_HAVE_TIOCGWINSZ, -[AC_MSG_CHECKING(for TIOCGWINSZ in sys/ioctl.h) -AC_CACHE_VAL(bash_cv_tiocgwinsz_in_ioctl, -[AC_TRY_COMPILE([#include -#include ], [int x = TIOCGWINSZ;], - bash_cv_tiocgwinsz_in_ioctl=yes,bash_cv_tiocgwinsz_in_ioctl=no)]) -AC_MSG_RESULT($bash_cv_tiocgwinsz_in_ioctl) -if test $bash_cv_tiocgwinsz_in_ioctl = yes; then -AC_DEFINE(GWINSZ_IN_SYS_IOCTL) -fi -]) - -AC_DEFUN(BASH_STRUCT_WINSIZE, -[AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h) -AC_CACHE_VAL(bash_cv_struct_winsize_header, -[AC_TRY_COMPILE([#include -#include ], [struct winsize x;], - bash_cv_struct_winsize_header=ioctl_h, - [AC_TRY_COMPILE([#include -#include ], [struct winsize x;], - bash_cv_struct_winsize_header=termios_h, bash_cv_struct_winsize_header=other) -])]) -if test $bash_cv_struct_winsize_header = ioctl_h; then - AC_MSG_RESULT(sys/ioctl.h) - AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL) -elif test $bash_cv_struct_winsize_header = termios_h; then - AC_MSG_RESULT(termios.h) - AC_DEFINE(STRUCT_WINSIZE_IN_TERMIOS) -else - AC_MSG_RESULT(not found) -fi -]) - -AC_DEFUN(BASH_HAVE_TIOCSTAT, -[AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h) -AC_CACHE_VAL(bash_cv_tiocstat_in_ioctl, -[AC_TRY_COMPILE([#include -#include ], [int x = TIOCSTAT;], - bash_cv_tiocstat_in_ioctl=yes,bash_cv_tiocstat_in_ioctl=no)]) -AC_MSG_RESULT($bash_cv_tiocstat_in_ioctl) -if test $bash_cv_tiocstat_in_ioctl = yes; then -AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL) -fi -]) - -AC_DEFUN(BASH_HAVE_FIONREAD, -[AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h) -AC_CACHE_VAL(bash_cv_fionread_in_ioctl, -[AC_TRY_COMPILE([#include -#include ], [int x = FIONREAD;], - bash_cv_fionread_in_ioctl=yes,bash_cv_fionread_in_ioctl=no)]) -AC_MSG_RESULT($bash_cv_fionread_in_ioctl) -if test $bash_cv_fionread_in_ioctl = yes; then -AC_DEFINE(FIONREAD_IN_SYS_IOCTL) -fi -]) - -dnl -dnl See if speed_t is declared in . Some versions of linux -dnl require a definition of speed_t each time is included, -dnl but you can only get speed_t if you include (on some -dnl versions) or (on others). -dnl -AC_DEFUN(BASH_MISC_SPEED_T, -[AC_MSG_CHECKING(for speed_t in sys/types.h) -AC_CACHE_VAL(bash_cv_speed_t_in_sys_types, -[AC_TRY_COMPILE([#include ], [speed_t x;], - bash_cv_speed_t_in_sys_types=yes,bash_cv_speed_t_in_sys_types=no)]) -AC_MSG_RESULT($bash_cv_speed_t_in_sys_types) -if test $bash_cv_speed_t_in_sys_types = yes; then -AC_DEFINE(SPEED_T_IN_SYS_TYPES) -fi -]) - -AC_DEFUN(BASH_CHECK_GETPW_FUNCS, -[AC_MSG_CHECKING(whether programs are able to redeclare getpw functions) -AC_CACHE_VAL(bash_cv_can_redecl_getpw, -[AC_TRY_COMPILE([#include -#include -extern struct passwd *getpwent(); -extern struct passwd *getpwuid(); -extern struct passwd *getpwnam();], -[struct passwd *z; z = getpwent(); z = getpwuid(0); z = getpwnam("root");], - bash_cv_can_redecl_getpw=yes,bash_cv_can_redecl_getpw=no)]) -AC_MSG_RESULT($bash_cv_can_redecl_getpw) -if test $bash_cv_can_redecl_getpw = no; then -AC_DEFINE(HAVE_GETPW_DECLS) -fi -]) - -AC_DEFUN(BASH_CHECK_DEV_FD, -[AC_MSG_CHECKING(whether /dev/fd is available) -AC_CACHE_VAL(bash_cv_dev_fd, -[if test -d /dev/fd && test -r /dev/fd/0; then - bash_cv_dev_fd=standard - elif test -d /proc/self/fd && test -r /proc/self/fd/0; then - bash_cv_dev_fd=whacky - else - bash_cv_dev_fd=absent - fi -]) -AC_MSG_RESULT($bash_cv_dev_fd) -if test $bash_cv_dev_fd = "standard"; then - AC_DEFINE(HAVE_DEV_FD) - AC_DEFINE(DEV_FD_PREFIX, "/dev/fd/") -elif test $bash_cv_dev_fd = "whacky"; then - AC_DEFINE(HAVE_DEV_FD) - AC_DEFINE(DEV_FD_PREFIX, "/proc/self/fd/") + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# 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. + +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi fi -]) -dnl -dnl Check for the presence of getpeername (the only networking function -dnl bash currently requires) in libsocket. If libsocket is present, -dnl check for libnsl and add it to LIBS if it's there, since most -dnl systems with libsocket require linking with libnsl as well. -dnl This should only be called if getpeername was not found in libc. -dnl -AC_DEFUN(BASH_CHECK_SOCKLIB, -[ -if test "X$bash_cv_have_socklib" = "X"; then -_bash_needmsg= -else -AC_MSG_CHECKING(for socket library) -_bash_needmsg=yes -fi -AC_CACHE_VAL(bash_cv_have_socklib, -[AC_CHECK_LIB(socket, getpeername, - bash_cv_have_socklib=yes, bash_cv_have_socklib=no, -lnsl)]) -if test "X$_bash_needmsg" = Xyes; then - AC_MSG_RESULT($bash_cv_have_socklib) - _bash_needmsg= -fi -if test $bash_cv_have_socklib = yes; then - # check for libnsl, add it to LIBS if present - if test "X$bash_cv_have_libnsl" = "X"; then - _bash_needmsg= - else - AC_MSG_CHECKING(for libnsl) - _bash_needmsg=yes - fi - AC_CACHE_VAL(bash_cv_have_libnsl, - [AC_CHECK_LIB(nsl, t_open, - bash_cv_have_libnsl=yes, bash_cv_have_libnsl=no)]) - if test "X$_bash_needmsg" = Xyes; then - AC_MSG_RESULT($bash_cv_have_libnsl) - _bash_needmsg= - fi - if test $bash_cv_have_libnsl = yes; then - LIBS="-lsocket -lnsl $LIBS" +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' else - LIBS="-lsocket $LIBS" + CYGPATH_W=echo fi - AC_DEFINE(HAVE_LIBSOCKET) - AC_DEFINE(HAVE_GETPEERNAME) fi -]) +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. -AC_DEFUN(BASH_DEFAULT_MAIL_DIR, -[AC_MSG_CHECKING(for default mail directory) -AC_CACHE_VAL(bash_cv_mail_dir, -[if test -d /var/mail; then - bash_cv_mail_dir=/var/mail - elif test -d /usr/mail; then - bash_cv_mail_dir=/usr/mail - elif test -d /var/spool/mail; then - bash_cv_mail_dir=/var/spool/mail - elif test -d /usr/spool/mail; then - bash_cv_mail_dir=/usr/spool/mail - else - bash_cv_mail_dir=unknown - fi -]) -AC_MSG_RESULT($bash_cv_mail_dir) -if test $bash_cv_mail_dir = "/var/mail"; then - AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "/var/mail") -elif test $bash_cv_mail_dir = "/usr/mail"; then - AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "/usr/mail") -elif test $bash_cv_mail_dir = "/var/spool/mail"; then - AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "/var/spool/mail") -elif test $bash_cv_mail_dir = "/usr/spool/mail"; then - AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "/usr/spool/mail") -else - AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "unknown") -fi -]) +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . -dnl -dnl Check if HPUX needs _KERNEL defined for RLIMIT_* definitions -dnl -AC_DEFUN(BASH_KERNEL_RLIMIT_CHECK, -[AC_MSG_CHECKING([whether $host_os needs _KERNEL for RLIMIT defines]) -AC_CACHE_VAL(bash_cv_kernel_rlimit, -[AC_TRY_COMPILE([ -#include -#include -], -[ - int f; - f = RLIMIT_DATA; -], bash_cv_kernel_rlimit=no, -[AC_TRY_COMPILE([ -#include -#define _KERNEL -#include -#undef _KERNEL -], -[ - int f; - f = RLIMIT_DATA; -], bash_cv_kernel_rlimit=yes, bash_cv_kernel_rlimit=no)] -)]) -AC_MSG_RESULT($bash_cv_kernel_rlimit) -if test $bash_cv_kernel_rlimit = yes; then -AC_DEFINE(RLIMIT_NEEDS_KERNEL) -fi -]) +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. -AC_DEFUN(BASH_FUNC_STRCOLL, -[ -AC_MSG_CHECKING(whether or not strcoll and strcmp differ) -AC_CACHE_VAL(bash_cv_func_strcoll_broken, -[AC_TRY_RUN([ -#include -#if defined (HAVE_LOCALE_H) -#include -#endif - -main(c, v) -int c; -char *v[]; -{ - int r1, r2; - char *deflocale, *defcoll; - -#ifdef HAVE_SETLOCALE - deflocale = setlocale(LC_ALL, ""); - defcoll = setlocale(LC_COLLATE, ""); -#endif - -#ifdef HAVE_STRCOLL - /* These two values are taken from tests/glob-test. */ - r1 = strcoll("abd", "aXd"); -#else - r1 = 0; -#endif - r2 = strcmp("abd", "aXd"); - - /* These two should both be greater than 0. It is permissible for - a system to return different values, as long as the sign is the - same. */ - - /* Exit with 1 (failure) if these two values are both > 0, since - this tests whether strcoll(3) is broken with respect to strcmp(3) - in the default locale. */ - exit (r1 > 0 && r2 > 0); -} -], bash_cv_func_strcoll_broken=yes, bash_cv_func_strcoll_broken=no, - [AC_MSG_WARN(cannot check strcoll if cross compiling -- defaulting to no) - bash_cv_func_strcoll_broken=no] -)]) -AC_MSG_RESULT($bash_cv_func_strcoll_broken) -if test $bash_cv_func_strcoll_broken = yes; then -AC_DEFINE(STRCOLL_BROKEN) +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi fi -]) - -dnl -dnl If available, use support for large files unless the user specified -dnl one of the CPPFLAGS, LDFLAGS, or LIBS variables ( -dnl via GNU patch 2.5) -dnl -AC_DEFUN(BASH_LARGE_FILE_SUPPORT, -[AC_MSG_CHECKING(whether large file support needs explicit enabling) -ac_getconfs='' -ac_result=yes -ac_set='' -ac_shellvars='CPPFLAGS LDFLAGS LIBS' -for ac_shellvar in $ac_shellvars; do - case $ac_shellvar in - CPPFLAGS) ac_lfsvar=LFS_CFLAGS ac_lfs64var=LFS64_CFLAGS ;; - *) ac_lfsvar=LFS_$ac_shellvar ac_lfs64var=LFS64_$ac_shellvar ;; +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac - eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar - (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; } - ac_getconf=`getconf $ac_lfsvar` - ac_getconf64=`getconf $ac_lfs64var` - ac_getconfs=$ac_getconfs$ac_getconf\ $ac_getconf64 - eval ac_test_$ac_shellvar="\$ac_getconf\ \$ac_getconf64" done -case "$ac_result$ac_getconfs" in -yes) ac_result=no ;; -esac -case "$ac_result$ac_set" in -yes?*) ac_result="yes, but $ac_set is already set, so use its settings" +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; esac -AC_MSG_RESULT($ac_result) -case $ac_result in -yes) - for ac_shellvar in $ac_shellvars; do - eval $ac_shellvar=\$ac_test_$ac_shellvar - done ;; +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -]) +# 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 ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $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 broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac dnl -dnl AC_SYS_RESTARTABLE_SYSCALLS tests only for restarted system calls -dnl after a signal handler has been installed with signal(). Since -dnl Bash uses sigaction() if it is available, we need to check whether -dnl or not a signal handler installed with sigaction and SA_RESTART -dnl causes system calls to be restarted after the signal is caught -dnl -AC_DEFUN(BASH_SYS_RESTARTABLE_SYSCALLS, -[AC_REQUIRE([BASH_SIGNAL_CHECK]) -AC_CACHE_CHECK(for restartable system calls with posix sigaction, -bash_cv_sys_restartable_syscalls, -[AC_TRY_RUN( -[/* Exit 0 (true) if wait returns something other than -1, - i.e. the pid of the child, which means that wait was restarted - after getting the signal. */ -#include -#include -static int caught = 0; -void ucatch (isig) int isig; { caught = 1; } -main () -{ -#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS) - exit (1); -#else - struct sigaction act, oact; - int i, status; - - act.sa_handler = ucatch; - /* Might want to add SA_RESTART here, but bash's set_signal_handler - does not. */ - act.sa_flags = 0; - sigemptyset(&act.sa_mask); - sigemptyset(&oact.sa_mask); - i = fork (); - /* A possible race condition here, but in practice it never happens. */ - if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); } - sigaction(SIGINT, &act, &oact); - status = wait(&i); - if (status == -1) wait(&i); - exit (status == -1); -#endif -} -], bash_cv_sys_restartable_syscalls=yes, bash_cv_sys_restartable_syscalls=no, - AC_MSG_WARN(cannot check restartable syscalls if cross compiling)) -]) -if test $bash_cv_sys_restartable_syscalls = yes; then - AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS) -fi -]) -dnl -dnl Check for 64-bit off_t -- used for malloc alignment -dnl -dnl C does not allow duplicate case labels, so the compile will fail if -dnl sizeof(off_t) is > 4. -dnl -AC_DEFUN(BASH_CHECK_OFF_T_64, -[AC_CACHE_CHECK(for 64-bit off_t, bash_cv_off_t_64, -AC_TRY_COMPILE([ -#ifdef HAVE_UNISTD_H -#include -#endif -#include -],[ -switch (0) case 0: case (sizeof (off_t) <= 4):; -], bash_cv_off_t_64=no, bash_cv_off_t_64=yes)) -if test $bash_cv_off_t_64 = yes; then - AC_DEFINE(HAVE_OFF_T_64) +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([../config/lead-dot.m4]) +m4_include([../config/override.m4])