From 50c3a192ca9fc89a1616596afc2a538ecbcf02ef Mon Sep 17 00:00:00 2001 From: WarPigs1602 Date: Tue, 8 Apr 2025 13:14:18 +0200 Subject: [PATCH 1/6] Added SASL over iauthd - untested --- include/capab.h | 3 +- include/client.h | 1 + include/handlers.h | 1 + include/ircd_features.h | 1 + include/msg.h | 4 + include/numeric.h | 12 +- include/s_auth.h | 1 + include/s_user.h | 1 + ircd/Makefile.in | 1 + ircd/ircd_features.c | 1 + ircd/m_sasl.c | 117 ++++++ ircd/parse.c | 7 + ircd/s_auth.c | 57 +++ ircd/s_err.c | 800 ++++++++++++++++++++++++++++++++++++++++ ircd/s_user.c | 10 +- 15 files changed, 1013 insertions(+), 4 deletions(-) create mode 100644 ircd/m_sasl.c diff --git a/include/capab.h b/include/capab.h index 972fd4cd..5f77efd2 100644 --- a/include/capab.h +++ b/include/capab.h @@ -42,7 +42,8 @@ _CAP(CHGHOST, FEAT_CAP_CHGHOST, 0, "chghost"), \ _CAP(ECHOMESSAGE, FEAT_CAP_ECHOMESSAGE, 0, "echo-message"), \ _CAP(EXTJOIN, FEAT_CAP_EXTJOIN, 0, "extended-join"), \ - _CAP(INVITENOTIFY, FEAT_CAP_INVITENOTIFY, 0, "invite-notify") + _CAP(INVITENOTIFY, FEAT_CAP_INVITENOTIFY, 0, "invite-notify"), \ + _CAP(SASL, FEAT_CAP_SASL, 0, "sasl") /** Client capabilities, counting by index. */ enum Capab { diff --git a/include/client.h b/include/client.h index 92e4816c..00db0d9a 100644 --- a/include/client.h +++ b/include/client.h @@ -256,6 +256,7 @@ struct Client { time_t cli_firsttime; /**< time client was created */ time_t cli_lastnick; /**< TimeStamp on nick */ int cli_marker; /**< /who processing marker */ + int cli_sasl; /**< Client uses sasl */ struct Flags cli_flags; /**< client flags */ unsigned int cli_hopcount; /**< number of servers to this 0 = local */ struct irc_in_addr cli_ip; /**< Real IP of client */ diff --git a/include/handlers.h b/include/handlers.h index f8bc6073..96e5cc28 100644 --- a/include/handlers.h +++ b/include/handlers.h @@ -124,6 +124,7 @@ extern int m_proto(struct Client*, struct Client*, int, char*[]); extern int m_pseudo(struct Client*, struct Client*, int, char*[]); extern int m_quit(struct Client*, struct Client*, int, char*[]); extern int m_registered(struct Client*, struct Client*, int, char*[]); +extern int m_sasl(struct Client*, struct Client*, int, char*[]); extern int m_silence(struct Client*, struct Client*, int, char*[]); extern int m_stats(struct Client*, struct Client*, int, char*[]); extern int m_time(struct Client*, struct Client*, int, char*[]); diff --git a/include/ircd_features.h b/include/ircd_features.h index 70acc947..d06bd2f9 100644 --- a/include/ircd_features.h +++ b/include/ircd_features.h @@ -110,6 +110,7 @@ enum Feature { FEAT_CAP_ECHOMESSAGE, FEAT_CAP_EXTJOIN, FEAT_CAP_INVITENOTIFY, + FEAT_CAP_SASL, /* HEAD_IN_SAND Features */ FEAT_HIS_SNOTICES, diff --git a/include/msg.h b/include/msg.h index 2fba1e79..530ec4a2 100644 --- a/include/msg.h +++ b/include/msg.h @@ -376,6 +376,10 @@ struct Client; #define TOK_CHGHOST "CHGHOST" #define CMD_CHGHOST MSG_CHGHOST, TOK_CHGHOST +#define MSG_AUTHENTICATE "AUTHENTICATE" +#define TOK_AUTHENTICATE "AUTHENTICATE" +#define CMD_AUTHENTICATE MSG_AUTHENTICATE, TOK_AUTHENTICATE + /* * Constants */ diff --git a/include/numeric.h b/include/numeric.h index 7da37e91..4e45c175 100644 --- a/include/numeric.h +++ b/include/numeric.h @@ -468,7 +468,17 @@ extern const struct Numeric* get_error_numeric(int err); /* ERR_NOMANAGER_LONG 565 no longer used */ #define ERR_NOMANAGER 566 /* Undernet extension */ #define ERR_UPASS_SAME_APASS 567 /* Undernet extension */ -#define ERR_LASTERROR 568 +#define RPL_LOGGEDIN 900 /* IRCv3 */ +#define RPL_LOGGEDOUT 901 /* IRCv3 */ +#define ERR_NICKLOCKED 902 /* IRCv3 */ +#define RPL_SASLSUCCESS 903 /* IRCv3 */ +#define ERR_SASLFAIL 904 /* IRCv3 */ +#define ERR_SASLTOOLONG 905 /* IRCv3 */ +#define ERR_SASLABORTED 906 /* IRCv3 */ +#define ERR_SASLALREADY 907 /* IRCv3 */ +#define RPL_SASLMECHS 908 +#define ERR_CANNOTCHANGECHANMODE 974 /* IRCv3 */ +#define ERR_LASTERROR 999 /* RPL_LOGON 600 dalnet,unreal RPL_LOGOFF 601 dalnet,unreal diff --git a/include/s_auth.h b/include/s_auth.h index 657e925a..8c86dd92 100644 --- a/include/s_auth.h +++ b/include/s_auth.h @@ -50,6 +50,7 @@ extern void auth_send_xreply(struct Client *sptr, const char *routing, const cha extern void auth_mark_closing(void); extern void auth_close_unused(void); extern void auth_cancel_iauth_stats(struct Client *cptr); +extern int auth_set_sasl(struct AuthRequest *auth, const char *crypt); extern void report_iauth_conf(struct Client *cptr, const struct StatDesc *sd, char *param); extern void report_iauth_stats(struct Client *cptr, const struct StatDesc *sd, char *param); diff --git a/include/s_user.h b/include/s_user.h index 680a8261..9167e021 100644 --- a/include/s_user.h +++ b/include/s_user.h @@ -103,6 +103,7 @@ extern void add_target(struct Client *sptr, void *target); extern unsigned int umode_make_snomask(unsigned int oldmask, char *arg, int what); extern int send_supported(struct Client *cptr); +extern int register_sasl(struct Client* cptr, struct Client* sptr, int parc, char* parv[]); #define NAMES_ALL 1 /**< List all users in channel */ #define NAMES_VIS 2 /**< List only visible users in non-secret channels */ diff --git a/ircd/Makefile.in b/ircd/Makefile.in index 432c66e2..b2cace23 100644 --- a/ircd/Makefile.in +++ b/ircd/Makefile.in @@ -164,6 +164,7 @@ IRCD_SRC = \ m_restart.c \ m_rping.c \ m_rpong.c \ + m_sasl.c \ m_server.c \ m_set.c \ m_settime.c \ diff --git a/ircd/ircd_features.c b/ircd/ircd_features.c index 1f141259..b231cfa3 100644 --- a/ircd/ircd_features.c +++ b/ircd/ircd_features.c @@ -375,6 +375,7 @@ static struct FeatureDesc { F_B(CAP_ECHOMESSAGE, 0, 1, 0), F_B(CAP_EXTJOIN, 0, 1, 0), F_B(CAP_INVITENOTIFY, 0, 1, 0), + F_B(CAP_SASL, 0, 1, 0), /* HEAD_IN_SAND Features */ F_B(HIS_SNOTICES, 0, 1, 0), diff --git a/ircd/m_sasl.c b/ircd/m_sasl.c new file mode 100644 index 00000000..62b74984 --- /dev/null +++ b/ircd/m_sasl.c @@ -0,0 +1,117 @@ +/* + * IRC - Internet Relay Chat, ircd/m_sasl.c + * Copyright (C) 2002 Alex Badea + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: m_sasl.c,v 1.3.2.1 2025/04/01 04:04:32 entrope Exp $ + */ + +/* + * m_functions execute protocol messages on this server: + * + * cptr is always NON-NULL, pointing to a *LOCAL* client + * structure (with an open socket connected!). This + * identifies the physical socket where the message + * originated (or which caused the m_function to be + * executed--some m_functions may call others...). + * + * sptr is the source of the message, defined by the + * prefix part of the message if present. If not + * or prefix not found, then sptr==cptr. + * + * (!IsServer(cptr)) => (cptr == sptr), because + * prefixes are taken *only* from servers... + * + * (IsServer(cptr)) + * (sptr == cptr) => the message didn't + * have the prefix. + * + * (sptr != cptr && IsServer(sptr) means + * the prefix specified servername. (?) + * + * (sptr != cptr && !IsServer(sptr) means + * that message originated from a remote + * user (not local). + * + * combining + * + * (!IsServer(sptr)) means that, sptr can safely + * taken as defining the target structure of the + * message in this server. + * + * *Always* true (if 'parse' and others are working correct): + * + * 1) sptr->from == cptr (note: cptr->from == cptr) + * + * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr + * *cannot* be a local connection, unless it's + * actually cptr!). [MyConnect(x) should probably + * be defined as (x == x->from) --msa ] + * + * parc number of variable parameter strings (if zero, + * parv is allowed to be NULL) + * + * parv a NULL terminated list of parameter pointers, + * + * parv[0], sender (prefix string), if not present + * this points to an empty string. + * parv[1]...parv[parc-1] + * pointers to additional parameters + * parv[parc] == NULL, *always* + * + * note: it is guaranteed that parv[0]..parv[parc-1] are all + * non-NULL pointers. + */ +#include "config.h" + +#include "client.h" +#include "hash.h" +#include "ircd.h" +#include "ircd_alloc.h" +#include "ircd_features.h" +#include "ircd_log.h" +#include "ircd_relay.h" +#include "ircd_reply.h" +#include "ircd_string.h" +#include "ircd_snprintf.h" +#include "list.h" +#include "msg.h" +#include "numeric.h" +#include "numnicks.h" +#include "send.h" +#include "s_auth.h" +#include "s_conf.h" +#include "s_misc.h" +#include "s_user.h" + +/* #include -- Now using assert in ircd_log.h */ +#include +#include +#include + +/* + * m_sasl - client message handler + */ +int m_sasl(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) +{ + if (parc < 2 || *parv[1] == '\0') + return need_more_params(sptr, "AUTHENTICATE"); + register_sasl(cptr, sptr, parc, parv); + return 0; +} \ No newline at end of file diff --git a/ircd/parse.c b/ircd/parse.c index 6896d4d8..aa3ab953 100644 --- a/ircd/parse.c +++ b/ircd/parse.c @@ -658,6 +658,13 @@ struct Message msgtab[] = { /* UNREG, CLIENT, SERVER, OPER, SERVICE */ { m_quit, m_ignore, m_ignore, m_ignore, m_ignore } }, + { + MSG_AUTHENTICATE, + TOK_AUTHENTICATE, + 0, MAXPARA, 0, 0, NULL, + /* UNREG, CLIENT, SERVER, OPER, SERVICE */ + { m_sasl, m_ignore, m_ignore, m_ignore, m_ignore } + }, { 0 } }; diff --git a/ircd/s_auth.c b/ircd/s_auth.c index a78a51dd..7ead1447 100644 --- a/ircd/s_auth.c +++ b/ircd/s_auth.c @@ -771,6 +771,17 @@ static char* check_ident_reply(char* reply) return token; } +/** Handle SASL +*/ +int auth_set_sasl(struct AuthRequest *auth, const char *crypt) +{ + assert(auth != NULL); + if(CapHas(cli_active(auth->client), CAP_SASL)) { + sendto_iauth(auth->client, "Y %s", crypt); + } + return 0; +} + /** Read the reply (if any) from the ident server we connected to. We * only give it one shot, if the reply isn't good the first time fail * the authentication entirely. --Bleep @@ -1887,6 +1898,51 @@ static int iauth_cmd_username_forced(struct IAuth *iauth, struct Client *cli, return AR_AUTH_PENDING; } +/** Accept a client in IAuth and assign them to an account. + * @param[in] iauth Active IAuth session. + * @param[in] cli Client referenced by command. + * @param[in] parc Number of parameters. + * @param[in] params Account name and optional class name for client. + * @return Non-zero if \a cli authorization should be checked for completion. + */ +static int iauth_cmd_sasl(struct IAuth *iauth, struct Client *cli, + int parc, char **params) +{ + assert(cli_auth(cli) != NULL); + /* Sanity check. */ + if (EmptyString(params[0])) { + return 0; + } + char *cmd = params[0]; + if(!ircd_strcmp(cmd, "Q")) { + sendcmdto_one(&me, CMD_AUTHENTICATE, cli, params[1]); + } else if(!ircd_strcmp(cmd, "O")) { + send_reply(cli, ERR_SASLABORTED); + } else if(!ircd_strcmp(cmd, "S")) { + if (EmptyString(params[3]) || EmptyString(params[4])) { + return 0; + } + char *nick = params[1]; + char *account = params[2]; + char *timestamp = params[3]; + char *id = params[4]; + ircd_strncpy(cli_user(cli)->account, account, ACCOUNTLEN); + cli_user(cli)->acc_id = strtoul(id, NULL, 10); + SetAccount(cli); + send_reply(cli, RPL_LOGGEDIN, cli, cli_name(cli), account); + send_reply(cli, RPL_SASLSUCCESS); + } else if(!ircd_strcmp(cmd, "N")) { + send_reply(cli, ERR_NICKLOCKED); + send_reply(cli, ERR_SASLFAIL); + } else if(!ircd_strcmp(cmd, "A")) { + send_reply(cli, ERR_SASLALREADY); + send_reply(cli, ERR_SASLFAIL); + } else if(!ircd_strcmp(cmd, "F")) { + send_reply(cli, ERR_SASLFAIL); + } + return 0; +} + /** Set client's username to a trusted string. * @param[in] iauth Active IAuth session. * @param[in] cli Client referenced by command. @@ -2281,6 +2337,7 @@ static void iauth_parse(struct IAuth *iauth, char *message) case 's': handler = iauth_cmd_newstats; has_cli = 0; break; case 'S': handler = iauth_cmd_stats; has_cli = 0; break; case 'X': handler = iauth_cmd_xquery; has_cli = 0; break; + case 'Y': handler = iauth_cmd_sasl; has_cli = 1; break; case 'o': handler = iauth_cmd_username_forced; has_cli = 1; break; case 'U': handler = iauth_cmd_username_good; has_cli = 1; break; case 'u': handler = iauth_cmd_username_bad; has_cli = 1; break; diff --git a/ircd/s_err.c b/ircd/s_err.c index 3390ce12..3d1b20f6 100644 --- a/ircd/s_err.c +++ b/ircd/s_err.c @@ -1230,6 +1230,806 @@ static Numeric replyTable[] = { /* 598 */ { 0 }, /* 599 */ + { 0 }, +/* 600 */ + { 0 }, +/* 601 */ + { 0 }, +/* 602 */ + { 0 }, +/* 603 */ + { 0 }, +/* 604 */ + { 0 }, +/* 605 */ + { 0 }, +/* 606 */ + { 0 }, +/* 607 */ + { 0 }, +/* 608 */ + { 0 }, +/* 609 */ + { 0 }, +/* 610 */ + { 0 }, +/* 611 */ + { 0 }, +/* 612 */ + { 0 }, +/* 613 */ + { 0 }, +/* 614 */ + { 0 }, +/* 615 */ + { 0 }, +/* 616 */ + { 0 }, +/* 617 */ + { 0 }, +/* 618 */ + { 0 }, +/* 619 */ + { 0 }, +/* 620 */ + { 0 }, +/* 621 */ + { 0 }, +/* 622 */ + { 0 }, +/* 623 */ + { 0 }, +/* 624 */ + { 0 }, +/* 625 */ + { 0 }, +/* 626 */ + { 0 }, +/* 627 */ + { 0 }, +/* 628 */ + { 0 }, +/* 629 */ + { 0 }, +/* 630 */ + { 0 }, +/* 631 */ + { 0 }, +/* 632 */ + { 0 }, +/* 633 */ + { 0 }, +/* 634 */ + { 0 }, +/* 635 */ + { 0 }, +/* 636 */ + { 0 }, +/* 637 */ + { 0 }, +/* 638 */ + { 0 }, +/* 639 */ + { 0 }, +/* 640 */ + { 0 }, +/* 641 */ + { 0 }, +/* 642 */ + { 0 }, +/* 643 */ + { 0 }, +/* 644 */ + { 0 }, +/* 645 */ + { 0 }, +/* 646 */ + { 0 }, +/* 647 */ + { 0 }, +/* 648 */ + { 0 }, +/* 649 */ + { 0 }, +/* 650 */ + { 0 }, +/* 651 */ + { 0 }, +/* 652 */ + { 0 }, +/* 653 */ + { 0 }, +/* 654 */ + { 0 }, +/* 655 */ + { 0 }, +/* 656 */ + { 0 }, +/* 657 */ + { 0 }, +/* 658 */ + { 0 }, +/* 659 */ + { 0 }, +/* 660 */ + { 0 }, +/* 667 */ + { 0 }, +/* 668 */ + { 0 }, +/* 669 */ + { 0 }, +/* 664 */ + { 0 }, +/* 665 */ + { 0 }, +/* 666 */ + { 0 }, +/* 667 */ + { 0 }, +/* 668 */ + { 0 }, +/* 669 */ + { 0 }, +/* 670 */ + { 0 }, +/* 671 */ + { 0 }, +/* 672 */ + { 0 }, +/* 673 */ + { 0 }, +/* 674 */ + { 0 }, +/* 675 */ + { 0 }, +/* 676 */ + { 0 }, +/* 677 */ + { 0 }, +/* 678 */ + { 0 }, +/* 679 */ + { 0 }, +/* 680 */ + { 0 }, +/* 681 */ + { 0 }, +/* 682 */ + { 0 }, +/* 683 */ + { 0 }, +/* 684 */ + { 0 }, +/* 685 */ + { 0 }, +/* 686 */ + { 0 }, +/* 687 */ + { 0 }, +/* 688 */ + { 0 }, +/* 689 */ + { 0 }, +/* 690 */ + { 0 }, +/* 691 */ + { 0 }, +/* 692 */ + { 0 }, +/* 693 */ + { 0 }, +/* 694 */ + { 0 }, +/* 695 */ + { 0 }, +/* 696 */ + { 0 }, +/* 697 */ + { 0 }, +/* 698 */ + { 0 }, +/* 699 */ + { 0 }, +/* 700 */ + { 0 }, +/* 701 */ + { 0 }, +/* 702 */ + { 0 }, +/* 703 */ + { 0 }, +/* 704 */ + { 0 }, +/* 705 */ + { 0 }, +/* 707 */ + { 0 }, +/* 707 */ + { 0 }, +/* 708 */ + { 0 }, +/* 709 */ + { 0 }, +/* 710 */ + { 0 }, +/* 711 */ + { 0 }, +/* 712 */ + { 0 }, +/* 713 */ + { 0 }, +/* 714 */ + { 0 }, +/* 715 */ + { 0 }, +/* 717 */ + { 0 }, +/* 717 */ + { 0 }, +/* 718 */ + { 0 }, +/* 719 */ + { 0 }, +/* 720 */ + { 0 }, +/* 721 */ + { 0 }, +/* 722 */ + { 0 }, +/* 723 */ + { 0 }, +/* 724 */ + { 0 }, +/* 725 */ + { 0 }, +/* 727 */ + { 0 }, +/* 727 */ + { 0 }, +/* 728 */ + { 0 }, +/* 729 */ + { 0 }, +/* 730 */ + { 0 }, +/* 731 */ + { 0 }, +/* 732 */ + { 0 }, +/* 733 */ + { 0 }, +/* 734 */ + { 0 }, +/* 735 */ + { 0 }, +/* 737 */ + { 0 }, +/* 737 */ + { 0 }, +/* 738 */ + { 0 }, +/* 739 */ + { 0 }, +/* 740 */ + { 0 }, +/* 741 */ + { 0 }, +/* 742 */ + { 0 }, +/* 743 */ + { 0 }, +/* 744 */ + { 0 }, +/* 745 */ + { 0 }, +/* 747 */ + { 0 }, +/* 747 */ + { 0 }, +/* 748 */ + { 0 }, +/* 749 */ + { 0 }, +/* 750 */ + { 0 }, +/* 751 */ + { 0 }, +/* 752 */ + { 0 }, +/* 753 */ + { 0 }, +/* 754 */ + { 0 }, +/* 755 */ + { 0 }, +/* 757 */ + { 0 }, +/* 757 */ + { 0 }, +/* 758 */ + { 0 }, +/* 759 */ + { 0 }, +/* 770 */ + { 0 }, +/* 777 */ + { 0 }, +/* 778 */ + { 0 }, +/* 779 */ + { 0 }, +/* 774 */ + { 0 }, +/* 775 */ + { 0 }, +/* 777 */ + { 0 }, +/* 777 */ + { 0 }, +/* 778 */ + { 0 }, +/* 779 */ + { 0 }, +/* 770 */ + { 0 }, +/* 771 */ + { 0 }, +/* 772 */ + { 0 }, +/* 773 */ + { 0 }, +/* 774 */ + { 0 }, +/* 775 */ + { 0 }, +/* 777 */ + { 0 }, +/* 777 */ + { 0 }, +/* 778 */ + { 0 }, +/* 779 */ + { 0 }, +/* 780 */ + { 0 }, +/* 781 */ + { 0 }, +/* 782 */ + { 0 }, +/* 783 */ + { 0 }, +/* 784 */ + { 0 }, +/* 785 */ + { 0 }, +/* 787 */ + { 0 }, +/* 787 */ + { 0 }, +/* 788 */ + { 0 }, +/* 789 */ + { 0 }, +/* 790 */ + { 0 }, +/* 791 */ + { 0 }, +/* 792 */ + { 0 }, +/* 793 */ + { 0 }, +/* 794 */ + { 0 }, +/* 795 */ + { 0 }, +/* 797 */ + { 0 }, +/* 797 */ + { 0 }, +/* 798 */ + { 0 }, +/* 799 */ + { 0 }, +/* 800 */ + { 0 }, +/* 801 */ + { 0 }, +/* 802 */ + { 0 }, +/* 803 */ + { 0 }, +/* 804 */ + { 0 }, +/* 805 */ + { 0 }, +/* 808 */ + { 0 }, +/* 807 */ + { 0 }, +/* 808 */ + { 0 }, +/* 809 */ + { 0 }, +/* 810 */ + { 0 }, +/* 811 */ + { 0 }, +/* 812 */ + { 0 }, +/* 813 */ + { 0 }, +/* 814 */ + { 0 }, +/* 815 */ + { 0 }, +/* 818 */ + { 0 }, +/* 817 */ + { 0 }, +/* 818 */ + { 0 }, +/* 819 */ + { 0 }, +/* 820 */ + { 0 }, +/* 821 */ + { 0 }, +/* 822 */ + { 0 }, +/* 823 */ + { 0 }, +/* 824 */ + { 0 }, +/* 825 */ + { 0 }, +/* 828 */ + { 0 }, +/* 827 */ + { 0 }, +/* 828 */ + { 0 }, +/* 829 */ + { 0 }, +/* 830 */ + { 0 }, +/* 831 */ + { 0 }, +/* 832 */ + { 0 }, +/* 833 */ + { 0 }, +/* 834 */ + { 0 }, +/* 835 */ + { 0 }, +/* 838 */ + { 0 }, +/* 837 */ + { 0 }, +/* 838 */ + { 0 }, +/* 839 */ + { 0 }, +/* 840 */ + { 0 }, +/* 841 */ + { 0 }, +/* 842 */ + { 0 }, +/* 843 */ + { 0 }, +/* 844 */ + { 0 }, +/* 845 */ + { 0 }, +/* 848 */ + { 0 }, +/* 847 */ + { 0 }, +/* 848 */ + { 0 }, +/* 849 */ + { 0 }, +/* 850 */ + { 0 }, +/* 851 */ + { 0 }, +/* 852 */ + { 0 }, +/* 853 */ + { 0 }, +/* 854 */ + { 0 }, +/* 855 */ + { 0 }, +/* 858 */ + { 0 }, +/* 857 */ + { 0 }, +/* 858 */ + { 0 }, +/* 859 */ + { 0 }, +/* 880 */ + { 0 }, +/* 887 */ + { 0 }, +/* 888 */ + { 0 }, +/* 889 */ + { 0 }, +/* 884 */ + { 0 }, +/* 885 */ + { 0 }, +/* 888 */ + { 0 }, +/* 887 */ + { 0 }, +/* 888 */ + { 0 }, +/* 889 */ + { 0 }, +/* 870 */ + { 0 }, +/* 871 */ + { 0 }, +/* 872 */ + { 0 }, +/* 873 */ + { 0 }, +/* 874 */ + { 0 }, +/* 875 */ + { 0 }, +/* 878 */ + { 0 }, +/* 877 */ + { 0 }, +/* 878 */ + { 0 }, +/* 879 */ + { 0 }, +/* 880 */ + { 0 }, +/* 881 */ + { 0 }, +/* 882 */ + { 0 }, +/* 883 */ + { 0 }, +/* 884 */ + { 0 }, +/* 885 */ + { 0 }, +/* 888 */ + { 0 }, +/* 887 */ + { 0 }, +/* 888 */ + { 0 }, +/* 889 */ + { 0 }, +/* 890 */ + { 0 }, +/* 891 */ + { 0 }, +/* 892 */ + { 0 }, +/* 893 */ + { 0 }, +/* 894 */ + { 0 }, +/* 895 */ + { 0 }, +/* 898 */ + { 0 }, +/* 897 */ + { 0 }, +/* 898 */ + { 0 }, +/* 899 */ + { 0 }, +/* 900 */ + { RPL_LOGGEDIN, "%C %s :You are now logged in as %s", "900" }, +/* 901 */ + { RPL_LOGGEDOUT, "%C :You are now logged out", "901" }, +/* 902 */ + { ERR_NICKLOCKED, ":You must use a nick assigned to you", "902" }, +/* 903 */ + { RPL_SASLSUCCESS, ":SASL authentication successful", "903" }, +/* 904 */ + { ERR_SASLFAIL, ":SASL authentication failed", "904" }, +/* 905 */ + { ERR_SASLTOOLONG, ":SASL message too long", "905" }, +/* 909 */ + { ERR_SASLABORTED, ":SASL authentication aborted", "906" }, +/* 907 */ + { ERR_SASLALREADY, ":You have already authenticated using SASL", "907" }, +/* 908 */ + { RPL_SASLMECHS, "%s :are available SASL mechanisms", "908" }, +/* 909 */ + { 0 }, +/* 910 */ + { 0 }, +/* 911 */ + { 0 }, +/* 912 */ + { 0 }, +/* 913 */ + { 0 }, +/* 914 */ + { 0 }, +/* 915 */ + { 0 }, +/* 919 */ + { 0 }, +/* 917 */ + { 0 }, +/* 918 */ + { 0 }, +/* 919 */ + { 0 }, +/* 920 */ + { 0 }, +/* 921 */ + { 0 }, +/* 922 */ + { 0 }, +/* 923 */ + { 0 }, +/* 924 */ + { 0 }, +/* 925 */ + { 0 }, +/* 929 */ + { 0 }, +/* 927 */ + { 0 }, +/* 928 */ + { 0 }, +/* 929 */ + { 0 }, +/* 930 */ + { 0 }, +/* 931 */ + { 0 }, +/* 932 */ + { 0 }, +/* 933 */ + { 0 }, +/* 934 */ + { 0 }, +/* 935 */ + { 0 }, +/* 939 */ + { 0 }, +/* 937 */ + { 0 }, +/* 938 */ + { 0 }, +/* 939 */ + { 0 }, +/* 940 */ + { 0 }, +/* 941 */ + { 0 }, +/* 942 */ + { 0 }, +/* 943 */ + { 0 }, +/* 944 */ + { 0 }, +/* 945 */ + { 0 }, +/* 949 */ + { 0 }, +/* 947 */ + { 0 }, +/* 948 */ + { 0 }, +/* 949 */ + { 0 }, +/* 950 */ + { 0 }, +/* 951 */ + { 0 }, +/* 952 */ + { 0 }, +/* 953 */ + { 0 }, +/* 954 */ + { 0 }, +/* 955 */ + { 0 }, +/* 959 */ + { 0 }, +/* 957 */ + { 0 }, +/* 958 */ + { 0 }, +/* 959 */ + { 0 }, +/* 990 */ + { 0 }, +/* 997 */ + { 0 }, +/* 998 */ + { 0 }, +/* 999 */ + { 0 }, +/* 994 */ + { 0 }, +/* 995 */ + { 0 }, +/* 999 */ + { 0 }, +/* 997 */ + { 0 }, +/* 998 */ + { 0 }, +/* 999 */ + { 0 }, +/* 970 */ + { 0 }, +/* 971 */ + { 0 }, +/* 972 */ + { 0 }, +/* 973 */ + { 0 }, +/* 974 */ + { 0 }, +/* 975 */ + { 0 }, +/* 979 */ + { 0 }, +/* 977 */ + { 0 }, +/* 978 */ + { 0 }, +/* 979 */ + { 0 }, +/* 980 */ + { 0 }, +/* 981 */ + { 0 }, +/* 982 */ + { 0 }, +/* 983 */ + { 0 }, +/* 984 */ + { 0 }, +/* 985 */ + { 0 }, +/* 989 */ + { 0 }, +/* 987 */ + { 0 }, +/* 988 */ + { 0 }, +/* 989 */ + { 0 }, +/* 990 */ + { 0 }, +/* 991 */ + { 0 }, +/* 992 */ + { 0 }, +/* 993 */ + { 0 }, +/* 994 */ + { 0 }, +/* 995 */ + { 0 }, +/* 999 */ + { 0 }, +/* 997 */ + { 0 }, +/* 998 */ + { 0 }, +/* 999 */ { 0 } }; diff --git a/ircd/s_user.c b/ircd/s_user.c index 13c61cb1..494c02bf 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -1522,5 +1522,11 @@ send_supported(struct Client *cptr) return 0; /* convenience return, if it's ever needed */ } -/* vim: shiftwidth=2 - */ +/** + * Registers SASL + */ +int +register_sasl(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) +{ + auth_set_sasl(cli_auth(sptr), parv[1]); +} \ No newline at end of file From 82d2bcd731f2294ca3cdedc08fabd555a72aa428 Mon Sep 17 00:00:00 2001 From: WarPigs1602 Date: Tue, 8 Apr 2025 14:25:18 +0200 Subject: [PATCH 2/6] Fixed flags on SASL --- ircd/s_auth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ircd/s_auth.c b/ircd/s_auth.c index 7ead1447..f068d855 100644 --- a/ircd/s_auth.c +++ b/ircd/s_auth.c @@ -1924,10 +1924,11 @@ static int iauth_cmd_sasl(struct IAuth *iauth, struct Client *cli, } char *nick = params[1]; char *account = params[2]; - char *timestamp = params[3]; + char *flags = params[3]; char *id = params[4]; ircd_strncpy(cli_user(cli)->account, account, ACCOUNTLEN); cli_user(cli)->acc_id = strtoul(id, NULL, 10); + cli_user(cli)->acc_flags = atoi(flags); SetAccount(cli); send_reply(cli, RPL_LOGGEDIN, cli, cli_name(cli), account); send_reply(cli, RPL_SASLSUCCESS); From d27a56c8928c509c19bd004e55b741f0ce1b7ea1 Mon Sep 17 00:00:00 2001 From: WarPigs1602 Date: Wed, 9 Apr 2025 16:24:03 +0200 Subject: [PATCH 3/6] Update s_auth.c --- ircd/s_auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ircd/s_auth.c b/ircd/s_auth.c index f068d855..dd46853c 100644 --- a/ircd/s_auth.c +++ b/ircd/s_auth.c @@ -1927,7 +1927,7 @@ static int iauth_cmd_sasl(struct IAuth *iauth, struct Client *cli, char *flags = params[3]; char *id = params[4]; ircd_strncpy(cli_user(cli)->account, account, ACCOUNTLEN); - cli_user(cli)->acc_id = strtoul(id, NULL, 10); + cli_user(cli)->acc_id = atoi(id); cli_user(cli)->acc_flags = atoi(flags); SetAccount(cli); send_reply(cli, RPL_LOGGEDIN, cli, cli_name(cli), account); From a91ebc6c3fef31078291a36ee25fad7c2e129e41 Mon Sep 17 00:00:00 2001 From: Andreas Pschorn Date: Thu, 17 Apr 2025 20:11:58 +0200 Subject: [PATCH 4/6] Update m_sasl.c --- ircd/m_sasl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ircd/m_sasl.c b/ircd/m_sasl.c index 62b74984..622743e1 100644 --- a/ircd/m_sasl.c +++ b/ircd/m_sasl.c @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: m_sasl.c,v 1.3.2.1 2025/04/01 04:04:32 entrope Exp $ + * $Id$ */ /* @@ -114,4 +114,4 @@ int m_sasl(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) return need_more_params(sptr, "AUTHENTICATE"); register_sasl(cptr, sptr, parc, parv); return 0; -} \ No newline at end of file +} From bac3b1dc5d1ce578cac5e14669ebf393ce6c663c Mon Sep 17 00:00:00 2001 From: Andreas Pschorn Date: Sun, 22 Jun 2025 18:41:22 +0200 Subject: [PATCH 5/6] Update s_auth.c --- ircd/s_auth.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/ircd/s_auth.c b/ircd/s_auth.c index dd46853c..57aae0dd 100644 --- a/ircd/s_auth.c +++ b/ircd/s_auth.c @@ -1924,22 +1924,33 @@ static int iauth_cmd_sasl(struct IAuth *iauth, struct Client *cli, } char *nick = params[1]; char *account = params[2]; - char *flags = params[3]; + char *timestamp = params[3]; char *id = params[4]; ircd_strncpy(cli_user(cli)->account, account, ACCOUNTLEN); - cli_user(cli)->acc_id = atoi(id); - cli_user(cli)->acc_flags = atoi(flags); + cli_user(cli)->acc_create = atoi(timestamp); + cli_user(cli)->acc_id = strtoul(id, NULL, 10); SetAccount(cli); + ircd_snprintf(0, cli_user(cli)->authhost, HOSTLEN, "%s.%s", account, feature_str(FEAT_HIDDEN_HOST)); + int killreason = find_kill(cli,1); + if (killreason) + { + ++ServerStats->is_ref; + return exit_client(cli, cli, &me, + (killreason == -1 ? "K-lined" : "G-lined")); + } send_reply(cli, RPL_LOGGEDIN, cli, cli_name(cli), account); send_reply(cli, RPL_SASLSUCCESS); } else if(!ircd_strcmp(cmd, "N")) { - send_reply(cli, ERR_NICKLOCKED); + send_reply(cli, ERR_NICKLOCKED); + send_reply(cli, ERR_SASLFAIL); + } else if(!ircd_strcmp(cmd, "L")) { + send_reply(cli, ERR_SASLTOOLONG); send_reply(cli, ERR_SASLFAIL); } else if(!ircd_strcmp(cmd, "A")) { send_reply(cli, ERR_SASLALREADY); - send_reply(cli, ERR_SASLFAIL); + send_reply(cli, ERR_SASLFAIL); } else if(!ircd_strcmp(cmd, "F")) { - send_reply(cli, ERR_SASLFAIL); + send_reply(cli, ERR_SASLFAIL); } return 0; } From 82eaf497ed9de419f79864e2613133c15dfac77f Mon Sep 17 00:00:00 2001 From: WarPigs1602 Date: Wed, 19 Nov 2025 12:00:47 +0100 Subject: [PATCH 6/6] Fixed some issues in the SASL auth --- configure | 1980 +++++++++++++++++++++----------------------- configure.ac | 4 +- include/handlers.h | 1 + include/s_user.h | 1 - ircd/m_sasl.c | 30 +- ircd/parse.c | 2 +- ircd/s_auth.c | 106 ++- ircd/s_user.c | 9 - 8 files changed, 1044 insertions(+), 1089 deletions(-) diff --git a/configure b/configure index a1c24222..8c95d5d7 100755 --- a/configure +++ b/configure @@ -1,9 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72. +# Generated by GNU Autoconf 2.71. # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, # Inc. # # @@ -15,6 +15,7 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh +as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -23,13 +24,12 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else case e in #( - e) case `(set -o) 2>/dev/null` in #( +else $as_nop + case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; -esac ;; esac fi @@ -101,7 +101,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as 'sh COMMAND' +# We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -131,14 +131,15 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed 'exec'. +# out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: @@ -146,13 +147,12 @@ then : # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else case e in #( - e) case \`(set -o) 2>/dev/null\` in #( +else \$as_nop + case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; -esac ;; esac fi " @@ -170,9 +170,8 @@ 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 case e in #( - e) exitcode=1; echo positional parameters were not saved. ;; -esac +else \$as_nop + exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) @@ -186,15 +185,14 @@ test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes -else case e in #( - e) as_have_required=no ;; -esac +else $as_nop + as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : -else case e in #( - e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do @@ -227,13 +225,12 @@ IFS=$as_save_IFS if $as_found then : -else case e in #( - e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes -fi ;; -esac +fi fi @@ -255,7 +252,7 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed 'exec'. +# out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi @@ -274,8 +271,7 @@ $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 ;; -esac +fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -314,6 +310,14 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -382,12 +386,11 @@ then : { eval $1+=\$2 }' -else case e in #( - e) as_fn_append () +else $as_nop + as_fn_append () { eval $1=\$$1\$2 - } ;; -esac + } fi # as_fn_append # as_fn_arith ARG... @@ -401,14 +404,21 @@ then : { as_val=$(( $* )) }' -else case e in #( - e) as_fn_arith () +else $as_nop + as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } ;; -esac + } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -482,8 +492,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' - t clear - :clear s/[$]LINENO.*/&-/ t lineno b @@ -532,6 +540,7 @@ esac as_echo='printf %s\n' as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -543,9 +552,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. - # In both cases, we have to default to 'cp -pR'. + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -570,12 +579,10 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" -as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -as_tr_sh="eval sed '$as_sed_sh'" # deprecated +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 /dev/null && - as_fn_error $? "invalid feature name: '$ac_useropt'" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -891,7 +900,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_fn_error $? "invalid feature name: '$ac_useropt'" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1104,7 +1113,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_fn_error $? "invalid package name: '$ac_useropt'" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1120,7 +1129,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_fn_error $? "invalid package name: '$ac_useropt'" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1150,8 +1159,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: '$ac_option' -Try '$0 --help' for more information" + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1159,7 +1168,7 @@ Try '$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: '$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1209,7 +1218,7 @@ do 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' +# There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1277,7 +1286,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 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_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` @@ -1305,7 +1314,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures this package to adapt to many kinds of systems. +\`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1319,11 +1328,11 @@ 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' + -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or '..'] + --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1331,10 +1340,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, 'make install' will install all the files in -'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify -an installation prefix other than '$ac_default_prefix' using '--prefix', -for instance '--prefix=\$HOME'. +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. For better control, use the options below. @@ -1421,14 +1430,15 @@ Some influential environment variables: directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path - YACC The 'Yet Another Compiler Compiler' implementation to use. - Defaults to the first program found out of: 'bison -y', 'byacc', - 'yacc'. + CPP C preprocessor + YACC The `Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: `bison -y', `byacc', + `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a - default value of '-d' given by some make applications. + default value of `-d' given by some make applications. -Use these variables to override the choices made by 'configure' or to help +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. @@ -1496,9 +1506,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.72 +generated by GNU Autoconf 2.71 -Copyright (C) 2023 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1537,12 +1547,11 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else case e in #( - e) printf "%s\n" "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 ;; -esac + ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1580,12 +1589,11 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else case e in #( - e) printf "%s\n" "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 ;; -esac + 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 @@ -1608,15 +1616,15 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + 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 (void); below. */ + which can conflict with char $2 (); below. */ #include #undef $2 @@ -1627,7 +1635,7 @@ else case e in #( #ifdef __cplusplus extern "C" #endif -char $2 (void); +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. */ @@ -1646,13 +1654,11 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" -else case e in #( - e) eval "$3=no" ;; -esac +else $as_nop + eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext ;; -esac + conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -1673,8 +1679,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> @@ -1682,12 +1688,10 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else case e in #( - e) eval "$3=no" ;; -esac +else $as_nop + eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -1726,13 +1730,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 test $ac_status = 0; }; } then : ac_retval=0 -else case e in #( - e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 +else $as_nop + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status ;; -esac + ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno @@ -1752,8 +1755,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else case e in #( - e) eval "$3=no" +else $as_nop + eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @@ -1783,14 +1786,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else case e in #( - e) eval "$3=yes" ;; -esac +else $as_nop + eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -1799,6 +1800,44 @@ printf "%s\n" "$ac_res" >&6; } } # ac_fn_c_check_type +# 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\"" +printf "%s\n" "$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 + printf "%s\n" "$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_nop + printf "%s\n" "$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_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes @@ -1844,19 +1883,18 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid; break -else case e in #( - e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val +else $as_nop + as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; -esac + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int @@ -1891,23 +1929,20 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=$ac_mid; break -else case e in #( - e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val +else $as_nop + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; -esac + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else case e in #( - e) ac_lo= ac_hi= ;; -esac +else $as_nop + ac_lo= ac_hi= fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. @@ -1930,9 +1965,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid -else case e in #( - e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; -esac +else $as_nop + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done @@ -1980,9 +2014,8 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : echo >>conftest.val; read $3 &6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$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; } +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2303,7 +2336,9 @@ struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (char **p, int i) +static char *e (p, i) + char **p; + int i; { return p[i]; } @@ -2317,21 +2352,6 @@ static char *f (char * (*g) (char **, int), char **p, ...) return s; } -/* C89 style stringification. */ -#define noexpand_stringify(a) #a -const char *stringified = noexpand_stringify(arbitrary+token=sequence); - -/* C89 style token pasting. Exercises some of the corner cases that - e.g. old MSVC gets wrong, but not very hard. */ -#define noexpand_concat(a,b) a##b -#define expand_concat(a,b) noexpand_concat(a,b) -extern int vA; -extern int vbee; -#define aye A -#define bee B -int *pvA = &expand_concat(v,aye); -int *pvbee = &noexpand_concat(v,bee); - /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated @@ -2359,19 +2379,16 @@ ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' -/* Does the compiler advertise C99 conformance? */ +// Does the compiler advertise C99 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif -// See if C++-style comments work. - #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); -extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare @@ -2421,6 +2438,7 @@ typedef const char *ccp; static inline int test_restrict (ccp restrict text) { + // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) @@ -2486,8 +2504,6 @@ ac_c_conftest_c99_main=' ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; - // Work around memory leak warnings. - free (ia); // Check named initializers. struct named_init ni = { @@ -2509,7 +2525,7 @@ ac_c_conftest_c99_main=' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' -/* Does the compiler advertise C11 conformance? */ +// Does the compiler advertise C11 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif @@ -2702,9 +2718,8 @@ IFS=$as_save_IFS if $as_found then : -else case e in #( - e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; -esac +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 fi @@ -2732,12 +2747,12 @@ 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,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -2746,18 +2761,18 @@ printf "%s\n" "$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 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. @@ -2773,11 +2788,11 @@ printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## @@ -2799,9 +2814,8 @@ printf %s "checking for installation prefix... " >&6; } if test ${unet_cv_prefix+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_prefix=$HOME ;; -esac +else $as_nop + unet_cv_prefix=$HOME fi if test x"$prefix" != xNONE; then @@ -2828,16 +2842,15 @@ printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_build_alias=$build_alias +else $as_nop + 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_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_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } @@ -2864,15 +2877,14 @@ printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test "x$host_alias" = x; then +else $as_nop + 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_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } @@ -2917,8 +2929,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2940,8 +2952,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -2963,8 +2974,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC"; then +else $as_nop + if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2986,8 +2997,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -3022,8 +3032,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3045,8 +3055,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3068,8 +3077,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no @@ -3108,8 +3117,7 @@ if test $ac_prog_rejected = yes; then ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3133,8 +3141,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3156,8 +3164,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3183,8 +3190,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC"; then +else $as_nop + if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3206,8 +3213,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -3245,8 +3251,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3268,8 +3274,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3291,8 +3296,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC"; then +else $as_nop + if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3314,8 +3319,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -3344,10 +3348,10 @@ fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3419,8 +3423,8 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$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' + # 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, # so that the user can short-circuit this test for compilers unknown to # Autoconf. @@ -3440,7 +3444,7 @@ do ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an '-o' + # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. @@ -3451,9 +3455,8 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else case e in #( - e) ac_file='' ;; -esac +else $as_nop + ac_file='' fi if test -z "$ac_file" then : @@ -3462,14 +3465,13 @@ printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See 'config.log' for more details" "$LINENO" 5; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } @@ -3493,10 +3495,10 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$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 -# 'rm'. + # 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 +# `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in @@ -3506,12 +3508,11 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else case e in #( - e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See 'config.log' for more details" "$LINENO" 5; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3527,8 +3528,6 @@ int main (void) { FILE *f = fopen ("conftest.out", "w"); - if (!f) - return 1; return ferror (f) || fclose (f) != 0; ; @@ -3568,27 +3567,26 @@ printf "%s\n" "$ac_try_echo"; } >&5 if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. -If you meant to cross compile, use '--host'. -See 'config.log' for more details" "$LINENO" 5; } +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } -rm -f conftest.$ac_ext conftest$ac_cv_exeext \ - conftest.o conftest.obj conftest.out +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3620,18 +3618,16 @@ then : break;; esac done -else case e in #( - e) printf "%s\n" "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See 'config.log' for more details" "$LINENO" 5; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; -esac +rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } @@ -3642,8 +3638,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3660,14 +3656,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes -else case e in #( - e) ac_compiler_gnu=no ;; -esac +else $as_nop + ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } @@ -3685,8 +3679,8 @@ printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_save_c_werror_flag=$ac_c_werror_flag +else $as_nop + ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -3704,8 +3698,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes -else case e in #( - e) CFLAGS="" +else $as_nop + CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3720,8 +3714,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else case e in #( - e) ac_c_werror_flag=$ac_save_c_werror_flag +else $as_nop + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3738,15 +3732,12 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag ;; -esac + ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } @@ -3773,8 +3764,8 @@ printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_prog_cc_c11=no +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3791,28 +3782,25 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC ;; -esac +CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_prog_cc_c11" = x +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" ;; -esac + CC="$CC $ac_cv_prog_cc_c11" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 ;; -esac + ac_prog_cc_stdc=c11 fi fi if test x$ac_prog_cc_stdc = xno @@ -3822,8 +3810,8 @@ printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_prog_cc_c99=no +else $as_nop + ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3840,28 +3828,25 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC ;; -esac +CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_prog_cc_c99" = x +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" ;; -esac + CC="$CC $ac_cv_prog_cc_c99" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 ;; -esac + ac_prog_cc_stdc=c99 fi fi if test x$ac_prog_cc_stdc = xno @@ -3871,8 +3856,8 @@ printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_prog_cc_c89=no +else $as_nop + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3889,28 +3874,25 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC ;; -esac +CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_prog_cc_c89" = x +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" ;; -esac + CC="$CC $ac_cv_prog_cc_c89" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 ;; -esac + ac_prog_cc_stdc=c89 fi fi @@ -3934,8 +3916,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3957,8 +3939,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3980,8 +3961,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC"; then +else $as_nop + if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4003,8 +3984,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -4039,8 +4019,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4062,8 +4042,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4085,8 +4064,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no @@ -4125,8 +4104,7 @@ if test $ac_prog_rejected = yes; then ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4150,8 +4128,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4173,8 +4151,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4200,8 +4177,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC"; then +else $as_nop + if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4223,8 +4200,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -4262,8 +4238,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4285,8 +4261,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4308,8 +4283,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC"; then +else $as_nop + if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4331,8 +4306,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -4361,10 +4335,10 @@ fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -4396,8 +4370,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4414,14 +4388,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes -else case e in #( - e) ac_compiler_gnu=no ;; -esac +else $as_nop + ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } @@ -4439,8 +4411,8 @@ printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_save_c_werror_flag=$ac_c_werror_flag +else $as_nop + ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -4458,8 +4430,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes -else case e in #( - e) CFLAGS="" +else $as_nop + CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4474,8 +4446,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else case e in #( - e) ac_c_werror_flag=$ac_save_c_werror_flag +else $as_nop + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4492,15 +4464,12 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag ;; -esac + ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } @@ -4527,8 +4496,8 @@ printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_prog_cc_c11=no +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4545,28 +4514,25 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC ;; -esac +CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_prog_cc_c11" = x +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" ;; -esac + CC="$CC $ac_cv_prog_cc_c11" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 ;; -esac + ac_prog_cc_stdc=c11 fi fi if test x$ac_prog_cc_stdc = xno @@ -4576,8 +4542,8 @@ printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_prog_cc_c99=no +else $as_nop + ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4594,28 +4560,25 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC ;; -esac +CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_prog_cc_c99" = x +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" ;; -esac + CC="$CC $ac_cv_prog_cc_c99" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 ;; -esac + ac_prog_cc_stdc=c99 fi fi if test x$ac_prog_cc_stdc = xno @@ -4625,8 +4588,8 @@ printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_prog_cc_c89=no +else $as_nop + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4643,28 +4606,25 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC ;; -esac +CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_prog_cc_c89" = x +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" ;; -esac + CC="$CC $ac_cv_prog_cc_c89" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 ;; -esac + ac_prog_cc_stdc=c89 fi fi @@ -4691,8 +4651,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 -else case e in #( - e) case $PKG_CONFIG in +else $as_nop + case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; @@ -4717,7 +4677,6 @@ done IFS=$as_save_IFS ;; -esac ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG @@ -4740,8 +4699,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 -else case e in #( - e) case $ac_pt_PKG_CONFIG in +else $as_nop + case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; @@ -4766,7 +4725,6 @@ done IFS=$as_save_IFS ;; -esac ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG @@ -4815,21 +4773,15 @@ printf %s "checking for library containing crypt... " >&6; } if test ${ac_cv_search_crypt+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_func_search_save_LIBS=$LIBS +else $as_nop + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char crypt (void); + builtin and then its argument prototype would still apply. */ +char crypt (); int main (void) { @@ -4860,13 +4812,11 @@ done if test ${ac_cv_search_crypt+y} then : -else case e in #( - e) ac_cv_search_crypt=no ;; -esac +else $as_nop + ac_cv_search_crypt=no fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS ;; -esac +LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5 printf "%s\n" "$ac_cv_search_crypt" >&6; } @@ -4875,9 +4825,8 @@ if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else case e in #( - e) as_fn_error $? "Unable to find library containing crypt()" "$LINENO" 5 ;; -esac +else $as_nop + as_fn_error $? "Unable to find library containing crypt()" "$LINENO" 5 fi @@ -4888,29 +4837,23 @@ fi if test "x$ac_cv_func_gethostbyname" = xyes then : -else case e in #( - e) # Some OSes (eg. Solaris) place it in libnsl: +else $as_nop + # Some OSes (eg. Solaris) place it in libnsl: { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 printf %s "checking for gethostbyname in -lnsl... " >&6; } if test ${ac_cv_lib_nsl_gethostbyname+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else $as_nop + ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (void); + builtin and then its argument prototype would still apply. */ +char gethostbyname (); int main (void) { @@ -4922,14 +4865,12 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_nsl_gethostbyname=yes -else case e in #( - e) ac_cv_lib_nsl_gethostbyname=no ;; -esac +else $as_nop + ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; } @@ -4939,29 +4880,23 @@ then : LIBS="-lnsl $LIBS" -else case e in #( - e) # Some strange OSes (SINIX) have it in libsocket: +else $as_nop + # Some strange OSes (SINIX) have it in libsocket: { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5 printf %s "checking for gethostbyname in -lsocket... " >&6; } if test ${ac_cv_lib_socket_gethostbyname+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else $as_nop + ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (void); + builtin and then its argument prototype would still apply. */ +char gethostbyname (); int main (void) { @@ -4973,14 +4908,12 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_socket_gethostbyname=yes -else case e in #( - e) ac_cv_lib_socket_gethostbyname=no ;; -esac +else $as_nop + ac_cv_lib_socket_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname" >&5 printf "%s\n" "$ac_cv_lib_socket_gethostbyname" >&6; } @@ -4990,8 +4923,8 @@ then : LIBS="-lsocket $LIBS" -else case e in #( - e) # Unfortunately libsocket sometimes depends on libnsl. +else $as_nop + # Unfortunately libsocket sometimes depends on libnsl. # AC_CHECK_LIB's API is essentially broken so the following # ugliness is necessary: { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5 @@ -4999,22 +4932,16 @@ printf %s "checking for gethostbyname in -lsocket... " >&6; } if test ${ac_cv_lib_socket_gethostbyname+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else $as_nop + ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket -lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (void); + builtin and then its argument prototype would still apply. */ +char gethostbyname (); int main (void) { @@ -5026,42 +4953,34 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_socket_gethostbyname=yes -else case e in #( - e) ac_cv_lib_socket_gethostbyname=no ;; -esac +else $as_nop + ac_cv_lib_socket_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname" >&5 printf "%s\n" "$ac_cv_lib_socket_gethostbyname" >&6; } if test "x$ac_cv_lib_socket_gethostbyname" = xyes then : LIBS="-lsocket -lnsl $LIBS" -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lresolv" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lresolv" >&5 printf %s "checking for gethostbyname in -lresolv... " >&6; } if test ${ac_cv_lib_resolv_gethostbyname+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else $as_nop + ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (void); + builtin and then its argument prototype would still apply. */ +char gethostbyname (); int main (void) { @@ -5073,14 +4992,12 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_resolv_gethostbyname=yes -else case e in #( - e) ac_cv_lib_resolv_gethostbyname=no ;; -esac +else $as_nop + ac_cv_lib_resolv_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_gethostbyname" >&5 printf "%s\n" "$ac_cv_lib_resolv_gethostbyname" >&6; } @@ -5091,48 +5008,38 @@ then : LIBS="-lresolv $LIBS" fi - ;; -esac + fi - ;; -esac + fi - ;; -esac + fi - ;; -esac + fi ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" if test "x$ac_cv_func_socket" = xyes then : -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 printf %s "checking for socket in -lsocket... " >&6; } if test ${ac_cv_lib_socket_socket+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else $as_nop + ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char socket (void); + builtin and then its argument prototype would still apply. */ +char socket (); int main (void) { @@ -5144,14 +5051,12 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_socket_socket=yes -else case e in #( - e) ac_cv_lib_socket_socket=no ;; -esac +else $as_nop + ac_cv_lib_socket_socket=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 printf "%s\n" "$ac_cv_lib_socket_socket" >&6; } @@ -5161,28 +5066,22 @@ then : LIBS="-lsocket $LIBS" -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 printf %s "checking for socket in -lsocket... " >&6; } if test ${ac_cv_lib_socket_socket+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else $as_nop + ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket -lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char socket (void); + builtin and then its argument prototype would still apply. */ +char socket (); int main (void) { @@ -5194,14 +5093,12 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_socket_socket=yes -else case e in #( - e) ac_cv_lib_socket_socket=no ;; -esac +else $as_nop + ac_cv_lib_socket_socket=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 printf "%s\n" "$ac_cv_lib_socket_socket" >&6; } @@ -5209,11 +5106,9 @@ if test "x$ac_cv_lib_socket_socket" = xyes then : LIBS="-lsocket -lnsl $LIBS" fi - ;; -esac + fi - ;; -esac + fi @@ -5252,8 +5147,8 @@ printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -z "$GREP"; then +else $as_nop + if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5272,10 +5167,9 @@ do as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in #( +case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -5310,8 +5204,7 @@ IFS=$as_save_IFS else ac_cv_path_GREP=$GREP fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } @@ -5323,8 +5216,8 @@ printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +else $as_nop + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then @@ -5346,10 +5239,9 @@ do as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in #( +case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -5385,15 +5277,12 @@ else ac_cv_path_EGREP=$EGREP fi - fi ;; -esac + fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" - EGREP_TRADITIONAL=$EGREP - ac_cv_path_EGREP_TRADITIONAL=$EGREP ac_fn_c_check_header_compile "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default" @@ -5463,8 +5352,8 @@ printf %s "checking whether byte ordering is bigendian... " >&6; } if test ${ac_cv_c_bigendian+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_c_bigendian=unknown +else $as_nop + ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5510,8 +5399,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext int main (void) { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif @@ -5542,9 +5431,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes -else case e in #( - e) ac_cv_c_bigendian=no ;; -esac +else $as_nop + ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -5588,9 +5476,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes -else case e in #( - e) ac_cv_c_bigendian=no ;; -esac +else $as_nop + ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -5617,23 +5504,22 @@ unsigned short int ascii_mm[] = int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } - int - main (int argc, char **argv) - { - /* Intimidate the compiler so that it does not - optimize the arrays away. */ - char *p = argv[0]; - ascii_mm[1] = *p++; ebcdic_mm[1] = *p++; - ascii_ii[1] = *p++; ebcdic_ii[1] = *p++; - return use_ascii (argc) == use_ebcdic (*p); - } + extern int foo; + +int +main (void) +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi - if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else @@ -5642,10 +5528,9 @@ then : fi fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -5668,17 +5553,14 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_bigendian=no -else case e in #( - e) ac_cv_c_bigendian=yes ;; -esac +else $as_nop + ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi ;; -esac + fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 printf "%s\n" "$ac_cv_c_bigendian" >&6; } @@ -5702,11 +5584,10 @@ 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 : -else case e in #( - e) +else $as_nop + printf "%s\n" "#define size_t unsigned int" >>confdefs.h - ;; -esac + fi @@ -5717,8 +5598,8 @@ printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } if test ${ac_cv_struct_tm+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -5736,12 +5617,10 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_struct_tm=time.h -else case e in #( - e) ac_cv_struct_tm=sys/time.h ;; -esac +else $as_nop + ac_cv_struct_tm=sys/time.h fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 printf "%s\n" "$ac_cv_struct_tm" >&6; } @@ -5751,54 +5630,195 @@ printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h fi -ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default" -if test "x$ac_cv_type_uid_t" = xyes +ac_ext=c +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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "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+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" then : -else case e in #( - e) -printf "%s\n" "#define uid_t int" >>confdefs.h - ;; -esac +else $as_nop + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext -ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default" -if test "x$ac_cv_type_gid_t" = xyes + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +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 + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +printf %s "checking for uid_t in sys/types.h... " >&6; } +if test ${ac_cv_type_uid_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 : + ac_cv_type_uid_t=yes +else $as_nop + ac_cv_type_uid_t=no +fi +rm -rf conftest* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +printf "%s\n" "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +printf "%s\n" "#define uid_t int" >>confdefs.h + -else case e in #( - e) printf "%s\n" "#define gid_t int" >>confdefs.h - ;; -esac + fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 printf %s "checking size of short... " >&6; } if test ${ac_cv_sizeof_short+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" then : -else case e in #( - e) if test "$ac_cv_type_short" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + if test "$ac_cv_type_short" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short=0 - fi ;; -esac + fi fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 printf "%s\n" "$ac_cv_sizeof_short" >&6; } @@ -5810,30 +5830,28 @@ printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 printf %s "checking size of int... " >&6; } if test ${ac_cv_sizeof_int+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" then : -else case e in #( - e) if test "$ac_cv_type_int" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + if test "$ac_cv_type_int" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 - fi ;; -esac + fi fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 printf "%s\n" "$ac_cv_sizeof_int" >&6; } @@ -5845,30 +5863,28 @@ printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 printf %s "checking size of long... " >&6; } if test ${ac_cv_sizeof_long+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" then : -else case e in #( - e) if test "$ac_cv_type_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + if test "$ac_cv_type_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 - fi ;; -esac + fi fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 printf "%s\n" "$ac_cv_sizeof_long" >&6; } @@ -5880,30 +5896,28 @@ printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 printf %s "checking size of void *... " >&6; } if test ${ac_cv_sizeof_void_p+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" then : -else case e in #( - e) if test "$ac_cv_type_void_p" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + if test "$ac_cv_type_void_p" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (void *) -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_void_p=0 - fi ;; -esac + fi fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } @@ -5915,30 +5929,28 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int64_t" >&5 printf %s "checking size of int64_t... " >&6; } if test ${ac_cv_sizeof_int64_t+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int64_t))" "ac_cv_sizeof_int64_t" "$ac_includes_default" +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int64_t))" "ac_cv_sizeof_int64_t" "$ac_includes_default" then : -else case e in #( - e) if test "$ac_cv_type_int64_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + if test "$ac_cv_type_int64_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int64_t) -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int64_t=0 - fi ;; -esac + fi fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int64_t" >&5 printf "%s\n" "$ac_cv_sizeof_int64_t" >&6; } @@ -5950,30 +5962,28 @@ printf "%s\n" "#define SIZEOF_INT64_T $ac_cv_sizeof_int64_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 printf %s "checking size of long long... " >&6; } if test ${ac_cv_sizeof_long_long+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" then : -else case e in #( - e) if test "$ac_cv_type_long_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + if test "$ac_cv_type_long_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 - fi ;; -esac + fi fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } @@ -5988,22 +5998,20 @@ if test "$ac_cv_sizeof_int" = 2 ; then if test "x$ac_cv_type_int16_t" = xyes then : -else case e in #( - e) +else $as_nop + printf "%s\n" "#define int16_t int" >>confdefs.h - ;; -esac + fi ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default" if test "x$ac_cv_type_uint16_t" = xyes then : -else case e in #( - e) +else $as_nop + printf "%s\n" "#define uint16_t unsigned int" >>confdefs.h - ;; -esac + fi elif test "$ac_cv_sizeof_short" = 2 ; then @@ -6011,22 +6019,20 @@ elif test "$ac_cv_sizeof_short" = 2 ; then if test "x$ac_cv_type_int16_t" = xyes then : -else case e in #( - e) +else $as_nop + printf "%s\n" "#define int16_t short" >>confdefs.h - ;; -esac + fi ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default" if test "x$ac_cv_type_uint16_t" = xyes then : -else case e in #( - e) +else $as_nop + printf "%s\n" "#define uint16_t unsigned short" >>confdefs.h - ;; -esac + fi else @@ -6037,22 +6043,20 @@ if test "$ac_cv_sizeof_int" = 4 ; then if test "x$ac_cv_type_int32_t" = xyes then : -else case e in #( - e) +else $as_nop + printf "%s\n" "#define int32_t int" >>confdefs.h - ;; -esac + fi ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default" if test "x$ac_cv_type_uint32_t" = xyes then : -else case e in #( - e) +else $as_nop + printf "%s\n" "#define uint32_t unsigned int" >>confdefs.h - ;; -esac + fi elif test "$ac_cv_sizeof_short" = 4 ; then @@ -6060,22 +6064,20 @@ elif test "$ac_cv_sizeof_short" = 4 ; then if test "x$ac_cv_type_int32_t" = xyes then : -else case e in #( - e) +else $as_nop + printf "%s\n" "#define int32_t short" >>confdefs.h - ;; -esac + fi ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default" if test "x$ac_cv_type_uint32_t" = xyes then : -else case e in #( - e) +else $as_nop + printf "%s\n" "#define uint32_t unsigned short" >>confdefs.h - ;; -esac + fi elif test "$ac_cv_sizeof_long" = 4 ; then @@ -6083,22 +6085,20 @@ elif test "$ac_cv_sizeof_long" = 4 ; then if test "x$ac_cv_type_int32_t" = xyes then : -else case e in #( - e) +else $as_nop + printf "%s\n" "#define int32_t long" >>confdefs.h - ;; -esac + fi ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default" if test "x$ac_cv_type_uint32_t" = xyes then : -else case e in #( - e) +else $as_nop + printf "%s\n" "#define uint32_t unsigned long" >>confdefs.h - ;; -esac + fi else @@ -6122,22 +6122,20 @@ elif test "$ac_cv_sizeof_long_long" = 8 ; then if test "x$ac_cv_type_int64_t" = xyes then : -else case e in #( - e) +else $as_nop + printf "%s\n" "#define int64_t long long" >>confdefs.h - ;; -esac + fi ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default" if test "x$ac_cv_type_uint64_t" = xyes then : -else case e in #( - e) +else $as_nop + printf "%s\n" "#define uint64_t unsigned long long" >>confdefs.h - ;; -esac + fi else @@ -6149,9 +6147,8 @@ ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_i if test "x$ac_cv_type_struct_sockaddr_in6" = xyes then : unet_have_sockaddr_in6="yes" -else case e in #( - e) unet_have_sockaddr_in6="no" ;; -esac +else $as_nop + unet_have_sockaddr_in6="no" fi @@ -6161,15 +6158,15 @@ ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include &5 printf %s "checking for socklen_t equivalent... " >&6; } if test ${curl_cv_socklen_t_equiv+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + curl_cv_socklen_t_equiv= for arg2 in "struct sockaddr" void ; do for t in int size_t unsigned long "unsigned long" ; do @@ -6195,16 +6192,14 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done done - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_socklen_t_equiv" >&5 printf "%s\n" "$curl_cv_socklen_t_equiv" >&6; } printf "%s\n" "#define socklen_t $curl_cv_socklen_t_equiv" >>confdefs.h - ;; -esac + fi @@ -6248,8 +6243,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$AWK"; then +else $as_nop + if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6271,8 +6266,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then @@ -6294,8 +6288,8 @@ ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat >conftest.make <<\_ACEOF +else $as_nop + cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' @@ -6307,8 +6301,7 @@ case `${MAKE-make} -f conftest.make 2>/dev/null` in *) eval ac_cv_prog_make_${ac_make}_set=no;; esac -rm -f conftest.make ;; -esac +rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -6341,8 +6334,8 @@ if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 -else case e in #( - e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS @@ -6396,8 +6389,7 @@ esac IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir - ;; -esac + fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install @@ -6440,8 +6432,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_RMPROG+y} then : printf %s "(cached) " >&6 -else case e in #( - e) case $RMPROG in +else $as_nop + case $RMPROG in [\\/]* | ?:[\\/]*) ac_cv_path_RMPROG="$RMPROG" # Let the user override the test with a path. ;; @@ -6466,7 +6458,6 @@ done IFS=$as_save_IFS ;; -esac ;; esac fi RMPROG=$ac_cv_path_RMPROG @@ -6492,8 +6483,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_SHPROG+y} then : printf %s "(cached) " >&6 -else case e in #( - e) case $SHPROG in +else $as_nop + case $SHPROG in [\\/]* | ?:[\\/]*) ac_cv_path_SHPROG="$SHPROG" # Let the user override the test with a path. ;; @@ -6518,7 +6509,6 @@ done IFS=$as_save_IFS ;; -esac ;; esac fi SHPROG=$ac_cv_path_SHPROG @@ -6545,8 +6535,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_YACC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$YACC"; then +else $as_nop + if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6568,8 +6558,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then @@ -6599,15 +6588,15 @@ printf %s "checking for posix non-blocking... " >&6; } if test ${unet_cv_sys_nonblocking_posix+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test "$cross_compiling" = yes +else $as_nop + if test "$cross_compiling" = yes then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See 'config.log' for more details" "$LINENO" 5; } -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +See \`config.log' for more details" "$LINENO" 5; } +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -6636,16 +6625,13 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : unet_cv_sys_nonblocking_posix=yes -else case e in #( - e) unet_cv_sys_nonblocking_posix=no ;; -esac +else $as_nop + unet_cv_sys_nonblocking_posix=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unet_cv_sys_nonblocking_posix" >&5 printf "%s\n" "$unet_cv_sys_nonblocking_posix" >&6; } @@ -6659,15 +6645,15 @@ printf %s "checking for bsd non-blocking... " >&6; } if test ${unet_cv_sys_nonblocking_bsd+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test "$cross_compiling" = yes +else $as_nop + if test "$cross_compiling" = yes then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See 'config.log' for more details" "$LINENO" 5; } -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +See \`config.log' for more details" "$LINENO" 5; } +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -6696,16 +6682,13 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : unet_cv_sys_nonblocking_bsd=yes -else case e in #( - e) unet_cv_sys_nonblocking_bsd=no ;; -esac +else $as_nop + unet_cv_sys_nonblocking_bsd=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unet_cv_sys_nonblocking_bsd" >&5 printf "%s\n" "$unet_cv_sys_nonblocking_bsd" >&6; } @@ -6724,8 +6707,8 @@ printf %s "checking for posix signals... " >&6; } if test ${unet_cv_sys_signal_posix+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main(void) { @@ -6736,12 +6719,10 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : unet_cv_sys_signal_posix=yes -else case e in #( - e) unet_cv_sys_signal_posix=no ;; -esac +else $as_nop + unet_cv_sys_signal_posix=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unet_cv_sys_signal_posix" >&5 printf "%s\n" "$unet_cv_sys_signal_posix" >&6; } @@ -6755,15 +6736,15 @@ printf %s "checking for bsd reliable signals... " >&6; } if test ${unet_cv_sys_signal_bsd+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test "$cross_compiling" = yes +else $as_nop + if test "$cross_compiling" = yes then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See 'config.log' for more details" "$LINENO" 5; } -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +See \`config.log' for more details" "$LINENO" 5; } +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int calls = 0; @@ -6784,16 +6765,13 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : unet_cv_sys_signal_bsd=yes -else case e in #( - e) unet_cv_sys_signal_bsd=no ;; -esac +else $as_nop + unet_cv_sys_signal_bsd=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unet_cv_sys_signal_bsd" >&5 printf "%s\n" "$unet_cv_sys_signal_bsd" >&6; } @@ -6877,16 +6855,14 @@ printf %s "checking whether to enable use of poll()... " >&6; } if test ${enable_poll+y} then : enableval=$enable_poll; unet_cv_enable_poll=$enable_poll -else case e in #( - e) if test ${unet_cv_enable_poll+y} +else $as_nop + if test ${unet_cv_enable_poll+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_enable_poll=$unet_poll_syscall ;; -esac +else $as_nop + unet_cv_enable_poll=$unet_poll_syscall fi - ;; -esac + fi @@ -6914,16 +6890,14 @@ printf %s "checking whether to enable debug mode... " >&6; } if test ${enable_debug+y} then : enableval=$enable_debug; unet_cv_enable_debug=$enable_debug -else case e in #( - e) if test ${unet_cv_enable_debug+y} +else $as_nop + if test ${unet_cv_enable_debug+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_enable_debug=no ;; -esac +else $as_nop + unet_cv_enable_debug=no fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unet_cv_enable_debug" >&5 @@ -6942,16 +6916,14 @@ printf %s "checking whether to enable leak detection... " >&6; } if test ${with_leak_detect+y} then : withval=$with_leak_detect; unet_cv_with_leak_detect=$with_leak_detect -else case e in #( - e) if test ${unet_cv_with_leak_detect+y} +else $as_nop + if test ${unet_cv_with_leak_detect+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_with_leak_detect=no ;; -esac +else $as_nop + unet_cv_with_leak_detect=no fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unet_cv_enable_leak_detect" >&5 @@ -6970,9 +6942,8 @@ fi if test ${with_ipv6+y} then : withval=$with_ipv6; ac_cv_use_ipv6=$withval -else case e in #( - e) ac_cv_use_ipv6=$unet_have_sockaddr_in6 ;; -esac +else $as_nop + ac_cv_use_ipv6=$unet_have_sockaddr_in6 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use IPv6" >&5 @@ -6980,9 +6951,8 @@ printf %s "checking whether to use IPv6... " >&6; } if test ${ac_cv_use_ipv6+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_use_ipv6=no ;; -esac +else $as_nop + ac_cv_use_ipv6=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_use_ipv6" >&5 printf "%s\n" "$ac_cv_use_ipv6" >&6; } @@ -6998,16 +6968,14 @@ printf %s "checking whether to enable asserts... " >&6; } if test ${enable_asserts+y} then : enableval=$enable_asserts; unet_cv_enable_asserts=$enable_asserts -else case e in #( - e) if test ${unet_cv_enable_asserts+y} +else $as_nop + if test ${unet_cv_enable_asserts+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_enable_asserts=yes ;; -esac +else $as_nop + unet_cv_enable_asserts=yes fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unet_cv_enable_asserts" >&5 @@ -7025,16 +6993,14 @@ printf %s "checking whether to enable profiling support (gprof)... " >&6; } if test ${enable_profile+y} then : enableval=$enable_profile; unet_cv_enable_profile=$enable_profile -else case e in #( - e) if test ${unet_cv_enable_profile+y} +else $as_nop + if test ${unet_cv_enable_profile+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_enable_profile=no ;; -esac +else $as_nop + unet_cv_enable_profile=no fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unet_cv_enable_profile" >&5 @@ -7051,16 +7017,14 @@ printf %s "checking whether to enable pedantic compiler warnings... " >&6; } if test ${enable_pedantic+y} then : enableval=$enable_pedantic; unet_cv_enable_pedantic=$enable_pedantic -else case e in #( - e) if test ${unet_cv_enable_pedantic+y} +else $as_nop + if test ${unet_cv_enable_pedantic+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_enable_pedantic=no ;; -esac +else $as_nop + unet_cv_enable_pedantic=no fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unet_cv_enable_pedantic" >&5 @@ -7076,16 +7040,14 @@ printf %s "checking whether to enable compiler warnings... " >&6; } if test ${enable_warnings+y} then : enableval=$enable_warnings; unet_cv_enable_warnings=$enable_warnings -else case e in #( - e) if test ${unet_cv_enable_warnings+y} +else $as_nop + if test ${unet_cv_enable_warnings+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_enable_warnings=no ;; -esac +else $as_nop + unet_cv_enable_warnings=no fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unet_cv_enable_warnings" >&5 @@ -7101,16 +7063,14 @@ printf %s "checking whether to enable inlining for a few critical functions... " if test ${enable_inlines+y} then : enableval=$enable_inlines; unet_cv_enable_inlines=$enable_inlines -else case e in #( - e) if test ${unet_cv_enable_inlines+y} +else $as_nop + if test ${unet_cv_enable_inlines+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_enable_inlines=yes ;; -esac +else $as_nop + unet_cv_enable_inlines=yes fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unet_cv_enable_inlines" >&5 @@ -7128,16 +7088,14 @@ printf %s "checking whether to enable the /dev/poll event engine... " >&6; } if test ${enable_devpoll+y} then : enableval=$enable_devpoll; unet_cv_enable_devpoll=$enable_devpoll -else case e in #( - e) if test ${unet_cv_enable_devpoll+y} +else $as_nop + if test ${unet_cv_enable_devpoll+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_enable_devpoll=yes ;; -esac +else $as_nop + unet_cv_enable_devpoll=yes fi - ;; -esac + fi @@ -7161,16 +7119,14 @@ printf %s "checking whether to enable the kqueue event engine... " >&6; } if test ${enable_kqueue+y} then : enableval=$enable_kqueue; unet_cv_enable_kqueue=$enable_kqueue -else case e in #( - e) if test ${unet_cv_enable_kqueue+y} +else $as_nop + if test ${unet_cv_enable_kqueue+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_enable_kqueue=yes ;; -esac +else $as_nop + unet_cv_enable_kqueue=yes fi - ;; -esac + fi @@ -7194,16 +7150,14 @@ printf %s "checking whether to enable the epoll event engine... " >&6; } if test ${enable_epoll+y} then : enableval=$enable_epoll; unet_cv_enable_epoll=$enable_epoll -else case e in #( - e) if test ${unet_cv_enable_epoll+y} +else $as_nop + if test ${unet_cv_enable_epoll+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_enable_epoll=yes ;; -esac +else $as_nop + unet_cv_enable_epoll=yes fi - ;; -esac + fi @@ -7232,13 +7186,12 @@ if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "#define EPOLL_NEED_BODY 1" >>confdefs.h - ;; -esac + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -7253,8 +7206,8 @@ printf %s "checking for va_copy... " >&6; } if test ${unet_cv_c_va_copy+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -7268,14 +7221,12 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : unet_cv_c_va_copy="yes" -else case e in #( - e) unet_cv_c_va_copy="no" - ;; -esac +else $as_nop + unet_cv_c_va_copy="no" + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext ;; -esac + conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unet_cv_c_va_copy" >&5 printf "%s\n" "$unet_cv_c_va_copy" >&6; } @@ -7290,8 +7241,8 @@ printf %s "checking for __va_copy... " >&6; } if test ${unet_cv_c___va_copy+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -7305,14 +7256,12 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : unet_cv_c___va_copy="yes" -else case e in #( - e) unet_cv_c___va_copy="no" - ;; -esac +else $as_nop + unet_cv_c___va_copy="no" + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext ;; -esac + conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unet_cv_c___va_copy" >&5 printf "%s\n" "$unet_cv_c___va_copy" >&6; } @@ -7329,16 +7278,14 @@ printf %s "checking what name to give the symlink... " >&6; } if test ${with_symlink+y} then : withval=$with_symlink; unet_cv_with_symlink=$with_symlink -else case e in #( - e) if test ${unet_cv_with_symlink+y} +else $as_nop + if test ${unet_cv_with_symlink+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_with_symlink="ircd" ;; -esac +else $as_nop + unet_cv_with_symlink="ircd" fi - ;; -esac + fi @@ -7366,16 +7313,14 @@ printf %s "checking what permissions to set on the installed binary... " >&6; } if test ${with_mode+y} then : withval=$with_mode; unet_cv_with_mode=$with_mode -else case e in #( - e) if test ${unet_cv_with_mode+y} +else $as_nop + if test ${unet_cv_with_mode+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_with_mode=711 ;; -esac +else $as_nop + unet_cv_with_mode=711 fi - ;; -esac + fi @@ -7397,16 +7342,14 @@ printf %s "checking which user should own the installed binary... " >&6; } if test ${with_owner+y} then : withval=$with_owner; unet_cv_with_owner=$with_owner -else case e in #( - e) if test ${unet_cv_with_owner+y} +else $as_nop + if test ${unet_cv_with_owner+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_with_owner=$unet_uid ;; -esac +else $as_nop + unet_cv_with_owner=$unet_uid fi - ;; -esac + fi @@ -7428,16 +7371,14 @@ printf %s "checking which group should own the installed binary... " >&6; } if test ${with_group+y} then : withval=$with_group; unet_cv_with_group=$with_group -else case e in #( - e) if test ${unet_cv_with_group+y} +else $as_nop + if test ${unet_cv_with_group+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_with_group=$unet_gid ;; -esac +else $as_nop + unet_cv_with_group=$unet_gid fi - ;; -esac + fi @@ -7465,16 +7406,14 @@ printf %s "checking for site domain name... " >&6; } if test ${with_domain+y} then : withval=$with_domain; unet_cv_with_domain=$with_domain -else case e in #( - e) if test ${unet_cv_with_domain+y} +else $as_nop + if test ${unet_cv_with_domain+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_with_domain=$unet_domain ;; -esac +else $as_nop + unet_cv_with_domain=$unet_domain fi - ;; -esac + fi @@ -7499,16 +7438,14 @@ printf %s "checking if chroot operation is desired... " >&6; } if test ${with_chroot+y} then : withval=$with_chroot; unet_cv_with_chroot=$with_chroot -else case e in #( - e) if test ${unet_cv_with_chroot+y} +else $as_nop + if test ${unet_cv_with_chroot+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_with_chroot=no ;; -esac +else $as_nop + unet_cv_with_chroot=no fi - ;; -esac + fi @@ -7575,16 +7512,14 @@ printf %s "checking what the data directory should be... " >&6; } if test ${with_dpath+y} then : withval=$with_dpath; unet_cv_with_dpath=$with_dpath -else case e in #( - e) if test ${unet_cv_with_dpath+y} +else $as_nop + if test ${unet_cv_with_dpath+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_with_dpath=$unet_libdir ;; -esac +else $as_nop + unet_cv_with_dpath=$unet_libdir fi - ;; -esac + fi @@ -7622,16 +7557,14 @@ printf %s "checking where the default configuration file resides... " >&6; } if test ${with_cpath+y} then : withval=$with_cpath; unet_cv_with_cpath=$with_cpath -else case e in #( - e) if test ${unet_cv_with_cpath+y} +else $as_nop + if test ${unet_cv_with_cpath+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_with_cpath="ircd.conf" ;; -esac +else $as_nop + unet_cv_with_cpath="ircd.conf" fi - ;; -esac + fi @@ -7668,16 +7601,14 @@ printf %s "checking where to put the debugging log if debugging enabled... " >&6 if test ${with_lpath+y} then : withval=$with_lpath; unet_cv_with_lpath=$with_lpath -else case e in #( - e) if test ${unet_cv_with_lpath+y} +else $as_nop + if test ${unet_cv_with_lpath+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_with_lpath="ircd.log" ;; -esac +else $as_nop + unet_cv_with_lpath="ircd.log" fi - ;; -esac + fi @@ -7726,16 +7657,14 @@ printf %s "checking max connections... " >&6; } if test ${with_maxcon+y} then : withval=$with_maxcon; unet_cv_with_maxcon=$with_maxcon -else case e in #( - e) if test ${unet_cv_with_maxcon+y} +else $as_nop + if test ${unet_cv_with_maxcon+y} then : printf %s "(cached) " >&6 -else case e in #( - e) unet_cv_with_maxcon=$unet_maxcon ;; -esac +else $as_nop + unet_cv_with_maxcon=$unet_maxcon fi - ;; -esac + fi @@ -7767,8 +7696,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# 'ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* 'ac_cv_foo' will be assigned the +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF @@ -7798,14 +7727,14 @@ printf "%s\n" "$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 + # `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" ;; #( *) - # 'set' quotes correctly as required by POSIX, so do not add quotes. + # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -7896,6 +7825,7 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh +as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -7904,13 +7834,12 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else case e in #( - e) case `(set -o) 2>/dev/null` in #( +else $as_nop + case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; -esac ;; esac fi @@ -7982,7 +7911,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as 'sh COMMAND' +# We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -8011,6 +7940,7 @@ as_fn_error () } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -8050,12 +7980,11 @@ then : { eval $1+=\$2 }' -else case e in #( - e) as_fn_append () +else $as_nop + as_fn_append () { eval $1=\$$1\$2 - } ;; -esac + } fi # as_fn_append # as_fn_arith ARG... @@ -8069,12 +7998,11 @@ then : { as_val=$(( $* )) }' -else case e in #( - e) as_fn_arith () +else $as_nop + as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } ;; -esac + } fi # as_fn_arith @@ -8157,9 +8085,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. - # In both cases, we have to default to 'cp -pR'. + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -8240,12 +8168,10 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" -as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -as_tr_sh="eval sed '$as_sed_sh'" # deprecated +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 @@ -8261,7 +8187,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.72. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -8292,7 +8218,7 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -'$as_me' instantiates files and other configuration actions +\`$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. @@ -8325,10 +8251,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.72, +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2023 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -8389,8 +8315,8 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: '$1' -Try '$0 --help' for more information.";; + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -8398,8 +8324,8 @@ Try '$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: '$1' -Try '$0 --help' for more information." ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; @@ -8452,7 +8378,7 @@ do "ircd/Makefile") CONFIG_FILES="$CONFIG_FILES ircd/Makefile" ;; "ircd/test/Makefile") CONFIG_FILES="$CONFIG_FILES ircd/test/Makefile" ;; - *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -8471,7 +8397,7 @@ fi # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to '$tmp'. +# after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= @@ -8495,7 +8421,7 @@ ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. -# This happens for instance with './config.status config.h'. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then @@ -8653,13 +8579,13 @@ fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with './config.status Makefile'. +# This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF -# Transform confdefs.h into an awk script 'defines.awk', embedded as +# Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. @@ -8769,7 +8695,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -8791,19 +8717,19 @@ do -) 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 ':'. + # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done - # Let's still pretend it is 'configure' which instantiates (i.e., don't + # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` @@ -8931,7 +8857,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 esac _ACEOF -# Neutralize VPATH when '$srcdir' = '.'. +# Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -8961,9 +8887,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { 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"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' + { printf "%s\n" "$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 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" diff --git a/configure.ac b/configure.ac index a33b70ec..6a40352d 100644 --- a/configure.ac +++ b/configure.ac @@ -41,8 +41,8 @@ ac_default_prefix=$unet_cv_prefix dnl Define the input and output configuration header file. AC_CONFIG_HEADERS([config.h]) -dnl Demand at least version 2.72 of autoconf (for AS_HELP_STRING) -AC_PREREQ([2.72]) +dnl Demand at least version 2.71 of autoconf (for AS_HELP_STRING) +AC_PREREQ([2.71]) dnl Find out what type of system we are AC_CANONICAL_HOST diff --git a/include/handlers.h b/include/handlers.h index 96e5cc28..9c25fa80 100644 --- a/include/handlers.h +++ b/include/handlers.h @@ -125,6 +125,7 @@ extern int m_pseudo(struct Client*, struct Client*, int, char*[]); extern int m_quit(struct Client*, struct Client*, int, char*[]); extern int m_registered(struct Client*, struct Client*, int, char*[]); extern int m_sasl(struct Client*, struct Client*, int, char*[]); +extern int mr_sasl(struct Client*, struct Client*, int, char*[]); extern int m_silence(struct Client*, struct Client*, int, char*[]); extern int m_stats(struct Client*, struct Client*, int, char*[]); extern int m_time(struct Client*, struct Client*, int, char*[]); diff --git a/include/s_user.h b/include/s_user.h index 9167e021..680a8261 100644 --- a/include/s_user.h +++ b/include/s_user.h @@ -103,7 +103,6 @@ extern void add_target(struct Client *sptr, void *target); extern unsigned int umode_make_snomask(unsigned int oldmask, char *arg, int what); extern int send_supported(struct Client *cptr); -extern int register_sasl(struct Client* cptr, struct Client* sptr, int parc, char* parv[]); #define NAMES_ALL 1 /**< List all users in channel */ #define NAMES_VIS 2 /**< List only visible users in non-secret channels */ diff --git a/ircd/m_sasl.c b/ircd/m_sasl.c index 622743e1..2092da40 100644 --- a/ircd/m_sasl.c +++ b/ircd/m_sasl.c @@ -106,12 +106,30 @@ #include /* - * m_sasl - client message handler + * m_sasl - client message handler (for unregistered clients) */ int m_sasl(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) -{ - if (parc < 2 || *parv[1] == '\0') - return need_more_params(sptr, "AUTHENTICATE"); - register_sasl(cptr, sptr, parc, parv); - return 0; +{ + if (parc < 2 || *parv[1] == '\0') { + return need_more_params(sptr, "AUTHENTICATE"); + } + if (!cli_auth(cptr)) { + send_reply(sptr, ERR_SASLFAIL); + return 0; + } + int result = auth_set_sasl(cli_auth(cptr), parv[1]); + if (result < 0) { + send_reply(sptr, ERR_SASLFAIL); + return 0; + } + return 0; +} + +/* + * mr_sasl - registered client message handler + * Returns ERR_SASLALREADY if client is already registered + */ +int mr_sasl(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) +{ + return send_reply(sptr, ERR_SASLALREADY); } diff --git a/ircd/parse.c b/ircd/parse.c index 54dc4d8d..7e102809 100644 --- a/ircd/parse.c +++ b/ircd/parse.c @@ -663,7 +663,7 @@ struct Message msgtab[] = { TOK_AUTHENTICATE, 0, MAXPARA, 0, 0, NULL, /* UNREG, CLIENT, SERVER, OPER, SERVICE */ - { m_sasl, m_ignore, m_ignore, m_ignore, m_ignore } + { m_sasl, mr_sasl, m_ignore, m_ignore, m_ignore } }, { 0 } }; diff --git a/ircd/s_auth.c b/ircd/s_auth.c index 2a65093b..744c519f 100644 --- a/ircd/s_auth.c +++ b/ircd/s_auth.c @@ -777,7 +777,9 @@ int auth_set_sasl(struct AuthRequest *auth, const char *crypt) { assert(auth != NULL); if(CapHas(cli_active(auth->client), CAP_SASL)) { - sendto_iauth(auth->client, "Y %s", crypt); + if (!sendto_iauth(auth->client, "Y %s", crypt)) { + return -1; + } } return 0; } @@ -1906,52 +1908,70 @@ static int iauth_cmd_username_forced(struct IAuth *iauth, struct Client *cli, * @return Non-zero if \a cli authorization should be checked for completion. */ static int iauth_cmd_sasl(struct IAuth *iauth, struct Client *cli, - int parc, char **params) + int parc, char **params) { + enum { CMD_IDX = 0, NICK_IDX = 1, ACCOUNT_IDX = 2, TS_IDX = 4, ID_IDX = 3 }; assert(cli_auth(cli) != NULL); - /* Sanity check. */ - if (EmptyString(params[0])) { + + if (parc < 1 || EmptyString(params[CMD_IDX])) { + send_reply(cli, ERR_SASLFAIL); return 0; } - char *cmd = params[0]; - if(!ircd_strcmp(cmd, "Q")) { - sendcmdto_one(&me, CMD_AUTHENTICATE, cli, params[1]); - } else if(!ircd_strcmp(cmd, "O")) { - send_reply(cli, ERR_SASLABORTED); - } else if(!ircd_strcmp(cmd, "S")) { - if (EmptyString(params[3]) || EmptyString(params[4])) { - return 0; - } - char *nick = params[1]; - char *account = params[2]; - char *timestamp = params[3]; - char *id = params[4]; - ircd_strncpy(cli_user(cli)->account, account, ACCOUNTLEN); - cli_user(cli)->acc_create = atoi(timestamp); - cli_user(cli)->acc_id = strtoul(id, NULL, 10); - SetAccount(cli); - ircd_snprintf(0, cli_user(cli)->authhost, HOSTLEN, "%s.%s", account, feature_str(FEAT_HIDDEN_HOST)); - int killreason = find_kill(cli,1); - if (killreason) - { - ++ServerStats->is_ref; - return exit_client(cli, cli, &me, - (killreason == -1 ? "K-lined" : "G-lined")); - } - send_reply(cli, RPL_LOGGEDIN, cli, cli_name(cli), account); - send_reply(cli, RPL_SASLSUCCESS); - } else if(!ircd_strcmp(cmd, "N")) { - send_reply(cli, ERR_NICKLOCKED); - send_reply(cli, ERR_SASLFAIL); - } else if(!ircd_strcmp(cmd, "L")) { - send_reply(cli, ERR_SASLTOOLONG); - send_reply(cli, ERR_SASLFAIL); - } else if(!ircd_strcmp(cmd, "A")) { - send_reply(cli, ERR_SASLALREADY); - send_reply(cli, ERR_SASLFAIL); - } else if(!ircd_strcmp(cmd, "F")) { - send_reply(cli, ERR_SASLFAIL); - } + + const char *cmd = params[CMD_IDX]; + + if (!ircd_strcmp(cmd, "Q")) { + if (parc > NICK_IDX && !EmptyString(params[NICK_IDX])) + sendcmdto_one(&me, CMD_AUTHENTICATE, cli, params[NICK_IDX]); + else + send_reply(cli, ERR_SASLFAIL); + } + else if (!ircd_strcmp(cmd, "O")) { + send_reply(cli, ERR_SASLABORTED); + } + else if (!ircd_strcmp(cmd, "M")) { + if (parc > NICK_IDX) + send_reply(cli, RPL_SASLMECHS, params[parc - 1]); + send_reply(cli, ERR_SASLFAIL); + } + else if (!ircd_strcmp(cmd, "S")) { + if (parc <= ID_IDX || EmptyString(params[TS_IDX]) || EmptyString(params[ID_IDX])) { + send_reply(cli, ERR_SASLFAIL); + return 0; + } + const char *nick = params[NICK_IDX]; + const char *account = params[ACCOUNT_IDX]; + const char *flags = params[TS_IDX]; + const char *id = params[ID_IDX]; + + ircd_strncpy(cli_user(cli)->account, account, ACCOUNTLEN); + cli_user(cli)->acc_flags = atoi(flags); + cli_user(cli)->acc_id = atoi(id); + SetAccount(cli); + send_reply(cli, RPL_LOGGEDIN, cli, cli_name(cli), account); + send_reply(cli, RPL_SASLSUCCESS); + + /* Clear iauth pending flag and continue registration */ + FlagClr(&cli_auth(cli)->flags, AR_IAUTH_PENDING); + } + else if (!ircd_strcmp(cmd, "N")) { + send_reply(cli, ERR_NICKLOCKED); + send_reply(cli, ERR_SASLFAIL); + } + else if (!ircd_strcmp(cmd, "L")) { + send_reply(cli, ERR_SASLTOOLONG); + send_reply(cli, ERR_SASLFAIL); + } + else if (!ircd_strcmp(cmd, "A")) { + send_reply(cli, ERR_SASLALREADY); + send_reply(cli, ERR_SASLFAIL); + } + else if (!ircd_strcmp(cmd, "F")) { + send_reply(cli, ERR_SASLFAIL); + } + else { + send_reply(cli, ERR_SASLFAIL); + } return 0; } diff --git a/ircd/s_user.c b/ircd/s_user.c index 494c02bf..5e9b2896 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -1520,13 +1520,4 @@ send_supported(struct Client *cptr) send_reply(cptr, RPL_ISUPPORT, featurebuf); return 0; /* convenience return, if it's ever needed */ -} - -/** - * Registers SASL - */ -int -register_sasl(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) -{ - auth_set_sasl(cli_auth(sptr), parv[1]); } \ No newline at end of file