diff --git a/CHANGES b/CHANGES index 0c239e0..84baeef 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,36 @@ CHANGES ======= +version 8.1.19 (Sep 26, 2013): + - prevent select/read loop when EOF on non-pty input (console) - + reported by Chris Marget + - "!" syntax prefixing use of group names not honored - reported by + Zonker + - fixed memory leak using timestamps - patch by Karvendhan M. + + - deprecated --with-cycladests (noop now) - cross-compilation should + work without it as autologin now expects setpgrp() to take two + arugments instead of testing for it + - no automatic checks for an empty password when using PAM + authentication - based on discussion with Ryan Kirkpatrick + + - added 'sslcacertificatefile' and 'sslcacertificatepath' client + configuration options - based on patch by Aki Tuomi + - added 'sslcacertificatefile' and 'sslreqclientcert' server + configuration options + - added --with-req-server-cert to force clients to require a certificate + from the server when using SSL - based on emails with Thor Simon + + - added server-side tasks (see conserver.cf man page) that are invoked + by the client (useful for things like IPMI-based power control of + servers, invoking resets of terminal server ports, or anything else + that requires scripting) - ideas from patch by Anton Lundin + and discussion on mailing list (2011) + - added 'confirm' option to break sequences + - added 'breaklist' option to limit exposure of break sequences to + consoles + - sending of break signals is now announced to all attached clients + version 8.1.18 (Nov 11, 2010): - install man pages read-only and improved the contributed redhat init script - patches by Eric Biederman @@ -902,5 +932,5 @@ before version 6.05: and enhancements of various types were applied. # -# $Id: CHANGES,v 1.225 2010/11/11 22:43:17 bryan Exp $ +# $Id: CHANGES,v 1.238 2013/09/26 17:57:44 bryan Exp $ # diff --git a/Makefile.in b/Makefile.in index ae33e09..28e533c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,5 @@ ### Path settings +datarootdir = @datarootdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ diff --git a/autologin/Makefile.in b/autologin/Makefile.in index f295023..0c6d26d 100644 --- a/autologin/Makefile.in +++ b/autologin/Makefile.in @@ -1,4 +1,5 @@ ### Path settings +datarootdir = @datarootdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ prefix = @prefix@ diff --git a/autologin/autologin.c b/autologin/autologin.c index da48ba4..35ac390 100644 --- a/autologin/autologin.c +++ b/autologin/autologin.c @@ -69,11 +69,11 @@ */ #ifndef lint -char *rcsid = "$Id: autologin.c,v 1.25 2006/04/10 01:50:16 bryan Exp $"; -#endif /* not lint */ -extern char *progname; -gid_t awGrps[NGROUPS_MAX]; -int iGrps = 0; +char *rcsid = "$Id: autologin.c,v 1.27 2013/09/20 21:15:13 bryan Exp $"; +#endif /* not lint */ +extern char *progname; +gid_t awGrps[NGROUPS_MAX]; +int iGrps = 0; /* * External variables @@ -82,366 +82,369 @@ int iGrps = 0; extern int optind; extern char *optarg; -void make_utmp(); -void usage(); +void make_utmp(); +void usage(); int Process() { - int iErrs = 0; - int i, iNewGrp; - gid_t wGid; - uid_t wUid; - char *pcCmd = (char *)0, - *pcDevTty = (char *)0; + int iErrs = 0; + int i, iNewGrp; + gid_t wGid; + uid_t wUid; + char *pcCmd = (char *)0, *pcDevTty = (char *)0; #ifdef HAVE_GETUSERATTR - char *pcGrps; + char *pcGrps; #endif - struct passwd *pwd; - struct stat st; - struct termios n_tio; + struct passwd *pwd; + struct stat st; + struct termios n_tio; #if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM) - char my_hostname[MAXHOSTNAMELEN]; + char my_hostname[MAXHOSTNAMELEN]; #endif #if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM) - if (0 != gethostname(my_hostname, sizeof(my_hostname))) { - (void) fprintf(stderr, "%s: gethostname: %s\n", progname, strerror(errno)); - exit(1); - /* NOTREACHED */ - } + if (0 != gethostname(my_hostname, sizeof(my_hostname))) { + (void)fprintf(stderr, "%s: gethostname: %s\n", progname, + strerror(errno)); + exit(1); + /* NOTREACHED */ + } #endif - if ((char *)0 != pcCommand) { - if ((char *)0 == (pcCmd = (char *)malloc(strlen(pcCommand) + 4))) { - (void) fprintf(stderr, "%s: malloc: %s\n", progname, strerror(errno)); - exit(1); - /* NOTREACHED */ - } - (void)strcpy(pcCmd, "-c "); - (void)strcat(pcCmd, pcCommand); + if ((char *)0 != pcCommand) { + if ((char *)0 == (pcCmd = (char *)malloc(strlen(pcCommand) + 4))) { + (void)fprintf(stderr, "%s: malloc: %s\n", progname, + strerror(errno)); + exit(1); + /* NOTREACHED */ } + (void)strcpy(pcCmd, "-c "); + (void)strcat(pcCmd, pcCommand); + } - if ( (char *)0 != pcGroup ) { - iErrs += addgroup(pcGroup); - } + if ((char *)0 != pcGroup) { + iErrs += addgroup(pcGroup); + } - if ( (char *)0 == pcLogin ) { - static char acLogin[17]; - if ((struct passwd *)0 == (pwd = getpwuid(geteuid()))) { - (void) fprintf(stderr, "%s: %d: uid unknown\n", progname, geteuid()); - exit(1); - /* NOTREACHED */ - } - pcLogin = strcpy(acLogin, pwd->pw_name); - } else if ((struct passwd *)0 == (pwd = getpwnam(pcLogin))) { - (void) fprintf(stderr, "%s: %s: login name unknown\n", progname, pcLogin); - exit(1); - /* NOTREACHED */ + if ((char *)0 == pcLogin) { + static char acLogin[17]; + if ((struct passwd *)0 == (pwd = getpwuid(geteuid()))) { + (void)fprintf(stderr, "%s: %d: uid unknown\n", progname, + geteuid()); + exit(1); + /* NOTREACHED */ } - wUid = pwd->pw_uid; - wGid = pwd->pw_gid; - (void)endpwent(); + pcLogin = strcpy(acLogin, pwd->pw_name); + } else if ((struct passwd *)0 == (pwd = getpwnam(pcLogin))) { + (void)fprintf(stderr, "%s: %s: login name unknown\n", progname, + pcLogin); + exit(1); + /* NOTREACHED */ + } + wUid = pwd->pw_uid; + wGid = pwd->pw_gid; + (void)endpwent(); #ifdef HAVE_GETUSERATTR - /* getuserattr() returns a funny list of groups: - * "grp1\0grp2\0grp3\0\0" - */ - if (0 == getuserattr(pcLogin, S_SUGROUPS, &pcGrps, SEC_LIST)) { - while ('\000' != *pcGrps) { - /* ignore "ALL" and any group beginning with '!' */ - if ('!' == *pcGrps || 0 != strcmp(pcGrps, "ALL")) { - iErrs += addgroup(pcGrps); - } - pcGrps = pcGrps + strlen(pcGrps) + 1; - } + /* getuserattr() returns a funny list of groups: + * "grp1\0grp2\0grp3\0\0" + */ + if (0 == getuserattr(pcLogin, S_SUGROUPS, &pcGrps, SEC_LIST)) { + while ('\000' != *pcGrps) { + /* ignore "ALL" and any group beginning with '!' */ + if ('!' == *pcGrps || 0 != strcmp(pcGrps, "ALL")) { + iErrs += addgroup(pcGrps); + } + pcGrps = pcGrps + strlen(pcGrps) + 1; } -#endif /* HAVE_GETUSERATTR */ - (void)endgrent(); + } +#endif /* HAVE_GETUSERATTR */ + (void)endgrent(); - if ((char *)0 != pcTty) { - if ( '/' == *pcTty ) { - pcDevTty = pcTty; - } else { - if ( (char *)0 == (pcDevTty = (char *)malloc(strlen(pcTty)+5+1) ) ) { - (void) fprintf(stderr, "%s: malloc: %s\n", progname, strerror(errno)); - exit(1); - } - sprintf(pcDevTty, "/dev/%s", pcTty); - } + if ((char *)0 != pcTty) { + if ('/' == *pcTty) { + pcDevTty = pcTty; + } else { + if ((char *)0 == + (pcDevTty = (char *)malloc(strlen(pcTty) + 5 + 1))) { + (void)fprintf(stderr, "%s: malloc: %s\n", progname, + strerror(errno)); + exit(1); + } + sprintf(pcDevTty, "/dev/%s", pcTty); + } - if (0 != stat(pcDevTty, &st)) { - (void) fprintf(stderr, "%s: Can't stat %s: %s\n", progname, pcDevTty, strerror(errno)); - ++iErrs; + if (0 != stat(pcDevTty, &st)) { + (void)fprintf(stderr, "%s: Can't stat %s: %s\n", progname, + pcDevTty, strerror(errno)); + ++iErrs; #if defined(VCHR) && defined(VMPC) - } else if (VCHR != st.st_type && VMPC != st.st_type) { - (void) fprintf(stderr, "%s: %s is not a character device\n", progname, pcDevTty); - ++iErrs; + } else if (VCHR != st.st_type && VMPC != st.st_type) { + (void)fprintf(stderr, "%s: %s is not a character device\n", + progname, pcDevTty); + ++iErrs; #endif - } - } else { - pcDevTty = (char *)0; } + } else { + pcDevTty = (char *)0; + } - if (iErrs) { - usage(); - exit(1); - /* NOTREACHED */ - } - if (0 != geteuid()) { - (void) fprintf(stderr, "%s: Must be root!!!\n", progname); - exit(1); - /* NOTREACHED */ - } - if (iGrps && 0 < setgroups(iGrps, awGrps)) { - (void) fprintf(stderr, "%s: Can't setgroups(): %s\n", progname, strerror(errno)); - exit(1); - /* NOTREACHED */ - } + if (iErrs) { + usage(); + exit(1); + /* NOTREACHED */ + } + if (0 != geteuid()) { + (void)fprintf(stderr, "%s: Must be root!!!\n", progname); + exit(1); + /* NOTREACHED */ + } + if (iGrps && 0 < setgroups(iGrps, awGrps)) { + (void)fprintf(stderr, "%s: Can't setgroups(): %s\n", progname, + strerror(errno)); + exit(1); + /* NOTREACHED */ + } - /* Close open files - */ - for (i = (char *)0 == pcTty ? 3 : 0; i < getdtablesize(); ++i) { - (void) close(i); - } + /* Close open files + */ + for (i = (char *)0 == pcTty ? 3 : 0; i < getdtablesize(); ++i) { + (void)close(i); + } - /* Make us a session leader so that when we open /dev/tty - * it will become our controlling terminal. - */ - if (-1 == (iNewGrp = getsid(getpid()))) { - if (-1 == (iNewGrp = setsid())) { - (void) fprintf(stderr, "%s: setsid: %d: %s\n", progname, iNewGrp, strerror(errno)); - iNewGrp = getpid(); - } + /* Make us a session leader so that when we open /dev/tty + * it will become our controlling terminal. + */ + if (-1 == (iNewGrp = getsid(getpid()))) { + if (-1 == (iNewGrp = setsid())) { + (void)fprintf(stderr, "%s: setsid: %d: %s\n", progname, + iNewGrp, strerror(errno)); + iNewGrp = getpid(); } - + } #if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM) - if (!cannot_audit(0)) { + if (!cannot_audit(0)) { # if defined(HAVE_GETAUDIT_ADDR) - struct auditinfo_addr audit_info; + struct auditinfo_addr audit_info; # else - struct auditinfo audit_info; + struct auditinfo audit_info; # endif - au_mask_t audit_mask; + au_mask_t audit_mask; # if !defined(HAVE_GETAUDIT_ADDR) - struct hostent *hp; + struct hostent *hp; # endif - int iAuditFile; - int fShowEvent = 1; - token_t *ptAuditToken; + int iAuditFile; + int fShowEvent = 1; + token_t *ptAuditToken; - (void)memset(&audit_info, 0, sizeof(audit_info)); - audit_info.ai_auid = wUid; - audit_info.ai_asid = getpid(); - audit_mask.am_success = audit_mask.am_failure = 0; - (void) au_user_mask(pcLogin, &audit_mask); - audit_info.ai_mask.am_success = audit_mask.am_success; - audit_info.ai_mask.am_failure = audit_mask.am_failure; + (void)memset(&audit_info, 0, sizeof(audit_info)); + audit_info.ai_auid = wUid; + audit_info.ai_asid = getpid(); + audit_mask.am_success = audit_mask.am_failure = 0; + (void)au_user_mask(pcLogin, &audit_mask); + audit_info.ai_mask.am_success = audit_mask.am_success; + audit_info.ai_mask.am_failure = audit_mask.am_failure; # if defined(HAVE_GETAUDIT_ADDR) - (void)aug_get_machine(my_hostname, - &audit_info.ai_termid.at_addr[0], - &audit_info.ai_termid.at_type); + (void)aug_get_machine(my_hostname, + &audit_info.ai_termid.at_addr[0], + &audit_info.ai_termid.at_type); # else - if ((char *)0 != (hp = gethostbyname(my_hostname)) - && AF_INET == hp->h_addrtype) { - (void)memcpy(&audit_info.ai_termid.machine, - hp->h_addr, - sizeof(audit_info.ai_termid.machine)); - } -# endif -# if defined(HAVE_GETAUDIT_ADDR) - if (0 > setaudit_addr(&audit_info, sizeof(audit_info))) -# else - if (0 > setaudit(&audit_info)) -# endif - { - fprintf(stderr, "%s: setaudit failed: %s\n", - progname, - strerror(errno)); - fShowEvent = 0; - } - if (fShowEvent) { - fShowEvent = au_preselect(AUE_autologin, - &audit_mask, - AU_PRS_SUCCESS, - AU_PRS_REREAD); - } - if (fShowEvent) { - iAuditFile = au_open(); -# if defined(HAVE_GETAUDIT_ADDR) - ptAuditToken = au_to_subject_ex(wUid, - wUid, - wGid, - wUid, - wGid, - audit_info.ai_asid, - audit_info.ai_asid, - &audit_info.ai_termid), -# else - ptAuditToken = au_to_subject(wUid, - wUid, - wGid, - wUid, - wGid, - audit_info.ai_asid, - audit_info.ai_asid, - &audit_info.ai_termid), -# endif - (void)au_write(iAuditFile, ptAuditToken); - ptAuditToken = au_to_text(gettext("successful login")); - (void)au_write(iAuditFile, ptAuditToken); - if ((char *)0 != pcCmd) { - ptAuditToken = au_to_text(pcCmd); - (void)au_write(iAuditFile, ptAuditToken); - } -# if defined(HAVE_GETAUDIT_ADDR) - ptAuditToken = au_to_return32(0, 0); -# else - ptAuditToken = au_to_return(0, 0); -# endif - (void)au_write(iAuditFile, ptAuditToken); - if(0 > au_close(iAuditFile, AU_TO_WRITE, AUE_autologin)) { - fprintf(stderr, "%s: audit write failed: %s", - progname, - strerror(errno)); - } - } + if ((char *)0 != (hp = gethostbyname(my_hostname)) + && AF_INET == hp->h_addrtype) { + (void)memcpy(&audit_info.ai_termid.machine, hp->h_addr, + sizeof(audit_info.ai_termid.machine)); } +# endif +# if defined(HAVE_GETAUDIT_ADDR) + if (0 > setaudit_addr(&audit_info, sizeof(audit_info))) +# else + if (0 > setaudit(&audit_info)) +# endif + { + fprintf(stderr, "%s: setaudit failed: %s\n", progname, + strerror(errno)); + fShowEvent = 0; + } + if (fShowEvent) { + fShowEvent = + au_preselect(AUE_autologin, &audit_mask, AU_PRS_SUCCESS, + AU_PRS_REREAD); + } + if (fShowEvent) { + iAuditFile = au_open(); +# if defined(HAVE_GETAUDIT_ADDR) + ptAuditToken = + au_to_subject_ex(wUid, wUid, wGid, wUid, wGid, + audit_info.ai_asid, audit_info.ai_asid, + &audit_info.ai_termid), +# else + ptAuditToken = + au_to_subject(wUid, wUid, wGid, wUid, wGid, + audit_info.ai_asid, audit_info.ai_asid, + &audit_info.ai_termid), +# endif + (void)au_write(iAuditFile, ptAuditToken); + ptAuditToken = au_to_text(gettext("successful login")); + (void)au_write(iAuditFile, ptAuditToken); + if ((char *)0 != pcCmd) { + ptAuditToken = au_to_text(pcCmd); + (void)au_write(iAuditFile, ptAuditToken); + } +# if defined(HAVE_GETAUDIT_ADDR) + ptAuditToken = au_to_return32(0, 0); +# else + ptAuditToken = au_to_return(0, 0); +# endif + (void)au_write(iAuditFile, ptAuditToken); + if (0 > au_close(iAuditFile, AU_TO_WRITE, AUE_autologin)) { + fprintf(stderr, "%s: audit write failed: %s", progname, + strerror(errno)); + } + } + } #endif - /* Open the TTY for stdin, stdout and stderr - */ - if ((char *)0 != pcDevTty) { + /* Open the TTY for stdin, stdout and stderr + */ + if ((char *)0 != pcDevTty) { #ifdef TIOCNOTTY - if (-1 != (i = open("/dev/tty", 2, 0))) { - if ( ioctl(i, TIOCNOTTY, (char *)0) ) - (void) fprintf(stderr, "%s: ioctl(%d, TIOCNOTTY, (char *)0): %s\n", progname, i, strerror(errno)); - (void) close(i); - } -#endif - if (0 != open(pcDevTty, O_RDWR, 0666)) { - exit(1); - /* NOTREACHED */ - } - dup(0); - dup(0); + if (-1 != (i = open("/dev/tty", 2, 0))) { + if (ioctl(i, TIOCNOTTY, (char *)0)) + (void)fprintf(stderr, + "%s: ioctl(%d, TIOCNOTTY, (char *)0): %s\n", + progname, i, strerror(errno)); + (void)close(i); } +#endif + if (0 != open(pcDevTty, O_RDWR, 0666)) { + exit(1); + /* NOTREACHED */ + } + dup(0); + dup(0); + } - /* put the tty in out process group - */ + /* put the tty in out process group + */ #ifdef HAVE_TCGETPGRP - if (-1 >= (i = tcgetpgrp(0))){ - (void) fprintf(stderr, "%s: tcgetpgrp: %s\n", progname, strerror(errno)); - } + if (-1 >= (i = tcgetpgrp(0))) { + (void)fprintf(stderr, "%s: tcgetpgrp: %s\n", progname, + strerror(errno)); + } #endif -#ifndef SETPGRP_VOID - if (-1 != i && setpgrp(0, i) ){ - (void) fprintf(stderr, "%s: setpgrp: %s, i = %d\n", progname, strerror(errno), i); - } -#endif - + if (-1 != i && setpgrp(0, i)) { + (void)fprintf(stderr, "%s: setpgrp: %s, i = %d\n", progname, + strerror(errno), i); + } #ifdef HAVE_TCSETPGRP - if (tcsetpgrp(0, iNewGrp)){ - (void) fprintf(stderr, "%s: tcsetpgrp: %s\n", progname, strerror(errno)); - } -#endif -#ifndef SETPGRP_VOID - if (-1 != iNewGrp && setpgrp(0, iNewGrp)){ - (void) fprintf(stderr, "%s: setpgrp: %s, iNewGrp = %d\n", progname, strerror(errno), iNewGrp); - } + if (tcsetpgrp(0, iNewGrp)) { + (void)fprintf(stderr, "%s: tcsetpgrp: %s\n", progname, + strerror(errno)); + } #endif + if (-1 != iNewGrp && setpgrp(0, iNewGrp)) { + (void)fprintf(stderr, "%s: setpgrp: %s, iNewGrp = %d\n", progname, + strerror(errno), iNewGrp); + } - /* put the tty in the correct mode - */ + /* put the tty in the correct mode + */ #ifdef HAVE_TCGETATTR - if (0 != tcgetattr(0, &n_tio)) { - (void) fprintf(stderr, "%s: tcgetattr: %s\n", progname, strerror(errno)); - exit(1); - /* NOTREACHED */ - } + if (0 != tcgetattr(0, &n_tio)) { + (void)fprintf(stderr, "%s: tcgetattr: %s\n", progname, + strerror(errno)); + exit(1); + /* NOTREACHED */ + } #else - if (0 != ioctl(0, TCGETS, &n_tio)) { - (void) fprintf(stderr, "%s: iotcl: TCGETS: %s\n", progname, strerror(errno)); - exit(1); - /* NOTREACHED */ - } + if (0 != ioctl(0, TCGETS, &n_tio)) { + (void)fprintf(stderr, "%s: iotcl: TCGETS: %s\n", progname, + strerror(errno)); + exit(1); + /* NOTREACHED */ + } #endif - n_tio.c_iflag &= ~(IGNCR|IUCLC); - n_tio.c_iflag |= ICRNL|IXON|IXANY; - n_tio.c_oflag &= ~(OLCUC|ONOCR|ONLRET|OFILL|NLDLY|CRDLY|TABDLY|BSDLY); - n_tio.c_oflag |= OPOST|ONLCR|TAB3; - n_tio.c_lflag &= ~(XCASE|NOFLSH|ECHOK|ECHONL); - n_tio.c_lflag |= ISIG|ICANON|ECHO; - n_tio.c_cc[VEOF] = '\004'; /* ^D */ - n_tio.c_cc[VEOL] = '\000'; /* EOL */ - n_tio.c_cc[VERASE] = '\010'; /* ^H */ - n_tio.c_cc[VINTR] = '\003'; /* ^C */ - n_tio.c_cc[VKILL] = '\025'; /* ^U */ - /* MIN */ - n_tio.c_cc[VQUIT] = '\034'; /* ^\ */ - n_tio.c_cc[VSTART] = '\021'; /* ^Q */ - n_tio.c_cc[VSTOP] = '\023'; /* ^S */ - n_tio.c_cc[VSUSP] = '\032'; /* ^Z */ + n_tio.c_iflag &= ~(IGNCR | IUCLC); + n_tio.c_iflag |= ICRNL | IXON | IXANY; + n_tio.c_oflag &= + ~(OLCUC | ONOCR | ONLRET | OFILL | NLDLY | CRDLY | TABDLY | BSDLY); + n_tio.c_oflag |= OPOST | ONLCR | TAB3; + n_tio.c_lflag &= ~(XCASE | NOFLSH | ECHOK | ECHONL); + n_tio.c_lflag |= ISIG | ICANON | ECHO; + n_tio.c_cc[VEOF] = '\004'; /* ^D */ + n_tio.c_cc[VEOL] = '\000'; /* EOL */ + n_tio.c_cc[VERASE] = '\010'; /* ^H */ + n_tio.c_cc[VINTR] = '\003'; /* ^C */ + n_tio.c_cc[VKILL] = '\025'; /* ^U */ + /* MIN */ + n_tio.c_cc[VQUIT] = '\034'; /* ^\ */ + n_tio.c_cc[VSTART] = '\021'; /* ^Q */ + n_tio.c_cc[VSTOP] = '\023'; /* ^S */ + n_tio.c_cc[VSUSP] = '\032'; /* ^Z */ #ifdef HAVE_TCSETATTR - if (0 != tcsetattr(0, TCSANOW, &n_tio)) { - (void) fprintf(stderr, "%s: tcsetattr: %s\n", progname, strerror(errno)); - exit(1); - /* NOTREACHED */ - } + if (0 != tcsetattr(0, TCSANOW, &n_tio)) { + (void)fprintf(stderr, "%s: tcsetattr: %s\n", progname, + strerror(errno)); + exit(1); + /* NOTREACHED */ + } #endif - if (fMakeUtmp) { - extern char *ttyname(); - make_utmp(pcLogin, (char *)0 != pcTty ? pcTty : ttyname(0)); - } - /* Change ownership and modes on the tty. - */ - if ((char *)0 != pcDevTty) { - (void) chown(pcDevTty, wUid, wGid); - (void) chmod(pcDevTty, (mode_t) TTYMODE); - } + if (fMakeUtmp) { + extern char *ttyname(); + make_utmp(pcLogin, (char *)0 != pcTty ? pcTty : ttyname(0)); + } + /* Change ownership and modes on the tty. + */ + if ((char *)0 != pcDevTty) { + (void)chown(pcDevTty, wUid, wGid); + (void)chmod(pcDevTty, (mode_t) TTYMODE); + } - if ((char *)0 != pcCmd) { - execl(PATH_SU, "su", "-", pcLogin, pcCmd, (char *)0); - } else { - execl(PATH_SU, "su", "-", pcLogin, (char *)0); - } + if ((char *)0 != pcCmd) { + execl(PATH_SU, "su", "-", pcLogin, pcCmd, (char *)0); + } else { + execl(PATH_SU, "su", "-", pcLogin, (char *)0); + } } #ifndef HAVE_PUTENV int putenv(pcAssign) -char *pcAssign; + char *pcAssign; { - register char *pcEq; + register char *pcEq; - if ((char *)0 != (pcEq = strchr(pcAssign, '='))) { - *pcEq++ = '\000'; - (void)setenv(pcAssign, pcEq, 1); - *--pcEq = '='; - } else { - unsetenv(pcAssign); - } + if ((char *)0 != (pcEq = strchr(pcAssign, '='))) { + *pcEq++ = '\000'; + (void)setenv(pcAssign, pcEq, 1); + *--pcEq = '='; + } else { + unsetenv(pcAssign); + } } #endif int addgroup(pcGrp) -char *pcGrp; + char *pcGrp; { - struct group *grp; + struct group *grp; - grp = getgrnam(pcGrp); - if ((struct group *)0 == grp) { - (void) fprintf(stderr, "%s: Unknown group: %s\n", progname, pcGrp); - return(1); - } - if (iGrps >= NGROUPS_MAX) { - (void) fprintf(stderr, "%s: Too many groups specified with \"%s\".\n", progname, pcGrp); - return(1); - } - awGrps[iGrps++] = grp->gr_gid; - return(0); + grp = getgrnam(pcGrp); + if ((struct group *)0 == grp) { + (void)fprintf(stderr, "%s: Unknown group: %s\n", progname, pcGrp); + return (1); + } + if (iGrps >= NGROUPS_MAX) { + (void)fprintf(stderr, + "%s: Too many groups specified with \"%s\".\n", + progname, pcGrp); + return (1); + } + awGrps[iGrps++] = grp->gr_gid; + return (0); } @@ -449,69 +452,69 @@ char *pcGrp; */ void make_utmp(pclogin, pctty) -char *pclogin; -char *pctty; + char *pclogin; + char *pctty; { - register int iFound, iPos; - register int fdUtmp; - register char *pcDev; - register struct utmp *up; - auto struct utmp utmp; + register int iFound, iPos; + register int fdUtmp; + register char *pcDev; + register struct utmp *up; + auto struct utmp utmp; - if ((char *)0 == pctty) { - return; + if ((char *)0 == pctty) { + return; + } + + if ((fdUtmp = open(UTMP_FILE, O_RDWR, 0664)) < 0) { + return; + } + + /* create empty utmp entry + */ + (void)memset(&utmp, 0, sizeof(struct utmp)); + + /* Only the last portion of the tty is saved, unless it's + * all digits. Then back up and include the previous part + * /dev/pty/02 -> pty/02 (not just 02) + */ + if ((char *)0 != (pcDev = strrchr(pctty, '/'))) { + if (!*(pcDev + strspn(pcDev, "/0123456789"))) { + while (pcDev != pctty && *--pcDev != '/') { + } } - - if ((fdUtmp = open(UTMP_FILE, O_RDWR, 0664)) < 0) { - return; - } - - /* create empty utmp entry - */ - (void)memset(&utmp, 0, sizeof(struct utmp)); - - /* Only the last portion of the tty is saved, unless it's - * all digits. Then back up and include the previous part - * /dev/pty/02 -> pty/02 (not just 02) - */ - if ((char *)0 != (pcDev = strrchr(pctty, '/'))) { - if (! *(pcDev + strspn(pcDev, "/0123456789"))) { - while (pcDev != pctty && *--pcDev != '/') { - } - } - if (*pcDev == '/') { - ++pcDev; - } - } else { - pcDev = pctty; + if (*pcDev == '/') { + ++pcDev; } + } else { + pcDev = pctty; + } #ifdef HAVE_GETUTENT - /* look through getutent's by pid - */ - (void)setutent(); - utmp.ut_pid = getpid(); - iFound = iPos = 0; - while ((up = getutent()) != NULL) { - if (up->ut_pid == utmp.ut_pid) { - utmp = *up; - ++iFound; - break; - } - iPos++; - } - (void)endutent(); - /* we were an initprocess, now we are a login shell - */ - utmp.ut_type = USER_PROCESS; - (void)strncpy(utmp.ut_user, pclogin, sizeof(utmp.ut_user)); - if ('\000' == utmp.ut_line[0]) { - (void)strncpy(utmp.ut_line, pcDev, sizeof(utmp.ut_line)); + /* look through getutent's by pid + */ + (void)setutent(); + utmp.ut_pid = getpid(); + iFound = iPos = 0; + while ((up = getutent()) != NULL) { + if (up->ut_pid == utmp.ut_pid) { + utmp = *up; + ++iFound; + break; } + iPos++; + } + (void)endutent(); + /* we were an initprocess, now we are a login shell + */ + utmp.ut_type = USER_PROCESS; + (void)strncpy(utmp.ut_user, pclogin, sizeof(utmp.ut_user)); + if ('\000' == utmp.ut_line[0]) { + (void)strncpy(utmp.ut_line, pcDev, sizeof(utmp.ut_line)); + } #else #ifdef HAVE_SETTTYENT - { + { register struct ttyent *ty; /* look through ttyslots by line? @@ -519,56 +522,56 @@ char *pctty; (void)setttyent(); iFound = iPos = 0; while ((ty = getttyent()) != NULL) { - if (strcmp(ty->ty_name, pcDev) == 0) { - ++iFound; - break; - } - iPos++; + if (strcmp(ty->ty_name, pcDev) == 0) { + ++iFound; + break; + } + iPos++; } /* fill in utmp from ty ZZZ */ (void)endttyent(); - } - (void)strncpy(utmp.ut_line, pcDev, sizeof(utmp.ut_line)); - (void)strncpy(utmp.ut_name, pclogin, sizeof(utmp.ut_name)); - (void)strncpy(utmp.ut_host, "(autologin)", sizeof(utmp.ut_host)); + } + (void)strncpy(utmp.ut_line, pcDev, sizeof(utmp.ut_line)); + (void)strncpy(utmp.ut_name, pclogin, sizeof(utmp.ut_name)); + (void)strncpy(utmp.ut_host, "(autologin)", sizeof(utmp.ut_host)); #else - /* look through /etc/utmp by hand (sigh) - */ - iFound = iPos = 0; - while (sizeof(utmp) == read(fdUtmp, & utmp, sizeof(utmp))) { - if (0 == strncmp(utmp.ut_line, pcDev, sizeof(utmp.ut_line))) { - ++iFound; - break; - } - iPos++; + /* look through /etc/utmp by hand (sigh) + */ + iFound = iPos = 0; + while (sizeof(utmp) == read(fdUtmp, &utmp, sizeof(utmp))) { + if (0 == strncmp(utmp.ut_line, pcDev, sizeof(utmp.ut_line))) { + ++iFound; + break; } - (void)strncpy(utmp.ut_name, pclogin, sizeof(utmp.ut_name)); + iPos++; + } + (void)strncpy(utmp.ut_name, pclogin, sizeof(utmp.ut_name)); #endif #endif - utmp.ut_time = time((time_t *) 0); + utmp.ut_time = time((time_t *)0); - if (0 == iFound) { - fprintf(stderr, "%s: %s: no ttyslot\n", progname, pctty); - } else if (-1 == lseek(fdUtmp, (off_t)(iPos*sizeof(utmp)), 0)) { - fprintf(stderr, "%s: lseek: %s\n", progname, strerror(errno)); - } else { - (void)write(fdUtmp, (char *)&utmp, sizeof(utmp)); - } - (void)close(fdUtmp); + if (0 == iFound) { + fprintf(stderr, "%s: %s: no ttyslot\n", progname, pctty); + } else if (-1 == lseek(fdUtmp, (off_t) (iPos * sizeof(utmp)), 0)) { + fprintf(stderr, "%s: lseek: %s\n", progname, strerror(errno)); + } else { + (void)write(fdUtmp, (char *)&utmp, sizeof(utmp)); + } + (void)close(fdUtmp); } void usage() { - char *u_pch; - int u_loop; + char *u_pch; + int u_loop; - for (u_loop = 0; (char *)0 != (u_pch = au_terse[u_loop]); ++u_loop) { - fprintf(stdout, "%s: usage%s\n", progname, u_pch); - } - for (u_loop = 0; (char *)0 != (u_pch = u_help[u_loop]); ++u_loop) { - fprintf(stdout, "%s\n", u_pch); - } + for (u_loop = 0; (char *)0 != (u_pch = au_terse[u_loop]); ++u_loop) { + fprintf(stdout, "%s: usage%s\n", progname, u_pch); + } + for (u_loop = 0; (char *)0 != (u_pch = u_help[u_loop]); ++u_loop) { + fprintf(stdout, "%s\n", u_pch); + } } diff --git a/autologin/main.c b/autologin/main.c index a369db7..15ab12b 100644 --- a/autologin/main.c +++ b/autologin/main.c @@ -13,7 +13,7 @@ #ifndef HAVE_GETOPT static int - optopt; /* character checked for validity */ + optopt; /* character checked for validity */ /* get option letter from argument vector, also does -number correctly * for nice, xargs, and stuff (these extras by ksb) @@ -21,166 +21,168 @@ static int */ static int getopt(nargc, nargv, ostr) -int nargc; -char **nargv, *ostr; + int nargc; + char **nargv, *ostr; { - register char *oli; /* option letter list index */ - static char EMSG[] = ""; /* just a null place */ - static char *place = EMSG; /* option letter processing */ + register char *oli; /* option letter list index */ + static char EMSG[] = ""; /* just a null place */ + static char *place = EMSG; /* option letter processing */ - if ('\000' == *place) { /* update scanning pointer */ - if (optind >= nargc) - return EOF; - if (nargv[optind][0] != '-') { - register int iLen; - return EOF; - } - place = nargv[optind]; - if ('\000' == *++place) /* "-" (stdin) */ - return EOF; - if (*place == '-' && '\000' == place[1]) { - /* found "--" */ - ++optind; - return EOF; - } - } /* option letter okay? */ - /* if we find the letter, (not a `:') - * or a digit to match a # in the list - */ - if ((optopt = *place++) == ':' || - ((char *)0 == (oli = strchr(ostr,optopt)) && - (!(isdigit(optopt)||'-'==optopt) || (char *)0 == (oli = strchr(ostr, '#'))))) { - if(!*place) ++optind; - return('?'); + if ('\000' == *place) { /* update scanning pointer */ + if (optind >= nargc) + return EOF; + if (nargv[optind][0] != '-') { + register int iLen; + return EOF; } - if ('#' == *oli) { /* accept as -digits */ - optarg = place -1; - ++optind; - place = EMSG; - return '#'; + place = nargv[optind]; + if ('\000' == *++place) /* "-" (stdin) */ + return EOF; + if (*place == '-' && '\000' == place[1]) { + /* found "--" */ + ++optind; + return EOF; } - if (*++oli != ':') { /* don't need argument */ - optarg = NULL; - if ('\000' == *place) - ++optind; - } else { /* need an argument */ - if (*place) { /* no white space */ - optarg = place; - } else if (nargc <= ++optind) { /* no arg!! */ - place = EMSG; - return '*'; - } else { - optarg = nargv[optind]; /* white space */ - } - place = EMSG; - ++optind; + } + /* option letter okay? */ + /* if we find the letter, (not a `:') + * or a digit to match a # in the list + */ + if ((optopt = *place++) == ':' || + ((char *)0 == (oli = strchr(ostr, optopt)) && + (!(isdigit(optopt) || '-' == optopt) || + (char *)0 == (oli = strchr(ostr, '#'))))) { + if (!*place) + ++optind; + return ('?'); + } + if ('#' == *oli) { /* accept as -digits */ + optarg = place - 1; + ++optind; + place = EMSG; + return '#'; + } + if (*++oli != ':') { /* don't need argument */ + optarg = NULL; + if ('\000' == *place) + ++optind; + } else { /* need an argument */ + if (*place) { /* no white space */ + optarg = place; + } else if (nargc <= ++optind) { /* no arg!! */ + place = EMSG; + return '*'; + } else { + optarg = nargv[optind]; /* white space */ } - return optopt; /* dump back option letter */ + place = EMSG; + ++optind; + } + return optopt; /* dump back option letter */ } #endif /* ! HAVE_GETOPT */ char - *progname = "$Id: main.c,v 1.1 2003/11/04 02:36:24 bryan Exp $", - *au_terse[] = { - " [-u] [-c cmd] [-e env=value] [-g group] [-l login] [-t tty]", - " -h", - " -V", - (char *)0 - }, - *u_help[] = { - "c cmd command to run", - "e env=value environment variable to set", - "g group initial group", - "h print this help message", - "l login login name", - "t tty attach to this terminal", - "u do no make utmp entry", - "V show version information", - (char *)0 - }, - *pcCommand = (char *)0, - *pcGroup = (char *)0, - *pcLogin = (char *)0, - *pcTty = (char *)0; + *progname = + "$Id: main.c,v 1.2 2013/09/20 21:15:13 bryan Exp $", *au_terse[] = { + " [-u] [-c cmd] [-e env=value] [-g group] [-l login] [-t tty]", + " -h", + " -V", + (char *)0 +}, *u_help[] = { +"c cmd command to run", + "e env=value environment variable to set", + "g group initial group", + "h print this help message", + "l login login name", + "t tty attach to this terminal", + "u do no make utmp entry", + "V show version information", (char *)0}, *pcCommand = + (char *)0, *pcGroup = (char *)0, *pcLogin = (char *)0, *pcTty = + (char *)0; int - fMakeUtmp = 1, - iErrs = 0; + fMakeUtmp = 1, iErrs = 0; #ifndef u_terse #define u_terse (au_terse[0]) #endif -static char *rcsid = - "$Id: main.c,v 1.1 2003/11/04 02:36:24 bryan Exp $"; +static char *rcsid = "$Id: main.c,v 1.2 2013/09/20 21:15:13 bryan Exp $"; /* * parser */ int main(argc, argv) -int argc; -char **argv; + int argc; + char **argv; { - static char - sbOpt[] = "c:e:g:hl:t:uV", - *u_pch = (char *)0; - static int - u_loop = 0; - register int u_curopt; - extern int atoi(); + static char + sbOpt[] = "c:e:g:hl:t:uV", *u_pch = (char *)0; + static int + u_loop = 0; + register int u_curopt; + extern int atoi(); - progname = strrchr(argv[0], '/'); - if ((char *)0 == progname) - progname = argv[0]; - else - ++progname; - while (EOF != (u_curopt = getopt(argc, argv, sbOpt))) { - switch (u_curopt) { - case '*': - fprintf(stderr, "%s: option `-%c\' needs a parameter\n", progname, optopt); - exit(1); - case '?': - fprintf(stderr, "%s: unknown option `-%c\', use `-h\' for help\n", progname, optopt); - exit(1); - case 'c': - pcCommand = optarg; - continue; - case 'e': - if (putenv(optarg) != 0) { - (void) fprintf(stderr, "%s: putenv(\"%s\"): failed\n", progname, optarg); - exit(1); - } - continue; - case 'g': - pcGroup = optarg; - continue; - case 'h': - for (u_loop = 0; (char *)0 != (u_pch = au_terse[u_loop]); ++u_loop) { - if ('\000' == *u_pch) { - fprintf(stdout, "%s: with no parameters\n", progname); - continue; - } - fprintf(stdout, "%s: usage%s\n", progname, u_pch); - } - for (u_loop = 0; (char *)0 != (u_pch = u_help[u_loop]); ++u_loop) { - fprintf(stdout, "%s\n", u_pch); - } - exit(0); - case 'l': - pcLogin = optarg; - continue; - case 't': - pcTty = optarg; - continue; - case 'u': - fMakeUtmp = 0; - continue; - case 'V': - printf("%s: %s\n", progname, rcsid); - exit(0); + progname = strrchr(argv[0], '/'); + if ((char *)0 == progname) + progname = argv[0]; + else + ++progname; + while (EOF != (u_curopt = getopt(argc, argv, sbOpt))) { + switch (u_curopt) { + case '*': + fprintf(stderr, "%s: option `-%c\' needs a parameter\n", + progname, optopt); + exit(1); + case '?': + fprintf(stderr, + "%s: unknown option `-%c\', use `-h\' for help\n", + progname, optopt); + exit(1); + case 'c': + pcCommand = optarg; + continue; + case 'e': + if (putenv(optarg) != 0) { + (void)fprintf(stderr, "%s: putenv(\"%s\"): failed\n", + progname, optarg); + exit(1); } - break; + continue; + case 'g': + pcGroup = optarg; + continue; + case 'h': + for (u_loop = 0; (char *)0 != (u_pch = au_terse[u_loop]); + ++u_loop) { + if ('\000' == *u_pch) { + fprintf(stdout, "%s: with no parameters\n", + progname); + continue; + } + fprintf(stdout, "%s: usage%s\n", progname, u_pch); + } + for (u_loop = 0; (char *)0 != (u_pch = u_help[u_loop]); + ++u_loop) { + fprintf(stdout, "%s\n", u_pch); + } + exit(0); + case 'l': + pcLogin = optarg; + continue; + case 't': + pcTty = optarg; + continue; + case 'u': + fMakeUtmp = 0; + continue; + case 'V': + printf("%s: %s\n", progname, rcsid); + exit(0); } - Process(); - exit(iErrs); + break; + } + Process(); + exit(iErrs); } diff --git a/autologin/main.h b/autologin/main.h index b97aa35..fe92e2b 100644 --- a/autologin/main.h +++ b/autologin/main.h @@ -12,4 +12,3 @@ extern char *pcCommand, *pcGroup, *pcLogin, *pcTty; /* from std_help.m */ /* from std_version.m */ /* from autologin.m */ - diff --git a/config.h.in b/config.h.in index bac39de..05abf0e 100644 --- a/config.h.in +++ b/config.h.in @@ -315,6 +315,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -327,12 +330,12 @@ /* Define to 1 if the C compiler supports function prototypes. */ #undef PROTOTYPES +/* Defined if client requires server SSL certificate */ +#undef REQ_SERVER_CERT + /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE -/* Define if setpgrp is POSIX */ -#undef SETPGRP_VOID - /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS diff --git a/configure b/configure index f0a003a..beab856 100755 --- a/configure +++ b/configure @@ -1,18 +1,22 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63. +# Generated by GNU Autoconf 2.68. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -20,23 +24,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -44,7 +40,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -55,7 +57,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -78,13 +80,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -94,15 +89,16 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -114,12 +110,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -131,7 +131,255 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -145,8 +393,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -166,295 +418,19 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -471,8 +447,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the @@ -482,29 +457,18 @@ test \$exitcode = 0") || { exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -534,7 +498,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -553,10 +517,10 @@ else if test -d "$1"; then test -d "$1/."; else - case $1 in + case $1 in #( -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -570,11 +534,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -589,7 +553,6 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= @@ -597,6 +560,7 @@ PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= +PACKAGE_URL= ac_unique_file="conserver/main.c" # Factoring default headers for most tests. @@ -695,6 +659,7 @@ bindir program_transform_name prefix exec_prefix +PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION @@ -722,6 +687,7 @@ with_rpath with_cycladests with_libwrap with_openssl +with_req_server_cert with_gssapi with_striprealm with_dmalloc @@ -798,8 +764,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -844,8 +811,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -871,8 +837,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1076,8 +1041,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1093,8 +1057,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1124,17 +1087,17 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1143,7 +1106,7 @@ Try \`$0 --help' for more information." >&2 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1151,15 +1114,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1182,8 +1143,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1197,8 +1157,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1213,11 +1173,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1256,13 +1214,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1302,7 +1258,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1378,6 +1334,7 @@ Optional Packages: --with-cycladests Build for a Cyclades TS --with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support --with-openssl[=PATH] Compile in OpenSSL support + --with-req-server-cert Require server SSL certificate by client --with-gssapi[=PATH] Compile in GSS-API support --with-striprealm retry username without @REALM with gss-api authentication @@ -1390,13 +1347,14 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. +Report bugs to the package provider. _ACEOF ac_status=$? fi @@ -1460,21 +1418,426 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.63 +generated by GNU Autoconf 2.68 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -1510,8 +1873,8 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } >&5 @@ -1548,9 +1911,9 @@ do ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1566,13 +1929,13 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1584,11 +1947,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1597,13 +1958,13 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1622,11 +1983,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1639,11 +1998,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -1657,11 +2014,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -1675,46 +2030,53 @@ _ASBOX exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -1725,19 +2087,23 @@ fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; @@ -1745,7 +2111,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1760,11 +2126,11 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; @@ -1774,17 +2140,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac @@ -1796,35 +2162,20 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi - - - - - - - - - - - - - - - - +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1851,18 +2202,18 @@ MKDIR="mkdir -p -m 755" -{ $as_echo "$as_me:$LINENO: checking for port number specification" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for port number specification" >&5 $as_echo_n "checking for port number specification... " >&6; } # Check whether --with-port was given. -if test "${with_port+set}" = set; then +if test "${with_port+set}" = set; then : withval=$with_port; case "$withval" in yes|no) cat >>confdefs.h <<_ACEOF #define DEFPORT "conserver" _ACEOF - { $as_echo "$as_me:$LINENO: result: port 'conserver'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: port 'conserver'" >&5 $as_echo "port 'conserver'" >&6; } ;; *) @@ -1870,7 +2221,7 @@ $as_echo "port 'conserver'" >&6; } #define DEFPORT "$withval" _ACEOF - { $as_echo "$as_me:$LINENO: result: port '$withval'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: port '$withval'" >&5 $as_echo "port '$withval'" >&6; } ;; esac @@ -1879,23 +2230,23 @@ else #define DEFPORT "conserver" _ACEOF - { $as_echo "$as_me:$LINENO: result: port 'conserver'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: port 'conserver'" >&5 $as_echo "port 'conserver'" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for secondary channel base port" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for secondary channel base port" >&5 $as_echo_n "checking for secondary channel base port... " >&6; } # Check whether --with-base was given. -if test "${with_base+set}" = set; then +if test "${with_base+set}" = set; then : withval=$with_base; case "$withval" in yes|no) cat >>confdefs.h <<_ACEOF #define DEFBASEPORT "0" _ACEOF - { $as_echo "$as_me:$LINENO: result: port '0'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: port '0'" >&5 $as_echo "port '0'" >&6; } ;; *) @@ -1903,7 +2254,7 @@ $as_echo "port '0'" >&6; } #define DEFBASEPORT "$withval" _ACEOF - { $as_echo "$as_me:$LINENO: result: port '$withval'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: port '$withval'" >&5 $as_echo "port '$withval'" >&6; } ;; esac @@ -1912,23 +2263,23 @@ else #define DEFBASEPORT "0" _ACEOF - { $as_echo "$as_me:$LINENO: result: port '0'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: port '0'" >&5 $as_echo "port '0'" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for master conserver hostname" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for master conserver hostname" >&5 $as_echo_n "checking for master conserver hostname... " >&6; } # Check whether --with-master was given. -if test "${with_master+set}" = set; then +if test "${with_master+set}" = set; then : withval=$with_master; case "$withval" in yes|no) cat >>confdefs.h <<_ACEOF #define MASTERHOST "console" _ACEOF - { $as_echo "$as_me:$LINENO: result: 'console'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 'console'" >&5 $as_echo "'console'" >&6; } ;; *) @@ -1936,7 +2287,7 @@ $as_echo "'console'" >&6; } #define MASTERHOST "$withval" _ACEOF - { $as_echo "$as_me:$LINENO: result: '$withval'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$withval'" >&5 $as_echo "'$withval'" >&6; } ;; esac @@ -1945,23 +2296,23 @@ else #define MASTERHOST "console" _ACEOF - { $as_echo "$as_me:$LINENO: result: 'console'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 'console'" >&5 $as_echo "'console'" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for client configuration filename" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for client configuration filename" >&5 $as_echo_n "checking for client configuration filename... " >&6; } # Check whether --with-ccffile was given. -if test "${with_ccffile+set}" = set; then +if test "${with_ccffile+set}" = set; then : withval=$with_ccffile; case "$withval" in yes|no) cat >>confdefs.h <<_ACEOF #define CLIENTCONFIGFILE SYSCONFDIR "/console.cf" _ACEOF - { $as_echo "$as_me:$LINENO: result: '$sysconfdir/console.cf'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$sysconfdir/console.cf'" >&5 $as_echo "'$sysconfdir/console.cf'" >&6; } ;; [\\/]* | ?:[\\/]* ) @@ -1969,7 +2320,7 @@ $as_echo "'$sysconfdir/console.cf'" >&6; } #define CLIENTCONFIGFILE "$withval" _ACEOF - { $as_echo "$as_me:$LINENO: result: '$withval'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$withval'" >&5 $as_echo "'$withval'" >&6; } ;; *) @@ -1977,7 +2328,7 @@ $as_echo "'$withval'" >&6; } #define CLIENTCONFIGFILE SYSCONFDIR "/$withval" _ACEOF - { $as_echo "$as_me:$LINENO: result: '$sysconfdir/$withval'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$sysconfdir/$withval'" >&5 $as_echo "'$sysconfdir/$withval'" >&6; } ;; esac @@ -1986,23 +2337,23 @@ else #define CLIENTCONFIGFILE SYSCONFDIR "/console.cf" _ACEOF - { $as_echo "$as_me:$LINENO: result: '$sysconfdir/console.cf'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$sysconfdir/console.cf'" >&5 $as_echo "'$sysconfdir/console.cf'" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for configuration filename" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for configuration filename" >&5 $as_echo_n "checking for configuration filename... " >&6; } # Check whether --with-cffile was given. -if test "${with_cffile+set}" = set; then +if test "${with_cffile+set}" = set; then : withval=$with_cffile; case "$withval" in yes|no) cat >>confdefs.h <<_ACEOF #define CONFIGFILE SYSCONFDIR "/conserver.cf" _ACEOF - { $as_echo "$as_me:$LINENO: result: '$sysconfdir/conserver.cf'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$sysconfdir/conserver.cf'" >&5 $as_echo "'$sysconfdir/conserver.cf'" >&6; } ;; [\\/]* | ?:[\\/]* ) @@ -2010,7 +2361,7 @@ $as_echo "'$sysconfdir/conserver.cf'" >&6; } #define CONFIGFILE "$withval" _ACEOF - { $as_echo "$as_me:$LINENO: result: '$withval'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$withval'" >&5 $as_echo "'$withval'" >&6; } ;; *) @@ -2018,7 +2369,7 @@ $as_echo "'$withval'" >&6; } #define CONFIGFILE SYSCONFDIR "/$withval" _ACEOF - { $as_echo "$as_me:$LINENO: result: '$sysconfdir/$withval'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$sysconfdir/$withval'" >&5 $as_echo "'$sysconfdir/$withval'" >&6; } ;; esac @@ -2027,23 +2378,23 @@ else #define CONFIGFILE SYSCONFDIR "/conserver.cf" _ACEOF - { $as_echo "$as_me:$LINENO: result: '$sysconfdir/conserver.cf'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$sysconfdir/conserver.cf'" >&5 $as_echo "'$sysconfdir/conserver.cf'" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for password filename" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for password filename" >&5 $as_echo_n "checking for password filename... " >&6; } # Check whether --with-pwdfile was given. -if test "${with_pwdfile+set}" = set; then +if test "${with_pwdfile+set}" = set; then : withval=$with_pwdfile; case "$withval" in yes|no) cat >>confdefs.h <<_ACEOF #define PASSWDFILE SYSCONFDIR "/conserver.passwd" _ACEOF - { $as_echo "$as_me:$LINENO: result: '$sysconfdir/conserver.passwd'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$sysconfdir/conserver.passwd'" >&5 $as_echo "'$sysconfdir/conserver.passwd'" >&6; } ;; [\\/]* | ?:[\\/]* ) @@ -2051,7 +2402,7 @@ $as_echo "'$sysconfdir/conserver.passwd'" >&6; } #define PASSWDFILE "$withval" _ACEOF - { $as_echo "$as_me:$LINENO: result: '$withval'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$withval'" >&5 $as_echo "'$withval'" >&6; } ;; *) @@ -2059,7 +2410,7 @@ $as_echo "'$withval'" >&6; } #define PASSWDFILE SYSCONFDIR "/$withval" _ACEOF - { $as_echo "$as_me:$LINENO: result: '$sysconfdir/$withval'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$sysconfdir/$withval'" >&5 $as_echo "'$sysconfdir/$withval'" >&6; } ;; esac @@ -2068,23 +2419,23 @@ else #define PASSWDFILE SYSCONFDIR "/conserver.passwd" _ACEOF - { $as_echo "$as_me:$LINENO: result: '$sysconfdir/conserver.passwd'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$sysconfdir/conserver.passwd'" >&5 $as_echo "'$sysconfdir/conserver.passwd'" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for log filename" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for log filename" >&5 $as_echo_n "checking for log filename... " >&6; } # Check whether --with-logfile was given. -if test "${with_logfile+set}" = set; then +if test "${with_logfile+set}" = set; then : withval=$with_logfile; case "$withval" in yes|no) cat >>confdefs.h <<_ACEOF #define LOGFILEPATH "/var/log/conserver" _ACEOF - { $as_echo "$as_me:$LINENO: result: '/var/log/conserver'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '/var/log/conserver'" >&5 $as_echo "'/var/log/conserver'" >&6; } ;; *) @@ -2092,7 +2443,7 @@ $as_echo "'/var/log/conserver'" >&6; } #define LOGFILEPATH "$withval" _ACEOF - { $as_echo "$as_me:$LINENO: result: '$withval'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$withval'" >&5 $as_echo "'$withval'" >&6; } ;; esac @@ -2101,17 +2452,17 @@ else #define LOGFILEPATH "/var/log/conserver" _ACEOF - { $as_echo "$as_me:$LINENO: result: '/var/log/conserver'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '/var/log/conserver'" >&5 $as_echo "'/var/log/conserver'" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for PID filename" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PID filename" >&5 $as_echo_n "checking for PID filename... " >&6; } # Check whether --with-pidfile was given. -if test "${with_pidfile+set}" = set; then +if test "${with_pidfile+set}" = set; then : withval=$with_pidfile; case "$withval" in yes|no) PIDFILE="/var/run/conserver.pid" @@ -2128,21 +2479,21 @@ cat >>confdefs.h <<_ACEOF #define PIDFILE "$PIDFILE" _ACEOF -{ $as_echo "$as_me:$LINENO: result: '$PIDFILE'" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: '$PIDFILE'" >&5 $as_echo "'$PIDFILE'" >&6; } -{ $as_echo "$as_me:$LINENO: checking for MAXMEMB setting" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAXMEMB setting" >&5 $as_echo_n "checking for MAXMEMB setting... " >&6; } # Check whether --with-maxmemb was given. -if test "${with_maxmemb+set}" = set; then +if test "${with_maxmemb+set}" = set; then : withval=$with_maxmemb; case "$withval" in yes|no) cat >>confdefs.h <<_ACEOF #define MAXMEMB 16 _ACEOF - { $as_echo "$as_me:$LINENO: result: 16" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 16" >&5 $as_echo "16" >&6; } ;; *) @@ -2152,14 +2503,14 @@ $as_echo "16" >&6; } #define MAXMEMB $withval _ACEOF - { $as_echo "$as_me:$LINENO: result: $withval" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 $as_echo "$withval" >&6; } else cat >>confdefs.h <<_ACEOF #define MAXMEMB 16 _ACEOF - { $as_echo "$as_me:$LINENO: result: value out of bounds (0&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: value out of bounds (0&5 $as_echo "value out of bounds (0&6; } fi ;; @@ -2169,30 +2520,30 @@ else #define MAXMEMB 16 _ACEOF - { $as_echo "$as_me:$LINENO: result: 16" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 16" >&5 $as_echo "16" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for connect() timeout" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect() timeout" >&5 $as_echo_n "checking for connect() timeout... " >&6; } # Check whether --with-timeout was given. -if test "${with_timeout+set}" = set; then +if test "${with_timeout+set}" = set; then : withval=$with_timeout; if expr "$withval" : '[0-9]*$' >/dev/null 2>&1 && test "$withval" -gt 0 -a "$withval" -lt 300; then cat >>confdefs.h <<_ACEOF #define CONNECTTIMEOUT $withval _ACEOF - { $as_echo "$as_me:$LINENO: result: $withval" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 $as_echo "$withval" >&6; } else cat >>confdefs.h <<_ACEOF #define CONNECTTIMEOUT 10 _ACEOF - { $as_echo "$as_me:$LINENO: result: value out of bounds (0&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: value out of bounds (0&5 $as_echo "value out of bounds (0&6; } fi else @@ -2200,83 +2551,77 @@ else #define CONNECTTIMEOUT 10 _ACEOF - { $as_echo "$as_me:$LINENO: result: 10" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 10" >&5 $as_echo "10" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to trust reverse DNS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to trust reverse DNS" >&5 $as_echo_n "checking whether to trust reverse DNS... " >&6; } # Check whether --with-trustrevdns was given. -if test "${with_trustrevdns+set}" = set; then +if test "${with_trustrevdns+set}" = set; then : withval=$with_trustrevdns; case "$withval" in yes) - cat >>confdefs.h <<\_ACEOF -#define TRUST_REVERSE_DNS 1 -_ACEOF + $as_echo "#define TRUST_REVERSE_DNS 1" >>confdefs.h - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ;; *) - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to display extended messages" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to display extended messages" >&5 $as_echo_n "checking whether to display extended messages... " >&6; } # Check whether --with-extmsgs was given. -if test "${with_extmsgs+set}" = set; then +if test "${with_extmsgs+set}" = set; then : withval=$with_extmsgs; case "$withval" in yes) - cat >>confdefs.h <<\_ACEOF -#define USE_EXTENDED_MESSAGES 1 -_ACEOF + $as_echo "#define USE_EXTENDED_MESSAGES 1" >>confdefs.h - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ;; *) - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to use Unix domain sockets" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use Unix domain sockets" >&5 $as_echo_n "checking whether to use Unix domain sockets... " >&6; } cons_with_uds="NO" # Check whether --with-uds was given. -if test "${with_uds+set}" = set; then +if test "${with_uds+set}" = set; then : withval=$with_uds; case "$withval" in yes) cat >>confdefs.h <<_ACEOF #define UDSDIR "/tmp/conserver" _ACEOF - cat >>confdefs.h <<\_ACEOF -#define USE_UNIX_DOMAIN_SOCKETS 1 -_ACEOF + $as_echo "#define USE_UNIX_DOMAIN_SOCKETS 1" >>confdefs.h - { $as_echo "$as_me:$LINENO: result: /tmp/conserver" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: /tmp/conserver" >&5 $as_echo "/tmp/conserver" >&6; } cons_with_uds="YES" ;; no) - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; *) @@ -2284,11 +2629,9 @@ $as_echo "no" >&6; } #define UDSDIR "$withval" _ACEOF - cat >>confdefs.h <<\_ACEOF -#define USE_UNIX_DOMAIN_SOCKETS 1 -_ACEOF + $as_echo "#define USE_UNIX_DOMAIN_SOCKETS 1" >>confdefs.h - { $as_echo "$as_me:$LINENO: result: '$withval'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$withval'" >&5 $as_echo "'$withval'" >&6; } cons_with_uds="YES" if expr "$withval" : '/' >/dev/null 2>&1; then @@ -2300,55 +2643,53 @@ $as_echo "'$withval'" >&6; } ;; esac else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi use_dash_r=no -{ $as_echo "$as_me:$LINENO: checking whether to use -R paths as well as -L" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use -R paths as well as -L" >&5 $as_echo_n "checking whether to use -R paths as well as -L... " >&6; } # Check whether --with-rpath was given. -if test "${with_rpath+set}" = set; then +if test "${with_rpath+set}" = set; then : withval=$with_rpath; case "$withval" in yes|no) - { $as_echo "$as_me:$LINENO: result: $withval" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 $as_echo "$withval" >&6; } use_dash_r=$withval ;; *) - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether we are building for a Cyclades TS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are building for a Cyclades TS" >&5 $as_echo_n "checking whether we are building for a Cyclades TS... " >&6; } # Check whether --with-cycladests was given. -if test "${with_cycladests+set}" = set; then +if test "${with_cycladests+set}" = set; then : withval=$with_cycladests; case "$withval" in yes) - cat >>confdefs.h <<\_ACEOF -#define FOR_CYCLADES_TS 1 -_ACEOF + $as_echo "#define FOR_CYCLADES_TS 1" >>confdefs.h - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ;; *) - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2362,9 +2703,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2375,24 +2716,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2402,9 +2743,9 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2415,24 +2756,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2441,7 +2782,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2455,9 +2796,9 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2468,24 +2809,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2495,9 +2836,9 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2509,18 +2850,18 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -2539,10 +2880,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2554,9 +2895,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2567,24 +2908,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2598,9 +2939,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2611,24 +2952,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2641,7 +2982,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2652,57 +2993,37 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2718,8 +3039,8 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -2735,17 +3056,17 @@ do done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -2762,7 +3083,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -2781,84 +3102,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -2873,32 +3151,83 @@ for ac_file in conftest.exe conftest conftest.*; do esac done else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2910,17 +3239,17 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -2933,31 +3262,23 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2971,37 +3292,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes @@ -3010,20 +3310,16 @@ else fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3034,35 +3330,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3073,36 +3345,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3113,42 +3361,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -3165,18 +3388,14 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3233,32 +3452,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -3269,17 +3465,19 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3304,9 +3502,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do fi done if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3332,10 +3528,10 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3343,11 +3539,11 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -3384,7 +3580,7 @@ case $as_dir/ in ;; esac -done + done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir @@ -3400,7 +3596,7 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -3411,22 +3607,22 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3434,7 +3630,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -3444,11 +3640,11 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -3460,14 +3656,14 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -3482,11 +3678,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3495,78 +3687,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -3578,7 +3726,7 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -3589,11 +3737,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3602,87 +3746,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -3692,9 +3789,9 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -3705,7 +3802,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue @@ -3725,7 +3822,7 @@ case `"$ac_path_GREP" --version 2>&1` in $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -3740,26 +3837,24 @@ esac $ac_path_GREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -3773,7 +3868,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue @@ -3793,7 +3888,7 @@ case `"$ac_path_EGREP" --version 2>&1` in $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -3808,12 +3903,10 @@ esac $ac_path_EGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -3821,21 +3914,17 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3850,48 +3939,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -3901,18 +3965,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -3922,14 +3982,10 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3956,118 +4012,33 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : +if ac_fn_c_try_run "$LINENO"; then : + else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -4078,134 +4049,8 @@ done - if test "${ac_cv_header_minix_config_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 -$as_echo_n "checking for minix/config.h... " >&6; } -if test "${ac_cv_header_minix_config_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -$as_echo "$ac_cv_header_minix_config_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 -$as_echo_n "checking minix/config.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 -$as_echo_n "checking minix/config.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 -$as_echo_n "checking for minix/config.h... " >&6; } -if test "${ac_cv_header_minix_config_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_minix_config_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -$as_echo "$ac_cv_header_minix_config_h" >&6; } - -fi -if test "x$ac_cv_header_minix_config_h" = x""yes; then + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" +if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= @@ -4214,34 +4059,23 @@ fi if test "$MINIX" = yes; then -cat >>confdefs.h <<\_ACEOF -#define _POSIX_SOURCE 1 -_ACEOF +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define _POSIX_1_SOURCE 2 -_ACEOF +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define _MINIX 1 -_ACEOF +$as_echo "#define _MINIX 1" >>confdefs.h fi - - { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then +if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 @@ -4254,68 +4088,34 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_safe_to_define___extensions__=no + ac_cv_safe_to_define___extensions__=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && - cat >>confdefs.h <<\_ACEOF -#define __EXTENSIONS__ 1 -_ACEOF + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define _ALL_SOURCE 1 -_ACEOF + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define _GNU_SOURCE 1 -_ACEOF + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define _POSIX_PTHREAD_SEMANTICS 1 -_ACEOF + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define _TANDEM_SOURCE 1 -_ACEOF + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h -{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4375,76 +4175,45 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no + ac_cv_c_const=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -cat >>confdefs.h <<\_ACEOF -#define const /**/ -_ACEOF +$as_echo "#define const /**/" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for function prototypes" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 $as_echo_n "checking for function prototypes... " >&6; } if test "$ac_cv_prog_cc_c89" != no; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define PROTOTYPES 1 -_ACEOF +$as_echo "#define PROTOTYPES 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define __PROTOTYPES 1 -_ACEOF +$as_echo "#define __PROTOTYPES 1" >>confdefs.h else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4459,48 +4228,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -4510,18 +4254,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -4531,14 +4271,10 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4565,194 +4301,31 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : +if ac_fn_c_try_run "$LINENO"; then : + else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi - for ac_header in sys/ioctl.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_ioctl_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_IOCTL_H 1 _ACEOF fi @@ -4760,16 +4333,12 @@ fi done -{ $as_echo "$as_me:$LINENO: checking POSIX termios" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX termios" >&5 $as_echo_n "checking POSIX termios... " >&6; } -if test "${ac_cv_sys_posix_termios+set}" = set; then +if ${ac_cv_sys_posix_termios+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4784,205 +4353,26 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_sys_posix_termios=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_sys_posix_termios=no + ac_cv_sys_posix_termios=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_posix_termios" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_posix_termios" >&5 $as_echo "$ac_cv_sys_posix_termios" >&6; } if test "$ac_cv_sys_posix_termios" != "yes"; then - { { $as_echo "$as_me:$LINENO: error: POSIX termios interface required" >&5 -$as_echo "$as_me: error: POSIX termios interface required" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "POSIX termios interface required" "$LINENO" 5 fi - - - - - - - - - - - - - - - - - - - - for ac_header in unistd.h getopt.h sys/vlimit.h sys/resource.h ttyent.h sys/ttold.h sys/uio.h sys/ioctl_compat.h usersec.h sys/select.h stropts.h sys/audit.h shadow.h sys/time.h crypt.h sysexits.h types.h sys/sockio.h sys/param.h sys/un.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -4991,81 +4381,28 @@ fi done - for ac_header in sys/proc.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if HAVE_SYS_PARAM_H +do : + ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H #include #endif - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +" +if test "x$ac_cv_header_sys_proc_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_PROC_H 1 _ACEOF fi done -{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then +if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -5080,54 +4417,27 @@ return 0; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_time=no + ac_cv_header_time=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then -cat >>confdefs.h <<\_ACEOF -#define TIME_WITH_SYS_TIME 1 -_ACEOF +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then +if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -5148,140 +4458,24 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_sys_wait_h=no + ac_cv_header_sys_wait_h=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_WAIT_H 1 -_ACEOF +$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5 -$as_echo_n "checking for mode_t... " >&6; } -if test "${ac_cv_type_mode_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_mode_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (mode_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((mode_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = xyes; then : - ac_cv_type_mode_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -$as_echo "$ac_cv_type_mode_t" >&6; } -if test "x$ac_cv_type_mode_t" = x""yes; then - : else cat >>confdefs.h <<_ACEOF @@ -5290,16 +4484,12 @@ _ACEOF fi -{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -5312,35 +4502,14 @@ return *(signal (0, 0)) (0) == 1; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_signal=void + ac_cv_type_signal=void fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF @@ -5348,102 +4517,9 @@ cat >>confdefs.h <<_ACEOF _ACEOF -{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 -$as_echo_n "checking for pid_t... " >&6; } -if test "${ac_cv_type_pid_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_pid_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (pid_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((pid_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = xyes; then : - ac_cv_type_pid_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -$as_echo "$ac_cv_type_pid_t" >&6; } -if test "x$ac_cv_type_pid_t" = x""yes; then - : else cat >>confdefs.h <<_ACEOF @@ -5452,102 +4528,9 @@ _ACEOF fi -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 -$as_echo_n "checking for size_t... " >&6; } -if test "${ac_cv_type_size_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_size_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (size_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((size_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : - ac_cv_type_size_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -$as_echo "$ac_cv_type_size_t" >&6; } -if test "x$ac_cv_type_size_t" = x""yes; then - : else cat >>confdefs.h <<_ACEOF @@ -5556,22 +4539,18 @@ _ACEOF fi -{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then +if ${ac_cv_type_uid_t+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then + $EGREP "uid_t" >/dev/null 2>&1; then : ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no @@ -5579,349 +4558,51 @@ fi rm -f conftest* fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 $as_echo "$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then -cat >>confdefs.h <<\_ACEOF -#define uid_t int -_ACEOF +$as_echo "#define uid_t int" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define gid_t int -_ACEOF +$as_echo "#define gid_t int" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for sig_atomic_t" >&5 -$as_echo_n "checking for sig_atomic_t... " >&6; } -if test "${ac_cv_type_sig_atomic_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_sig_atomic_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include +ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include +" +if test "x$ac_cv_type_sig_atomic_t" = xyes; then : -int -main () -{ -if (sizeof (sig_atomic_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ -if (sizeof ((sig_atomic_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_sig_atomic_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5 -$as_echo "$ac_cv_type_sig_atomic_t" >&6; } -if test "x$ac_cv_type_sig_atomic_t" = x""yes; then - : else -cat >>confdefs.h <<\_ACEOF -#define sig_atomic_t volatile int -_ACEOF +$as_echo "#define sig_atomic_t volatile int" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for in_addr_t" >&5 -$as_echo_n "checking for in_addr_t... " >&6; } -if test "${ac_cv_type_in_addr_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_in_addr_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default +ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "$ac_includes_default #include +" +if test "x$ac_cv_type_in_addr_t" = xyes; then : -int -main () -{ -if (sizeof (in_addr_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include - -int -main () -{ -if (sizeof ((in_addr_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_in_addr_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +$as_echo "#define HAVE_IN_ADDR_T 1" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_in_addr_t" >&5 -$as_echo "$ac_cv_type_in_addr_t" >&6; } -if test "x$ac_cv_type_in_addr_t" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_IN_ADDR_T 1 -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 -$as_echo_n "checking for socklen_t... " >&6; } -if test "${ac_cv_type_socklen_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_socklen_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default +ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default #include +" +if test "x$ac_cv_type_socklen_t" = xyes; then : -int -main () -{ -if (sizeof (socklen_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include - -int -main () -{ -if (sizeof ((socklen_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_socklen_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 -$as_echo "$ac_cv_type_socklen_t" >&6; } -if test "x$ac_cv_type_socklen_t" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SOCKLEN_T 1 -_ACEOF +$as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for sa_len in struct sockaddr" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_len in struct sockaddr" >&5 $as_echo_n "checking for sa_len in struct sockaddr... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -5933,72 +4614,41 @@ struct sockaddr s; s.sa_len=0; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - cat >>confdefs.h <<\_ACEOF -#define HAVE_SA_LEN 1 -_ACEOF + $as_echo "#define HAVE_SA_LEN 1" >>confdefs.h else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -6014,28 +4664,24 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -6055,19 +4701,14 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac case "$host" in *-*-hpux*) CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1" - -{ $as_echo "$as_me:$LINENO: checking for t_error in -lxnet" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_error in -lxnet" >&5 $as_echo_n "checking for t_error in -lxnet... " >&6; } -if test "${ac_cv_lib_xnet_t_error+set}" = set; then +if ${ac_cv_lib_xnet_t_error+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lxnet $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -6085,43 +4726,18 @@ return t_error (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_xnet_t_error=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_xnet_t_error=no + ac_cv_lib_xnet_t_error=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xnet_t_error" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_t_error" >&5 $as_echo "$ac_cv_lib_xnet_t_error" >&6; } -if test "x$ac_cv_lib_xnet_t_error" = x""yes; then +if test "x$ac_cv_lib_xnet_t_error" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXNET 1 _ACEOF @@ -6129,24 +4745,17 @@ _ACEOF LIBS="-lxnet $LIBS" else - { { $as_echo "$as_me:$LINENO: error: -lxnet needed on HP-UX" >&5 -$as_echo "$as_me: error: -lxnet needed on HP-UX" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "-lxnet needed on HP-UX" "$LINENO" 5 fi - -{ $as_echo "$as_me:$LINENO: checking for getspnam in -lsec" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lsec" >&5 $as_echo_n "checking for getspnam in -lsec... " >&6; } -if test "${ac_cv_lib_sec_getspnam+set}" = set; then +if ${ac_cv_lib_sec_getspnam+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsec $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -6164,43 +4773,18 @@ return getspnam (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sec_getspnam=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_sec_getspnam=no + ac_cv_lib_sec_getspnam=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_getspnam" >&5 $as_echo "$ac_cv_lib_sec_getspnam" >&6; } -if test "x$ac_cv_lib_sec_getspnam" = x""yes; then +if test "x$ac_cv_lib_sec_getspnam" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSEC 1 _ACEOF @@ -6209,145 +4793,11 @@ _ACEOF fi - - -for ac_header in hpsecurity.h prot.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + for ac_header in hpsecurity.h prot.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -6356,102 +4806,11 @@ fi done - - - -for ac_func in bigcrypt iscomsec getprpwnam -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + for ac_func in bigcrypt iscomsec getprpwnam +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -6462,17 +4821,13 @@ done ;; esac -{ $as_echo "$as_me:$LINENO: checking for library containing socket" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 $as_echo_n "checking for library containing socket... " >&6; } -if test "${ac_cv_search_socket+set}" = set; then +if ${ac_cv_search_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -6497,69 +4852,38 @@ for ac_lib in '' socket; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_socket+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_socket+:} false; then : break fi done -if test "${ac_cv_search_socket+set}" = set; then - : +if ${ac_cv_search_socket+:} false; then : + else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 $as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -{ $as_echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 $as_echo_n "checking for library containing gethostbyname... " >&6; } -if test "${ac_cv_search_gethostbyname+set}" = set; then +if ${ac_cv_search_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -6584,69 +4908,38 @@ for ac_lib in '' nsl; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_gethostbyname=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_gethostbyname+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_gethostbyname+:} false; then : break fi done -if test "${ac_cv_search_gethostbyname+set}" = set; then - : +if ${ac_cv_search_gethostbyname+:} false; then : + else ac_cv_search_gethostbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 $as_echo "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -{ $as_echo "$as_me:$LINENO: checking for library containing crypt" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5 $as_echo_n "checking for library containing crypt... " >&6; } -if test "${ac_cv_search_crypt+set}" = set; then +if ${ac_cv_search_crypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -6671,54 +4964,27 @@ for ac_lib in '' crypt; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_crypt=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_crypt+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_crypt+:} false; then : break fi done -if test "${ac_cv_search_crypt+set}" = set; then - : +if ${ac_cv_search_crypt+:} false; then : + else ac_cv_search_crypt=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5 $as_echo "$ac_cv_search_crypt" >&6; } ac_res=$ac_cv_search_crypt -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi @@ -6730,7 +4996,7 @@ fi cons_with_libwrap="NO" # Check whether --with-libwrap was given. -if test "${with_libwrap+set}" = set; then +if test "${with_libwrap+set}" = set; then : withval=$with_libwrap; if test "$withval" != "no"; then if test "$withval" != "yes"; then WRAPCPPFLAGS="-I$withval/include" @@ -6751,142 +5017,12 @@ if test "${with_libwrap+set}" = set; then CPPFLAGS="$CPPFLAGS $WRAPCPPFLAGS" LDFLAGS="$LDFLAGS $WRAPLDFLAGS" - if test "${ac_cv_header_tcpd_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for tcpd.h" >&5 -$as_echo_n "checking for tcpd.h... " >&6; } -if test "${ac_cv_header_tcpd_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5 -$as_echo "$ac_cv_header_tcpd_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking tcpd.h usability" >&5 -$as_echo_n "checking tcpd.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking tcpd.h presence" >&5 -$as_echo_n "checking tcpd.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: tcpd.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: tcpd.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: tcpd.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: tcpd.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: tcpd.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: tcpd.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: tcpd.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: tcpd.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for tcpd.h" >&5 -$as_echo_n "checking for tcpd.h... " >&6; } -if test "${ac_cv_header_tcpd_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_tcpd_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5 -$as_echo "$ac_cv_header_tcpd_h" >&6; } - -fi -if test "x$ac_cv_header_tcpd_h" = x""yes; then + ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default" +if test "x$ac_cv_header_tcpd_h" = xyes; then : LIBS="$LIBS -lwrap" - { $as_echo "$as_me:$LINENO: checking for TCP wrappers library -lwrap" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library -lwrap" >&5 $as_echo_n "checking for TCP wrappers library -lwrap... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int allow_severity = 0; @@ -6900,51 +5036,22 @@ hosts_access((void *)0) return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cons_with_libwrap="YES" - cat >>confdefs.h <<\_ACEOF -#define USE_LIBWRAP 1 -_ACEOF + $as_echo "#define USE_LIBWRAP 1" >>confdefs.h CONSLIBS="$CONSLIBS -lwrap" CONSLDFLAGS="$CONSLDFLAGS $WRAPLDFLAGS" CONSCPPFLAGS="$CONSCPPFLAGS $WRAPCPPFLAGS" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } LIBS="$LIBS -lnsl" - { $as_echo "$as_me:$LINENO: checking for TCP wrappers library -lwrap with -lnsl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library -lwrap with -lnsl" >&5 $as_echo_n "checking for TCP wrappers library -lwrap with -lnsl... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int allow_severity = 0; @@ -6958,53 +5065,24 @@ hosts_access((void *)0) return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cons_with_libwrap="YES" - cat >>confdefs.h <<\_ACEOF -#define USE_LIBWRAP 1 -_ACEOF + $as_echo "#define USE_LIBWRAP 1" >>confdefs.h CONSLIBS="$CONSLIBS -lwrap -lnsl" CONSLDFLAGS="$CONSLDFLAGS $WRAPLDFLAGS" CONSCPPFLAGS="$CONSCPPFLAGS $WRAPCPPFLAGS" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi @@ -7019,7 +5097,7 @@ fi cons_with_openssl="NO" # Check whether --with-openssl was given. -if test "${with_openssl+set}" = set; then +if test "${with_openssl+set}" = set; then : withval=$with_openssl; if test "$withval" != "no"; then if test "$withval" != "yes"; then OPENSSLCPPFLAGS="-I$withval/include" @@ -7041,142 +5119,12 @@ if test "${with_openssl+set}" = set; then CPPFLAGS="$CPPFLAGS $OPENSSLCPPFLAGS" LDFLAGS="$LDFLAGS $OPENSSLLDFLAGS" - if test "${ac_cv_header_openssl_ssl_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5 -$as_echo_n "checking for openssl/ssl.h... " >&6; } -if test "${ac_cv_header_openssl_ssl_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5 -$as_echo "$ac_cv_header_openssl_ssl_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5 -$as_echo_n "checking openssl/ssl.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5 -$as_echo_n "checking openssl/ssl.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: openssl/ssl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5 -$as_echo_n "checking for openssl/ssl.h... " >&6; } -if test "${ac_cv_header_openssl_ssl_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_openssl_ssl_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5 -$as_echo "$ac_cv_header_openssl_ssl_h" >&6; } - -fi -if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then + ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : LIBS="$LIBS -lssl -lcrypto" - { $as_echo "$as_me:$LINENO: checking for openssl libraries -lssl and -lcrypto" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl libraries -lssl and -lcrypto" >&5 $as_echo_n "checking for openssl libraries -lssl and -lcrypto... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -7188,46 +5136,19 @@ SSL_library_init() return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cons_with_openssl="YES" - cat >>confdefs.h <<\_ACEOF -#define HAVE_OPENSSL 1 -_ACEOF + $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h have_openssl=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi @@ -7237,6 +5158,29 @@ fi CPPFLAGS="$oCPPFLAGS" LDFLAGS="$oLDFLAGS" fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to require server cert" >&5 +$as_echo_n "checking whether to require server cert... " >&6; } + +# Check whether --with-req-server-cert was given. +if test "${with_req_server_cert+set}" = set; then : + withval=$with_req_server_cert; case "$withval" in + yes) + $as_echo "#define REQ_SERVER_CERT 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + fi fi @@ -7246,7 +5190,7 @@ cons_with_gssapi="NO" cons_strip_realm="NO" # Check whether --with-gssapi was given. -if test "${with_gssapi+set}" = set; then +if test "${with_gssapi+set}" = set; then : withval=$with_gssapi; if test "$withval" != "no"; then if test "$withval" != "yes"; then GSSAPICPPFLAGS="-I$withval/include" @@ -7268,142 +5212,12 @@ if test "${with_gssapi+set}" = set; then CPPFLAGS="$CPPFLAGS $GSSAPICPPFLAGS" LDFLAGS="$LDFLAGS $GSSAPILDFLAGS" - if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5 -$as_echo_n "checking for gssapi/gssapi.h... " >&6; } -if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5 -$as_echo "$ac_cv_header_gssapi_gssapi_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking gssapi/gssapi.h usability" >&5 -$as_echo_n "checking gssapi/gssapi.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking gssapi/gssapi.h presence" >&5 -$as_echo_n "checking gssapi/gssapi.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5 -$as_echo_n "checking for gssapi/gssapi.h... " >&6; } -if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_gssapi_gssapi_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5 -$as_echo "$ac_cv_header_gssapi_gssapi_h" >&6; } - -fi -if test "x$ac_cv_header_gssapi_gssapi_h" = x""yes; then + ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default" +if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then : LIBS="$oLIBS -lgssapi" - { $as_echo "$as_me:$LINENO: checking for gssapi library -lgssapi" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gssapi library -lgssapi" >&5 $as_echo_n "checking for gssapi library -lgssapi... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -7415,49 +5229,20 @@ gss_create_empty_oid_set(NULL, NULL) return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cons_with_gssapi="YES" - cat >>confdefs.h <<\_ACEOF -#define HAVE_GSSAPI 1 -_ACEOF + $as_echo "#define HAVE_GSSAPI 1" >>confdefs.h have_gssapi=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } LIBS="$oLIBS -lgssglue" - { $as_echo "$as_me:$LINENO: checking for gssapi library -lgssglue" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gssapi library -lgssglue" >&5 $as_echo_n "checking for gssapi library -lgssglue... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -7469,49 +5254,20 @@ gss_create_empty_oid_set(NULL, NULL) return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cons_with_gssapi="YES" - cat >>confdefs.h <<\_ACEOF -#define HAVE_GSSAPI 1 -_ACEOF + $as_echo "#define HAVE_GSSAPI 1" >>confdefs.h have_gssapi=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } LIBS="$oLIBS -lgss" - { $as_echo "$as_me:$LINENO: checking for gssapi library -lgss" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gssapi library -lgss" >&5 $as_echo_n "checking for gssapi library -lgss... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -7523,56 +5279,25 @@ gss_create_empty_oid_set(NULL, NULL) return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cons_with_gssapi="YES" - cat >>confdefs.h <<\_ACEOF -#define HAVE_GSSAPI 1 -_ACEOF + $as_echo "#define HAVE_GSSAPI 1" >>confdefs.h have_gssapi=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi @@ -7582,28 +5307,26 @@ fi CPPFLAGS="$oCPPFLAGS" LDFLAGS="$oLDFLAGS" else - { $as_echo "$as_me:$LINENO: checking whether to fallback to username without @REALM" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to fallback to username without @REALM" >&5 $as_echo_n "checking whether to fallback to username without @REALM... " >&6; } # Check whether --with-striprealm was given. -if test "${with_striprealm+set}" = set; then +if test "${with_striprealm+set}" = set; then : withval=$with_striprealm; case "$withval" in yes) - cat >>confdefs.h <<\_ACEOF -#define STRIP_REALM 1 -_ACEOF + $as_echo "#define STRIP_REALM 1" >>confdefs.h - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cons_strip_realm="YES" ;; *) - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7616,7 +5339,7 @@ fi cons_with_dmalloc="NO" # Check whether --with-dmalloc was given. -if test "${with_dmalloc+set}" = set; then +if test "${with_dmalloc+set}" = set; then : withval=$with_dmalloc; if test "$withval" != "no"; then if test "$withval" != "yes"; then DMALLOCCPPFLAGS="-I$withval/include" @@ -7638,142 +5361,12 @@ if test "${with_dmalloc+set}" = set; then CPPFLAGS="$CPPFLAGS $DMALLOCCPPFLAGS" LDFLAGS="$LDFLAGS $DMALLOCLDFLAGS" - if test "${ac_cv_header_dmalloc_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for dmalloc.h" >&5 -$as_echo_n "checking for dmalloc.h... " >&6; } -if test "${ac_cv_header_dmalloc_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dmalloc_h" >&5 -$as_echo "$ac_cv_header_dmalloc_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking dmalloc.h usability" >&5 -$as_echo_n "checking dmalloc.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking dmalloc.h presence" >&5 -$as_echo_n "checking dmalloc.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: dmalloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: dmalloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: dmalloc.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: dmalloc.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: dmalloc.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: dmalloc.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: dmalloc.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: dmalloc.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: dmalloc.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: dmalloc.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: dmalloc.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: dmalloc.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: dmalloc.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: dmalloc.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: dmalloc.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: dmalloc.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for dmalloc.h" >&5 -$as_echo_n "checking for dmalloc.h... " >&6; } -if test "${ac_cv_header_dmalloc_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_dmalloc_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dmalloc_h" >&5 -$as_echo "$ac_cv_header_dmalloc_h" >&6; } - -fi -if test "x$ac_cv_header_dmalloc_h" = x""yes; then + ac_fn_c_check_header_mongrel "$LINENO" "dmalloc.h" "ac_cv_header_dmalloc_h" "$ac_includes_default" +if test "x$ac_cv_header_dmalloc_h" = xyes; then : LIBS="$LIBS -ldmalloc" - { $as_echo "$as_me:$LINENO: checking for dmalloc libraries -ldmalloc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dmalloc libraries -ldmalloc" >&5 $as_echo_n "checking for dmalloc libraries -ldmalloc... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -7785,46 +5378,19 @@ dmalloc_debug(0) return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cons_with_dmalloc="YES" - cat >>confdefs.h <<\_ACEOF -#define HAVE_DMALLOC 1 -_ACEOF + $as_echo "#define HAVE_DMALLOC 1" >>confdefs.h have_dmalloc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi @@ -7843,150 +5409,20 @@ fi cons_with_pam="NO" -{ $as_echo "$as_me:$LINENO: checking for PAM support" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM support" >&5 $as_echo_n "checking for PAM support... " >&6; } # Check whether --with-pam was given. -if test "${with_pam+set}" = set; then +if test "${with_pam+set}" = set; then : withval=$with_pam; if test "$withval" = yes; then oLIBS="$LIBS" - if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 -$as_echo_n "checking for security/pam_appl.h... " >&6; } -if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 -$as_echo "$ac_cv_header_security_pam_appl_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5 -$as_echo_n "checking security/pam_appl.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking security/pam_appl.h presence" >&5 -$as_echo_n "checking security/pam_appl.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 -$as_echo_n "checking for security/pam_appl.h... " >&6; } -if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_security_pam_appl_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 -$as_echo "$ac_cv_header_security_pam_appl_h" >&6; } - -fi -if test "x$ac_cv_header_security_pam_appl_h" = x""yes; then + ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default" +if test "x$ac_cv_header_security_pam_appl_h" = xyes; then : LIBS="$LIBS -lpam" - { $as_echo "$as_me:$LINENO: checking for PAM library -lpam" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM library -lpam" >&5 $as_echo_n "checking for PAM library -lpam... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -8004,49 +5440,20 @@ return pam_start (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cons_with_pam="YES" - cat >>confdefs.h <<\_ACEOF -#define HAVE_PAM 1 -_ACEOF + $as_echo "#define HAVE_PAM 1" >>confdefs.h CONSLIBS="$CONSLIBS -lpam" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - LIBS="$LIBS -ldl" - { $as_echo "$as_me:$LINENO: result: no" >&5 + LIBS="$LIBS -ldl" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: checking for PAM library -lpam with -ldl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM library -lpam with -ldl" >&5 $as_echo_n "checking for PAM library -lpam with -ldl... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -8064,206 +5471,42 @@ return pam_end (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cons_with_pam="YES" - cat >>confdefs.h <<\_ACEOF -#define HAVE_PAM 1 -_ACEOF + $as_echo "#define HAVE_PAM 1" >>confdefs.h CONSLIBS="$CONSLIBS -lpam -ldl" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi LIBS="$oLIBS" else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - - - for ac_header in pty.h libutil.h util.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -8272,19 +5515,14 @@ fi done - -{ $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 $as_echo_n "checking for openpty in -lutil... " >&6; } -if test "${ac_cv_lib_util_openpty+set}" = set; then +if ${ac_cv_lib_util_openpty+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -8302,43 +5540,18 @@ return openpty (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_util_openpty=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_util_openpty=no + ac_cv_lib_util_openpty=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5 $as_echo "$ac_cv_lib_util_openpty" >&6; } -if test "x$ac_cv_lib_util_openpty" = x""yes; then +if test "x$ac_cv_lib_util_openpty" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBUTIL 1 _ACEOF @@ -8347,236 +5560,23 @@ _ACEOF fi - for ac_func in openpty -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty" +if test "x$ac_cv_func_openpty" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_OPENPTY 1 _ACEOF fi done - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - for ac_func in getopt strerror getrlimit getsid setsid getuserattr setgroups tcgetpgrp tcsetpgrp tcgetattr tcsetattr tcsendbreak setpgrp getutent setttyent getspnam setlinebuf setvbuf ptsname grantpt unlockpt sigaction setsockopt getdtablesize putenv memset memcpy memcmp memmove sysconf getlogin inet_aton setproctitle gettimeofday strlcpy -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -8584,443 +5584,44 @@ _ACEOF fi done -if test "$with_cycladests" != "yes"; then - { $as_echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5 -$as_echo_n "checking whether setpgrp takes no argument... " >&6; } -if test "${ac_cv_func_setpgrp_void+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5 -$as_echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -/* If this system has a BSD-style setpgrp which takes arguments, - setpgrp(1, 1) will fail with ESRCH and return -1, in that case - exit successfully. */ - return setpgrp (1,1) != -1; - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_setpgrp_void=no -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes; then : -( exit $ac_status ) -ac_cv_func_setpgrp_void=yes -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5 -$as_echo "$ac_cv_func_setpgrp_void" >&6; } -if test $ac_cv_func_setpgrp_void = yes; then - -cat >>confdefs.h <<\_ACEOF -#define SETPGRP_VOID 1 -_ACEOF - -fi +$as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h else + ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp" +if test "x$ac_cv_func_stricmp" = xyes; then : -cat >>confdefs.h <<\_ACEOF -#define SETPGRP_VOID 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: Building for a Cyclades-TS: setting SETPGRP_VOID because we cannot test this in cross-compilation" >&5 -$as_echo "$as_me: Building for a Cyclades-TS: setting SETPGRP_VOID because we cannot test this in cross-compilation" >&6;} - -fi -{ $as_echo "$as_me:$LINENO: checking for strcasecmp" >&5 -$as_echo_n "checking for strcasecmp... " >&6; } -if test "${ac_cv_func_strcasecmp+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define strcasecmp to an innocuous variant, in case declares strcasecmp. - For example, HP-UX 11i declares gettimeofday. */ -#define strcasecmp innocuous_strcasecmp - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char strcasecmp (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef strcasecmp - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char strcasecmp (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_strcasecmp || defined __stub___strcasecmp -choke me -#endif - -int -main () -{ -return strcasecmp (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_strcasecmp=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_strcasecmp=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5 -$as_echo "$ac_cv_func_strcasecmp" >&6; } -if test "x$ac_cv_func_strcasecmp" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRCASECMP 1 -_ACEOF +$as_echo "#define HAVE_STRICMP 1" >>confdefs.h else - { $as_echo "$as_me:$LINENO: checking for stricmp" >&5 -$as_echo_n "checking for stricmp... " >&6; } -if test "${ac_cv_func_stricmp+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define stricmp to an innocuous variant, in case declares stricmp. - For example, HP-UX 11i declares gettimeofday. */ -#define stricmp innocuous_stricmp - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char stricmp (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef stricmp - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char stricmp (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_stricmp || defined __stub___stricmp -choke me -#endif - -int -main () -{ -return stricmp (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_stricmp=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_stricmp=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_stricmp" >&5 -$as_echo "$ac_cv_func_stricmp" >&6; } -if test "x$ac_cv_func_stricmp" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRICMP 1 -_ACEOF - -else - { { $as_echo "$as_me:$LINENO: error: strcasecmp or stricmp must be available" >&5 -$as_echo "$as_me: error: strcasecmp or stricmp must be available" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "strcasecmp or stricmp must be available" "$LINENO" 5 fi fi - for ac_header in bsm/audit.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "bsm/audit.h" "ac_cv_header_bsm_audit_h" "$ac_includes_default" +if test "x$ac_cv_header_bsm_audit_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_BSM_AUDIT_H 1 _ACEOF fi done - -{ $as_echo "$as_me:$LINENO: checking for getaudit in -lbsm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaudit in -lbsm" >&5 $as_echo_n "checking for getaudit in -lbsm... " >&6; } -if test "${ac_cv_lib_bsm_getaudit+set}" = set; then +if ${ac_cv_lib_bsm_getaudit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -9038,43 +5639,18 @@ return getaudit (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsm_getaudit=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_bsm_getaudit=no + ac_cv_lib_bsm_getaudit=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsm_getaudit" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsm_getaudit" >&5 $as_echo "$ac_cv_lib_bsm_getaudit" >&6; } -if test "x$ac_cv_lib_bsm_getaudit" = x""yes; then +if test "x$ac_cv_lib_bsm_getaudit" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBBSM 1 _ACEOF @@ -9083,101 +5659,11 @@ _ACEOF fi - - for ac_func in getaudit getaudit_addr -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -9218,13 +5704,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -9232,8 +5718,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -9255,12 +5741,23 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi @@ -9274,14 +5771,15 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -9289,13 +5787,14 @@ LTLIBOBJS=$ac_ltlibobjs -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -9305,17 +5804,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -9323,23 +5823,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -9347,7 +5839,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -9358,7 +5856,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -9381,13 +5879,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -9397,15 +5888,16 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -9417,12 +5909,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -9434,7 +5930,89 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -9448,8 +6026,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -9469,76 +6051,25 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -9567,8 +6098,56 @@ fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -9587,10 +6166,10 @@ else if test -d "$1"; then test -d "$1/."; else - case $1 in + case $1 in #( -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -9605,13 +6184,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -9642,13 +6227,15 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -9664,16 +6251,17 @@ $config_files Configuration headers: $config_headers -Report bugs to ." +Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -9689,11 +6277,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -9707,27 +6300,29 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -9735,11 +6330,10 @@ Try \`$0 --help' for more information." >&2 ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -9794,9 +6388,7 @@ do "contrib/chat/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/chat/Makefile" ;; "conserver/conserver.rc") CONFIG_FILES="$CONFIG_FILES conserver/conserver.rc" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -9818,26 +6410,24 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -9845,7 +6435,13 @@ $debug || if test -n "$CONFIG_FILES"; then -ac_cr=' ' +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' @@ -9853,7 +6449,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -9862,24 +6458,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -9887,7 +6477,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -9901,7 +6491,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -9915,7 +6505,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -9935,7 +6525,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -9967,23 +6557,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -9995,7 +6591,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -10007,13 +6603,11 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -10098,9 +6692,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -10113,9 +6705,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -10134,7 +6724,7 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -10143,12 +6733,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't @@ -10159,7 +6747,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. @@ -10171,10 +6759,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -10202,47 +6788,7 @@ $as_echo X"$ac_file" | q } s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in @@ -10294,7 +6840,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - ac_sed_dataroot=' /datarootdir/ { p @@ -10304,12 +6849,11 @@ ac_sed_dataroot=' /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' +/@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -10319,7 +6863,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -10346,27 +6890,24 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -10375,27 +6916,21 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; @@ -10410,15 +6945,12 @@ $as_echo "$as_me: error: could not create -" >&2;} done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -10439,10 +6971,10 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff --git a/configure.in b/configure.in index f4e667a..e0aad54 100644 --- a/configure.in +++ b/configure.in @@ -23,6 +23,7 @@ AH_TEMPLATE([USE_EXTENDED_MESSAGES],[Defined if we produce extended messages]) AH_TEMPLATE([USE_UNIX_DOMAIN_SOCKETS],[Defined if we use Unix domain sockets]) AH_TEMPLATE([UDSDIR], [Directory for Unix domain sockets]) AH_TEMPLATE([FOR_CYCLADES_TS], [Defined if building for a Cyclades TS]) +AH_TEMPLATE([REQ_SERVER_CERT], [Defined if client requires server SSL certificate]) dnl ### Normal initialization. ###################################### AC_INIT @@ -498,6 +499,19 @@ AC_ARG_WITH(openssl, CPPFLAGS="$oCPPFLAGS" LDFLAGS="$oLDFLAGS" fi + + AC_MSG_CHECKING(whether to require server cert) + AC_ARG_WITH(req-server-cert, + AS_HELP_STRING([--with-req-server-cert],[Require server SSL certificate by client]), + [case "$withval" in + yes) + AC_DEFINE(REQ_SERVER_CERT) + AC_MSG_RESULT(yes) + ;; + *) + AC_MSG_RESULT(no) + ;; + esac],[AC_MSG_RESULT(no)]) fi] ) @@ -705,13 +719,6 @@ AC_CHECK_LIB(util, openpty) AC_CHECK_FUNCS(openpty) AC_CHECK_FUNCS(getopt strerror getrlimit getsid setsid getuserattr setgroups tcgetpgrp tcsetpgrp tcgetattr tcsetattr tcsendbreak setpgrp getutent setttyent getspnam setlinebuf setvbuf ptsname grantpt unlockpt sigaction setsockopt getdtablesize putenv memset memcpy memcmp memmove sysconf getlogin inet_aton setproctitle gettimeofday strlcpy) -if test "$with_cycladests" != "yes"; then - AC_FUNC_SETPGRP -else - AC_DEFINE(SETPGRP_VOID, 1, [Define if setpgrp is POSIX]) - AC_MSG_NOTICE([Building for a Cyclades-TS: setting SETPGRP_VOID because we cannot test this in cross-compilation]) - -fi AC_CHECK_FUNC(strcasecmp, [AC_DEFINE(HAVE_STRCASECMP, 1, [Define if strcasecmp is available])], [AC_CHECK_FUNC(stricmp, diff --git a/conserver.cf/Makefile.in b/conserver.cf/Makefile.in index 9a53447..c1e8c52 100644 --- a/conserver.cf/Makefile.in +++ b/conserver.cf/Makefile.in @@ -1,4 +1,5 @@ ### Path settings +datarootdir = @datarootdir@ srcdir = @srcdir@ prefix = @prefix@ mandir = @mandir@ diff --git a/conserver.cf/conserver.cf.man b/conserver.cf/conserver.cf.man index ff609cb..a5032f3 100644 --- a/conserver.cf/conserver.cf.man +++ b/conserver.cf/conserver.cf.man @@ -1,5 +1,5 @@ -.\" $Id: conserver.cf.man,v 1.78 2007/04/02 17:59:16 bryan Exp $ -.TH CONSERVER.CF 5 "2007/04/02" "conserver-8.1.18" "conserver" +.\" $Id: conserver.cf.man,v 1.84 2013/09/25 22:10:29 bryan Exp $ +.TH CONSERVER.CF 5 "2013/09/25" "conserver-8.1.19" "conserver" .SH NAME conserver.cf \- console configuration file for .BR conserver (8) @@ -220,6 +220,12 @@ Break sequences are accessed via the client escape sequence. .RS .TP +\f3confirm\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP +.br +Set whether or not to ask the client for confirmation before sending the +break sequence. +The default is ``no''. +.TP \f3delay\fP \f2n\fP .br Set the time delay for the @@ -308,7 +314,7 @@ If the value of ``*'' is used, the configuration block will be applied to all conserver hosts. .RS .TP -\f3autocomplete\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off +\f3autocomplete\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP .br Turn the console name autocompletion feature on or off. If autocompletion is on, a client can use any unique leading portion of a @@ -322,7 +328,7 @@ an access list (see the .B \-a command-line flag). .TP -\f3daemonmode\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off +\f3daemonmode\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP .br Set whether or not to become a daemon when run (see the .B \-d @@ -372,7 +378,7 @@ Set the port used by the master conserver process (see the .B \-p command-line flag). .TP -\f3redirect\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off +\f3redirect\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP .br Turn redirection on or off (see the .B \-R @@ -390,7 +396,7 @@ Set the base port number used by child processes (see the .B \-b command-line flag). .TP -\f3setproctitle\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off +\f3setproctitle\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP .br Set whether or not the process title shows master/group functionality as well as the port number the process is listening on and how many @@ -407,7 +413,19 @@ credentials file location (see the .B \-c command-line flag). .TP -\f3sslrequired\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off +\f3sslcacertificatefile\fP \f2filename\fP +.br +Load the valid CA certificates for the +.SM SSL +connection from the PEM encoded file. This option overrides the global CA +list. +.TP +\f3sslreqclientcert\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP +.br +Set whether or not a certificate is required by the client to connect. +The default is ``no''. +.TP +\f3sslrequired\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP .br Set whether or not encryption is required when talking to clients (see the .B \-E @@ -461,6 +479,13 @@ Assign the break sequence as the default for the console, which is used by the ``^Ecl0'' client escape sequence. .TP +\f3breaklist\fP \f2n\fP[\f3,\fP...]|\f3""\fP +Associate a list of break sequences referenced by +.I n +with the console. +If ``*'' is used (the default), all defined break sequences will be available. +If the null string (``\f3""\fP'') is used, no sequences will be available. +.TP \f3device\fP \f2filename\fP .br Assign the serial device @@ -1040,6 +1065,13 @@ will be granted (or denied, if prefixed with `!') read-write access. If the null string (``\f3""\fP'') is used, any users previously defined for the console's read-write list are removed. .TP +\f3tasklist\fP \f2c\fP[\f3,\fP...]|\f3""\fP +Associate a list of tasks referenced by +.I c +with the console. +If ``*'' is used (the default), all defined tasks will be available. +If the null string (``\f3""\fP'') is used, no tasks will be available. +.TP \f3timestamp\fP [\f2number\fP[\f3m\fP|\f3h\fP|\f3d\fP|\f3l\fP]][\f3a\fP][\f3b\fP]|\f3""\fP .br Specifies the time between timestamps applied to the console @@ -1126,7 +1158,7 @@ If the null string (``\f3""\fP'') is used, no replacements will be done. \f3group\fP \f2name\fP .br Define a user group identified as -.I name +.IR name . .RS .TP \f3users\fP [\f3!\fP]\f2username\fP[\f3,\fP...]|\f3""\fP @@ -1153,6 +1185,74 @@ will be recorded with (or without, if prefixed with `!') access. If the null string (``\f3""\fP'') is used, any users previously defined for this group are removed. .RE +.TP +\f3task\fP \f2c\fP +.br +Define a task where +.I c +is a lowercase alphanumeric (0-9a-z). +Tasks are invoked via the +.RI ``^Ec! c '' +client escape sequence. +.RS +.TP +\f3cmd\fP \f2command\fP|\f3""\fP +.br +Invoke +.I command +on the server when instructed by the client. +All file descriptors are closed, except for stderr (which is inherited from +the server). +The +.I command +is passed as an argument to ``/bin/sh -ce'' and is a ``fire and forget'' +methodology (you need to check logs for any issues). +If the null string (``\f3""\fP'') is used, the entire task definition is ignored. +.TP +\f3confirm\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP +.br +Set whether or not to ask the client for confirmation before invoking the task. +The default is ``no''. +.TP +\f3description\fP \f2string\fP +.br +Set a description for the task. When a client lists tasks, +.I string +will be printed instead of the command defined above. +If the null string (``\f3""\fP'') is used, the command defined above will +be printed. +.TP +\f3runas\fP [\f2user\fP][:\f2group\fP]|\f3""\fP +.br +By default, the command invoked by +.B cmd +is run with the same privileges as the server. +If the server is running with root privileges, this option resets the user +and/or group of the invoked process to +.I user +and +.I group +respectively. +.I user +may be a username or numeric uid and +.I group +may be a group name or numeric gid. +Either one is optional. +If the server is not running with root privileges, these values +are not used. +If the null string (``\f3""\fP'') is specified, the default of running +with the same privileges as the server is restored. +.TP +\f3subst\fP \f2c\fP\f3=\fP\f2t\fP[\f2n\fP]\f2f\fP[\f3,\fP...]|\f3""\fP +.br +Perform character substitutions on the +.B cmd +value. +See the +.B devicesubst +option for an explanation of the format string. +If the null string (``\f3""\fP'') is used, no replacements will be done. +.RE .SH AUTHORS Bryan Stansell, conserver.com .SH "SEE ALSO" diff --git a/conserver.cf/conserver.passwd.man b/conserver.cf/conserver.passwd.man index 47683d9..76b9ca8 100644 --- a/conserver.cf/conserver.passwd.man +++ b/conserver.cf/conserver.passwd.man @@ -1,5 +1,5 @@ .\" $Id: conserver.passwd.man,v 1.10 2004/01/08 16:12:33 bryan Exp $ -.TH CONSERVER.PASSWD 5 "2004/01/08" "conserver-8.1.18" "conserver" +.TH CONSERVER.PASSWD 5 "2004/01/08" "conserver-8.1.19" "conserver" .SH NAME conserver.passwd \- user access information for .BR conserver (8) diff --git a/conserver.html b/conserver.html index 2482240..89a6192 100644 --- a/conserver.html +++ b/conserver.html @@ -3,7 +3,7 @@ + "HTML Tidy for Solaris (vers 25 March 2009), see www.w3.org"> Australia   Germany -   Germany +   Germany   Germany   Ireland +   Malaysia   Russia   US-West (Primary)
@@ -56,16 +56,11 @@ body { --> -
- - - - + + + +
@@ -182,8 +177,8 @@ body {

Downloading

-

The current version, released on Nov 11, 2010, is - 8.1.18.tar.gz. See the The current version, released on Sep 26, 2013, is + 8.1.19.tar.gz. See the CHANGES file for information on the latest updates.

diff --git a/conserver/Makefile.in b/conserver/Makefile.in index 608da98..7fc7895 100644 --- a/conserver/Makefile.in +++ b/conserver/Makefile.in @@ -1,4 +1,5 @@ ### Path settings +datarootdir = @datarootdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ prefix = @prefix@ diff --git a/conserver/client.c b/conserver/client.c index 34bb85a..07d9fbc 100644 --- a/conserver/client.c +++ b/conserver/client.c @@ -1,5 +1,5 @@ /* - * $Id: client.c,v 5.93 2009/09/26 09:20:15 bryan Exp $ + * $Id: client.c,v 5.95 2013/09/25 22:10:29 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -413,13 +413,12 @@ static HELP aHLTable[] = { {WHEN_ALWAYS, "w who is on this console"}, {WHEN_ALWAYS, "x show console baud info"}, {WHEN_ALWAYS | IS_LIMITED, "z suspend the connection"}, + {WHEN_ATTACH, "! invoke task"}, {WHEN_ATTACH | IS_LIMITED, "| attach local command"}, {WHEN_ALWAYS, "? print this message"}, {WHEN_ALWAYS, " ignore/abort command"}, {WHEN_ALWAYS, "^R replay the last line"}, {WHEN_ATTACH, "\\ooo send character by octal code"}, - {WHEN_EXPERT, "^I toggle tab expansion"}, - {WHEN_EXPERT, "+(-) do (not) drop line"}, }; /* list the commands we know for the user (ksb) diff --git a/conserver/client.h b/conserver/client.h index 705ea9b..62c53bb 100644 --- a/conserver/client.h +++ b/conserver/client.h @@ -1,5 +1,5 @@ /* - * $Id: client.h,v 5.42 2007/04/02 18:18:59 bryan Exp $ + * $Id: client.h,v 5.44 2013/09/23 22:58:21 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -51,7 +51,9 @@ typedef enum clientState { S_CEXEC, /* client execing a program */ S_REPLAY, /* set replay length for 'r' */ S_PLAYBACK, /* set replay length for 'p' */ - S_NOTE /* send a note to the logfile */ + S_NOTE, /* send a note to the logfile */ + S_TASK, /* invoke a task on the server side */ + S_CONFIRM /* confirm input */ } CLIENTSTATE; typedef struct client { /* Connection Information: */ @@ -87,6 +89,9 @@ typedef struct client { /* Connection Information: */ STRING *accmd; /* the command the user issued */ struct sockaddr_in cnct_port; /* where from */ + FLAG confirmed; /* confirm state */ + CLIENTSTATE cState; /* state needing confirmation */ + char cOption; /* option initiating the confirmation */ } CONSCLIENT; extern void Replay PARAMS((CONSENT *, CONSFILE *, unsigned short)); diff --git a/conserver/consent.c b/conserver/consent.c index ca3161d..4317b6e 100644 --- a/conserver/consent.c +++ b/conserver/consent.c @@ -1,5 +1,5 @@ /* - * $Id: consent.c,v 5.151 2007/04/09 15:52:28 bryan Exp $ + * $Id: consent.c,v 5.153 2013/09/26 17:32:54 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -459,7 +459,7 @@ StartInit(pCE) if (dup(pout[0]) != 0 || dup(pin[1]) != 1) { Error("[%s] StartInit(): fd sync error", pCE->server); - Bye(EX_OSERR); + exit(EX_OSERR); } close(pout[0]); close(pin[1]); @@ -480,10 +480,62 @@ StartInit(pCE) execve(apcArgv[0], apcArgv, environ); Error("[%s] execve(%s): %s", pCE->server, apcArgv[2], strerror(errno)); - Bye(EX_OSERR); + exit(EX_OSERR); return; } +/* We exit() here, so only call this in a child process before an exec() */ +void +#if PROTOTYPES +SetupTty(CONSENT *pCE, int fd) +#else +SetupTty(pCE, fd) + CONSENT *pCE; + int fd; +#endif +{ + struct termios n_tio; + +# if HAVE_STROPTS_H && !defined(_AIX) + /* SYSVr4 semantics for opening stream ptys (gregf) + * under PTX (others?) we have to push the compatibility + * streams modules `ptem', `ld', and `ttcompat' + */ + ioctl(1, I_PUSH, "ptem"); + ioctl(1, I_PUSH, "ldterm"); + ioctl(1, I_PUSH, "ttcompat"); +# endif + + if (0 != tcgetattr(1, &n_tio)) { + exit(EX_OSERR); + } + n_tio.c_iflag &= ~(IGNCR | IUCLC); + n_tio.c_iflag |= ICRNL; + if (pCE->ixon == FLAGTRUE) + n_tio.c_iflag |= IXON; + if (pCE->ixany == FLAGTRUE) + n_tio.c_iflag |= IXANY; + if (pCE->ixoff == FLAGTRUE) + n_tio.c_iflag |= IXOFF; + n_tio.c_oflag &= + ~(OLCUC | ONOCR | ONLRET | OFILL | NLDLY | CRDLY | TABDLY | BSDLY); + n_tio.c_oflag |= OPOST | ONLCR; + n_tio.c_lflag &= ~(XCASE | NOFLSH | ECHOK | ECHONL); + n_tio.c_lflag |= ISIG | ICANON | ECHO; + n_tio.c_cc[VEOF] = '\004'; + n_tio.c_cc[VEOL] = '\000'; + n_tio.c_cc[VERASE] = '\010'; + n_tio.c_cc[VINTR] = '\003'; + n_tio.c_cc[VKILL] = '@'; + /* MIN */ + n_tio.c_cc[VQUIT] = '\034'; + n_tio.c_cc[VSTART] = '\021'; + n_tio.c_cc[VSTOP] = '\023'; + n_tio.c_cc[VSUSP] = '\032'; + if (0 != tcsetattr(1, TCSANOW, &n_tio)) + exit(EX_OSERR); +} + /* setup a virtual device (ksb) */ static int @@ -494,7 +546,6 @@ VirtDev(pCE) CONSENT *pCE; #endif { - static struct termios n_tio; int i; pid_t iNewGrp; extern char **environ; @@ -558,7 +609,7 @@ VirtDev(pCE) if (dup(pCE->execSlaveFD) != 0 || dup(pCE->execSlaveFD) != 1) { Error("[%s] fd sync error", pCE->server); - Bye(EX_OSERR); + exit(EX_OSERR); } if (geteuid() == 0) { @@ -569,52 +620,8 @@ VirtDev(pCE) setuid(pCE->execuid); } } -# if HAVE_STROPTS_H && !defined(_AIX) - /* SYSVr4 semantics for opening stream ptys (gregf) - * under PTX (others?) we have to push the compatibility - * streams modules `ptem', `ld', and `ttcompat' - */ - CONDDEBUG((1, "VirtDev(): pushing ptemp onto pseudo-terminal")); - ioctl(0, I_PUSH, "ptem"); - CONDDEBUG((1, "VirtDev(): pushing ldterm onto pseudo-terminal")); - ioctl(0, I_PUSH, "ldterm"); - CONDDEBUG((1, "VirtDev(): pushing ttcompat onto pseudo-terminal")); - ioctl(0, I_PUSH, "ttcompat"); - CONDDEBUG((1, "VirtDev(): done pushing modules onto pseudo-terminal")); -# endif - if (0 != tcgetattr(0, &n_tio)) { - Error("[%s] tcgetattr(0): %s", pCE->server, strerror(errno)); - Bye(EX_OSERR); - } - n_tio.c_iflag &= ~(IGNCR | IUCLC); - n_tio.c_iflag |= ICRNL; - if (pCE->ixon == FLAGTRUE) - n_tio.c_iflag |= IXON; - if (pCE->ixany == FLAGTRUE) - n_tio.c_iflag |= IXANY; - if (pCE->ixoff == FLAGTRUE) - n_tio.c_iflag |= IXOFF; - n_tio.c_oflag &= - ~(OLCUC | ONOCR | ONLRET | OFILL | NLDLY | CRDLY | TABDLY | BSDLY); - n_tio.c_oflag |= OPOST | ONLCR; - n_tio.c_lflag &= ~(XCASE | NOFLSH | ECHOK | ECHONL); - n_tio.c_lflag |= ISIG | ICANON | ECHO; - n_tio.c_cc[VEOF] = '\004'; - n_tio.c_cc[VEOL] = '\000'; - n_tio.c_cc[VERASE] = '\010'; - n_tio.c_cc[VINTR] = '\003'; - n_tio.c_cc[VKILL] = '@'; - /* MIN */ - n_tio.c_cc[VQUIT] = '\034'; - n_tio.c_cc[VSTART] = '\021'; - n_tio.c_cc[VSTOP] = '\023'; - n_tio.c_cc[VSUSP] = '\032'; - if (0 != tcsetattr(0, TCSANOW, &n_tio)) { - Error("[%s] tcsetattr(0,TCSANOW): %s", pCE->server, - strerror(errno)); - Bye(EX_OSERR); - } + SetupTty(pCE, 0); tcsetpgrp(0, iNewGrp); @@ -647,7 +654,7 @@ VirtDev(pCE) execve(pcShell, ppcArgv, environ); Error("[%s] execve(): %s", pCE->server, strerror(errno)); - Bye(EX_OSERR); + exit(EX_OSERR); return -1; } diff --git a/conserver/consent.h b/conserver/consent.h index dec5f52..3f13e2c 100644 --- a/conserver/consent.h +++ b/conserver/consent.h @@ -1,5 +1,5 @@ /* - * $Id: consent.h,v 5.68 2007/04/02 17:59:16 bryan Exp $ + * $Id: consent.h,v 5.72 2013/09/26 17:32:55 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -122,11 +122,14 @@ typedef struct consent { /* console information */ unsigned short spinmax; /* initialization spin maximum */ unsigned short spintimer; /* initialization spin timer */ char *replstring; /* generic string for replacements */ + char *tasklist; /* list of valid tasks */ + char *breaklist; /* list of valid break sequences */ /* timestamp stuff */ int mark; /* Mark (chime) interval */ long nextMark; /* Next mark (chime) time */ FLAG activitylog; /* log attach/detach/bump */ FLAG breaklog; /* log breaks sent */ + FLAG tasklog; /* log tasks invoked */ /* options */ FLAG ondemand; /* bring up on-demand */ FLAG reinitoncc; /* open if down on client connect */ @@ -143,6 +146,8 @@ typedef struct consent { /* console information */ pid_t ipid; /* pid of virtual command */ pid_t initpid; /* pid of initcmd command */ CONSFILE *initfile; /* the command run on init */ + pid_t taskpid; /* pid of task running */ + CONSFILE *taskfile; /* the output from the task (read-only) */ STRING *wbuf; /* write() buffer */ int wbufIAC; /* next IAC location in wbuf */ IOSTATE ioState; /* state of the socket */ @@ -192,3 +197,4 @@ extern void DestroyRemoteConsole PARAMS((REMOTE *)); extern void StartInit PARAMS((CONSENT *)); extern void StopInit PARAMS((CONSENT *)); extern char *ConsState PARAMS((CONSENT *)); +extern void SetupTty PARAMS((CONSENT *, int)); diff --git a/conserver/conserver.man b/conserver/conserver.man index 28f69f7..26dd96b 100644 --- a/conserver/conserver.man +++ b/conserver/conserver.man @@ -1,6 +1,6 @@ .\" @(#)conserver.8 01/06/91 OSU CIS; Thomas A. Fine .\" $Id: conserver.man,v 1.54 2006/12/31 02:02:48 bryan Exp $ -.TH CONSERVER 8 "2006/12/31" "conserver-8.1.18" "conserver" +.TH CONSERVER 8 "2006/12/31" "conserver-8.1.19" "conserver" .SH NAME conserver \- console server daemon .SH SYNOPSIS diff --git a/conserver/cutil.c b/conserver/cutil.c index 7a51aee..ef8827f 100644 --- a/conserver/cutil.c +++ b/conserver/cutil.c @@ -1,5 +1,5 @@ /* - * $Id: cutil.c,v 1.134 2010/11/02 03:42:57 bryan Exp $ + * $Id: cutil.c,v 1.138 2013/09/26 17:50:24 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -1397,7 +1397,8 @@ FileCanRead(cfp, prfd, pwfd) return ((FD_ISSET(cfp->fd, prfd) #if HAVE_OPENSSL - && cfp->waitForRead != FLAGTRUE) || (FD_ISSET(fdout, pwfd) + && cfp->waitForRead != FLAGTRUE) || (fdout >= 0 && + FD_ISSET(fdout, pwfd) && cfp->waitForWrite == FLAGTRUE #endif diff --git a/conserver/group.c b/conserver/group.c index e5d396f..66d734d 100644 --- a/conserver/group.c +++ b/conserver/group.c @@ -1,5 +1,5 @@ /* - * $Id: group.c,v 5.332 2009/09/26 09:58:05 bryan Exp $ + * $Id: group.c,v 5.344 2013/09/26 17:50:24 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -207,6 +207,28 @@ AbortAnyClientExec(pCL) } } +static int +#if PROTOTYPES +StopTask(CONSENT *pCE) +#else +StopTask(pCE) + CONSENT *pCE; +#endif +{ + if (pCE->taskpid != 0) { + kill(pCE->taskpid, SIGHUP); + CONDDEBUG((1, "StopTask(): sending task pid %lu signal %d", + (unsigned long)pCE->taskpid, SIGHUP)); + } + + if (pCE->taskfile != (CONSFILE *)0) { + int taskfile = FileFDNum(pCE->taskfile); + FD_CLR(taskfile, &rinit); + FileClose(&pCE->taskfile); + pCE->taskfile = (CONSFILE *)0; + } +} + void #if PROTOTYPES ClientWantsWrite(CONSCLIENT *pCL) @@ -614,6 +636,7 @@ DestroyConsent(pGE, pCE) pGE->pCLfree = pCL; } + StopTask(pCE); ConsDown(pCE, FLAGFALSE, FLAGTRUE); for (ppCE = &(pGE->pCElist); *ppCE != (CONSENT *)0; @@ -653,6 +676,10 @@ DestroyConsent(pGE, pCE) free(pCE->idlestring); if (pCE->replstring != (char *)0) free(pCE->replstring); + if (pCE->tasklist != (char *)0) + free(pCE->tasklist); + if (pCE->breaklist != (char *)0) + free(pCE->breaklist); if (pCE->execSlave != (char *)0) free(pCE->execSlave); while (pCE->aliases != (NAMES *)0) { @@ -780,14 +807,20 @@ QuietConv(num_msg, msg, resp, appdata_ptr) */ int #if PROTOTYPES -CheckPass(char *pcUser, char *pcWord) +CheckPass(char *pcUser, char *pcWord, FLAG empty_check) #else -CheckPass(pcUser, pcWord) +CheckPass(pcUser, pcWord, empty_check) char *pcUser; char *pcWord; + FLAG empty_check; #endif { + if (pcWord == (char *)0) { + pcWord = ""; + } #if HAVE_PAM + if (empty_check == FLAGTRUE) + return AUTH_INVALID; int pam_error; char *appdata[2]; static pam_handle_t *pamh = (pam_handle_t *)0; @@ -839,9 +872,6 @@ CheckPass(pcUser, pcWord) struct spwd *spwd; #endif - if (pcWord == (char *)0) { - pcWord = ""; - } if ((pwd = getpwnam(pcUser)) == (struct passwd *)0) { CONDDEBUG((1, "CheckPass(): getpwnam(%s): %s", pcUser, strerror(errno))); @@ -1381,7 +1411,7 @@ WriteLog(pCE, s, len) { int i = 0; int j; - STRING *buf = (STRING *)0; + static STRING *buf = (STRING *)0; if ((CONSFILE *)0 == pCE->fdlog) { return; @@ -1552,6 +1582,46 @@ ReapVirt(pGE) StopInit(pCE); break; } + if (pid == pCE->taskpid) { + CONSCLIENT *pCL; + if (WIFEXITED(UWbuf)) { + Msg("[%s] task terminated: pid %lu: exit(%d)", + pCE->server, pid, WEXITSTATUS(UWbuf)); + if (pCE->tasklog == FLAGTRUE) + TagLogfile(pCE, + "task terminated: pid %lu: exit(%d)", + pid, WEXITSTATUS(UWbuf)); + /* tell all how it ended */ + for (pCL = pCE->pCLon; (CONSCLIENT *)0 != pCL; + pCL = pCL->pCLnext) { + if (pCL->fcon) { + FilePrint(pCL->fd, FLAGFALSE, + "[task terminated: exit(%d)]\r\n", + WEXITSTATUS(UWbuf)); + } + } + } + if (WIFSIGNALED(UWbuf)) { + Msg("[%s] task terminated: pid %lu: signal(%d)", + pCE->server, pid, WTERMSIG(UWbuf)); + if (pCE->tasklog == FLAGTRUE) + TagLogfile(pCE, + "task terminated: pid %lu: signal(%d)", + pid, WTERMSIG(UWbuf)); + /* tell all how it ended */ + for (pCL = pCE->pCLon; (CONSCLIENT *)0 != pCL; + pCL = pCL->pCLnext) { + if (pCL->fcon) { + FilePrint(pCL->fd, FLAGFALSE, + "[task terminated: signal(%d)]\r\n", + WTERMSIG(UWbuf)); + } + } + } + pCE->taskpid = 0; + StopTask(pCE); + break; + } if (pid != pCE->ipid) continue; @@ -1580,11 +1650,12 @@ ReapVirt(pGE) int #if PROTOTYPES -CheckPasswd(CONSCLIENT *pCL, char *pw_string) +CheckPasswd(CONSCLIENT *pCL, char *pw_string, FLAG empty_check) #else -CheckPasswd(pCL, pw_string) +CheckPasswd(pCL, pw_string, empty_check) CONSCLIENT *pCL; char *pw_string; + FLAG empty_check; #endif { FILE *fp; @@ -1592,7 +1663,8 @@ CheckPasswd(pCL, pw_string) char *this_pw, *user; if ((fp = fopen(config->passwdfile, "r")) == (FILE *)0) { - if (CheckPass(pCL->username->string, pw_string) == AUTH_SUCCESS) { + if (CheckPass(pCL->username->string, pw_string, empty_check) == + AUTH_SUCCESS) { Verbose("user %s authenticated", pCL->acid->string); return AUTH_SUCCESS; } @@ -1631,8 +1703,8 @@ CheckPasswd(pCL, pw_string) if ((*this_pw == '\000' && *pw_string == '\000') || ((strcmp(this_pw, "*passwd*") == - 0) ? (CheckPass(pCL->username->string, - pw_string) == + 0) ? (CheckPass(pCL->username->string, pw_string, + empty_check) == AUTH_SUCCESS) : (strcmp(this_pw, crypt(pw_string, this_pw)) == 0))) { @@ -1835,6 +1907,8 @@ SendBreak(pCLServing, pCEServing, bt) short bt; #endif { + CONSCLIENT *pCL; + short waszero = 0; if (bt < 0 || bt > 9) { FileWrite(pCLServing->fd, FLAGFALSE, "aborted]\r\n", -1); @@ -1849,9 +1923,41 @@ SendBreak(pCLServing, pCEServing, bt) return; } + if (breakList[bt - 1].confirm == FLAGTRUE) { + switch (pCLServing->confirmed) { + case FLAGUNKNOWN: + FileWrite(pCLServing->fd, FLAGFALSE, "confirm? [y/N] ", + -1); + pCLServing->confirmed = FLAGFALSE; + pCLServing->cState = S_HALT1; + pCLServing->iState = S_CONFIRM; + pCLServing->cOption = '0' + bt; + return; + case FLAGFALSE: + FileWrite(pCLServing->fd, FLAGFALSE, "aborted]\r\n", -1); + pCLServing->confirmed = FLAGUNKNOWN; + return; + case FLAGTRUE: + pCLServing->confirmed = FLAGUNKNOWN; + } + } + + ExpandString(breakList[bt - 1].seq->string, pCEServing, bt); FileWrite(pCLServing->fd, FLAGFALSE, "sent]\r\n", -1); + + /* tell all who sent it */ + for (pCL = pCEServing->pCLon; (CONSCLIENT *)0 != pCL; + pCL = pCL->pCLnext) { + if (pCL == pCLServing) + continue; + if (pCL->fcon) { + FilePrint(pCL->fd, FLAGFALSE, "[break sent by %s]\r\n", + pCLServing->acid->string); + } + } + if (pCEServing->breaklog == FLAGTRUE) { if (waszero) { TagLogfile(pCEServing, "break #0(%d) sent -- `%s'", bt, @@ -1863,6 +1969,205 @@ SendBreak(pCLServing, pCEServing, bt) } } +static int +#if PROTOTYPES +StartTask(CONSENT *pCE, char *cmd, uid_t uid, gid_t gid) +#else +StartTask(pCE, cmd, uid, gid) + CONSENT *pCE; + char *cmd; + uid_t uid; + gid_t gid; +#endif +{ + int i; + extern char **environ; + char *pcShell, **ppcArgv; + extern int FallBack PARAMS((char **, int *)); + char *execSlave; /* pseudo-device slave side */ + int execSlaveFD; /* fd of slave side */ + int cofile; + + if ((cofile = FallBack(&execSlave, &execSlaveFD)) == -1) { + Error("[%s] StartTask(): failed to allocate pseudo-tty: %s", + pCE->server, strerror(errno)); + return -1; + } + if (execSlave != (char *)0) + free(execSlave); + + fflush(stdout); + fflush(stderr); + + switch (pCE->taskpid = fork()) { + case -1: + pCE->taskpid = 0; + return -1; + case 0: + break; + default: /* server */ + close(execSlaveFD); + if ((pCE->taskfile = + FileOpenFD(cofile, simpleFile)) == (CONSFILE *)0) { + close(cofile); + Error("[%s] FileOpenFD(%d,simpleFile) failed", pCE->server, + cofile); + return -1; + } + Msg("[%s] task started: pid %lu", pCE->server, + (unsigned long)pCE->taskpid); + FD_SET(cofile, &rinit); + if (maxfd < cofile + 1) + maxfd = cofile + 1; + fflush(stderr); + return 0; + } + + close(cofile); + +#if HAVE_SETSID + setsid(); +#else + tcsetpgrp(0, getpid()); +#endif + + close(1); + if (dup(execSlaveFD) != 1) { + Error("[%s] StartTask(): fd 1 sync error", pCE->server); + exit(EX_OSERR); + } + close(2); + if (dup(execSlaveFD) != 2) { + exit(EX_OSERR); + } + /* no stdin */ + close(0); + close(execSlaveFD); + + /* setup new process with clean file descriptors + */ + i = GetMaxFiles(); + for ( /* i above */ ; --i > 2;) { + close(i); + } + + if (geteuid() == 0) { + if (gid != 0) + setgid(gid); + if (uid != 0) + setuid(uid); + } + + SetupTty(pCE, 1); + + pcShell = "/bin/sh"; + static char *apcArgv[] = { + "/bin/sh", "-ce", (char *)0, (char *)0 + }; + + apcArgv[2] = cmd; + ppcArgv = apcArgv; + + execve(pcShell, ppcArgv, environ); + Error("[%s] execve(): %s", pCE->server, strerror(errno)); + exit(EX_OSERR); + return -1; +} + +void +#if PROTOTYPES +InvokeTask(CONSCLIENT *pCLServing, CONSENT *pCEServing, char id) +#else +InvokeTask(pCLServing, pCEServing, id) + CONSCLIENT *pCLServing; + CONSENT *pCEServing; + char id; +#endif +{ + TASKS *t = (TASKS *)0; + int ret; + char *cmd; + + if ((id < '0' || id > '9') && (id < 'a' || id > 'z')) { + FileWrite(pCLServing->fd, FLAGFALSE, "aborted]\r\n", -1); + return; + } + + if (pCEServing->taskpid != 0) { + FileWrite(pCLServing->fd, FLAGFALSE, "aborted - task running]\r\n", + -1); + return; + } + + if ((char *)0 != strchr(pCEServing->tasklist, id) || + (char *)0 != strchr(pCEServing->tasklist, '*')) { + for (t = taskList; t != (TASKS *)0; t = t->next) { + if (t->id == id) + break; + } + } + + if (t == (TASKS *)0) { + FileWrite(pCLServing->fd, FLAGFALSE, "undefined]\r\n", -1); + return; + } + + if (t->confirm == FLAGTRUE) { + switch (pCLServing->confirmed) { + case FLAGUNKNOWN: + FileWrite(pCLServing->fd, FLAGFALSE, "confirm? [y/N] ", + -1); + pCLServing->confirmed = FLAGFALSE; + pCLServing->cState = S_TASK; + pCLServing->iState = S_CONFIRM; + pCLServing->cOption = id; + return; + case FLAGFALSE: + FileWrite(pCLServing->fd, FLAGFALSE, "aborted]\r\n", -1); + pCLServing->confirmed = FLAGUNKNOWN; + return; + case FLAGTRUE: + pCLServing->confirmed = FLAGUNKNOWN; + } + } + + if ((cmd = StrDup(t->cmd->string)) == (char *)0) + OutOfMem(); + + if (t->subst != (char *)0) { + substData->data = (void *)pCEServing; + ProcessSubst(substData, &cmd, (char **)0, (char *)0, t->subst); + } + + if (StartTask(pCEServing, cmd, t->uid, t->gid) == 0) { + CONSCLIENT *pCL; + char *detail; + + FilePrint(pCLServing->fd, FLAGFALSE, "`%c' started]\r\n", id); + detail = t->descr->used > 1 ? t->descr->string : cmd; + + /* tell all who started it */ + for (pCL = pCEServing->pCLon; (CONSCLIENT *)0 != pCL; + pCL = pCL->pCLnext) { + if (pCL == pCLServing) + continue; + if (pCL->fcon) { + FilePrint(pCL->fd, FLAGFALSE, + "[task `%s' started by %s]\r\n", detail, + pCLServing->acid->string); + } + } + + if (pCEServing->tasklog == FLAGTRUE) { + TagLogfile(pCEServing, "task started: pid %lu -- `%s'", + pCEServing->taskpid, cmd); + } + } else { + FileWrite(pCLServing->fd, FLAGFALSE, "failure]\r\n", -1); + } + free(cmd); +} + #if HAVE_OPENSSL int #if PROTOTYPES @@ -2317,8 +2622,8 @@ CommandHosts(pGE, pCLServing, pCEServing, tyme, args) pCE->ioState == ISNORMAL) ? (pCE->initfile == (CONSFILE *) 0 ? "up" : "init") : "down", - pCE->pCLwr ? pCE->pCLwr->acid-> - string : pCE->pCLon ? "" : ""); + pCE->pCLwr ? pCE->pCLwr->acid->string : pCE-> + pCLon ? "" : ""); if (args != (char *)0) break; } @@ -2404,7 +2709,7 @@ CommandInfo(pGE, pCLServing, pCEServing, tyme, args) } FilePrint(pCLServing->fd, FLAGTRUE, - ":%s:%s:%s,%s,%s,%s,%d,%d:%d:%s:", + ":%s:%s:%s,%s,%s,%s,%s,%d,%d:%d:%s:", ((pCE->fup && pCE->ioState == ISNORMAL) ? (pCE->initfile == (CONSFILE *)0 ? "up" : @@ -2413,9 +2718,10 @@ CommandInfo(pGE, pCLServing, pCEServing, tyme, args) (pCE->logfile == (char *)0 ? "" : pCE->logfile), (pCE->nolog ? "nolog" : "log"), (pCE->activitylog == FLAGTRUE ? "act" : "noact"), - (pCE->breaklog == FLAGTRUE ? "brk" : "nobrk"), pCE->mark, - (pCE->fdlog ? pCE->fdlog->fd : -1), pCE->breakNum, - (pCE->autoReUp ? "autoup" : "noautoup")); + (pCE->breaklog == FLAGTRUE ? "brk" : "nobrk"), + (pCE->tasklog == FLAGTRUE ? "task" : "notask"), + pCE->mark, (pCE->fdlog ? pCE->fdlog->fd : -1), + pCE->breakNum, (pCE->autoReUp ? "autoup" : "noautoup")); if (pCE->aliases != (NAMES *)0) { NAMES *n; comma = 0; @@ -2806,6 +3112,41 @@ DoConsoleRead(pCEServing) } } +void +#if PROTOTYPES +DoTaskRead(CONSENT *pCEServing) +#else +DoTaskRead(pCEServing) + CONSENT *pCEServing; +#endif +{ + unsigned char acInOrig[BUFSIZ]; + int nr, i, fd; + CONSCLIENT *pCL; + + if (pCEServing->taskfile == (CONSFILE *)0) + return; + + fd = FileFDNum(pCEServing->taskfile); + + /* read from task */ + if ((nr = + FileRead(pCEServing->taskfile, acInOrig, sizeof(acInOrig))) < 0) { + CONDDEBUG((1, "DoTaskRead(): got %d bytes from fd %d", nr, fd)); + StopTask(pCEServing); + return; + } + CONDDEBUG((1, "DoTaskRead(): read %d bytes from fd %d", nr, fd)); + + /* write console info to clients (not suspended) + */ + for (pCL = pCEServing->pCLon; (CONSCLIENT *)0 != pCL; + pCL = pCL->pCLnext) { + if (pCL->fcon) + FileWrite(pCL->fd, FLAGFALSE, (char *)acInOrig, nr); + } +} + void #if PROTOTYPES DoCommandRead(CONSENT *pCEServing) @@ -3045,7 +3386,8 @@ DoClientRead(pGE, pCLServing) /* process password here...before we corrupt accmd */ if (pCLServing->iState == S_PASSWD) { - if (CheckPasswd(pCLServing, pCLServing->accmd->string) + if (CheckPasswd + (pCLServing, pCLServing->accmd->string, FLAGFALSE) != AUTH_SUCCESS) { FileWrite(pCLServing->fd, FLAGFALSE, "invalid password\r\n", -1); @@ -3150,8 +3492,8 @@ DoClientRead(pGE, pCLServing) BuildString(pCLServing->peername->string, pCLServing->acid); if (pCLServing->caccess == 't' || - CheckPasswd(pCLServing, - "") == AUTH_SUCCESS) { + CheckPasswd(pCLServing, "", + FLAGTRUE) == AUTH_SUCCESS) { pCLServing->iState = S_NORMAL; Verbose(" login %s", pCLServing->acid->string); @@ -3348,9 +3690,8 @@ DoClientRead(pGE, pCLServing) pcArgs, pCLServing->acid->string); num = DisconnectCertainClients(pGE, - pCLServing-> - acid->string, - pcArgs); + pCLServing->acid-> + string, pcArgs); /* client expects this string to be formatted * in this way only. */ @@ -3369,6 +3710,7 @@ DoClientRead(pGE, pCLServing) } BuildString((char *)0, pCLServing->accmd); } else + statestart: switch (pCLServing->iState) { case S_IDENT: case S_PASSWD: @@ -3564,7 +3906,12 @@ DoClientRead(pGE, pCLServing) FileWrite(pCLServing->fd, FLAGFALSE, "list]\r\n", -1); i = pCEServing->breakNum; - if (i == 0 || breakList[i - 1].seq->used <= 1) + if (i == 0 || breakList[i - 1].seq->used <= 1 + || pCEServing->breaklist == (char *)0 || + ((char *)0 == + strchr(pCEServing->breaklist, '1' + i) + && (char *)0 == + strchr(pCEServing->breaklist, '*'))) FileWrite(pCLServing->fd, FLAGTRUE, " 0 - 0ms, \r\n", -1); @@ -3577,15 +3924,24 @@ DoClientRead(pGE, pCLServing) breakList[i - 1].delay, acA1->string); } - for (i = 0; i < 9; i++) { - if (breakList[i].seq->used > 1) { - FmtCtlStr(breakList[i].seq->string, - breakList[i].seq->used - 1, - acA1); - FilePrint(pCLServing->fd, FLAGTRUE, - " %d - %3dms, `%s'\r\n", - i + 1, breakList[i].delay, - acA1->string); + if (pCEServing->breaklist != (char *)0) { + for (i = 0; i < 9; i++) { + if ((char *)0 == + strchr(pCEServing->breaklist, + '1' + i) + && (char *)0 == + strchr(pCEServing->breaklist, '*')) + continue; + if (breakList[i].seq->used > 1) { + FmtCtlStr(breakList[i].seq->string, + breakList[i].seq->used - + 1, acA1); + FilePrint(pCLServing->fd, FLAGTRUE, + " %d - %3dms, `%s'\r\n", + i + 1, + breakList[i].delay, + acA1->string); + } } } FileWrite(pCLServing->fd, FLAGFALSE, (char *)0, @@ -3600,6 +3956,94 @@ DoClientRead(pGE, pCLServing) } continue; + case S_TASK: /* task invocation */ + pCLServing->iState = S_NORMAL; + if (pCEServing->taskpid != 0 && acIn[i] == '.') { + FileWrite(pCLServing->fd, FLAGFALSE, + "terminate]\r\n", -1); + StopTask(pCEServing); + continue; + } + if (acIn[i] != '?' && + ((acIn[i] < '0' || acIn[i] > '9') && + (acIn[i] < 'a' || acIn[i] > 'z'))) { + FileWrite(pCLServing->fd, FLAGFALSE, + "aborted]\r\n", -1); + continue; + } + + if (acIn[i] == '?') { + TASKS *t; + int saw = 0; + if (pCEServing->taskpid != 0) { + STRING *acA1 = AllocString(); + STRING *acA2 = AllocString(); + FilePrint(pCLServing->fd, FLAGFALSE, + "running - pid %lu - use `%s%s!.' to terminate]\r\n", + (unsigned long)pGE->pid, + FmtCtl(pCLServing->ic[0], acA1), + FmtCtl(pCLServing->ic[1], acA2)); + DestroyString(acA1); + DestroyString(acA2); + return; + } else { + FileWrite(pCLServing->fd, FLAGFALSE, + "list]\r\n", -1); + if (pCEServing->tasklist != (char *)0) { + for (t = taskList; t != (TASKS *)0; + t = t->next) { + if ((char *)0 == + strchr(pCEServing->tasklist, + t->id) + && (char *)0 == + strchr(pCEServing->tasklist, + '*')) + continue; + + if (t->descr->used > 1) { + FilePrint(pCLServing->fd, + FLAGTRUE, + " %c - `%s'\r\n", + t->id, + t->descr->string); + } else if (t->cmd->used > 1) { + FilePrint(pCLServing->fd, + FLAGTRUE, + " %c - `%s'\r\n", + t->id, + t->cmd->string); + } + saw++; + } + } + if (saw == 0) + FileWrite(pCLServing->fd, FLAGTRUE, + " \r\n", -1); + FileWrite(pCLServing->fd, FLAGFALSE, + (char *)0, 0); + } + } else { + if (pCLServing->fwr) { + InvokeTask(pCLServing, pCEServing, + acIn[i]); + } else + FileWrite(pCLServing->fd, FLAGFALSE, + "attach to invoke task]\r\n", + -1); + } + continue; + + case S_CONFIRM: + if (acIn[i] == 'y' || acIn[i] == 'Y') { + pCLServing->confirmed = FLAGTRUE; + FileWrite(pCLServing->fd, FLAGFALSE, "y ", -1); + } else { + FileWrite(pCLServing->fd, FLAGFALSE, "n ", -1); + } + pCLServing->iState = pCLServing->cState; + acIn[i] = pCLServing->cOption; + goto statestart; + case S_CATTN: /* redef escape sequence? */ pCLServing->ic[0] = acInOrig[i]; FmtCtl(acInOrig[i], acA1); @@ -3688,16 +4132,6 @@ DoClientRead(pGE, pCLServing) pCLServing->fcon = 1; } break; - case '+': - case '-': - if (0 != - (pCLServing->fecho = '+' == acIn[i])) - FileWrite(pCLServing->fd, FLAGFALSE, - "drop line]\r\n", -1); - else - FileWrite(pCLServing->fd, FLAGFALSE, - "no drop line]\r\n", -1); - break; case 'a': /* attach */ CommandAttach(pGE, pCLServing, pCEServing, @@ -3712,11 +4146,17 @@ DoClientRead(pGE, pCLServing) break; case 'c': + if (!pCLServing->fwr) { + goto unknownchar; + } CommandChangeFlow(pGE, pCLServing, pCEServing, tyme); break; case 'd': /* down a console */ + if (!pCLServing->fwr) { + goto unknownchar; + } CommandDown(pGE, pCLServing, pCEServing, tyme); break; @@ -3753,11 +4193,17 @@ DoClientRead(pGE, pCLServing) break; case 'L': + if (!pCLServing->fwr) { + goto unknownchar; + } CommandLogging(pGE, pCLServing, pCEServing, tyme); break; case 'l': /* halt character 1 */ + if (!pCLServing->fwr) { + goto unknownchar; + } if (pCEServing->fronly) { FileWrite(pCLServing->fd, FLAGFALSE, "can't halt read-only console]\r\n", @@ -3835,12 +4281,10 @@ DoClientRead(pGE, pCLServing) break; case 's': /* spy mode */ - pCLServing->fwantwr = 0; if (!pCLServing->fwr) { - FileWrite(pCLServing->fd, FLAGFALSE, - "ok]\r\n", -1); - break; + goto unknownchar; } + pCLServing->fwantwr = 0; BumpClient(pCEServing, (char *)0); TagLogfileAct(pCEServing, "%s detached", pCLServing->acid->string); @@ -3894,23 +4338,27 @@ DoClientRead(pGE, pCLServing) BumpClient(pCEServing, (char *)0); TagLogfileAct(pCEServing, "%s detached", - pCLServing-> - acid->string); + pCLServing->acid-> + string); FindWrite(pCEServing); } break; - case '|': /* wait for client */ - if (ConsentUserOk - (pLUList, - pCLServing->username->string) == 1) - goto unknownchar; + case '!': /* invoke a task */ if (!pCLServing->fwr) { - FileWrite(pCLServing->fd, FLAGFALSE, - "attach to run local command]\r\n", - -1); - continue; + goto unknownchar; } + pCLServing->iState = S_TASK; + FileWrite(pCLServing->fd, FLAGFALSE, + "task ", -1); + break; + + case '|': /* wait for client */ + if (!pCLServing->fwr || + ConsentUserOk(pLUList, + pCLServing->username-> + string) == 1) + goto unknownchar; FileSetQuoteIAC(pCLServing->fd, FLAGFALSE); FilePrint(pCLServing->fd, FLAGFALSE, "%c%c", OB_IAC, OB_EXEC); @@ -3919,50 +4367,6 @@ DoClientRead(pGE, pCLServing) pCLServing->iState = S_CWAIT; break; - case '\t': /* toggle tab expand */ - if (!pCLServing->fwr) { - FileWrite(pCLServing->fd, FLAGFALSE, - "attach to toggle tabs]\r\n", - -1); - continue; - } - if (pCEServing->type != DEVICE && - pCEServing->type != EXEC) { - FileWrite(pCLServing->fd, FLAGFALSE, - "ok]\r\n", -1); - continue; - } - if (-1 == - tcgetattr(FileFDNum - (pCEServing->cofile), - &sbuf)) { - FileWrite(pCLServing->fd, FLAGFALSE, - "failed]\r\n", -1); - continue; - } - if (TAB3 == (TABDLY & sbuf.c_oflag)) { - sbuf.c_oflag &= ~TABDLY; - sbuf.c_oflag |= TAB0; - } else { - sbuf.c_oflag &= ~TABDLY; - sbuf.c_oflag |= TAB3; - } - if (-1 == - tcsetattr(FileFDNum - (pCEServing->cofile), - TCSANOW, &sbuf)) { - FileWrite(pCLServing->fd, FLAGFALSE, - "failed]\r\n", -1); - continue; - } - if (TAB3 == (TABDLY & sbuf.c_oflag)) - FileWrite(pCLServing->fd, FLAGFALSE, - "tabs OFF]\r\n", -1); - else - FileWrite(pCLServing->fd, FLAGFALSE, - "tabs ON]\r\n", -1); - break; - case '.': /* disconnect */ case '\004': case '\003': @@ -4672,6 +5076,8 @@ Kiddie(pGE, sfd) DoConsoleRead(pCEServing); if (FileCanRead(pCEServing->initfile, &rmask, &wmask)) DoCommandRead(pCEServing); + if (FileCanRead(pCEServing->taskfile, &rmask, &wmask)) + DoTaskRead(pCEServing); /* fall through to ISFLUSHING for buffered data */ case ISFLUSHING: /* write cofile data */ diff --git a/conserver/group.h b/conserver/group.h index 3bda519..989e3d2 100644 --- a/conserver/group.h +++ b/conserver/group.h @@ -1,5 +1,5 @@ /* - * $Id: group.h,v 5.49 2006/04/07 15:36:09 bryan Exp $ + * $Id: group.h,v 5.51 2013/09/23 23:17:42 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -65,7 +65,7 @@ typedef struct grpent { /* group info */ extern time_t timers[]; extern void Spawn PARAMS((GRPENT *, int)); -extern int CheckPass PARAMS((char *, char *)); +extern int CheckPass PARAMS((char *, char *, FLAG)); extern void TagLogfile PARAMS((const CONSENT *, char *, ...)); extern void TagLogfileAct PARAMS((const CONSENT *, char *, ...)); extern void DestroyGroup PARAMS((GRPENT *)); @@ -79,7 +79,7 @@ extern void DisconnectClient PARAMS((GRPENT *, CONSCLIENT *, char *, FLAG)); extern int ClientAccess PARAMS((CONSENT *, char *)); extern void DestroyClient PARAMS((CONSCLIENT *)); -extern int CheckPasswd PARAMS((CONSCLIENT *, char *)); +extern int CheckPasswd PARAMS((CONSCLIENT *, char *, FLAG)); extern void DeUtmp PARAMS((GRPENT *, int)); extern void ClientWantsWrite PARAMS((CONSCLIENT *)); extern void SendIWaitClientsMsg PARAMS((CONSENT *, char *)); diff --git a/conserver/main.c b/conserver/main.c index 50cdf41..95001d7 100644 --- a/conserver/main.c +++ b/conserver/main.c @@ -1,5 +1,5 @@ /* - * $Id: main.c,v 5.202 2009/09/26 09:23:04 bryan Exp $ + * $Id: main.c,v 5.208 2013/09/25 22:10:29 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -69,7 +69,7 @@ CONFIG defConfig = , FLAGFALSE #endif #if HAVE_OPENSSL - , (char *)0, FLAGTRUE + , (char *)0, FLAGTRUE, FLAGFALSE, (char *)0 #endif }; @@ -327,6 +327,7 @@ SetupSSL() { if (ctx == (SSL_CTX *)0) { char *ciphers; + int verifymode; SSL_load_error_strings(); if (!SSL_library_init()) { Error("SetupSSL(): SSL_library_init() failed"); @@ -360,7 +361,31 @@ SetupSSL() } else { ciphers = "ALL:!LOW:!EXP:!MD5:@STRENGTH"; } - SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, SSLVerifyCallback); + if (config->sslcacertificatefile != (char *)0) { + STACK_OF(X509_NAME) * cert_names; + + cert_names = + SSL_load_client_CA_file(config->sslcacertificatefile); + if (cert_names != NULL) { + SSL_CTX_set_client_CA_list(ctx, cert_names); + if (SSL_CTX_load_verify_locations + (ctx, config->sslcacertificatefile, NULL) != 1) { + Error("Could not setup CA certificate file to '%s'", + config->sslcacertificatefile); + Bye(EX_UNAVAILABLE); + } + } else { + Error + ("SetupSSL(): could not load SSL client CA list from `%s'", + config->sslcacertificatefile); + Bye(EX_SOFTWARE); + } + } + + verifymode = SSL_VERIFY_PEER; + if (config->sslreqclientcert == FLAGTRUE) + verifymode |= SSL_VERIFY_FAIL_IF_NO_PEER_CERT; + SSL_CTX_set_verify(ctx, verifymode, SSLVerifyCallback); SSL_CTX_set_options(ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_SINGLE_DH_USE); @@ -765,6 +790,7 @@ DestroyDataStructures() free(myAddrs); DestroyBreakList(); + DestroyTaskList(); DestroyStrings(); DestroyUserList(); if (substData != (SUBST *)0) @@ -824,12 +850,18 @@ SummarizeDataStructures() size += strlen(pCE->idlestring); if (pCE->replstring != (char *)0) size += strlen(pCE->replstring); + if (pCE->tasklist != (char *)0) + size += strlen(pCE->tasklist); + if (pCE->breaklist != (char *)0) + size += strlen(pCE->breaklist); if (pCE->fdlog != (CONSFILE *)0) size += sizeof(CONSFILE); if (pCE->cofile != (CONSFILE *)0) size += sizeof(CONSFILE); if (pCE->initfile != (CONSFILE *)0) size += sizeof(CONSFILE); + if (pCE->taskfile != (CONSFILE *)0) + size += sizeof(CONSFILE); if (pCE->aliases != (NAMES *)0) { NAMES *n; for (n = pCE->aliases; n != (NAMES *)0; n = n->next) { @@ -902,6 +934,8 @@ DumpDataStructures() GRPENT *pGE; CONSENT *pCE; REMOTE *pRC; + int i; + TASKS *t; #if HAVE_DMALLOC && DMALLOC_MARK_MAIN CONDDEBUG((1, "DumpDataStructures(): dmalloc / MarkMain")); @@ -992,9 +1026,9 @@ DumpDataStructures() pCE->nolog, FileFDNum(pCE->cofile), FLAGSTR(pCE->activitylog), FLAGSTR(pCE->breaklog))); CONDDEBUG((1, - "DumpDataStructures(): ixon=%s, ixany=%s, ixoff=%s", - FLAGSTR(pCE->ixon), FLAGSTR(pCE->ixany), - FLAGSTR(pCE->ixoff))); + "DumpDataStructures(): tasklog=%s, ixon=%s, ixany=%s, ixoff=%s", + FLAGSTR(pCE->tasklog), FLAGSTR(pCE->ixon), + FLAGSTR(pCE->ixany), FLAGSTR(pCE->ixoff))); CONDDEBUG((1, "DumpDataStructures(): autoreinit=%s, hupcl=%s, cstopb=%s, ondemand=%s", FLAGSTR(pCE->autoreinit), FLAGSTR(pCE->hupcl), @@ -1019,6 +1053,11 @@ DumpDataStructures() EMPTYSTR(pCE->motd), pCE->idletimeout, EMPTYSTR(pCE->idlestring), EMPTYSTR(pCE->replstring))); + CONDDEBUG((1, + "DumpDataStructures(): tasklist=%s, breaklist=%s, taskpid=%lu, taskfile=%d", + EMPTYSTR(pCE->tasklist), EMPTYSTR(pCE->breaklist), + (unsigned long)pCE->taskpid, + FileFDNum(pCE->taskfile))); if (pCE->ro) { CONSENTUSERS *u; for (u = pCE->ro; u != (CONSENTUSERS *)0; u = u->next) { @@ -1046,6 +1085,19 @@ DumpDataStructures() } } } + for (i = 0; i < 9; i++) { + CONDDEBUG((1, + "DumpDataStructures(): break: string=%s, delay=%d, confirm=%s", + EMPTYSTR(breakList[i].seq->string), breakList[i].delay, + FLAGSTR(breakList[i].confirm))); + } + for (t = taskList; t != (TASKS *)0; t = t->next) { + CONDDEBUG((1, + "DumpDataStructures(): task: id=%c, cmd=%s, descr=%s, uid=%d, gid=%d, subst=%s, confirm=%s", + t->id, EMPTYSTR(t->cmd->string), + EMPTYSTR(t->descr->string), t->uid, t->gid, + EMPTYSTR(t->subst), FLAGSTR(t->confirm))); + } } /* This makes sure a directory exists and tries to create it if it @@ -1568,12 +1620,29 @@ main(argc, argv) else config->sslrequired = defConfig.sslrequired; + if (optConf->sslreqclientcert != FLAGUNKNOWN) + config->sslreqclientcert = optConf->sslreqclientcert; + else if (pConfig->sslreqclientcert != FLAGUNKNOWN) + config->sslreqclientcert = pConfig->sslreqclientcert; + else + config->sslreqclientcert = defConfig.sslreqclientcert; + if (optConf->sslcredentials != (char *)0) config->sslcredentials = StrDup(optConf->sslcredentials); else if (pConfig->sslcredentials != (char *)0) config->sslcredentials = StrDup(pConfig->sslcredentials); else config->sslcredentials = StrDup(defConfig.sslcredentials); + + if (optConf->sslcacertificatefile != (char *)0) + config->sslcacertificatefile = + StrDup(optConf->sslcacertificatefile); + else if (pConfig->sslcacertificatefile != (char *)0) + config->sslcacertificatefile = + StrDup(pConfig->sslcacertificatefile); + else + config->sslcacertificatefile = + StrDup(defConfig.sslcacertificatefile); #endif #if HAVE_SETPROCTITLE diff --git a/conserver/master.c b/conserver/master.c index d719346..693e06a 100644 --- a/conserver/master.c +++ b/conserver/master.c @@ -1,5 +1,5 @@ /* - * $Id: master.c,v 5.136 2009/09/26 09:23:04 bryan Exp $ + * $Id: master.c,v 5.139 2013/09/23 23:17:42 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -461,8 +461,9 @@ DoNormalRead(pCLServing) /* process password here...before we corrupt accmd */ if (pCLServing->iState == S_PASSWD) { - if (CheckPasswd(pCLServing, pCLServing->accmd->string) != - AUTH_SUCCESS) { + if (CheckPasswd + (pCLServing, pCLServing->accmd->string, FLAGFALSE) + != AUTH_SUCCESS) { FileWrite(pCLServing->fd, FLAGFALSE, "invalid password\r\n", -1); BuildString((char *)0, pCLServing->accmd); @@ -564,7 +565,8 @@ DoNormalRead(pCLServing) BuildString(pCLServing->peername->string, pCLServing->acid); if (pCLServing->caccess == 't' || - CheckPasswd(pCLServing, "") == AUTH_SUCCESS) { + CheckPasswd(pCLServing, "", + FLAGTRUE) == AUTH_SUCCESS) { pCLServing->iState = S_NORMAL; Verbose(" login %s", pCLServing->acid->string); diff --git a/conserver/readcfg.c b/conserver/readcfg.c index 32a76ae..2936065 100644 --- a/conserver/readcfg.c +++ b/conserver/readcfg.c @@ -1,5 +1,5 @@ /* - * $Id: readcfg.c,v 5.194 2009/09/26 09:20:47 bryan Exp $ + * $Id: readcfg.c,v 5.202 2013/09/26 17:50:24 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -51,6 +51,81 @@ BREAKS breakList[9] = { {(STRING *)0, 0}, {(STRING *)0, 0}, {(STRING *)0, 0} }; +TASKS *taskList = (TASKS *)0; +SUBST *taskSubst = (SUBST *)0; + +/***** internal things *****/ +#define ALLWORDSEP ", \f\v\t\n\r" + +int isStartup = 0; +GRPENT *pGroupsOld = (GRPENT *)0; +GRPENT *pGEstage = (GRPENT *)0; +GRPENT *pGE = (GRPENT *)0; +static unsigned int groupID = 1; +REMOTE **ppRC = (REMOTE **)0; + +/* 'task' handling (plus) */ +void +#if PROTOTYPES +ProcessYesNo(char *id, FLAG *flag) +#else +ProcessYesNo(id, flag) + char *id; + FLAG *flag; +#endif +{ + if (id == (char *)0 || id[0] == '\000') + *flag = FLAGFALSE; + else if (strcasecmp("yes", id) == 0 || strcasecmp("true", id) == 0 || + strcasecmp("on", id) == 0) + *flag = FLAGTRUE; + else if (strcasecmp("no", id) == 0 || strcasecmp("false", id) == 0 || + strcasecmp("off", id) == 0) + *flag = FLAGFALSE; + else if (isMaster) + Error("invalid boolean entry `%s' [%s:%d]", id, file, line); +} + +void +#if PROTOTYPES +DestroyTask(TASKS *task) +#else +DestroyTask(task) + TASKS *task; +#endif +{ + if (task->cmd != (STRING *)0) { + DestroyString(task->cmd); + task->cmd = (STRING *)0; + } + if (task->descr != (STRING *)0) { + DestroyString(task->descr); + task->descr = (STRING *)0; + } + if (task->subst != (char *)0) + free(task->subst); + free(task); +} + +void +#if PROTOTYPES +DestroyTaskList(void) +#else +DestroyTaskList() +#endif +{ + TASKS *n; + while (taskList != (TASKS *)0) { + n = taskList->next; + DestroyTask(taskList); + taskList = n; + } + if (taskSubst != (SUBST *)0) { + free(taskSubst); + taskSubst = (SUBST *)0; + } +} + void #if PROTOTYPES DestroyBreakList(void) @@ -124,20 +199,11 @@ AddUserList(id) return u; } -/***** internal things *****/ -#define ALLWORDSEP ", \f\v\t\n\r" - -int isStartup = 0; -GRPENT *pGroupsOld = (GRPENT *)0; -GRPENT *pGEstage = (GRPENT *)0; -GRPENT *pGE = (GRPENT *)0; -static unsigned int groupID = 1; -REMOTE **ppRC = (REMOTE **)0; - /* 'break' handling */ STRING *parserBreak = (STRING *)0; int parserBreakDelay = 0; int parserBreakNum = 0; +FLAG parserBreakConfirm = FLAGFALSE; CONSENTUSERS * #if PROTOTYPES @@ -198,6 +264,7 @@ BreakBegin(id) else BuildString((char *)0, parserBreak); parserBreakDelay = BREAKDELAYDEFAULT; + parserBreakConfirm = FLAGFALSE; } } @@ -216,6 +283,7 @@ BreakEnd() BuildString((char *)0, breakList[parserBreakNum - 1].seq); BuildString(parserBreak->string, breakList[parserBreakNum - 1].seq); breakList[parserBreakNum - 1].delay = parserBreakDelay; + breakList[parserBreakNum - 1].confirm = parserBreakConfirm; parserBreakNum = 0; } @@ -248,9 +316,9 @@ BreakDestroy() for (i = 0; i < 9; i++) { Msg("Break[%d] = `%s', delay=%d", i, breakList[i].seq == - (STRING *)0 ? "(null)" : (breakList[i]. - seq->string ? breakList[i]. - seq->string : "(null)"), + (STRING *)0 ? "(null)" : (breakList[i].seq-> + string ? breakList[i].seq-> + string : "(null)"), breakList[i].delay); } } @@ -302,6 +370,18 @@ BreakItemDelay(id) parserBreakDelay = delay; } +void +#if PROTOTYPES +BreakItemConfirm(char *id) +#else +BreakItemConfirm(id) + char *id; +#endif +{ + CONDDEBUG((1, "BreakItemConfirm(%s) [%s:%d]", id, file, line)); + ProcessYesNo(id, &(parserBreakConfirm)); +} + /* 'group' handling */ typedef struct parserGroup { STRING *name; @@ -471,20 +551,21 @@ GroupAddUser(pg, id, not) void #if PROTOTYPES -CopyConsentUserList(CONSENTUSERS *s, CONSENTUSERS **d) +CopyConsentUserList(CONSENTUSERS *s, CONSENTUSERS **d, short not) #else -CopyConsentUserList(CONSENTUSERS *s, CONSENTUSERS **d) +CopyConsentUserList(s, d, not) CONSENTUSERS *s; CONSENTUSERS **d; + short not; #endif { /* we have to add things backwards, since it's an ordered list */ if (s == (CONSENTUSERS *)0 || d == (CONSENTUSERS **)0) return; - CopyConsentUserList(s->next, d); + CopyConsentUserList(s->next, d, not); - ConsentAddUser(d, s->user->name, s->not); + ConsentAddUser(d, s->user->name, not ? !s->not : s->not); } @@ -517,7 +598,7 @@ GroupItemUsers(id) if ((pg = GroupFind(token)) == (PARSERGROUP *)0) GroupAddUser(parserGroupTemp, token, not); else - CopyConsentUserList(pg->users, &(parserGroupTemp->users)); + CopyConsentUserList(pg->users, &(parserGroupTemp->users), not); } } @@ -593,6 +674,10 @@ DestroyParserDefaultOrConsole(c, ph, pt) free(c->idlestring); if (c->replstring != (char *)0) free(c->replstring); + if (c->tasklist != (char *)0) + free(c->tasklist); + if (c->breaklist != (char *)0) + free(c->breaklist); if (c->execSlave != (char *)0) free(c->execSlave); while (c->aliases != (NAMES *)0) { @@ -675,6 +760,8 @@ ApplyDefault(d, c) c->activitylog = d->activitylog; if (d->breaklog != FLAGUNKNOWN) c->breaklog = d->breaklog; + if (d->tasklog != FLAGUNKNOWN) + c->tasklog = d->tasklog; if (d->hupcl != FLAGUNKNOWN) c->hupcl = d->hupcl; if (d->cstopb != FLAGUNKNOWN) @@ -785,8 +872,20 @@ ApplyDefault(d, c) if ((c->replstring = StrDup(d->replstring)) == (char *)0) OutOfMem(); } - CopyConsentUserList(d->ro, &(c->ro)); - CopyConsentUserList(d->rw, &(c->rw)); + if (d->tasklist != (char *)0) { + if (c->tasklist != (char *)0) + free(c->tasklist); + if ((c->tasklist = StrDup(d->tasklist)) == (char *)0) + OutOfMem(); + } + if (d->breaklist != (char *)0) { + if (c->breaklist != (char *)0) + free(c->breaklist); + if ((c->breaklist = StrDup(d->breaklist)) == (char *)0) + OutOfMem(); + } + CopyConsentUserList(d->ro, &(c->ro), 0); + CopyConsentUserList(d->rw, &(c->rw), 0); } void @@ -975,56 +1074,8 @@ DefaultItemDevice(id) ProcessDevice(parserDefaultTemp, id); } +/* substitution support */ SUBST *substData = (SUBST *)0; - -int -#if PROTOTYPES -SubstValue(char c, char **s, int *i) -#else -SubstValue(c, s, i) - char c; - char **s; - int *i; -#endif -{ - int retval = 0; - CONSENT *pCE; - static char *empty = ""; - - if (substData->data == (void *)0) - return 0; - pCE = (CONSENT *)(substData->data); - - if (s != (char **)0) { - if (c == 'h') { - (*s) = pCE->host; - retval = 1; - } else if (c == 'c') { - (*s) = pCE->server; - retval = 1; - } else if (c == 'r') { - if (pCE->replstring == (char *)0) { - (*s) = empty; - } else { - (*s) = pCE->replstring; - } - retval = 1; - } - } - - if (i != (int *)0) { - if (c == 'p') { - (*i) = pCE->port; - retval = 1; - } else if (c == 'P') { - (*i) = pCE->netport; - retval = 1; - } - } - - return retval; -} - int substTokenCount[255]; int @@ -1052,6 +1103,63 @@ ZeroSubstTokenCount() #endif } + +int +#if PROTOTYPES +SubstValue(char c, char **s, int *i) +#else +SubstValue(c, s, i) + char c; + char **s; + int *i; +#endif +{ + int retval = 0; + CONSENT *pCE; + static char *empty = ""; + + if (substData->data == (void *)0) + return 0; + pCE = (CONSENT *)(substData->data); + + if (s != (char **)0) { + if (c == 'h') { + if (pCE->host == (char *)0) { + (*s) = empty; + } else { + (*s) = pCE->host; + } + retval = 1; + } else if (c == 'c') { + if (pCE->server == (char *)0) { + (*s) = empty; + } else { + (*s) = pCE->server; + } + retval = 1; + } else if (c == 'r') { + if (pCE->replstring == (char *)0) { + (*s) = empty; + } else { + (*s) = pCE->replstring; + } + retval = 1; + } + } + + if (i != (int *)0) { + if (c == 'p') { + (*i) = pCE->port; + retval = 1; + } else if (c == 'P') { + (*i) = pCE->netport; + retval = 1; + } + } + + return retval; +} + SUBSTTOKEN #if PROTOTYPES SubstToken(char c) @@ -2056,6 +2164,111 @@ DefaultItemReplstring(id) ProcessReplstring(parserDefaultTemp, id); } +void +#if PROTOTYPES +ProcessTasklist(CONSENT *c, char *id) +#else +ProcessTasklist(c, id) + CONSENT *c; + char *id; +#endif +{ + char *token = (char *)0; + char *list = (char *)0; + + CONDDEBUG((1, "ProcessTasklist(%s) [%s:%d]", id, file, line)); + + if (c->tasklist != (char *)0) { + free(c->tasklist); + c->tasklist = (char *)0; + } + if ((id == (char *)0) || (*id == '\000')) + return; + + list = BuildTmpString((char *)0); + for (token = strtok(id, ALLWORDSEP); token != (char *)0; + token = strtok(NULL, ALLWORDSEP)) { + if (token[1] != '\000' || + ((token[0] < '0' || token[0] > '9') && + (token[0] < 'a' || token[0] > 'z') && token[0] != '*')) { + if (isMaster) + Error("invalid tasklist reference `%s' [%s:%d]", token, + file, line); + continue; + } + list = BuildTmpStringChar(token[0]); + } + if (list == (char *)0 || *list == '\000') + return; + + if ((c->tasklist = StrDup(list)) == (char *)0) + OutOfMem(); +} + +void +#if PROTOTYPES +DefaultItemTasklist(char *id) +#else +DefaultItemTasklist(id) + char *id; +#endif +{ + CONDDEBUG((1, "DefaultItemTasklist(%s) [%s:%d]", id, file, line)); + ProcessTasklist(parserDefaultTemp, id); +} + +void +#if PROTOTYPES +ProcessBreaklist(CONSENT *c, char *id) +#else +ProcessBreaklist(c, id) + CONSENT *c; + char *id; +#endif +{ + char *token = (char *)0; + char *list = (char *)0; + + CONDDEBUG((1, "ProcessBreaklist(%s) [%s:%d]", id, file, line)); + + if (c->breaklist != (char *)0) { + free(c->breaklist); + c->breaklist = (char *)0; + } + if ((id == (char *)0) || (*id == '\000')) + return; + + list = BuildTmpString((char *)0); + for (token = strtok(id, ALLWORDSEP); token != (char *)0; + token = strtok(NULL, ALLWORDSEP)) { + if (token[1] != '\000' || + ((token[0] < '0' || token[0] > '9') && token[0] != '*')) { + if (isMaster) + Error("invalid breaklist reference `%s' [%s:%d]", token, + file, line); + continue; + } + list = BuildTmpStringChar(token[0]); + } + if (list == (char *)0 || *list == '\000') + return; + + if ((c->breaklist = StrDup(list)) == (char *)0) + OutOfMem(); +} + +void +#if PROTOTYPES +DefaultItemBreaklist(char *id) +#else +DefaultItemBreaklist(id) + char *id; +#endif +{ + CONDDEBUG((1, "DefaultItemBreaklist(%s) [%s:%d]", id, file, line)); + ProcessBreaklist(parserDefaultTemp, id); +} + void #if PROTOTYPES ProcessIdletimeout(CONSENT *c, char *id) @@ -2133,7 +2346,7 @@ ProcessRoRw(ppCU, id) if ((pg = GroupFind(token)) == (PARSERGROUP *)0) ConsentAddUser(ppCU, token, not); else - CopyConsentUserList(pg->users, ppCU); + CopyConsentUserList(pg->users, ppCU, not); } } @@ -2172,12 +2385,14 @@ ProcessTimestamp(c, id) { time_t tyme; char *p = (char *)0, *n = (char *)0; - FLAG activity = FLAGFALSE, bactivity = FLAGFALSE; + FLAG activity = FLAGFALSE, bactivity = FLAGFALSE, tactivity = + FLAGFALSE; int factor = 0, pfactor = 0; int value = 0, pvalue = 0; if ((id == (char *)0) || (*id == '\000')) { c->breaklog = FLAGFALSE; + c->tasklog = FLAGFALSE; c->activitylog = FLAGFALSE; c->nextMark = 0; c->mark = 0; @@ -2204,6 +2419,14 @@ ProcessTimestamp(c, id) id, file, line); } bactivity = FLAGTRUE; + } else if (*p == 't' || *p == 'T') { + if (n != (char *)0) { + if (isMaster) + Error + ("invalid timestamp specification `%s': numeral before `t' (ignoring numeral) [%s:%d]", + id, file, line); + } + tactivity = FLAGTRUE; } else if (*p == 'm' || *p == 'M') { pfactor = 60; } else if (*p == 'h' || *p == 'H') { @@ -2264,11 +2487,12 @@ ProcessTimestamp(c, id) } CONDDEBUG((1, - "ProcessTimestamp(): mark spec of `%s' parsed: factor=%d, value=%d, activity=%d, bactivity=%d", - id, factor, value, activity, bactivity)); + "ProcessTimestamp(): mark spec of `%s' parsed: factor=%d, value=%d, activity=%d, bactivity=%d, tactivity=%d", + id, factor, value, activity, bactivity, tactivity)); c->activitylog = activity; c->breaklog = bactivity; + c->tasklog = tactivity; if (factor && value) { c->mark = value; if (factor > 0) { @@ -2381,6 +2605,11 @@ ConsoleBegin(id) == (CONSENT *)0) OutOfMem(); + if ((parserConsoleTemp->breaklist = StrDup("*")) == (char *)0) + OutOfMem(); + if ((parserConsoleTemp->tasklist = StrDup("*")) == (char *)0) + OutOfMem(); + /* prime the pump with a default of "*" */ if ((c = FindParserDefaultOrConsole(parserDefaults, @@ -2867,6 +3096,12 @@ ConsoleAdd(c) if (!FileBufEmpty(pCEmatch->initfile)) FD_SET(FileFDOutNum(pCEmatch->initfile), &winit); } + if (pCEmatch->taskfile != (CONSFILE *)0) { + int taskfile = FileFDNum(pCEmatch->taskfile); + FD_SET(taskfile, &rinit); + if (maxfd < taskfile + 1) + maxfd = taskfile + 1; + } /* now check for any changes between pCEmatch & c. * we can munch the pCEmatch structure 'cause ConsDown() @@ -3036,13 +3271,16 @@ ConsoleAdd(c) SwapStr(&pCEmatch->motd, &c->motd); SwapStr(&pCEmatch->idlestring, &c->idlestring); - SwapStr(&pCEmatch->replstring, &c->replstring); + SwapStr(&pCEmatch->replstring, &c->breaklist); + SwapStr(&pCEmatch->tasklist, &c->tasklist); + SwapStr(&pCEmatch->breaklist, &c->tasklist); pCEmatch->portinc = c->portinc; pCEmatch->portbase = c->portbase; pCEmatch->spinmax = c->spinmax; pCEmatch->spintimer = c->spintimer; pCEmatch->activitylog = c->activitylog; pCEmatch->breaklog = c->breaklog; + pCEmatch->tasklog = c->tasklog; pCEmatch->raw = c->raw; pCEmatch->mark = c->mark; pCEmatch->nextMark = c->nextMark; @@ -3071,8 +3309,8 @@ ConsoleAdd(c) DestroyConsentUsers(&(pCEmatch->ro)); DestroyConsentUsers(&(pCEmatch->rw)); /* now copy over the new stuff */ - CopyConsentUserList(c->ro, &(pCEmatch->ro)); - CopyConsentUserList(c->rw, &(pCEmatch->rw)); + CopyConsentUserList(c->ro, &(pCEmatch->ro), 0); + CopyConsentUserList(c->rw, &(pCEmatch->rw), 0); /* the code above shouldn't touch any of the "runtime" members * 'cause the ConsDown() code needs to be able to rely on those @@ -3219,6 +3457,8 @@ ConsoleDestroy() c->raw = FLAGFALSE; if (c->breaklog == FLAGUNKNOWN) c->breaklog = FLAGFALSE; + if (c->tasklog == FLAGUNKNOWN) + c->tasklog = FLAGFALSE; if (c->hupcl == FLAGUNKNOWN) c->hupcl = FLAGFALSE; if (c->ixany == FLAGUNKNOWN) @@ -3824,6 +4064,30 @@ ConsoleItemReplstring(id) ProcessReplstring(parserConsoleTemp, id); } +void +#if PROTOTYPES +ConsoleItemTasklist(char *id) +#else +ConsoleItemTasklist(id) + char *id; +#endif +{ + CONDDEBUG((1, "ConsoleItemTasklist(%s) [%s:%d]", id, file, line)); + ProcessTasklist(parserConsoleTemp, id); +} + +void +#if PROTOTYPES +ConsoleItemBreaklist(char *id) +#else +ConsoleItemBreaklist(id) + char *id; +#endif +{ + CONDDEBUG((1, "ConsoleItemBreaklist(%s) [%s:%d]", id, file, line)); + ProcessBreaklist(parserConsoleTemp, id); +} + void #if PROTOTYPES ConsoleItemIdletimeout(char *id) @@ -4199,10 +4463,11 @@ AccessItemInclude(id) AccessAddACL(parserAccessTemp, a); } if (pa->admin != (CONSENTUSERS *)0) - CopyConsentUserList(pa->admin, &(parserAccessTemp->admin)); + CopyConsentUserList(pa->admin, &(parserAccessTemp->admin), + 0); if (pa->limited != (CONSENTUSERS *)0) CopyConsentUserList(pa->limited, - &(parserAccessTemp->limited)); + &(parserAccessTemp->limited), 0); } } } @@ -4385,6 +4650,8 @@ DestroyConfig(c) #if HAVE_OPENSSL if (c->sslcredentials != (char *)0) free(c->sslcredentials); + if (c->sslcacertificatefile != (char *)0) + free(c->sslcacertificatefile); #endif free(c); } @@ -4480,8 +4747,18 @@ ConfigEnd() pConfig->sslcredentials = parserConfigTemp->sslcredentials; parserConfigTemp->sslcredentials = (char *)0; } + if (parserConfigTemp->sslcacertificatefile != (char *)0) { + if (pConfig->sslcacertificatefile != (char *)0) + free(pConfig->sslcacertificatefile); + pConfig->sslcacertificatefile = + parserConfigTemp->sslcacertificatefile; + parserConfigTemp->sslcacertificatefile = (char *)0; + } if (parserConfigTemp->sslrequired != FLAGUNKNOWN) pConfig->sslrequired = parserConfigTemp->sslrequired; + if (parserConfigTemp->sslreqclientcert != FLAGUNKNOWN) + pConfig->sslreqclientcert = + parserConfigTemp->sslreqclientcert; #endif #if HAVE_SETPROCTITLE if (parserConfigTemp->setproctitle != FLAGUNKNOWN) @@ -4550,25 +4827,6 @@ ConfigItemDefaultaccess(id) } } -void -#if PROTOTYPES -ProcessYesNo(char *id, FLAG *flag) -#else -ProcessYesNo(id, flag) - char *id; - FLAG *flag; -#endif -{ - if (id == (char *)0 || id[0] == '\000') - *flag = FLAGFALSE; - else if (strcasecmp("yes", id) == 0 || strcasecmp("true", id) == 0 || - strcasecmp("on", id) == 0) - *flag = FLAGTRUE; - else if (strcasecmp("no", id) == 0 || strcasecmp("false", id) == 0 || - strcasecmp("off", id) == 0) - *flag = FLAGFALSE; -} - void #if PROTOTYPES ConfigItemAutocomplete(char *id) @@ -4811,6 +5069,34 @@ ConfigItemSslcredentials(id) #endif } +void +#if PROTOTYPES +ConfigItemSslcacertificatefile(char *id) +#else +ConfigItemSslcacertificatefile(id) + char *id; +#endif +{ + CONDDEBUG((1, "ConfigItemSslcacertificatefile(%s) [%s:%d]", id, file, + line)); +#if HAVE_OPENSSL + if (parserConfigTemp->sslcacertificatefile != (char *)0) + free(parserConfigTemp->sslcacertificatefile); + + if ((id == (char *)0) || (*id == '\000')) { + parserConfigTemp->sslcacertificatefile = (char *)0; + return; + } + if ((parserConfigTemp->sslcacertificatefile = StrDup(id)) == (char *)0) + OutOfMem(); +#else + if (isMaster) + Error + ("sslcacertificatefile ignored - encryption not compiled into code [%s:%d]", + file, line); +#endif +} + void #if PROTOTYPES ConfigItemSslrequired(char *id) @@ -4830,6 +5116,26 @@ ConfigItemSslrequired(id) #endif } +void +#if PROTOTYPES +ConfigItemSslreqclientcert(char *id) +#else +ConfigItemSslreqclientcert(id) + char *id; +#endif +{ + CONDDEBUG((1, "ConfigItemSslreqclientcert(%s) [%s:%d]", id, file, + line)); +#if HAVE_OPENSSL + ProcessYesNo(id, &(parserConfigTemp->sslreqclientcert)); +#else + if (isMaster) + Error + ("sslreqclientcert ignored - encryption not compiled into code [%s:%d]", + file, line); +#endif +} + void #if PROTOTYPES ConfigItemSetproctitle(char *id) @@ -4849,10 +5155,194 @@ ConfigItemSetproctitle(id) #endif } +/* task parsing */ +TASKS *parserTask; + +void +#if PROTOTYPES +TaskBegin(char *id) +#else +TaskBegin(id) + char *id; +#endif +{ + CONDDEBUG((1, "TaskBegin(%s) [%s:%d]", id, file, line)); + if (id == (char *)0 || id[0] == '\000' || id[1] != '\000' || + ((id[0] < '0' || id[0] > '9') && (id[0] < 'a' || id[0] > 'z'))) { + if (isMaster) + Error("invalid task id `%s' [%s:%d]", id, file, line); + } else { + if (parserTask == (TASKS *)0) { + if ((parserTask = + (TASKS *)calloc(1, sizeof(TASKS))) == (TASKS *)0) + OutOfMem(); + parserTask->cmd = AllocString(); + parserTask->descr = AllocString(); + } + if (taskSubst == (SUBST *)0) { + if ((taskSubst = + (SUBST *)calloc(1, sizeof(SUBST))) == (SUBST *)0) + OutOfMem(); + taskSubst->value = &SubstValue; + taskSubst->token = &SubstToken; + } + + BuildString((char *)0, parserTask->cmd); + BuildString((char *)0, parserTask->descr); + parserTask->confirm = FLAGFALSE; + parserTask->id = id[0]; + } +} + +void +#if PROTOTYPES +TaskEnd(void) +#else +TaskEnd() +#endif +{ + TASKS *t; + TASKS **prev; + CONDDEBUG((1, "TaskEnd() [%s:%d]", file, line)); + + /* skip this if we've marked it that way or if there is no command to run */ + if (parserTask == (TASKS *)0 || parserTask->id == ' ' || + parserTask->cmd->used <= 1) + return; + + /* create an ordered list */ + prev = &taskList; + t = taskList; + while (t != (TASKS *)0 && t->id < parserTask->id) { + prev = &(t->next); + t = t->next; + } + *prev = parserTask; + if (t != (TASKS *)0 && parserTask->id == t->id) { + parserTask->next = t->next; + DestroyTask(t); + } else { + parserTask->next = t; + } + parserTask = (TASKS *)0; +} + +void +#if PROTOTYPES +TaskAbort(void) +#else +TaskAbort() +#endif +{ + CONDDEBUG((1, "TaskAbort() [%s:%d]", file, line)); + if (parserTask == (TASKS *)0 || parserTask->id == ' ') + return; + + parserTask->id = ' '; +} + +void +#if PROTOTYPES +TaskDestroy(void) +#else +TaskDestroy() +#endif +{ + CONDDEBUG((1, "TaskDestroy() [%s:%d]", file, line)); + if (parserTask != (TASKS *)0) { + DestroyTask(parserTask); + parserTask = (TASKS *)0; + } +} + +void +#if PROTOTYPES +TaskItemRunas(char *id) +#else +TaskItemRunas(id) + char *id; +#endif +{ + CONDDEBUG((1, "TaskItemRunas(%s) [%s:%d]", id, file, line)); + if (parserTask == (TASKS *)0 || parserTask->id == ' ') + return; + ProcessUidGid(&(parserTask->uid), &(parserTask->gid), id); +} + +void +#if PROTOTYPES +TaskItemSubst(char *id) +#else +TaskItemSubst(id) + char *id; +#endif +{ + CONDDEBUG((1, "TaskItemSubst(%s) [%s:%d]", id, file, line)); + if (parserTask == (TASKS *)0 || parserTask->id == ' ') + return; + ProcessSubst(taskSubst, (char **)0, &(parserTask->subst), "subst", id); +} + +void +#if PROTOTYPES +TaskItemCmd(char *id) +#else +TaskItemCmd(id) + char *id; +#endif +{ + CONDDEBUG((1, "TaskItemCmd(%s) [%s:%d]", id, file, line)); + if (parserTask == (TASKS *)0 || parserTask->id == ' ') + return; + BuildString((char *)0, parserTask->cmd); + if ((id == (char *)0) || (*id == '\000')) + return; + BuildString(id, parserTask->cmd); +} + +void +#if PROTOTYPES +TaskItemDescr(char *id) +#else +TaskItemDescr(id) + char *id; +#endif +{ + CONDDEBUG((1, "TaskItemDescr(%s) [%s:%d]", id, file, line)); + if (parserTask == (TASKS *)0 || parserTask->id == ' ') + return; + BuildString((char *)0, parserTask->descr); + if ((id == (char *)0) || (*id == '\000')) + return; + BuildString(id, parserTask->descr); +} + +void +#if PROTOTYPES +TaskItemConfirm(char *id) +#else +TaskItemConfirm(id) + char *id; +#endif +{ + CONDDEBUG((1, "TaskItemConfirm(%s) [%s:%d]", id, file, line)); + ProcessYesNo(id, &(parserTask->confirm)); +} + /* now all the real nitty-gritty bits for making things work */ +ITEM keyTask[] = { + {"cmd", TaskItemCmd}, + {"confirm", TaskItemConfirm}, + {"description", TaskItemDescr}, + {"runas", TaskItemRunas}, + {"subst", TaskItemSubst}, + {(char *)0, (void *)0} +}; + ITEM keyBreak[] = { - {"string", BreakItemString}, + {"confirm", BreakItemConfirm}, {"delay", BreakItemDelay}, + {"string", BreakItemString}, {(char *)0, (void *)0} }; @@ -4864,6 +5354,7 @@ ITEM keyGroup[] = { ITEM keyDefault[] = { {"baud", DefaultItemBaud}, {"break", DefaultItemBreak}, + {"breaklist", DefaultItemBreaklist}, {"device", DefaultItemDevice}, {"devicesubst", DefaultItemDevicesubst}, {"exec", DefaultItemExec}, @@ -4892,6 +5383,7 @@ ITEM keyDefault[] = { {"replstring", DefaultItemReplstring}, {"ro", DefaultItemRo}, {"rw", DefaultItemRw}, + {"tasklist", DefaultItemTasklist}, {"timestamp", DefaultItemTimestamp}, {"type", DefaultItemType}, {"uds", DefaultItemUds}, @@ -4903,6 +5395,7 @@ ITEM keyConsole[] = { {"aliases", ConsoleItemAliases}, {"baud", ConsoleItemBaud}, {"break", ConsoleItemBreak}, + {"breaklist", ConsoleItemBreaklist}, {"device", ConsoleItemDevice}, {"devicesubst", ConsoleItemDevicesubst}, {"exec", ConsoleItemExec}, @@ -4931,6 +5424,7 @@ ITEM keyConsole[] = { {"replstring", ConsoleItemReplstring}, {"ro", ConsoleItemRo}, {"rw", ConsoleItemRw}, + {"tasklist", ConsoleItemTasklist}, {"timestamp", ConsoleItemTimestamp}, {"type", ConsoleItemType}, {"uds", ConsoleItemUds}, @@ -4962,12 +5456,15 @@ ITEM keyConfig[] = { {"secondaryport", ConfigItemSecondaryport}, {"setproctitle", ConfigItemSetproctitle}, {"sslcredentials", ConfigItemSslcredentials}, + {"sslcacertificatefile", ConfigItemSslcacertificatefile}, {"sslrequired", ConfigItemSslrequired}, + {"sslreqclientcert", ConfigItemSslreqclientcert}, {"unifiedlog", ConfigItemUnifiedlog}, {(char *)0, (void *)0} }; SECTION sections[] = { + {"task", TaskBegin, TaskEnd, TaskAbort, TaskDestroy, keyTask}, {"break", BreakBegin, BreakEnd, BreakAbort, BreakDestroy, keyBreak}, {"group", GroupBegin, GroupEnd, GroupAbort, GroupDestroy, keyGroup}, {"default", DefaultBegin, DefaultEnd, DefaultAbort, DefaultDestroy, @@ -5008,6 +5505,7 @@ ReadCfg(filename, fp) BuildString((char *)0, breakList[i].seq); } breakList[i].delay = BREAKDELAYDEFAULT; + breakList[i].confirm = FLAGFALSE; } BuildString("\\z", breakList[0].seq); BuildString("\\r~^b", breakList[1].seq); @@ -5018,6 +5516,9 @@ ReadCfg(filename, fp) /* initialize the user list */ DestroyUserList(); + /* initialize the task list */ + DestroyTaskList(); + /* initialize the config set */ if (pConfig != (CONFIG *)0) { DestroyConfig(pConfig); @@ -5271,6 +5772,39 @@ ReReadCfg(fd, msfd) } } } + if (optConf->sslcacertificatefile == (char *)0) { + if (pConfig->sslcacertificatefile == (char *)0) { + if (config->sslcacertificatefile != (char *)0) { + free(config->sslcacertificatefile); + config->sslcacertificatefile = (char *)0; + Msg("warning: `sslcacertificatefile' config option changed - you must restart for it to take effect"); + } + } else { + if (config->sslcacertificatefile == (char *)0 || + strcmp(pConfig->sslcacertificatefile, + config->sslcacertificatefile) != 0) { + if (config->sslcacertificatefile != (char *)0) + free(config->sslcacertificatefile); + if ((config->sslcacertificatefile = + StrDup(pConfig->sslcacertificatefile)) + == (char *)0) + OutOfMem(); + Msg("warning: `sslcacertificatefile' config option changed - you must restart for it to take effect"); + } + } + } + if (optConf->sslreqclientcert == FLAGUNKNOWN) { + if (pConfig->sslreqclientcert == FLAGUNKNOWN) { + if (config->sslreqclientcert != defConfig.sslreqclientcert) { + Msg("warning: `sslreqclientcert' config option changed - you must restart for it to take effect"); + config->sslreqclientcert = defConfig.sslreqclientcert; + } + } else if (config->sslreqclientcert != + pConfig->sslreqclientcert) { + Msg("warning: `sslreqclientcert' config option changed - you must restart for it to take effect"); + config->sslreqclientcert = pConfig->sslreqclientcert; + } + } #endif #if HAVE_SETPROCTITLE if (optConf->setproctitle == FLAGUNKNOWN) { diff --git a/conserver/readcfg.h b/conserver/readcfg.h index 2ec23be..8394a98 100644 --- a/conserver/readcfg.h +++ b/conserver/readcfg.h @@ -1,5 +1,5 @@ /* - * $Id: readcfg.h,v 5.45 2005/06/07 19:55:51 bryan Exp $ + * $Id: readcfg.h,v 5.49 2013/09/23 22:58:21 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -28,14 +28,28 @@ typedef struct config { #if HAVE_OPENSSL char *sslcredentials; FLAG sslrequired; + FLAG sslreqclientcert; + char *sslcacertificatefile; #endif } CONFIG; typedef struct breaks { STRING *seq; int delay; + FLAG confirm; } BREAKS; +typedef struct tasks { + char id; + STRING *cmd; + STRING *descr; + uid_t uid; + gid_t gid; + char *subst; + FLAG confirm; + struct tasks *next; +} TASKS; + extern NAMES *userList; /* user list */ extern GRPENT *pGroups; /* group info */ extern REMOTE *pRCList; /* list of remote consoles we know about */ @@ -44,12 +58,15 @@ extern ACCESS *pACList; /* `who do you love' (or trust) */ extern CONSENTUSERS *pADList; /* list of admin users */ extern CONSENTUSERS *pLUList; /* list of limited users */ extern BREAKS breakList[9]; /* list of break sequences */ +extern TASKS *taskList; /* list of tasks */ +extern SUBST *taskSubst; /* substitution function data for tasks */ extern CONFIG *pConfig; /* settings seen by config parser */ extern SUBST *substData; /* substitution function data */ extern void ReadCfg PARAMS((char *, FILE *)); extern void ReReadCfg PARAMS((int, int)); extern void DestroyBreakList PARAMS((void)); +extern void DestroyTaskList PARAMS((void)); extern void DestroyUserList PARAMS((void)); extern void DestroyConfig PARAMS((CONFIG *)); extern NAMES *FindUserList PARAMS((char *)); diff --git a/conserver/version.h b/conserver/version.h index a6b79f9..6ca92f2 100644 --- a/conserver/version.h +++ b/conserver/version.h @@ -1,5 +1,5 @@ /* - * $Id: version.h,v 1.77 2010/11/11 22:44:10 bryan Exp $ + * $Id: version.h,v 1.78 2013/09/13 20:54:09 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -16,6 +16,6 @@ All rights reserved.\n" #define VERSION_MAJOR 8 #define VERSION_MINOR 1 -#define VERSION_REV 18 +#define VERSION_REV 19 #define VERSION_TEXT "conserver.com version" #define VERSION_UINT (VERSION_MAJOR * 1000000 + VERSION_MINOR * 1000 + VERSION_REV) diff --git a/console/Makefile.in b/console/Makefile.in index cc7aaef..d85f097 100644 --- a/console/Makefile.in +++ b/console/Makefile.in @@ -1,4 +1,5 @@ ### Path settings +datarootdir = @datarootdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ prefix = @prefix@ diff --git a/console/console.c b/console/console.c index ed38d00..db3a0ef 100644 --- a/console/console.c +++ b/console/console.c @@ -1,5 +1,5 @@ /* - * $Id: console.c,v 5.185 2009/10/19 06:44:06 bryan Exp $ + * $Id: console.c,v 5.188 2013/09/18 14:31:39 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -91,6 +91,20 @@ SetupSSL() Error("Could not load SSL default CA file and/or directory"); Bye(EX_UNAVAILABLE); } + if (config->sslcacertificatefile != (char *)0 || + config->sslcacertificatepath != (char *)0) { + if (SSL_CTX_load_verify_locations + (ctx, config->sslcacertificatefile, + config->sslcacertificatepath) != 1) { + if (config->sslcacertificatefile != (char *)0) + Error("Could not setup ca certificate file to '%s'", + config->sslcacertificatefile); + if (config->sslcacertificatepath != (char *)0) + Error("Could not setup ca certificate path to '%s'", + config->sslcacertificatepath); + Bye(EX_UNAVAILABLE); + } + } if (config->sslcredentials != (char *)0) { if (SSL_CTX_use_certificate_chain_file (ctx, config->sslcredentials) != 1) { @@ -106,7 +120,11 @@ SetupSSL() } ciphers = "ALL:!LOW:!EXP:!MD5:!aNULL:@STRENGTH"; } else { +#if defined(REQ_SERVER_CERT) + ciphers = "ALL:!LOW:!EXP:!MD5:!aNULL:@STRENGTH"; +#else ciphers = "ALL:!LOW:!EXP:!MD5:@STRENGTH"; +#endif } SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, SSLVerifyCallback); SSL_CTX_set_options(ctx, @@ -1352,7 +1370,7 @@ Interact(pcf, pcMach) if (screwy) break; else { - FD_SET(0, &rinit); + FD_CLR(0, &rinit); continue; } } @@ -2317,7 +2335,18 @@ main(argc, argv) config->sslcredentials = StrDup(pConfig->sslcredentials); else config->sslcredentials = (char *)0; - + if (pConfig->sslcacertificatefile != (char *)0 && + pConfig->sslcacertificatefile[0] != '\000') + config->sslcacertificatefile = + StrDup(pConfig->sslcacertificatefile); + else + config->sslcacertificatefile = (char *)0; + if (pConfig->sslcacertificatepath != (char *)0 && + pConfig->sslcacertificatepath[0] != '\000') + config->sslcacertificatepath = + StrDup(pConfig->sslcacertificatepath); + else + config->sslcacertificatepath = (char *)0; if (optConf->sslenabled != FLAGUNKNOWN) config->sslenabled = optConf->sslenabled; else if (pConfig->sslenabled != FLAGUNKNOWN) diff --git a/console/console.man b/console/console.man index e01c509..21873a9 100644 --- a/console/console.man +++ b/console/console.man @@ -1,5 +1,5 @@ -.\" $Id: console.man,v 1.61 2006/04/03 13:32:12 bryan Exp $ -.TH CONSOLE 1 "2006/04/03" "conserver-8.1.18" "conserver" +.\" $Id: console.man,v 1.65 2013/09/25 22:10:30 bryan Exp $ +.TH CONSOLE 1 "2013/09/25" "conserver-8.1.19" "conserver" .SH NAME console \- console server client program .SH SYNOPSIS @@ -564,6 +564,18 @@ Using the special value of ``0'' will cause the client to use the number of lines of the current terminal (if that can be determined). If the null string (``""'') is used, the replay length will not be overridden. .TP +\f3sslcacertificatefile\fP \f2filename\fP +.br +Load the valid CA certificates for the +.SM SSL +connection from the PEM encoded file. +.TP +\f3sslcacertificatepath\fP \f2directory\fP +.br +Load the valid CA certificates for the +.SM SSL +connection from the PEM encoded files in the directory. +.TP \f3sslcredentials\fP \f2filename\fP .br Set the @@ -868,7 +880,7 @@ replay the last 20 lines of output set number of replay lines .TP .B s -switch to spy mode (read-only) +switch to spy mode (read only) .TP .B u show status of hosts/users in this group @@ -885,6 +897,9 @@ examine this group's devices and modes .B z suspend this connection .TP +.B ! +invoke task +.TP .B | attach a local command to the console .TP diff --git a/console/readconf.c b/console/readconf.c index 0cd6a58..10bcf10 100644 --- a/console/readconf.c +++ b/console/readconf.c @@ -1,5 +1,5 @@ /* - * $Id: readconf.c,v 5.5 2006/04/03 13:32:12 bryan Exp $ + * $Id: readconf.c,v 5.7 2013/09/18 14:31:39 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -39,6 +39,10 @@ DestroyConfig(c) #if HAVE_OPENSSL if (c->sslcredentials != (char *)0) free(c->sslcredentials); + if (c->sslcacertificatefile != (char *)0) + free(c->sslcacertificatefile); + if (c->sslcacertificatepath != (char *)0) + free(c->sslcacertificatepath); #endif free(c); } @@ -93,6 +97,22 @@ ApplyConfigDefault(c) StrDup(parserConfigDefault->sslcredentials)) == (char *)0) OutOfMem(); } + if (parserConfigDefault->sslcacertificatefile != (char *)0) { + if (c->sslcacertificatefile != (char *)0) + free(c->sslcacertificatefile); + if ((c->sslcacertificatefile = + StrDup(parserConfigDefault->sslcacertificatefile)) == + (char *)0) + OutOfMem(); + } + if (parserConfigDefault->sslcacertificatepath != (char *)0) { + if (c->sslcacertificatepath != (char *)0) + free(c->sslcacertificatepath); + if ((c->sslcacertificatepath = + StrDup(parserConfigDefault->sslcacertificatepath)) == + (char *)0) + OutOfMem(); + } if (parserConfigDefault->sslrequired != FLAGUNKNOWN) c->sslrequired = parserConfigDefault->sslrequired; if (parserConfigDefault->sslenabled != FLAGUNKNOWN) @@ -504,6 +524,60 @@ ConfigItemSslcredentials(id) #endif } +void +#if PROTOTYPES +ConfigItemSslcacertificatefile(char *id) +#else +ConfigItemSslcacertificatefile(id) + char *id; +#endif +{ + CONDDEBUG((1, "ConfigItemSslcacertificatefile(%s) [%s:%d]", id, file, + line)); +#if HAVE_OPENSSL + if (parserConfigTemp->sslcacertificatefile != (char *)0) + free(parserConfigTemp->sslcacertificatefile); + + if ((id == (char *)0) || (*id == '\000')) { + parserConfigTemp->sslcacertificatefile = (char *)0; + return; + } + if ((parserConfigTemp->sslcacertificatefile = StrDup(id)) == (char *)0) + OutOfMem(); +#else + Error + ("sslcacertificatefile ignored - encryption not compiled into code [%s:%d]", + file, line); +#endif +} + +void +#if PROTOTYPES +ConfigItemSslcacertificatepath(char *id) +#else +ConfigItemSslcacertificatepath(id) + char *id; +#endif +{ + CONDDEBUG((1, "ConfigItemSslcacertificatepath(%s) [%s:%d]", id, file, + line)); +#if HAVE_OPENSSL + if (parserConfigTemp->sslcacertificatepath != (char *)0) + free(parserConfigTemp->sslcacertificatepath); + + if ((id == (char *)0) || (*id == '\000')) { + parserConfigTemp->sslcacertificatepath = (char *)0; + return; + } + if ((parserConfigTemp->sslcacertificatepath = StrDup(id)) == (char *)0) + OutOfMem(); +#else + Error + ("sslcacertificatepath ignored - encryption not compiled into code [%s:%d]", + file, line); +#endif +} + void #if PROTOTYPES ConfigItemSslrequired(char *id) @@ -712,6 +786,8 @@ ITEM keyConfig[] = { {"port", ConfigItemPort}, {"replay", ConfigItemReplay}, {"sslcredentials", ConfigItemSslcredentials}, + {"sslcacertificatefile", ConfigItemSslcacertificatefile}, + {"sslcacertificatepath", ConfigItemSslcacertificatepath}, {"sslrequired", ConfigItemSslrequired}, {"sslenabled", ConfigItemSslenabled}, {"striphigh", ConfigItemStriphigh}, @@ -793,6 +869,10 @@ ReadConf(filename, verbose) #if HAVE_OPENSSL CONDDEBUG((1, "pConfig->sslcredentials = %s", EMPTYSTR(pConfig->sslcredentials))); + CONDDEBUG((1, "pConfig->sslcacertificatefile = %s", + EMPTYSTR(pConfig->sslcacertificatefile))); + CONDDEBUG((1, "pConfig->sslcacertificatepath = %s", + EMPTYSTR(pConfig->sslcacertificatepath))); CONDDEBUG((1, "pConfig->sslrequired = %s", FLAGSTR(pConfig->sslrequired))); CONDDEBUG((1, "pConfig->sslenabled = %s", diff --git a/console/readconf.h b/console/readconf.h index 7a7ed5b..47b6231 100644 --- a/console/readconf.h +++ b/console/readconf.h @@ -1,5 +1,5 @@ /* - * $Id: readconf.h,v 5.4 2006/04/03 13:32:12 bryan Exp $ + * $Id: readconf.h,v 5.6 2013/09/18 14:31:39 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -18,6 +18,8 @@ typedef struct config { unsigned short playback; #if HAVE_OPENSSL char *sslcredentials; + char *sslcacertificatefile; + char *sslcacertificatepath; FLAG sslrequired; FLAG sslenabled; #endif diff --git a/contrib/chat/Makefile.in b/contrib/chat/Makefile.in index 716b5d9..41e5d18 100644 --- a/contrib/chat/Makefile.in +++ b/contrib/chat/Makefile.in @@ -1,4 +1,5 @@ ### Path settings +datarootdir = @datarootdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ prefix = @prefix@ diff --git a/contrib/maketestcerts b/contrib/maketestcerts index fb43e39..ea20aa5 100755 --- a/contrib/maketestcerts +++ b/contrib/maketestcerts @@ -6,12 +6,13 @@ # outside of my own purposes. If this helps, cool. In the end I put the # rootcert.pem file in my global certs directory (OPENSSL_ROOT/ssl/certs), # point the server to server.pem and point the client at client.pem. I -# then run the c_rehash command (I supposed it helps or is important). -# When it asks for a passphrase, use 'pass', otherwise this script won't -# work. Ugly, yeah, but it's an ok test. +# then run the c_rehash command. +# +# You can also use the sslcacertificatefile options to point the client/server +# at rootcert.pem instead of populating the global repository # -[ -f rootreq.pem -a -f rootkey.pem ] || cat < root.pem -[ -f serverreq.pem -a -f serverkey.pem ] || cat < server.pem -[ -f clientreq.pem -a -f clientkey.pem ] || cat < ignore/abort command - ^R replay the last line \ooo send character by octal code + z suspend the connection ! invoke task + | attach local command ? print this message + ignore/abort command ^R replay the last line + \ooo send character by octal code [disconnect] diff --git a/test/results/test7 b/test/results/test7 index 8cc7064..c22c398 100644 --- a/test/results/test7 +++ b/test/results/test7 @@ -13,7 +13,8 @@ R set number of replay lines s spy mode (read only) u show host status v show version info w who is on this console x show console baud info - z suspend the connection | attach local command - ? print this message ignore/abort command - ^R replay the last line \ooo send character by octal code + z suspend the connection ! invoke task + | attach local command ? print this message + ignore/abort command ^R replay the last line + \ooo send character by octal code [disconnect]