diff --git a/0028-iscsiadm-Correctly-check-for-invalid-hostno-and-flas.patch b/0028-iscsiadm-Correctly-check-for-invalid-hostno-and-flas.patch new file mode 100644 index 0000000..5d45dfd --- /dev/null +++ b/0028-iscsiadm-Correctly-check-for-invalid-hostno-and-flas.patch @@ -0,0 +1,213 @@ +From 3256b93ee3025bf76757001ff3d24914c4c4af28 Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Tue, 9 Jul 2013 08:17:14 -0400 +Subject: [PATCH] iscsiadm: Correctly check for invalid hostno and flashnode + index + +In host mode, correctly compare for invalid hostno and flashnode index. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + usr/flashnode.h | 2 ++ + usr/host.h | 2 ++ + usr/iscsiadm.c | 48 ++++++++++++++++++++++++++++++------------------ + usr/types.h | 1 + + 4 files changed, 35 insertions(+), 18 deletions(-) + +diff --git a/usr/flashnode.h b/usr/flashnode.h +index c1de9cc..2950fb5 100644 +--- a/usr/flashnode.h ++++ b/usr/flashnode.h +@@ -26,6 +26,8 @@ + #include "config.h" + #include "auth.h" + ++#define MAX_FLASHNODE_IDX UINT_MAX ++ + typedef enum portal_type { + IPV4, + IPV6, +diff --git a/usr/host.h b/usr/host.h +index 894ab91..db44cfa 100644 +--- a/usr/host.h ++++ b/usr/host.h +@@ -5,6 +5,8 @@ + #include "types.h" + #include "config.h" + ++#define MAX_HOST_NO UINT_MAX ++ + #define MAX_CHAP_BUF_SZ 4096 + #define REQ_CHAP_BUF_SZ (MAX_CHAP_BUF_SZ + sizeof(struct iscsi_uevent)) + +diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c +index da0a3ec..c7337ae 100644 +--- a/usr/iscsiadm.c ++++ b/usr/iscsiadm.c +@@ -1744,20 +1744,22 @@ exit_logout_sid: + } + + static int exec_flashnode_op(int op, int info_level, uint32_t host_no, +- uint32_t flashnode_idx, int type, ++ uint64_t fnode_idx, int type, + struct list_head *params) + { + struct iscsi_transport *t = NULL; + int rc = ISCSI_SUCCESS; + char *portal_type; ++ uint32_t flashnode_idx; + + if (op != OP_SHOW && op != OP_NOOP && op != OP_NEW && +- flashnode_idx == 0xffffffff) { ++ fnode_idx > MAX_FLASHNODE_IDX) { + log_error("Invalid flashnode index"); + rc = ISCSI_ERR_INVAL; + goto exit_flashnode_op; + } + ++ flashnode_idx = (uint32_t)fnode_idx; + t = iscsi_sysfs_get_transport_by_hba(host_no); + if (!t) { + log_error("Could not match hostno %u to transport.", host_no); +@@ -1768,7 +1770,7 @@ static int exec_flashnode_op(int op, int info_level, uint32_t host_no, + switch (op) { + case OP_NOOP: + case OP_SHOW: +- if (flashnode_idx == 0xffffffff) ++ if (fnode_idx > MAX_FLASHNODE_IDX) + rc = list_flashnodes(info_level, host_no); + else + rc = get_flashnode_info(host_no, flashnode_idx); +@@ -1880,7 +1882,7 @@ static int verify_iface_params(struct list_head *params, struct node_rec *rec) + + /* TODO: merge iter helpers and clean them up, so we can use them here */ + static int exec_iface_op(int op, int do_show, int info_level, +- struct iface_rec *iface, uint32_t host_no, ++ struct iface_rec *iface, uint64_t host_no, + struct list_head *params) + { + struct host_info hinfo; +@@ -2001,9 +2003,9 @@ update_fail: + printf("%s applied.\n", iface->name); + break; + case OP_APPLY_ALL: +- if (host_no == -1) { +- log_error("Applyall requires a host number or MAC " +- "passed in with the --host argument."); ++ if (host_no > MAX_HOST_NO) { ++ log_error("Applyall requires a valid host number or MAC" ++ " passed in with the --host argument."); + rc = ISCSI_ERR_INVAL; + break; + } +@@ -2014,7 +2016,7 @@ update_fail: + memset(&hinfo, 0, sizeof(struct host_info)); + hinfo.host_no = host_no; + if (iscsi_sysfs_get_hostinfo_by_host_no(&hinfo)) { +- log_error("Could not match host%u to ifaces.", host_no); ++ log_error("Could not match host%lu to ifaces.", host_no); + rc = ISCSI_ERR_INVAL; + break; + } +@@ -2025,7 +2027,7 @@ update_fail: + break; + } + +- printf("Applied settings to ifaces attached to host%u.\n", ++ printf("Applied settings to ifaces attached to host%lu.\n", + host_no); + break; + default: +@@ -2637,10 +2639,10 @@ done: + return rc; + } + +-static uint32_t parse_host_info(char *optarg, int *rc) ++static uint64_t parse_host_info(char *optarg, int *rc) + { + int err = 0; +- uint32_t host_no = -1; ++ uint64_t host_no; + + *rc = 0; + if (strstr(optarg, ":")) { +@@ -2653,8 +2655,11 @@ static uint32_t parse_host_info(char *optarg, int *rc) + *rc = ISCSI_ERR_INVAL; + } + } else { +- host_no = strtoul(optarg, NULL, 10); +- if (errno) { ++ host_no = strtoull(optarg, NULL, 10); ++ if (errno || (host_no > MAX_HOST_NO)) { ++ if (host_no > MAX_HOST_NO) ++ errno = ERANGE; ++ + log_error("Invalid host no %s. %s.", + optarg, strerror(errno)); + *rc = ISCSI_ERR_INVAL; +@@ -2806,13 +2811,14 @@ main(int argc, char **argv) + int tpgt = PORTAL_GROUP_TAG_UNKNOWN, killiscsid=-1, do_show=0; + int packet_size=32, ping_count=1, ping_interval=0; + int do_discover = 0, sub_mode = -1; +- int flashnode_idx = -1, portal_type = -1; ++ int portal_type = -1; + struct sigaction sa_old; + struct sigaction sa_new; + struct list_head ifaces; + struct iface_rec *iface = NULL, *tmp; + struct node_rec *rec = NULL; +- uint32_t host_no = -1; ++ uint64_t host_no = (uint64_t)MAX_HOST_NO + 1; ++ uint64_t flashnode_idx = (uint64_t)MAX_FLASHNODE_IDX + 1; + struct user_param *param; + struct list_head params; + +@@ -2956,7 +2962,13 @@ main(int argc, char **argv) + ISCSI_VERSION_STR); + return 0; + case 'x': +- flashnode_idx = atoi(optarg); ++ flashnode_idx = strtoull(optarg, NULL, 10); ++ if (errno) { ++ log_error("Invalid flashnode index %s. %s.", ++ optarg, strerror(errno)); ++ rc = ISCSI_ERR_INVAL; ++ goto free_ifaces; ++ } + break; + case 'A': + portal_type = str_to_portal_type(optarg); +@@ -3022,7 +3034,7 @@ main(int argc, char **argv) + if (sub_mode != -1) { + switch (sub_mode) { + case MODE_CHAP: +- if (!op || !host_no) { ++ if (!op || (host_no > MAX_HOST_NO)) { + log_error("CHAP mode requires host " + "no and valid operation"); + rc = ISCSI_ERR_INVAL; +@@ -3032,7 +3044,7 @@ main(int argc, char **argv) + value); + break; + case MODE_FLASHNODE: +- if (!host_no) { ++ if (host_no > MAX_HOST_NO) { + log_error("FLASHNODE mode requires host no"); + rc = ISCSI_ERR_INVAL; + break; +diff --git a/usr/types.h b/usr/types.h +index 77e3f97..9d9ba86 100644 +--- a/usr/types.h ++++ b/usr/types.h +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + /* + * using the __be types allows stricter static +-- +1.8.3.1 + diff --git a/0029-iscsi-tools-Print-additional-session-info-for-flashn.patch b/0029-iscsi-tools-Print-additional-session-info-for-flashn.patch new file mode 100644 index 0000000..7fb3fb3 --- /dev/null +++ b/0029-iscsi-tools-Print-additional-session-info-for-flashn.patch @@ -0,0 +1,74 @@ +From 181af9ac81bccbf8e63a755d48babb2e65de1d4e Mon Sep 17 00:00:00 2001 +From: Vikas Chaudhary +Date: Tue, 9 Jul 2013 08:17:15 -0400 +Subject: [PATCH] iscsi tools: Print additional session info for flashnode + session + +Signed-off-by: Vikas Chaudhary +Signed-off-by: Adheer Chandravanshi +--- + usr/session_info.c | 24 +++++++++++++++++++----- + 1 file changed, 19 insertions(+), 5 deletions(-) + +diff --git a/usr/session_info.c b/usr/session_info.c +index de156c6..2f48e65 100644 +--- a/usr/session_info.c ++++ b/usr/session_info.c +@@ -64,20 +64,32 @@ void session_info_free_list(struct list_head *list) + } + } + ++static char *get_iscsi_node_type(struct session_info *info) ++{ ++ int pid = iscsi_sysfs_session_user_created(info->sid); ++ ++ if (!pid) ++ return "flash"; ++ else ++ return "non-flash"; ++} ++ + static int session_info_print_flat(void *data, struct session_info *info) + { + struct iscsi_transport *t = iscsi_sysfs_get_transport_by_sid(info->sid); + + if (strchr(info->persistent_address, '.')) +- printf("%s: [%d] %s:%d,%d %s\n", ++ printf("%s: [%d] %s:%d,%d %s (%s)\n", + t ? t->name : UNKNOWN_VALUE, + info->sid, info->persistent_address, +- info->persistent_port, info->tpgt, info->targetname); ++ info->persistent_port, info->tpgt, info->targetname, ++ get_iscsi_node_type(info)); + else +- printf("%s: [%d] [%s]:%d,%d %s\n", ++ printf("%s: [%d] [%s]:%d,%d %s (%s)\n", + t ? t->name : UNKNOWN_VALUE, + info->sid, info->persistent_address, +- info->persistent_port, info->tpgt, info->targetname); ++ info->persistent_port, info->tpgt, info->targetname, ++ get_iscsi_node_type(info)); + return 0; + } + +@@ -230,7 +242,8 @@ void session_info_print_tree(struct list_head *list, char *prefix, + + list_for_each_entry(curr, list, list) { + if (!prev || strcmp(prev->targetname, curr->targetname)) { +- printf("%sTarget: %s\n", prefix, curr->targetname); ++ printf("%sTarget: %s (%s)\n", prefix, curr->targetname, ++ get_iscsi_node_type(curr)); + prev = NULL; + } + +@@ -278,6 +291,7 @@ void session_info_print_tree(struct list_head *list, char *prefix, + printf("%s\t\tSID: %d\n", prefix, curr->sid); + print_iscsi_state(curr->sid, prefix); + } ++ + if (flags & SESSION_INFO_ISCSI_TIM) { + printf("%s\t\t*********\n", prefix); + printf("%s\t\tTimeouts:\n", prefix); +-- +1.8.3.1 + diff --git a/0030-iscsi-tools-sync-iscsi_if.h-with-kernel-space.patch b/0030-iscsi-tools-sync-iscsi_if.h-with-kernel-space.patch new file mode 100644 index 0000000..ed21d58 --- /dev/null +++ b/0030-iscsi-tools-sync-iscsi_if.h-with-kernel-space.patch @@ -0,0 +1,369 @@ +From 82c853344888c2d541d6445a08ab31cbcf1c140f Mon Sep 17 00:00:00 2001 +From: Mike Christie +Date: Wed, 11 Sep 2013 17:31:39 -0700 +Subject: [PATCH] iscsi tools: sync iscsi_if.h with kernel space + +This patches syncs iscsi_if.h with upstream commit + +commit ae542edb11c79706cd74d7bd54ebd7702965a7f3 +Author: Adheer Chandravanshi +Date: Mon Jul 1 05:54:11 2013 -0400 + + [SCSI] scsi_transport_iscsi: Exporting new attrs for iscsi session +and conne +--- + include/iscsi_if.h | 204 ++++++++++++++++++------------------------------- + usr/initiator.c | 12 +-- + usr/initiator.h | 1 + + usr/initiator_common.c | 38 +++++---- + 4 files changed, 99 insertions(+), 156 deletions(-) + +diff --git a/include/iscsi_if.h b/include/iscsi_if.h +index 20f2bc2..01d38e7 100644 +--- a/include/iscsi_if.h ++++ b/include/iscsi_if.h +@@ -495,47 +495,64 @@ enum iscsi_param { + + ISCSI_PARAM_TGT_RESET_TMO, + ISCSI_PARAM_TARGET_ALIAS, ++ ++ ISCSI_PARAM_CHAP_IN_IDX, ++ ISCSI_PARAM_CHAP_OUT_IDX, ++ ++ ISCSI_PARAM_BOOT_ROOT, ++ ISCSI_PARAM_BOOT_NIC, ++ ISCSI_PARAM_BOOT_TARGET, ++ ++ ISCSI_PARAM_AUTO_SND_TGT_DISABLE, ++ ISCSI_PARAM_DISCOVERY_SESS, ++ ISCSI_PARAM_PORTAL_TYPE, ++ ISCSI_PARAM_CHAP_AUTH_EN, ++ ISCSI_PARAM_DISCOVERY_LOGOUT_EN, ++ ISCSI_PARAM_BIDI_CHAP_EN, ++ ISCSI_PARAM_DISCOVERY_AUTH_OPTIONAL, ++ ++ ISCSI_PARAM_DEF_TIME2WAIT, ++ ISCSI_PARAM_DEF_TIME2RETAIN, ++ ISCSI_PARAM_MAX_SEGMENT_SIZE, ++ ISCSI_PARAM_STATSN, ++ ISCSI_PARAM_KEEPALIVE_TMO, ++ ISCSI_PARAM_LOCAL_PORT, ++ ISCSI_PARAM_TSID, ++ ISCSI_PARAM_DEF_TASKMGMT_TMO, ++ ++ ISCSI_PARAM_TCP_TIMESTAMP_STAT, ++ ISCSI_PARAM_TCP_WSF_DISABLE, ++ ISCSI_PARAM_TCP_NAGLE_DISABLE, ++ ISCSI_PARAM_TCP_TIMER_SCALE, ++ ISCSI_PARAM_TCP_TIMESTAMP_EN, ++ ISCSI_PARAM_TCP_XMIT_WSF, ++ ISCSI_PARAM_TCP_RECV_WSF, ++ ISCSI_PARAM_IP_FRAGMENT_DISABLE, ++ ISCSI_PARAM_IPV4_TOS, ++ ISCSI_PARAM_IPV6_TC, ++ ISCSI_PARAM_IPV6_FLOW_LABEL, ++ ISCSI_PARAM_IS_FW_ASSIGNED_IPV6, ++ ++ ISCSI_PARAM_DISCOVERY_PARENT_IDX, ++ ISCSI_PARAM_DISCOVERY_PARENT_TYPE, + /* must always be last */ + ISCSI_PARAM_MAX, + }; + +-#define ISCSI_MAX_RECV_DLENGTH (1ULL << ISCSI_PARAM_MAX_RECV_DLENGTH) +-#define ISCSI_MAX_XMIT_DLENGTH (1ULL << ISCSI_PARAM_MAX_XMIT_DLENGTH) +-#define ISCSI_HDRDGST_EN (1ULL << ISCSI_PARAM_HDRDGST_EN) +-#define ISCSI_DATADGST_EN (1ULL << ISCSI_PARAM_DATADGST_EN) +-#define ISCSI_INITIAL_R2T_EN (1ULL << ISCSI_PARAM_INITIAL_R2T_EN) +-#define ISCSI_MAX_R2T (1ULL << ISCSI_PARAM_MAX_R2T) +-#define ISCSI_IMM_DATA_EN (1ULL << ISCSI_PARAM_IMM_DATA_EN) +-#define ISCSI_FIRST_BURST (1ULL << ISCSI_PARAM_FIRST_BURST) +-#define ISCSI_MAX_BURST (1ULL << ISCSI_PARAM_MAX_BURST) +-#define ISCSI_PDU_INORDER_EN (1ULL << ISCSI_PARAM_PDU_INORDER_EN) +-#define ISCSI_DATASEQ_INORDER_EN (1ULL << ISCSI_PARAM_DATASEQ_INORDER_EN) +-#define ISCSI_ERL (1ULL << ISCSI_PARAM_ERL) +-#define ISCSI_IFMARKER_EN (1ULL << ISCSI_PARAM_IFMARKER_EN) +-#define ISCSI_OFMARKER_EN (1ULL << ISCSI_PARAM_OFMARKER_EN) +-#define ISCSI_EXP_STATSN (1ULL << ISCSI_PARAM_EXP_STATSN) +-#define ISCSI_TARGET_NAME (1ULL << ISCSI_PARAM_TARGET_NAME) +-#define ISCSI_TPGT (1ULL << ISCSI_PARAM_TPGT) +-#define ISCSI_PERSISTENT_ADDRESS (1ULL << ISCSI_PARAM_PERSISTENT_ADDRESS) +-#define ISCSI_PERSISTENT_PORT (1ULL << ISCSI_PARAM_PERSISTENT_PORT) +-#define ISCSI_SESS_RECOVERY_TMO (1ULL << ISCSI_PARAM_SESS_RECOVERY_TMO) +-#define ISCSI_CONN_PORT (1ULL << ISCSI_PARAM_CONN_PORT) +-#define ISCSI_CONN_ADDRESS (1ULL << ISCSI_PARAM_CONN_ADDRESS) +-#define ISCSI_USERNAME (1ULL << ISCSI_PARAM_USERNAME) +-#define ISCSI_USERNAME_IN (1ULL << ISCSI_PARAM_USERNAME_IN) +-#define ISCSI_PASSWORD (1ULL << ISCSI_PARAM_PASSWORD) +-#define ISCSI_PASSWORD_IN (1ULL << ISCSI_PARAM_PASSWORD_IN) +-#define ISCSI_FAST_ABORT (1ULL << ISCSI_PARAM_FAST_ABORT) +-#define ISCSI_ABORT_TMO (1ULL << ISCSI_PARAM_ABORT_TMO) +-#define ISCSI_LU_RESET_TMO (1ULL << ISCSI_PARAM_LU_RESET_TMO) +-#define ISCSI_HOST_RESET_TMO (1ULL << ISCSI_PARAM_HOST_RESET_TMO) +-#define ISCSI_PING_TMO (1ULL << ISCSI_PARAM_PING_TMO) +-#define ISCSI_RECV_TMO (1ULL << ISCSI_PARAM_RECV_TMO) +-#define ISCSI_IFACE_NAME (1ULL << ISCSI_PARAM_IFACE_NAME) +-#define ISCSI_ISID (1ULL << ISCSI_PARAM_ISID) +-#define ISCSI_INITIATOR_NAME (1ULL << ISCSI_PARAM_INITIATOR_NAME) +-#define ISCSI_TGT_RESET_TMO (1ULL << ISCSI_PARAM_TGT_RESET_TMO) +-#define ISCSI_TARGET_ALIAS (1ULL << ISCSI_PARAM_TARGET_ALIAS) ++/* iSCSI HBA params */ ++enum iscsi_host_param { ++ ISCSI_HOST_PARAM_HWADDRESS, ++ ISCSI_HOST_PARAM_INITIATOR_NAME, ++ ISCSI_HOST_PARAM_NETDEV_NAME, ++ ISCSI_HOST_PARAM_IPADDRESS, ++ ISCSI_HOST_PARAM_PORT_STATE, ++ ISCSI_HOST_PARAM_PORT_SPEED, ++ ISCSI_HOST_PARAM_MAX, ++}; ++ ++/* portal type */ ++#define PORTAL_TYPE_IPV4 "ipv4" ++#define PORTAL_TYPE_IPV6 "ipv6" + + /* iSCSI Flash Target params */ + enum iscsi_flashnode_param { +@@ -603,106 +620,32 @@ enum iscsi_flashnode_param { + ISCSI_FLASHNODE_MAX, + }; + +-#define ISCSI_FNODE_IS_FW_ASSIGNED_IPV6 \ +- (1ULL << ISCSI_FLASHNODE_IS_FW_ASSIGNED_IPV6) +-#define ISCSI_FNODE_PORTAL_TYPE (1ULL << ISCSI_FLASHNODE_PORTAL_TYPE) +-#define ISCSI_FNODE_AUTO_SND_TGT_DISABLE \ +- (1ULL << ISCSI_FLASHNODE_OPT_AUTO_SND_TGT_DISABLE) +-#define ISCSI_FNODE_DISCOVERY_SESS \ +- (1ULL << ISCSI_FLASHNODE_OPT_DISCOVERY_SESS) +-#define ISCSI_FNODE_ENTRY_EN (1ULL << ISCSI_FLASHNODE_ENTRY_EN) +-#define ISCSI_FNODE_HDR_DGST_EN (1ULL << ISCSI_FLASHNODE_HDR_DGST_EN) +-#define ISCSI_FNODE_DATA_DGST_EN (1ULL << ISCSI_FLASHNODE_DATA_DGST_EN) +-#define ISCSI_FNODE_IMM_DATA_EN (1ULL << ISCSI_FLASHNODE_IMM_DATA_EN) +-#define ISCSI_FNODE_INITIAL_R2T_EN (1ULL << ISCSI_FLASHNODE_INITIAL_R2T_EN) +-#define ISCSI_FNODE_DATASEQ_INORDER \ +- (1ULL << ISCSI_FLASHNODE_DATASEQ_INORDER) +-#define ISCSI_FNODE_PDU_INORDER (1ULL << ISCSI_FLASHNODE_PDU_INORDER) +-#define ISCSI_FNODE_CHAP_AUTH_EN (1ULL << ISCSI_FLASHNODE_CHAP_AUTH_EN) +-#define ISCSI_FNODE_SNACK_REQ_EN (1ULL << ISCSI_FLASHNODE_SNACK_REQ_EN) +-#define ISCSI_FNODE_DISCOVERY_LOGOUT_EN \ +- (1ULL << ISCSI_FLASHNODE_DISCOVERY_LOGOUT_EN) +-#define ISCSI_FNODE_BIDI_CHAP_EN (1ULL << ISCSI_FLASHNODE_BIDI_CHAP_EN) +-#define ISCSI_FNODE_DISCOVERY_AUTH_OPTIONAL \ +- (1ULL << ISCSI_FLASHNODE_DISCOVERY_AUTH_OPTIONAL) +-#define ISCSI_FNODE_ERL (1ULL << ISCSI_FLASHNODE_ERL) +-#define ISCSI_FNODE_TCP_TIMESTAMP_STAT \ +- (1ULL << ISCSI_FLASHNODE_TCP_TIMESTAMP_STAT) +-#define ISCSI_FNODE_TCP_NAGLE_DISABLE \ +- (1ULL << ISCSI_FLASHNODE_TCP_NAGLE_DISABLE) +-#define ISCSI_FNODE_TCP_WSF_DISABLE \ +- (1ULL << ISCSI_FLASHNODE_TCP_WSF_DISABLE) +-#define ISCSI_FNODE_TCP_TIMER_SCALE \ +- (1ULL << ISCSI_FLASHNODE_TCP_TIMER_SCALE) +-#define ISCSI_FNODE_TCP_TIMESTAMP_ENABLE \ +- (1ULL << ISCSI_FLASHNODE_TCP_TIMESTAMP_ENABLE) +-#define ISCSI_FNODE_IP_FRAG_DISABLE \ +- (1ULL << ISCSI_FLASHNODE_IP_FRAG_DISABLE) +-#define ISCSI_FNODE_MAX_RECV_DLENGTH \ +- (1ULL << ISCSI_FLASHNODE_MAX_RECV_DLENGTH) +-#define ISCSI_FNODE_MAX_XMIT_DLENGTH \ +- (1ULL << ISCSI_FLASHNODE_MAX_XMIT_DLENGTH) +-#define ISCSI_FNODE_FIRST_BURST (1ULL << ISCSI_FLASHNODE_FIRST_BURST) +-#define ISCSI_FNODE_DEF_TIME2WAIT (1ULL << ISCSI_FLASHNODE_DEF_TIME2WAIT) +-#define ISCSI_FNODE_DEF_TIME2RETAIN \ +- (1ULL << ISCSI_FLASHNODE_DEF_TIME2RETAIN) +-#define ISCSI_FNODE_MAX_R2T (1ULL << ISCSI_FLASHNODE_MAX_R2T) +-#define ISCSI_FNODE_KEEPALIVE_TMO (1ULL << ISCSI_FLASHNODE_KEEPALIVE_TMO) +-#define ISCSI_FNODE_ISID (1ULL << ISCSI_FLASHNODE_ISID) +-#define ISCSI_FNODE_TSID (1ULL << ISCSI_FLASHNODE_TSID) +-#define ISCSI_FNODE_PORT (1ULL << ISCSI_FLASHNODE_PORT) +-#define ISCSI_FNODE_MAX_BURST (1ULL << ISCSI_FLASHNODE_MAX_BURST) +-#define ISCSI_FNODE_DEF_TMF_TMO (1ULL << ISCSI_FLASHNODE_DEF_TMF_TMO) +-#define ISCSI_FNODE_IPADDR (1ULL << ISCSI_FLASHNODE_IPADDR) +-#define ISCSI_FNODE_ALIAS (1ULL << ISCSI_FLASHNODE_ALIAS) +-#define ISCSI_FNODE_REDIRECT_IPADDR \ +- (1ULL << ISCSI_FLASHNODE_REDIRECT_IPADDR) +-#define ISCSI_FNODE_MAX_SEGMENT_SIZE \ +- (1ULL << ISCSI_FLASHNODE_MAX_SEGMENT_SIZE) +-#define ISCSI_FNODE_LOCAL_PORT (1ULL << ISCSI_FLASHNODE_LOCAL_PORT) +-#define ISCSI_FNODE_IPV4_TOS (1ULL << ISCSI_FLASHNODE_IPV4_TOS) +-#define ISCSI_FNODE_IPV6_TC (1ULL << ISCSI_FLASHNODE_IPV6_TC) +-#define ISCSI_FNODE_IPV6_FLOW_LABEL \ +- (1ULL << ISCSI_FLASHNODE_IPV6_FLOW_LABEL) +-#define ISCSI_FNODE_NAME (1ULL << ISCSI_FLASHNODE_NAME) +-#define ISCSI_FNODE_TPGT (1ULL << ISCSI_FLASHNODE_TPGT) +-#define ISCSI_FNODE_LINK_LOCAL_IPV6 \ +- (1ULL << ISCSI_FLASHNODE_LINK_LOCAL_IPV6) +-#define ISCSI_FNODE_DISCOVERY_PARENT_IDX \ +- (1ULL << ISCSI_FLASHNODE_DISCOVERY_PARENT_IDX) +-#define ISCSI_FNODE_DISCOVERY_PARENT_TYPE \ +- (1ULL << ISCSI_FLASHNODE_DISCOVERY_PARENT_TYPE) +-#define ISCSI_FNODE_TCP_XMIT_WSF (1ULL << ISCSI_FLASHNODE_TCP_XMIT_WSF) +-#define ISCSI_FNODE_TCP_RECV_WSF (1ULL << ISCSI_FLASHNODE_TCP_RECV_WSF) +-#define ISCSI_FNODE_CHAP_IN_IDX (1ULL << ISCSI_FLASHNODE_CHAP_IN_IDX) +-#define ISCSI_FNODE_CHAP_OUT_IDX (1ULL << ISCSI_FLASHNODE_CHAP_OUT_IDX) +-#define ISCSI_FNODE_USERNAME (1ULL << ISCSI_FLASHNODE_USERNAME) +-#define ISCSI_FNODE_USERNAME_IN (1ULL << ISCSI_FLASHNODE_USERNAME_IN) +-#define ISCSI_FNODE_PASSWORD (1ULL << ISCSI_FLASHNODE_PASSWORD) +-#define ISCSI_FNODE_PASSWORD_IN (1ULL << ISCSI_FLASHNODE_PASSWORD_IN) +-#define ISCSI_FNODE_STATSN (1ULL << ISCSI_FLASHNODE_STATSN) +-#define ISCSI_FNODE_EXP_STATSN (1ULL << ISCSI_FLASHNODE_EXP_STATSN) +-#define ISCSI_FNODE_IS_BOOT_TGT (1ULL << ISCSI_FLASHNODE_IS_BOOT_TGT) +- + struct iscsi_flashnode_param_info { + uint32_t len; /* Actual length of the param */ + uint16_t param; /* iscsi param value */ + uint8_t value[0]; /* length sized value follows */ + } __attribute__((__packed__)); + +-/* iSCSI HBA params */ +-enum iscsi_host_param { +- ISCSI_HOST_PARAM_HWADDRESS, +- ISCSI_HOST_PARAM_INITIATOR_NAME, +- ISCSI_HOST_PARAM_NETDEV_NAME, +- ISCSI_HOST_PARAM_IPADDRESS, +- ISCSI_HOST_PARAM_MAX, ++enum iscsi_discovery_parent_type { ++ ISCSI_DISC_PARENT_UNKNOWN = 0x1, ++ ISCSI_DISC_PARENT_SENDTGT = 0x2, ++ ISCSI_DISC_PARENT_ISNS = 0x3, + }; + +-#define ISCSI_HOST_HWADDRESS (1ULL << ISCSI_HOST_PARAM_HWADDRESS) +-#define ISCSI_HOST_INITIATOR_NAME (1ULL << ISCSI_HOST_PARAM_INITIATOR_NAME) +-#define ISCSI_HOST_NETDEV_NAME (1ULL << ISCSI_HOST_PARAM_NETDEV_NAME) +-#define ISCSI_HOST_IPADDRESS (1ULL << ISCSI_HOST_PARAM_IPADDRESS) ++/* iSCSI port Speed */ ++enum iscsi_port_speed { ++ ISCSI_PORT_SPEED_UNKNOWN = 0x1, ++ ISCSI_PORT_SPEED_10MBPS = 0x2, ++ ISCSI_PORT_SPEED_100MBPS = 0x4, ++ ISCSI_PORT_SPEED_1GBPS = 0x8, ++ ISCSI_PORT_SPEED_10GBPS = 0x10, ++}; ++ ++/* iSCSI port state */ ++enum iscsi_port_state { ++ ISCSI_PORT_STATE_DOWN = 0x1, ++ ISCSI_PORT_STATE_UP = 0x2, ++}; + + /* iSCSI PING status/error code */ + enum iscsi_ping_status_code { +@@ -739,7 +682,7 @@ enum iscsi_ping_status_code { + #define CAP_DIGEST_OFFLOAD 0x1000 /* offload hdr and data digests */ + #define CAP_PADDING_OFFLOAD 0x2000 /* offload padding insertion, removal, + and verification */ +-#define CAP_LOGIN_OFFLOAD 0x4000 /* offload normal session login */ ++#define CAP_LOGIN_OFFLOAD 0x4000 /* offload session login */ + + /* + * These flags describes reason of stop_conn() call +@@ -807,7 +750,6 @@ enum chap_type_e { + + #define ISCSI_CHAP_AUTH_NAME_MAX_LEN 256 + #define ISCSI_CHAP_AUTH_SECRET_MAX_LEN 256 +- + struct iscsi_chap_rec { + uint16_t chap_tbl_idx; + enum chap_type_e chap_type; +diff --git a/usr/initiator.c b/usr/initiator.c +index a3b24b7..79d1779 100644 +--- a/usr/initiator.c ++++ b/usr/initiator.c +@@ -384,17 +384,7 @@ __session_create(node_rec_t *rec, struct iscsi_transport *t) + /* setup authentication variables for the session*/ + iscsi_setup_authentication(session, &rec->session.auth); + +- session->param_mask = ~0ULL; +- if (!(t->caps & CAP_MULTI_R2T)) +- session->param_mask &= ~ISCSI_MAX_R2T; +- if (!(t->caps & CAP_HDRDGST)) +- session->param_mask &= ~ISCSI_HDRDGST_EN; +- if (!(t->caps & CAP_DATADGST)) +- session->param_mask &= ~ISCSI_DATADGST_EN; +- if (!(t->caps & CAP_MARKERS)) { +- session->param_mask &= ~ISCSI_IFMARKER_EN; +- session->param_mask &= ~ISCSI_OFMARKER_EN; +- } ++ iscsi_session_init_params(session); + + hostno = iscsi_sysfs_get_host_no_from_hwinfo(&rec->iface, &rc); + if (!rc) { +diff --git a/usr/initiator.h b/usr/initiator.h +index d6dc02e..680640c 100644 +--- a/usr/initiator.h ++++ b/usr/initiator.h +@@ -357,5 +357,6 @@ extern int iscsi_setup_portal(struct iscsi_conn *conn, char *address, int port); + extern int iscsi_set_net_config(struct iscsi_transport *t, + iscsi_session_t *session, + struct iface_rec *iface); ++extern void iscsi_session_init_params(struct iscsi_session *session); + + #endif /* INITIATOR_H */ +diff --git a/usr/initiator_common.c b/usr/initiator_common.c +index eb72795..0fb7edc 100644 +--- a/usr/initiator_common.c ++++ b/usr/initiator_common.c +@@ -324,12 +324,32 @@ int iscsi_host_set_params(struct iscsi_session *session) + return 0; + } + ++static inline void iscsi_session_clear_param(struct iscsi_session *session, ++ int param) ++{ ++ session->param_mask &= ~(1ULL << param); ++} ++ ++void iscsi_session_init_params(struct iscsi_session *session) ++{ ++ session->param_mask = ~0ULL; ++ if (!(session->t->caps & CAP_MULTI_R2T)) ++ iscsi_session_clear_param(session, ISCSI_PARAM_MAX_R2T); ++ if (!(session->t->caps & CAP_HDRDGST)) ++ iscsi_session_clear_param(session, ISCSI_PARAM_HDRDGST_EN); ++ if (!(session->t->caps & CAP_DATADGST)) ++ iscsi_session_clear_param(session, ISCSI_PARAM_DATADGST_EN); ++ if (!(session->t->caps & CAP_MARKERS)) { ++ iscsi_session_clear_param(session, ISCSI_PARAM_IFMARKER_EN); ++ iscsi_session_clear_param(session, ISCSI_PARAM_OFMARKER_EN); ++ } ++} ++ + #define MAX_SESSION_PARAMS 32 + + int iscsi_session_set_params(struct iscsi_conn *conn) + { + struct iscsi_session *session = conn->session; +- struct iscsi_transport *t = session->t; + int i, rc; + uint32_t one = 1, zero = 0; + struct connparam { +@@ -499,22 +519,12 @@ int iscsi_session_set_params(struct iscsi_conn *conn) + }, + }; + +- session->param_mask = ~0ULL; +- if (!(t->caps & CAP_MULTI_R2T)) +- session->param_mask &= ~ISCSI_MAX_R2T; +- if (!(t->caps & CAP_HDRDGST)) +- session->param_mask &= ~ISCSI_HDRDGST_EN; +- if (!(t->caps & CAP_DATADGST)) +- session->param_mask &= ~ISCSI_DATADGST_EN; +- if (!(t->caps & CAP_MARKERS)) { +- session->param_mask &= ~ISCSI_IFMARKER_EN; +- session->param_mask &= ~ISCSI_OFMARKER_EN; +- } ++ iscsi_session_init_params(session); + + /* some llds will send nops internally */ + if (!iscsi_sysfs_session_supports_nop(session->id)) { +- session->param_mask &= ~ISCSI_PING_TMO; +- session->param_mask &= ~ISCSI_RECV_TMO; ++ iscsi_session_clear_param(session, ISCSI_PARAM_PING_TMO); ++ iscsi_session_clear_param(session, ISCSI_PARAM_RECV_TMO); + } + + /* Entered full-feature phase! */ +-- +1.8.3.1 + diff --git a/0031-PATCH-v5-1-3-ISCSISTART-Saved-ibft-boot-info-to-the-.patch b/0031-PATCH-v5-1-3-ISCSISTART-Saved-ibft-boot-info-to-the-.patch new file mode 100644 index 0000000..6b15ca3 --- /dev/null +++ b/0031-PATCH-v5-1-3-ISCSISTART-Saved-ibft-boot-info-to-the-.patch @@ -0,0 +1,152 @@ +From 5992173f13550d75659fec1d7e1f6e87895d560a Mon Sep 17 00:00:00 2001 +From: Mike Christie +Date: Wed, 11 Sep 2013 23:59:31 -0700 +Subject: [PATCH] [PATCH v5 1/3] ISCSISTART: Saved ibft boot info to the + session + +Patch and description from Eddie Wai: + +Three new session sysfs parameters are introduced: +boot_root - holds the ibft boot root folder name +boot_nic - holds the ibft boot ethernetN name +boot_target - holds the ibft boot targetN name + +This patch copies over the /sys/firmware//ethernetN/targetN +info +from the boot context to the node_rec. + +Signed-off-by: Eddie Wai +--- + include/fw_context.h | 3 +++ + include/iscsi_proto.h | 1 + + usr/config.h | 3 +++ + usr/idbm.c | 6 ++++++ + usr/initiator_common.c | 14 +++++++++++++- + utils/fwparam_ibft/fwparam_sysfs.c | 8 ++++++++ + 6 files changed, 34 insertions(+), 1 deletion(-) + +diff --git a/include/fw_context.h b/include/fw_context.h +index 1640859..6563d68 100644 +--- a/include/fw_context.h ++++ b/include/fw_context.h +@@ -30,6 +30,9 @@ + + struct boot_context { + struct list_head list; ++ char boot_root[BOOT_NAME_MAXLEN]; ++ char boot_nic[BOOT_NAME_MAXLEN]; ++ char boot_target[BOOT_NAME_MAXLEN]; + + /* target settings */ + int target_port; +diff --git a/include/iscsi_proto.h b/include/iscsi_proto.h +index 1c69feb..56f757b 100644 +--- a/include/iscsi_proto.h ++++ b/include/iscsi_proto.h +@@ -619,6 +619,7 @@ struct iscsi_reject { + #define KEY_MAXLEN 64 + #define VALUE_MAXLEN 255 + #define TARGET_NAME_MAXLEN VALUE_MAXLEN ++#define BOOT_NAME_MAXLEN 256 + + #define ISCSI_DEF_MAX_RECV_SEG_LEN 8192 + #define ISCSI_MIN_MAX_RECV_SEG_LEN 512 +diff --git a/usr/config.h b/usr/config.h +index 998caff..d457bdd 100644 +--- a/usr/config.h ++++ b/usr/config.h +@@ -201,6 +201,9 @@ typedef struct session_rec { + * allowed to be initiated on this record + */ + unsigned char multiple; ++ char boot_root[BOOT_NAME_MAXLEN]; ++ char boot_nic[BOOT_NAME_MAXLEN]; ++ char boot_target[BOOT_NAME_MAXLEN]; + } session_rec_t; + + #define ISCSI_TRANSPORT_NAME_MAXLEN 16 +diff --git a/usr/idbm.c b/usr/idbm.c +index bc06058..1e4f8c8 100644 +--- a/usr/idbm.c ++++ b/usr/idbm.c +@@ -2748,6 +2748,12 @@ struct node_rec *idbm_create_rec_from_boot_context(struct boot_context *context) + strlen((char *)context->chap_password); + rec->session.auth.password_in_length = + strlen((char *)context->chap_password_in); ++ strlcpy(rec->session.boot_root, context->boot_root, ++ sizeof(context->boot_root)); ++ strlcpy(rec->session.boot_nic, context->boot_nic, ++ sizeof(context->boot_nic)); ++ strlcpy(rec->session.boot_target, context->boot_target, ++ sizeof(context->boot_target)); + + iface_setup_from_boot_context(&rec->iface, context); + +diff --git a/usr/initiator_common.c b/usr/initiator_common.c +index 0fb7edc..e2e87a1 100644 +--- a/usr/initiator_common.c ++++ b/usr/initiator_common.c +@@ -345,7 +345,7 @@ void iscsi_session_init_params(struct iscsi_session *session) + } + } + +-#define MAX_SESSION_PARAMS 32 ++#define MAX_SESSION_PARAMS 35 + + int iscsi_session_set_params(struct iscsi_conn *conn) + { +@@ -516,6 +516,18 @@ int iscsi_session_set_params(struct iscsi_conn *conn) + .param = ISCSI_PARAM_INITIATOR_NAME, + .value = session->initiator_name, + .type = ISCSI_STRING, ++ }, { ++ .param = ISCSI_PARAM_BOOT_ROOT, ++ .value = session->nrec.session.boot_root, ++ .type = ISCSI_STRING, ++ }, { ++ .param = ISCSI_PARAM_BOOT_NIC, ++ .value = session->nrec.session.boot_nic, ++ .type = ISCSI_STRING, ++ }, { ++ .param = ISCSI_PARAM_BOOT_TARGET, ++ .value = session->nrec.session.boot_target, ++ .type = ISCSI_STRING, + }, + }; + +diff --git a/utils/fwparam_ibft/fwparam_sysfs.c b/utils/fwparam_ibft/fwparam_sysfs.c +index 3997363..2f37b59 100644 +--- a/utils/fwparam_ibft/fwparam_sysfs.c ++++ b/utils/fwparam_ibft/fwparam_sysfs.c +@@ -200,6 +200,9 @@ static int fill_nic_context(char *subsys, char *id, + strlcpy(context->scsi_host_name, subsys, + sizeof(context->scsi_host_name)); + ++ memset(&context->boot_nic, 0, sizeof(context->boot_nic)); ++ snprintf(context->boot_nic, sizeof(context->boot_nic), "%s", id); ++ + sysfs_get_str(id, subsys, "ip-addr", context->ipaddr, + sizeof(context->ipaddr)); + sysfs_get_str(id, subsys, "vlan", context->vlan, +@@ -224,6 +227,8 @@ static void fill_initiator_context(char *subsys, struct boot_context *context) + sizeof(context->initiatorname)); + sysfs_get_str("initiator", subsys, "isid", context->isid, + sizeof(context->isid)); ++ ++ strlcpy(context->boot_root, subsys, sizeof(context->boot_root)); + } + static int fill_tgt_context(char *subsys, char *id, + struct boot_context *context) +@@ -240,6 +245,9 @@ static int fill_tgt_context(char *subsys, char *id, + if (rc) + return rc; + ++ memset(&context->boot_target, 0, sizeof(context->boot_target)); ++ snprintf(context->boot_target, sizeof(context->boot_target), "%s", id); ++ + /* + * We can live without the rest of they do not exist. If we + * failed to get them we will figure it out when we login. +-- +1.8.3.1 + diff --git a/0032-ISCSID-Added-the-extraction-of-the-session-boot-info.patch b/0032-ISCSID-Added-the-extraction-of-the-session-boot-info.patch new file mode 100644 index 0000000..854127c --- /dev/null +++ b/0032-ISCSID-Added-the-extraction-of-the-session-boot-info.patch @@ -0,0 +1,104 @@ +From 487c312c96379e45648c782cee5b0d469cba80d0 Mon Sep 17 00:00:00 2001 +From: Eddie Wai +Date: Fri, 23 Aug 2013 14:04:11 -0700 +Subject: [PATCH] ISCSID: Added the extraction of the session boot info + +This patch does the work to extract the corresponding +->ethernetN net params as specified from the kernel +session boot_nic sysfs entry based on the transport param +use_boot_info. + +This is only populated for iscsi_tcp and bnx2i. + +Signed-off-by: Eddie Wai +--- + usr/iscsi_sysfs.c | 40 ++++++++++++++++++++++++++++++++++++++++ + usr/transport.c | 1 + + usr/transport.h | 1 + + 3 files changed, 42 insertions(+) + +diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c +index aed10a3..56cb90c 100644 +--- a/usr/iscsi_sysfs.c ++++ b/usr/iscsi_sysfs.c +@@ -674,6 +674,43 @@ free_fnode: + return rc; + } + ++static int iscsi_sysfs_read_boot(struct iface_rec *iface, char *session) ++{ ++ char boot_root[BOOT_NAME_MAXLEN], boot_nic[BOOT_NAME_MAXLEN]; ++ char boot_name[BOOT_NAME_MAXLEN], boot_content[BOOT_NAME_MAXLEN]; ++ ++ /* Extract boot info */ ++ strlcpy(boot_name, "boot_target", sizeof(boot_name)); ++ if (sysfs_get_str(session, ISCSI_SESSION_SUBSYS, boot_name, ++ boot_content, BOOT_NAME_MAXLEN)) ++ return -1; ++ strlcpy(boot_name, "boot_nic", sizeof(boot_name)); ++ if (sysfs_get_str(session, ISCSI_SESSION_SUBSYS, boot_name, boot_nic, ++ BOOT_NAME_MAXLEN)) ++ return -1; ++ strlcpy(boot_name, "boot_root", sizeof(boot_name)); ++ if (sysfs_get_str(session, ISCSI_SESSION_SUBSYS, boot_name, boot_root, ++ BOOT_NAME_MAXLEN)) ++ return -1; ++ ++ /* If all boot_root/boot_target/boot_nic exist, then extract the ++ info from the boot nic */ ++ if (sysfs_get_str(boot_nic, boot_root, "vlan", boot_content, ++ BOOT_NAME_MAXLEN)) ++ log_debug(5, "could not read %s/%s/vlan", boot_root, boot_nic); ++ else ++ iface->vlan_id = atoi(boot_content); ++ ++ if (sysfs_get_str(boot_nic, boot_root, "subnet-mask", ++ iface->subnet_mask, NI_MAXHOST)) ++ log_debug(5, "could not read %s/%s/subnet", boot_root, ++ boot_nic); ++ ++ log_debug(5, "sysfs read boot returns %s/%s/ vlan = %d subnet = %s", ++ boot_root, boot_nic, iface->vlan_id, iface->subnet_mask); ++ return 0; ++} ++ + /* + * Read in iface settings based on host and session values. If + * session is not passed in, then the ifacename will not be set. And +@@ -802,6 +839,9 @@ static int iscsi_sysfs_read_iface(struct iface_rec *iface, int host_no, + } + } + ++ if (session && t->template->use_boot_info) ++ iscsi_sysfs_read_boot(iface, session); ++ + if (!iface_kern_id) + goto done; + +diff --git a/usr/transport.c b/usr/transport.c +index 52b7674..2f38519 100644 +--- a/usr/transport.c ++++ b/usr/transport.c +@@ -77,6 +77,7 @@ struct iscsi_transport_template cxgb4i = { + struct iscsi_transport_template bnx2i = { + .name = "bnx2i", + .set_host_ip = 1, ++ .use_boot_info = 1, + .ep_connect = ktransport_ep_connect, + .ep_poll = ktransport_ep_poll, + .ep_disconnect = ktransport_ep_disconnect, +diff --git a/usr/transport.h b/usr/transport.h +index 5dcf872..388e4b1 100644 +--- a/usr/transport.h ++++ b/usr/transport.h +@@ -31,6 +31,7 @@ struct iscsi_transport_template { + * the host's ip address. + */ + uint8_t set_host_ip; ++ uint8_t use_boot_info; + int (*ep_connect) (struct iscsi_conn *conn, int non_blocking); + int (*ep_poll) (struct iscsi_conn *conn, int timeout_ms); + void (*ep_disconnect) (struct iscsi_conn *conn); +-- +1.8.3.1 + diff --git a/0033-ISCSID-Added-iface-content-override-fix.patch b/0033-ISCSID-Added-iface-content-override-fix.patch new file mode 100644 index 0000000..1b923ae --- /dev/null +++ b/0033-ISCSID-Added-iface-content-override-fix.patch @@ -0,0 +1,57 @@ +From 3b4b45001b6d8412aad76a55347de42d30d694f7 Mon Sep 17 00:00:00 2001 +From: Eddie Wai +Date: Fri, 23 Aug 2013 14:04:12 -0700 +Subject: [PATCH] ISCSID: Added iface content override fix + +Patch provided by Mike Christie. + +This patch fixes the unconditional overwrite of the iface struct +even when the corresponding iface info from the node config was +found and extracted. + +Signed-off-by: Eddie Wai +--- + usr/iscsid.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/usr/iscsid.c b/usr/iscsid.c +index 8f19220..d1756ef 100644 +--- a/usr/iscsid.c ++++ b/usr/iscsid.c +@@ -111,9 +111,7 @@ setup_rec_from_negotiated_values(node_rec_t *rec, struct session_info *info) + strlcpy(rec->name, info->targetname, TARGET_NAME_MAXLEN); + rec->conn[0].port = info->persistent_port; + strlcpy(rec->conn[0].address, info->persistent_address, NI_MAXHOST); +- memcpy(&rec->iface, &info->iface, sizeof(struct iface_rec)); + rec->tpgt = info->tpgt; +- iface_copy(&rec->iface, &info->iface); + + iscsi_sysfs_get_negotiated_session_conf(info->sid, &session_conf); + iscsi_sysfs_get_negotiated_conn_conf(info->sid, &conn_conf); +@@ -238,6 +236,7 @@ static int sync_session(void *data, struct session_info *info) + log_warning("Could not read data from db. Using default and " + "currently negotiated values\n"); + setup_rec_from_negotiated_values(&rec, info); ++ iface_copy(&rec.iface, &info->iface); + } else { + /* + * we have a valid record and iface so lets merge +@@ -251,13 +250,12 @@ static int sync_session(void *data, struct session_info *info) + memset(&sysfsrec, 0, sizeof(node_rec_t)); + setup_rec_from_negotiated_values(&sysfsrec, info); + /* +- * target, portal and iface name values have to be the same ++ * target, portal and iface values have to be the same + * or we would not have found the record, so just copy +- * CHAP and iface settings. ++ * CHAP settings. + */ + memcpy(&rec.session.auth, &sysfsrec.session.auth, + sizeof(struct iscsi_auth_config)); +- memcpy(&rec.iface, &info->iface, sizeof(rec.iface)); + } + + /* multiple drivers could be connected to the same portal */ +-- +1.8.3.1 + diff --git a/0034-iscsi-tools-Bug-fix-on-IPC-address-copy-version-2.patch b/0034-iscsi-tools-Bug-fix-on-IPC-address-copy-version-2.patch new file mode 100644 index 0000000..4ae64e7 --- /dev/null +++ b/0034-iscsi-tools-Bug-fix-on-IPC-address-copy-version-2.patch @@ -0,0 +1,103 @@ +From 1fa1b51356c0ea6e1d30f2d370b3b766d4230537 Mon Sep 17 00:00:00 2001 +From: Mike Christie +Date: Thu, 5 Dec 2013 18:12:32 -0600 +Subject: [PATCH] iscsi tools: Bug fix on IPC address copy (version 2) + +This patch merges Yufei Ren patch +with comments from the list plus what I think is a bug in the +addr_len usage. + +For the addr_len use, it looks like we were using that as the +arg to memcpy, but that value included the length of the pathname +string and also the offset of sun_path in the sockaddr_un and so +that is too long. +--- + usr/iscsi_util.c | 12 ++++++++++++ + usr/iscsi_util.h | 3 +++ + usr/iscsid_req.c | 7 +------ + usr/mgmt_ipc.c | 6 +----- + 4 files changed, 17 insertions(+), 11 deletions(-) + +diff --git a/usr/iscsi_util.c b/usr/iscsi_util.c +index ac86847..9dbfbfd 100644 +--- a/usr/iscsi_util.c ++++ b/usr/iscsi_util.c +@@ -25,16 +25,28 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include + ++#include "sysdeps.h" + #include "log.h" + #include "iscsi_settings.h" + #include "iface.h" + #include "session_info.h" + #include "iscsi_util.h" + ++int setup_abstract_addr(struct sockaddr_un *addr, char *unix_sock_name) ++{ ++ memset(addr, 0, sizeof(*addr)); ++ addr->sun_family = AF_LOCAL; ++ strlcpy(addr->sun_path + 1, unix_sock_name, sizeof(addr->sun_path) - 1); ++ return offsetof(struct sockaddr_un, sun_path) + ++ strlen(addr->sun_path + 1) + 1; ++} ++ + void daemon_init(void) + { + int fd; +diff --git a/usr/iscsi_util.h b/usr/iscsi_util.h +index 110dfa8..ff725eb 100644 +--- a/usr/iscsi_util.h ++++ b/usr/iscsi_util.h +@@ -26,4 +26,7 @@ extern int __iscsi_match_session(struct node_rec *rec, char *targetname, + extern char *strstrip(char *s); + extern char *cfg_get_string_param(char *pathname, const char *key); + ++struct sockaddr_un; ++extern int setup_abstract_addr(struct sockaddr_un *addr, char *unix_sock_name); ++ + #endif +diff --git a/usr/iscsid_req.c b/usr/iscsid_req.c +index 715c0aa..0e91dee 100644 +--- a/usr/iscsid_req.c ++++ b/usr/iscsid_req.c +@@ -67,12 +67,7 @@ static int ipc_connect(int *fd, char *unix_sock_name, int start_iscsid) + return ISCSI_ERR_ISCSID_NOTCONN; + } + +- addr_len = offsetof(struct sockaddr_un, sun_path) + strlen(unix_sock_name) + 1; +- +- memset(&addr, 0, sizeof(addr)); +- addr.sun_family = AF_LOCAL; +- memcpy((char *) &addr.sun_path + 1, unix_sock_name, +- strlen(unix_sock_name)); ++ addr_len = setup_abstract_addr(&addr, unix_sock_name); + + /* + * Trying to connect with exponential backoff +diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c +index 87bd346..a82c063 100644 +--- a/usr/mgmt_ipc.c ++++ b/usr/mgmt_ipc.c +@@ -59,11 +59,7 @@ mgmt_ipc_listen(void) + return fd; + } + +- addr_len = offsetof(struct sockaddr_un, sun_path) + strlen(ISCSIADM_NAMESPACE) + 1; +- +- memset(&addr, 0, sizeof(addr)); +- addr.sun_family = AF_LOCAL; +- memcpy((char *) &addr.sun_path + 1, ISCSIADM_NAMESPACE, addr_len); ++ addr_len = setup_abstract_addr(&addr, ISCSIADM_NAMESPACE); + + if ((err = bind(fd, (struct sockaddr *) &addr, addr_len)) < 0 ) { + log_error("Can not bind IPC socket"); +-- +1.8.3.1 + diff --git a/0035-flashnode-Add-support-to-set-ISCSI_FLASHNODE_CHAP_OU.patch b/0035-flashnode-Add-support-to-set-ISCSI_FLASHNODE_CHAP_OU.patch new file mode 100644 index 0000000..cfbde0c --- /dev/null +++ b/0035-flashnode-Add-support-to-set-ISCSI_FLASHNODE_CHAP_OU.patch @@ -0,0 +1,35 @@ +From 360a40f8a83e08a09b34cb12e269c793028b315e Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Tue, 17 Sep 2013 08:07:28 -0400 +Subject: [PATCH] flashnode: Add support to set ISCSI_FLASHNODE_CHAP_OUT_IDX + param + +Add support to set the chap_out_idx session param of flashnode +entry. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + usr/flashnode.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/usr/flashnode.c b/usr/flashnode.c +index da1392a..fe5ab57 100644 +--- a/usr/flashnode.c ++++ b/usr/flashnode.c +@@ -449,6 +449,12 @@ int flashnode_build_config(struct list_head *params, + fnode->sess.portal_type, + sizeof(fnode->sess.portal_type))) + count++; ++ } else if (!strcmp(param->name, ++ to_key(FLASHNODE_SESS_CHAP_OUT_IDX))) { ++ if (!flashnode_fill_uint32(fnode, &iov[count], ++ ISCSI_FLASHNODE_CHAP_OUT_IDX, ++ fnode->sess.chap_out_idx)) ++ count++; + } else if (!strcmp(param->name, to_key(FLASHNODE_CONN_PORT))) { + if (fnode->conn[0].port) + port = fnode->conn[0].port; +-- +1.8.3.1 + diff --git a/0036-iscsiadm-Use-x-option-instead-of-v-to-specify-chap_t.patch b/0036-iscsiadm-Use-x-option-instead-of-v-to-specify-chap_t.patch new file mode 100644 index 0000000..c18f6da --- /dev/null +++ b/0036-iscsiadm-Use-x-option-instead-of-v-to-specify-chap_t.patch @@ -0,0 +1,146 @@ +From b3913c5943b6e908a1bb8ce83a2e79200d0ceed9 Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Tue, 17 Sep 2013 08:07:29 -0400 +Subject: [PATCH] iscsiadm: Use '-x' option instead of '-v' to specify + chap_tbl_idx + +Make appropriate changes to use -x option for chap_tbl_idx cmdline +param. This is done because -v option is used along with -n option +to get the name/value pair. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + usr/host.h | 1 + + usr/iscsiadm.c | 36 +++++++++++++++++------------------- + 2 files changed, 18 insertions(+), 19 deletions(-) + +diff --git a/usr/host.h b/usr/host.h +index db44cfa..52e5b9e 100644 +--- a/usr/host.h ++++ b/usr/host.h +@@ -7,6 +7,7 @@ + + #define MAX_HOST_NO UINT_MAX + ++#define MAX_CHAP_ENTRIES 2048 + #define MAX_CHAP_BUF_SZ 4096 + #define REQ_CHAP_BUF_SZ (MAX_CHAP_BUF_SZ + sizeof(struct iscsi_uevent)) + +diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c +index c7337ae..beabdf0 100644 +--- a/usr/iscsiadm.c ++++ b/usr/iscsiadm.c +@@ -115,7 +115,7 @@ static struct option const long_options[] = + {"packetsize", required_argument, NULL, 'b'}, + {"count", required_argument, NULL, 'c'}, + {"interval", required_argument, NULL, 'i'}, +- {"flashnode_idx", optional_argument, NULL, 'x'}, ++ {"index", optional_argument, NULL, 'x'}, + {"portal_type", optional_argument, NULL, 'A'}, + {NULL, 0, NULL, 0}, + }; +@@ -136,7 +136,7 @@ iscsiadm -m node [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -L all,manual,au + iscsiadm -m session [ -hV ] [ -d debug_level ] [ -P printlevel] [ -r sessionid | sysfsdir [ -R | -u | -s ] [ -o operation ] [ -n name ] [ -v value ] ]\n\ + iscsiadm -m iface [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I ifacename | -H hostno|MAC ] [ [ -o operation ] [ -n name ] [ -v value ] ] [ -C ping [ -a ip ] [ -b packetsize ] [ -c count ] [ -i interval ] ]\n\ + iscsiadm -m fw [ -d debug_level ] [ -l ]\n\ +-iscsiadm -m host [ -P printlevel ] [ -H hostno|MAC ] [ [ -C chap [ -o operation ] [ -v chap_tbl_idx ] ] | [ -C flashnode [ -o operation ] [ -A portal_type ] [ -x flashnode_idx ] [ -n name ] [ -v value ] ] ]\n\ ++iscsiadm -m host [ -P printlevel ] [ -H hostno|MAC ] [ [ -C chap [ -x chap_tbl_idx ] ] | [ -C flashnode [ -A portal_type ] [ -x flashnode_idx ] ] ] [ [ -o operation ] [ -n name ] [ -v value ] ] \n\ + iscsiadm -k priority\n"); + } + exit(status); +@@ -1426,18 +1426,10 @@ exit_chap_info: + return rc; + } + +-static int delete_host_chap_info(uint32_t host_no, char *value) ++static int delete_host_chap_info(uint32_t host_no, uint16_t chap_tbl_idx) + { + struct iscsi_transport *t = NULL; + int fd, rc = 0; +- uint16_t chap_tbl_idx; +- +- if (!value) { +- log_error("CHAP deletion requires --value=table_index."); +- return ISCSI_ERR_INVAL; +- } +- +- chap_tbl_idx = (uint16_t)atoi(value); + + t = iscsi_sysfs_get_transport_by_hba(host_no); + if (!t) { +@@ -1472,22 +1464,28 @@ exit_delete_chap: + } + + static int exec_host_chap_op(int op, int info_level, uint32_t host_no, +- char *value) ++ uint64_t chap_index) + { + int rc = ISCSI_ERR_INVAL; + ++ if (op != OP_SHOW && (chap_index > (uint64_t)MAX_CHAP_ENTRIES)) { ++ log_error("Invalid chap table index."); ++ goto exit_chap_op; ++ } ++ + switch (op) { + case OP_SHOW: + rc = get_host_chap_info(host_no); + break; + case OP_DELETE: +- rc = delete_host_chap_info(host_no, value); ++ rc = delete_host_chap_info(host_no, chap_index); + break; + default: + log_error("Invalid operation."); + break; + } + ++exit_chap_op: + return rc; + } + +@@ -2818,7 +2816,7 @@ main(int argc, char **argv) + struct iface_rec *iface = NULL, *tmp; + struct node_rec *rec = NULL; + uint64_t host_no = (uint64_t)MAX_HOST_NO + 1; +- uint64_t flashnode_idx = (uint64_t)MAX_FLASHNODE_IDX + 1; ++ uint64_t index = (uint64_t)MAX_FLASHNODE_IDX + 1; + struct user_param *param; + struct list_head params; + +@@ -2962,9 +2960,9 @@ main(int argc, char **argv) + ISCSI_VERSION_STR); + return 0; + case 'x': +- flashnode_idx = strtoull(optarg, NULL, 10); ++ index = strtoull(optarg, NULL, 10); + if (errno) { +- log_error("Invalid flashnode index %s. %s.", ++ log_error("Invalid index %s. %s.", + optarg, strerror(errno)); + rc = ISCSI_ERR_INVAL; + goto free_ifaces; +@@ -3041,7 +3039,7 @@ main(int argc, char **argv) + break; + } + rc = exec_host_chap_op(op, info_level, host_no, +- value); ++ index); + break; + case MODE_FLASHNODE: + if (host_no > MAX_HOST_NO) { +@@ -3051,8 +3049,8 @@ main(int argc, char **argv) + } + + rc = exec_flashnode_op(op, info_level, host_no, +- flashnode_idx, +- portal_type, ¶ms); ++ index, portal_type, ++ ¶ms); + break; + default: + log_error("Invalid Sub Mode"); +-- +1.8.3.1 + diff --git a/0037-iscsiadm-Man-page-changes-to-use-x-option-for-chap_t.patch b/0037-iscsiadm-Man-page-changes-to-use-x-option-for-chap_t.patch new file mode 100644 index 0000000..ef5efc5 --- /dev/null +++ b/0037-iscsiadm-Man-page-changes-to-use-x-option-for-chap_t.patch @@ -0,0 +1,53 @@ +From 0c4022d865d81a0fb2fc6dcba8df72a6da753cfe Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Tue, 17 Sep 2013 08:07:30 -0400 +Subject: [PATCH] iscsiadm: Man page changes to use -x option for chap_tbl_idx + +Changes in iscsiadm man page to use -x option instead of -v option +for chap_tbl_idx cmdline param. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + doc/iscsiadm.8 | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8 +index 6b15fcd..0e8149c 100644 +--- a/doc/iscsiadm.8 ++++ b/doc/iscsiadm.8 +@@ -16,7 +16,7 @@ iscsiadm \- open-iscsi administration utility + + \fBiscsiadm\fR \-m fw [ \-d debug_level ] [\-l] + +-\fBiscsiadm\fR \-m host [ \-P printlevel ] [ \-H hostno|MAC ] [ [ \-C chap [ \-o operation ] [ \-v chap_tbl_idx ] ] | [ \-C flashnode [ \-o operation ] [ \-A portal_type ] [ \-x flashnode_idx ] [ \-n name ] [ \-v value ] ] ] ++\fBiscsiadm\fR \-m host [ \-P printlevel ] [ \-H hostno|MAC ] [ [ \-C chap [ \-x chap_tbl_idx ] ] | [ \-C flashnode [ \-A portal_type ] [ \-x flashnode_idx ] ] ] [ [ \-o operation ] [ \-n name ] [ \-v value ] ] + + \fBiscsiadm\fR \-k priority + +@@ -74,7 +74,7 @@ iscsiadm -m iface -I ifacename -C ping -a ipaddr -b packetsize -c count -i inter + + For host, it supports chap and flashnode as submodes. For example, + +-iscsiadm -m host -H hostno -C chap -v chap_tbl_idx -o operation ++iscsiadm -m host -H hostno -C chap -x chap_tbl_idx -o operation + + iscsiadm -m host -H hostno -C flashnode -x flashnode_idx -o operation + +@@ -320,10 +320,10 @@ This option is only valid for node mode and flashnode submode of host mode. + display version and exit + + .TP +-\fB\-x\fR, \fB\-\-flashnode_idx=\fIindex\fR +-Specify the \fIindex\fR of the flash node to operate on. ++\fB\-x\fR, \fB\-\-index=\fIindex\fR ++Specify the \fIindex\fR of the entity to operate on. + .IP +-This option is only valid for flashnode submode of host mode. ++This option is only valid for chap and flashnode submodes of host mode. + + .SH DISCOVERY TYPES + iSCSI defines 3 discovery types: SendTargets, SLP, and iSNS. +-- +1.8.3.1 + diff --git a/0038-README-changes-to-use-long-option-index-instead-of-f.patch b/0038-README-changes-to-use-long-option-index-instead-of-f.patch new file mode 100644 index 0000000..fae2288 --- /dev/null +++ b/0038-README-changes-to-use-long-option-index-instead-of-f.patch @@ -0,0 +1,47 @@ +From 38b2993786c26a2c7bb79a42fc8c644720b4507c Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Tue, 17 Sep 2013 08:07:31 -0400 +Subject: [PATCH] README changes to use long option --index instead of + --flashnode_idx + +This change supports use of -x option instead of -v option for +chap_tbl_idx cmdline param. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + README | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/README b/README +index 29b00a9..dda16c9 100644 +--- a/README ++++ b/README +@@ -393,7 +393,7 @@ Usage: iscsiadm [OPTION] + See below for examples. + -m iface --interface=iscsi_ifacename -C ping --ip=[ipaddr] --packetsize=[size] + --count=[count] --interval=[interval] +- -m host --host=hostno|MAC --print=level -C chap --op=[op] --value=[chap_tbl_idx] ++ -m host --host=hostno|MAC --print=level -C chap --op=[op] --index=[chap_tbl_idx] + Display information for a specific host. The host + can be passed in by host number or by MAC address. + If a host is not passed in then info +@@ -414,13 +414,13 @@ Usage: iscsiadm [OPTION] + Create new flash node entry for the given host of the + specified portal_type. This returns the index of the + newly created entry on success. +- -m host --host=hostno|MAC -C flashnode --flashnode_idx=[flashnode index] \ ++ -m host --host=hostno|MAC -C flashnode --index=[flashnode index] \ + --op=[UPDATE] --name=[name] --value=[value] + Update the params of the speficied flash node. + The [name] and [value] pairs must be provided for the + params that need to be updated. Multiple params can + be updated using a single command. +- -m host --host=hostno|MAC -C flashnode--flashnode_idx=[flashnode index] \ ++ -m host --host=hostno|MAC -C flashnode --index=[flashnode index] \ + --op=[SHOW | DELETE | LOGIN | LOGOUT] + op=DELETE|LOGIN|LOGOUT will perform deletion/login/ + logout operation on the specified flash node. +-- +1.8.3.1 + diff --git a/0039-iscsiadm-Add-support-to-set-CHAP-entry-using-host-ch.patch b/0039-iscsiadm-Add-support-to-set-CHAP-entry-using-host-ch.patch new file mode 100644 index 0000000..271cef3 --- /dev/null +++ b/0039-iscsiadm-Add-support-to-set-CHAP-entry-using-host-ch.patch @@ -0,0 +1,590 @@ +From 062718a9579a10ea7c87e46162f80e3f57e80b67 Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Tue, 17 Sep 2013 08:07:32 -0400 +Subject: [PATCH] iscsiadm: Add support to set CHAP entry using host chap mode + +Provide support to add and update CHAP entry using chap submode of +iscsiadm host mode. +Both, new and update, iscsiadm operations perform the same function. +Currently only one entry can be added or updated at a time. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + include/iscsi_if.h | 19 ++++- + usr/host.c | 110 ++++++++++++++++++++++++++++ + usr/host.h | 1 + + usr/idbm.c | 8 ++- + usr/idbm.h | 1 + + usr/iscsi_ipc.h | 3 + + usr/iscsiadm.c | 207 ++++++++++++++++++++++++++++++++++++++++++++++++++--- + usr/netlink.c | 25 +++++++ + 8 files changed, 360 insertions(+), 14 deletions(-) + +diff --git a/include/iscsi_if.h b/include/iscsi_if.h +index 01d38e7..0284662 100644 +--- a/include/iscsi_if.h ++++ b/include/iscsi_if.h +@@ -74,8 +74,9 @@ enum iscsi_uevent_e { + ISCSI_UEVENT_LOGIN_FLASHNODE = UEVENT_BASE + 28, + ISCSI_UEVENT_LOGOUT_FLASHNODE = UEVENT_BASE + 29, + ISCSI_UEVENT_LOGOUT_FLASHNODE_SID = UEVENT_BASE + 30, ++ ISCSI_UEVENT_SET_CHAP = UEVENT_BASE + 31, + +- ISCSI_UEVENT_MAX = ISCSI_UEVENT_LOGOUT_FLASHNODE_SID, ++ ISCSI_UEVENT_MAX = ISCSI_UEVENT_SET_CHAP, + + /* up events */ + ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1, +@@ -318,8 +319,16 @@ enum iscsi_param_type { + ISCSI_HOST_PARAM, /* iscsi_host_param */ + ISCSI_NET_PARAM, /* iscsi_net_param */ + ISCSI_FLASHNODE_PARAM, /* iscsi_flashnode_param */ ++ ISCSI_CHAP_PARAM, /* iscsi_chap_param */ + }; + ++/* structure for minimalist usecase */ ++struct iscsi_param_info { ++ uint32_t len; /* Actual length of the param value */ ++ uint16_t param; /* iscsi param */ ++ uint8_t value[0]; /* length sized value follows */ ++} __attribute__((__packed__)); ++ + struct iscsi_iface_param_info { + uint32_t iface_num; /* iface number, 0 - n */ + uint32_t len; /* Actual length of the param */ +@@ -748,6 +757,14 @@ enum chap_type_e { + CHAP_TYPE_IN, + }; + ++enum iscsi_chap_param { ++ ISCSI_CHAP_PARAM_INDEX, ++ ISCSI_CHAP_PARAM_CHAP_TYPE, ++ ISCSI_CHAP_PARAM_USERNAME, ++ ISCSI_CHAP_PARAM_PASSWORD, ++ ISCSI_CHAP_PARAM_PASSWORD_LEN ++}; ++ + #define ISCSI_CHAP_AUTH_NAME_MAX_LEN 256 + #define ISCSI_CHAP_AUTH_SECRET_MAX_LEN 256 + struct iscsi_chap_rec { +diff --git a/usr/host.c b/usr/host.c +index 1fcb350..f2052d3 100644 +--- a/usr/host.c ++++ b/usr/host.c +@@ -34,6 +34,7 @@ + #include "initiator.h" + #include "iface.h" + #include "iscsi_err.h" ++#include "iscsi_netlink.h" + + static int match_host_to_session(void *data, struct session_info *info) + { +@@ -314,3 +315,112 @@ int host_info_print(int info_level, uint32_t host_no) + } + return 0; + } ++ ++static int chap_fill_param_uint(struct iovec *iov, int param, ++ uint32_t param_val, int param_len) ++{ ++ struct iscsi_param_info *param_info; ++ struct nlattr *attr; ++ int len; ++ uint8_t val8 = 0; ++ uint16_t val16 = 0; ++ uint32_t val32 = 0; ++ char *val = NULL; ++ ++ len = sizeof(struct iscsi_param_info) + param_len; ++ iov->iov_base = iscsi_nla_alloc(param, len); ++ if (!iov->iov_base) ++ return 1; ++ ++ attr = iov->iov_base; ++ iov->iov_len = NLA_ALIGN(attr->nla_len); ++ ++ param_info = (struct iscsi_param_info *)ISCSI_NLA_DATA(attr); ++ param_info->param = param; ++ param_info->len = param_len; ++ ++ switch (param_len) { ++ case 1: ++ val8 = (uint8_t)param_val; ++ val = (char *)&val8; ++ break; ++ ++ case 2: ++ val16 = (uint16_t)param_val; ++ val = (char *)&val16; ++ break; ++ ++ case 4: ++ val32 = (uint32_t)param_val; ++ val = (char *)&val32; ++ break; ++ ++ default: ++ goto free; ++ } ++ memcpy(param_info->value, val, param_len); ++ ++ return 0; ++ ++free: ++ free(iov->iov_base); ++ iov->iov_base = NULL; ++ iov->iov_len = 0; ++ return 1; ++} ++ ++static int chap_fill_param_str(struct iovec *iov, int param, char *param_val, ++ int param_len) ++{ ++ struct iscsi_param_info *param_info; ++ struct nlattr *attr; ++ int len; ++ ++ len = sizeof(struct iscsi_param_info) + param_len; ++ iov->iov_base = iscsi_nla_alloc(param, len); ++ if (!iov->iov_base) ++ return 1; ++ ++ attr = iov->iov_base; ++ iov->iov_len = NLA_ALIGN(attr->nla_len); ++ ++ param_info = (struct iscsi_param_info *)ISCSI_NLA_DATA(attr); ++ param_info->param = param; ++ param_info->len = param_len; ++ memcpy(param_info->value, param_val, param_len); ++ return 0; ++} ++ ++int chap_build_config(struct iscsi_chap_rec *crec, struct iovec *iovs) ++{ ++ struct iovec *iov = NULL; ++ int count = 0; ++ ++ /* start at 2, because 0 is for nlmsghdr and 1 for event */ ++ iov = iovs + 2; ++ ++ if (!chap_fill_param_uint(&iov[count], ISCSI_CHAP_PARAM_INDEX, ++ crec->chap_tbl_idx, ++ sizeof(crec->chap_tbl_idx))) ++ count++; ++ ++ if (!chap_fill_param_uint(&iov[count], ISCSI_CHAP_PARAM_CHAP_TYPE, ++ crec->chap_type, sizeof(crec->chap_type))) ++ count++; ++ ++ if (!chap_fill_param_str(&iov[count], ISCSI_CHAP_PARAM_USERNAME, ++ crec->username, strlen(crec->username))) ++ count++; ++ ++ if (!chap_fill_param_str(&iov[count], ISCSI_CHAP_PARAM_PASSWORD, ++ (char *)crec->password, ++ strlen((char *)crec->password))) ++ count++; ++ ++ if (!chap_fill_param_uint(&iov[count], ISCSI_CHAP_PARAM_PASSWORD_LEN, ++ crec->password_length, ++ sizeof(crec->password_length))) ++ count++; ++ ++ return count; ++} +diff --git a/usr/host.h b/usr/host.h +index 52e5b9e..149aa0d 100644 +--- a/usr/host.h ++++ b/usr/host.h +@@ -17,5 +17,6 @@ struct host_info { + }; + + extern int host_info_print(int info_level, uint32_t host_no); ++extern int chap_build_config(struct iscsi_chap_rec *crec, struct iovec *iovs); + + #endif +diff --git a/usr/idbm.c b/usr/idbm.c +index 1e4f8c8..6b6f57c 100644 +--- a/usr/idbm.c ++++ b/usr/idbm.c +@@ -456,7 +456,7 @@ void idbm_recinfo_iface(iface_rec_t *r, recinfo_t *ri) + __recinfo_uint16(IFACE_PORT, ri, r, port, IDBM_SHOW, num, 1); + } + +-static void idbm_recinfo_host_chap(struct iscsi_chap_rec *r, recinfo_t *ri) ++void idbm_recinfo_host_chap(struct iscsi_chap_rec *r, recinfo_t *ri) + { + int num = 0; + +@@ -465,14 +465,14 @@ static void idbm_recinfo_host_chap(struct iscsi_chap_rec *r, recinfo_t *ri) + + if (r->chap_type == CHAP_TYPE_OUT) { + __recinfo_str(HOST_AUTH_USERNAME, ri, r, username, IDBM_SHOW, +- num, 0); ++ num, 1); + __recinfo_str(HOST_AUTH_PASSWORD, ri, r, password, IDBM_MASKED, + num, 1); + __recinfo_int(HOST_AUTH_PASSWORD_LEN, ri, r, password_length, + IDBM_HIDE, num, 1); + } else { + __recinfo_str(HOST_AUTH_USERNAME_IN, ri, r, username, IDBM_SHOW, +- num, 0); ++ num, 1); + __recinfo_str(HOST_AUTH_PASSWORD_IN, ri, r, password, + IDBM_MASKED, num, 1); + __recinfo_int(HOST_AUTH_PASSWORD_IN_LEN, ri, r, password_length, +@@ -852,6 +852,8 @@ updated: + check_password_param(discovery.sendtargets.auth.password_in); + check_password_param(discovery.slp.auth.password); + check_password_param(discovery.slp.auth.password_in); ++ check_password_param(host.auth.password); ++ check_password_param(host.auth.password_in); + + return 0; + } +diff --git a/usr/idbm.h b/usr/idbm.h +index 5e4038d..b9020fe 100644 +--- a/usr/idbm.h ++++ b/usr/idbm.h +@@ -185,6 +185,7 @@ extern struct node_rec * + idbm_create_rec_from_boot_context(struct boot_context *context); + + extern int idbm_print_host_chap_info(struct iscsi_chap_rec *chap); ++extern void idbm_recinfo_host_chap(struct iscsi_chap_rec *r, recinfo_t *ri); + + extern int idbm_print_flashnode_info(struct flashnode_rec *target); + extern void idbm_recinfo_flashnode(struct flashnode_rec *r, recinfo_t *ri); +diff --git a/usr/iscsi_ipc.h b/usr/iscsi_ipc.h +index b6665cb..a32da1c 100644 +--- a/usr/iscsi_ipc.h ++++ b/usr/iscsi_ipc.h +@@ -143,6 +143,9 @@ struct iscsi_ipc { + uint16_t chap_tbl_idx, uint32_t num_entries, + char *chap_buf, uint32_t *valid_chap_entries); + ++ int (*set_chap) (uint64_t transport_handle, uint32_t host_no, ++ struct iovec *iovs, uint32_t param_count); ++ + int (*delete_chap) (uint64_t transport_handle, uint32_t host_no, + uint16_t chap_tbl_idx); + int (*set_flash_node_params) (uint64_t transport_handle, +diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c +index beabdf0..045259b 100644 +--- a/usr/iscsiadm.c ++++ b/usr/iscsiadm.c +@@ -115,7 +115,7 @@ static struct option const long_options[] = + {"packetsize", required_argument, NULL, 'b'}, + {"count", required_argument, NULL, 'c'}, + {"interval", required_argument, NULL, 'i'}, +- {"index", optional_argument, NULL, 'x'}, ++ {"index", required_argument, NULL, 'x'}, + {"portal_type", optional_argument, NULL, 'A'}, + {NULL, 0, NULL, 0}, + }; +@@ -1426,11 +1426,193 @@ exit_chap_info: + return rc; + } + ++static int fill_host_chap_rec(struct list_head *params, ++ struct iscsi_chap_rec *crec, recinfo_t *cinfo, ++ uint16_t chap_tbl_idx, int type, int *param_count) ++{ ++ struct user_param *param; ++ int rc = 0; ++ ++ crec->chap_tbl_idx = chap_tbl_idx; ++ crec->chap_type = type; ++ ++ idbm_recinfo_host_chap(crec, cinfo); ++ ++ list_for_each_entry(param, params, list) { ++ rc = idbm_rec_update_param(cinfo, param->name, param->value, 0); ++ if (rc) ++ break; ++ } ++ ++ if (!rc) ++ *param_count += 3; /* index, type and password_length */ ++ ++ return rc; ++} ++ ++static int verify_host_chap_params(struct list_head *params, int *type, ++ int *param_count) ++{ ++ struct user_param *param; ++ int username = -1; ++ int password = -1; ++ int rc = 0; ++ ++ list_for_each_entry(param, params, list) { ++ *param_count += 1; ++ ++ if (!strcmp(param->name, HOST_AUTH_USERNAME)) ++ username = CHAP_TYPE_OUT; ++ else if (!strcmp(param->name, HOST_AUTH_PASSWORD)) ++ password = CHAP_TYPE_OUT; ++ else if (!strcmp(param->name, HOST_AUTH_USERNAME_IN)) ++ username = CHAP_TYPE_IN; ++ else if (!strcmp(param->name, HOST_AUTH_PASSWORD_IN)) ++ password = CHAP_TYPE_IN; ++ else ++ continue; ++ } ++ ++ if ((username == CHAP_TYPE_OUT) && (password == CHAP_TYPE_OUT)) { ++ if (type) ++ *type = CHAP_TYPE_OUT; ++ ++ rc = ISCSI_SUCCESS; ++ } else if ((username == CHAP_TYPE_IN) && (password == CHAP_TYPE_IN)) { ++ if (type) ++ *type = CHAP_TYPE_IN; ++ ++ rc = ISCSI_SUCCESS; ++ } else { ++ rc = ISCSI_ERR; ++ } ++ ++ return rc; ++} ++ ++static int set_host_chap_info(uint32_t host_no, uint64_t chap_index, ++ struct list_head *params) ++{ ++ struct iscsi_transport *t = NULL; ++ struct iscsi_chap_rec crec; ++ recinfo_t *chap_info = NULL; ++ struct iovec *iovs = NULL; ++ struct iovec *iov = NULL; ++ int type; ++ int param_count; ++ int param_used; ++ int rc = 0; ++ int fd, i = 0; ++ ++ if (list_empty(params)) { ++ log_error("Chap username/password not provided."); ++ goto exit_set_chap; ++ } ++ ++ chap_info = idbm_recinfo_alloc(MAX_KEYS); ++ if (!chap_info) { ++ log_error("Out of Memory."); ++ rc = ISCSI_ERR_NOMEM; ++ goto exit_set_chap; ++ } ++ ++ t = iscsi_sysfs_get_transport_by_hba(host_no); ++ if (!t) { ++ log_error("Could not match hostno %d to transport.", host_no); ++ rc = ISCSI_ERR_TRANS_NOT_FOUND; ++ goto free_info_rec; ++ } ++ ++ rc = verify_host_chap_params(params, &type, ¶m_count); ++ if (rc) { ++ log_error("Invalid username/password pair passed. Unable to determine the type of chap entry"); ++ rc = ISCSI_ERR_INVAL; ++ goto free_info_rec; ++ } ++ ++ if (param_count > 2) { ++ log_error("Only one pair of username/password can be passed."); ++ rc = ISCSI_ERR; ++ goto free_info_rec; ++ } ++ ++ memset(&crec, 0, sizeof(crec)); ++ rc = fill_host_chap_rec(params, &crec, chap_info, chap_index, type, ++ ¶m_count); ++ if (rc) { ++ log_error("Unable to fill CHAP record"); ++ goto free_info_rec; ++ } ++ ++ /* +2 for event and nlmsghdr */ ++ param_count += 2; ++ iovs = calloc((param_count * sizeof(struct iovec)), ++ sizeof(char)); ++ if (!iovs) { ++ log_error("Out of Memory."); ++ rc = ISCSI_ERR_NOMEM; ++ goto free_info_rec; ++ } ++ ++ /* param_used gives actual number of iovecs used for chap */ ++ param_used = chap_build_config(&crec, iovs); ++ if (!param_used) { ++ log_error("Build chap config failed."); ++ rc = ISCSI_ERR; ++ goto free_iovec; ++ } ++ ++ fd = ipc->ctldev_open(); ++ if (fd < 0) { ++ rc = ISCSI_ERR_INTERNAL; ++ log_error("Netlink open failed."); ++ goto free_iovec; ++ } ++ ++ rc = ipc->set_chap(t->handle, host_no, iovs, param_count); ++ if (rc < 0) { ++ log_error("CHAP setting failed"); ++ if (rc == -EBUSY) { ++ rc = ISCSI_ERR_BUSY; ++ log_error("CHAP index %d is in use.", ++ crec.chap_tbl_idx); ++ } else { ++ rc = ISCSI_ERR; ++ } ++ ++ goto exit_set_chap; ++ } ++ ++ ipc->ctldev_close(); ++ ++free_iovec: ++ /* start at 2, because 0 is for nlmsghdr and 1 for event */ ++ iov = iovs + 2; ++ for (i = 0; i < param_used; i++, iov++) { ++ if (iov->iov_base) ++ free(iov->iov_base); ++ } ++ ++ free(iovs); ++ ++free_info_rec: ++ if (chap_info) ++ free(chap_info); ++ ++exit_set_chap: ++ return rc; ++} ++ + static int delete_host_chap_info(uint32_t host_no, uint16_t chap_tbl_idx) + { + struct iscsi_transport *t = NULL; + int fd, rc = 0; + ++ if (chap_tbl_idx > MAX_CHAP_ENTRIES) { ++ log_error("Invalid chap table index."); ++ goto exit_delete_chap; ++ } ++ + t = iscsi_sysfs_get_transport_by_hba(host_no); + if (!t) { + log_error("Could not match hostno %d to " +@@ -1464,19 +1646,18 @@ exit_delete_chap: + } + + static int exec_host_chap_op(int op, int info_level, uint32_t host_no, +- uint64_t chap_index) ++ uint64_t chap_index, struct list_head *params) + { + int rc = ISCSI_ERR_INVAL; + +- if (op != OP_SHOW && (chap_index > (uint64_t)MAX_CHAP_ENTRIES)) { +- log_error("Invalid chap table index."); +- goto exit_chap_op; +- } +- + switch (op) { + case OP_SHOW: + rc = get_host_chap_info(host_no); + break; ++ case OP_NEW: ++ case OP_UPDATE: ++ rc = set_host_chap_info(host_no, chap_index, params); ++ break; + case OP_DELETE: + rc = delete_host_chap_info(host_no, chap_index); + break; +@@ -1485,7 +1666,6 @@ static int exec_host_chap_op(int op, int info_level, uint32_t host_no, + break; + } + +-exit_chap_op: + return rc; + } + +@@ -2816,7 +2996,7 @@ main(int argc, char **argv) + struct iface_rec *iface = NULL, *tmp; + struct node_rec *rec = NULL; + uint64_t host_no = (uint64_t)MAX_HOST_NO + 1; +- uint64_t index = (uint64_t)MAX_FLASHNODE_IDX + 1; ++ uint64_t index = ULLONG_MAX; + struct user_param *param; + struct list_head params; + +@@ -3038,8 +3218,12 @@ main(int argc, char **argv) + rc = ISCSI_ERR_INVAL; + break; + } ++ ++ if (index == ULLONG_MAX) ++ index = (uint64_t)MAX_CHAP_ENTRIES + 1; ++ + rc = exec_host_chap_op(op, info_level, host_no, +- index); ++ index, ¶ms); + break; + case MODE_FLASHNODE: + if (host_no > MAX_HOST_NO) { +@@ -3048,6 +3232,9 @@ main(int argc, char **argv) + break; + } + ++ if (index == ULLONG_MAX) ++ index = (uint64_t)MAX_FLASHNODE_IDX + 1; ++ + rc = exec_flashnode_op(op, info_level, host_no, + index, portal_type, + ¶ms); +diff --git a/usr/netlink.c b/usr/netlink.c +index c07fe3c..151b56d 100644 +--- a/usr/netlink.c ++++ b/usr/netlink.c +@@ -1228,6 +1228,30 @@ static int kget_chap(uint64_t transport_handle, uint32_t host_no, + return rc; + } + ++static int kset_chap(uint64_t transport_handle, uint32_t host_no, ++ struct iovec *iovs, uint32_t param_count) ++{ ++ int rc, ev_len; ++ struct iscsi_uevent ev; ++ struct iovec *iov = iovs + 1; ++ ++ log_debug(8, "in %s", __func__); ++ ++ ev_len = sizeof(ev); ++ ev.type = ISCSI_UEVENT_SET_CHAP; ++ ev.transport_handle = transport_handle; ++ ev.u.set_path.host_no = host_no; ++ ++ iov->iov_base = &ev; ++ iov->iov_len = sizeof(ev); ++ ++ rc = __kipc_call(iovs, param_count); ++ if (rc < 0) ++ return rc; ++ ++ return 0; ++} ++ + static int kdelete_chap(uint64_t transport_handle, uint32_t host_no, + uint16_t chap_tbl_idx) + { +@@ -1705,6 +1729,7 @@ struct iscsi_ipc nl_ipc = { + .recv_conn_state = krecv_conn_state, + .exec_ping = kexec_ping, + .get_chap = kget_chap, ++ .set_chap = kset_chap, + .delete_chap = kdelete_chap, + .set_flash_node_params = kset_flashnode_params, + .new_flash_node = knew_flashnode, +-- +1.8.3.1 + diff --git a/0040-ISCSISTART-Saved-ibft-boot-info-to-the-session-sysfs.patch b/0040-ISCSISTART-Saved-ibft-boot-info-to-the-session-sysfs.patch deleted file mode 100644 index f3f3a12..0000000 --- a/0040-ISCSISTART-Saved-ibft-boot-info-to-the-session-sysfs.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 68ef07c23f7c0d1ea6b502c28be1152e77ff1bde Mon Sep 17 00:00:00 2001 -From: Eddie Wai -Date: Fri, 12 Apr 2013 10:41:15 -0700 -Subject: ISCSISTART: Saved ibft boot info to the session sysfs - -Three new session sysfs parameters are introduced: -boot_root - holds the ibft boot root folder name -boot_nic - holds the ibft boot ethernetN name -boot_target - holds the ibft boot targetN name - -This patch copies over the /sys/firmware//ethernetN/targetN info -from the boot context to the node_rec. - -Signed-off-by: Eddie Wai ---- - include/fw_context.h | 3 +++ - include/iscsi_if.h | 4 ++++ - include/iscsi_proto.h | 1 + - usr/config.h | 3 +++ - usr/idbm.c | 6 ++++++ - usr/initiator_common.c | 14 +++++++++++++- - utils/fwparam_ibft/fwparam_sysfs.c | 8 ++++++++ - 7 files changed, 38 insertions(+), 1 deletion(-) - -diff --git a/include/fw_context.h b/include/fw_context.h -index 1640859..6563d68 100644 ---- a/include/fw_context.h -+++ b/include/fw_context.h -@@ -30,6 +30,9 @@ - - struct boot_context { - struct list_head list; -+ char boot_root[BOOT_NAME_MAXLEN]; -+ char boot_nic[BOOT_NAME_MAXLEN]; -+ char boot_target[BOOT_NAME_MAXLEN]; - - /* target settings */ - int target_port; -diff --git a/include/iscsi_if.h b/include/iscsi_if.h -index 20f2bc2..b47dde7 100644 ---- a/include/iscsi_if.h -+++ b/include/iscsi_if.h -@@ -495,6 +495,10 @@ enum iscsi_param { - - ISCSI_PARAM_TGT_RESET_TMO, - ISCSI_PARAM_TARGET_ALIAS, -+ -+ ISCSI_PARAM_BOOT_ROOT, -+ ISCSI_PARAM_BOOT_NIC, -+ ISCSI_PARAM_BOOT_TARGET, - /* must always be last */ - ISCSI_PARAM_MAX, - }; -diff --git a/include/iscsi_proto.h b/include/iscsi_proto.h -index 1c69feb..56f757b 100644 ---- a/include/iscsi_proto.h -+++ b/include/iscsi_proto.h -@@ -619,6 +619,7 @@ struct iscsi_reject { - #define KEY_MAXLEN 64 - #define VALUE_MAXLEN 255 - #define TARGET_NAME_MAXLEN VALUE_MAXLEN -+#define BOOT_NAME_MAXLEN 256 - - #define ISCSI_DEF_MAX_RECV_SEG_LEN 8192 - #define ISCSI_MIN_MAX_RECV_SEG_LEN 512 -diff --git a/usr/config.h b/usr/config.h -index 998caff..d457bdd 100644 ---- a/usr/config.h -+++ b/usr/config.h -@@ -201,6 +201,9 @@ typedef struct session_rec { - * allowed to be initiated on this record - */ - unsigned char multiple; -+ char boot_root[BOOT_NAME_MAXLEN]; -+ char boot_nic[BOOT_NAME_MAXLEN]; -+ char boot_target[BOOT_NAME_MAXLEN]; - } session_rec_t; - - #define ISCSI_TRANSPORT_NAME_MAXLEN 16 -diff --git a/usr/idbm.c b/usr/idbm.c -index bc06058..1e4f8c8 100644 ---- a/usr/idbm.c -+++ b/usr/idbm.c -@@ -2748,6 +2748,12 @@ struct node_rec *idbm_create_rec_from_boot_context(struct boot_context *context) - strlen((char *)context->chap_password); - rec->session.auth.password_in_length = - strlen((char *)context->chap_password_in); -+ strlcpy(rec->session.boot_root, context->boot_root, -+ sizeof(context->boot_root)); -+ strlcpy(rec->session.boot_nic, context->boot_nic, -+ sizeof(context->boot_nic)); -+ strlcpy(rec->session.boot_target, context->boot_target, -+ sizeof(context->boot_target)); - - iface_setup_from_boot_context(&rec->iface, context); - -diff --git a/usr/initiator_common.c b/usr/initiator_common.c -index eb72795..544d637 100644 ---- a/usr/initiator_common.c -+++ b/usr/initiator_common.c -@@ -324,7 +324,7 @@ int iscsi_host_set_params(struct iscsi_session *session) - return 0; - } - --#define MAX_SESSION_PARAMS 32 -+#define MAX_SESSION_PARAMS 35 - - int iscsi_session_set_params(struct iscsi_conn *conn) - { -@@ -496,6 +496,18 @@ int iscsi_session_set_params(struct iscsi_conn *conn) - .param = ISCSI_PARAM_INITIATOR_NAME, - .value = session->initiator_name, - .type = ISCSI_STRING, -+ }, { -+ .param = ISCSI_PARAM_BOOT_ROOT, -+ .value = session->nrec.session.boot_root, -+ .type = ISCSI_STRING, -+ }, { -+ .param = ISCSI_PARAM_BOOT_NIC, -+ .value = session->nrec.session.boot_nic, -+ .type = ISCSI_STRING, -+ }, { -+ .param = ISCSI_PARAM_BOOT_TARGET, -+ .value = session->nrec.session.boot_target, -+ .type = ISCSI_STRING, - }, - }; - -diff --git a/utils/fwparam_ibft/fwparam_sysfs.c b/utils/fwparam_ibft/fwparam_sysfs.c -index 3997363..2f37b59 100644 ---- a/utils/fwparam_ibft/fwparam_sysfs.c -+++ b/utils/fwparam_ibft/fwparam_sysfs.c -@@ -200,6 +200,9 @@ static int fill_nic_context(char *subsys, char *id, - strlcpy(context->scsi_host_name, subsys, - sizeof(context->scsi_host_name)); - -+ memset(&context->boot_nic, 0, sizeof(context->boot_nic)); -+ snprintf(context->boot_nic, sizeof(context->boot_nic), "%s", id); -+ - sysfs_get_str(id, subsys, "ip-addr", context->ipaddr, - sizeof(context->ipaddr)); - sysfs_get_str(id, subsys, "vlan", context->vlan, -@@ -224,6 +227,8 @@ static void fill_initiator_context(char *subsys, struct boot_context *context) - sizeof(context->initiatorname)); - sysfs_get_str("initiator", subsys, "isid", context->isid, - sizeof(context->isid)); -+ -+ strlcpy(context->boot_root, subsys, sizeof(context->boot_root)); - } - static int fill_tgt_context(char *subsys, char *id, - struct boot_context *context) -@@ -240,6 +245,9 @@ static int fill_tgt_context(char *subsys, char *id, - if (rc) - return rc; - -+ memset(&context->boot_target, 0, sizeof(context->boot_target)); -+ snprintf(context->boot_target, sizeof(context->boot_target), "%s", id); -+ - /* - * We can live without the rest of they do not exist. If we - * failed to get them we will figure it out when we login. --- -1.8.1.4 - diff --git a/0040-iscsi-tools-Correctly-get-username_in-and-password_i.patch b/0040-iscsi-tools-Correctly-get-username_in-and-password_i.patch new file mode 100644 index 0000000..e15c4b1 --- /dev/null +++ b/0040-iscsi-tools-Correctly-get-username_in-and-password_i.patch @@ -0,0 +1,37 @@ +From 65ce3a27da47cecf71015b16b1d186c49cbb7bcc Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Tue, 17 Sep 2013 08:07:33 -0400 +Subject: [PATCH] iscsi tools: Correctly get username_in and password_in + flashnode params + +Fix to correctly read username_in and password_in sysfs params for +flashnode session. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + usr/iscsi_sysfs.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c +index 56cb90c..04c3673 100644 +--- a/usr/iscsi_sysfs.c ++++ b/usr/iscsi_sysfs.c +@@ -601,12 +601,12 @@ int iscsi_sysfs_get_flashnode_info(struct flashnode_rec *fnode, + sysfs_get_str(sess_id, ISCSI_FLASHNODE_SUBSYS, "username", + (fnode->sess).username, sizeof((fnode->sess).username)); + sysfs_get_str(sess_id, ISCSI_FLASHNODE_SUBSYS, "username_in", +- (fnode->sess).username, ++ (fnode->sess).username_in, + sizeof((fnode->sess).username_in)); + sysfs_get_str(sess_id, ISCSI_FLASHNODE_SUBSYS, "password", + (fnode->sess).password, sizeof((fnode->sess).password)); + sysfs_get_str(sess_id, ISCSI_FLASHNODE_SUBSYS, "password_in", +- (fnode->sess).password, ++ (fnode->sess).password_in, + sizeof((fnode->sess).password_in)); + sysfs_get_uint(conn_id, ISCSI_FLASHNODE_SUBSYS, "statsn", + &((fnode->conn[0]).stat_sn)); +-- +1.8.3.1 + diff --git a/0041-ISCSID-Added-the-extraction-of-the-session-boot-info.patch b/0041-ISCSID-Added-the-extraction-of-the-session-boot-info.patch deleted file mode 100644 index 67901d6..0000000 --- a/0041-ISCSID-Added-the-extraction-of-the-session-boot-info.patch +++ /dev/null @@ -1,112 +0,0 @@ -From d86ca42685620ad3263da098923308a3a00ac55a Mon Sep 17 00:00:00 2001 -From: Eddie Wai -Date: Fri, 12 Apr 2013 10:41:16 -0700 -Subject: ISCSID: Added the extraction of the session boot info - -This patch does the work to extract the corresponding -->ethernetN net params as specified from the kernel -session boot_nic sysfs entry based on the transport param -use_boot_info. - -This is only populated for iscsi_tcp and bnx2i. - -Signed-off-by: Eddie Wai ---- - usr/iscsi_sysfs.c | 40 ++++++++++++++++++++++++++++++++++++++++ - usr/transport.c | 2 ++ - usr/transport.h | 1 + - 3 files changed, 43 insertions(+) - -diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c -index aed10a3..79ec79d 100644 ---- a/usr/iscsi_sysfs.c -+++ b/usr/iscsi_sysfs.c -@@ -674,6 +674,43 @@ free_fnode: - return rc; - } - -+static int iscsi_sysfs_read_boot(struct iface_rec *iface, char *session) -+{ -+ char boot_root[BOOT_NAME_MAXLEN], boot_nic[BOOT_NAME_MAXLEN]; -+ char boot_name[BOOT_NAME_MAXLEN], boot_content[BOOT_NAME_MAXLEN]; -+ -+ /* Extract boot info */ -+ strlcpy(boot_name, "boot_target", sizeof(boot_name)); -+ if (sysfs_get_str(session, ISCSI_SESSION_SUBSYS, boot_name, -+ boot_content, BOOT_NAME_MAXLEN)) -+ return -1; -+ strlcpy(boot_name, "boot_nic", sizeof(boot_name)); -+ if (sysfs_get_str(session, ISCSI_SESSION_SUBSYS, boot_name, boot_nic, -+ BOOT_NAME_MAXLEN)) -+ return -1; -+ strlcpy(boot_name, "boot_root", sizeof(boot_name)); -+ if (sysfs_get_str(session, ISCSI_SESSION_SUBSYS, boot_name, boot_root, -+ BOOT_NAME_MAXLEN)) -+ return -1; -+ -+ /* If all boot_root/boot_target/boot_nic exist, then extract the -+ info from the boot nic */ -+ if (sysfs_get_str(boot_nic, boot_root, "vlan", boot_content, -+ BOOT_NAME_MAXLEN)) -+ log_debug(5, "could not read %s/%s/vlan", boot_root, boot_nic); -+ else -+ iface->vlan_id = atoi(boot_content); -+ -+ if (sysfs_get_str(boot_nic, boot_root, "subnet-mask", -+ iface->subnet_mask, NI_MAXHOST)) -+ log_debug(5, "could not read %s/%s/subnet", boot_root, -+ boot_nic); -+ -+ log_debug(5, "sysfs read boot returns %s/%s/ vlan = %d subnet = %s", -+ boot_root, boot_nic, iface->vlan_id, iface->subnet_mask); -+ return 0; -+} -+ - /* - * Read in iface settings based on host and session values. If - * session is not passed in, then the ifacename will not be set. And -@@ -802,6 +839,9 @@ static int iscsi_sysfs_read_iface(struct iface_rec *iface, int host_no, - } - } - -+ if (t->template->use_boot_info && session) -+ iscsi_sysfs_read_boot(iface, session); -+ - if (!iface_kern_id) - goto done; - -diff --git a/usr/transport.c b/usr/transport.c -index 52b7674..4d030a8 100644 ---- a/usr/transport.c -+++ b/usr/transport.c -@@ -42,6 +42,7 @@ - - struct iscsi_transport_template iscsi_tcp = { - .name = "tcp", -+ .use_boot_info = 1, - .ep_connect = iscsi_io_tcp_connect, - .ep_poll = iscsi_io_tcp_poll, - .ep_disconnect = iscsi_io_tcp_disconnect, -@@ -77,6 +78,7 @@ struct iscsi_transport_template cxgb4i = { - struct iscsi_transport_template bnx2i = { - .name = "bnx2i", - .set_host_ip = 1, -+ .use_boot_info = 1, - .ep_connect = ktransport_ep_connect, - .ep_poll = ktransport_ep_poll, - .ep_disconnect = ktransport_ep_disconnect, -diff --git a/usr/transport.h b/usr/transport.h -index 5dcf872..388e4b1 100644 ---- a/usr/transport.h -+++ b/usr/transport.h -@@ -31,6 +31,7 @@ struct iscsi_transport_template { - * the host's ip address. - */ - uint8_t set_host_ip; -+ uint8_t use_boot_info; - int (*ep_connect) (struct iscsi_conn *conn, int non_blocking); - int (*ep_poll) (struct iscsi_conn *conn, int timeout_ms); - void (*ep_disconnect) (struct iscsi_conn *conn); --- -1.8.1.4 - diff --git a/0041-README-changes-for-adding-support-to-set-CHAP-entry.patch b/0041-README-changes-for-adding-support-to-set-CHAP-entry.patch new file mode 100644 index 0000000..35d9d5d --- /dev/null +++ b/0041-README-changes-for-adding-support-to-set-CHAP-entry.patch @@ -0,0 +1,84 @@ +From f1ed1f7049f42ad12f5e6bf5b02de75290271c56 Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Tue, 17 Sep 2013 08:07:34 -0400 +Subject: [PATCH] README changes for adding support to set CHAP entry + +README changes for the support added to set CHAP entry using chap +submode of iscsiadm host mode. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + README | 42 +++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 41 insertions(+), 1 deletion(-) + +diff --git a/README b/README +index dda16c9..813548d 100644 +--- a/README ++++ b/README +@@ -393,7 +393,7 @@ Usage: iscsiadm [OPTION] + See below for examples. + -m iface --interface=iscsi_ifacename -C ping --ip=[ipaddr] --packetsize=[size] + --count=[count] --interval=[interval] +- -m host --host=hostno|MAC --print=level -C chap --op=[op] --index=[chap_tbl_idx] ++ -m host --host=hostno|MAC --print=level -C chap --op=[SHOW] + Display information for a specific host. The host + can be passed in by host number or by MAC address. + If a host is not passed in then info +@@ -406,6 +406,14 @@ Usage: iscsiadm [OPTION] + is connected to. + 3 = Print iscsi params used. + 4 = Print SCSI info like LUNs, device state. ++ -m host --host=hostno|MAC -C chap --op=[DELETE] --index=[chap_tbl_idx] ++ Delete chap entry at the given index from chap table. ++ -m host --host=hostno|MAC -C chap --op=[NEW | UPDATE] --index=[chap_tbl_idx] \ ++ --name=[name] --value=[value] ++ Add new or update existing chap entry at the given ++ index with given username and password pair. If index ++ is not passed then entry is added at the first free ++ index in chap table. + -m host --host=hostno|MAC -C flashnode + Display list of all the targets in adapter's + flash (flash node), for the specified host, +@@ -1033,6 +1041,38 @@ To now log into targets it is the same as with sofware iscsi. See section + - Delete a flash node entry + ./iscsiadm -m host -H 6 -C flashnode -x 1 -o delete + ++ Host mode with chap submode: ++ ++ - Display list of chap entries for a host ++ ++ ./iscsiadm -m host -H 6 -C chap -o show ++ ++ This will list all the chap entries for the given host. ++ ++ - Delete a chap entry for a host ++ ++ ./iscsiadm -m host -H 6 -C chap -o delete -x 5 ++ ++ This will delete any chap entry present at given index 5. ++ ++ - Add/Update a local chap entry for a host ++ ++ ./iscsiadm -m host -H 6 -C chap -o update -x 4 -n username \ ++ -v value -n password -v value ++ ++ This will update the local chap entry present at index 4. If index 4 ++ is free then entry of type local chap will be created at that index ++ with given username and password values. ++ ++ - Add/Update a bidi chap entry for a host ++ ++ ./iscsiadm -m host -H 6 -C chap -o update -x 5 -n username_in \ ++ -v value -n password_in -v value ++ ++ This will update the bidi chap entry present at index 5. If index 5 ++ is free then entry of type bidi chap will be created at that index ++ with given username_in and password_in values. ++ + 6. Configuration + ================ + +-- +1.8.3.1 + diff --git a/0042-ISCSID-Added-iface-content-override-fix.patch b/0042-ISCSID-Added-iface-content-override-fix.patch deleted file mode 100644 index d41fa70..0000000 --- a/0042-ISCSID-Added-iface-content-override-fix.patch +++ /dev/null @@ -1,57 +0,0 @@ -From ec7d79ed691619b6ffa8c25f162ce62e1e25e6c1 Mon Sep 17 00:00:00 2001 -From: Eddie Wai -Date: Fri, 12 Apr 2013 10:41:17 -0700 -Subject: ISCSID: Added iface content override fix - -Patch provided by Mike Christie. - -This patch fixes the unconditional overwrite of the iface struct -even when the corresponding iface info from the node config was -found and extracted. - -Signed-off-by: Eddie Wai ---- - usr/iscsid.c | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - -diff --git a/usr/iscsid.c b/usr/iscsid.c -index 8f19220..d1756ef 100644 ---- a/usr/iscsid.c -+++ b/usr/iscsid.c -@@ -111,9 +111,7 @@ setup_rec_from_negotiated_values(node_rec_t *rec, struct session_info *info) - strlcpy(rec->name, info->targetname, TARGET_NAME_MAXLEN); - rec->conn[0].port = info->persistent_port; - strlcpy(rec->conn[0].address, info->persistent_address, NI_MAXHOST); -- memcpy(&rec->iface, &info->iface, sizeof(struct iface_rec)); - rec->tpgt = info->tpgt; -- iface_copy(&rec->iface, &info->iface); - - iscsi_sysfs_get_negotiated_session_conf(info->sid, &session_conf); - iscsi_sysfs_get_negotiated_conn_conf(info->sid, &conn_conf); -@@ -238,6 +236,7 @@ static int sync_session(void *data, struct session_info *info) - log_warning("Could not read data from db. Using default and " - "currently negotiated values\n"); - setup_rec_from_negotiated_values(&rec, info); -+ iface_copy(&rec.iface, &info->iface); - } else { - /* - * we have a valid record and iface so lets merge -@@ -251,13 +250,12 @@ static int sync_session(void *data, struct session_info *info) - memset(&sysfsrec, 0, sizeof(node_rec_t)); - setup_rec_from_negotiated_values(&sysfsrec, info); - /* -- * target, portal and iface name values have to be the same -+ * target, portal and iface values have to be the same - * or we would not have found the record, so just copy -- * CHAP and iface settings. -+ * CHAP settings. - */ - memcpy(&rec.session.auth, &sysfsrec.session.auth, - sizeof(struct iscsi_auth_config)); -- memcpy(&rec.iface, &info->iface, sizeof(rec.iface)); - } - - /* multiple drivers could be connected to the same portal */ --- -1.8.1.4 - diff --git a/0042-iscsi-tools-Setup-iface-conf-file-with-all-iface-att.patch b/0042-iscsi-tools-Setup-iface-conf-file-with-all-iface-att.patch new file mode 100644 index 0000000..7e72808 --- /dev/null +++ b/0042-iscsi-tools-Setup-iface-conf-file-with-all-iface-att.patch @@ -0,0 +1,46 @@ +From 0a95bc409c6282b95c48ba39a16e17c3e6e26537 Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Fri, 18 Oct 2013 09:29:17 -0400 +Subject: [PATCH] iscsi tools: Setup iface conf file with all iface attrs + exported in sysfs + +Currently, iface conf file does not get populated with all the iface +attrs that are exported in corresponding sysfs entry. +This patch allows to setup conf file with all iface attrs in sysfs. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + usr/iface.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/usr/iface.c b/usr/iface.c +index c86892e..8580d1a 100644 +--- a/usr/iface.c ++++ b/usr/iface.c +@@ -476,11 +476,8 @@ static int iface_setup_binding_from_kern_iface(void *data, + } + + memset(&iface, 0, sizeof(struct iface_rec)); +- strcpy(iface.hwaddress, hinfo->iface.hwaddress); +- strcpy(iface.transport_name, hinfo->iface.transport_name); +- + if (kern_iface) { +- iface.iface_num = kern_iface->iface_num; ++ memcpy(&iface, kern_iface, sizeof(iface)); + + snprintf(iface.name, sizeof(iface.name), "%s.%s.%s.%u", + kern_iface->transport_name, +@@ -492,6 +489,9 @@ static int iface_setup_binding_from_kern_iface(void *data, + hinfo->iface.transport_name, hinfo->iface.hwaddress); + } + ++ strcpy(iface.hwaddress, hinfo->iface.hwaddress); ++ strcpy(iface.transport_name, hinfo->iface.transport_name); ++ + memset(iface_path, 0, sizeof(iface_path)); + snprintf(iface_path, PATH_MAX, "%s/%s", IFACE_CONFIG_DIR, + iface.name); +-- +1.8.3.1 + diff --git a/0043-idmb_rec_write-check-for-tpgt-first.patch b/0043-idmb_rec_write-check-for-tpgt-first.patch deleted file mode 100644 index cdc958a..0000000 --- a/0043-idmb_rec_write-check-for-tpgt-first.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 24a4d8156786dfd91dcc17b2472653e963ebd028 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Tue, 13 Aug 2013 10:59:44 -0700 -Subject: idmb_rec_write, check for tpgt first - -Factor out the check for a tpgt to a single place, before going crazy on -the rec files. Makes flow of this function easier to follow, and preps -for splitting it up. ---- - usr/idbm.c | 18 +++++------------- - 1 file changed, 5 insertions(+), 13 deletions(-) - -diff --git a/usr/idbm.c b/usr/idbm.c -index 1e4f8c8..0a88699 100644 ---- a/usr/idbm.c -+++ b/usr/idbm.c -@@ -1849,6 +1849,10 @@ static int idbm_rec_write(node_rec_t *rec) - if (rc) - goto free_portal; - -+ if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN) -+ /* drop down to old style portal as config */ -+ goto open_conf; -+ - rc = stat(portal, &statb); - if (rc) { - rc = 0; -@@ -1857,23 +1861,11 @@ static int idbm_rec_write(node_rec_t *rec) - * set the tgpt. In new versions you must pass all the info in - * from the start - */ -- if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN) -- /* drop down to old style portal as config */ -- goto open_conf; -- else -- goto mkdir_portal; -+ goto mkdir_portal; - } - - if (!S_ISDIR(statb.st_mode)) { - /* -- * older iscsiadm versions had you create the config then set -- * set the tgpt. In new versions you must pass all the info in -- * from the start -- */ -- if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN) -- /* drop down to old style portal as config */ -- goto open_conf; -- /* - * Old style portal as a file, but with tpgt. Let's update it. - */ - if (unlink(portal)) { --- -1.8.1.4 - diff --git a/0043-iscsi_if.h-Remove-numbers-used-for-network-parameter.patch b/0043-iscsi_if.h-Remove-numbers-used-for-network-parameter.patch new file mode 100644 index 0000000..40cafea --- /dev/null +++ b/0043-iscsi_if.h-Remove-numbers-used-for-network-parameter.patch @@ -0,0 +1,65 @@ +From 026c8d771c1df457cd26e7066b503cadfbbc98df Mon Sep 17 00:00:00 2001 +From: Harish Zunjarrao +Date: Fri, 18 Oct 2013 09:29:18 -0400 +Subject: [PATCH] iscsi_if.h: Remove numbers used for network parameter + settings + +Signed-off-by: Harish Zunjarrao +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + include/iscsi_if.h | 38 +++++++++++++++++++------------------- + 1 file changed, 19 insertions(+), 19 deletions(-) + +diff --git a/include/iscsi_if.h b/include/iscsi_if.h +index 0284662..e837dd0 100644 +--- a/include/iscsi_if.h ++++ b/include/iscsi_if.h +@@ -395,25 +395,25 @@ struct iscsi_path { + /* iSCSI network params */ + enum iscsi_net_param { + ISCSI_NET_PARAM_IPV4_ADDR = 1, +- ISCSI_NET_PARAM_IPV4_SUBNET = 2, +- ISCSI_NET_PARAM_IPV4_GW = 3, +- ISCSI_NET_PARAM_IPV4_BOOTPROTO = 4, +- ISCSI_NET_PARAM_MAC = 5, +- ISCSI_NET_PARAM_IPV6_LINKLOCAL = 6, +- ISCSI_NET_PARAM_IPV6_ADDR = 7, +- ISCSI_NET_PARAM_IPV6_ROUTER = 8, +- ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG = 9, +- ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG = 10, +- ISCSI_NET_PARAM_IPV6_ROUTER_AUTOCFG = 11, +- ISCSI_NET_PARAM_IFACE_ENABLE = 12, +- ISCSI_NET_PARAM_VLAN_ID = 13, +- ISCSI_NET_PARAM_VLAN_PRIORITY = 14, +- ISCSI_NET_PARAM_VLAN_ENABLED = 15, +- ISCSI_NET_PARAM_VLAN_TAG = 16, +- ISCSI_NET_PARAM_IFACE_TYPE = 17, +- ISCSI_NET_PARAM_IFACE_NAME = 18, +- ISCSI_NET_PARAM_MTU = 19, +- ISCSI_NET_PARAM_PORT = 20, ++ ISCSI_NET_PARAM_IPV4_SUBNET, ++ ISCSI_NET_PARAM_IPV4_GW, ++ ISCSI_NET_PARAM_IPV4_BOOTPROTO, ++ ISCSI_NET_PARAM_MAC, ++ ISCSI_NET_PARAM_IPV6_LINKLOCAL, ++ ISCSI_NET_PARAM_IPV6_ADDR, ++ ISCSI_NET_PARAM_IPV6_ROUTER, ++ ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG, ++ ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG, ++ ISCSI_NET_PARAM_IPV6_ROUTER_AUTOCFG, ++ ISCSI_NET_PARAM_IFACE_ENABLE, ++ ISCSI_NET_PARAM_VLAN_ID, ++ ISCSI_NET_PARAM_VLAN_PRIORITY, ++ ISCSI_NET_PARAM_VLAN_ENABLED, ++ ISCSI_NET_PARAM_VLAN_TAG, ++ ISCSI_NET_PARAM_IFACE_TYPE, ++ ISCSI_NET_PARAM_IFACE_NAME, ++ ISCSI_NET_PARAM_MTU, ++ ISCSI_NET_PARAM_PORT, + }; + + enum iscsi_conn_state { +-- +1.8.3.1 + diff --git a/0044-iscsi_if.h-Additional-parameters-for-network-param-s.patch b/0044-iscsi_if.h-Additional-parameters-for-network-param-s.patch new file mode 100644 index 0000000..4fea308 --- /dev/null +++ b/0044-iscsi_if.h-Additional-parameters-for-network-param-s.patch @@ -0,0 +1,122 @@ +From d1e07af2ed3aa480107213378a54bfc9a6a36c0a Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Fri, 18 Oct 2013 09:29:19 -0400 +Subject: [PATCH] iscsi_if.h: Additional parameters for network param settings + +Added support to display and update additional network parameters +through iscsiadm + +Signed-off-by: Harish Zunjarrao +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + include/iscsi_if.h | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 79 insertions(+) + +diff --git a/include/iscsi_if.h b/include/iscsi_if.h +index e837dd0..e59bcd0 100644 +--- a/include/iscsi_if.h ++++ b/include/iscsi_if.h +@@ -320,6 +320,7 @@ enum iscsi_param_type { + ISCSI_NET_PARAM, /* iscsi_net_param */ + ISCSI_FLASHNODE_PARAM, /* iscsi_flashnode_param */ + ISCSI_CHAP_PARAM, /* iscsi_chap_param */ ++ ISCSI_IFACE_PARAM, /* iscsi_iface_param */ + }; + + /* structure for minimalist usecase */ +@@ -392,6 +393,10 @@ struct iscsi_path { + #define ISCSI_VLAN_DISABLE 0x01 + #define ISCSI_VLAN_ENABLE 0x02 + ++/* iscsi generic enable/disabled setting for various features */ ++#define ISCSI_NET_PARAM_DISABLE 0x01 ++#define ISCSI_NET_PARAM_ENABLE 0x02 ++ + /* iSCSI network params */ + enum iscsi_net_param { + ISCSI_NET_PARAM_IPV4_ADDR = 1, +@@ -414,6 +419,80 @@ enum iscsi_net_param { + ISCSI_NET_PARAM_IFACE_NAME, + ISCSI_NET_PARAM_MTU, + ISCSI_NET_PARAM_PORT, ++ ISCSI_NET_PARAM_IPADDR_STATE, ++ ISCSI_NET_PARAM_IPV6_LINKLOCAL_STATE, ++ ISCSI_NET_PARAM_IPV6_ROUTER_STATE, ++ ISCSI_NET_PARAM_DELAYED_ACK_EN, ++ ISCSI_NET_PARAM_TCP_NAGLE_DISABLE, ++ ISCSI_NET_PARAM_TCP_WSF_DISABLE, ++ ISCSI_NET_PARAM_TCP_WSF, ++ ISCSI_NET_PARAM_TCP_TIMER_SCALE, ++ ISCSI_NET_PARAM_TCP_TIMESTAMP_EN, ++ ISCSI_NET_PARAM_CACHE_ID, ++ ISCSI_NET_PARAM_IPV4_DHCP_DNS_ADDR_EN, ++ ISCSI_NET_PARAM_IPV4_DHCP_SLP_DA_EN, ++ ISCSI_NET_PARAM_IPV4_TOS_EN, ++ ISCSI_NET_PARAM_IPV4_TOS, ++ ISCSI_NET_PARAM_IPV4_GRAT_ARP_EN, ++ ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID_EN, ++ ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID, ++ ISCSI_NET_PARAM_IPV4_DHCP_REQ_VENDOR_ID_EN, ++ ISCSI_NET_PARAM_IPV4_DHCP_USE_VENDOR_ID_EN, ++ ISCSI_NET_PARAM_IPV4_DHCP_VENDOR_ID, ++ ISCSI_NET_PARAM_IPV4_DHCP_LEARN_IQN_EN, ++ ISCSI_NET_PARAM_IPV4_FRAGMENT_DISABLE, ++ ISCSI_NET_PARAM_IPV4_IN_FORWARD_EN, ++ ISCSI_NET_PARAM_IPV4_TTL, ++ ISCSI_NET_PARAM_IPV6_GRAT_NEIGHBOR_ADV_EN, ++ ISCSI_NET_PARAM_IPV6_MLD_EN, ++ ISCSI_NET_PARAM_IPV6_FLOW_LABEL, ++ ISCSI_NET_PARAM_IPV6_TRAFFIC_CLASS, ++ ISCSI_NET_PARAM_IPV6_HOP_LIMIT, ++ ISCSI_NET_PARAM_IPV6_ND_REACHABLE_TMO, ++ ISCSI_NET_PARAM_IPV6_ND_REXMIT_TIME, ++ ISCSI_NET_PARAM_IPV6_ND_STALE_TMO, ++ ISCSI_NET_PARAM_IPV6_DUP_ADDR_DETECT_CNT, ++ ISCSI_NET_PARAM_IPV6_RTR_ADV_LINK_MTU, ++ ISCSI_NET_PARAM_REDIRECT_EN, ++}; ++ ++enum iscsi_ipaddress_state { ++ ISCSI_IPDDRESS_STATE_UNCONFIGURED, ++ ISCSI_IPDDRESS_STATE_ACQUIRING, ++ ISCSI_IPDDRESS_STATE_TENTATIVE, ++ ISCSI_IPDDRESS_STATE_VALID, ++ ISCSI_IPDDRESS_STATE_DISABLING, ++ ISCSI_IPDDRESS_STATE_INVALID, ++ ISCSI_IPDDRESS_STATE_DEPRECATED, ++}; ++ ++enum iscsi_router_state { ++ ISCSI_ROUTER_STATE_UNKNOWN, ++ ISCSI_ROUTER_STATE_ADVERTISED, ++ ISCSI_ROUTER_STATE_MANUAL, ++ ISCSI_ROUTER_STATE_STALE, ++}; ++ ++/* iSCSI specific settings params for iface */ ++enum iscsi_iface_param { ++ ISCSI_IFACE_PARAM_DEF_TASKMGMT_TMO, ++ ISCSI_IFACE_PARAM_HDRDGST_EN, ++ ISCSI_IFACE_PARAM_DATADGST_EN, ++ ISCSI_IFACE_PARAM_IMM_DATA_EN, ++ ISCSI_IFACE_PARAM_INITIAL_R2T_EN, ++ ISCSI_IFACE_PARAM_DATASEQ_INORDER_EN, ++ ISCSI_IFACE_PARAM_PDU_INORDER_EN, ++ ISCSI_IFACE_PARAM_ERL, ++ ISCSI_IFACE_PARAM_MAX_RECV_DLENGTH, ++ ISCSI_IFACE_PARAM_FIRST_BURST, ++ ISCSI_IFACE_PARAM_MAX_R2T, ++ ISCSI_IFACE_PARAM_MAX_BURST, ++ ISCSI_IFACE_PARAM_CHAP_AUTH_EN, ++ ISCSI_IFACE_PARAM_BIDI_CHAP_EN, ++ ISCSI_IFACE_PARAM_DISCOVERY_AUTH_OPTIONAL, ++ ISCSI_IFACE_PARAM_DISCOVERY_LOGOUT_EN, ++ ISCSI_IFACE_PARAM_STRICT_LOGIN_COMP_EN, ++ ISCSI_IFACE_PARAM_INITIATOR_NAME, + }; + + enum iscsi_conn_state { +-- +1.8.3.1 + diff --git a/0044-iscsid-add-initrd-option-to-set-run-from-initrd-hint.patch b/0044-iscsid-add-initrd-option-to-set-run-from-initrd-hint.patch deleted file mode 100644 index 358b50c..0000000 --- a/0044-iscsid-add-initrd-option-to-set-run-from-initrd-hint.patch +++ /dev/null @@ -1,61 +0,0 @@ -From b1799fe84ed94a19bba6bcd7284ce8b038be4ffe Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Mon, 10 Dec 2012 13:20:47 -0800 -Subject: iscsid: add --initrd option to set run from initrd hint for systemd - -See http://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons - -Signed-off-by: Chris Leech ---- - usr/iscsid.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/usr/iscsid.c b/usr/iscsid.c -index b4bb65b..7d71085 100644 ---- a/usr/iscsid.c -+++ b/usr/iscsid.c -@@ -61,6 +61,7 @@ static pid_t log_pid; - static gid_t gid; - static int daemonize = 1; - static int mgmt_ipc_fd; -+static int initrd = 0; - - static struct option const long_options[] = { - {"config", required_argument, NULL, 'c'}, -@@ -73,6 +74,7 @@ static struct option const long_options[] = { - {"pid", required_argument, NULL, 'p'}, - {"help", no_argument, NULL, 'h'}, - {"version", no_argument, NULL, 'v'}, -+ {"initrd", no_argument, &initrd, 1}, - {NULL, 0, NULL, 0}, - }; - -@@ -95,6 +97,7 @@ Open-iSCSI initiator daemon.\n\ - -p, --pid=pidfile use pid file (default " PID_FILE ").\n\ - -h, --help display this help and exit\n\ - -v, --version display version and exit\n\ -+ --initrd run from initrd\n\ - "); - } - exit(status); -@@ -383,12 +386,17 @@ int main(int argc, char *argv[]) - case 'h': - usage(0); - break; -+ case 0: -+ break; - default: - usage(1); - break; - } - } - -+ if (initrd) -+ argv[0][0] = '@'; -+ - /* initialize logger */ - log_pid = log_init(program_name, DEFAULT_AREA_SIZE, - daemonize ? log_do_log_daemon : log_do_log_std, NULL); --- -1.7.11.7 - diff --git a/0045-idbm_rec_write-seperate-old-and-new-style-writes.patch b/0045-idbm_rec_write-seperate-old-and-new-style-writes.patch deleted file mode 100644 index d138233..0000000 --- a/0045-idbm_rec_write-seperate-old-and-new-style-writes.patch +++ /dev/null @@ -1,180 +0,0 @@ -From 954a9492b5ed1de5907ad2a7d7cc0ae6215d8fac Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Tue, 13 Aug 2013 11:34:31 -0700 -Subject: idbm_rec_write, seperate old and new style writes - -Duplicates a small bit of code, but easier to understand and extened. ---- - usr/idbm.c | 116 +++++++++++++++++++++++++++++++++++++++++-------------------- - 1 file changed, 79 insertions(+), 37 deletions(-) - -diff --git a/usr/idbm.c b/usr/idbm.c -index 0a88699..cb6ffd1 100644 ---- a/usr/idbm.c -+++ b/usr/idbm.c -@@ -1808,7 +1808,7 @@ mkdir_portal: - return f; - } - --static int idbm_rec_write(node_rec_t *rec) -+static int idbm_rec_write_new(node_rec_t *rec) - { - struct stat statb; - FILE *f; -@@ -1820,38 +1820,8 @@ static int idbm_rec_write(node_rec_t *rec) - log_error("Could not alloc portal\n"); - return ISCSI_ERR_NOMEM; - } -- -- snprintf(portal, PATH_MAX, "%s", NODE_CONFIG_DIR); -- if (access(portal, F_OK) != 0) { -- if (mkdir(portal, 0660) != 0) { -- log_error("Could not make %s: %s\n", portal, -- strerror(errno)); -- rc = ISCSI_ERR_IDBM; -- goto free_portal; -- } -- } -- -- snprintf(portal, PATH_MAX, "%s/%s", NODE_CONFIG_DIR, rec->name); -- if (access(portal, F_OK) != 0) { -- if (mkdir(portal, 0660) != 0) { -- log_error("Could not make %s: %s\n", portal, -- strerror(errno)); -- rc = ISCSI_ERR_IDBM; -- goto free_portal; -- } -- } -- - snprintf(portal, PATH_MAX, "%s/%s/%s,%d", NODE_CONFIG_DIR, - rec->name, rec->conn[0].address, rec->conn[0].port); -- log_debug(5, "Looking for config file %s", portal); -- -- rc = idbm_lock(); -- if (rc) -- goto free_portal; -- -- if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN) -- /* drop down to old style portal as config */ -- goto open_conf; - - rc = stat(portal, &statb); - if (rc) { -@@ -1872,11 +1842,11 @@ static int idbm_rec_write(node_rec_t *rec) - log_error("Could not convert %s: %s\n", portal, - strerror(errno)); - rc = ISCSI_ERR_IDBM; -- goto unlock; -+ goto free_portal; - } - } else { - rc = ISCSI_ERR_INVAL; -- goto unlock; -+ goto free_portal; - } - - mkdir_portal: -@@ -1887,24 +1857,96 @@ mkdir_portal: - log_error("Could not make dir %s: %s\n", - portal, strerror(errno)); - rc = ISCSI_ERR_IDBM; -- goto unlock; -+ goto free_portal; - } - } - - snprintf(portal, PATH_MAX, "%s/%s/%s,%d,%d/%s", NODE_CONFIG_DIR, - rec->name, rec->conn[0].address, rec->conn[0].port, rec->tpgt, - rec->iface.name); --open_conf: -+/* open_conf: */ - f = fopen(portal, "w"); - if (!f) { - log_error("Could not open %s: %sd\n", portal, strerror(errno)); - rc = ISCSI_ERR_IDBM; -- goto unlock; -+ goto free_portal; - } - - idbm_print(IDBM_PRINT_TYPE_NODE, rec, 1, f); - fclose(f); --unlock: -+free_portal: -+ free(portal); -+ return rc; -+} -+ -+static int idbm_rec_write_old(node_rec_t *rec) -+{ -+ FILE *f; -+ char *portal; -+ int rc = 0; -+ -+ portal = malloc(PATH_MAX); -+ if (!portal) { -+ log_error("Could not alloc portal\n"); -+ return ISCSI_ERR_NOMEM; -+ } -+ snprintf(portal, PATH_MAX, "%s/%s/%s,%d", NODE_CONFIG_DIR, -+ rec->name, rec->conn[0].address, rec->conn[0].port); -+ -+ f = fopen(portal, "w"); -+ if (!f) { -+ log_error("Could not open %s: %sd\n", portal, strerror(errno)); -+ rc = ISCSI_ERR_IDBM; -+ goto free_portal; -+ } -+ idbm_print(IDBM_PRINT_TYPE_NODE, rec, 1, f); -+ fclose(f); -+free_portal: -+ free(portal); -+ return rc; -+} -+ -+static int idbm_rec_write(node_rec_t *rec) -+{ -+ char *portal; -+ int rc = 0; -+ -+ portal = malloc(PATH_MAX); -+ if (!portal) { -+ log_error("Could not alloc portal\n"); -+ return ISCSI_ERR_NOMEM; -+ } -+ -+ snprintf(portal, PATH_MAX, "%s", NODE_CONFIG_DIR); -+ if (access(portal, F_OK) != 0) { -+ if (mkdir(portal, 0660) != 0) { -+ log_error("Could not make %s: %s\n", portal, -+ strerror(errno)); -+ rc = ISCSI_ERR_IDBM; -+ goto free_portal; -+ } -+ } -+ -+ snprintf(portal, PATH_MAX, "%s/%s", NODE_CONFIG_DIR, rec->name); -+ if (access(portal, F_OK) != 0) { -+ if (mkdir(portal, 0660) != 0) { -+ log_error("Could not make %s: %s\n", portal, -+ strerror(errno)); -+ rc = ISCSI_ERR_IDBM; -+ goto free_portal; -+ } -+ } -+ -+ rc = idbm_lock(); -+ if (rc) -+ goto free_portal; -+ -+ if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN) -+ /* old style portal as config */ -+ rc = idbm_rec_write_old(rec); -+ else -+ rc = idbm_rec_write_new(rec); -+ - idbm_unlock(); - free_portal: - free(portal); --- -1.8.1.4 - diff --git a/0045-iscsi-tools-Use-macro-to-set-IPv4-IPv6-IP-addresses.patch b/0045-iscsi-tools-Use-macro-to-set-IPv4-IPv6-IP-addresses.patch new file mode 100644 index 0000000..6ef8896 --- /dev/null +++ b/0045-iscsi-tools-Use-macro-to-set-IPv4-IPv6-IP-addresses.patch @@ -0,0 +1,243 @@ +From 466efaad99b0fc0d1181443386b823739a8b483b Mon Sep 17 00:00:00 2001 +From: Harish Zunjarrao +Date: Fri, 18 Oct 2013 09:29:20 -0400 +Subject: [PATCH] iscsi tools: Use macro to set IPv4/IPv6 IP addresses + +Signed-off-by: Harish Zunjarrao +Signed-off-by: Vikas Chaudhary +Signed-off-by: Adheer Chandravanshi +--- + usr/iface.c | 154 +++++++++++++++++++++++++++--------------------------------- + 1 file changed, 69 insertions(+), 85 deletions(-) + +diff --git a/usr/iface.c b/usr/iface.c +index 8580d1a..19ad5ab 100644 +--- a/usr/iface.c ++++ b/usr/iface.c +@@ -1484,8 +1484,8 @@ static int iface_fill_router_autocfg(struct iovec *iov, struct iface_rec *iface) + } + + /* IPv4 IPAddress/Subnet Mask/Gateway: 4 bytes */ +-static int iface_fill_net_ipv4_addr(struct iovec *iov, struct iface_rec *iface, +- uint32_t param) ++static int iface_fill_net_ipv4_addr(struct iovec *iov, uint32_t iface_num, ++ uint16_t param, char *param_val) + { + int rc = 1; + int len; +@@ -1502,29 +1502,12 @@ static int iface_fill_net_ipv4_addr(struct iovec *iov, struct iface_rec *iface, + net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr); + net_param->param = param; + net_param->iface_type = ISCSI_IFACE_TYPE_IPV4; +- net_param->iface_num = iface->iface_num; ++ net_param->iface_num = iface_num; + net_param->len = 4; + net_param->param_type = ISCSI_NET_PARAM; +- +- switch (param) { +- case ISCSI_NET_PARAM_IPV4_ADDR: +- rc = inet_pton(AF_INET, iface->ipaddress, net_param->value); +- if (rc <= 0) +- goto free; +- break; +- case ISCSI_NET_PARAM_IPV4_SUBNET: +- rc = inet_pton(AF_INET, iface->subnet_mask, net_param->value); +- if (rc <= 0) +- goto free; +- break; +- case ISCSI_NET_PARAM_IPV4_GW: +- rc = inet_pton(AF_INET, iface->gateway, net_param->value); +- if (rc <= 0) +- goto free; +- break; +- default: ++ rc = inet_pton(AF_INET, param_val, net_param->value); ++ if (rc <= 0) + goto free; +- } + + /* validate */ + if (!net_param->value[0] && !net_param->value[1] && +@@ -1539,9 +1522,19 @@ free: + return 1; + } + ++#define IFACE_SET_NET_PARAM_IPV4_ADDR(iov, inum, param, ival, gcnt, \ ++ lcnt) { \ ++ if (strstr(ival, ".")) { \ ++ if (!iface_fill_net_ipv4_addr(iov, inum, param, ival)) {\ ++ (*gcnt)++; \ ++ (*lcnt)++; \ ++ } \ ++ } \ ++} ++ + /* IPv6 IPAddress/LinkLocal/Router: 16 bytes */ +-static int iface_fill_net_ipv6_addr(struct iovec *iov, struct iface_rec *iface, +- uint32_t param) ++static int iface_fill_net_ipv6_addr(struct iovec *iov, uint32_t iface_num, ++ uint16_t param, char *param_val) + { + int rc; + int len; +@@ -1558,30 +1551,12 @@ static int iface_fill_net_ipv6_addr(struct iovec *iov, struct iface_rec *iface, + net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr); + net_param->param = param; + net_param->iface_type = ISCSI_IFACE_TYPE_IPV6; +- net_param->iface_num = iface->iface_num; ++ net_param->iface_num = iface_num; + net_param->param_type = ISCSI_NET_PARAM; + net_param->len = 16; +- +- switch (param) { +- case ISCSI_NET_PARAM_IPV6_ADDR: +- rc = inet_pton(AF_INET6, iface->ipaddress, net_param->value); +- if (rc <= 0) +- goto free; +- break; +- case ISCSI_NET_PARAM_IPV6_LINKLOCAL: +- rc = inet_pton(AF_INET6, iface->ipv6_linklocal, +- net_param->value); +- if (rc <= 0) +- goto free; +- break; +- case ISCSI_NET_PARAM_IPV6_ROUTER: +- rc = inet_pton(AF_INET6, iface->ipv6_router, net_param->value); +- if (rc <= 0) +- goto free; +- break; +- default: ++ rc = inet_pton(AF_INET6, param_val, net_param->value); ++ if (rc <= 0) + goto free; +- } + + return 0; + free: +@@ -1591,6 +1566,16 @@ free: + return 1; + } + ++#define IFACE_SET_NET_PARAM_IPV6_ADDR(iov, inum, param, ival, gcnt, \ ++ lcnt) { \ ++ if (strstr(ival, ":")) { \ ++ if (!iface_fill_net_ipv6_addr(iov, inum, param, ival)) {\ ++ (*gcnt)++; \ ++ (*lcnt)++; \ ++ } \ ++ } \ ++} ++ + struct iface_net_config { + struct iface_rec *primary; + struct iovec *iovs; +@@ -1635,28 +1620,27 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface) + net_config->count++; + count++; + } +- if (!iface_fill_net_ipv4_addr(&iov[net_config->count], +- iface, +- ISCSI_NET_PARAM_IPV4_ADDR)) { +- net_config->count++; +- count++; +- } +- if (strstr(iface->subnet_mask, ".")) { +- if (!iface_fill_net_ipv4_addr( +- &iov[net_config->count], iface, +- ISCSI_NET_PARAM_IPV4_SUBNET)) { +- net_config->count++; +- count++; +- } +- } +- if (strstr(iface->gateway, ".")) { +- if (!iface_fill_net_ipv4_addr( +- &iov[net_config->count], iface, +- ISCSI_NET_PARAM_IPV4_GW)) { +- net_config->count++; +- count++; +- } +- } ++ ++ IFACE_SET_NET_PARAM_IPV4_ADDR(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_NET_PARAM_IPV4_ADDR, ++ iface->ipaddress, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_NET_PARAM_IPV4_ADDR(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_NET_PARAM_IPV4_SUBNET, ++ iface->subnet_mask, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_NET_PARAM_IPV4_ADDR(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_NET_PARAM_IPV4_GW, ++ iface->gateway, ++ &net_config->count, ++ &count); + } + + /* +@@ -1727,12 +1711,12 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface) + count++; + } + /* User provided IPv6 Address */ +- if (!iface_fill_net_ipv6_addr(&iov[net_config->count], +- iface, +- ISCSI_NET_PARAM_IPV6_ADDR)) { +- net_config->count++; +- count++; +- } ++ IFACE_SET_NET_PARAM_IPV6_ADDR(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_NET_PARAM_IPV6_ADDR, ++ iface->ipaddress, ++ &net_config->count, ++ &count); + } + + /* For LinkLocal Address */ +@@ -1751,12 +1735,12 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface) + count++; + } + /* User provided Link Local Address */ +- if (!iface_fill_net_ipv6_addr(&iov[net_config->count], +- iface, +- ISCSI_NET_PARAM_IPV6_LINKLOCAL)) { +- net_config->count++; +- count++; +- } ++ IFACE_SET_NET_PARAM_IPV6_ADDR(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_NET_PARAM_IPV6_LINKLOCAL, ++ iface->ipv6_linklocal, ++ &net_config->count, ++ &count); + } + + /* For Router Address */ +@@ -1773,12 +1757,12 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface) + count++; + } + /* User provided Router Address */ +- if (!iface_fill_net_ipv6_addr(&iov[net_config->count], +- iface, +- ISCSI_NET_PARAM_IPV6_ROUTER)) { +- net_config->count++; +- count++; +- } ++ IFACE_SET_NET_PARAM_IPV6_ADDR(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_NET_PARAM_IPV6_ROUTER, ++ iface->ipv6_router, ++ &net_config->count, ++ &count); + } + + /* +-- +1.8.3.1 + diff --git a/0046-idbw_rec_write-pick-tpgt-from-existing-record.patch b/0046-idbw_rec_write-pick-tpgt-from-existing-record.patch deleted file mode 100644 index f69cef9..0000000 --- a/0046-idbw_rec_write-pick-tpgt-from-existing-record.patch +++ /dev/null @@ -1,87 +0,0 @@ -From ef61cd4912e90c8202598f2fa4e9f1842a5b5822 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Tue, 13 Aug 2013 12:39:07 -0700 -Subject: idbw_rec_write, pick tpgt from existing record - -On a static add (-m node -o new) without a user specified tpgt, looks -for existing new style records with tpgt before creating an old style -record without. If one exists, take the tpgt from it an write an -updated new style record instead. ---- - usr/idbm.c | 40 ++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 40 insertions(+) - -diff --git a/usr/idbm.c b/usr/idbm.c -index cb6ffd1..0410079 100644 ---- a/usr/idbm.c -+++ b/usr/idbm.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -162,6 +163,8 @@ static struct idbm *db; - _n++; \ - } while(0) - -+static int idbm_remove_disc_to_node_link(node_rec_t *rec, char *portal); -+ - static void - idbm_recinfo_discovery(discovery_rec_t *r, recinfo_t *ri) - { -@@ -1884,12 +1887,49 @@ static int idbm_rec_write_old(node_rec_t *rec) - FILE *f; - char *portal; - int rc = 0; -+ glob_t globbuf; -+ int i; -+ int tpgt = PORTAL_GROUP_TAG_UNKNOWN; - - portal = malloc(PATH_MAX); - if (!portal) { - log_error("Could not alloc portal\n"); - return ISCSI_ERR_NOMEM; - } -+ -+ /* check for newer portal dir with tpgt */ -+ snprintf(portal, PATH_MAX, "%s/%s/%s,%d,*", NODE_CONFIG_DIR, -+ rec->name, rec->conn[0].address, rec->conn[0].port); -+ rc = glob(portal, GLOB_ONLYDIR, NULL, &globbuf); -+ if (!rc) { -+ if (globbuf.gl_pathc > 1) -+ log_warning("multiple tpg records for portal " -+ "%s/%s:%d found", rec->name, -+ rec->conn[0].address, rec->conn[0].port); -+ /* set pattern for sscanf matching of tpgt */ -+ snprintf(portal, PATH_MAX, "%s/%s/%s,%d,%%u", NODE_CONFIG_DIR, -+ rec->name, rec->conn[0].address, rec->conn[0].port); -+ for (i = 0; i < globbuf.gl_pathc; i++) { -+ rc = sscanf(globbuf.gl_pathv[i], portal, &tpgt); -+ if (rc == 1) -+ break; -+ } -+ if (tpgt == PORTAL_GROUP_TAG_UNKNOWN) -+ log_warning("glob match on existing records, " -+ "but no valid tpgt found"); -+ } -+ globfree(&globbuf); -+ rc = 0; -+ -+ /* if a tpgt was selected from an old record, write entry in new format */ -+ if (tpgt != PORTAL_GROUP_TAG_UNKNOWN) { -+ log_warning("using tpgt %u from existing record", tpgt); -+ rec->tpgt = tpgt; -+ rc = idbm_remove_disc_to_node_link(rec, portal); -+ free(portal); -+ return idbm_rec_write_new(rec); -+ } -+ - snprintf(portal, PATH_MAX, "%s/%s/%s,%d", NODE_CONFIG_DIR, - rec->name, rec->conn[0].address, rec->conn[0].port); - --- -1.8.3.1 - diff --git a/0046-iscsi-tools-Use-single-function-to-enable-disable-ne.patch b/0046-iscsi-tools-Use-single-function-to-enable-disable-ne.patch new file mode 100644 index 0000000..22334e1 --- /dev/null +++ b/0046-iscsi-tools-Use-single-function-to-enable-disable-ne.patch @@ -0,0 +1,220 @@ +From 2220ee4334637946e93dca5c68889b5e3e807515 Mon Sep 17 00:00:00 2001 +From: Harish Zunjarrao +Date: Fri, 18 Oct 2013 09:29:21 -0400 +Subject: [PATCH] iscsi tools: Use single function to enable/disable network + parameters + +Signed-off-by: Harish Zunjarrao +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + usr/iface.c | 148 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 74 insertions(+), 74 deletions(-) + +diff --git a/usr/iface.c b/usr/iface.c +index 19ad5ab..292c804 100644 +--- a/usr/iface.c ++++ b/usr/iface.c +@@ -1311,60 +1311,45 @@ static int iface_fill_vlan_id(struct iovec *iov, struct iface_rec *iface, + return 0; + } + +-/* IPv4/IPv6 VLAN state: disable/enable */ +-static int iface_fill_vlan_state(struct iovec *iov, struct iface_rec *iface, +- uint32_t iface_type) ++/* disable/enable parameters */ ++static int iface_fill_param_state(struct iovec *iov, uint32_t iface_num, ++ uint8_t iface_type, uint16_t param, ++ uint8_t param_type, char *param_val) + { + int len; + struct iscsi_iface_param_info *net_param; + struct nlattr *attr; + ++ if (!param_val[0]) ++ return 1; ++ + len = sizeof(struct iscsi_iface_param_info) + 1; +- iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_VLAN_ENABLED, len); ++ iov->iov_base = iscsi_nla_alloc(param, len); + if (!(iov->iov_base)) + return 1; + + attr = iov->iov_base; + iov->iov_len = NLA_ALIGN(attr->nla_len); + net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr); +- net_param->param = ISCSI_NET_PARAM_VLAN_ENABLED; +- net_param->iface_type = iface_type; +- net_param->iface_num = iface->iface_num; +- net_param->param_type = ISCSI_NET_PARAM; ++ net_param->iface_num = iface_num; + net_param->len = 1; +- if (strcmp(iface->vlan_state, "disable") && iface->vlan_id) +- net_param->value[0] = ISCSI_VLAN_ENABLE; ++ net_param->param = param; ++ net_param->iface_type = iface_type; ++ net_param->param_type = param_type; ++ if (strcmp(param_val, "disable")) ++ net_param->value[0] = ISCSI_NET_PARAM_ENABLE; + else /* Assume disabled */ +- net_param->value[0] = ISCSI_VLAN_DISABLE; ++ net_param->value[0] = ISCSI_NET_PARAM_DISABLE; + return 0; + } + +-/* IPv4/IPv6 Network state: disable/enable */ +-static int iface_fill_net_state(struct iovec *iov, struct iface_rec *iface, +- uint32_t iface_type) +-{ +- int len; +- struct iscsi_iface_param_info *net_param; +- struct nlattr *attr; +- +- len = sizeof(struct iscsi_iface_param_info) + 1; +- iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IFACE_ENABLE, len); +- if (!(iov->iov_base)) +- return 1; +- +- attr = iov->iov_base; +- iov->iov_len = NLA_ALIGN(attr->nla_len); +- net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr); +- net_param->param = ISCSI_NET_PARAM_IFACE_ENABLE; +- net_param->iface_type = iface_type; +- net_param->iface_num = iface->iface_num; +- net_param->param_type = ISCSI_NET_PARAM; +- net_param->len = 1; +- if (!strcmp(iface->state, "disable")) +- net_param->value[0] = ISCSI_IFACE_DISABLE; +- else /* Assume enabled */ +- net_param->value[0] = ISCSI_IFACE_ENABLE; +- return 0; ++#define IFACE_SET_PARAM_STATE(iov, inum, itype, param, ptype, ival, \ ++ gcnt, lcnt) { \ ++ if (!iface_fill_param_state(iov, inum, itype, param, ptype, \ ++ ival)) { \ ++ (*gcnt)++; \ ++ (*lcnt)++; \ ++ } \ + } + + /* IPv4 Bootproto: DHCP/static */ +@@ -1598,13 +1583,14 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface) + iptype = iface_get_iptype(iface); + if (iptype == ISCSI_IFACE_TYPE_IPV4) { + if (!strcmp(iface->state, "disable")) { +- if (!iface_fill_net_state(&iov[net_config->count], +- iface, +- ISCSI_IFACE_TYPE_IPV4)) { +- net_config->count++; +- count++; +- } +- ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_IFACE_ENABLE, ++ ISCSI_NET_PARAM, ++ iface->state, ++ &net_config->count, ++ &count); + return 0; + } + +@@ -1648,18 +1634,24 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface) + * fill state and other parameters (if any) + */ + if (count) { +- if (!iface_fill_net_state(&iov[net_config->count], +- iface, +- ISCSI_IFACE_TYPE_IPV4)) { +- net_config->count++; +- count++; +- } +- if (!iface_fill_vlan_state(&iov[net_config->count], +- iface, +- ISCSI_IFACE_TYPE_IPV4)) { +- net_config->count++; +- count++; +- } ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_IFACE_ENABLE, ++ ISCSI_NET_PARAM, ++ iface->state, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_VLAN_ENABLED, ++ ISCSI_NET_PARAM, ++ iface->vlan_state, ++ &net_config->count, ++ &count); ++ + if (strcmp(iface->vlan_state, "disable") && + iface->vlan_id) { + if (!iface_fill_vlan_id(&iov[net_config->count], +@@ -1687,12 +1679,14 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface) + } + } else if (iptype == ISCSI_IFACE_TYPE_IPV6) { + if (!strcmp(iface->state, "disable")) { +- if (!iface_fill_net_state(&iov[net_config->count], +- iface, +- ISCSI_IFACE_TYPE_IPV6)) { +- net_config->count++; +- count++; +- } ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV6, ++ ISCSI_NET_PARAM_IFACE_ENABLE, ++ ISCSI_NET_PARAM, ++ iface->state, ++ &net_config->count, ++ &count); + return 0; + } + +@@ -1770,18 +1764,24 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface) + * fill state and other parameters + */ + if (count) { +- if (!iface_fill_net_state(&iov[net_config->count], +- iface, +- ISCSI_IFACE_TYPE_IPV6)) { +- net_config->count++; +- count++; +- } +- if (!iface_fill_vlan_state(&iov[net_config->count], +- iface, +- ISCSI_IFACE_TYPE_IPV6)) { +- net_config->count++; +- count++; +- } ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV6, ++ ISCSI_NET_PARAM_IFACE_ENABLE, ++ ISCSI_NET_PARAM, ++ iface->state, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV6, ++ ISCSI_NET_PARAM_VLAN_ENABLED, ++ ISCSI_NET_PARAM, ++ iface->vlan_state, ++ &net_config->count, ++ &count); ++ + if (strcmp(iface->vlan_state, "disable") && + iface->vlan_id) { + if (!iface_fill_vlan_id(&iov[net_config->count], +-- +1.8.3.1 + diff --git a/0047-iscsi-tools-Use-single-function-to-set-integer-netwo.patch b/0047-iscsi-tools-Use-single-function-to-set-integer-netwo.patch new file mode 100644 index 0000000..b8f451c --- /dev/null +++ b/0047-iscsi-tools-Use-single-function-to-set-integer-netwo.patch @@ -0,0 +1,215 @@ +From d8991c9e1de373a1c55ad2f8ca07bb3fbda1aa5c Mon Sep 17 00:00:00 2001 +From: Harish Zunjarrao +Date: Fri, 18 Oct 2013 09:29:22 -0400 +Subject: [PATCH] iscsi tools: Use single function to set integer network + parameters + +Signed-off-by: Harish Zunjarrao +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + usr/iface.c | 162 +++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 90 insertions(+), 72 deletions(-) + +diff --git a/usr/iface.c b/usr/iface.c +index 292c804..6454f75 100644 +--- a/usr/iface.c ++++ b/usr/iface.c +@@ -1223,58 +1223,68 @@ int iface_get_param_count(struct iface_rec *iface, int iface_all) + return iface_params.count; + } + +-/* IPv4/IPv6 Port: 3260 or User defined */ +-static int iface_fill_port(struct iovec *iov, struct iface_rec *iface, +- uint32_t iface_type) ++/* write integer parameter value */ ++static int iface_fill_int_param_val(struct iovec *iov, uint32_t iface_num, ++ uint8_t iface_type, uint16_t param, ++ uint8_t param_type, uint32_t param_len, ++ uint32_t param_val) + { + int len; + struct iscsi_iface_param_info *net_param; +- uint16_t port = 3260; + struct nlattr *attr; ++ uint8_t val8 = 0; ++ uint16_t val16 = 0; ++ uint32_t val32 = 0; ++ char *val = NULL; + +- len = sizeof(struct iscsi_iface_param_info) + sizeof(port); +- iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_PORT, len); +- if (!iov->iov_base) +- return 1; +- attr = iov->iov_base; +- iov->iov_len = NLA_ALIGN(attr->nla_len); +- +- net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr); +- net_param->param = ISCSI_NET_PARAM_PORT; +- net_param->iface_type = iface_type; +- net_param->iface_num = iface->iface_num; +- net_param->param_type = ISCSI_NET_PARAM; +- net_param->len = 2; +- if (iface->port) +- port = iface->port; +- memcpy(net_param->value, &port, net_param->len); +- return 0; +-} +- +-static int iface_fill_mtu(struct iovec *iov, struct iface_rec *iface, +- uint32_t iface_type) +-{ +- int len; +- struct iscsi_iface_param_info *net_param; +- uint16_t mtu = 0; +- struct nlattr *attr; +- +- len = sizeof(struct iscsi_iface_param_info) + 2; +- iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_MTU, len); ++ len = sizeof(struct iscsi_iface_param_info) + param_len; ++ iov->iov_base = iscsi_nla_alloc(param, len); + if (!(iov->iov_base)) + return 1; ++ + attr = iov->iov_base; + iov->iov_len = NLA_ALIGN(attr->nla_len); +- + net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr); +- net_param->param = ISCSI_NET_PARAM_MTU; ++ net_param->iface_num = iface_num; ++ net_param->len = param_len; ++ net_param->param = param; + net_param->iface_type = iface_type; +- net_param->iface_num = iface->iface_num; +- net_param->param_type = ISCSI_NET_PARAM; +- net_param->len = 2; +- mtu = iface->mtu; +- memcpy(net_param->value, &mtu, net_param->len); ++ net_param->param_type = param_type; ++ switch (param_len) { ++ case 1: ++ val8 = (uint8_t)param_val; ++ val = (char *)&val8; ++ break; ++ ++ case 2: ++ val16 = (uint16_t)param_val; ++ val = (char *)&val16; ++ break; ++ ++ case 4: ++ val32 = (uint32_t)param_val; ++ val = (char *)&val32; ++ break; ++ ++ default: ++ goto free; ++ } ++ memcpy(net_param->value, val, param_len); + return 0; ++free: ++ free(iov->iov_base); ++ iov->iov_base = NULL; ++ iov->iov_len = 0; ++ return 1; ++} ++ ++#define IFACE_SET_PARAM_INTVAL(iov, inum, itype, param, ptype, plen, \ ++ ival, gcnt, lcnt) { \ ++ if (ival && !iface_fill_int_param_val(iov, inum, itype, param, \ ++ ptype, plen, ival)) { \ ++ (*gcnt)++; \ ++ (*lcnt)++; \ ++ } \ + } + + /* IPv4/IPv6 VLAN_ID: decimal value <= 4095 */ +@@ -1660,22 +1670,26 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface) + count++; + } + } +- if (iface->mtu) { +- if (!iface_fill_mtu(&iov[net_config->count], +- iface, +- ISCSI_IFACE_TYPE_IPV4)) { +- net_config->count++; +- count++; +- } +- } +- if (iface->port) { +- if (!iface_fill_port(&iov[net_config->count], +- iface, +- ISCSI_IFACE_TYPE_IPV4)) { +- net_config->count++; +- count++; +- } +- } ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_MTU, ++ ISCSI_NET_PARAM, ++ 2, ++ iface->mtu, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_PORT, ++ ISCSI_NET_PARAM, ++ 2, ++ iface->port, ++ &net_config->count, ++ &count); + } + } else if (iptype == ISCSI_IFACE_TYPE_IPV6) { + if (!strcmp(iface->state, "disable")) { +@@ -1791,22 +1805,26 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface) + count++; + } + } +- if (iface->mtu) { +- if (!iface_fill_mtu(&iov[net_config->count], +- iface, +- ISCSI_IFACE_TYPE_IPV6)) { +- net_config->count++; +- count++; +- } +- } +- if (iface->port) { +- if (!iface_fill_port(&iov[net_config->count], +- iface, +- ISCSI_IFACE_TYPE_IPV6)) { +- net_config->count++; +- count++; +- } +- } ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV6, ++ ISCSI_NET_PARAM_MTU, ++ ISCSI_NET_PARAM, ++ 2, ++ iface->mtu, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV6, ++ ISCSI_NET_PARAM_PORT, ++ ISCSI_NET_PARAM, ++ 2, ++ iface->port, ++ &net_config->count, ++ &count); + } + } + return 0; +-- +1.8.3.1 + diff --git a/0047-iscsiadm-iscsid-newroot-command-to-survive-switch_ro.patch b/0047-iscsiadm-iscsid-newroot-command-to-survive-switch_ro.patch deleted file mode 100644 index 537a947..0000000 --- a/0047-iscsiadm-iscsid-newroot-command-to-survive-switch_ro.patch +++ /dev/null @@ -1,158 +0,0 @@ -From e5d7c7070358a5db8b849c8c5886e67881fe8906 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Fri, 7 Dec 2012 17:01:42 -0800 -Subject: [PATCH 47/47] iscsiadm, iscsid: newroot command to survive - switch_root - -When started from initramfs, iscsid needs to be able to chroot itself -to the runtime filesystem before the switch_root occurs. In the -initramfs "iscsiadm --newroot {root fs mount before switch}" should be -called before the switch_root. - -Signed-off-by: Chris Leech ---- - usr/iscsiadm.c | 30 ++++++++++++++++++++++++++++++ - usr/mgmt_ipc.c | 11 +++++++++++ - usr/mgmt_ipc.h | 6 +++++- - 3 files changed, 46 insertions(+), 1 deletion(-) - -diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c -index da0a3ec..af6d607 100644 ---- a/usr/iscsiadm.c -+++ b/usr/iscsiadm.c -@@ -117,6 +117,7 @@ static struct option const long_options[] = - {"interval", required_argument, NULL, 'i'}, - {"flashnode_idx", optional_argument, NULL, 'x'}, - {"portal_type", optional_argument, NULL, 'A'}, -+ {"newroot", required_argument, NULL, 0}, - {NULL, 0, NULL, 0}, - }; - static char *short_options = "RlDVhm:a:b:c:C:p:P:T:H:i:I:U:k:L:d:r:n:v:o:sSt:ux:A:"; -@@ -137,6 +138,7 @@ iscsiadm -m session [ -hV ] [ -d debug_level ] [ -P printlevel] [ -r sessionid - iscsiadm -m iface [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I ifacename | -H hostno|MAC ] [ [ -o operation ] [ -n name ] [ -v value ] ] [ -C ping [ -a ip ] [ -b packetsize ] [ -c count ] [ -i interval ] ]\n\ - iscsiadm -m fw [ -d debug_level ] [ -l ]\n\ - iscsiadm -m host [ -P printlevel ] [ -H hostno|MAC ] [ [ -C chap [ -o operation ] [ -v chap_tbl_idx ] ] | [ -C flashnode [ -o operation ] [ -A portal_type ] [ -x flashnode_idx ] [ -n name ] [ -v value ] ] ]\n\ -+iscsiadm --newroot switch_root_path\n\ - iscsiadm -k priority\n"); - } - exit(status); -@@ -278,6 +280,22 @@ static void kill_iscsid(int priority) - } - } - -+static void do_newroot(char *newroot) -+{ -+ iscsiadm_req_t req; -+ iscsiadm_rsp_t rsp; -+ int rc; -+ -+ memset(&req, 0, sizeof(req)); -+ req.command = MGMT_IPC_NEWROOT; -+ strncpy(req.u.newroot.path, newroot, PATH_MAX); -+ rc = iscsid_exec_req(&req, &rsp, 0); -+ if (rc) { -+ iscsi_err_print_msg(rc); -+ log_error("Could not send NEWROOT command"); -+ } -+} -+ - /* - * TODO: we can display how the ifaces are related to node records. - * And we can add a scsi_host mode which would display how -@@ -2800,6 +2818,7 @@ main(int argc, char **argv) - { - char *ip = NULL, *name = NULL, *value = NULL; - char *targetname = NULL, *group_session_mgmt_mode = NULL; -+ char *newroot = NULL; - int ch, longindex, mode=-1, port=-1, do_login=0, do_rescan=0; - int rc=0, sid=-1, op=OP_NOOP, type=-1, do_logout=0, do_stats=0; - int do_login_all=0, do_logout_all=0, info_level=-1, num_ifaces = 0; -@@ -2837,6 +2856,12 @@ main(int argc, char **argv) - while ((ch = getopt_long(argc, argv, short_options, - long_options, &longindex)) >= 0) { - switch (ch) { -+ case 0: -+ if (long_options[longindex].flag != 0) -+ break; -+ if (!strcmp(long_options[longindex].name, "newroot")) -+ newroot = optarg; -+ break; - case 'k': - killiscsid = atoi(optarg); - if (killiscsid < 0) { -@@ -2989,6 +3014,11 @@ main(int argc, char **argv) - goto free_ifaces; - } - -+ if (newroot) { -+ do_newroot(newroot); -+ goto free_ifaces; -+ } -+ - if (mode < 0) - usage(ISCSI_ERR_INVAL); - -diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c -index 87bd346..5cb7143 100644 ---- a/usr/mgmt_ipc.c -+++ b/usr/mgmt_ipc.c -@@ -226,6 +226,16 @@ mgmt_ipc_immediate_stop(queue_task_t *qtask) - } - - static int -+mgmt_ipc_newroot(queue_task_t *qtask) -+{ -+ char *newroot = qtask->req.u.newroot.path; -+ if (chdir(newroot) || chroot(".") || chdir("/")) -+ return ISCSI_ERR; -+ mgmt_ipc_write_rsp(qtask, ISCSI_SUCCESS); -+ return ISCSI_SUCCESS; -+} -+ -+static int - mgmt_ipc_conn_remove(queue_task_t *qtask) - { - return ISCSI_ERR; -@@ -534,6 +544,7 @@ static mgmt_ipc_fn_t * mgmt_ipc_functions[__MGMT_IPC_MAX_COMMAND] = { - [MGMT_IPC_NOTIFY_DEL_NODE] = mgmt_ipc_notify_del_node, - [MGMT_IPC_NOTIFY_ADD_PORTAL] = mgmt_ipc_notify_add_portal, - [MGMT_IPC_NOTIFY_DEL_PORTAL] = mgmt_ipc_notify_del_portal, -+[MGMT_IPC_NEWROOT] = mgmt_ipc_newroot, - }; - - void mgmt_ipc_handle(int accept_fd) -diff --git a/usr/mgmt_ipc.h b/usr/mgmt_ipc.h -index 55972ed..102ffff 100644 ---- a/usr/mgmt_ipc.h -+++ b/usr/mgmt_ipc.h -@@ -22,6 +22,7 @@ - #include "types.h" - #include "iscsi_if.h" - #include "config.h" -+#include "limits.h" - - #define ISCSIADM_NAMESPACE "ISCSIADM_ABSTRACT_NAMESPACE" - #define PEERUSER_MAX 64 -@@ -46,6 +47,7 @@ typedef enum iscsiadm_cmd { - MGMT_IPC_NOTIFY_DEL_NODE = 17, - MGMT_IPC_NOTIFY_ADD_PORTAL = 18, - MGMT_IPC_NOTIFY_DEL_PORTAL = 19, -+ MGMT_IPC_NEWROOT = 20, - - __MGMT_IPC_MAX_COMMAND - } iscsiadm_cmd_e; -@@ -75,8 +77,10 @@ typedef struct iscsiadm_req { - int param; - /* TODO: make this variable len to support */ - char value[IFNAMSIZ + 1]; -- - } set_host_param; -+ struct ipc_msg_newroot { -+ char path[PATH_MAX + 1]; -+ } newroot; - } u; - } iscsiadm_req_t; - --- -1.8.1.4 - diff --git a/0047-iscsiuio-systemd-socket-activation-support.patch b/0047-iscsiuio-systemd-socket-activation-support.patch deleted file mode 100644 index 896eba9..0000000 --- a/0047-iscsiuio-systemd-socket-activation-support.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 8003178db245b43d04b27b559d5541ced24ec13f Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Wed, 19 Dec 2012 21:39:06 -0800 -Subject: [PATCH] iscsiuio systemd socket activation support - ---- - iscsiuio/src/unix/iscsid_ipc.c | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - -diff --git a/iscsiuio/src/unix/iscsid_ipc.c b/iscsiuio/src/unix/iscsid_ipc.c -index e22de0d..4908cb7 100644 ---- a/iscsiuio/src/unix/iscsid_ipc.c -+++ b/iscsiuio/src/unix/iscsid_ipc.c -@@ -948,6 +948,30 @@ static void *iscsid_loop(void *arg) - pthread_exit(NULL); - } - -+#define SD_SOCKET_FDS_START 3 -+ -+static int ipc_systemd(void) -+{ -+ char *env; -+ -+ env = getenv("LISTEN_PID"); -+ -+ if (!env || (strtoul(env, NULL, 10) != getpid())) -+ return -EINVAL; -+ -+ env = getenv("LISTEN_FDS"); -+ -+ if (!env) -+ return -EINVAL; -+ -+ if (strtoul(env, NULL, 10) != 1) { -+ LOG_ERR("Did not receive exactly one IPC socket from systemd"); -+ return -EINVAL; -+ } -+ -+ return SD_SOCKET_FDS_START; -+} -+ - /****************************************************************************** - * Initialize/Cleanup routines - ******************************************************************************/ -@@ -961,6 +985,10 @@ int iscsid_init() - int rc, addr_len; - struct sockaddr_un addr; - -+ iscsid_opts.fd = ipc_systemd(); -+ if (iscsid_opts.fd >= 0) -+ return 0; -+ - iscsid_opts.fd = socket(AF_LOCAL, SOCK_STREAM, 0); - if (iscsid_opts.fd < 0) { - LOG_ERR(PFX "Can not create IPC socket"); --- -1.8.3.1 - diff --git a/0048-iscsi-tools-Ignore-network-parameter-if-not-enabled-.patch b/0048-iscsi-tools-Ignore-network-parameter-if-not-enabled-.patch new file mode 100644 index 0000000..0512f6d --- /dev/null +++ b/0048-iscsi-tools-Ignore-network-parameter-if-not-enabled-.patch @@ -0,0 +1,44 @@ +From da404f2137daa4e5cf06d69e4d7b6a0bff8c13b5 Mon Sep 17 00:00:00 2001 +From: Harish Zunjarrao +Date: Fri, 18 Oct 2013 09:29:23 -0400 +Subject: [PATCH] iscsi tools: Ignore network parameter if not enabled/disabled + +If iface does not contain network parameter or incorrect value is set, +do not send that network parameter value to driver. + +Signed-off-by: Harish Zunjarrao +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + usr/iface.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/usr/iface.c b/usr/iface.c +index 6454f75..55b0dd4 100644 +--- a/usr/iface.c ++++ b/usr/iface.c +@@ -1346,11 +1346,18 @@ static int iface_fill_param_state(struct iovec *iov, uint32_t iface_num, + net_param->param = param; + net_param->iface_type = iface_type; + net_param->param_type = param_type; +- if (strcmp(param_val, "disable")) +- net_param->value[0] = ISCSI_NET_PARAM_ENABLE; +- else /* Assume disabled */ ++ if (!strcmp(param_val, "disable")) + net_param->value[0] = ISCSI_NET_PARAM_DISABLE; ++ else if (!strcmp(param_val, "enable")) ++ net_param->value[0] = ISCSI_NET_PARAM_ENABLE; ++ else ++ goto free; + return 0; ++free: ++ free(iov->iov_base); ++ iov->iov_base = NULL; ++ iov->iov_len = 0; ++ return 1; + } + + #define IFACE_SET_PARAM_STATE(iov, inum, itype, param, ptype, ival, \ +-- +1.8.3.1 + diff --git a/0048-iscsiadm-param-parsing-for-advanced-node-creation.patch b/0048-iscsiadm-param-parsing-for-advanced-node-creation.patch deleted file mode 100644 index a39833b..0000000 --- a/0048-iscsiadm-param-parsing-for-advanced-node-creation.patch +++ /dev/null @@ -1,337 +0,0 @@ -From b58f3b48a36821d10a3377acfcbf18113fba0c9d Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Tue, 18 Dec 2012 11:27:00 -0800 -Subject: [PATCH 48/48] iscsiadm: --param parsing for advanced node creation - -Share parse_param and apply_param code from iscsistart, allow using multiple ---param options to set arbitrary fields in node mode. - -Signed-off-by: Chris Leech ---- - usr/Makefile | 2 +- - usr/iscsi_param.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - usr/iscsi_param.h | 7 ++++ - usr/iscsiadm.c | 16 ++++++++-- - usr/iscsistart.c | 91 ++-------------------------------------------------- - 5 files changed, 120 insertions(+), 91 deletions(-) - create mode 100644 usr/iscsi_param.c - create mode 100644 usr/iscsi_param.h - -diff --git a/usr/Makefile b/usr/Makefile -index 3d8ee22..a7e80c0 100644 ---- a/usr/Makefile -+++ b/usr/Makefile -@@ -40,7 +40,7 @@ SYSDEPS_SRCS = $(wildcard ../utils/sysdeps/*.o) - ISCSI_LIB_SRCS = iscsi_util.o io.o auth.o iscsi_timer.o login.o log.o md5.o \ - sha1.o iface.o idbm.o sysfs.o host.o session_info.o iscsi_sysfs.o \ - iscsi_net_util.o iscsid_req.o transport.o iser.o cxgbi.o be2iscsi.o \ -- initiator_common.o iscsi_err.o flashnode.o uip_mgmt_ipc.o \ -+ initiator_common.o iscsi_err.o iscsi_param.o flashnode.o uip_mgmt_ipc.o \ - $(IPC_OBJ) $(SYSDEPS_SRCS) - # core initiator files - INITIATOR_SRCS = initiator.o scsi.o actor.o event_poll.o mgmt_ipc.o kern_err_table.o -diff --git a/usr/iscsi_param.c b/usr/iscsi_param.c -new file mode 100644 -index 0000000..c075e8f ---- /dev/null -+++ b/usr/iscsi_param.c -@@ -0,0 +1,95 @@ -+#include -+#include "log.h" -+#include "config.h" -+#include "idbm.h" -+#include "list.h" -+#include "iface.h" -+#include "idbm_fields.h" -+#include "iscsi_err.h" -+ -+int apply_params(struct list_head *user_params, struct node_rec *rec) -+{ -+ struct user_param *param; -+ int rc; -+ -+ /* Must init this so we can check if user overrode them */ -+ rec->session.initial_login_retry_max = -1; -+ rec->conn[0].timeo.noop_out_interval = -1; -+ rec->conn[0].timeo.noop_out_timeout = -1; -+ -+ list_for_each_entry(param, user_params, list) { -+ /* -+ * user may not have passed in all params that were set by -+ * ibft/iscsi_boot, so clear out values that might conflict -+ * with user overrides -+ */ -+ if (!strcmp(param->name, IFACE_NETNAME)) { -+ /* overriding netname so MAC will be for old netdev */ -+ memset(rec->iface.hwaddress, 0, -+ sizeof(rec->iface.hwaddress)); -+ } else if (!strcmp(param->name, IFACE_HWADDR)) { -+ /* overriding MAC so netdev will be for old MAC */ -+ memset(rec->iface.netdev, 0, sizeof(rec->iface.netdev)); -+ } else if (!strcmp(param->name, IFACE_TRANSPORTNAME)) { -+ /* -+ * switching drivers so all old binding info is no -+ * longer valid. Old values were either for offload -+ * and we are switching to software or the reverse, -+ * or switching types of cards (bnx2i to cxgb3i). -+ */ -+ memset(&rec->iface, 0, sizeof(rec->iface)); -+ iface_setup_defaults(&rec->iface); -+ } -+ } -+ -+ rc = idbm_node_set_rec_from_param(user_params, rec, 0); -+ if (rc) -+ return rc; -+ -+ /* -+ * For root boot we could not change this in older versions so -+ * if user did not override then use the defaults. -+ * -+ * Increase to account for boot using static setup. -+ */ -+ if (rec->session.initial_login_retry_max == -1) -+ rec->session.initial_login_retry_max = 30; -+ /* we used to not be able to answer so turn off */ -+ if (rec->conn[0].timeo.noop_out_interval == -1) -+ rec->conn[0].timeo.noop_out_interval = 0; -+ if (rec->conn[0].timeo.noop_out_timeout == -1) -+ rec->conn[0].timeo.noop_out_timeout = 0; -+ -+ return 0; -+} -+ -+int parse_param(struct list_head *user_params, char *param_str) -+{ -+ struct user_param *param; -+ char *name, *value; -+ -+ name = param_str; -+ -+ value = strchr(param_str, '='); -+ if (!value) { -+ log_error("Invalid --param %s. Missing value.", param_str); -+ return ISCSI_ERR_INVAL; -+ } -+ *value = '\0'; -+ -+ value++; -+ if (!strlen(value)) { -+ log_error("Invalid --param %s. Missing value.", param_str); -+ return ISCSI_ERR_INVAL; -+ } -+ -+ param = idbm_alloc_user_param(name, value); -+ if (!param) { -+ log_error("Could not allocate memory for param."); -+ return ISCSI_ERR_NOMEM; -+ } -+ -+ list_add(¶m->list, user_params); -+ return 0; -+} -+ -diff --git a/usr/iscsi_param.h b/usr/iscsi_param.h -new file mode 100644 -index 0000000..8b7956c ---- /dev/null -+++ b/usr/iscsi_param.h -@@ -0,0 +1,7 @@ -+#ifndef ISCSI_PARAM_H -+#define ISCSI_PARAM_H -+ -+extern int parse_param(struct list_head *user_params, char *param_str); -+extern int apply_params(struct list_head *user_params, struct node_rec *rec); -+ -+#endif -diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c -index af6d607..2003d48 100644 ---- a/usr/iscsiadm.c -+++ b/usr/iscsiadm.c -@@ -53,6 +53,7 @@ - #include "iscsi_err.h" - #include "iscsi_ipc.h" - #include "iscsi_timer.h" -+#include "iscsi_param.h" - #include "flashnode.h" - - static char program_name[] = "iscsiadm"; -@@ -118,6 +119,7 @@ static struct option const long_options[] = - {"flashnode_idx", optional_argument, NULL, 'x'}, - {"portal_type", optional_argument, NULL, 'A'}, - {"newroot", required_argument, NULL, 0}, -+ {"param", required_argument, NULL, 0}, - {NULL, 0, NULL, 0}, - }; - static char *short_options = "RlDVhm:a:b:c:C:p:P:T:H:i:I:U:k:L:d:r:n:v:o:sSt:ux:A:"; -@@ -133,7 +135,7 @@ iscsiadm -m discoverydb [ -hV ] [ -d debug_level ] [-P printlevel] [ -t type -p - [ -o operation ] [ -n name ] [ -v value ] [ -lD ] ] \n\ - iscsiadm -m discovery [ -hV ] [ -d debug_level ] [-P printlevel] [ -t type -p ip:port -I ifaceN ... [ -l ] ] | [ [ -p ip:port ] [ -l | -D ] ] \n\ - iscsiadm -m node [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -L all,manual,automatic ] [ -U all,manual,automatic ] [ -S ] [ [ -T targetname -p ip:port -I ifaceN ] [ -l | -u | -R | -s] ] \ --[ [ -o operation ] [ -n name ] [ -v value ] ]\n\ -+[ [ -o operation ] [ -n name ] [ -v value ] ] [ --param=NAME=VALUE ]\n\ - iscsiadm -m session [ -hV ] [ -d debug_level ] [ -P printlevel] [ -r sessionid | sysfsdir [ -R | -u | -s ] [ -o operation ] [ -n name ] [ -v value ] ]\n\ - iscsiadm -m iface [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I ifacename | -H hostno|MAC ] [ [ -o operation ] [ -n name ] [ -v value ] ] [ -C ping [ -a ip ] [ -b packetsize ] [ -c count ] [ -i interval ] ]\n\ - iscsiadm -m fw [ -d debug_level ] [ -l ]\n\ -@@ -2834,9 +2836,11 @@ main(int argc, char **argv) - uint32_t host_no = -1; - struct user_param *param; - struct list_head params; -+ struct list_head user_params; - - INIT_LIST_HEAD(¶ms); - INIT_LIST_HEAD(&ifaces); -+ INIT_LIST_HEAD(&user_params); - /* do not allow ctrl-c for now... */ - memset(&sa_old, 0, sizeof(struct sigaction)); - memset(&sa_new, 0, sizeof(struct sigaction)); -@@ -2859,8 +2863,14 @@ main(int argc, char **argv) - case 0: - if (long_options[longindex].flag != 0) - break; -- if (!strcmp(long_options[longindex].name, "newroot")) -+ if (!strcmp(long_options[longindex].name, "newroot")) { - newroot = optarg; -+ break; -+ } -+ if (!strcmp(long_options[longindex].name, "param")) { -+ parse_param(&user_params, optarg); -+ break; -+ } - break; - case 'k': - killiscsid = atoi(optarg); -@@ -3169,6 +3179,8 @@ main(int argc, char **argv) - goto out; - } - -+ apply_params(&user_params, rec); -+ - rc = exec_node_op(op, do_login, do_logout, do_show, - do_rescan, do_stats, info_level, rec, - ¶ms); -diff --git a/usr/iscsistart.c b/usr/iscsistart.c -index 6924d49..85be35b 100644 ---- a/usr/iscsistart.c -+++ b/usr/iscsistart.c -@@ -50,6 +50,7 @@ - #include "iscsid_req.h" - #include "iscsi_err.h" - #include "iface.h" -+#include "iscsi_param.h" - - /* global config info */ - /* initiator needs initiator name/alias */ -@@ -131,99 +132,13 @@ static int stop_event_loop(void) - return rc; - } - --static int apply_params(struct node_rec *rec) --{ -- struct user_param *param; -- int rc; -- -- /* Must init this so we can check if user overrode them */ -- rec->session.initial_login_retry_max = -1; -- rec->conn[0].timeo.noop_out_interval = -1; -- rec->conn[0].timeo.noop_out_timeout = -1; -- -- list_for_each_entry(param, &user_params, list) { -- /* -- * user may not have passed in all params that were set by -- * ibft/iscsi_boot, so clear out values that might conflict -- * with user overrides -- */ -- if (!strcmp(param->name, IFACE_NETNAME)) { -- /* overriding netname so MAC will be for old netdev */ -- memset(rec->iface.hwaddress, 0, -- sizeof(rec->iface.hwaddress)); -- } else if (!strcmp(param->name, IFACE_HWADDR)) { -- /* overriding MAC so netdev will be for old MAC */ -- memset(rec->iface.netdev, 0, sizeof(rec->iface.netdev)); -- } else if (!strcmp(param->name, IFACE_TRANSPORTNAME)) { -- /* -- * switching drivers so all old binding info is no -- * longer valid. Old values were either for offload -- * and we are switching to software or the reverse, -- * or switching types of cards (bnx2i to cxgb3i). -- */ -- memset(&rec->iface, 0, sizeof(rec->iface)); -- iface_setup_defaults(&rec->iface); -- } -- } -- -- rc = idbm_node_set_rec_from_param(&user_params, rec, 0); -- if (rc) -- return rc; -- -- /* -- * For root boot we could not change this in older versions so -- * if user did not override then use the defaults. -- * -- * Increase to account for boot using static setup. -- */ -- if (rec->session.initial_login_retry_max == -1) -- rec->session.initial_login_retry_max = 30; -- /* we used to not be able to answer so turn off */ -- if (rec->conn[0].timeo.noop_out_interval == -1) -- rec->conn[0].timeo.noop_out_interval = 0; -- if (rec->conn[0].timeo.noop_out_timeout == -1) -- rec->conn[0].timeo.noop_out_timeout = 0; -- -- return 0; --} -- --static int parse_param(char *param_str) --{ -- struct user_param *param; -- char *name, *value; -- -- name = param_str; -- -- value = strchr(param_str, '='); -- if (!value) { -- log_error("Invalid --param %s. Missing value.", param_str); -- return ISCSI_ERR_INVAL; -- } -- *value = '\0'; -- -- value++; -- if (!strlen(value)) { -- log_error("Invalid --param %s. Missing value.", param_str); -- return ISCSI_ERR_INVAL; -- } -- -- param = idbm_alloc_user_param(name, value); -- if (!param) { -- log_error("Could not allocate memory for param."); -- return ISCSI_ERR_NOMEM; -- } -- -- list_add(¶m->list, &user_params); -- return 0; --} -- - static int login_session(struct node_rec *rec) - { - iscsiadm_req_t req; - iscsiadm_rsp_t rsp; - int rc, retries = 0; - -- rc = apply_params(rec); -+ rc = apply_params(&user_params, rec); - if (rc) - return rc; - -@@ -426,7 +341,7 @@ int main(int argc, char *argv[]) - fw_free_targets(&targets); - exit(0); - case 'P': -- err = parse_param(optarg); -+ err = parse_param(&user_params, optarg); - if (err) - exit(err); - break; --- -1.8.1.4 - diff --git a/0049-iscsi-tools-Additional-parameters-for-network-settin.patch b/0049-iscsi-tools-Additional-parameters-for-network-settin.patch new file mode 100644 index 0000000..888d34c --- /dev/null +++ b/0049-iscsi-tools-Additional-parameters-for-network-settin.patch @@ -0,0 +1,1445 @@ +From 66d9f120e26d49329667e4b9f5a84076c4f66a6e Mon Sep 17 00:00:00 2001 +From: Harish Zunjarrao +Date: Fri, 18 Oct 2013 09:29:24 -0400 +Subject: [PATCH] iscsi tools: Additional parameters for network settings + +Signed-off-by: Harish Zunjarrao +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + usr/config.h | 50 +++- + usr/idbm.c | 76 +++++ + usr/idbm_fields.h | 49 ++++ + usr/iface.c | 847 ++++++++++++++++++++++++++++++++++++++++++++++++------ + usr/iscsi_sysfs.c | 200 +++++++++++++ + 5 files changed, 1132 insertions(+), 90 deletions(-) + +diff --git a/usr/config.h b/usr/config.h +index d457bdd..fd31a54 100644 +--- a/usr/config.h ++++ b/usr/config.h +@@ -232,11 +232,59 @@ typedef struct iface_rec { + * 1 = enable */ + uint16_t mtu; + uint16_t port; ++ char delayed_ack[ISCSI_MAX_STR_LEN]; ++ char nagle[ISCSI_MAX_STR_LEN]; ++ char tcp_wsf_state[ISCSI_MAX_STR_LEN]; ++ uint8_t tcp_wsf; ++ uint8_t tcp_timer_scale; ++ char tcp_timestamp[ISCSI_MAX_STR_LEN]; ++ char dhcp_dns[ISCSI_MAX_STR_LEN]; ++ char dhcp_slp_da[ISCSI_MAX_STR_LEN]; ++ char tos_state[ISCSI_MAX_STR_LEN]; ++ uint8_t tos; ++ char gratuitous_arp[ISCSI_MAX_STR_LEN]; ++ char dhcp_alt_client_id_state[ISCSI_MAX_STR_LEN]; ++ char dhcp_alt_client_id[ISCSI_MAX_STR_LEN]; ++ char dhcp_req_vendor_id_state[ISCSI_MAX_STR_LEN]; ++ char dhcp_vendor_id_state[ISCSI_MAX_STR_LEN]; ++ char dhcp_vendor_id[ISCSI_MAX_STR_LEN]; ++ char dhcp_learn_iqn[ISCSI_MAX_STR_LEN]; ++ char fragmentation[ISCSI_MAX_STR_LEN]; ++ char incoming_forwarding[ISCSI_MAX_STR_LEN]; ++ uint8_t ttl; ++ char gratuitous_neighbor_adv[ISCSI_MAX_STR_LEN]; ++ char redirect[ISCSI_MAX_STR_LEN]; ++ char mld[ISCSI_MAX_STR_LEN]; ++ uint32_t flow_label; ++ uint32_t traffic_class; ++ uint8_t hop_limit; ++ uint32_t nd_reachable_tmo; ++ uint32_t nd_rexmit_time; ++ uint32_t nd_stale_tmo; ++ uint8_t dup_addr_detect_cnt; ++ uint32_t router_adv_link_mtu; ++ uint16_t def_task_mgmt_tmo; ++ char header_digest[ISCSI_MAX_STR_LEN]; ++ char data_digest[ISCSI_MAX_STR_LEN]; ++ char immediate_data[ISCSI_MAX_STR_LEN]; ++ char initial_r2t[ISCSI_MAX_STR_LEN]; ++ char data_seq_inorder[ISCSI_MAX_STR_LEN]; ++ char data_pdu_inorder[ISCSI_MAX_STR_LEN]; ++ uint8_t erl; ++ uint32_t max_recv_dlength; ++ uint32_t first_burst_len; ++ uint16_t max_out_r2t; ++ uint32_t max_burst_len; ++ char chap_auth[ISCSI_MAX_STR_LEN]; ++ char bidi_chap[ISCSI_MAX_STR_LEN]; ++ char strict_login_comp[ISCSI_MAX_STR_LEN]; ++ char discovery_auth[ISCSI_MAX_STR_LEN]; ++ char discovery_logout[ISCSI_MAX_STR_LEN]; + char port_state[ISCSI_MAX_STR_LEN]; + char port_speed[ISCSI_MAX_STR_LEN]; + /* + * TODO: we may have to make this bigger and interconnect +- * specific for infinniband ++ * specific for infiniband + */ + char hwaddress[ISCSI_HWADDRESS_BUF_SIZE]; + char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN]; +diff --git a/usr/idbm.c b/usr/idbm.c +index 6b6f57c..4428ebe 100644 +--- a/usr/idbm.c ++++ b/usr/idbm.c +@@ -454,6 +454,82 @@ void idbm_recinfo_iface(iface_rec_t *r, recinfo_t *ri) + __recinfo_int(IFACE_NUM, ri, r, iface_num, IDBM_SHOW, num, 1); + __recinfo_uint16(IFACE_MTU, ri, r, mtu, IDBM_SHOW, num, 1); + __recinfo_uint16(IFACE_PORT, ri, r, port, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_ALT_CID, ri, r, dhcp_alt_client_id_state, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_ALT_CID_STR, ri, r, dhcp_alt_client_id, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_DNS, ri, r, dhcp_dns, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_LEARN_IQN, ri, r, dhcp_learn_iqn, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_DHCP_REQ_VID, ri, r, dhcp_req_vendor_id_state, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_VID, ri, r, dhcp_vendor_id_state, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_DHCP_VID_STR, ri, r, dhcp_vendor_id, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_DHCP_SLP_DA, ri, r, dhcp_slp_da, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_FRAGMENTATION, ri, r, fragmentation, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_GRAT_ARP, ri, r, gratuitous_arp, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_IN_FORWARD, ri, r, incoming_forwarding, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_TOS_STATE, ri, r, tos_state, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_TOS, ri, r, tos, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_TTL, ri, r, ttl, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_DUP_ADDR_DETECT_CNT, ri, r, dup_addr_detect_cnt, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_FLOW_LABEL, ri, r, flow_label, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_GRAT_NEIGHBOR_ADV, ri, r, gratuitous_neighbor_adv, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_HOP_LIMIT, ri, r, hop_limit, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_MLD, ri, r, mld, IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_ND_REACHABLE_TMO, ri, r, nd_reachable_tmo, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_ND_REXMIT_TIME, ri, r, nd_rexmit_time, IDBM_SHOW, ++ num, 1); ++ __recinfo_uint32(IFACE_ND_STALE_TMO, ri, r, nd_stale_tmo, IDBM_SHOW, ++ num, 1); ++ __recinfo_uint32(IFACE_RTR_ADV_LINK_MTU, ri, r, router_adv_link_mtu, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_TRAFFIC_CLASS, ri, r, traffic_class, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_DELAYED_ACK, ri, r, delayed_ack, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_TCP_NAGLE, ri, r, nagle, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_TCP_WSF_STATE, ri, r, tcp_wsf_state, IDBM_SHOW, ++ num, 1); ++ __recinfo_uint8(IFACE_TCP_WSF, ri, r, tcp_wsf, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_TCP_TIMER_SCALE, ri, r, tcp_timer_scale, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_TCP_TIMESTAMP, ri, r, tcp_timestamp, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_REDIRECT, ri, r, redirect, IDBM_SHOW, num, 1); ++ __recinfo_uint16(IFACE_DEF_TMF_TMO, ri, r, def_task_mgmt_tmo, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_HDRDGST, ri, r, header_digest, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DATADGST, ri, r, data_digest, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_IMM_DATA, ri, r, immediate_data, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_INITIAL_R2T, ri, r, initial_r2t, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DSEQ_INORDER, ri, r, data_seq_inorder, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_DPDU_INORDER, ri, r, data_pdu_inorder, IDBM_SHOW, ++ num, 1); ++ __recinfo_uint8(IFACE_ERL, ri, r, erl, IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_MAX_RECV_DLEN, ri, r, max_recv_dlength, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_FIRST_BURST, ri, r, first_burst_len, IDBM_SHOW, ++ num, 1); ++ __recinfo_uint16(IFACE_MAX_R2T, ri, r, max_out_r2t, IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_MAX_BURST, ri, r, max_burst_len, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_CHAP_AUTH, ri, r, chap_auth, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_BIDI_CHAP, ri, r, bidi_chap, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_STRICT_LOGIN_COMP, ri, r, strict_login_comp, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DISCOVERY_AUTH, ri, r, discovery_auth, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_DISCOVERY_LOGOUT, ri, r, discovery_logout, ++ IDBM_SHOW, num, 1); + } + + void idbm_recinfo_host_chap(struct iscsi_chap_rec *r, recinfo_t *ri) +diff --git a/usr/idbm_fields.h b/usr/idbm_fields.h +index 179dda8..5790a03 100644 +--- a/usr/idbm_fields.h ++++ b/usr/idbm_fields.h +@@ -89,6 +89,55 @@ + #define IFACE_NUM "iface.iface_num" + #define IFACE_MTU "iface.mtu" + #define IFACE_PORT "iface.port" ++#define IFACE_DELAYED_ACK "iface.delayed_ack" ++#define IFACE_TCP_NAGLE "iface.tcp_nagle" ++#define IFACE_TCP_WSF_STATE "iface.tcp_wsf_state" ++#define IFACE_TCP_WSF "iface.tcp_wsf" ++#define IFACE_TCP_TIMER_SCALE "iface.tcp_timer_scale" ++#define IFACE_TCP_TIMESTAMP "iface.tcp_timestamp" ++#define IFACE_DHCP_DNS "iface.dhcp_dns" ++#define IFACE_DHCP_SLP_DA "iface.dhcp_slp_da" ++#define IFACE_TOS_STATE "iface.tos_state" ++#define IFACE_TOS "iface.tos" ++#define IFACE_GRAT_ARP "iface.gratuitous_arp" ++#define IFACE_DHCP_ALT_CID "iface.dhcp_alt_client_id_state" ++#define IFACE_DHCP_ALT_CID_STR "iface.dhcp_alt_client_id" ++#define IFACE_DHCP_REQ_VID "iface.dhcp_req_vendor_id_state" ++#define IFACE_DHCP_VID "iface.dhcp_vendor_id_state" ++#define IFACE_DHCP_VID_STR "iface.dhcp_vendor_id" ++#define IFACE_DHCP_LEARN_IQN "iface.dhcp_learn_iqn" ++#define IFACE_FRAGMENTATION "iface.fragmentation" ++#define IFACE_IN_FORWARD "iface.incoming_forwarding" ++#define IFACE_TTL "iface.ttl" ++#define IFACE_GRAT_NEIGHBOR_ADV "iface.gratuitous_neighbor_adv" ++#define IFACE_REDIRECT "iface.redirect" ++#define IFACE_IGNORE_ICMP_ECHO_REQ "iface.ignore_icmp_echo_request" ++#define IFACE_MLD "iface.mld" ++#define IFACE_FLOW_LABEL "iface.flow_label" ++#define IFACE_TRAFFIC_CLASS "iface.traffic_class" ++#define IFACE_HOP_LIMIT "iface.hop_limit" ++#define IFACE_ND_REACHABLE_TMO "iface.nd_reachable_tmo" ++#define IFACE_ND_REXMIT_TIME "iface.nd_rexmit_time" ++#define IFACE_ND_STALE_TMO "iface.nd_stale_tmo" ++#define IFACE_DUP_ADDR_DETECT_CNT "iface.dup_addr_detect_cnt" ++#define IFACE_RTR_ADV_LINK_MTU "iface.router_adv_link_mtu" ++#define IFACE_DEF_TMF_TMO "iface.def_task_mgmt_timeout" ++#define IFACE_HDRDGST "iface.header_digest" ++#define IFACE_DATADGST "iface.data_digest" ++#define IFACE_IMM_DATA "iface.immediate_data" ++#define IFACE_INITIAL_R2T "iface.initial_r2t" ++#define IFACE_DSEQ_INORDER "iface.data_seq_inorder" ++#define IFACE_DPDU_INORDER "iface.data_pdu_inorder" ++#define IFACE_ERL "iface.erl" ++#define IFACE_MAX_RECV_DLEN "iface.max_receive_data_len" ++#define IFACE_FIRST_BURST "iface.first_burst_len" ++#define IFACE_MAX_R2T "iface.max_outstanding_r2t" ++#define IFACE_MAX_BURST "iface.max_burst_len" ++#define IFACE_CHAP_AUTH "iface.chap_auth" ++#define IFACE_BIDI_CHAP "iface.bidi_chap" ++#define IFACE_STRICT_LOGIN_COMP "iface.strict_login_compliance" ++#define IFACE_DISCOVERY_AUTH "iface.discovery_auth" ++#define IFACE_DISCOVERY_LOGOUT "iface.discovery_logout" + + /* discovery fields */ + #define DISC_STARTUP "discovery.startup" +diff --git a/usr/iface.c b/usr/iface.c +index 55b0dd4..87ac875 100644 +--- a/usr/iface.c ++++ b/usr/iface.c +@@ -601,6 +601,105 @@ void iface_copy(struct iface_rec *dst, struct iface_rec *src) + dst->mtu = src->mtu; + if (src->port) + dst->port = src->port; ++ if (strlen(src->delayed_ack)) ++ strcpy(dst->delayed_ack, src->delayed_ack); ++ if (strlen(src->nagle)) ++ strcpy(dst->nagle, src->nagle); ++ if (strlen(src->tcp_wsf_state)) ++ strcpy(dst->tcp_wsf_state, src->tcp_wsf_state); ++ if (src->tcp_wsf) ++ dst->tcp_wsf = src->tcp_wsf; ++ if (src->tcp_timer_scale) ++ dst->tcp_timer_scale = src->tcp_timer_scale; ++ if (strlen(src->tcp_timestamp)) ++ strcpy(dst->tcp_timestamp, src->tcp_timestamp); ++ if (strlen(src->dhcp_dns)) ++ strcpy(dst->dhcp_dns, src->dhcp_dns); ++ if (strlen(src->dhcp_slp_da)) ++ strcpy(dst->dhcp_slp_da, src->dhcp_slp_da); ++ if (strlen(src->tos_state)) ++ strcpy(dst->tos_state, src->tos_state); ++ if (src->tos) ++ dst->tos = src->tos; ++ if (strlen(src->gratuitous_arp)) ++ strcpy(dst->gratuitous_arp, src->gratuitous_arp); ++ if (strlen(src->dhcp_alt_client_id_state)) ++ strcpy(dst->dhcp_alt_client_id_state, ++ src->dhcp_alt_client_id_state); ++ if (strlen(src->dhcp_alt_client_id)) ++ strcpy(dst->dhcp_alt_client_id, src->dhcp_alt_client_id); ++ if (strlen(src->dhcp_req_vendor_id_state)) ++ strcpy(dst->dhcp_req_vendor_id_state, ++ src->dhcp_req_vendor_id_state); ++ if (strlen(src->dhcp_vendor_id_state)) ++ strcpy(dst->dhcp_vendor_id_state, src->dhcp_vendor_id_state); ++ if (strlen(src->dhcp_vendor_id)) ++ strcpy(dst->dhcp_vendor_id, src->dhcp_vendor_id); ++ if (strlen(src->dhcp_learn_iqn)) ++ strcpy(dst->dhcp_learn_iqn, src->dhcp_learn_iqn); ++ if (strlen(src->fragmentation)) ++ strcpy(dst->fragmentation, src->fragmentation); ++ if (strlen(src->incoming_forwarding)) ++ strcpy(dst->incoming_forwarding, src->incoming_forwarding); ++ if (src->ttl) ++ dst->ttl = src->ttl; ++ if (strlen(src->gratuitous_neighbor_adv)) ++ strcpy(dst->gratuitous_neighbor_adv, ++ src->gratuitous_neighbor_adv); ++ if (strlen(src->redirect)) ++ strcpy(dst->redirect, src->redirect); ++ if (strlen(src->mld)) ++ strcpy(dst->mld, src->mld); ++ if (src->flow_label) ++ dst->flow_label = src->flow_label; ++ if (src->traffic_class) ++ dst->traffic_class = src->traffic_class; ++ if (src->hop_limit) ++ dst->hop_limit = src->hop_limit; ++ if (src->nd_reachable_tmo) ++ dst->nd_reachable_tmo = src->nd_reachable_tmo; ++ if (src->nd_rexmit_time) ++ dst->nd_rexmit_time = src->nd_rexmit_time; ++ if (src->nd_stale_tmo) ++ dst->nd_stale_tmo = src->nd_stale_tmo; ++ if (src->dup_addr_detect_cnt) ++ dst->dup_addr_detect_cnt = src->dup_addr_detect_cnt; ++ if (src->router_adv_link_mtu) ++ dst->router_adv_link_mtu = src->router_adv_link_mtu; ++ if (src->def_task_mgmt_tmo) ++ dst->def_task_mgmt_tmo = src->def_task_mgmt_tmo; ++ if (strlen(src->header_digest)) ++ strcpy(dst->header_digest, src->header_digest); ++ if (strlen(src->data_digest)) ++ strcpy(dst->data_digest, src->data_digest); ++ if (strlen(src->immediate_data)) ++ strcpy(dst->immediate_data, src->immediate_data); ++ if (strlen(src->initial_r2t)) ++ strcpy(dst->initial_r2t, src->initial_r2t); ++ if (strlen(src->data_seq_inorder)) ++ strcpy(dst->data_seq_inorder, src->data_seq_inorder); ++ if (strlen(src->data_pdu_inorder)) ++ strcpy(dst->data_pdu_inorder, src->data_pdu_inorder); ++ if (src->erl) ++ dst->erl = src->erl; ++ if (src->max_recv_dlength) ++ dst->max_recv_dlength = src->max_recv_dlength; ++ if (src->first_burst_len) ++ dst->first_burst_len = src->first_burst_len; ++ if (src->max_out_r2t) ++ dst->max_out_r2t = src->max_out_r2t; ++ if (src->max_burst_len) ++ dst->max_burst_len = src->max_burst_len; ++ if (strlen(src->chap_auth)) ++ strcpy(dst->chap_auth, src->chap_auth); ++ if (strlen(src->bidi_chap)) ++ strcpy(dst->bidi_chap, src->bidi_chap); ++ if (strlen(src->strict_login_comp)) ++ strcpy(dst->strict_login_comp, src->strict_login_comp); ++ if (strlen(src->discovery_auth)) ++ strcpy(dst->discovery_auth, src->discovery_auth); ++ if (strlen(src->discovery_logout)) ++ strcpy(dst->discovery_logout, src->discovery_logout); + if (strlen(src->hwaddress)) + strcpy(dst->hwaddress, src->hwaddress); + if (strlen(src->transport_name)) +@@ -1026,6 +1125,79 @@ struct iface_param_count { + int count; + }; + ++#define IFACE_NET_PARAM_EN_CNT(param_val, cnt) { \ ++ if (!strcmp(param_val, "disable") || \ ++ !strcmp(param_val, "enable")) \ ++ (*cnt)++; \ ++} ++ ++/** ++ * iface_get_common_param_count - Gets common parameters count for given iface ++ * @iface: iface to setup ++ * @count: number of parameters to set ++ */ ++static void iface_get_common_param_count(struct iface_rec *iface, int *count) ++{ ++ if (strcmp(iface->vlan_state, "disable")) { ++ /* vlan_state enabled */ ++ (*count)++; ++ ++ if (iface->vlan_id) ++ /* For vlan value */ ++ (*count)++; ++ } else { ++ /* vlan_state disabled */ ++ (*count)++; ++ } ++ ++ if (iface->mtu) ++ (*count)++; ++ ++ if (iface->port) ++ (*count)++; ++ ++ IFACE_NET_PARAM_EN_CNT(iface->delayed_ack, count); ++ IFACE_NET_PARAM_EN_CNT(iface->nagle, count); ++ IFACE_NET_PARAM_EN_CNT(iface->tcp_wsf_state, count); ++ IFACE_NET_PARAM_EN_CNT(iface->tcp_timestamp, count); ++ IFACE_NET_PARAM_EN_CNT(iface->redirect, count); ++ IFACE_NET_PARAM_EN_CNT(iface->header_digest, count); ++ IFACE_NET_PARAM_EN_CNT(iface->data_digest, count); ++ IFACE_NET_PARAM_EN_CNT(iface->immediate_data, count); ++ IFACE_NET_PARAM_EN_CNT(iface->initial_r2t, count); ++ IFACE_NET_PARAM_EN_CNT(iface->data_seq_inorder, count); ++ IFACE_NET_PARAM_EN_CNT(iface->data_pdu_inorder, count); ++ IFACE_NET_PARAM_EN_CNT(iface->chap_auth, count); ++ IFACE_NET_PARAM_EN_CNT(iface->bidi_chap, count); ++ IFACE_NET_PARAM_EN_CNT(iface->strict_login_comp, count); ++ IFACE_NET_PARAM_EN_CNT(iface->discovery_auth, count); ++ IFACE_NET_PARAM_EN_CNT(iface->discovery_logout, count); ++ ++ if (iface->tcp_wsf) ++ (*count)++; ++ ++ if (iface->tcp_timer_scale) ++ (*count)++; ++ ++ if (iface->def_task_mgmt_tmo) ++ (*count)++; ++ ++ if (iface->erl) ++ (*count)++; ++ ++ if (iface->max_recv_dlength) ++ (*count)++; ++ ++ if (iface->first_burst_len) ++ (*count)++; ++ ++ if (iface->max_burst_len) ++ (*count)++; ++ ++ if (iface->max_out_r2t) ++ (*count)++; ++} ++ + /** + * __iface_get_param_count - Gets netconfig parameter count for given iface + * @data: iface_param_count structure +@@ -1044,10 +1216,10 @@ static int __iface_get_param_count(void *data, struct iface_rec *iface) + if (iptype == ISCSI_IFACE_TYPE_IPV4) { + + if (strcmp(iface->state, "disable")) { +- if (strstr(iface->bootproto, "dhcp")) ++ if (strstr(iface->bootproto, "dhcp")) { + /* DHCP enabled */ + count++; +- else { ++ } else { + /* DHCP disabled */ + count++; + +@@ -1062,12 +1234,13 @@ static int __iface_get_param_count(void *data, struct iface_rec *iface) + if (strstr(iface->gateway, ".")) + /* User configured Gateway */ + count++; +- } else ++ } else { + /* + * IPv4 Address not valid, decrement + * count of DHCP + */ + count--; ++ } + } + + /* +@@ -1078,37 +1251,68 @@ static int __iface_get_param_count(void *data, struct iface_rec *iface) + /* iface state */ + count++; + +- if (strcmp(iface->vlan_state, "disable")) { +- /* vlan_state enabled */ ++ IFACE_NET_PARAM_EN_CNT(iface->dhcp_dns, ++ &count); ++ ++ IFACE_NET_PARAM_EN_CNT(iface->dhcp_slp_da, ++ &count); ++ ++ IFACE_NET_PARAM_EN_CNT(iface->tos_state, ++ &count); ++ ++ IFACE_NET_PARAM_EN_CNT(iface->gratuitous_arp, ++ &count); ++ ++ IFACE_NET_PARAM_EN_CNT( ++ iface->dhcp_alt_client_id_state, ++ &count); ++ ++ if (iface->dhcp_alt_client_id[0]) + count++; + +- if (iface->vlan_id) +- /* For vlan value */ +- count++; +- } else +- /* vlan_state disabled */ ++ IFACE_NET_PARAM_EN_CNT( ++ iface->dhcp_req_vendor_id_state, ++ &count); ++ ++ IFACE_NET_PARAM_EN_CNT( ++ iface->dhcp_vendor_id_state, ++ &count); ++ ++ if (iface->dhcp_vendor_id[0]) + count++; + +- if (iface->mtu) ++ IFACE_NET_PARAM_EN_CNT(iface->dhcp_learn_iqn, ++ &count); ++ ++ IFACE_NET_PARAM_EN_CNT(iface->fragmentation, ++ &count); ++ ++ IFACE_NET_PARAM_EN_CNT( ++ iface->incoming_forwarding, ++ &count); ++ ++ if (iface->tos) + count++; + +- if (iface->port) ++ if (iface->ttl) + count++; ++ ++ iface_get_common_param_count(iface, &count); + } +- } else ++ } else { + /* IPv4 is disabled, iface state */ + count++; +- ++ } + } else if (iptype == ISCSI_IFACE_TYPE_IPV6) { + + if (strcmp(iface->state, "disable")) { + + /* IPv6 Address */ + if (strstr(iface->ipv6_autocfg, "nd") || +- strstr(iface->ipv6_autocfg, "dhcpv6")) ++ strstr(iface->ipv6_autocfg, "dhcpv6")) { + /* Autocfg enabled */ + count++; +- else { ++ } else { + /* Autocfg disabled */ + count++; + +@@ -1169,26 +1373,42 @@ static int __iface_get_param_count(void *data, struct iface_rec *iface) + /* iface state */ + count++; + +- if (strcmp(iface->vlan_state, "disable")) { +- /* vlan_state enabled */ ++ IFACE_NET_PARAM_EN_CNT( ++ iface->gratuitous_neighbor_adv, ++ &count); ++ ++ IFACE_NET_PARAM_EN_CNT(iface->mld, &count); ++ ++ if (iface->flow_label) ++ count++; ++ ++ if (iface->traffic_class) ++ count++; ++ ++ if (iface->hop_limit) + count++; + +- if (iface->vlan_id) +- /* For vlan value */ +- count++; +- } else +- /* vlan_state disabled */ ++ if (iface->nd_reachable_tmo) + count++; + +- if (iface->mtu) ++ if (iface->nd_rexmit_time) + count++; + +- if (iface->port) ++ if (iface->nd_stale_tmo) + count++; ++ ++ if (iface->dup_addr_detect_cnt) ++ count++; ++ ++ if (iface->router_adv_link_mtu) ++ count++; ++ ++ iface_get_common_param_count(iface, &count); + } +- } else ++ } else { + /* IPv6 is disabled, iface state */ + count++; ++ } + } + + iface_params->count += count; +@@ -1578,6 +1798,44 @@ free: + } \ + } + ++/* write string parameter value */ ++static int iface_fill_str_param_val(struct iovec *iov, uint32_t iface_num, ++ uint8_t iface_type, uint16_t param, ++ uint32_t param_len, char *param_val) ++{ ++ int len; ++ struct iscsi_iface_param_info *net_param; ++ struct nlattr *attr; ++ ++ if (!param_val[0]) ++ return 1; ++ ++ len = sizeof(struct iscsi_iface_param_info) + param_len; ++ iov->iov_base = iscsi_nla_alloc(param, len); ++ if (!(iov->iov_base)) ++ return 1; ++ ++ attr = iov->iov_base; ++ iov->iov_len = NLA_ALIGN(attr->nla_len); ++ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr); ++ net_param->iface_num = iface_num; ++ net_param->len = param_len; ++ net_param->param = param; ++ net_param->iface_type = iface_type; ++ net_param->param_type = ISCSI_NET_PARAM; ++ memcpy(net_param->value, param_val, param_len); ++ return 0; ++} ++ ++#define IFACE_SET_NET_PARAM_STRVAL(iov, inum, itype, param, plen, \ ++ ival, gcnt, lcnt) { \ ++ if (!iface_fill_str_param_val(iov, inum, itype, param, plen, \ ++ ival)) { \ ++ (*gcnt)++; \ ++ (*lcnt)++; \ ++ } \ ++} ++ + struct iface_net_config { + struct iface_rec *primary; + struct iovec *iovs; +@@ -1597,8 +1855,12 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface) + /* start at 2, because 0 is for nlmsghdr and 1 for event */ + iov = net_config->iovs + 2; + ++ if (!iface->port) ++ iface->port = 3260; ++ + iptype = iface_get_iptype(iface); +- if (iptype == ISCSI_IFACE_TYPE_IPV4) { ++ switch (iptype) { ++ case ISCSI_IFACE_TYPE_IPV4: + if (!strcmp(iface->state, "disable")) { + IFACE_SET_PARAM_STATE(&iov[net_config->count], + iface->iface_num, +@@ -1652,53 +1914,136 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface) + */ + if (count) { + IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_IPV4_DHCP_DNS_ADDR_EN, ++ ISCSI_NET_PARAM, ++ iface->dhcp_dns, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_IPV4_DHCP_SLP_DA_EN, ++ ISCSI_NET_PARAM, ++ iface->dhcp_slp_da, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_IPV4_TOS_EN, ++ ISCSI_NET_PARAM, ++ iface->tos_state, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], + iface->iface_num, + ISCSI_IFACE_TYPE_IPV4, +- ISCSI_NET_PARAM_IFACE_ENABLE, ++ ISCSI_NET_PARAM_IPV4_TOS, + ISCSI_NET_PARAM, +- iface->state, ++ 1, ++ iface->tos, + &net_config->count, + &count); + + IFACE_SET_PARAM_STATE(&iov[net_config->count], + iface->iface_num, + ISCSI_IFACE_TYPE_IPV4, +- ISCSI_NET_PARAM_VLAN_ENABLED, ++ ISCSI_NET_PARAM_IPV4_GRAT_ARP_EN, + ISCSI_NET_PARAM, +- iface->vlan_state, ++ iface->gratuitous_arp, + &net_config->count, + &count); + +- if (strcmp(iface->vlan_state, "disable") && +- iface->vlan_id) { +- if (!iface_fill_vlan_id(&iov[net_config->count], +- iface, ISCSI_IFACE_TYPE_IPV4)) { +- net_config->count++; +- count++; +- } +- } ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID_EN, ++ ISCSI_NET_PARAM, ++ iface->dhcp_alt_client_id_state, ++ &net_config->count, ++ &count); + +- IFACE_SET_PARAM_INTVAL(&iov[net_config->count], +- iface->iface_num, +- ISCSI_IFACE_TYPE_IPV4, +- ISCSI_NET_PARAM_MTU, +- ISCSI_NET_PARAM, +- 2, +- iface->mtu, +- &net_config->count, +- &count); ++ IFACE_SET_NET_PARAM_STRVAL(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID, ++ strlen(iface->dhcp_alt_client_id), ++ iface->dhcp_alt_client_id, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_IPV4_DHCP_REQ_VENDOR_ID_EN, ++ ISCSI_NET_PARAM, ++ iface->dhcp_req_vendor_id_state, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_IPV4_DHCP_USE_VENDOR_ID_EN, ++ ISCSI_NET_PARAM, ++ iface->dhcp_vendor_id_state, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_NET_PARAM_STRVAL(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_IPV4_DHCP_VENDOR_ID, ++ strlen(iface->dhcp_vendor_id), ++ iface->dhcp_vendor_id, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_IPV4_DHCP_LEARN_IQN_EN, ++ ISCSI_NET_PARAM, ++ iface->dhcp_learn_iqn, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_IPV4_FRAGMENT_DISABLE, ++ ISCSI_NET_PARAM, ++ iface->fragmentation, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV4, ++ ISCSI_NET_PARAM_IPV4_IN_FORWARD_EN, ++ ISCSI_NET_PARAM, ++ iface->incoming_forwarding, ++ &net_config->count, ++ &count); + + IFACE_SET_PARAM_INTVAL(&iov[net_config->count], + iface->iface_num, + ISCSI_IFACE_TYPE_IPV4, +- ISCSI_NET_PARAM_PORT, ++ ISCSI_NET_PARAM_IPV4_TTL, + ISCSI_NET_PARAM, +- 2, +- iface->port, ++ 1, ++ iface->ttl, + &net_config->count, + &count); + } +- } else if (iptype == ISCSI_IFACE_TYPE_IPV6) { ++ break; ++ ++ case ISCSI_IFACE_TYPE_IPV6: + if (!strcmp(iface->state, "disable")) { + IFACE_SET_PARAM_STATE(&iov[net_config->count], + iface->iface_num, +@@ -1786,53 +2131,377 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface) + */ + if (count) { + IFACE_SET_PARAM_STATE(&iov[net_config->count], +- iface->iface_num, +- ISCSI_IFACE_TYPE_IPV6, +- ISCSI_NET_PARAM_IFACE_ENABLE, +- ISCSI_NET_PARAM, +- iface->state, +- &net_config->count, +- &count); ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV6, ++ ISCSI_NET_PARAM_IPV6_GRAT_NEIGHBOR_ADV_EN, ++ ISCSI_NET_PARAM, ++ iface->gratuitous_neighbor_adv, ++ &net_config->count, ++ &count); + + IFACE_SET_PARAM_STATE(&iov[net_config->count], + iface->iface_num, + ISCSI_IFACE_TYPE_IPV6, +- ISCSI_NET_PARAM_VLAN_ENABLED, ++ ISCSI_NET_PARAM_IPV6_MLD_EN, + ISCSI_NET_PARAM, +- iface->vlan_state, ++ iface->mld, + &net_config->count, + &count); + +- if (strcmp(iface->vlan_state, "disable") && +- iface->vlan_id) { +- if (!iface_fill_vlan_id(&iov[net_config->count], +- iface, +- ISCSI_IFACE_TYPE_IPV6)) { +- net_config->count++; +- count++; +- } ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV6, ++ ISCSI_NET_PARAM_IPV6_FLOW_LABEL, ++ ISCSI_NET_PARAM, ++ 4, ++ iface->flow_label, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV6, ++ ISCSI_NET_PARAM_IPV6_TRAFFIC_CLASS, ++ ISCSI_NET_PARAM, ++ 1, ++ iface->traffic_class, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV6, ++ ISCSI_NET_PARAM_IPV6_HOP_LIMIT, ++ ISCSI_NET_PARAM, ++ 1, ++ iface->hop_limit, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV6, ++ ISCSI_NET_PARAM_IPV6_ND_REACHABLE_TMO, ++ ISCSI_NET_PARAM, ++ 4, ++ iface->nd_reachable_tmo, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV6, ++ ISCSI_NET_PARAM_IPV6_ND_REXMIT_TIME, ++ ISCSI_NET_PARAM, ++ 4, ++ iface->nd_rexmit_time, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV6, ++ ISCSI_NET_PARAM_IPV6_ND_STALE_TMO, ++ ISCSI_NET_PARAM, ++ 4, ++ iface->nd_stale_tmo, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV6, ++ ISCSI_NET_PARAM_IPV6_DUP_ADDR_DETECT_CNT, ++ ISCSI_NET_PARAM, ++ 1, ++ iface->dup_addr_detect_cnt, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ ISCSI_IFACE_TYPE_IPV6, ++ ISCSI_NET_PARAM_IPV6_RTR_ADV_LINK_MTU, ++ ISCSI_NET_PARAM, ++ 4, ++ iface->router_adv_link_mtu, ++ &net_config->count, ++ &count); ++ } ++ break; ++ } ++ ++ /* Fill parameters common to IPv4 and IPv6 ifaces */ ++ if (count) { ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_NET_PARAM_IFACE_ENABLE, ++ ISCSI_NET_PARAM, ++ iface->state, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_NET_PARAM_VLAN_ENABLED, ++ ISCSI_NET_PARAM, ++ iface->vlan_state, ++ &net_config->count, ++ &count); ++ ++ if (strcmp(iface->vlan_state, "disable") && iface->vlan_id) { ++ if (!iface_fill_vlan_id(&iov[net_config->count], iface, ++ iptype)) { ++ net_config->count++; ++ count++; + } +- +- IFACE_SET_PARAM_INTVAL(&iov[net_config->count], +- iface->iface_num, +- ISCSI_IFACE_TYPE_IPV6, +- ISCSI_NET_PARAM_MTU, +- ISCSI_NET_PARAM, +- 2, +- iface->mtu, +- &net_config->count, +- &count); +- +- IFACE_SET_PARAM_INTVAL(&iov[net_config->count], +- iface->iface_num, +- ISCSI_IFACE_TYPE_IPV6, +- ISCSI_NET_PARAM_PORT, +- ISCSI_NET_PARAM, +- 2, +- iface->port, +- &net_config->count, +- &count); + } ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_NET_PARAM_MTU, ++ ISCSI_NET_PARAM, ++ 2, ++ iface->mtu, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_NET_PARAM_PORT, ++ ISCSI_NET_PARAM, ++ 2, ++ iface->port, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_NET_PARAM_DELAYED_ACK_EN, ++ ISCSI_NET_PARAM, ++ iface->delayed_ack, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_NET_PARAM_TCP_NAGLE_DISABLE, ++ ISCSI_NET_PARAM, ++ iface->nagle, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_NET_PARAM_TCP_WSF_DISABLE, ++ ISCSI_NET_PARAM, ++ iface->tcp_wsf_state, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_NET_PARAM_TCP_WSF, ++ ISCSI_NET_PARAM, ++ 1, ++ iface->tcp_wsf, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_NET_PARAM_TCP_TIMER_SCALE, ++ ISCSI_NET_PARAM, ++ 1, ++ iface->tcp_timer_scale, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_NET_PARAM_TCP_TIMESTAMP_EN, ++ ISCSI_NET_PARAM, ++ iface->tcp_timestamp, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_NET_PARAM_REDIRECT_EN, ++ ISCSI_NET_PARAM, ++ iface->redirect, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_DEF_TASKMGMT_TMO, ++ ISCSI_IFACE_PARAM, ++ 2, ++ iface->def_task_mgmt_tmo, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_HDRDGST_EN, ++ ISCSI_IFACE_PARAM, ++ iface->header_digest, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_DATADGST_EN, ++ ISCSI_IFACE_PARAM, ++ iface->data_digest, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_IMM_DATA_EN, ++ ISCSI_IFACE_PARAM, ++ iface->immediate_data, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_INITIAL_R2T_EN, ++ ISCSI_IFACE_PARAM, ++ iface->initial_r2t, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_DATASEQ_INORDER_EN, ++ ISCSI_IFACE_PARAM, ++ iface->data_seq_inorder, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_PDU_INORDER_EN, ++ ISCSI_IFACE_PARAM, ++ iface->data_pdu_inorder, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_ERL, ++ ISCSI_IFACE_PARAM, ++ 1, ++ iface->erl, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_MAX_RECV_DLENGTH, ++ ISCSI_IFACE_PARAM, ++ 4, ++ iface->max_recv_dlength, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_FIRST_BURST, ++ ISCSI_IFACE_PARAM, ++ 4, ++ iface->first_burst_len, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_MAX_R2T, ++ ISCSI_IFACE_PARAM, ++ 2, ++ iface->max_out_r2t, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_INTVAL(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_MAX_BURST, ++ ISCSI_IFACE_PARAM, ++ 4, ++ iface->max_burst_len, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_CHAP_AUTH_EN, ++ ISCSI_IFACE_PARAM, ++ iface->chap_auth, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_BIDI_CHAP_EN, ++ ISCSI_IFACE_PARAM, ++ iface->bidi_chap, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_STRICT_LOGIN_COMP_EN, ++ ISCSI_IFACE_PARAM, ++ iface->strict_login_comp, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_DISCOVERY_AUTH_OPTIONAL, ++ ISCSI_IFACE_PARAM, ++ iface->discovery_auth, ++ &net_config->count, ++ &count); ++ ++ IFACE_SET_PARAM_STATE(&iov[net_config->count], ++ iface->iface_num, ++ iptype, ++ ISCSI_IFACE_PARAM_DISCOVERY_LOGOUT_EN, ++ ISCSI_IFACE_PARAM, ++ iface->discovery_logout, ++ &net_config->count, ++ &count); + } + return 0; + } +diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c +index 04c3673..c916ed8 100644 +--- a/usr/iscsi_sysfs.c ++++ b/usr/iscsi_sysfs.c +@@ -856,6 +856,71 @@ static int iscsi_sysfs_read_iface(struct iface_rec *iface, int host_no, + + sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "subnet", + iface->subnet_mask, sizeof(iface->subnet_mask)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "dhcp_alt_client_id_en", ++ iface->dhcp_alt_client_id_state, ++ sizeof(iface->dhcp_alt_client_id_state)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "dhcp_alt_client_id", ++ iface->dhcp_alt_client_id, ++ sizeof(iface->dhcp_alt_client_id)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "dhcp_dns_address_en", ++ iface->dhcp_dns, sizeof(iface->dhcp_dns)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "dhcp_learn_iqn_en", ++ iface->dhcp_learn_iqn, ++ sizeof(iface->dhcp_learn_iqn)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "dhcp_req_vendor_id_en", ++ iface->dhcp_req_vendor_id_state, ++ sizeof(iface->dhcp_req_vendor_id_state)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "dhcp_use_vendor_id_en", ++ iface->dhcp_vendor_id_state, ++ sizeof(iface->dhcp_vendor_id_state)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "dhcp_vendor_id", ++ iface->dhcp_vendor_id, ++ sizeof(iface->dhcp_vendor_id)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "dhcp_slp_da_info_en", ++ iface->dhcp_slp_da, sizeof(iface->dhcp_slp_da)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "fragment_disable", ++ iface->fragmentation, ++ sizeof(iface->fragmentation)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "grat_arp_en", ++ iface->gratuitous_arp, ++ sizeof(iface->gratuitous_arp)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "incoming_forwarding_en", ++ iface->incoming_forwarding, ++ sizeof(iface->incoming_forwarding)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "tos_en", ++ iface->tos_state, sizeof(iface->tos_state)); ++ ++ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "tos", &iface->tos)) ++ iface->tos = 0; ++ ++ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "ttl", &iface->ttl)) ++ iface->ttl = 0; + } else { + sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, + "ipaddr_autocfg", +@@ -872,6 +937,53 @@ static int iscsi_sysfs_read_iface(struct iface_rec *iface, int host_no, + sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "router_addr", + iface->ipv6_router, + sizeof(iface->ipv6_router)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "router_state", ++ iface->router_autocfg, ++ sizeof(iface->router_autocfg)); ++ ++ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "dup_addr_detect_cnt", ++ &iface->dup_addr_detect_cnt)) ++ iface->dup_addr_detect_cnt = 0; ++ ++ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "flow_label", &iface->flow_label)) ++ iface->flow_label = 0; ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "grat_neighbor_adv_en", ++ iface->gratuitous_neighbor_adv, ++ sizeof(iface->gratuitous_neighbor_adv)); ++ ++ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "hop_limit", &iface->hop_limit)) ++ iface->hop_limit = 0; ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "mld_en", ++ iface->mld, sizeof(iface->mld)); ++ ++ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "nd_reachable_tmo", ++ &iface->nd_reachable_tmo)) ++ iface->nd_reachable_tmo = 0; ++ ++ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "nd_rexmit_time", &iface->nd_rexmit_time)) ++ iface->nd_rexmit_time = 0; ++ ++ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "nd_stale_tmo", &iface->nd_stale_tmo)) ++ iface->nd_stale_tmo = 0; ++ ++ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "router_adv_link_mtu", ++ &iface->router_adv_link_mtu)) ++ iface->router_adv_link_mtu = 0; ++ ++ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "traffic_class", &iface->traffic_class)) ++ iface->traffic_class = 0; + } + + if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "port", +@@ -888,6 +1000,94 @@ static int iscsi_sysfs_read_iface(struct iface_rec *iface, int host_no, + &iface->vlan_priority)) + iface->vlan_priority = UINT8_MAX; + ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan_enabled", ++ iface->vlan_state, sizeof(iface->vlan_state)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "enabled", ++ iface->state, sizeof(iface->state)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "delayed_ack_en", ++ iface->delayed_ack, sizeof(iface->delayed_ack)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "tcp_nagle_disable", ++ iface->nagle, sizeof(iface->nagle)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "tcp_wsf_disable", ++ iface->tcp_wsf_state, sizeof(iface->tcp_wsf_state)); ++ ++ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, "tcp_wsf", ++ &iface->tcp_wsf)) ++ iface->tcp_wsf = 0; ++ ++ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "tcp_timer_scale", &iface->tcp_timer_scale)) ++ iface->tcp_timer_scale = 0; ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "tcp_timestamp_en", ++ iface->tcp_timestamp, sizeof(iface->tcp_timestamp)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "redirect_en", ++ iface->redirect, sizeof(iface->redirect)); ++ ++ if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "def_taskmgmt_tmo", &iface->def_task_mgmt_tmo)) ++ iface->def_task_mgmt_tmo = 0; ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "header_digest", ++ iface->header_digest, sizeof(iface->header_digest)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "data_digest", ++ iface->data_digest, sizeof(iface->data_digest)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "immediate_data", ++ iface->immediate_data, sizeof(iface->immediate_data)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "initial_r2t", ++ iface->initial_r2t, sizeof(iface->initial_r2t)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "data_seq_in_order", ++ iface->data_seq_inorder, sizeof(iface->data_seq_inorder)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "data_pdu_in_order", ++ iface->data_pdu_inorder, sizeof(iface->data_pdu_inorder)); ++ ++ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, "erl", ++ &iface->erl)) ++ iface->erl = 0; ++ ++ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "max_recv_dlength", &iface->max_recv_dlength)) ++ iface->max_recv_dlength = 0; ++ ++ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "first_burst_len", &iface->first_burst_len)) ++ iface->first_burst_len = 0; ++ ++ if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "max_outstanding_r2t", &iface->max_out_r2t)) ++ iface->max_out_r2t = 0; ++ ++ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "max_burst_len", &iface->max_burst_len)) ++ iface->max_burst_len = 0; ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "chap_auth", ++ iface->chap_auth, sizeof(iface->chap_auth)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "bidi_chap", ++ iface->bidi_chap, sizeof(iface->bidi_chap)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "strict_login_comp_en", ++ iface->strict_login_comp, ++ sizeof(iface->strict_login_comp)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, ++ "discovery_auth_optional", ++ iface->discovery_auth, sizeof(iface->discovery_auth)); ++ ++ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "discovery_logout", ++ iface->discovery_logout, sizeof(iface->discovery_logout)); ++ + if (sscanf(iface_kern_id, "ipv%d-iface-%u-%u", &iface_type, + &tmp_host_no, &iface_num) == 3) + iface->iface_num = iface_num; +-- +1.8.3.1 + diff --git a/0049-update-systemd-service-files-add-iscsi.service-for-s.patch b/0049-update-systemd-service-files-add-iscsi.service-for-s.patch deleted file mode 100644 index 966bb9f..0000000 --- a/0049-update-systemd-service-files-add-iscsi.service-for-s.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 1c3b1d23e0b3f17399ffd4463cafad813b0444d5 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Wed, 19 Dec 2012 15:07:36 -0800 -Subject: update systemd service files, add iscsi.service for starting - sessions on boot - -Signed-off-by: Chris Leech ---- - etc/systemd/iscsi.service | 19 +++++++++++++++++++ - etc/systemd/iscsi_mark_root_nodes | 14 ++++++++++++++ - etc/systemd/iscsid.service | 7 +++++-- - etc/systemd/iscsid.socket | 2 +- - 4 files changed, 39 insertions(+), 3 deletions(-) - create mode 100644 etc/systemd/iscsi.service - create mode 100755 etc/systemd/iscsi_mark_root_nodes - -diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service -new file mode 100644 -index 0000000..bbd52fd ---- /dev/null -+++ b/etc/systemd/iscsi.service -@@ -0,0 +1,19 @@ -+[Unit] -+Description=Login and scanning of iSCSI devices -+Documentation=man:iscsid(8) man:iscsiadm(8) -+DefaultDependencies=no -+Conflicts=shutdown.target -+After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service -+Before=remote-fs-pre.target -+ConditionPathExists=/etc/iscsi/initiatorname.iscsi -+ -+[Service] -+Type=oneshot -+RemainAfterExit=true -+ExecStart=/usr/libexec/iscsi_mark_root_nodes -+ExecStart=/sbin/iscsiadm -m node --loginall=automatic -+ExecStop=/bin/sync -+ExecStop=/sbin/iscsiadm -m node --logoutall=automatic -+ -+[Install] -+WantedBy=sysinit.target -diff --git a/etc/systemd/iscsi_mark_root_nodes b/etc/systemd/iscsi_mark_root_nodes -new file mode 100755 -index 0000000..c68475c ---- /dev/null -+++ b/etc/systemd/iscsi_mark_root_nodes -@@ -0,0 +1,14 @@ -+#!/bin/bash -+ -+ISCSIADM=/sbin/iscsiadm -+SESSION_FILE=/run/initramfs/iscsi.sessions -+ -+if [ ! -f $SESSION_FILE ] ; then -+ exit 0 -+fi -+ -+while read t num i target; do -+ ip=${i%:*} -+ $ISCSIADM -m node -p $ip -T $target -o update -n node.startup -v onboot -+done < $SESSION_FILE -+ -diff --git a/etc/systemd/iscsid.service b/etc/systemd/iscsid.service -index 028e0b3..653dd08 100644 ---- a/etc/systemd/iscsid.service -+++ b/etc/systemd/iscsid.service -@@ -1,7 +1,10 @@ - [Unit] - Description=Open-iSCSI --Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8) --After=network.target NetworkManager-wait-online.service iscsiuio.service tgtd.service targetcli.service -+Documentation=man:iscsid(8) man:iscsiadm(8) -+DefaultDependencies=no -+Conflicts=shutdown.target -+After=network.target iscsiuio.service -+Before=remote-fs-pre.target - - [Service] - Type=forking -diff --git a/etc/systemd/iscsid.socket b/etc/systemd/iscsid.socket -index 832451d..58a8d12 100644 ---- a/etc/systemd/iscsid.socket -+++ b/etc/systemd/iscsid.socket -@@ -1,6 +1,6 @@ - [Unit] - Description=Open-iSCSI iscsid Socket --Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8) -+Documentation=man:iscsid(8) man:iscsiadm(8) - - [Socket] - ListenStream=@ISCSIADM_ABSTRACT_NAMESPACE --- -1.7.11.7 - diff --git a/0050-iscsi-boot-related-service-file-updates.patch b/0050-iscsi-boot-related-service-file-updates.patch deleted file mode 100644 index 19450ee..0000000 --- a/0050-iscsi-boot-related-service-file-updates.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 8f79529354b4023c371e00091f11bdd523497639 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Mon, 19 Aug 2013 07:18:25 -0700 -Subject: iscsi boot related service file updates - -make sure iscsid gets started if there are any boot sessions running -add reload target to fix double session problem when restarting from NM -don't rely on session list passed from initrd, never got fully implemented ---- - etc/systemd/iscsi-mark-root-nodes | 13 +++++++++++++ - etc/systemd/iscsi.service | 3 ++- - etc/systemd/iscsi_mark_root_nodes | 14 -------------- - 3 files changed, 15 insertions(+), 15 deletions(-) - create mode 100644 etc/systemd/iscsi-mark-root-nodes - delete mode 100644 etc/systemd/iscsi_mark_root_nodes - -diff --git a/etc/systemd/iscsi-mark-root-nodes b/etc/systemd/iscsi-mark-root-nodes -new file mode 100644 -index 0000000..157be62 ---- /dev/null -+++ b/etc/systemd/iscsi-mark-root-nodes -@@ -0,0 +1,13 @@ -+#!/bin/bash -+ -+ISCSIADM=/sbin/iscsiadm -+ -+$ISCSIADM -m session >/dev/null 2>&1 || exit 0 -+ -+$ISCSIADM -m session | while read t num i target; do -+ ip=${i%:*} -+ $ISCSIADM -m node -p $ip -T $target -o update -n node.startup -v onboot -+done -+ -+systemctl start iscsid.service -+ -diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service -index 7b4efee..d5712bd 100644 ---- a/etc/systemd/iscsi.service -+++ b/etc/systemd/iscsi.service -@@ -10,10 +10,11 @@ ConditionDirectoryNotEmpty=/var/lib/iscsi/nodes - [Service] - Type=oneshot - RemainAfterExit=true --ExecStart=/usr/libexec/iscsi_mark_root_nodes -+ExecStart=/usr/libexec/iscsi-mark-root-nodes - ExecStart=/sbin/iscsiadm -m node --loginall=automatic - ExecStop=/bin/sync - ExecStop=/sbin/iscsiadm -m node --logoutall=automatic -+ExecReload=/sbin/iscsiadm -m node --loginall=automatic - - [Install] - WantedBy=sysinit.target -diff --git a/etc/systemd/iscsi_mark_root_nodes b/etc/systemd/iscsi_mark_root_nodes -deleted file mode 100644 -index c68475c..0000000 ---- a/etc/systemd/iscsi_mark_root_nodes -+++ /dev/null -@@ -1,14 +0,0 @@ --#!/bin/bash -- --ISCSIADM=/sbin/iscsiadm --SESSION_FILE=/run/initramfs/iscsi.sessions -- --if [ ! -f $SESSION_FILE ] ; then -- exit 0 --fi -- --while read t num i target; do -- ip=${i%:*} -- $ISCSIADM -m node -p $ip -T $target -o update -n node.startup -v onboot --done < $SESSION_FILE -- --- -1.8.1.4 - diff --git a/0050-iscsi-tools-iface-params-should-be-updated-for-node_.patch b/0050-iscsi-tools-iface-params-should-be-updated-for-node_.patch new file mode 100644 index 0000000..28e212f --- /dev/null +++ b/0050-iscsi-tools-iface-params-should-be-updated-for-node_.patch @@ -0,0 +1,119 @@ +From 9260457c1df5f519a63744114cbdf7e50cd75ed7 Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Fri, 18 Oct 2013 09:29:25 -0400 +Subject: [PATCH] iscsi tools: iface params should be updated for node_rec as + well. + +While updating iface params, the changes should get applied to the +node records as well. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + usr/idbm.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 90 insertions(+) + +diff --git a/usr/idbm.c b/usr/idbm.c +index 4428ebe..c6460ad 100644 +--- a/usr/idbm.c ++++ b/usr/idbm.c +@@ -292,6 +292,96 @@ idbm_recinfo_node(node_rec_t *r, recinfo_t *ri) + __recinfo_uint16(IFACE_MTU, ri, r, iface.mtu, IDBM_SHOW, num, 1); + __recinfo_uint16(IFACE_PORT, ri, r, iface.port, IDBM_SHOW, num, 1); + ++ __recinfo_str(IFACE_DHCP_ALT_CID, ri, r, iface.dhcp_alt_client_id_state, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_ALT_CID_STR, ri, r, iface.dhcp_alt_client_id, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_DNS, ri, r, iface.dhcp_dns, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_LEARN_IQN, ri, r, iface.dhcp_learn_iqn, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_REQ_VID, ri, r, iface.dhcp_req_vendor_id_state, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_VID, ri, r, iface.dhcp_vendor_id_state, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_VID_STR, ri, r, iface.dhcp_vendor_id, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_SLP_DA, ri, r, iface.dhcp_slp_da, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_FRAGMENTATION, ri, r, iface.fragmentation, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_GRAT_ARP, ri, r, iface.gratuitous_arp, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_IN_FORWARD, ri, r, iface.incoming_forwarding, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_TOS_STATE, ri, r, iface.tos_state, IDBM_SHOW, num, ++ 1); ++ __recinfo_uint8(IFACE_TOS, ri, r, iface.tos, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_TTL, ri, r, iface.ttl, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_DUP_ADDR_DETECT_CNT, ri, r, ++ iface.dup_addr_detect_cnt, IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_FLOW_LABEL, ri, r, iface.flow_label, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_GRAT_NEIGHBOR_ADV, ri, r, ++ iface.gratuitous_neighbor_adv, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_HOP_LIMIT, ri, r, iface.hop_limit, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_MLD, ri, r, iface.mld, IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_ND_REACHABLE_TMO, ri, r, iface.nd_reachable_tmo, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_ND_REXMIT_TIME, ri, r, iface.nd_rexmit_time, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_ND_STALE_TMO, ri, r, iface.nd_stale_tmo, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_RTR_ADV_LINK_MTU, ri, r, ++ iface.router_adv_link_mtu, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_TRAFFIC_CLASS, ri, r, iface.traffic_class, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DELAYED_ACK, ri, r, iface.delayed_ack, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_TCP_NAGLE, ri, r, iface.nagle, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_TCP_WSF_STATE, ri, r, iface.tcp_wsf_state, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_TCP_WSF, ri, r, iface.tcp_wsf, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_TCP_TIMER_SCALE, ri, r, iface.tcp_timer_scale, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_TCP_TIMESTAMP, ri, r, iface.tcp_timestamp, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_REDIRECT, ri, r, iface.redirect, IDBM_SHOW, num, 1); ++ __recinfo_uint16(IFACE_DEF_TMF_TMO, ri, r, iface.def_task_mgmt_tmo, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_HDRDGST, ri, r, iface.header_digest, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_DATADGST, ri, r, iface.data_digest, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_IMM_DATA, ri, r, iface.immediate_data, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_INITIAL_R2T, ri, r, iface.initial_r2t, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_DSEQ_INORDER, ri, r, iface.data_seq_inorder, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DPDU_INORDER, ri, r, iface.data_pdu_inorder, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_ERL, ri, r, iface.erl, IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_MAX_RECV_DLEN, ri, r, iface.max_recv_dlength, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_FIRST_BURST, ri, r, iface.first_burst_len, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint16(IFACE_MAX_R2T, ri, r, iface.max_out_r2t, IDBM_SHOW, ++ num, 1); ++ __recinfo_uint32(IFACE_MAX_BURST, ri, r, iface.max_burst_len, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_CHAP_AUTH, ri, r, iface.chap_auth, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_BIDI_CHAP, ri, r, iface.bidi_chap, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_STRICT_LOGIN_COMP, ri, r, iface.strict_login_comp, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DISCOVERY_AUTH, ri, r, iface.discovery_auth, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DISCOVERY_LOGOUT, ri, r, iface.discovery_logout, ++ IDBM_SHOW, num, 1); ++ ++ + __recinfo_str(NODE_DISC_ADDR, ri, r, disc_address, IDBM_SHOW, + num, 0); + __recinfo_int(NODE_DISC_PORT, ri, r, disc_port, IDBM_SHOW, +-- +1.8.3.1 + diff --git a/0051-iscsi-tools-Let-default-type-of-iface-be-ipv4.patch b/0051-iscsi-tools-Let-default-type-of-iface-be-ipv4.patch new file mode 100644 index 0000000..7149ea8 --- /dev/null +++ b/0051-iscsi-tools-Let-default-type-of-iface-be-ipv4.patch @@ -0,0 +1,33 @@ +From 75ee9d0af6e200b34e84b1e7b37971213b2fd629 Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Fri, 18 Oct 2013 09:29:26 -0400 +Subject: [PATCH] iscsi tools: Let default type of iface be ipv4 + +While using iface name to determine its type if the name does not +contain iface type then assume it be to of type ipv4 by default. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + usr/iface.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/usr/iface.c b/usr/iface.c +index 87ac875..870dba0 100644 +--- a/usr/iface.c ++++ b/usr/iface.c +@@ -450,8 +450,10 @@ int iface_get_iptype(struct iface_rec *iface) + /* try to figure out by name */ + if (strstr(iface->name, "ipv4")) + return ISCSI_IFACE_TYPE_IPV4; +- else ++ else if (strstr(iface->name, "ipv6")) + return ISCSI_IFACE_TYPE_IPV6; ++ else /* assume ipv4 by default */ ++ return ISCSI_IFACE_TYPE_IPV4; + } else { + if (strcmp(iface->bootproto, "dhcp") && + !strstr(iface->ipaddress, ".")) +-- +1.8.3.1 + diff --git a/0051-update-initscripts-and-docs.patch b/0051-update-initscripts-and-docs.patch deleted file mode 100644 index e2d4cdc..0000000 --- a/0051-update-initscripts-and-docs.patch +++ /dev/null @@ -1,130 +0,0 @@ -From c255c2cd43afeaefa428237a3200f02fb238d89e Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Mon, 19 Nov 2012 16:37:13 -0800 -Subject: update initscripts and docs - ---- - README | 9 +++------ - etc/iscsid.conf | 23 +++++++++++------------ - usr/idbm.c | 4 ++++ - 3 files changed, 18 insertions(+), 18 deletions(-) - -diff --git a/README b/README -index ec22098..2a8319a 100644 ---- a/README -+++ b/README -@@ -74,11 +74,6 @@ the cache sync command will fail. - - iscsiadm's -P 3 option will not print out scsi devices. - - iscsid will not automatically online devices. - --You need to enable "Cryptographic API" under "Cryptographic options" in the --kernel config. And you must enable "CRC32c CRC algorithm" even if --you do not use header or data digests. They are the kernel options, --CONFIG_CRYPTO and CONFIG_CRYPTO_CRC32C, respectively. -- - By default the kernel's iSCSI modules will be used. Running: - - make -@@ -997,7 +992,7 @@ Red Hat or Fedora: - ----------------- - To start open-iscsi in Red Hat/Fedora you can do: - -- service open-iscsi start -+ service iscsi start - - To get open-iscsi to automatically start at run time you may have to - run: -@@ -1205,6 +1200,8 @@ iscsid will only perform rediscovery when it gets a SCN from the server. - # linux-isns (SLES's iSNS server) where it sometimes does not send SCN - # events in the proper format, so they may not get handled. - -+To set the startup value, so that nodes are not logged into automatically -+use the value "manual". - - Example: - -------- -diff --git a/etc/iscsid.conf b/etc/iscsid.conf -index ef76dc0..ac1d231 100644 ---- a/etc/iscsid.conf -+++ b/etc/iscsid.conf -@@ -17,10 +17,10 @@ - # maintainers. - # - # Default for Fedora and RHEL. (uncomment to activate). --# iscsid.startup = /etc/rc.d/init.d/iscsid force-start -+iscsid.startup = /etc/rc.d/init.d/iscsid force-start - # - # Default for upstream open-iscsi scripts (uncomment to activate). --iscsid.startup = /sbin/iscsid -+# iscsid.startup = /sbin/iscsid - - - ############################# -@@ -36,8 +36,8 @@ iscsid.startup = /sbin/iscsid - # To request that the iscsi initd scripts startup a session set to "automatic". - # node.startup = automatic - # --# To manually startup the session set to "manual". The default is manual. --node.startup = manual -+# To manually startup the session set to "manual". The default is automatic. -+node.startup = automatic - - # For "automatic" startup nodes, setting this to "Yes" will try logins on each - # available iface until one succeeds, and then stop. The default "No" will try -@@ -259,28 +259,27 @@ node.conn[0].iscsi.MaxXmitDataSegmentLength = 0 - discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768 - - # To allow the targets to control the setting of the digest checking, --# with the initiator requesting a preference of enabling the checking, uncomment# one or both of the following lines: -+# with the initiator requesting a preference of enabling the checking, uncomment -+# the following lines (Data digests are not supported.): - #node.conn[0].iscsi.HeaderDigest = CRC32C,None --#node.conn[0].iscsi.DataDigest = CRC32C,None -+ - # - # To allow the targets to control the setting of the digest checking, - # with the initiator requesting a preference of disabling the checking, --# uncomment one or both of the following lines: -+# uncomment the following line: - #node.conn[0].iscsi.HeaderDigest = None,CRC32C --#node.conn[0].iscsi.DataDigest = None,CRC32C - # - # To enable CRC32C digest checking for the header and/or data part of --# iSCSI PDUs, uncomment one or both of the following lines: -+# iSCSI PDUs, uncomment the following line: - #node.conn[0].iscsi.HeaderDigest = CRC32C --#node.conn[0].iscsi.DataDigest = CRC32C - # - # To disable digest checking for the header and/or data part of --# iSCSI PDUs, uncomment one or both of the following lines: -+# iSCSI PDUs, uncomment the following line: - #node.conn[0].iscsi.HeaderDigest = None --#node.conn[0].iscsi.DataDigest = None - # - # The default is to never use DataDigests or HeaderDigests. - # -+node.conn[0].iscsi.HeaderDigest = None - - # For multipath configurations, you may want more than one session to be - # created on each iface record. If node.session.nr_sessions is greater -diff --git a/usr/idbm.c b/usr/idbm.c -index 4d30aa9..a1d7d37 100644 ---- a/usr/idbm.c -+++ b/usr/idbm.c -@@ -399,9 +399,13 @@ idbm_recinfo_node(node_rec_t *r, recinfo_t *ri) - IDBM_SHOW, "None", "CRC32C", "CRC32C,None", - "None,CRC32C", num, 1); - sprintf(key, CONN_DATA_DIGEST, i); -+ -+#if 0 -+We do not support data digests - __recinfo_int_o4(key, ri, r, conn[i].iscsi.DataDigest, IDBM_SHOW, - "None", "CRC32C", "CRC32C,None", - "None,CRC32C", num, 1); -+#endif - sprintf(key, CONN_IFMARKER, i); - __recinfo_int_o2(key, ri, r, conn[i].iscsi.IFMarker, IDBM_SHOW, - "No", "Yes", num, 1); --- -1.7.11.7 - diff --git a/0052-iscsi-tools-Show-iface-params-based-on-iface-type.patch b/0052-iscsi-tools-Show-iface-params-based-on-iface-type.patch new file mode 100644 index 0000000..2a1da56 --- /dev/null +++ b/0052-iscsi-tools-Show-iface-params-based-on-iface-type.patch @@ -0,0 +1,310 @@ +From 4a5e9e29d7516e34e35a15c7342afbc3a1c8c176 Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Fri, 18 Oct 2013 09:29:27 -0400 +Subject: [PATCH] iscsi tools: Show iface params based on iface type + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + usr/idbm.c | 250 ++++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 138 insertions(+), 112 deletions(-) + +diff --git a/usr/idbm.c b/usr/idbm.c +index c6460ad..1ade099 100644 +--- a/usr/idbm.c ++++ b/usr/idbm.c +@@ -237,6 +237,9 @@ void + idbm_recinfo_node(node_rec_t *r, recinfo_t *ri) + { + int num = 0, i; ++ int iface_type; ++ ++ iface_type = iface_get_iptype(&r->iface); + + __recinfo_str(NODE_NAME, ri, r, name, IDBM_SHOW, num, 0); + __recinfo_int(NODE_TPGT, ri, r, tpgt, IDBM_SHOW, num, 0); +@@ -266,21 +269,6 @@ idbm_recinfo_node(node_rec_t *r, recinfo_t *ri) + __recinfo_str(IFACE_TRANSPORTNAME, ri, r, iface.transport_name, + IDBM_SHOW, num, 1); + __recinfo_str(IFACE_INAME, ri, r, iface.iname, IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_BOOT_PROTO, ri, r, iface.bootproto, IDBM_SHOW, +- num, 1); +- __recinfo_str(IFACE_SUBNET_MASK, ri, r, iface.subnet_mask, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_GATEWAY, ri, r, iface.gateway, IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_IPV6_AUTOCFG, ri, r, iface.ipv6_autocfg, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_LINKLOCAL_AUTOCFG, ri, r, iface.linklocal_autocfg, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_ROUTER_AUTOCFG, ri, r, iface.router_autocfg, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_LINKLOCAL, ri, r, iface.ipv6_linklocal, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_ROUTER, ri, r, iface.ipv6_router, IDBM_SHOW, num, +- 1); + __recinfo_str(IFACE_STATE, ri, r, iface.state, IDBM_SHOW, num, 1); + __recinfo_uint16(IFACE_VLAN_ID, ri, r, iface.vlan_id, IDBM_SHOW, num, + 1); +@@ -292,50 +280,73 @@ idbm_recinfo_node(node_rec_t *r, recinfo_t *ri) + __recinfo_uint16(IFACE_MTU, ri, r, iface.mtu, IDBM_SHOW, num, 1); + __recinfo_uint16(IFACE_PORT, ri, r, iface.port, IDBM_SHOW, num, 1); + +- __recinfo_str(IFACE_DHCP_ALT_CID, ri, r, iface.dhcp_alt_client_id_state, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_DHCP_ALT_CID_STR, ri, r, iface.dhcp_alt_client_id, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_DHCP_DNS, ri, r, iface.dhcp_dns, IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_DHCP_LEARN_IQN, ri, r, iface.dhcp_learn_iqn, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_DHCP_REQ_VID, ri, r, iface.dhcp_req_vendor_id_state, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_DHCP_VID, ri, r, iface.dhcp_vendor_id_state, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_DHCP_VID_STR, ri, r, iface.dhcp_vendor_id, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_DHCP_SLP_DA, ri, r, iface.dhcp_slp_da, IDBM_SHOW, +- num, 1); +- __recinfo_str(IFACE_FRAGMENTATION, ri, r, iface.fragmentation, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_GRAT_ARP, ri, r, iface.gratuitous_arp, IDBM_SHOW, +- num, 1); +- __recinfo_str(IFACE_IN_FORWARD, ri, r, iface.incoming_forwarding, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_TOS_STATE, ri, r, iface.tos_state, IDBM_SHOW, num, +- 1); +- __recinfo_uint8(IFACE_TOS, ri, r, iface.tos, IDBM_SHOW, num, 1); +- __recinfo_uint8(IFACE_TTL, ri, r, iface.ttl, IDBM_SHOW, num, 1); +- __recinfo_uint8(IFACE_DUP_ADDR_DETECT_CNT, ri, r, +- iface.dup_addr_detect_cnt, IDBM_SHOW, num, 1); +- __recinfo_uint32(IFACE_FLOW_LABEL, ri, r, iface.flow_label, IDBM_SHOW, +- num, 1); +- __recinfo_str(IFACE_GRAT_NEIGHBOR_ADV, ri, r, +- iface.gratuitous_neighbor_adv, IDBM_SHOW, num, 1); +- __recinfo_uint8(IFACE_HOP_LIMIT, ri, r, iface.hop_limit, IDBM_SHOW, +- num, 1); +- __recinfo_str(IFACE_MLD, ri, r, iface.mld, IDBM_SHOW, num, 1); +- __recinfo_uint32(IFACE_ND_REACHABLE_TMO, ri, r, iface.nd_reachable_tmo, +- IDBM_SHOW, num, 1); +- __recinfo_uint32(IFACE_ND_REXMIT_TIME, ri, r, iface.nd_rexmit_time, +- IDBM_SHOW, num, 1); +- __recinfo_uint32(IFACE_ND_STALE_TMO, ri, r, iface.nd_stale_tmo, +- IDBM_SHOW, num, 1); +- __recinfo_uint32(IFACE_RTR_ADV_LINK_MTU, ri, r, +- iface.router_adv_link_mtu, IDBM_SHOW, num, 1); +- __recinfo_uint8(IFACE_TRAFFIC_CLASS, ri, r, iface.traffic_class, +- IDBM_SHOW, num, 1); ++ if (iface_type == ISCSI_IFACE_TYPE_IPV4) { ++ __recinfo_str(IFACE_BOOT_PROTO, ri, r, iface.bootproto, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_SUBNET_MASK, ri, r, iface.subnet_mask, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_GATEWAY, ri, r, iface.gateway, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_DHCP_ALT_CID, ri, r, ++ iface.dhcp_alt_client_id_state, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_DHCP_ALT_CID_STR, ri, r, ++ iface.dhcp_alt_client_id, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_DNS, ri, r, iface.dhcp_dns, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_DHCP_LEARN_IQN, ri, r, ++ iface.dhcp_learn_iqn, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_REQ_VID, ri, r, ++ iface.dhcp_req_vendor_id_state, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_DHCP_VID, ri, r, iface.dhcp_vendor_id_state, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_VID_STR, ri, r, iface.dhcp_vendor_id, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_SLP_DA, ri, r, iface.dhcp_slp_da, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_FRAGMENTATION, ri, r, iface.fragmentation, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_GRAT_ARP, ri, r, iface.gratuitous_arp, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_IN_FORWARD, ri, r, ++ iface.incoming_forwarding, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_TOS_STATE, ri, r, iface.tos_state, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_TOS, ri, r, iface.tos, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_TTL, ri, r, iface.ttl, IDBM_SHOW, num, 1); ++ } else if (iface_type == ISCSI_IFACE_TYPE_IPV6) { ++ __recinfo_str(IFACE_IPV6_AUTOCFG, ri, r, iface.ipv6_autocfg, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_LINKLOCAL_AUTOCFG, ri, r, ++ iface.linklocal_autocfg, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_ROUTER_AUTOCFG, ri, r, iface.router_autocfg, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_LINKLOCAL, ri, r, iface.ipv6_linklocal, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_ROUTER, ri, r, iface.ipv6_router, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_DUP_ADDR_DETECT_CNT, ri, r, ++ iface.dup_addr_detect_cnt, IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_FLOW_LABEL, ri, r, iface.flow_label, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_GRAT_NEIGHBOR_ADV, ri, r, ++ iface.gratuitous_neighbor_adv, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_HOP_LIMIT, ri, r, iface.hop_limit, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_MLD, ri, r, iface.mld, IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_ND_REACHABLE_TMO, ri, r, ++ iface.nd_reachable_tmo, IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_ND_REXMIT_TIME, ri, r, ++ iface.nd_rexmit_time, IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_ND_STALE_TMO, ri, r, iface.nd_stale_tmo, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_RTR_ADV_LINK_MTU, ri, r, ++ iface.router_adv_link_mtu, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_TRAFFIC_CLASS, ri, r, iface.traffic_class, ++ IDBM_SHOW, num, 1); ++ } ++ + __recinfo_str(IFACE_DELAYED_ACK, ri, r, iface.delayed_ack, IDBM_SHOW, + num, 1); + __recinfo_str(IFACE_TCP_NAGLE, ri, r, iface.nagle, IDBM_SHOW, num, 1); +@@ -515,6 +526,9 @@ idbm_recinfo_node(node_rec_t *r, recinfo_t *ri) + void idbm_recinfo_iface(iface_rec_t *r, recinfo_t *ri) + { + int num = 0; ++ int iface_type; ++ ++ iface_type = iface_get_iptype(r); + + __recinfo_str(IFACE_ISCSINAME, ri, r, name, IDBM_SHOW, num, 0); + __recinfo_str(IFACE_NETNAME, ri, r, netdev, IDBM_SHOW, num, 1); +@@ -523,19 +537,6 @@ void idbm_recinfo_iface(iface_rec_t *r, recinfo_t *ri) + __recinfo_str(IFACE_TRANSPORTNAME, ri, r, transport_name, + IDBM_SHOW, num, 1); + __recinfo_str(IFACE_INAME, ri, r, iname, IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_BOOT_PROTO, ri, r, bootproto, IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_SUBNET_MASK, ri, r, subnet_mask, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_GATEWAY, ri, r, gateway, IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_IPV6_AUTOCFG, ri, r, ipv6_autocfg, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_LINKLOCAL_AUTOCFG, ri, r, linklocal_autocfg, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_ROUTER_AUTOCFG, ri, r, router_autocfg, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_LINKLOCAL, ri, r, ipv6_linklocal, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_ROUTER, ri, r, ipv6_router, IDBM_SHOW, num, 1); + __recinfo_str(IFACE_STATE, ri, r, state, IDBM_SHOW, num, 1); + __recinfo_uint16(IFACE_VLAN_ID, ri, r, vlan_id, IDBM_SHOW, num, 1); + __recinfo_uint8(IFACE_VLAN_PRIORITY, ri, r, vlan_priority, +@@ -544,46 +545,71 @@ void idbm_recinfo_iface(iface_rec_t *r, recinfo_t *ri) + __recinfo_int(IFACE_NUM, ri, r, iface_num, IDBM_SHOW, num, 1); + __recinfo_uint16(IFACE_MTU, ri, r, mtu, IDBM_SHOW, num, 1); + __recinfo_uint16(IFACE_PORT, ri, r, port, IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_DHCP_ALT_CID, ri, r, dhcp_alt_client_id_state, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_DHCP_ALT_CID_STR, ri, r, dhcp_alt_client_id, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_DHCP_DNS, ri, r, dhcp_dns, IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_DHCP_LEARN_IQN, ri, r, dhcp_learn_iqn, IDBM_SHOW, +- num, 1); +- __recinfo_str(IFACE_DHCP_REQ_VID, ri, r, dhcp_req_vendor_id_state, +- IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_DHCP_VID, ri, r, dhcp_vendor_id_state, IDBM_SHOW, +- num, 1); +- __recinfo_str(IFACE_DHCP_VID_STR, ri, r, dhcp_vendor_id, IDBM_SHOW, +- num, 1); +- __recinfo_str(IFACE_DHCP_SLP_DA, ri, r, dhcp_slp_da, IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_FRAGMENTATION, ri, r, fragmentation, IDBM_SHOW, +- num, 1); +- __recinfo_str(IFACE_GRAT_ARP, ri, r, gratuitous_arp, IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_IN_FORWARD, ri, r, incoming_forwarding, IDBM_SHOW, +- num, 1); +- __recinfo_str(IFACE_TOS_STATE, ri, r, tos_state, IDBM_SHOW, num, 1); +- __recinfo_uint8(IFACE_TOS, ri, r, tos, IDBM_SHOW, num, 1); +- __recinfo_uint8(IFACE_TTL, ri, r, ttl, IDBM_SHOW, num, 1); +- __recinfo_uint8(IFACE_DUP_ADDR_DETECT_CNT, ri, r, dup_addr_detect_cnt, +- IDBM_SHOW, num, 1); +- __recinfo_uint32(IFACE_FLOW_LABEL, ri, r, flow_label, IDBM_SHOW, +- num, 1); +- __recinfo_str(IFACE_GRAT_NEIGHBOR_ADV, ri, r, gratuitous_neighbor_adv, +- IDBM_SHOW, num, 1); +- __recinfo_uint8(IFACE_HOP_LIMIT, ri, r, hop_limit, IDBM_SHOW, num, 1); +- __recinfo_str(IFACE_MLD, ri, r, mld, IDBM_SHOW, num, 1); +- __recinfo_uint32(IFACE_ND_REACHABLE_TMO, ri, r, nd_reachable_tmo, +- IDBM_SHOW, num, 1); +- __recinfo_uint32(IFACE_ND_REXMIT_TIME, ri, r, nd_rexmit_time, IDBM_SHOW, +- num, 1); +- __recinfo_uint32(IFACE_ND_STALE_TMO, ri, r, nd_stale_tmo, IDBM_SHOW, +- num, 1); +- __recinfo_uint32(IFACE_RTR_ADV_LINK_MTU, ri, r, router_adv_link_mtu, +- IDBM_SHOW, num, 1); +- __recinfo_uint8(IFACE_TRAFFIC_CLASS, ri, r, traffic_class, IDBM_SHOW, +- num, 1); ++ ++ if (iface_type == ISCSI_IFACE_TYPE_IPV4) { ++ __recinfo_str(IFACE_BOOT_PROTO, ri, r, bootproto, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_SUBNET_MASK, ri, r, subnet_mask, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_GATEWAY, ri, r, gateway, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_ALT_CID, ri, r, ++ dhcp_alt_client_id_state, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_ALT_CID_STR, ri, r, dhcp_alt_client_id, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_DNS, ri, r, dhcp_dns, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_DHCP_LEARN_IQN, ri, r, dhcp_learn_iqn, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_REQ_VID, ri, r, ++ dhcp_req_vendor_id_state, IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_VID, ri, r, dhcp_vendor_id_state, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_VID_STR, ri, r, dhcp_vendor_id, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_DHCP_SLP_DA, ri, r, dhcp_slp_da, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_FRAGMENTATION, ri, r, fragmentation, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_GRAT_ARP, ri, r, gratuitous_arp, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_IN_FORWARD, ri, r, incoming_forwarding, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_TOS_STATE, ri, r, tos_state, IDBM_SHOW, ++ num, 1); ++ __recinfo_uint8(IFACE_TOS, ri, r, tos, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_TTL, ri, r, ttl, IDBM_SHOW, num, 1); ++ } else if (iface_type == ISCSI_IFACE_TYPE_IPV6) { ++ __recinfo_str(IFACE_IPV6_AUTOCFG, ri, r, ipv6_autocfg, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_LINKLOCAL_AUTOCFG, ri, r, linklocal_autocfg, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_ROUTER_AUTOCFG, ri, r, router_autocfg, ++ IDBM_SHOW, num, 1); ++ __recinfo_str(IFACE_LINKLOCAL, ri, r, ipv6_linklocal, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_ROUTER, ri, r, ipv6_router, IDBM_SHOW, ++ num, 1); ++ __recinfo_uint8(IFACE_DUP_ADDR_DETECT_CNT, ri, r, ++ dup_addr_detect_cnt, IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_FLOW_LABEL, ri, r, flow_label, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_GRAT_NEIGHBOR_ADV, ri, r, ++ gratuitous_neighbor_adv, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_HOP_LIMIT, ri, r, hop_limit, IDBM_SHOW, ++ num, 1); ++ __recinfo_str(IFACE_MLD, ri, r, mld, IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_ND_REACHABLE_TMO, ri, r, ++ nd_reachable_tmo, IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_ND_REXMIT_TIME, ri, r, nd_rexmit_time, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_ND_STALE_TMO, ri, r, nd_stale_tmo, ++ IDBM_SHOW, num, 1); ++ __recinfo_uint32(IFACE_RTR_ADV_LINK_MTU, ri, r, ++ router_adv_link_mtu, IDBM_SHOW, num, 1); ++ __recinfo_uint8(IFACE_TRAFFIC_CLASS, ri, r, traffic_class, ++ IDBM_SHOW, num, 1); ++ } ++ + __recinfo_str(IFACE_DELAYED_ACK, ri, r, delayed_ack, IDBM_SHOW, num, 1); + __recinfo_str(IFACE_TCP_NAGLE, ri, r, nagle, IDBM_SHOW, num, 1); + __recinfo_str(IFACE_TCP_WSF_STATE, ri, r, tcp_wsf_state, IDBM_SHOW, +-- +1.8.3.1 + diff --git a/0052-use-var-for-config.patch b/0052-use-var-for-config.patch deleted file mode 100644 index 2e4288c..0000000 --- a/0052-use-var-for-config.patch +++ /dev/null @@ -1,239 +0,0 @@ -From be8702e609fdfd417547f758cb88956066b63023 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Mon, 19 Nov 2012 16:38:45 -0800 -Subject: use var for config - ---- - README | 33 ++++++++++++++++----------------- - doc/iscsiadm.8 | 8 ++++---- - usr/idbm.c | 6 +++--- - usr/idbm.h | 13 +++++++------ - usr/iface.h | 4 +++- - 5 files changed, 33 insertions(+), 31 deletions(-) - -diff --git a/README b/README -index 90e2074..9cc62ca 100644 ---- a/README -+++ b/README -@@ -156,8 +156,7 @@ Usage: iscsid [OPTION] - - Open-iSCSI persistent configuration is stored in a number of - directories under a configuration root directory, using a flat-file --format. This configuration root directory is /etc/iscsi by default, --but may also commonly be in /var/lib/iscsi. -+format. This configuration root directory is /var/lib/iscsi by default. - - Configuration is contained in directories for: - -@@ -467,7 +466,7 @@ a scsi_host per HBA port). - To manage both types of initiator stacks, iscsiadm uses the interface (iface) - structure. For each HBA port or for software iscsi for each network - device (ethX) or NIC, that you wish to bind sessions to you must create --a iface config /etc/iscsi/ifaces. -+a iface config /var/lib/iscsi/ifaces. - - Prep: - -@@ -501,29 +500,29 @@ Running: - iface0 qla4xxx,00:c0:dd:08:63:e8,20.15.0.7,default,iqn.2005-06.com.redhat:madmax - iface1 qla4xxx,00:c0:dd:08:63:ea,20.15.0.9,default,iqn.2005-06.com.redhat:madmax - --Will report iface configurations that are setup in /etc/iscsi/ifaces. -+Will report iface configurations that are setup in /var/lib/iscsi/ifaces. - The format is: - - iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname - - For software iscsi, you can create the iface configs by hand, but it is - reccomended that you use iscsiadm's iface mode. There is a iface.example in --/etc/iscsi/ifaces which can be used as a template for the daring. -+/var/lib/iscsi/ifaces which can be used as a template for the daring. - - For each network object you wish to bind a session to you must create --a seperate iface config in /etc/iscsi/ifaces and each iface config file -+a seperate iface config in /var/lib/iscsi/ifaces and each iface config file - must have a unique name which is less than or equal to 64 characters. - - Example: - - If you have NIC1 with MAC address 00:0F:1F:92:6B:BF and NIC2 with - MAC address 00:C0:DD:08:63:E7 and you wanted to do software iscsi over --TCP/IP. Then in /etc/iscsi/ifaces/iface0 you would enter: -+TCP/IP. Then in /var/lib/iscsi/ifaces/iface0 you would enter: - - iface.transport_name = tcp - iface.hwaddress = 00:0F:1F:92:6B:BF - --and in /etc/iscsi/ifaces/iface1 you would enter: -+and in /var/lib/iscsi/ifaces/iface1 you would enter: - - iface.transport_name = tcp - iface.hwaddress = 00:C0:DD:08:63:E7 -@@ -573,7 +572,7 @@ cxgb3i.00:07:43:05:97:07 cxgb3i,00:07:43:05:97:07,,, - qla4xxx.00:0e:1e:04:8b:2e qla4xxx,00:0e:1e:04:8b:2e,,, - - --Will report iface configurations that are setup in /etc/iscsi/ifaces. -+Will report iface configurations that are setup in /var/lib/iscsi/ifaces. - The format is: - - iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname -@@ -659,7 +658,7 @@ need a seperate network connection to the target for discovery purposes. - *This will be fixed in the next version of open-iscsi* - - For compatibility reasons, when you run iscsiadm to do discovery, it --will check for interfaces in /etc/iscsi/iscsi/ifaces that are using -+will check for interfaces in /var/lib/iscsi/ifaces that are using - tcp for the iface.transport and it will bind the portals that are discovered - so that they will be logged in through those ifaces. This behavior can also - be overriden by passing in the interfaces you want to use. For the case -@@ -677,7 +676,7 @@ we do not bind a session to a iface, then you can use the special iface - - iscsiadm -m discoverydb -t st -p ip:port -I default --discover -P 1 - --And if you did not define any interfaces in /etc/iscsi/ifaces and do -+And if you did not define any interfaces in /var/lib/iscsi/ifaces and do - not pass anything into iscsiadm, running iscsiadm will do the default - behavior, where we allow the network subsystem to decide which - device to use. -@@ -719,7 +718,7 @@ To now log into targets it is the same as with sofware iscsi. See section - - ./iscsiadm -m discoverydb -t st -p 192.168.1.1:3260 --discover - -- This will search /etc/iscsi/send_targets for a record with the -+ This will search /var/lib/iscsi/send_targets for a record with the - ID [portal = 192.168.1.1:3260 and type = sendtargets. If found it - will perform discovery using the settings stored in the record. - If a record does not exist, it will be created using the iscsid.conf -@@ -728,7 +727,7 @@ To now log into targets it is the same as with sofware iscsi. See section - The argument to -p may also be a hostname instead of an address. - ./iscsiadm -m discoverydb -t st -p smoehost --discover - -- For the ifaces, iscsiadm will first search /etc/iscsi/ifaces for -+ For the ifaces, iscsiadm will first search /var/lib/iscsi/ifaces for - interfaces using software iscsi. If any are found then nodes found - during discovery will be setup so that they can logged in through - those interfaces. To specify a specific iface, pass the -@@ -784,7 +783,7 @@ To now log into targets it is the same as with sofware iscsi. See section - This command will perform discovery, but not manipulate the node DB. - - - SendTargets iSCSI Discovery with a specific interface. If you -- wish to only use a subset of the interfaces in /etc/iscsi/ifaces -+ wish to only use a subset of the interfaces in /var/lib/iscsi/ifaces - then you can pass them in during discovery: - - ./iscsiadm -m discoverydb -t sendtargets -p 192.168.1.1:3260 \ -@@ -1145,8 +1144,8 @@ where targetname is the name of the target and ip_address:port is the address - and port of the portal. tpgt, is the portal group tag of - the portal, and is not used in iscsiadm commands except for static - record creation. And iface name is the name of the iscsi interface --defined in /etc/iscsi/ifaces. If no interface was defined in --/etc/iscsi/ifaces or passed in, the default behavior is used. -+defined in /var/lib/iscsi/ifaces. If no interface was defined in -+/var/lib/iscsi/ifaces or passed in, the default behavior is used. - Default here is iscsi_tcp/tcp to be used over which ever NIC the - network layer decides is best. - -@@ -1261,7 +1260,7 @@ If set, iscsid will perform discovery to the address every - discovery.isns.discoveryd_poll_inval or - discovery.sendtargets.discoveryd_poll_inval seconds, - and it will log into any portals found from the discovery source using --the ifaces in /etc/iscsi/ifaces. -+the ifaces in /var/lib/iscsi/ifaces. - - Note that for iSNS the poll_interval does not have to be set. If not set, - iscsid will only perform rediscovery when it gets a SCN from the server. -diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8 -index 6b15fcd..30811bd 100644 ---- a/doc/iscsiadm.8 -+++ b/doc/iscsiadm.8 -@@ -101,7 +101,7 @@ This option is only valid for ping submode. - .TP - \fB\-I\fR, \fB\-\-interface=\fI[iface]\fR - The interface argument specifies the iSCSI interface to use for the operation. --iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware -+iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware - iSCSI (qla4xxx) the iface config must have the hardware address - (iface.hwaddress = port's MAC address) - and the driver/transport_name (iface.transport_name). The iface's name is -@@ -178,7 +178,7 @@ If no other options are specified: for \fIdiscoverydb\fR and \fInode\fR, all - of their respective records are displayed; for \fIsession\fR, all active - sessions and connections are displayed; for \fIfw\fR, all boot firmware - values are displayed; for \fIhost\fR, all iSCSI hosts are displayed; and --for \fIiface\fR, all ifaces setup in /etc/iscsi/ifaces are displayed. -+for \fIiface\fR, all ifaces setup in /var/lib/iscsi/ifaces are displayed. - - .TP - \fB\-n\fR, \fB\-\-name=\fIname\fR -@@ -562,10 +562,10 @@ The configuration file read by \fBiscsid\fR and \fBiscsiadm\fR on startup. - The file containing the iSCSI InitiatorName and InitiatorAlias read by - \fBiscsid\fR and \fBiscsiadm\fR on startup. - .TP --/etc/iscsi/nodes/ -+/var/lib/iscsi/nodes/ - This directory contains the nodes with their targets. - .TP --/etc/iscsi/send_targets -+/var/lib/iscsi/send_targets - This directory contains the portals. - - .SH "SEE ALSO" -diff --git a/usr/idbm.c b/usr/idbm.c -index 634e547..4bb9810 100644 ---- a/usr/idbm.c -+++ b/usr/idbm.c -@@ -2721,9 +2721,9 @@ free_info: - int idbm_init(idbm_get_config_file_fn *fn) - { - /* make sure root db dir is there */ -- if (access(ISCSI_CONFIG_ROOT, F_OK) != 0) { -- if (mkdir(ISCSI_CONFIG_ROOT, 0660) != 0) { -- log_error("Could not make %s %d\n", ISCSI_CONFIG_ROOT, -+ if (access(ISCSIVAR, F_OK) != 0) { -+ if (mkdir(ISCSIVAR, 0660) != 0) { -+ log_error("Could not make %s %d\n", ISCSIVAR, - errno); - return errno; - } -diff --git a/usr/idbm.h b/usr/idbm.h -index 5e4038d..1e9b132 100644 ---- a/usr/idbm.h -+++ b/usr/idbm.h -@@ -29,12 +29,13 @@ - #include "list.h" - #include "flashnode.h" - --#define NODE_CONFIG_DIR ISCSI_CONFIG_ROOT"nodes" --#define SLP_CONFIG_DIR ISCSI_CONFIG_ROOT"slp" --#define ISNS_CONFIG_DIR ISCSI_CONFIG_ROOT"isns" --#define STATIC_CONFIG_DIR ISCSI_CONFIG_ROOT"static" --#define FW_CONFIG_DIR ISCSI_CONFIG_ROOT"fw" --#define ST_CONFIG_DIR ISCSI_CONFIG_ROOT"send_targets" -+#define ISCSIVAR "/var/lib/iscsi/" -+#define NODE_CONFIG_DIR ISCSIVAR"nodes" -+#define SLP_CONFIG_DIR ISCSIVAR"slp" -+#define ISNS_CONFIG_DIR ISCSIVAR"isns" -+#define STATIC_CONFIG_DIR ISCSIVAR"static" -+#define FW_CONFIG_DIR ISCSIVAR"fw" -+#define ST_CONFIG_DIR ISCSIVAR"send_targets" - #define ST_CONFIG_NAME "st_config" - #define ISNS_CONFIG_NAME "isns_config" - -diff --git a/usr/iface.h b/usr/iface.h -index 01f7074..f396918 100644 ---- a/usr/iface.h -+++ b/usr/iface.h -@@ -20,7 +20,9 @@ - #ifndef ISCSI_IFACE_H - #define ISCSI_IFACE_H - --#define IFACE_CONFIG_DIR ISCSI_CONFIG_ROOT"ifaces" -+#include "idbm.h" -+ -+#define IFACE_CONFIG_DIR ISCSIVAR"ifaces" - - struct iface_rec; - struct list_head; --- -1.8.1.4 - diff --git a/0053-iscsiadm-Added-document-for-description-of-iface-att.patch b/0053-iscsiadm-Added-document-for-description-of-iface-att.patch new file mode 100644 index 0000000..a1c3c88 --- /dev/null +++ b/0053-iscsiadm-Added-document-for-description-of-iface-att.patch @@ -0,0 +1,534 @@ +From 072d8b931e8e03875e5220546e68d5fb2e80bcda Mon Sep 17 00:00:00 2001 +From: Vikas Chaudhary +Date: Fri, 22 Nov 2013 05:46:12 -0500 +Subject: [PATCH] iscsiadm: Added document for description of iface attributes + +Signed-off-by: Vikas Chaudhary +--- + sysfs-documentation | 514 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 514 insertions(+) + create mode 100644 sysfs-documentation + +diff --git a/sysfs-documentation b/sysfs-documentation +new file mode 100644 +index 0000000..54fc497 +--- /dev/null ++++ b/sysfs-documentation +@@ -0,0 +1,514 @@ ++Description of iface attributes and their valid values ++====================================================== ++ ++== IPv4 attributes == ++ ++ipaddress ++--------- ++IP address in format XXX.XXX.XXX.XXX ++ ++gateway ++------- ++IP address of the network router or gateway device in format XXX.XXX.XXX.XXX ++ ++subnet ++------ ++Broadcast address in format XXX.XXX.XXX.XXX ++ ++bootproto ++--------- ++The protocol type used to initialize interface ++ ++Valid values: "dhcp" or "static" ++ ++dhcp_dns_address_en ++------------------- ++Request DNS Server IP Addresses and Domain Name ++ ++If bootproto is set to dhcp and dhcp_dns_address_en is enable, ++requests DNS addresses (option 6) and domain name (option 15) in its ++DHCP parameter request list. ++ ++Valid values: "enable" or "disable" ++ ++dhcp_slp_da_info_en ++------------------- ++Request SLP DA Information and SLP Scope ++If bootproto is set to dhcp and dhcp_slp_da_info_en is enable, ++requests SLP DA information (option 78) and SLP scope (option 79) ++in its DHCP parameter request list. ++ ++Valid values: "enable" or "disable" ++ ++tos_en ++------ ++Enable IPv4 type of service (ToS) ++ ++When tos_en is set to enable, use value set in tos when transmitting IPv4 TCP ++packets on iSCSI connections. ++ ++Valid values: "enable" or "disable" ++ ++tos ++--- ++IPv4 Type of service (ToS) ++ ++When tos_en is set to enable, use value set in tos when transmitting IPv4 TCP ++packets on iSCSI connections. ++ ++Valid range: 8-bit value. [0-255] ++ ++grat_arp_en ++----------- ++Enable Gratuitous ARP Requests ++ ++Valid values: "enable" or "disable" ++ ++dhcp_alt_client_id_en ++--------------------- ++DHCP Use Alternate Client ID ++ ++When dhcp_alt_client_id_en is set to enable, use the Client ID configured in ++dhcp_alt_client_id as its Client ID (DHCP option 61) in outgoing DHCP messages. ++ ++Valid values: "enable" or "disable" ++ ++dhcp_alt_client_id ++------------------ ++DHCP Alternate Client ID ++ ++When dhcp_alt_client_id_en is set to enable, use value set in dhcp_alt_client_id ++for Client ID in DHCP messages. ++ ++Valid values: 11-byte Client ID ++ ++dhcp_req_vendor_id_en ++--------------------- ++DHCP Require Vendor ID ++ ++When dhcp_req_vendor_id_en is set to enable, use value set in dhcp_vendor_id as ++its vendor ID (DHCP option 60) in outgoing DHCP messages. ++ ++Valid values: "enable" or "disable" ++ ++dhcp_use_vendor_id_en ++--------------------- ++DHCP Use Vendor ID ++ ++When dhcp_use_vendor_id_en is set to enable, use value set in dhcp_vendor_id as ++its vendor ID (DHCP option 60) in outgoing DHCP messages. ++ ++Valid values: "enable" or "disable" ++ ++dhcp_vendor_id ++-------------- ++DHCP Vendor ID ++ ++When dhcp_req_vendor_id_en or dhcp_use_vendor_id_en is set to enable, ++use value set in dhcp_vendor_id for Vendor ID in DHCP messages. ++ ++Valid values: 11-byte Client ID ++ ++dhcp_learn_iqn_en ++----------------- ++DHCP Learn IQN ++ ++When dhcp_learn_iqn_en is set to enable, iSCSI initiator attempts to use DHCP ++to learn its (IQN) iSCSI name. ++ ++Valid values: "enable" or "disable" ++ ++fragment_disable ++---------------- ++Fragmentation Disable. ++ ++When fragment_disable is set to disable, iSCSI initiator cannot fragment IP ++datagrams. ++ ++Valid values: "enable" or "disable" ++ ++incoming_forwarding_en ++---------------------- ++When incoming_forwarding_en is set to enable, iSCSI initiator forwards all ++incoming network traffic to the network driver, except for iSCSI TCP packets ++destined to the iSCSI initiator. ++ ++Valid values: "enable" or "disable" ++ ++ttl ++--- ++IPv4 Time to Live (TTL) ++ ++This attribute contain TTL value sent in IPv4 TCP packets transmitted on ++iSCSI connections. ++ ++Valid range: 8-bit value. [0-255] ++ ++== IPv6 attributes == ++ ++ipaddress ++--------- ++IP address in IPv6 format. ++ ++link_local_addr ++--------------- ++Link local address in IPv6 format. ++ ++router_addr ++----------- ++Router address in IPv6 format. ++ ++ipaddr_autocfg ++-------------- ++Autoconfigure IPv6 Address. ++ ++Valid values: nd, dhcpv6 or disable ++qla4xxx don't support dhcpv6. ++ ++link_local_autocfg ++------------------ ++Autoconfigure IPv6 Link Local Address. ++ ++IPv6 neighbor discovery protocol to discover Link Local Address. ++ ++Valid values: auto or disable ++ ++ ++router_autocfg ++-------------- ++Autoconfigure IPv6 Router address. ++ ++IPv6 neighbor discovery protocol to discover a default router address. ++ ++Valid values: auto or disable ++ ++link_local_state ++---------------- ++This Read-only attribute show Link Local IP address state in sysfs. ++ ++Valid values: Unconfigured, Acquiring, Tentative, Valid, Disabling, Invalid, ++ Deprecated. ++ ++ ++router_state ++------------ ++This Read-only attribute shows router state. ++ ++Valid values: Unknown, Advertised, Manual, Stale. ++ ++ ++grat_neighbor_adv_en ++-------------------- ++Enable Gratuitious Neighbor Advertisement ++ ++Valid values: "enable" or "disable" ++ ++mld_en ++------ ++Enable IPv6 Multicast Listener Discovery ++ ++Valid values: "enable" or "disable" ++ ++flow_label ++---------- ++This attribute specifies the default value of the Flow Label field in the ++IPv6 header of TCP packets transmitted on iSCSI connections ++ ++Valid range: 20-bit value. [0-1048575] ++Value zero indicates that the traffic is not assigned to a labelled flow. ++ ++traffic_class ++------------- ++This attribute specifies the IPv6 traffic class value to be used in IPv6 ++TCP packets transmitted from the firmware on iSCSI connections. ++ ++Valid range: 8-bit value. [0-255] ++ ++hop_limit ++--------- ++This attribute specifies the IPv6 hop limit value to be used in IPv6 TCP ++packets transmitted from the firmware on iSCSI connections ++ ++Valid range: 8-bit value. [0-255] ++ ++nd_reachable_tmo ++---------------- ++This attribute specifies the time (in milliseconds) that a node assumes ++that the neighbor is reachable after confirmation. ++ ++Valid range: 4-byte value. [0-4294967295] ++ ++nd_rexmit_time ++-------------- ++This attribute specifies the time (in milliseconds) between retransmitted ++neighbor solicitation messages. ++ ++Valid range: 4-byte value. [0-4294967295] ++ ++nd_stale_tmo ++------------ ++This attribute specifies the time (in milliseconds) after which a stale ++neighbor or destination cache entry is discarded. ++ ++Valid range: 4-byte value. [0-4294967295] ++ ++dup_addr_detect_cnt ++------------------- ++This attribute specifies the IPv6 duplicate address detection count ++ ++Valid range: 8-bit value. [0-255] ++ 0 - Disable ++ 1 - TryOnce ++ 2 - TryTwice, and so on ++ ++router_adv_link_mtu ++------------------- ++IPv6 Router Advertised Link MTU Size. ++ ++Valid range: 1280 bytes to 1500 bytes ++ ++== Common == ++enabled ++------- ++This attribute is used to enable or disable IPv4 or IPv6 protocol. ++ ++Valid values: "enable" or "disable" ++ ++vlan_id ++------- ++This attribute specifies 12-bit VLAN identifier (VID) ++ ++Valid range: 12-bit value. [1-4094] ++ ++vlan_priority ++------------- ++This attribute specifies Priority to outbound packets containing the ++specified VLAN-ID (VID) ++ ++Valid range: 3-bit value. [0-7] ++ ++vlan_enabled ++------------ ++VLAN Tagging Enable. ++ ++When this attribute is set to enable, use value set in vlan_id and ++vlan_priority to transmit IP packets, and discards IP packets that were ++received without a matching VLAN ID ++ ++Valid values: "enable" or "disable" ++ ++mtu ++--- ++Ethernet MTU Size. ++ ++This field specifies the maximum payload length in byte of an ++Ethernet frame supported by iSCSI initiator. ++ ++Valid values: 576 bytes to 9000 bytes ++ ++port ++---- ++This attribute shows the initiator iSCSI port number. ++ ++ipaddress_state ++--------------- ++This Read-only attribute show IP address state. ++ ++Valid values: Unconfigured, Acquiring, Tentative, Valid, Disabling, Invalid, ++ Deprecated. ++ ++delayed_ack_en ++-------------- ++When this attribute is set to enable, TCP delayed ACK is enabled. ++ ++Valid values: "enable" or "disable" ++ ++tcp_nagle_disable ++----------------- ++When this attribute is set to disable, TCP Nagle algorithm is disabled. ++ ++Valid values: "enable" or "disable" ++ ++tcp_wsf_disable ++--------------- ++When this attribute is set to disable, TCP window scale is disabled. ++ ++Valid values: "enable" or "disable" ++ ++tcp_wsf ++------- ++This attribute specifies the TCP window scale factor to be negotiated ++on TCP connections. ++ ++Valid range: 8-bit value. [0-255] ++ ++tcp_timer_scale ++--------------- ++The TCP Timer Scale is scale factor that adjusts the time interval between ++timer ticks on a TCP connection. The scale factor allows for faster time-outs ++for connections running on a very small network, versus connections running ++on a very large network. ++ ++Valid range: 3-bit value. [0-7] ++ ++tcp_timestamp_en ++---------------- ++When this attribute is set to enable, iSCSI initiator negotiates to use time ++stamps in TCP headers ++ ++Valid values: "enable" or "disable" ++ ++cache_id ++-------- ++This Read-only attribute is used to find the valid cache entries for the ++interface. ++ ++For IPv4, ARP cache entry ++For IPv6, Neighbor cache entry ++ ++redirect_en ++----------- ++For IPv4: ++When this attribute is set to enable, an ARP redirect can modify the address ++resolution protocol (ARP) table and any active connections. ++ ++For IPv6: ++When this attribute is set to enable and neighbor advertisements are received, ++the connection table is examined and updated if any active connections match ++the IP address on the neighbor advertisement. This action is required for ++failover and redirect. ++ ++Valid values: "enable" or "disable" ++ ++def_taskmgmt_tmo ++---------------- ++This attribute specifies timeout interval in seconds that iSCSI uses for ++timing out task-management commands. ++ ++Valid range: 16-bit value [0-65535]. ++ ++header_digest ++------------- ++When this attribute is set to enable iSCSI initiator negotiates for ++HeaderDigest=CRC32 and when set to disable negotiates HeaderDigest=none. ++ ++Valid values: "enable" or "disable" ++ ++data_digest ++----------- ++When this attribute is set to enable iSCSI initiator negotiates for ++DataDigest=CRC32 and when set to disable negotiates DataDigest=none. ++ ++Valid values: "enable" or "disable" ++ ++immediate_data ++-------------- ++When this attribute is set to enable iSCSI initiator negotiates for ++ImmediateData=yes and When set to disable negotiates ImmediateData=none ++ ++Valid values: "enable" or "disable" ++ ++initial_r2t ++----------- ++When this attribute is set to enable iSCSI initiator negotiates for ++InitialR2T=yes. When set to disable negotiates InitialR2T=no. ++ ++Valid values: "enable" or "disable" ++ ++data_seq_in_order ++----------------- ++When this attribute is set to enable iSCSI initiator set data sequences ++in order ++ ++Valid values: "enable" or "disable" ++qla4xxx does not support out-of-order data sequences ++ ++data_pdu_in_order ++----------------- ++When this attribute is set to enable iSCSI initiator set Data PDU ++in order ++ ++Valid values: "enable" or "disable" ++qla4xxx does not support out-of-order Data PDUs. ++ ++erl ++--- ++Error Recovery Level ++ ++This attribute specifies error recovery level (ERL) supported by the ++connection. ++ ++Valid values: 2-bit value [0-2] ++ ++max_recv_dlength ++---------------- ++iSCSI Maximum Receive Data Segment Length. ++ ++This attribute specifies Maximum data segment length in bytes, that receive ++in an iSCSI PDU. ++ ++first_burst_len ++--------------- ++iSCSI First Burst Length ++ ++This attribute Specifies the maximum amount of unsolicited data an iSCSI ++initiator can send to the target during the execution of a single SCSI command, ++in bytes. ++ ++max_outstanding_r2t ++------------------- ++iSCSI Maximum Outstanding R2T ++ ++This attribute Specifies how many R2T PDUs per command can be outstanding ++during an iSCSI session. ++ ++max_burst_len ++------------- ++This attribute Specifies the maximum length for unsolicited or immediate data ++iSCSI session can send or receive. ++ ++chap_auth ++--------- ++When this attribute is set to enable iSCSI session performs authentication ++during the security state of login phase. ++ ++Valid values: "enable" or "disable" ++ ++bidi_chap ++--------- ++When this attribute is set to enable iSCSI session generates a CHAP challenge ++to any target that has issued a CHAP challenge to the iSCSI session. ++iSCSI session issues the challenge to the target after responding to the ++targets challenge. This attribute is ignored if chap_auth is set to disable. ++ ++Valid values: "enable" or "disable" ++ ++discovery_auth_optional ++----------------------- ++When this attribute is set to enable and the chap_auth is set to enable, ++iSCSI session does not require authentication on discovery sessions unless ++requested by the peer. When this attribute is set to disable iSCSI session ++requires CHAP authentication for a discovery session. ++ ++Valid values: "enable" or "disable" ++ ++discovery_logout ++---------------- ++When this attribute is set to enable, iSCSI initiator initiates an iSCSI logout ++on a discovery session when discovery is complete (before closing the connection). ++When this attribute is set to disable, iSCSI initiator closes the connection when ++discovery is complete. ++ ++Valid values: "enable" or "disable" ++ ++strict_login_comp_en ++-------------------- ++When this attribute is set to enable, iSCSI initiator enforces the iSCSI login ++negotiation rules. When this attribute is set to disable, iSCSI initiator does ++not enforce iSCSI login negotiation. ++ ++Valid values: "enable" or "disable" ++ ++initiator_name ++-------------- ++This Read-only attribute contains the iSCSI Name string used by the firmware. +-- +1.8.3.1 + diff --git a/0053-use-red-hat-for-name.patch b/0053-use-red-hat-for-name.patch deleted file mode 100644 index 8888200..0000000 --- a/0053-use-red-hat-for-name.patch +++ /dev/null @@ -1,25 +0,0 @@ -From bf7f9118ab2f1a5302dafa198d3351f6f977b7bd Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Mon, 19 Nov 2012 16:40:04 -0800 -Subject: use red hat for name - ---- - utils/iscsi-iname.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/utils/iscsi-iname.c b/utils/iscsi-iname.c -index 6347edc..cb2f6c8 100644 ---- a/utils/iscsi-iname.c -+++ b/utils/iscsi-iname.c -@@ -73,7 +73,7 @@ main(int argc, char *argv[]) - exit(0); - } - } else { -- prefix = "iqn.2005-03.org.open-iscsi"; -+ prefix = "iqn.1994-05.com.redhat"; - } - - /* try to feed some entropy from the pool to MD5 in order to get --- -1.7.11.7 - diff --git a/0054-add-libiscsi.patch b/0054-add-libiscsi.patch deleted file mode 100644 index e3d2324..0000000 --- a/0054-add-libiscsi.patch +++ /dev/null @@ -1,3927 +0,0 @@ -From 38800fb6984ca4c3ad963708c47c1946c33b6d1a Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Mon, 19 Nov 2012 16:43:15 -0800 -Subject: add libiscsi - ---- - Makefile | 2 + - libiscsi/Makefile | 61 ++ - libiscsi/libiscsi.c | 620 +++++++++++ - libiscsi/libiscsi.doxy | 1473 +++++++++++++++++++++++++++ - libiscsi/libiscsi.h | 344 +++++++ - libiscsi/pylibiscsi.c | 638 ++++++++++++ - libiscsi/setup.py | 9 + - libiscsi/tests/test_discovery_firmware.c | 53 + - libiscsi/tests/test_discovery_sendtargets.c | 60 ++ - libiscsi/tests/test_get_auth.c | 70 ++ - libiscsi/tests/test_get_initiator_name.c | 38 + - libiscsi/tests/test_get_network_config.c | 45 + - libiscsi/tests/test_login.c | 52 + - libiscsi/tests/test_logout.c | 51 + - libiscsi/tests/test_params.c | 103 ++ - libiscsi/tests/test_set_auth.c | 58 ++ - usr/Makefile | 2 +- - usr/discovery.c | 5 + - usr/idbm.c | 6 +- - usr/idbm.h | 3 + - usr/iscsi_ipc.h | 2 + - 21 files changed, 3691 insertions(+), 4 deletions(-) - create mode 100644 libiscsi/Makefile - create mode 100644 libiscsi/libiscsi.c - create mode 100644 libiscsi/libiscsi.doxy - create mode 100644 libiscsi/libiscsi.h - create mode 100644 libiscsi/pylibiscsi.c - create mode 100644 libiscsi/setup.py - create mode 100644 libiscsi/tests/test_discovery_firmware.c - create mode 100644 libiscsi/tests/test_discovery_sendtargets.c - create mode 100644 libiscsi/tests/test_get_auth.c - create mode 100644 libiscsi/tests/test_get_initiator_name.c - create mode 100644 libiscsi/tests/test_get_network_config.c - create mode 100644 libiscsi/tests/test_login.c - create mode 100644 libiscsi/tests/test_logout.c - create mode 100644 libiscsi/tests/test_params.c - create mode 100644 libiscsi/tests/test_set_auth.c - -diff --git a/Makefile b/Makefile -index 0b7bb98..02346bf 100644 ---- a/Makefile -+++ b/Makefile -@@ -33,6 +33,7 @@ user: utils/open-isns/Makefile iscsiuio/Makefile - $(MAKE) -C usr - $(MAKE) -C utils - $(MAKE) -C iscsiuio -+ $(MAKE) -C libiscsi - @echo - @echo "Compilation complete Output file" - @echo "----------------------------------- ----------------" -@@ -61,6 +62,7 @@ kernel: force - force: ; - - clean: -+ $(MAKE) -C libiscsi clean - $(MAKE) -C utils/sysdeps clean - $(MAKE) -C utils/fwparam_ibft clean - $(MAKE) -C utils clean -diff --git a/libiscsi/Makefile b/libiscsi/Makefile -new file mode 100644 -index 0000000..317a7ec ---- /dev/null -+++ b/libiscsi/Makefile -@@ -0,0 +1,61 @@ -+# This Makefile will work only with GNU make. -+ -+OSNAME=$(shell uname -s) -+OPTFLAGS ?= -O2 -g -+WARNFLAGS ?= -Wall -Wstrict-prototypes -+CFLAGS = $(OPTFLAGS) $(WARNFLAGS) -I../include -I../usr \ -+ -D$(OSNAME) -fPIC -D_GNU_SOURCE -fvisibility=hidden -+LIB = libiscsi.so.0 -+TESTS = tests/test_discovery_sendtargets tests/test_discovery_firmware -+TESTS += tests/test_login tests/test_logout tests/test_params -+TESTS += tests/test_get_network_config tests/test_get_initiator_name -+TESTS += tests/test_set_auth tests/test_get_auth -+ -+COMMON_SRCS = sysdeps.o -+# sources shared between iscsid, iscsiadm and iscsistart -+ISCSI_LIB_SRCS = netlink.o transport.o cxgbi.o be2iscsi.o iscsi_timer.o initiator_common.o iscsi_err.o session_info.o iscsi_util.o io.o auth.o discovery.o login.o log.o md5.o sha1.o iface.o idbm.o sysfs.o iscsi_sysfs.o iscsi_net_util.o iscsid_req.o iser.o uip_mgmt_ipc.o -+FW_PARAM_SRCS = fw_entry.o prom_lex.o prom_parse.tab.o fwparam_ppc.o fwparam_sysfs.o -+ -+# sources shared with the userspace utils, note we build these separately -+# to get PIC versions. -+COMMON_OBJS = $(patsubst %.o, common-objs/%.o, $(COMMON_SRCS)) -+USR_OBJS = $(patsubst %.o, usr-objs/%.o, $(ISCSI_LIB_SRCS) strings.o) -+FW_OBJS = $(patsubst %.o, fw-objs/%.o, $(FW_PARAM_SRCS)) -+ -+# Flags for the tests -+tests/% : CFLAGS = $(OPTFLAGS) $(WARNFLAGS) -I. -+ -+all: lib tests html -+ -+lib: $(LIB) -+tests: $(TESTS) -+ -+common-objs/%.o: ../utils/sysdeps/%.c -+ mkdir -p common-objs -+ $(CC) $(CFLAGS) -c $< -o $@ -+ -+usr-objs/%.o: ../usr/%.c -+ mkdir -p usr-objs -+ $(CC) $(CFLAGS) -c $< -o $@ -+ -+fw-objs/%.o: ../utils/fwparam_ibft/%.c -+ mkdir -p fw-objs -+ $(CC) $(CFLAGS) -c $< -o $@ -+ -+$(LIB): $(COMMON_OBJS) $(FW_OBJS) $(USR_OBJS) libiscsi.o -+ $(CC) $(CFLAGS) -shared -Wl,-soname,$(LIB) $^ -o $@ -+ ln -s -f $(LIB) libiscsi.so -+ -+$(TESTS): $(FW_OBJS) $(COMMON_OBJS) $(USR_OBJS) $(LIB) -+ -+html: libiscsi.h libiscsi.doxy -+ doxygen libiscsi.doxy -+ -+clean: -+ rm -rf *.o common-objs usr-objs fw-objs libuip-objs libiscsi.so* \ -+ .depend *~ html $(TESTS) tests/*~ -+ -+depend: -+ gcc $(CFLAGS) -M `ls *.c` > .depend -+ -+-include .depend ../usr/.depend -diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c -new file mode 100644 -index 0000000..2a176e8 ---- /dev/null -+++ b/libiscsi/libiscsi.c -@@ -0,0 +1,620 @@ -+/* -+ * iSCSI Administration library -+ * -+ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. -+ * Copyright (C) 2008-2009 Hans de Goede -+ * maintained by open-iscsi@googlegroups.com -+ * -+ * 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 2 of the License, 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. -+ * -+ * See the file COPYING included with this distribution for more details. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include "libiscsi.h" -+#include "idbm.h" -+#include "discovery.h" -+#include "log.h" -+#include "sysfs.h" -+#include "iscsi_sysfs.h" -+#include "session_info.h" -+#include "iscsi_util.h" -+#include "sysdeps.h" -+#include "iface.h" -+#include "iscsi_proto.h" -+#include "fw_context.h" -+#include "iscsid_req.h" -+#include "iscsi_err.h" -+ -+#define CHECK(a) { context->error_str[0] = 0; rc = a; if (rc) goto leave; } -+ -+/* UGLY, not thread safe :( */ -+static int sysfs_initialized = 0; -+ -+struct libiscsi_context { -+ char error_str[256]; -+ /* For get_parameter_helper() */ -+ const char *parameter; -+ char *value; -+}; -+ -+static void libiscsi_log(int prio, void *priv, const char *fmt, va_list ap) -+{ -+ struct libiscsi_context *context = priv; -+ -+ if (prio > LOG_ERR) /* We are only interested in errors (or worse) */ -+ return; -+ -+ vsnprintf(context->error_str, sizeof(context->error_str), fmt, ap); -+} -+ -+struct libiscsi_context *libiscsi_init(void) -+{ -+ struct libiscsi_context *context; -+ -+ context = calloc(1, sizeof *context); -+ if (!context) -+ return NULL; -+ -+ log_init("libiscsi", 1024, libiscsi_log, context); -+ if (!sysfs_initialized) { -+ sysfs_init(); -+ sysfs_initialized = 1; -+ } -+ increase_max_files(); -+ if (idbm_init(NULL)) { -+ sysfs_cleanup(); -+ free(context); -+ return NULL; -+ } -+ -+ iface_setup_host_bindings(); -+ -+ return context; -+} -+ -+void libiscsi_cleanup(struct libiscsi_context *context) -+{ -+ idbm_terminate(); -+ free_transports(); -+ sysfs_cleanup(); -+ free(context); -+} -+ -+static void free_iface_list(struct list_head *ifaces) -+{ -+ struct iface_rec *iface, *tmp_iface; -+ -+ list_for_each_entry_safe(iface, tmp_iface, ifaces, list) { -+ list_del(&iface->list); -+ free(iface); -+ } -+} -+ -+static void free_rec_list(struct list_head *rec_list) -+{ -+ struct node_rec *rec, *tmp; -+ -+ list_for_each_entry_safe(rec, tmp, rec_list, list) { -+ list_del(&rec->list); -+ free(rec); -+ } -+} -+ -+int libiscsi_discover_sendtargets(struct libiscsi_context *context, -+ const char *address, int port, -+ const struct libiscsi_auth_info *auth_info, -+ int *nr_found, struct libiscsi_node **found_nodes) -+{ -+ struct discovery_rec drec; -+ LIST_HEAD(bound_rec_list); -+ struct node_rec *rec; -+ int rc = 0, found = 0; -+ -+ INIT_LIST_HEAD(&bound_rec_list); -+ -+ if (nr_found) -+ *nr_found = 0; -+ if (found_nodes) -+ *found_nodes = NULL; -+ -+ CHECK(libiscsi_verify_auth_info(context, auth_info)) -+ -+ /* Fill the drec struct with all needed info */ -+ memset(&drec, 0, sizeof drec); -+ idbm_sendtargets_defaults(&drec.u.sendtargets); -+ drec.type = DISCOVERY_TYPE_SENDTARGETS; -+ strlcpy(drec.address, address, sizeof(drec.address)); -+ drec.port = port ? port : ISCSI_LISTEN_PORT; -+ switch(auth_info ? auth_info->method : libiscsi_auth_none) { -+ case libiscsi_auth_chap: -+ drec.u.sendtargets.auth.authmethod = AUTH_METHOD_CHAP; -+ strlcpy(drec.u.sendtargets.auth.username, -+ auth_info->chap.username, AUTH_STR_MAX_LEN); -+ strlcpy((char *)drec.u.sendtargets.auth.password, -+ auth_info->chap.password, AUTH_STR_MAX_LEN); -+ drec.u.sendtargets.auth.password_length = -+ strlen((char *)drec.u.sendtargets.auth.password); -+ strlcpy(drec.u.sendtargets.auth.username_in, -+ auth_info->chap.reverse_username, AUTH_STR_MAX_LEN); -+ strlcpy((char *)drec.u.sendtargets.auth.password_in, -+ auth_info->chap.reverse_password, AUTH_STR_MAX_LEN); -+ drec.u.sendtargets.auth.password_in_length = -+ strlen((char *)drec.u.sendtargets.auth.password_in); -+ break; -+ } -+ -+ CHECK(idbm_add_discovery(&drec)) -+ -+ CHECK(idbm_bind_ifaces_to_nodes(discovery_sendtargets, -+ &drec, NULL, &bound_rec_list)) -+ -+ /* now add/update records */ -+ list_for_each_entry(rec, &bound_rec_list, list) { -+ CHECK(idbm_add_node(rec, &drec, 1 /* overwrite */)) -+ found++; -+ } -+ -+ if (nr_found) -+ *nr_found = found; -+ -+ if (found_nodes && found) { -+ *found_nodes = calloc(found, sizeof **found_nodes); -+ if (*found_nodes == NULL) { -+ snprintf(context->error_str, -+ sizeof(context->error_str), strerror(ENOMEM)); -+ rc = ENOMEM; -+ goto leave; -+ } -+ found = 0; -+ list_for_each_entry(rec, &bound_rec_list, list) { -+ strlcpy((*found_nodes)[found].name, rec->name, -+ LIBISCSI_VALUE_MAXLEN); -+ (*found_nodes)[found].tpgt = rec->tpgt; -+ strlcpy((*found_nodes)[found].address, -+ rec->conn[0].address, NI_MAXHOST); -+ (*found_nodes)[found].port = rec->conn[0].port; -+ strlcpy((*found_nodes)[found].iface, -+ rec->iface.name, LIBISCSI_VALUE_MAXLEN); -+ found++; -+ } -+ } -+ -+leave: -+ free_rec_list(&bound_rec_list); -+ return rc; -+} -+ -+int libiscsi_discover_firmware(struct libiscsi_context *context, -+ int *nr_found, struct libiscsi_node **found_nodes) -+{ -+ struct list_head targets, ifaces, rec_list; -+ discovery_rec_t drec; -+ int rc = 0; -+ -+ INIT_LIST_HEAD(&targets); -+ INIT_LIST_HEAD(&ifaces); -+ INIT_LIST_HEAD(&rec_list); -+ -+ if (nr_found) { -+ *nr_found = 0; -+ } -+ -+ if (found_nodes) { -+ *found_nodes = NULL; -+ } -+ -+ rc = fw_get_targets(&targets); -+ if (rc) { -+ log_error("%s: Could not get list of targets from firmware " -+ "(err %d).\n", __func__, rc); -+ return rc; -+ } -+ -+ CHECK(iface_create_ifaces_from_boot_contexts(&ifaces, &targets)); -+ -+ memset(&drec, 0, sizeof(drec)); -+ drec.type = DISCOVERY_TYPE_FW; -+ rc = idbm_bind_ifaces_to_nodes(discovery_fw, &drec, &ifaces, &rec_list); -+ if (rc) { -+ log_error("%s: Could not determine target nodes from firmware " -+ "(err %d).\n", __func__, rc); -+ goto leave; -+ } -+ -+ int node_count = 0; -+ struct list_head *pos; -+ list_for_each(pos, &rec_list) { -+ ++node_count; -+ } -+ -+ struct libiscsi_node* new_nodes; -+ /* allocate enough space for all the nodes */ -+ new_nodes = calloc(node_count, sizeof *new_nodes); -+ if (new_nodes == NULL) { -+ rc = ENOMEM; -+ log_error("%s: %s.\n", __func__, strerror(ENOMEM)); -+ goto leave; -+ } -+ -+ struct node_rec *rec; -+ struct libiscsi_node *new_node = new_nodes; -+ /* in one loop, add nodes to idbm and create libiscsi_node entries */ -+ list_for_each_entry(rec, &rec_list, list) { -+ CHECK(idbm_add_node(rec, NULL, 1 /* overwrite */)); -+ -+ strlcpy(new_node->name, rec->name, LIBISCSI_VALUE_MAXLEN); -+ new_node->tpgt = rec->tpgt; -+ strlcpy(new_node->address, rec->conn[0].address, NI_MAXHOST); -+ new_node->port = rec->conn[0].port; -+ strlcpy(new_node->iface, rec->iface.name, LIBISCSI_VALUE_MAXLEN); -+ -+ ++new_node; -+ } -+ -+ /* update output parameters */ -+ if (nr_found) { -+ *nr_found = node_count; -+ } -+ if (found_nodes) { -+ *found_nodes = new_nodes; -+ } -+ -+leave: -+ fw_free_targets(&targets); -+ -+ free_iface_list(&ifaces); -+ free_rec_list(&rec_list); -+ -+ return rc; -+} -+ -+int libiscsi_verify_auth_info(struct libiscsi_context *context, -+ const struct libiscsi_auth_info *auth_info) -+{ -+ switch(auth_info ? auth_info->method : libiscsi_auth_none) { -+ case libiscsi_auth_none: -+ break; -+ case libiscsi_auth_chap: -+ if (!auth_info->chap.username[0]) { -+ strcpy(context->error_str, "Empty username"); -+ return EINVAL; -+ } -+ if (!auth_info->chap.password[0]) { -+ strcpy(context->error_str, "Empty password"); -+ return EINVAL; -+ } -+ if (auth_info->chap.reverse_username[0] && -+ !auth_info->chap.reverse_password[0]) { -+ strcpy(context->error_str, "Empty reverse password"); -+ return EINVAL; -+ } -+ break; -+ default: -+ sprintf(context->error_str, -+ "Invalid authentication method: %d", -+ (int)auth_info->method); -+ return EINVAL; -+ } -+ return 0; -+} -+ -+int libiscsi_node_set_auth(struct libiscsi_context *context, -+ const struct libiscsi_node *node, -+ const struct libiscsi_auth_info *auth_info) -+{ -+ int rc = 0; -+ -+ CHECK(libiscsi_verify_auth_info(context, auth_info)) -+ -+ switch(auth_info ? auth_info->method : libiscsi_auth_none) { -+ case libiscsi_auth_none: -+ CHECK(libiscsi_node_set_parameter(context, node, -+ "node.session.auth.authmethod", "None")) -+ CHECK(libiscsi_node_set_parameter(context, node, -+ "node.session.auth.username", "")) -+ CHECK(libiscsi_node_set_parameter(context, node, -+ "node.session.auth.password", "")) -+ CHECK(libiscsi_node_set_parameter(context, node, -+ "node.session.auth.username_in", "")) -+ CHECK(libiscsi_node_set_parameter(context, node, -+ "node.session.auth.password_in", "")) -+ break; -+ -+ case libiscsi_auth_chap: -+ CHECK(libiscsi_node_set_parameter(context, node, -+ "node.session.auth.authmethod", "CHAP")) -+ CHECK(libiscsi_node_set_parameter(context, node, -+ "node.session.auth.username", -+ auth_info->chap.username)) -+ CHECK(libiscsi_node_set_parameter(context, node, -+ "node.session.auth.password", -+ auth_info->chap.password)) -+ CHECK(libiscsi_node_set_parameter(context, node, -+ "node.session.auth.username_in", -+ auth_info->chap.reverse_username)) -+ CHECK(libiscsi_node_set_parameter(context, node, -+ "node.session.auth.password_in", -+ auth_info->chap.reverse_password)) -+ break; -+ } -+leave: -+ return rc; -+} -+ -+int libiscsi_node_get_auth(struct libiscsi_context *context, -+ const struct libiscsi_node *node, -+ struct libiscsi_auth_info *auth_info) -+{ -+ int rc = 0; -+ char value[LIBISCSI_VALUE_MAXLEN]; -+ -+ memset(auth_info, 0, sizeof *auth_info); -+ -+ CHECK(libiscsi_node_get_parameter(context, node, -+ "node.session.auth.authmethod", value)) -+ -+ if (!strcmp(value, "None")) { -+ auth_info->method = libiscsi_auth_none; -+ } else if (!strcmp(value, "CHAP")) { -+ auth_info->method = libiscsi_auth_chap; -+ CHECK(libiscsi_node_get_parameter(context, node, -+ "node.session.auth.username", -+ auth_info->chap.username)) -+ CHECK(libiscsi_node_get_parameter(context, node, -+ "node.session.auth.password", -+ auth_info->chap.password)) -+ CHECK(libiscsi_node_get_parameter(context, node, -+ "node.session.auth.username_in", -+ auth_info->chap.reverse_username)) -+ CHECK(libiscsi_node_get_parameter(context, node, -+ "node.session.auth.password_in", -+ auth_info->chap.reverse_password)) -+ } else { -+ snprintf(context->error_str, sizeof(context->error_str), -+ "unknown authentication method: %s", value); -+ rc = EINVAL; -+ } -+leave: -+ return rc; -+} -+ -+static void node_to_rec(const struct libiscsi_node *node, -+ struct node_rec *rec) -+{ -+ memset(rec, 0, sizeof *rec); -+ idbm_node_setup_defaults(rec); -+ strlcpy(rec->name, node->name, TARGET_NAME_MAXLEN); -+ rec->tpgt = node->tpgt; -+ strlcpy(rec->conn[0].address, node->address, NI_MAXHOST); -+ rec->conn[0].port = node->port; -+} -+ -+int login_helper(void *data, node_rec_t *rec) -+{ -+ char *iface = (char*)data; -+ if (strcmp(iface, rec->iface.name)) -+ /* different iface, skip it */ -+ return -1; -+ -+ int rc = iscsid_req_by_rec(MGMT_IPC_SESSION_LOGIN, rec); -+ if (rc) { -+ iscsi_err_print_msg(rc); -+ rc = ENOTCONN; -+ } -+ return rc; -+} -+ -+int libiscsi_node_login(struct libiscsi_context *context, -+ const struct libiscsi_node *node) -+{ -+ int nr_found = 0, rc; -+ -+ CHECK(idbm_for_each_iface(&nr_found, (void*)node->iface, login_helper, -+ (char *)node->name, node->tpgt, -+ (char *)node->address, node->port)) -+ if (nr_found == 0) { -+ strcpy(context->error_str, "No such node"); -+ rc = ENODEV; -+ } -+leave: -+ return rc; -+} -+ -+static int logout_helper(void *data, struct session_info *info) -+{ -+ int rc; -+ struct node_rec *rec = data; -+ -+ if (!iscsi_match_session(rec, info)) -+ /* Tell iscsi_sysfs_for_each_session this session was not a -+ match so that it will not increase nr_found. */ -+ return -1; -+ -+ rc = iscsid_req_by_sid(MGMT_IPC_SESSION_LOGOUT, info->sid); -+ if (rc) { -+ iscsi_err_print_msg(rc); -+ rc = EIO; -+ } -+ -+ return rc; -+} -+ -+int libiscsi_node_logout(struct libiscsi_context *context, -+ const struct libiscsi_node *node) -+{ -+ int nr_found = 0, rc; -+ struct node_rec rec; -+ -+ node_to_rec(node, &rec); -+ CHECK(iscsi_sysfs_for_each_session(&rec, &nr_found, logout_helper,0)) -+ if (nr_found == 0) { -+ strcpy(context->error_str, "No matching session"); -+ rc = ENODEV; -+ } -+leave: -+ return rc; -+} -+ -+int libiscsi_node_set_parameter(struct libiscsi_context *context, -+ const struct libiscsi_node *node, -+ const char *parameter, const char *value) -+{ -+ int nr_found = 0, rc; -+ struct user_param *param; -+ struct list_head params; -+ -+ INIT_LIST_HEAD(¶ms); -+ param = idbm_alloc_user_param(parameter, value); -+ if (!param) { -+ rc = ENOMEM; -+ goto leave; -+ } -+ list_add_tail(¶ms, ¶m->list); -+ -+ CHECK(idbm_for_each_iface(&nr_found, ¶ms, idbm_node_set_param, -+ (char *)node->name, node->tpgt, -+ (char *)node->address, node->port)) -+ if (nr_found == 0) { -+ strcpy(context->error_str, "No such node"); -+ rc = ENODEV; -+ } -+ free(param->name); -+ free(param); -+leave: -+ return rc; -+} -+ -+static int get_parameter_helper(void *data, node_rec_t *rec) -+{ -+ struct libiscsi_context *context = data; -+ recinfo_t *info; -+ int i; -+ -+ info = idbm_recinfo_alloc(MAX_KEYS); -+ if (!info) { -+ snprintf(context->error_str, sizeof(context->error_str), -+ strerror(ENOMEM)); -+ return ENOMEM; -+ } -+ -+ idbm_recinfo_node(rec, info); -+ -+ for (i = 0; i < MAX_KEYS; i++) { -+ if (!info[i].visible) -+ continue; -+ -+ if (strcmp(context->parameter, info[i].name)) -+ continue; -+ -+ strlcpy(context->value, info[i].value, LIBISCSI_VALUE_MAXLEN); -+ break; -+ } -+ -+ free(info); -+ -+ if (i == MAX_KEYS) { -+ strcpy(context->error_str, "No such parameter"); -+ return EINVAL; -+ } -+ -+ return 0; -+} -+ -+int libiscsi_node_get_parameter(struct libiscsi_context *context, -+ const struct libiscsi_node *node, const char *parameter, char *value) -+{ -+ int nr_found = 0, rc = 0; -+ -+ context->parameter = parameter; -+ context->value = value; -+ -+ /* Note we assume there is only one interface, if not we will get -+ the value from the last interface iterated over! -+ This (multiple interfaces) can only happen if someone explicitly -+ created ones using iscsiadm. Even then this should not be a problem -+ as most settings should be the same independent of the iface. */ -+ CHECK(idbm_for_each_iface(&nr_found, context, get_parameter_helper, -+ (char *)node->name, node->tpgt, -+ (char *)node->address, node->port)) -+ if (nr_found == 0) { -+ strcpy(context->error_str, "No such node"); -+ rc = ENODEV; -+ } -+leave: -+ return rc; -+} -+ -+const char *libiscsi_get_error_string(struct libiscsi_context *context) -+{ -+ /* Sometimes the core open-iscsi code does not give us an error -+ message */ -+ if (!context->error_str[0]) -+ return "Unknown error"; -+ -+ return context->error_str; -+} -+ -+ -+/************************** Utility functions *******************************/ -+ -+int libiscsi_get_firmware_network_config( -+ struct libiscsi_network_config *config) -+{ -+ struct boot_context fw_entry; -+ -+ if (!sysfs_initialized) { -+ sysfs_init(); -+ sysfs_initialized = 1; -+ } -+ -+ memset(config, 0, sizeof *config); -+ memset(&fw_entry, 0, sizeof fw_entry); -+ if (fw_get_entry(&fw_entry)) -+ return ENODEV; -+ -+ config->dhcp = strlen(fw_entry.dhcp) ? 1 : 0; -+ strncpy(config->iface_name, fw_entry.iface, sizeof fw_entry.iface); -+ strncpy(config->mac_address, fw_entry.mac, sizeof fw_entry.mac); -+ strncpy(config->ip_address, fw_entry.ipaddr, sizeof fw_entry.ipaddr); -+ strncpy(config->netmask, fw_entry.mask, sizeof fw_entry.mask); -+ strncpy(config->gateway, fw_entry.gateway, sizeof fw_entry.gateway); -+ strncpy(config->primary_dns, fw_entry.primary_dns, -+ sizeof fw_entry.primary_dns); -+ strncpy(config->secondary_dns, fw_entry.secondary_dns, -+ sizeof fw_entry.secondary_dns); -+ return 0; -+} -+ -+int libiscsi_get_firmware_initiator_name(char *initiatorname) -+{ -+ struct boot_context fw_entry; -+ -+ if (!sysfs_initialized) { -+ sysfs_init(); -+ sysfs_initialized = 1; -+ } -+ -+ memset(initiatorname, 0, LIBISCSI_VALUE_MAXLEN); -+ memset(&fw_entry, 0, sizeof fw_entry); -+ if (fw_get_entry(&fw_entry)) -+ return ENODEV; -+ -+ strncpy(initiatorname, fw_entry.initiatorname, -+ sizeof fw_entry.initiatorname); -+ -+ return 0; -+} -diff --git a/libiscsi/libiscsi.doxy b/libiscsi/libiscsi.doxy -new file mode 100644 -index 0000000..663770f ---- /dev/null -+++ b/libiscsi/libiscsi.doxy -@@ -0,0 +1,1473 @@ -+# Doxyfile 1.5.7.1 -+ -+# This file describes the settings to be used by the documentation system -+# doxygen (www.doxygen.org) for a project -+# -+# All text after a hash (#) is considered a comment and will be ignored -+# The format is: -+# TAG = value [value, ...] -+# For lists items can also be appended using: -+# TAG += value [value, ...] -+# Values that contain spaces should be placed between quotes (" ") -+ -+#--------------------------------------------------------------------------- -+# Project related configuration options -+#--------------------------------------------------------------------------- -+ -+# This tag specifies the encoding used for all characters in the config file -+# that follow. The default is UTF-8 which is also the encoding used for all -+# text before the first occurrence of this tag. Doxygen uses libiconv (or the -+# iconv built into libc) for the transcoding. See -+# http://www.gnu.org/software/libiconv for the list of possible encodings. -+ -+DOXYFILE_ENCODING = UTF-8 -+ -+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -+# by quotes) that should identify the project. -+ -+PROJECT_NAME = libiscsi -+ -+# The PROJECT_NUMBER tag can be used to enter a project or revision number. -+# This could be handy for archiving the generated documentation or -+# if some version control system is used. -+ -+PROJECT_NUMBER = -+ -+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -+# base path where the generated documentation will be put. -+# If a relative path is entered, it will be relative to the location -+# where doxygen was started. If left blank the current directory will be used. -+ -+OUTPUT_DIRECTORY = -+ -+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -+# 4096 sub-directories (in 2 levels) under the output directory of each output -+# format and will distribute the generated files over these directories. -+# Enabling this option can be useful when feeding doxygen a huge amount of -+# source files, where putting all generated files in the same directory would -+# otherwise cause performance problems for the file system. -+ -+CREATE_SUBDIRS = NO -+ -+# The OUTPUT_LANGUAGE tag is used to specify the language in which all -+# documentation generated by doxygen is written. Doxygen will use this -+# information to generate all constant output in the proper language. -+# The default language is English, other supported languages are: -+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -+# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -+# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -+# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -+# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, -+# Spanish, Swedish, and Ukrainian. -+ -+OUTPUT_LANGUAGE = English -+ -+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -+# include brief member descriptions after the members that are listed in -+# the file and class documentation (similar to JavaDoc). -+# Set to NO to disable this. -+ -+BRIEF_MEMBER_DESC = YES -+ -+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -+# the brief description of a member or function before the detailed description. -+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -+# brief descriptions will be completely suppressed. -+ -+REPEAT_BRIEF = NO -+ -+# This tag implements a quasi-intelligent brief description abbreviator -+# that is used to form the text in various listings. Each string -+# in this list, if found as the leading text of the brief description, will be -+# stripped from the text and the result after processing the whole list, is -+# used as the annotated text. Otherwise, the brief description is used as-is. -+# If left blank, the following values are used ("$name" is automatically -+# replaced with the name of the entity): "The $name class" "The $name widget" -+# "The $name file" "is" "provides" "specifies" "contains" -+# "represents" "a" "an" "the" -+ -+ABBREVIATE_BRIEF = -+ -+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -+# Doxygen will generate a detailed section even if there is only a brief -+# description. -+ -+ALWAYS_DETAILED_SEC = YES -+ -+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -+# inherited members of a class in the documentation of that class as if those -+# members were ordinary class members. Constructors, destructors and assignment -+# operators of the base classes will not be shown. -+ -+INLINE_INHERITED_MEMB = NO -+ -+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -+# path before files name in the file list and in the header files. If set -+# to NO the shortest path that makes the file name unique will be used. -+ -+FULL_PATH_NAMES = YES -+ -+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -+# can be used to strip a user-defined part of the path. Stripping is -+# only done if one of the specified strings matches the left-hand part of -+# the path. The tag can be used to show relative paths in the file list. -+# If left blank the directory from which doxygen is run is used as the -+# path to strip. -+ -+STRIP_FROM_PATH = -+ -+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -+# the path mentioned in the documentation of a class, which tells -+# the reader which header file to include in order to use a class. -+# If left blank only the name of the header file containing the class -+# definition is used. Otherwise one should specify the include paths that -+# are normally passed to the compiler using the -I flag. -+ -+STRIP_FROM_INC_PATH = -+ -+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -+# (but less readable) file names. This can be useful is your file systems -+# doesn't support long names like on DOS, Mac, or CD-ROM. -+ -+SHORT_NAMES = NO -+ -+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -+# will interpret the first line (until the first dot) of a JavaDoc-style -+# comment as the brief description. If set to NO, the JavaDoc -+# comments will behave just like regular Qt-style comments -+# (thus requiring an explicit @brief command for a brief description.) -+ -+JAVADOC_AUTOBRIEF = NO -+ -+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -+# interpret the first line (until the first dot) of a Qt-style -+# comment as the brief description. If set to NO, the comments -+# will behave just like regular Qt-style comments (thus requiring -+# an explicit \brief command for a brief description.) -+ -+QT_AUTOBRIEF = NO -+ -+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -+# treat a multi-line C++ special comment block (i.e. a block of //! or /// -+# comments) as a brief description. This used to be the default behaviour. -+# The new default is to treat a multi-line C++ comment block as a detailed -+# description. Set this tag to YES if you prefer the old behaviour instead. -+ -+MULTILINE_CPP_IS_BRIEF = NO -+ -+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -+# member inherits the documentation from any documented member that it -+# re-implements. -+ -+INHERIT_DOCS = YES -+ -+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -+# a new page for each member. If set to NO, the documentation of a member will -+# be part of the file/class/namespace that contains it. -+ -+SEPARATE_MEMBER_PAGES = NO -+ -+# The TAB_SIZE tag can be used to set the number of spaces in a tab. -+# Doxygen uses this value to replace tabs by spaces in code fragments. -+ -+TAB_SIZE = 8 -+ -+# This tag can be used to specify a number of aliases that acts -+# as commands in the documentation. An alias has the form "name=value". -+# For example adding "sideeffect=\par Side Effects:\n" will allow you to -+# put the command \sideeffect (or @sideeffect) in the documentation, which -+# will result in a user-defined paragraph with heading "Side Effects:". -+# You can put \n's in the value part of an alias to insert newlines. -+ -+ALIASES = -+ -+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -+# sources only. Doxygen will then generate output that is more tailored for C. -+# For instance, some of the names that are used will be different. The list -+# of all members will be omitted, etc. -+ -+OPTIMIZE_OUTPUT_FOR_C = YES -+ -+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -+# sources only. Doxygen will then generate output that is more tailored for -+# Java. For instance, namespaces will be presented as packages, qualified -+# scopes will look different, etc. -+ -+OPTIMIZE_OUTPUT_JAVA = NO -+ -+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -+# sources only. Doxygen will then generate output that is more tailored for -+# Fortran. -+ -+OPTIMIZE_FOR_FORTRAN = NO -+ -+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -+# sources. Doxygen will then generate output that is tailored for -+# VHDL. -+ -+OPTIMIZE_OUTPUT_VHDL = NO -+ -+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -+# to include (a tag file for) the STL sources as input, then you should -+# set this tag to YES in order to let doxygen match functions declarations and -+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -+# func(std::string) {}). This also make the inheritance and collaboration -+# diagrams that involve STL classes more complete and accurate. -+ -+BUILTIN_STL_SUPPORT = NO -+ -+# If you use Microsoft's C++/CLI language, you should set this option to YES to -+# enable parsing support. -+ -+CPP_CLI_SUPPORT = NO -+ -+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -+# Doxygen will parse them like normal C++ but will assume all classes use public -+# instead of private inheritance when no explicit protection keyword is present. -+ -+SIP_SUPPORT = NO -+ -+# For Microsoft's IDL there are propget and propput attributes to indicate getter -+# and setter methods for a property. Setting this option to YES (the default) -+# will make doxygen to replace the get and set methods by a property in the -+# documentation. This will only work if the methods are indeed getting or -+# setting a simple type. If this is not the case, or you want to show the -+# methods anyway, you should set this option to NO. -+ -+IDL_PROPERTY_SUPPORT = YES -+ -+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -+# tag is set to YES, then doxygen will reuse the documentation of the first -+# member in the group (if any) for the other members of the group. By default -+# all members of a group must be documented explicitly. -+ -+DISTRIBUTE_GROUP_DOC = NO -+ -+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -+# the same type (for instance a group of public functions) to be put as a -+# subgroup of that type (e.g. under the Public Functions section). Set it to -+# NO to prevent subgrouping. Alternatively, this can be done per class using -+# the \nosubgrouping command. -+ -+SUBGROUPING = YES -+ -+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -+# is documented as struct, union, or enum with the name of the typedef. So -+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -+# with name TypeT. When disabled the typedef will appear as a member of a file, -+# namespace, or class. And the struct will be named TypeS. This can typically -+# be useful for C code in case the coding convention dictates that all compound -+# types are typedef'ed and only the typedef is referenced, never the tag name. -+ -+TYPEDEF_HIDES_STRUCT = NO -+ -+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -+# determine which symbols to keep in memory and which to flush to disk. -+# When the cache is full, less often used symbols will be written to disk. -+# For small to medium size projects (<1000 input files) the default value is -+# probably good enough. For larger projects a too small cache size can cause -+# doxygen to be busy swapping symbols to and from disk most of the time -+# causing a significant performance penality. -+# If the system has enough physical memory increasing the cache will improve the -+# performance by keeping more symbols in memory. Note that the value works on -+# a logarithmic scale so increasing the size by one will rougly double the -+# memory usage. The cache size is given by this formula: -+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -+# corresponding to a cache size of 2^16 = 65536 symbols -+ -+SYMBOL_CACHE_SIZE = 0 -+ -+#--------------------------------------------------------------------------- -+# Build related configuration options -+#--------------------------------------------------------------------------- -+ -+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -+# documentation are documented, even if no documentation was available. -+# Private class members and static file members will be hidden unless -+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES -+ -+EXTRACT_ALL = YES -+ -+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -+# will be included in the documentation. -+ -+EXTRACT_PRIVATE = NO -+ -+# If the EXTRACT_STATIC tag is set to YES all static members of a file -+# will be included in the documentation. -+ -+EXTRACT_STATIC = NO -+ -+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -+# defined locally in source files will be included in the documentation. -+# If set to NO only classes defined in header files are included. -+ -+EXTRACT_LOCAL_CLASSES = YES -+ -+# This flag is only useful for Objective-C code. When set to YES local -+# methods, which are defined in the implementation section but not in -+# the interface are included in the documentation. -+# If set to NO (the default) only methods in the interface are included. -+ -+EXTRACT_LOCAL_METHODS = NO -+ -+# If this flag is set to YES, the members of anonymous namespaces will be -+# extracted and appear in the documentation as a namespace called -+# 'anonymous_namespace{file}', where file will be replaced with the base -+# name of the file that contains the anonymous namespace. By default -+# anonymous namespace are hidden. -+ -+EXTRACT_ANON_NSPACES = NO -+ -+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -+# undocumented members of documented classes, files or namespaces. -+# If set to NO (the default) these members will be included in the -+# various overviews, but no documentation section is generated. -+# This option has no effect if EXTRACT_ALL is enabled. -+ -+HIDE_UNDOC_MEMBERS = NO -+ -+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -+# undocumented classes that are normally visible in the class hierarchy. -+# If set to NO (the default) these classes will be included in the various -+# overviews. This option has no effect if EXTRACT_ALL is enabled. -+ -+HIDE_UNDOC_CLASSES = NO -+ -+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -+# friend (class|struct|union) declarations. -+# If set to NO (the default) these declarations will be included in the -+# documentation. -+ -+HIDE_FRIEND_COMPOUNDS = NO -+ -+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -+# documentation blocks found inside the body of a function. -+# If set to NO (the default) these blocks will be appended to the -+# function's detailed documentation block. -+ -+HIDE_IN_BODY_DOCS = NO -+ -+# The INTERNAL_DOCS tag determines if documentation -+# that is typed after a \internal command is included. If the tag is set -+# to NO (the default) then the documentation will be excluded. -+# Set it to YES to include the internal documentation. -+ -+INTERNAL_DOCS = NO -+ -+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -+# file names in lower-case letters. If set to YES upper-case letters are also -+# allowed. This is useful if you have classes or files whose names only differ -+# in case and if your file system supports case sensitive file names. Windows -+# and Mac users are advised to set this option to NO. -+ -+CASE_SENSE_NAMES = YES -+ -+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -+# will show members with their full class and namespace scopes in the -+# documentation. If set to YES the scope will be hidden. -+ -+HIDE_SCOPE_NAMES = NO -+ -+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -+# will put a list of the files that are included by a file in the documentation -+# of that file. -+ -+SHOW_INCLUDE_FILES = YES -+ -+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -+# is inserted in the documentation for inline members. -+ -+INLINE_INFO = YES -+ -+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -+# will sort the (detailed) documentation of file and class members -+# alphabetically by member name. If set to NO the members will appear in -+# declaration order. -+ -+SORT_MEMBER_DOCS = YES -+ -+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -+# brief documentation of file, namespace and class members alphabetically -+# by member name. If set to NO (the default) the members will appear in -+# declaration order. -+ -+SORT_BRIEF_DOCS = NO -+ -+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -+# hierarchy of group names into alphabetical order. If set to NO (the default) -+# the group names will appear in their defined order. -+ -+SORT_GROUP_NAMES = NO -+ -+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -+# sorted by fully-qualified names, including namespaces. If set to -+# NO (the default), the class list will be sorted only by class name, -+# not including the namespace part. -+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -+# Note: This option applies only to the class list, not to the -+# alphabetical list. -+ -+SORT_BY_SCOPE_NAME = NO -+ -+# The GENERATE_TODOLIST tag can be used to enable (YES) or -+# disable (NO) the todo list. This list is created by putting \todo -+# commands in the documentation. -+ -+GENERATE_TODOLIST = YES -+ -+# The GENERATE_TESTLIST tag can be used to enable (YES) or -+# disable (NO) the test list. This list is created by putting \test -+# commands in the documentation. -+ -+GENERATE_TESTLIST = YES -+ -+# The GENERATE_BUGLIST tag can be used to enable (YES) or -+# disable (NO) the bug list. This list is created by putting \bug -+# commands in the documentation. -+ -+GENERATE_BUGLIST = YES -+ -+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -+# disable (NO) the deprecated list. This list is created by putting -+# \deprecated commands in the documentation. -+ -+GENERATE_DEPRECATEDLIST= YES -+ -+# The ENABLED_SECTIONS tag can be used to enable conditional -+# documentation sections, marked by \if sectionname ... \endif. -+ -+ENABLED_SECTIONS = -+ -+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -+# the initial value of a variable or define consists of for it to appear in -+# the documentation. If the initializer consists of more lines than specified -+# here it will be hidden. Use a value of 0 to hide initializers completely. -+# The appearance of the initializer of individual variables and defines in the -+# documentation can be controlled using \showinitializer or \hideinitializer -+# command in the documentation regardless of this setting. -+ -+MAX_INITIALIZER_LINES = 30 -+ -+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -+# at the bottom of the documentation of classes and structs. If set to YES the -+# list will mention the files that were used to generate the documentation. -+ -+SHOW_USED_FILES = YES -+ -+# If the sources in your project are distributed over multiple directories -+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -+# in the documentation. The default is NO. -+ -+SHOW_DIRECTORIES = NO -+ -+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -+# This will remove the Files entry from the Quick Index and from the -+# Folder Tree View (if specified). The default is YES. -+ -+SHOW_FILES = YES -+ -+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -+# Namespaces page. This will remove the Namespaces entry from the Quick Index -+# and from the Folder Tree View (if specified). The default is YES. -+ -+SHOW_NAMESPACES = YES -+ -+# The FILE_VERSION_FILTER tag can be used to specify a program or script that -+# doxygen should invoke to get the current version for each file (typically from -+# the version control system). Doxygen will invoke the program by executing (via -+# popen()) the command , where is the value of -+# the FILE_VERSION_FILTER tag, and is the name of an input file -+# provided by doxygen. Whatever the program writes to standard output -+# is used as the file version. See the manual for examples. -+ -+FILE_VERSION_FILTER = -+ -+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -+# doxygen. The layout file controls the global structure of the generated output files -+# in an output format independent way. The create the layout file that represents -+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -+# file name after the option, if omitted DoxygenLayout.xml will be used as the name -+# of the layout file. -+ -+LAYOUT_FILE = -+ -+#--------------------------------------------------------------------------- -+# configuration options related to warning and progress messages -+#--------------------------------------------------------------------------- -+ -+# The QUIET tag can be used to turn on/off the messages that are generated -+# by doxygen. Possible values are YES and NO. If left blank NO is used. -+ -+QUIET = YES -+ -+# The WARNINGS tag can be used to turn on/off the warning messages that are -+# generated by doxygen. Possible values are YES and NO. If left blank -+# NO is used. -+ -+WARNINGS = YES -+ -+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -+# automatically be disabled. -+ -+WARN_IF_UNDOCUMENTED = YES -+ -+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -+# potential errors in the documentation, such as not documenting some -+# parameters in a documented function, or documenting parameters that -+# don't exist or using markup commands wrongly. -+ -+WARN_IF_DOC_ERROR = YES -+ -+# This WARN_NO_PARAMDOC option can be abled to get warnings for -+# functions that are documented, but have no documentation for their parameters -+# or return value. If set to NO (the default) doxygen will only warn about -+# wrong or incomplete parameter documentation, but not about the absence of -+# documentation. -+ -+WARN_NO_PARAMDOC = NO -+ -+# The WARN_FORMAT tag determines the format of the warning messages that -+# doxygen can produce. The string should contain the $file, $line, and $text -+# tags, which will be replaced by the file and line number from which the -+# warning originated and the warning text. Optionally the format may contain -+# $version, which will be replaced by the version of the file (if it could -+# be obtained via FILE_VERSION_FILTER) -+ -+WARN_FORMAT = "$file:$line: $text" -+ -+# The WARN_LOGFILE tag can be used to specify a file to which warning -+# and error messages should be written. If left blank the output is written -+# to stderr. -+ -+WARN_LOGFILE = -+ -+#--------------------------------------------------------------------------- -+# configuration options related to the input files -+#--------------------------------------------------------------------------- -+ -+# The INPUT tag can be used to specify the files and/or directories that contain -+# documented source files. You may enter file names like "myfile.cpp" or -+# directories like "/usr/src/myproject". Separate the files or directories -+# with spaces. -+ -+INPUT = -+ -+# This tag can be used to specify the character encoding of the source files -+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -+# also the default input encoding. Doxygen uses libiconv (or the iconv built -+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -+# the list of possible encodings. -+ -+INPUT_ENCODING = UTF-8 -+ -+# If the value of the INPUT tag contains directories, you can use the -+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -+# and *.h) to filter out the source-files in the directories. If left -+# blank the following patterns are tested: -+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 -+ -+FILE_PATTERNS = -+ -+# The RECURSIVE tag can be used to turn specify whether or not subdirectories -+# should be searched for input files as well. Possible values are YES and NO. -+# If left blank NO is used. -+ -+RECURSIVE = NO -+ -+# The EXCLUDE tag can be used to specify files and/or directories that should -+# excluded from the INPUT source files. This way you can easily exclude a -+# subdirectory from a directory tree whose root is specified with the INPUT tag. -+ -+EXCLUDE = -+ -+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -+# directories that are symbolic links (a Unix filesystem feature) are excluded -+# from the input. -+ -+EXCLUDE_SYMLINKS = NO -+ -+# If the value of the INPUT tag contains directories, you can use the -+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -+# certain files from those directories. Note that the wildcards are matched -+# against the file with absolute path, so to exclude all test directories -+# for example use the pattern */test/* -+ -+EXCLUDE_PATTERNS = -+ -+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -+# (namespaces, classes, functions, etc.) that should be excluded from the -+# output. The symbol name can be a fully qualified name, a word, or if the -+# wildcard * is used, a substring. Examples: ANamespace, AClass, -+# AClass::ANamespace, ANamespace::*Test -+ -+EXCLUDE_SYMBOLS = -+ -+# The EXAMPLE_PATH tag can be used to specify one or more files or -+# directories that contain example code fragments that are included (see -+# the \include command). -+ -+EXAMPLE_PATH = -+ -+# If the value of the EXAMPLE_PATH tag contains directories, you can use the -+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -+# and *.h) to filter out the source-files in the directories. If left -+# blank all files are included. -+ -+EXAMPLE_PATTERNS = -+ -+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -+# searched for input files to be used with the \include or \dontinclude -+# commands irrespective of the value of the RECURSIVE tag. -+# Possible values are YES and NO. If left blank NO is used. -+ -+EXAMPLE_RECURSIVE = NO -+ -+# The IMAGE_PATH tag can be used to specify one or more files or -+# directories that contain image that are included in the documentation (see -+# the \image command). -+ -+IMAGE_PATH = -+ -+# The INPUT_FILTER tag can be used to specify a program that doxygen should -+# invoke to filter for each input file. Doxygen will invoke the filter program -+# by executing (via popen()) the command , where -+# is the value of the INPUT_FILTER tag, and is the name of an -+# input file. Doxygen will then use the output that the filter program writes -+# to standard output. If FILTER_PATTERNS is specified, this tag will be -+# ignored. -+ -+INPUT_FILTER = -+ -+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -+# basis. Doxygen will compare the file name with each pattern and apply the -+# filter if there is a match. The filters are a list of the form: -+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -+# is applied to all files. -+ -+FILTER_PATTERNS = -+ -+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -+# INPUT_FILTER) will be used to filter the input files when producing source -+# files to browse (i.e. when SOURCE_BROWSER is set to YES). -+ -+FILTER_SOURCE_FILES = NO -+ -+#--------------------------------------------------------------------------- -+# configuration options related to source browsing -+#--------------------------------------------------------------------------- -+ -+# If the SOURCE_BROWSER tag is set to YES then a list of source files will -+# be generated. Documented entities will be cross-referenced with these sources. -+# Note: To get rid of all source code in the generated output, make sure also -+# VERBATIM_HEADERS is set to NO. -+ -+SOURCE_BROWSER = NO -+ -+# Setting the INLINE_SOURCES tag to YES will include the body -+# of functions and classes directly in the documentation. -+ -+INLINE_SOURCES = NO -+ -+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -+# doxygen to hide any special comment blocks from generated source code -+# fragments. Normal C and C++ comments will always remain visible. -+ -+STRIP_CODE_COMMENTS = YES -+ -+# If the REFERENCED_BY_RELATION tag is set to YES -+# then for each documented function all documented -+# functions referencing it will be listed. -+ -+REFERENCED_BY_RELATION = NO -+ -+# If the REFERENCES_RELATION tag is set to YES -+# then for each documented function all documented entities -+# called/used by that function will be listed. -+ -+REFERENCES_RELATION = NO -+ -+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -+# link to the source code. Otherwise they will link to the documentstion. -+ -+REFERENCES_LINK_SOURCE = YES -+ -+# If the USE_HTAGS tag is set to YES then the references to source code -+# will point to the HTML generated by the htags(1) tool instead of doxygen -+# built-in source browser. The htags tool is part of GNU's global source -+# tagging system (see http://www.gnu.org/software/global/global.html). You -+# will need version 4.8.6 or higher. -+ -+USE_HTAGS = NO -+ -+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -+# will generate a verbatim copy of the header file for each class for -+# which an include is specified. Set to NO to disable this. -+ -+VERBATIM_HEADERS = YES -+ -+#--------------------------------------------------------------------------- -+# configuration options related to the alphabetical class index -+#--------------------------------------------------------------------------- -+ -+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -+# of all compounds will be generated. Enable this if the project -+# contains a lot of classes, structs, unions or interfaces. -+ -+ALPHABETICAL_INDEX = NO -+ -+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -+# in which this list will be split (can be a number in the range [1..20]) -+ -+COLS_IN_ALPHA_INDEX = 5 -+ -+# In case all classes in a project start with a common prefix, all -+# classes will be put under the same header in the alphabetical index. -+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -+# should be ignored while generating the index headers. -+ -+IGNORE_PREFIX = -+ -+#--------------------------------------------------------------------------- -+# configuration options related to the HTML output -+#--------------------------------------------------------------------------- -+ -+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -+# generate HTML output. -+ -+GENERATE_HTML = YES -+ -+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -+# If a relative path is entered the value of OUTPUT_DIRECTORY will be -+# put in front of it. If left blank `html' will be used as the default path. -+ -+HTML_OUTPUT = html -+ -+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -+# doxygen will generate files with .html extension. -+ -+HTML_FILE_EXTENSION = .html -+ -+# The HTML_HEADER tag can be used to specify a personal HTML header for -+# each generated HTML page. If it is left blank doxygen will generate a -+# standard header. -+ -+HTML_HEADER = -+ -+# The HTML_FOOTER tag can be used to specify a personal HTML footer for -+# each generated HTML page. If it is left blank doxygen will generate a -+# standard footer. -+ -+HTML_FOOTER = -+ -+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -+# style sheet that is used by each HTML page. It can be used to -+# fine-tune the look of the HTML output. If the tag is left blank doxygen -+# will generate a default style sheet. Note that doxygen will try to copy -+# the style sheet file to the HTML output directory, so don't put your own -+# stylesheet in the HTML output directory as well, or it will be erased! -+ -+HTML_STYLESHEET = -+ -+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -+# files or namespaces will be aligned in HTML using tables. If set to -+# NO a bullet list will be used. -+ -+HTML_ALIGN_MEMBERS = YES -+ -+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -+# documentation will contain sections that can be hidden and shown after the -+# page has loaded. For this to work a browser that supports -+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). -+ -+HTML_DYNAMIC_SECTIONS = NO -+ -+# If the GENERATE_DOCSET tag is set to YES, additional index files -+# will be generated that can be used as input for Apple's Xcode 3 -+# integrated development environment, introduced with OSX 10.5 (Leopard). -+# To create a documentation set, doxygen will generate a Makefile in the -+# HTML output directory. Running make will produce the docset in that -+# directory and running "make install" will install the docset in -+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -+# it at startup. -+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. -+ -+GENERATE_DOCSET = NO -+ -+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -+# feed. A documentation feed provides an umbrella under which multiple -+# documentation sets from a single provider (such as a company or product suite) -+# can be grouped. -+ -+DOCSET_FEEDNAME = "Doxygen generated docs" -+ -+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -+# should uniquely identify the documentation set bundle. This should be a -+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -+# will append .docset to the name. -+ -+DOCSET_BUNDLE_ID = org.doxygen.Project -+ -+# If the GENERATE_HTMLHELP tag is set to YES, additional index files -+# will be generated that can be used as input for tools like the -+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -+# of the generated HTML documentation. -+ -+GENERATE_HTMLHELP = NO -+ -+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -+# be used to specify the file name of the resulting .chm file. You -+# can add a path in front of the file if the result should not be -+# written to the html output directory. -+ -+CHM_FILE = -+ -+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -+# be used to specify the location (absolute path including file name) of -+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -+# the HTML help compiler on the generated index.hhp. -+ -+HHC_LOCATION = -+ -+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -+# controls if a separate .chi index file is generated (YES) or that -+# it should be included in the master .chm file (NO). -+ -+GENERATE_CHI = NO -+ -+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -+# is used to encode HtmlHelp index (hhk), content (hhc) and project file -+# content. -+ -+CHM_INDEX_ENCODING = -+ -+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -+# controls whether a binary table of contents is generated (YES) or a -+# normal table of contents (NO) in the .chm file. -+ -+BINARY_TOC = NO -+ -+# The TOC_EXPAND flag can be set to YES to add extra items for group members -+# to the contents of the HTML help documentation and to the tree view. -+ -+TOC_EXPAND = NO -+ -+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -+# are set, an additional index file will be generated that can be used as input for -+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated -+# HTML documentation. -+ -+GENERATE_QHP = NO -+ -+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -+# be used to specify the file name of the resulting .qch file. -+# The path specified is relative to the HTML output folder. -+ -+QCH_FILE = -+ -+# The QHP_NAMESPACE tag specifies the namespace to use when generating -+# Qt Help Project output. For more information please see -+# Qt Help Project / Namespace. -+ -+QHP_NAMESPACE = org.doxygen.Project -+ -+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -+# Qt Help Project output. For more information please see -+# Qt Help Project / Virtual Folders. -+ -+QHP_VIRTUAL_FOLDER = doc -+ -+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -+# be used to specify the location of Qt's qhelpgenerator. -+# If non-empty doxygen will try to run qhelpgenerator on the generated -+# .qhp file . -+ -+QHG_LOCATION = -+ -+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -+# top of each HTML page. The value NO (the default) enables the index and -+# the value YES disables it. -+ -+DISABLE_INDEX = NO -+ -+# This tag can be used to set the number of enum values (range [1..20]) -+# that doxygen will group on one line in the generated HTML documentation. -+ -+ENUM_VALUES_PER_LINE = 4 -+ -+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -+# structure should be generated to display hierarchical information. -+# If the tag value is set to FRAME, a side panel will be generated -+# containing a tree-like index structure (just like the one that -+# is generated for HTML Help). For this to work a browser that supports -+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -+# probably better off using the HTML help feature. Other possible values -+# for this tag are: HIERARCHIES, which will generate the Groups, Directories, -+# and Class Hierarchy pages using a tree view instead of an ordered list; -+# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which -+# disables this behavior completely. For backwards compatibility with previous -+# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE -+# respectively. -+ -+GENERATE_TREEVIEW = NONE -+ -+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -+# used to set the initial width (in pixels) of the frame in which the tree -+# is shown. -+ -+TREEVIEW_WIDTH = 250 -+ -+# Use this tag to change the font size of Latex formulas included -+# as images in the HTML documentation. The default is 10. Note that -+# when you change the font size after a successful doxygen run you need -+# to manually remove any form_*.png images from the HTML output directory -+# to force them to be regenerated. -+ -+FORMULA_FONTSIZE = 10 -+ -+#--------------------------------------------------------------------------- -+# configuration options related to the LaTeX output -+#--------------------------------------------------------------------------- -+ -+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -+# generate Latex output. -+ -+GENERATE_LATEX = NO -+ -+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -+# If a relative path is entered the value of OUTPUT_DIRECTORY will be -+# put in front of it. If left blank `latex' will be used as the default path. -+ -+LATEX_OUTPUT = latex -+ -+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -+# invoked. If left blank `latex' will be used as the default command name. -+ -+LATEX_CMD_NAME = latex -+ -+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -+# generate index for LaTeX. If left blank `makeindex' will be used as the -+# default command name. -+ -+MAKEINDEX_CMD_NAME = makeindex -+ -+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -+# LaTeX documents. This may be useful for small projects and may help to -+# save some trees in general. -+ -+COMPACT_LATEX = NO -+ -+# The PAPER_TYPE tag can be used to set the paper type that is used -+# by the printer. Possible values are: a4, a4wide, letter, legal and -+# executive. If left blank a4wide will be used. -+ -+PAPER_TYPE = a4wide -+ -+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -+# packages that should be included in the LaTeX output. -+ -+EXTRA_PACKAGES = -+ -+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -+# the generated latex document. The header should contain everything until -+# the first chapter. If it is left blank doxygen will generate a -+# standard header. Notice: only use this tag if you know what you are doing! -+ -+LATEX_HEADER = -+ -+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -+# is prepared for conversion to pdf (using ps2pdf). The pdf file will -+# contain links (just like the HTML output) instead of page references -+# This makes the output suitable for online browsing using a pdf viewer. -+ -+PDF_HYPERLINKS = YES -+ -+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -+# plain latex in the generated Makefile. Set this option to YES to get a -+# higher quality PDF documentation. -+ -+USE_PDFLATEX = YES -+ -+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -+# command to the generated LaTeX files. This will instruct LaTeX to keep -+# running if errors occur, instead of asking the user for help. -+# This option is also used when generating formulas in HTML. -+ -+LATEX_BATCHMODE = NO -+ -+# If LATEX_HIDE_INDICES is set to YES then doxygen will not -+# include the index chapters (such as File Index, Compound Index, etc.) -+# in the output. -+ -+LATEX_HIDE_INDICES = NO -+ -+#--------------------------------------------------------------------------- -+# configuration options related to the RTF output -+#--------------------------------------------------------------------------- -+ -+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -+# The RTF output is optimized for Word 97 and may not look very pretty with -+# other RTF readers or editors. -+ -+GENERATE_RTF = NO -+ -+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -+# If a relative path is entered the value of OUTPUT_DIRECTORY will be -+# put in front of it. If left blank `rtf' will be used as the default path. -+ -+RTF_OUTPUT = rtf -+ -+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -+# RTF documents. This may be useful for small projects and may help to -+# save some trees in general. -+ -+COMPACT_RTF = NO -+ -+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -+# will contain hyperlink fields. The RTF file will -+# contain links (just like the HTML output) instead of page references. -+# This makes the output suitable for online browsing using WORD or other -+# programs which support those fields. -+# Note: wordpad (write) and others do not support links. -+ -+RTF_HYPERLINKS = NO -+ -+# Load stylesheet definitions from file. Syntax is similar to doxygen's -+# config file, i.e. a series of assignments. You only have to provide -+# replacements, missing definitions are set to their default value. -+ -+RTF_STYLESHEET_FILE = -+ -+# Set optional variables used in the generation of an rtf document. -+# Syntax is similar to doxygen's config file. -+ -+RTF_EXTENSIONS_FILE = -+ -+#--------------------------------------------------------------------------- -+# configuration options related to the man page output -+#--------------------------------------------------------------------------- -+ -+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -+# generate man pages -+ -+GENERATE_MAN = NO -+ -+# The MAN_OUTPUT tag is used to specify where the man pages will be put. -+# If a relative path is entered the value of OUTPUT_DIRECTORY will be -+# put in front of it. If left blank `man' will be used as the default path. -+ -+MAN_OUTPUT = man -+ -+# The MAN_EXTENSION tag determines the extension that is added to -+# the generated man pages (default is the subroutine's section .3) -+ -+MAN_EXTENSION = .3 -+ -+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -+# then it will generate one additional man file for each entity -+# documented in the real man page(s). These additional files -+# only source the real man page, but without them the man command -+# would be unable to find the correct page. The default is NO. -+ -+MAN_LINKS = NO -+ -+#--------------------------------------------------------------------------- -+# configuration options related to the XML output -+#--------------------------------------------------------------------------- -+ -+# If the GENERATE_XML tag is set to YES Doxygen will -+# generate an XML file that captures the structure of -+# the code including all documentation. -+ -+GENERATE_XML = NO -+ -+# The XML_OUTPUT tag is used to specify where the XML pages will be put. -+# If a relative path is entered the value of OUTPUT_DIRECTORY will be -+# put in front of it. If left blank `xml' will be used as the default path. -+ -+XML_OUTPUT = xml -+ -+# The XML_SCHEMA tag can be used to specify an XML schema, -+# which can be used by a validating XML parser to check the -+# syntax of the XML files. -+ -+XML_SCHEMA = -+ -+# The XML_DTD tag can be used to specify an XML DTD, -+# which can be used by a validating XML parser to check the -+# syntax of the XML files. -+ -+XML_DTD = -+ -+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -+# dump the program listings (including syntax highlighting -+# and cross-referencing information) to the XML output. Note that -+# enabling this will significantly increase the size of the XML output. -+ -+XML_PROGRAMLISTING = YES -+ -+#--------------------------------------------------------------------------- -+# configuration options for the AutoGen Definitions output -+#--------------------------------------------------------------------------- -+ -+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -+# generate an AutoGen Definitions (see autogen.sf.net) file -+# that captures the structure of the code including all -+# documentation. Note that this feature is still experimental -+# and incomplete at the moment. -+ -+GENERATE_AUTOGEN_DEF = NO -+ -+#--------------------------------------------------------------------------- -+# configuration options related to the Perl module output -+#--------------------------------------------------------------------------- -+ -+# If the GENERATE_PERLMOD tag is set to YES Doxygen will -+# generate a Perl module file that captures the structure of -+# the code including all documentation. Note that this -+# feature is still experimental and incomplete at the -+# moment. -+ -+GENERATE_PERLMOD = NO -+ -+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -+# the necessary Makefile rules, Perl scripts and LaTeX code to be able -+# to generate PDF and DVI output from the Perl module output. -+ -+PERLMOD_LATEX = NO -+ -+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -+# nicely formatted so it can be parsed by a human reader. This is useful -+# if you want to understand what is going on. On the other hand, if this -+# tag is set to NO the size of the Perl module output will be much smaller -+# and Perl will parse it just the same. -+ -+PERLMOD_PRETTY = YES -+ -+# The names of the make variables in the generated doxyrules.make file -+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -+# This is useful so different doxyrules.make files included by the same -+# Makefile don't overwrite each other's variables. -+ -+PERLMOD_MAKEVAR_PREFIX = -+ -+#--------------------------------------------------------------------------- -+# Configuration options related to the preprocessor -+#--------------------------------------------------------------------------- -+ -+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -+# evaluate all C-preprocessor directives found in the sources and include -+# files. -+ -+ENABLE_PREPROCESSING = YES -+ -+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -+# names in the source code. If set to NO (the default) only conditional -+# compilation will be performed. Macro expansion can be done in a controlled -+# way by setting EXPAND_ONLY_PREDEF to YES. -+ -+MACRO_EXPANSION = NO -+ -+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -+# then the macro expansion is limited to the macros specified with the -+# PREDEFINED and EXPAND_AS_DEFINED tags. -+ -+EXPAND_ONLY_PREDEF = NO -+ -+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -+# in the INCLUDE_PATH (see below) will be search if a #include is found. -+ -+SEARCH_INCLUDES = YES -+ -+# The INCLUDE_PATH tag can be used to specify one or more directories that -+# contain include files that are not input files but should be processed by -+# the preprocessor. -+ -+INCLUDE_PATH = -+ -+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -+# patterns (like *.h and *.hpp) to filter out the header-files in the -+# directories. If left blank, the patterns specified with FILE_PATTERNS will -+# be used. -+ -+INCLUDE_FILE_PATTERNS = -+ -+# The PREDEFINED tag can be used to specify one or more macro names that -+# are defined before the preprocessor is started (similar to the -D option of -+# gcc). The argument of the tag is a list of macros of the form: name -+# or name=definition (no spaces). If the definition and the = are -+# omitted =1 is assumed. To prevent a macro definition from being -+# undefined via #undef or recursively expanded use the := operator -+# instead of the = operator. -+ -+PREDEFINED = -+ -+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -+# this tag can be used to specify a list of macro names that should be expanded. -+# The macro definition that is found in the sources will be used. -+# Use the PREDEFINED tag if you want to use a different macro definition. -+ -+EXPAND_AS_DEFINED = -+ -+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -+# doxygen's preprocessor will remove all function-like macros that are alone -+# on a line, have an all uppercase name, and do not end with a semicolon. Such -+# function macros are typically used for boiler-plate code, and will confuse -+# the parser if not removed. -+ -+SKIP_FUNCTION_MACROS = YES -+ -+#--------------------------------------------------------------------------- -+# Configuration::additions related to external references -+#--------------------------------------------------------------------------- -+ -+# The TAGFILES option can be used to specify one or more tagfiles. -+# Optionally an initial location of the external documentation -+# can be added for each tagfile. The format of a tag file without -+# this location is as follows: -+# TAGFILES = file1 file2 ... -+# Adding location for the tag files is done as follows: -+# TAGFILES = file1=loc1 "file2 = loc2" ... -+# where "loc1" and "loc2" can be relative or absolute paths or -+# URLs. If a location is present for each tag, the installdox tool -+# does not have to be run to correct the links. -+# Note that each tag file must have a unique name -+# (where the name does NOT include the path) -+# If a tag file is not located in the directory in which doxygen -+# is run, you must also specify the path to the tagfile here. -+ -+TAGFILES = -+ -+# When a file name is specified after GENERATE_TAGFILE, doxygen will create -+# a tag file that is based on the input files it reads. -+ -+GENERATE_TAGFILE = -+ -+# If the ALLEXTERNALS tag is set to YES all external classes will be listed -+# in the class index. If set to NO only the inherited external classes -+# will be listed. -+ -+ALLEXTERNALS = NO -+ -+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -+# in the modules index. If set to NO, only the current project's groups will -+# be listed. -+ -+EXTERNAL_GROUPS = YES -+ -+# The PERL_PATH should be the absolute path and name of the perl script -+# interpreter (i.e. the result of `which perl'). -+ -+PERL_PATH = /usr/bin/perl -+ -+#--------------------------------------------------------------------------- -+# Configuration options related to the dot tool -+#--------------------------------------------------------------------------- -+ -+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -+# or super classes. Setting the tag to NO turns the diagrams off. Note that -+# this option is superseded by the HAVE_DOT option below. This is only a -+# fallback. It is recommended to install and use dot, since it yields more -+# powerful graphs. -+ -+CLASS_DIAGRAMS = YES -+ -+# You can define message sequence charts within doxygen comments using the \msc -+# command. Doxygen will then run the mscgen tool (see -+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -+# documentation. The MSCGEN_PATH tag allows you to specify the directory where -+# the mscgen tool resides. If left empty the tool is assumed to be found in the -+# default search path. -+ -+MSCGEN_PATH = -+ -+# If set to YES, the inheritance and collaboration graphs will hide -+# inheritance and usage relations if the target is undocumented -+# or is not a class. -+ -+HIDE_UNDOC_RELATIONS = YES -+ -+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -+# available from the path. This tool is part of Graphviz, a graph visualization -+# toolkit from AT&T and Lucent Bell Labs. The other options in this section -+# have no effect if this option is set to NO (the default) -+ -+HAVE_DOT = NO -+ -+# By default doxygen will write a font called FreeSans.ttf to the output -+# directory and reference it in all dot files that doxygen generates. This -+# font does not include all possible unicode characters however, so when you need -+# these (or just want a differently looking font) you can specify the font name -+# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -+# which can be done by putting it in a standard location or by setting the -+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -+# containing the font. -+ -+DOT_FONTNAME = FreeSans -+ -+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -+# The default size is 10pt. -+ -+DOT_FONTSIZE = 10 -+ -+# By default doxygen will tell dot to use the output directory to look for the -+# FreeSans.ttf font (which doxygen will put there itself). If you specify a -+# different font using DOT_FONTNAME you can set the path where dot -+# can find it using this tag. -+ -+DOT_FONTPATH = -+ -+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -+# will generate a graph for each documented class showing the direct and -+# indirect inheritance relations. Setting this tag to YES will force the -+# the CLASS_DIAGRAMS tag to NO. -+ -+CLASS_GRAPH = YES -+ -+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -+# will generate a graph for each documented class showing the direct and -+# indirect implementation dependencies (inheritance, containment, and -+# class references variables) of the class with other documented classes. -+ -+COLLABORATION_GRAPH = YES -+ -+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -+# will generate a graph for groups, showing the direct groups dependencies -+ -+GROUP_GRAPHS = YES -+ -+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -+# collaboration diagrams in a style similar to the OMG's Unified Modeling -+# Language. -+ -+UML_LOOK = NO -+ -+# If set to YES, the inheritance and collaboration graphs will show the -+# relations between templates and their instances. -+ -+TEMPLATE_RELATIONS = NO -+ -+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -+# tags are set to YES then doxygen will generate a graph for each documented -+# file showing the direct and indirect include dependencies of the file with -+# other documented files. -+ -+INCLUDE_GRAPH = YES -+ -+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -+# documented header file showing the documented files that directly or -+# indirectly include this file. -+ -+INCLUDED_BY_GRAPH = YES -+ -+# If the CALL_GRAPH and HAVE_DOT options are set to YES then -+# doxygen will generate a call dependency graph for every global function -+# or class method. Note that enabling this option will significantly increase -+# the time of a run. So in most cases it will be better to enable call graphs -+# for selected functions only using the \callgraph command. -+ -+CALL_GRAPH = NO -+ -+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -+# doxygen will generate a caller dependency graph for every global function -+# or class method. Note that enabling this option will significantly increase -+# the time of a run. So in most cases it will be better to enable caller -+# graphs for selected functions only using the \callergraph command. -+ -+CALLER_GRAPH = NO -+ -+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -+# will graphical hierarchy of all classes instead of a textual one. -+ -+GRAPHICAL_HIERARCHY = YES -+ -+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -+# then doxygen will show the dependencies a directory has on other directories -+# in a graphical way. The dependency relations are determined by the #include -+# relations between the files in the directories. -+ -+DIRECTORY_GRAPH = YES -+ -+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -+# generated by dot. Possible values are png, jpg, or gif -+# If left blank png will be used. -+ -+DOT_IMAGE_FORMAT = png -+ -+# The tag DOT_PATH can be used to specify the path where the dot tool can be -+# found. If left blank, it is assumed the dot tool can be found in the path. -+ -+DOT_PATH = -+ -+# The DOTFILE_DIRS tag can be used to specify one or more directories that -+# contain dot files that are included in the documentation (see the -+# \dotfile command). -+ -+DOTFILE_DIRS = -+ -+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -+# nodes that will be shown in the graph. If the number of nodes in a graph -+# becomes larger than this value, doxygen will truncate the graph, which is -+# visualized by representing a node as a red box. Note that doxygen if the -+# number of direct children of the root node in a graph is already larger than -+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. -+ -+DOT_GRAPH_MAX_NODES = 50 -+ -+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -+# graphs generated by dot. A depth value of 3 means that only nodes reachable -+# from the root by following a path via at most 3 edges will be shown. Nodes -+# that lay further from the root node will be omitted. Note that setting this -+# option to 1 or 2 may greatly reduce the computation time needed for large -+# code bases. Also note that the size of a graph can be further restricted by -+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. -+ -+MAX_DOT_GRAPH_DEPTH = 0 -+ -+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -+# background. This is disabled by default, because dot on Windows does not -+# seem to support this out of the box. Warning: Depending on the platform used, -+# enabling this option may lead to badly anti-aliased labels on the edges of -+# a graph (i.e. they become hard to read). -+ -+DOT_TRANSPARENT = NO -+ -+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -+# files in one run (i.e. multiple -o and -T options on the command line). This -+# makes dot run faster, but since only newer versions of dot (>1.8.10) -+# support this, this feature is disabled by default. -+ -+DOT_MULTI_TARGETS = NO -+ -+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -+# generate a legend page explaining the meaning of the various boxes and -+# arrows in the dot generated graphs. -+ -+GENERATE_LEGEND = YES -+ -+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -+# remove the intermediate dot files that are used to generate -+# the various graphs. -+ -+DOT_CLEANUP = YES -+ -+#--------------------------------------------------------------------------- -+# Configuration::additions related to the search engine -+#--------------------------------------------------------------------------- -+ -+# The SEARCHENGINE tag specifies whether or not a search engine should be -+# used. If set to NO the values of all tags below this one will be ignored. -+ -+SEARCHENGINE = NO -diff --git a/libiscsi/libiscsi.h b/libiscsi/libiscsi.h -new file mode 100644 -index 0000000..756590e ---- /dev/null -+++ b/libiscsi/libiscsi.h -@@ -0,0 +1,344 @@ -+/* -+ * iSCSI Administration library -+ * -+ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. -+ * Copyright (C) 2008-2009 Hans de Goede -+ * maintained by open-iscsi@googlegroups.com -+ * -+ * 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 2 of the License, 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. -+ * -+ * See the file COPYING included with this distribution for more details. -+ */ -+ -+#ifndef __LIBISCSI_H -+#define __LIBISCSI_H -+ -+#include -+ -+#ifdef __cplusplus -+extern "C" { -+#endif /* __cplusplus */ -+ -+#if __GNUC__ >= 4 -+#define PUBLIC __attribute__ ((visibility("default"))) -+#else -+#define PUBLIC -+#endif -+ -+/** \brief Maximum length for iSCSI values. -+ * -+ * Maximum length for iSCSI values such as hostnames and parameter values. -+ */ -+#define LIBISCSI_VALUE_MAXLEN 256 -+ -+/** \brief supported authentication methods -+ * -+ * This enum lists all supported authentication methods. -+ */ -+enum libiscsi_auth_t { -+ libiscsi_auth_none /** No authentication */, -+ libiscsi_auth_chap /** CHAP authentication */, -+}; -+ -+/** \brief libiscsi context struct -+ * -+ * Note: even though libiscsi uses a context struct, the underlying open-iscsi -+ * code does not, so libiscsi is not thread safe, not even when using one -+ * context per thread! -+ */ -+struct libiscsi_context; -+ -+/** \brief iSCSI node record -+ * -+ * Struct holding data uniquely identifying an iSCSI node. -+ */ -+struct libiscsi_node { -+ char name[LIBISCSI_VALUE_MAXLEN] /** iSCSI iqn for the node. */; -+ int tpgt /** Portal group number. */; -+ /* Note open-iscsi has some code in place for multiple connections in one -+ node record and thus multiple address / port combi's, but this does not -+ get used anywhere, so we keep things simple and assume one connection */ -+ char address[NI_MAXHOST] /** Portal hostname or IP-address. */; -+ int port /** Portal port number. */; -+ char iface[LIBISCSI_VALUE_MAXLEN] /** Interface to connect through. */; -+}; -+ -+/** \brief libiscsi CHAP authentication information struct -+ * -+ * Struct holding all data needed for CHAP login / authentication. Note that -+ * \e reverse_username may be a 0 length string in which case only forward -+ * authentication will be done. -+ */ -+struct libiscsi_chap_auth_info { -+ char username[LIBISCSI_VALUE_MAXLEN] /** Username */; -+ char password[LIBISCSI_VALUE_MAXLEN] /** Password */; -+ char reverse_username[LIBISCSI_VALUE_MAXLEN] /** Reverse Username */; -+ char reverse_password[LIBISCSI_VALUE_MAXLEN] /** Reverse Password */; -+}; -+ -+/** \brief generic libiscsi authentication information struct -+ * -+ * Struct holding authentication information for discovery and login. -+ */ -+struct libiscsi_auth_info { -+ enum libiscsi_auth_t method /** Authentication method to use */; -+ union { -+ struct libiscsi_chap_auth_info chap /** Chap specific info */; -+ } /** Union holding method depenend info */; -+}; -+ -+/** \brief Initalize libiscsi -+ * -+ * This function creates a libiscsi context and initalizes it. This context -+ * is need to use other libiscsi funtions. -+ * -+ * \return A pointer to the created context, or NULL in case of an error. -+ */ -+PUBLIC struct libiscsi_context *libiscsi_init(void); -+ -+/** \brief Cleanup libiscsi used resource -+ * -+ * This function cleanups any used resources and then destroys the passed -+ * context. After this the passed in context may no longer be used! -+ * -+ * \param context libiscsi context to operate on. -+ */ -+PUBLIC void libiscsi_cleanup(struct libiscsi_context *context); -+ -+/** \brief Discover iSCSI nodes using sendtargets and add them to the node db. -+ * -+ * This function connects to the given address and port and then tries to -+ * discover iSCSI nodes using the sendtargets protocol. Any found nodes are -+ * added to the local iSCSI node database and are returned in a dynamically -+ * allocated array. -+ * -+ * Note that the (optional) authentication info is for authenticating the -+ * discovery, and is not for the found nodes! If the connection(s) to the -+ * node(s) need authentication too, you can set the username / password for -+ * those (which can be different!) using the libiscsi_node_set_auth() function. -+ * -+ * \param context libiscsi context to operate on. -+ * \param address Hostname or IP-address to connect to. -+ * \param port Port to connect to, or 0 for the default port. -+ * \param auth_info Authentication information, or NULL. -+ * \param nr_found The number of found nodes will be returned -+ * through this pointer if not NULL. -+ * \param found_nodes The address of the dynamically allocated array -+ * of found nodes will be returned through this -+ * pointer if not NULL. The caller must free this -+ * array using free(). -+ * \return 0 on success, otherwise a standard error code -+ * (from errno.h). -+ */ -+PUBLIC int libiscsi_discover_sendtargets(struct libiscsi_context *context, -+ const char *address, int port, const struct libiscsi_auth_info *auth_info, -+ int *nr_found, struct libiscsi_node **found_nodes); -+ -+/** \brief Read iSCSI node info from firmware and add them to the node db. -+ * -+ * This function discovers iSCSI nodes using firmware (ppc or ibft). Any found -+ * nodes are added to the local iSCSI node database and are returned in a -+ * dynamically allocated array. -+ * -+ * Note that unlike sendtargets discovery, this function will also read -+ * authentication info and store that in the database too. -+ * -+ * Note this function currently is a stub which will always return -EINVAL -+ * (IOW it is not yet implemented) -+ * -+ * \param context libiscsi context to operate on. -+ * \param nr_found The number of found nodes will be returned -+ * through this pointer if not NULL. -+ * \param found_nodes The address of the dynamically allocated array -+ * of found nodes will be returned through this -+ * pointer if not NULL. The caller must free this -+ * array using free(). -+ * \return 0 on success, otherwise a standard error code -+ * (from errno.h). -+ */ -+PUBLIC int libiscsi_discover_firmware(struct libiscsi_context *context, -+ int *nr_found, struct libiscsi_node **found_nodes); -+ -+/** \brief Check validity of the given authentication info. -+ * -+ * This function checks the validity of the given authentication info. For -+ * example in case of CHAP, if the username and password are not empty. -+ * -+ * This function is mainly intended for use by language bindings. -+ * -+ * \param context libiscsi context to operate on. -+ * \param auth_info Authentication information to check. -+ * \return 0 on success, otherwise EINVAL. -+ */ -+PUBLIC int libiscsi_verify_auth_info(struct libiscsi_context *context, -+ const struct libiscsi_auth_info *auth_info); -+ -+/** \brief Set the authentication info for the given node. -+ * -+ * This function sets the authentication information for the node described by -+ * the given node record. This will overwrite any existing authentication -+ * information. -+ * -+ * This is the way to specify authentication information for nodes found -+ * through sendtargets discovery. -+ * -+ * Note: -+ * 1) This is a convience wrapper around libiscsi_node_set_parameter(), -+ * setting the node.session.auth.* parameters. -+ * 2) For nodes found through firmware discovery the authentication information -+ * has already been set from the firmware. -+ * 3) \e auth_info may be NULL in which case any existing authinfo will be -+ * cleared. -+ * -+ * \param context libiscsi context to operate on. -+ * \param node iSCSI node to set auth information of -+ * \param auth_info Authentication information, or NULL. -+ * \return 0 on success, otherwise a standard error code -+ * (from errno.h). -+ */ -+PUBLIC int libiscsi_node_set_auth(struct libiscsi_context *context, -+ const struct libiscsi_node *node, -+ const struct libiscsi_auth_info *auth_info); -+ -+/** \brief Get the authentication info for the given node. -+ * -+ * This function gets the authentication information for the node described by -+ * the given node record. -+ * -+ * \param context libiscsi context to operate on. -+ * \param node iSCSI node to set auth information of -+ * \param auth_info Pointer to a libiscsi_auth_info struct where -+ * the retreived information will be stored. -+ * \return 0 on success, otherwise a standard error code -+ * (from errno.h). -+ */ -+PUBLIC int libiscsi_node_get_auth(struct libiscsi_context *context, -+ const struct libiscsi_node *node, -+ struct libiscsi_auth_info *auth_info); -+ -+/** \brief Login to an iSCSI node. -+ * -+ * Login to the iSCSI node described by the given node record. -+ * -+ * \param context libiscsi context to operate on. -+ * \param node iSCSI node to login to. -+ * \return 0 on success, otherwise a standard error code -+ * (from errno.h). -+ */ -+PUBLIC int libiscsi_node_login(struct libiscsi_context *context, -+ const struct libiscsi_node *node); -+ -+/** \brief Logout of an iSCSI node. -+ * -+ * Logout of the iSCSI node described by the given node record. -+ * -+ * \param context libiscsi context to operate on. -+ * \param node iSCSI node to logout from. -+ * \return 0 on success, otherwise a standard error code -+ * (from errno.h). -+ */ -+PUBLIC int libiscsi_node_logout(struct libiscsi_context *context, -+ const struct libiscsi_node *node); -+ -+/** \brief Set an iSCSI parameter for the given node -+ * -+ * Set the given nodes iSCSI parameter named by \e parameter to value \e value. -+ * -+ * \param context libiscsi context to operate on. -+ * \param node iSCSI node to change a parameter from. -+ * \param parameter Name of the parameter to set. -+ * \param value Value to set the parameter too. -+ * \return 0 on success, otherwise a standard error code -+ * (from errno.h). -+ */ -+PUBLIC int libiscsi_node_set_parameter(struct libiscsi_context *context, -+ const struct libiscsi_node *node, -+ const char *parameter, const char *value); -+ -+/** \brief Get the value of an iSCSI parameter for the given node -+ * -+ * Get the value of the given nodes iSCSI parameter named by \e parameter. -+ * -+ * \param context libiscsi context to operate on. -+ * \param node iSCSI node to change a parameter from. -+ * \param parameter Name of the parameter to get. -+ * \param value The retreived value is stored here, this buffer must be -+ * atleast LIBISCSI_VALUE_MAXLEN bytes large. -+ * \return 0 on success, otherwise a standard error code -+ * (from errno.h). -+ */ -+PUBLIC int libiscsi_node_get_parameter(struct libiscsi_context *context, -+ const struct libiscsi_node *node, const char *parameter, char *value); -+ -+/** \brief Get human readable string describing the last libiscsi error. -+ * -+ * This function can be called to get a human readable error string when a -+ * libiscsi function has returned an error. This function uses a single buffer -+ * per context, thus the result is only valid as long as no other libiscsi -+ * calls are made on the same context after the failing function call. -+ * -+ * \param context libiscsi context to operate on. -+ * -+ * \return human readable string describing the last libiscsi error. -+ */ -+PUBLIC const char *libiscsi_get_error_string(struct libiscsi_context *context); -+ -+ -+/************************** Utility functions *******************************/ -+ -+/** \brief libiscsi network config struct -+ * -+ * libiscsi network config struct. -+ */ -+struct libiscsi_network_config { -+ int dhcp /** Using DHCP? (boolean). */; -+ char iface_name[LIBISCSI_VALUE_MAXLEN] /** Interface name. */; -+ char mac_address[LIBISCSI_VALUE_MAXLEN] /** MAC address. */; -+ char ip_address[LIBISCSI_VALUE_MAXLEN] /** IP address. */; -+ char netmask[LIBISCSI_VALUE_MAXLEN] /** Netmask. */; -+ char gateway[LIBISCSI_VALUE_MAXLEN] /** IP of Default gateway. */; -+ char primary_dns[LIBISCSI_VALUE_MAXLEN] /** IP of the Primary DNS. */; -+ char secondary_dns[LIBISCSI_VALUE_MAXLEN] /** IP of the Secondary DNS. */; -+}; -+ -+/** \brief Get network configuration information from iscsi firmware -+ * -+ * Function can be called to get the network configuration information -+ * (like dhcp, ip, netmask, default gateway, etc.) from the firmware of a -+ * network adapter with iscsi boot firmware. -+ * -+ * Note that not all fields of the returned struct are necessarilly filled, -+ * unset fields contain a 0 length string. -+ * -+ * \param config pointer to a libiscsi_network_config struct to fill. -+ * -+ * \return 0 on success, ENODEV when no iscsi firmware was found. -+ */ -+PUBLIC int libiscsi_get_firmware_network_config( -+ struct libiscsi_network_config *config); -+ -+/** \brief Get the initiator name (iqn) from the iscsi firmware -+ * -+ * Get the initiator name (iqn) from the iscsi firmware. -+ * -+ * \param initiatorname The initiator name is stored here, this buffer must be -+ * atleast LIBISCSI_VALUE_MAXLEN bytes large. -+ * \return 0 on success, ENODEV when no iscsi firmware was found. -+ */ -+PUBLIC int libiscsi_get_firmware_initiator_name(char *initiatorname); -+ -+#undef PUBLIC -+ -+#ifdef __cplusplus -+} -+#endif /* __cplusplus */ -+ -+#endif -diff --git a/libiscsi/pylibiscsi.c b/libiscsi/pylibiscsi.c -new file mode 100644 -index 0000000..4b09aa7 ---- /dev/null -+++ b/libiscsi/pylibiscsi.c -@@ -0,0 +1,638 @@ -+/* -+ * iSCSI Administration library -+ * -+ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. -+ * Copyright (C) 2008-2009 Hans de Goede -+ * maintained by open-iscsi@googlegroups.com -+ * -+ * 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 2 of the License, 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. -+ * -+ * See the file COPYING included with this distribution for more details. -+ */ -+ -+#include -+#include "libiscsi.h" -+ -+static struct libiscsi_context *context = NULL; -+ -+/****************************** helpers ***********************************/ -+static int check_string(const char *string) -+{ -+ if (strlen(string) >= LIBISCSI_VALUE_MAXLEN) { -+ PyErr_SetString(PyExc_ValueError, "string too long"); -+ return -1; -+ } -+ return 0; -+} -+ -+/********************** PyIscsiChapAuthInfo ***************************/ -+ -+typedef struct { -+ PyObject_HEAD -+ -+ struct libiscsi_auth_info info; -+} PyIscsiChapAuthInfo; -+ -+static int PyIscsiChapAuthInfo_init(PyObject *self, PyObject *args, -+ PyObject *kwds) -+{ -+ int i; -+ PyIscsiChapAuthInfo *chap = (PyIscsiChapAuthInfo *)self; -+ char *kwlist[] = {"username", "password", "reverse_username", -+ "reverse_password", NULL}; -+ const char *string[4] = { NULL, NULL, NULL, NULL }; -+ -+ if (!PyArg_ParseTupleAndKeywords(args, kwds, -+ "zz|zz:chapAuthInfo.__init__", -+ kwlist, &string[0], &string[1], -+ &string[2], &string[3])) -+ return -1; -+ -+ for (i = 0; i < 4; i++) -+ if (string[i] && check_string(string[i])) -+ return -1; -+ -+ memset (&chap->info, 0, sizeof(chap->info)); -+ chap->info.method = libiscsi_auth_chap; -+ if (string[0]) -+ strcpy(chap->info.chap.username, string[0]); -+ if (string[1]) -+ strcpy(chap->info.chap.password, string[1]); -+ if (string[2]) -+ strcpy(chap->info.chap.reverse_username, string[2]); -+ if (string[3]) -+ strcpy(chap->info.chap.reverse_password, string[3]); -+ -+ if (libiscsi_verify_auth_info(context, &chap->info)) { -+ PyErr_SetString(PyExc_ValueError, -+ libiscsi_get_error_string(context)); -+ return -1; -+ } -+ return 0; -+} -+ -+static PyObject *PyIscsiChapAuthInfo_get(PyObject *self, void *data) -+{ -+ PyIscsiChapAuthInfo *chap = (PyIscsiChapAuthInfo *)self; -+ const char *attr = (const char *)data; -+ -+ if (!strcmp(attr, "username")) { -+ return PyString_FromString(chap->info.chap.username); -+ } else if (!strcmp(attr, "password")) { -+ return PyString_FromString(chap->info.chap.password); -+ } else if (!strcmp(attr, "reverse_username")) { -+ return PyString_FromString(chap->info.chap.reverse_username); -+ } else if (!strcmp(attr, "reverse_password")) { -+ return PyString_FromString(chap->info.chap.reverse_password); -+ } -+ return NULL; -+} -+ -+static int PyIscsiChapAuthInfo_set(PyObject *self, PyObject *value, void *data) -+{ -+ PyIscsiChapAuthInfo *chap = (PyIscsiChapAuthInfo *)self; -+ const char *attr = (const char *)data; -+ const char *str; -+ -+ if (!PyArg_Parse(value, "s", &str) || check_string(str)) -+ return -1; -+ -+ if (!strcmp(attr, "username")) { -+ strcpy(chap->info.chap.username, str); -+ } else if (!strcmp(attr, "password")) { -+ strcpy(chap->info.chap.password, str); -+ } else if (!strcmp(attr, "reverse_username")) { -+ strcpy(chap->info.chap.reverse_username, str); -+ } else if (!strcmp(attr, "reverse_password")) { -+ strcpy(chap->info.chap.reverse_password, str); -+ } -+ -+ return 0; -+} -+ -+static int PyIscsiChapAuthInfo_compare(PyIscsiChapAuthInfo *self, -+ PyIscsiChapAuthInfo *other) -+{ -+ int r; -+ -+ r = strcmp(self->info.chap.username, other->info.chap.username); -+ if (r) -+ return r; -+ -+ r = strcmp(self->info.chap.password, other->info.chap.password); -+ if (r) -+ return r; -+ -+ r = strcmp(self->info.chap.reverse_username, -+ other->info.chap.reverse_username); -+ if (r) -+ return r; -+ -+ r = strcmp(self->info.chap.reverse_password, -+ other->info.chap.reverse_password); -+ return r; -+} -+ -+static PyObject *PyIscsiChapAuthInfo_str(PyObject *self) -+{ -+ PyIscsiChapAuthInfo *chap = (PyIscsiChapAuthInfo *)self; -+ char s[1024], reverse[512] = ""; -+ -+ if (chap->info.chap.reverse_username[0]) -+ snprintf(reverse, sizeof(reverse), ", %s:%s", -+ chap->info.chap.reverse_username, -+ chap->info.chap.reverse_password); -+ -+ snprintf(s, sizeof(s), "%s:%s%s", chap->info.chap.username, -+ chap->info.chap.password, reverse); -+ -+ return PyString_FromString(s); -+} -+ -+static struct PyGetSetDef PyIscsiChapAuthInfo_getseters[] = { -+ {"username", (getter)PyIscsiChapAuthInfo_get, -+ (setter)PyIscsiChapAuthInfo_set, -+ "username", "username"}, -+ {"password", (getter)PyIscsiChapAuthInfo_get, -+ (setter)PyIscsiChapAuthInfo_set, -+ "password", "password"}, -+ {"reverse_username", (getter)PyIscsiChapAuthInfo_get, -+ (setter)PyIscsiChapAuthInfo_set, -+ "reverse_username", "reverse_username"}, -+ {"reverse_password", (getter)PyIscsiChapAuthInfo_get, -+ (setter)PyIscsiChapAuthInfo_set, -+ "reverse_password", "reverse_password"}, -+ {NULL} -+}; -+ -+PyTypeObject PyIscsiChapAuthInfo_Type = { -+ PyObject_HEAD_INIT(NULL) -+ .tp_name = "libiscsi.chapAuthInfo", -+ .tp_basicsize = sizeof (PyIscsiChapAuthInfo), -+ .tp_getset = PyIscsiChapAuthInfo_getseters, -+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES | -+ Py_TPFLAGS_BASETYPE, -+ .tp_compare = (cmpfunc)PyIscsiChapAuthInfo_compare, -+ .tp_init = PyIscsiChapAuthInfo_init, -+ .tp_str = PyIscsiChapAuthInfo_str, -+ .tp_new = PyType_GenericNew, -+ .tp_doc = "iscsi chap authentication information.", -+}; -+ -+/***************************** PyIscsiNode ********************************/ -+ -+typedef struct { -+ PyObject_HEAD -+ -+ struct libiscsi_node node; -+} PyIscsiNode; -+ -+static int PyIscsiNode_init(PyObject *self, PyObject *args, PyObject *kwds) -+{ -+ PyIscsiNode *node = (PyIscsiNode *)self; -+ char *kwlist[] = {"name", "tpgt", "address", "port", "iface", NULL}; -+ const char *name = NULL, *address = NULL, *iface = NULL; -+ int tpgt = -1, port = 3260; -+ -+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|isis:node.__init__", -+ kwlist, &name, &tpgt, &address, -+ &port, &iface)) -+ return -1; -+ if (address == NULL) { -+ PyErr_SetString(PyExc_ValueError, "address not set"); -+ return -1; -+ } -+ if (check_string(name) || check_string(address) || check_string(iface)) -+ return -1; -+ -+ strcpy(node->node.name, name); -+ node->node.tpgt = tpgt; -+ strcpy(node->node.address, address); -+ node->node.port = port; -+ strcpy(node->node.iface, iface); -+ -+ return 0; -+} -+ -+static PyObject *PyIscsiNode_get(PyObject *self, void *data) -+{ -+ PyIscsiNode *node = (PyIscsiNode *)self; -+ const char *attr = (const char *)data; -+ -+ if (!strcmp(attr, "name")) { -+ return PyString_FromString(node->node.name); -+ } else if (!strcmp(attr, "tpgt")) { -+ return PyInt_FromLong(node->node.tpgt); -+ } else if (!strcmp(attr, "address")) { -+ return PyString_FromString(node->node.address); -+ } else if (!strcmp(attr, "port")) { -+ return PyInt_FromLong(node->node.port); -+ } else if (!strcmp(attr, "iface")) { -+ return PyString_FromString(node->node.iface); -+ } -+ return NULL; -+} -+ -+static int PyIscsiNode_set(PyObject *self, PyObject *value, void *data) -+{ -+ PyIscsiNode *node = (PyIscsiNode *)self; -+ const char *attr = (const char *)data; -+ const char *str; -+ int i; -+ -+ if (!strcmp(attr, "name")) { -+ if (!PyArg_Parse(value, "s", &str) || check_string(str)) -+ return -1; -+ strcpy(node->node.name, str); -+ } else if (!strcmp(attr, "tpgt")) { -+ if (!PyArg_Parse(value, "i", &i)) -+ return -1; -+ node->node.tpgt = i; -+ } else if (!strcmp(attr, "address")) { -+ if (!PyArg_Parse(value, "s", &str) || check_string(str)) -+ return -1; -+ strcpy(node->node.address, str); -+ } else if (!strcmp(attr, "port")) { -+ if (!PyArg_Parse(value, "i", &i)) -+ return -1; -+ node->node.port = i; -+ } else if (!strcmp(attr, "iface")) { -+ if (!PyArg_Parse(value, "s", &str) || check_string(str)) -+ return -1; -+ strcpy(node->node.iface, str); -+ } -+ -+ return 0; -+} -+ -+static int PyIscsiNode_compare(PyIscsiNode *self, PyIscsiNode *other) -+{ -+ int res; -+ -+ res = strcmp(self->node.name, other->node.name); -+ if (res) -+ return res; -+ -+ if (self->node.tpgt < other->node.tpgt) -+ return -1; -+ if (self->node.tpgt > other->node.tpgt) -+ return -1; -+ -+ res = strcmp(self->node.address, other->node.address); -+ if (res) -+ return res; -+ -+ if (self->node.port < other->node.port) -+ return -1; -+ if (self->node.port > other->node.port) -+ return -1; -+ -+ res = strcmp(self->node.iface, other->node.iface); -+ if (res) -+ return res; -+ -+ return 0; -+} -+ -+static PyObject *PyIscsiNode_str(PyObject *self) -+{ -+ PyIscsiNode *node = (PyIscsiNode *)self; -+ char s[1024], tpgt[16] = ""; -+ -+ if (node->node.tpgt != -1) -+ sprintf(tpgt, ",%d", node->node.tpgt); -+ -+ snprintf(s, sizeof(s), "%s:%d%s %s", node->node.address, -+ node->node.port, tpgt, node->node.name); -+ -+ return PyString_FromString(s); -+} -+ -+static PyObject *PyIscsiNode_login(PyObject *self) -+{ -+ PyIscsiNode *node = (PyIscsiNode *)self; -+ -+ if (libiscsi_node_login(context, &node->node)) { -+ PyErr_SetString(PyExc_IOError, -+ libiscsi_get_error_string(context)); -+ return NULL; -+ } -+ Py_RETURN_NONE; -+} -+ -+static PyObject *PyIscsiNode_logout(PyObject *self) -+{ -+ PyIscsiNode *node = (PyIscsiNode *)self; -+ -+ if (libiscsi_node_logout(context, &node->node)) { -+ PyErr_SetString(PyExc_IOError, -+ libiscsi_get_error_string(context)); -+ return NULL; -+ } -+ Py_RETURN_NONE; -+} -+ -+static PyObject *PyIscsiNode_setAuth(PyObject *self, PyObject *args, -+ PyObject *kwds) -+{ -+ char *kwlist[] = {"authinfo", NULL}; -+ PyIscsiNode *node = (PyIscsiNode *)self; -+ PyObject *arg; -+ const struct libiscsi_auth_info *authinfo = NULL; -+ -+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", kwlist, &arg)) -+ return NULL; -+ -+ if (arg == Py_None) { -+ authinfo = NULL; -+ } else if (PyObject_IsInstance(arg, (PyObject *) -+ &PyIscsiChapAuthInfo_Type)) { -+ PyIscsiChapAuthInfo *pyauthinfo = (PyIscsiChapAuthInfo *)arg; -+ authinfo = &pyauthinfo->info; -+ } else { -+ PyErr_SetString(PyExc_ValueError, "invalid authinfo type"); -+ return NULL; -+ } -+ -+ if (libiscsi_node_set_auth(context, &node->node, authinfo)) { -+ PyErr_SetString(PyExc_IOError, -+ libiscsi_get_error_string(context)); -+ return NULL; -+ } -+ Py_RETURN_NONE; -+} -+ -+static PyObject *PyIscsiNode_getAuth(PyObject *self) -+{ -+ PyIscsiNode *node = (PyIscsiNode *)self; -+ PyIscsiChapAuthInfo *pyauthinfo; -+ struct libiscsi_auth_info authinfo; -+ -+ if (libiscsi_node_get_auth(context, &node->node, &authinfo)) { -+ PyErr_SetString(PyExc_IOError, -+ libiscsi_get_error_string(context)); -+ return NULL; -+ } -+ -+ switch (authinfo.method) { -+ case libiscsi_auth_chap: -+ pyauthinfo = PyObject_New(PyIscsiChapAuthInfo, -+ &PyIscsiChapAuthInfo_Type); -+ if (!pyauthinfo) -+ return NULL; -+ -+ pyauthinfo->info = authinfo; -+ -+ return (PyObject *)pyauthinfo; -+ -+ case libiscsi_auth_none: -+ default: -+ Py_RETURN_NONE; -+ } -+} -+ -+static PyObject *PyIscsiNode_setParameter(PyObject *self, PyObject *args, -+ PyObject *kwds) -+{ -+ char *kwlist[] = {"parameter", "value", NULL}; -+ PyIscsiNode *node = (PyIscsiNode *)self; -+ const char *parameter, *value; -+ -+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "ss", kwlist, -+ ¶meter, &value)) -+ return NULL; -+ if (check_string(parameter) || check_string(value)) -+ return NULL; -+ -+ if (libiscsi_node_set_parameter(context, &node->node, parameter, -+ value)) { -+ PyErr_SetString(PyExc_IOError, -+ libiscsi_get_error_string(context)); -+ return NULL; -+ } -+ Py_RETURN_NONE; -+} -+ -+static PyObject *PyIscsiNode_getParameter(PyObject *self, PyObject *args, -+ PyObject *kwds) -+{ -+ char *kwlist[] = {"parameter", NULL}; -+ PyIscsiNode *node = (PyIscsiNode *)self; -+ const char *parameter; -+ char value[LIBISCSI_VALUE_MAXLEN]; -+ -+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, ¶meter)) -+ return NULL; -+ if (check_string(parameter)) -+ return NULL; -+ -+ if (libiscsi_node_get_parameter(context, &node->node, parameter, -+ value)) { -+ PyErr_SetString(PyExc_IOError, -+ libiscsi_get_error_string(context)); -+ return NULL; -+ } -+ return Py_BuildValue("s", value); -+} -+ -+static struct PyGetSetDef PyIscsiNode_getseters[] = { -+ {"name", (getter)PyIscsiNode_get, (setter)PyIscsiNode_set, -+ "name", "name"}, -+ {"tpgt", (getter)PyIscsiNode_get, (setter)PyIscsiNode_set, -+ "tpgt", "tpgt"}, -+ {"address", (getter)PyIscsiNode_get, (setter)PyIscsiNode_set, -+ "address", "address"}, -+ {"port", (getter)PyIscsiNode_get, (setter)PyIscsiNode_set, -+ "port", "port"}, -+ {"iface", (getter)PyIscsiNode_get, (setter)PyIscsiNode_set, -+ "iface", "iface"}, -+ {NULL} -+}; -+ -+static struct PyMethodDef PyIscsiNode_methods[] = { -+ {"login", (PyCFunction) PyIscsiNode_login, METH_NOARGS, -+ "Log in to the node"}, -+ {"logout", (PyCFunction) PyIscsiNode_logout, METH_NOARGS, -+ "Log out of the node"}, -+ {"setAuth", (PyCFunction) PyIscsiNode_setAuth, -+ METH_VARARGS|METH_KEYWORDS, -+ "Set authentication information"}, -+ {"getAuth", (PyCFunction) PyIscsiNode_getAuth, METH_NOARGS, -+ "Get authentication information"}, -+ {"setParameter", (PyCFunction) PyIscsiNode_setParameter, -+ METH_VARARGS|METH_KEYWORDS, -+ "Set an iscsi node parameter"}, -+ {"getParameter", (PyCFunction) PyIscsiNode_getParameter, -+ METH_VARARGS|METH_KEYWORDS, -+ "Get an iscsi node parameter"}, -+ {NULL} -+}; -+ -+PyTypeObject PyIscsiNode_Type = { -+ PyObject_HEAD_INIT(NULL) -+ .tp_name = "libiscsi.node", -+ .tp_basicsize = sizeof (PyIscsiNode), -+ .tp_getset = PyIscsiNode_getseters, -+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES | -+ Py_TPFLAGS_BASETYPE, -+ .tp_methods = PyIscsiNode_methods, -+ .tp_compare = (cmpfunc)PyIscsiNode_compare, -+ .tp_init = PyIscsiNode_init, -+ .tp_str = PyIscsiNode_str, -+ .tp_new = PyType_GenericNew, -+ .tp_doc = "The iscsi node contains iscsi node information.", -+}; -+ -+/***************************************************************************/ -+ -+static PyObject *pylibiscsi_discover_sendtargets(PyObject *self, -+ PyObject *args, PyObject *kwds) -+{ -+ char *kwlist[] = {"address", "port", "authinfo", NULL}; -+ const char *address = NULL; -+ int i, nr_found, port = 3260; -+ PyObject *authinfo_arg = NULL; -+ const struct libiscsi_auth_info *authinfo = NULL; -+ struct libiscsi_node *found_nodes; -+ PyObject* found_node_list; -+ -+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|iO", -+ kwlist, &address, &port, -+ &authinfo_arg)) -+ return NULL; -+ -+ if (authinfo_arg) { -+ if (PyObject_IsInstance(authinfo_arg, (PyObject *) -+ &PyIscsiChapAuthInfo_Type)) { -+ PyIscsiChapAuthInfo *pyauthinfo = -+ (PyIscsiChapAuthInfo *)authinfo_arg; -+ authinfo = &pyauthinfo->info; -+ } else if (authinfo_arg != Py_None) { -+ PyErr_SetString(PyExc_ValueError, -+ "invalid authinfo type"); -+ return NULL; -+ } -+ } -+ -+ if (libiscsi_discover_sendtargets(context, address, port, authinfo, -+ &nr_found, &found_nodes)) { -+ PyErr_SetString(PyExc_IOError, -+ libiscsi_get_error_string(context)); -+ return NULL; -+ } -+ -+ if (nr_found == 0) -+ Py_RETURN_NONE; -+ -+ found_node_list = PyList_New(nr_found); -+ if (!found_node_list) -+ return NULL; -+ -+ for(i = 0; i < nr_found; i++) { -+ PyIscsiNode *pynode; -+ -+ pynode = PyObject_New(PyIscsiNode, &PyIscsiNode_Type); -+ if (!pynode) { -+ /* This will deref already added nodes for us */ -+ Py_DECREF(found_node_list); -+ return NULL; -+ } -+ pynode->node = found_nodes[i]; -+ PyList_SET_ITEM(found_node_list, i, (PyObject *)pynode); -+ } -+ -+ return found_node_list; -+} -+ -+static PyObject *pylibiscsi_discover_firmware(PyObject *self) -+{ -+ int i, nr_found; -+ struct libiscsi_node *found_nodes; -+ PyObject* found_node_list; -+ -+ if (libiscsi_discover_firmware(context, &nr_found, &found_nodes)) { -+ PyErr_SetString(PyExc_IOError, -+ libiscsi_get_error_string(context)); -+ return NULL; -+ } -+ -+ if (nr_found == 0) -+ Py_RETURN_NONE; -+ -+ found_node_list = PyList_New(nr_found); -+ if (!found_node_list) -+ return NULL; -+ -+ for(i = 0; i < nr_found; i++) { -+ PyIscsiNode *pynode; -+ -+ pynode = PyObject_New(PyIscsiNode, &PyIscsiNode_Type); -+ if (!pynode) { -+ /* This will deref already added nodes for us */ -+ Py_DECREF(found_node_list); -+ return NULL; -+ } -+ pynode->node = found_nodes[i]; -+ PyList_SET_ITEM(found_node_list, i, (PyObject *)pynode); -+ } -+ -+ return found_node_list; -+} -+ -+static PyObject *pylibiscsi_get_firmware_initiator_name(PyObject *self) -+{ -+ char initiatorname[LIBISCSI_VALUE_MAXLEN]; -+ -+ if (libiscsi_get_firmware_initiator_name(initiatorname)) { -+ PyErr_SetString(PyExc_IOError, -+ libiscsi_get_error_string(context)); -+ return NULL; -+ } -+ -+ return PyString_FromString(initiatorname); -+} -+ -+static PyMethodDef pylibiscsi_functions[] = { -+ { "discover_sendtargets", -+ (PyCFunction)pylibiscsi_discover_sendtargets, -+ METH_VARARGS|METH_KEYWORDS, -+ "Do sendtargets discovery and return a list of found nodes)"}, -+ { "discover_firmware", -+ (PyCFunction)pylibiscsi_discover_firmware, METH_NOARGS, -+ "Do firmware discovery and return a list of found nodes)"}, -+ { "get_firmware_initiator_name", -+ (PyCFunction)pylibiscsi_get_firmware_initiator_name, -+ METH_NOARGS, -+ "Get initator name (iqn) from firmware"}, -+ {NULL, NULL} -+}; -+ -+PyMODINIT_FUNC initlibiscsi(void) -+{ -+ PyObject *m; -+ -+ if (!context) /* We may be called more then once */ -+ context = libiscsi_init(); -+ if (!context) -+ return; -+ -+ if (PyType_Ready(&PyIscsiChapAuthInfo_Type) < 0) -+ return; -+ -+ if (PyType_Ready(&PyIscsiNode_Type) < 0) -+ return; -+ -+ m = Py_InitModule("libiscsi", pylibiscsi_functions); -+ Py_INCREF(&PyIscsiChapAuthInfo_Type); -+ PyModule_AddObject(m, "chapAuthInfo", (PyObject *) &PyIscsiChapAuthInfo_Type); -+ Py_INCREF(&PyIscsiNode_Type); -+ PyModule_AddObject(m, "node", (PyObject *) &PyIscsiNode_Type); -+} -diff --git a/libiscsi/setup.py b/libiscsi/setup.py -new file mode 100644 -index 0000000..bb4329b ---- /dev/null -+++ b/libiscsi/setup.py -@@ -0,0 +1,9 @@ -+from distutils.core import setup, Extension -+ -+module1 = Extension('libiscsimodule', -+ sources = ['pylibiscsi.c'], -+ libraries = ['iscsi'], -+ library_dirs = ['.']) -+ -+setup (name = 'PyIscsi',version = '1.0', -+ description = 'libiscsi python bindings', ext_modules = [module1]) -diff --git a/libiscsi/tests/test_discovery_firmware.c b/libiscsi/tests/test_discovery_firmware.c -new file mode 100644 -index 0000000..76e852a ---- /dev/null -+++ b/libiscsi/tests/test_discovery_firmware.c -@@ -0,0 +1,53 @@ -+/* -+ * iSCSI Administration library -+ * -+ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. -+ * Copyright (C) 2008-2009 Hans de Goede -+ * maintained by open-iscsi@googlegroups.com -+ * -+ * 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 2 of the License, 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. -+ * -+ * See the file COPYING included with this distribution for more details. -+ */ -+ -+#include -+#include -+#include -+#include "libiscsi.h" -+ -+int main(void) -+{ -+ struct libiscsi_node *found_nodes; -+ struct libiscsi_context *context; -+ int i, found, rc = 0; -+ -+ context = libiscsi_init(); -+ if (!context) { -+ fprintf(stderr, "Error initializing libiscsi\n"); -+ return 1; -+ } -+ -+ rc = libiscsi_discover_firmware(context, &found, &found_nodes); -+ if (rc) -+ fprintf(stderr, "Error discovering: %s\n", -+ libiscsi_get_error_string(context)); -+ -+ for (i = 0; i < found; i++) { -+ fprintf(stdout, "Found node: %s, tpgt: %d, portal: %s:%d\n", -+ found_nodes[i].name, found_nodes[i].tpgt, -+ found_nodes[i].address, found_nodes[i].port); -+ } -+ -+ libiscsi_cleanup(context); -+ free (found_nodes); -+ -+ return rc; -+} -diff --git a/libiscsi/tests/test_discovery_sendtargets.c b/libiscsi/tests/test_discovery_sendtargets.c -new file mode 100644 -index 0000000..1a3c12e ---- /dev/null -+++ b/libiscsi/tests/test_discovery_sendtargets.c -@@ -0,0 +1,60 @@ -+/* -+ * iSCSI Administration library -+ * -+ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. -+ * Copyright (C) 2008-2009 Hans de Goede -+ * maintained by open-iscsi@googlegroups.com -+ * -+ * 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 2 of the License, 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. -+ * -+ * See the file COPYING included with this distribution for more details. -+ */ -+ -+#include -+#include -+#include -+#include "libiscsi.h" -+ -+int main(void) -+{ -+ struct libiscsi_node *found_nodes; -+ struct libiscsi_context *context; -+ struct libiscsi_auth_info auth_info; -+ int i, found, rc = 0; -+ -+ context = libiscsi_init(); -+ if (!context) { -+ fprintf(stderr, "Error initializing libiscsi\n"); -+ return 1; -+ } -+ -+ memset(&auth_info, 0, sizeof(auth_info)); -+ auth_info.method = libiscsi_auth_chap; -+ strcpy(auth_info.chap.username, "joe"); -+ strcpy(auth_info.chap.password, "secret"); -+ -+ rc = libiscsi_discover_sendtargets(context, "127.0.0.1", 3260, -+ &auth_info, &found, &found_nodes); -+ if (rc) -+ fprintf(stderr, "Error discovering: %s\n", -+ libiscsi_get_error_string(context)); -+ -+ for (i = 0; i < found; i++) { -+ fprintf(stdout, "Found node: %s, tpgt: %d, portal: %s:%d\n", -+ found_nodes[i].name, found_nodes[i].tpgt, -+ found_nodes[i].address, found_nodes[i].port); -+ } -+ -+ libiscsi_cleanup(context); -+ free (found_nodes); -+ -+ return rc; -+} -diff --git a/libiscsi/tests/test_get_auth.c b/libiscsi/tests/test_get_auth.c -new file mode 100644 -index 0000000..5e234da ---- /dev/null -+++ b/libiscsi/tests/test_get_auth.c -@@ -0,0 +1,70 @@ -+/* -+ * iSCSI Administration library -+ * -+ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. -+ * Copyright (C) 2008-2009 Hans de Goede -+ * maintained by open-iscsi@googlegroups.com -+ * -+ * 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 2 of the License, 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. -+ * -+ * See the file COPYING included with this distribution for more details. -+ */ -+ -+#include -+#include -+#include -+#include "libiscsi.h" -+ -+int main(void) -+{ -+ struct libiscsi_node node; -+ struct libiscsi_context *context; -+ struct libiscsi_auth_info auth_info; -+ int rc = 0; -+ -+ snprintf(node.name, LIBISCSI_VALUE_MAXLEN, "%s", -+ "iqn.2009-01.com.example:testdisk"); -+ node.tpgt = 1; -+ snprintf(node.address, NI_MAXHOST, "%s", "127.0.0.1"); -+ node.port = 3260; -+ -+ context = libiscsi_init(); -+ if (!context) { -+ fprintf(stderr, "Error initializing libiscsi\n"); -+ return 1; -+ } -+ -+ rc = libiscsi_node_get_auth(context, &node, &auth_info); -+ if (rc) { -+ fprintf(stderr, "Error setting authinfo: %s\n", -+ libiscsi_get_error_string(context)); -+ goto leave; -+ } -+ -+ switch (auth_info.method) { -+ case libiscsi_auth_none: -+ printf("Method: \"None\"\n"); -+ break; -+ case libiscsi_auth_chap: -+ printf("Method: \"CHAP\"\n"); -+ printf("User: \"%s\"\n", auth_info.chap.username); -+ printf("Pass: \"%s\"\n", auth_info.chap.password); -+ printf("RevUser: \"%s\"\n", -+ auth_info.chap.reverse_username); -+ printf("RevPass: \"%s\"\n", -+ auth_info.chap.reverse_password); -+ break; -+ } -+leave: -+ libiscsi_cleanup(context); -+ -+ return rc; -+} -diff --git a/libiscsi/tests/test_get_initiator_name.c b/libiscsi/tests/test_get_initiator_name.c -new file mode 100644 -index 0000000..997c053 ---- /dev/null -+++ b/libiscsi/tests/test_get_initiator_name.c -@@ -0,0 +1,38 @@ -+/* -+ * iSCSI Administration library -+ * -+ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. -+ * Copyright (C) 2008-2009 Hans de Goede -+ * maintained by open-iscsi@googlegroups.com -+ * -+ * 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 2 of the License, 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. -+ * -+ * See the file COPYING included with this distribution for more details. -+ */ -+ -+#include -+#include -+#include -+#include "libiscsi.h" -+ -+int main(void) -+{ -+ char initiatorname[LIBISCSI_VALUE_MAXLEN]; -+ -+ if (libiscsi_get_firmware_initiator_name(initiatorname)) { -+ fprintf(stderr, "No iscsi boot firmware found\n"); -+ return 1; -+ } -+ -+ printf("iqn:\t%s\n", initiatorname); -+ -+ return 0; -+} -diff --git a/libiscsi/tests/test_get_network_config.c b/libiscsi/tests/test_get_network_config.c -new file mode 100644 -index 0000000..2dedd61 ---- /dev/null -+++ b/libiscsi/tests/test_get_network_config.c -@@ -0,0 +1,45 @@ -+/* -+ * iSCSI Administration library -+ * -+ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. -+ * Copyright (C) 2008-2009 Hans de Goede -+ * maintained by open-iscsi@googlegroups.com -+ * -+ * 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 2 of the License, 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. -+ * -+ * See the file COPYING included with this distribution for more details. -+ */ -+ -+#include -+#include -+#include -+#include "libiscsi.h" -+ -+int main(void) -+{ -+ struct libiscsi_network_config config; -+ -+ if (libiscsi_get_firmware_network_config(&config)) { -+ fprintf(stderr, "No iscsi boot firmware found\n"); -+ return 1; -+ } -+ -+ printf("dhcp:\t%d\n", config.dhcp); -+ printf("iface:\t%s\n", config.iface_name); -+ printf("mac:\t%s\n", config.mac_address); -+ printf("ipaddr:\t%s\n", config.ip_address); -+ printf("mask:\t%s\n", config.netmask); -+ printf("gate:\t%s\n", config.gateway); -+ printf("dns1:\t%s\n", config.primary_dns); -+ printf("dns2:\t%s\n", config.secondary_dns); -+ -+ return 0; -+} -diff --git a/libiscsi/tests/test_login.c b/libiscsi/tests/test_login.c -new file mode 100644 -index 0000000..3eb70d6 ---- /dev/null -+++ b/libiscsi/tests/test_login.c -@@ -0,0 +1,52 @@ -+/* -+ * iSCSI Administration library -+ * -+ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. -+ * Copyright (C) 2008-2009 Hans de Goede -+ * maintained by open-iscsi@googlegroups.com -+ * -+ * 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 2 of the License, 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. -+ * -+ * See the file COPYING included with this distribution for more details. -+ */ -+ -+#include -+#include -+#include -+#include "libiscsi.h" -+ -+int main(void) -+{ -+ struct libiscsi_node node; -+ struct libiscsi_context *context; -+ int rc = 0; -+ -+ snprintf(node.name, LIBISCSI_VALUE_MAXLEN, "%s", -+ "iqn.2009-01.com.example:testdisk"); -+ node.tpgt = 1; -+ snprintf(node.address, NI_MAXHOST, "%s", "127.0.0.1"); -+ node.port = 3260; -+ -+ context = libiscsi_init(); -+ if (!context) { -+ fprintf(stderr, "Error initializing libiscsi\n"); -+ return 1; -+ } -+ -+ rc = libiscsi_node_login(context, &node); -+ if (rc) -+ fprintf(stderr, "Error logging in: %s\n", -+ libiscsi_get_error_string(context)); -+ -+ libiscsi_cleanup(context); -+ -+ return rc; -+} -diff --git a/libiscsi/tests/test_logout.c b/libiscsi/tests/test_logout.c -new file mode 100644 -index 0000000..b734dca ---- /dev/null -+++ b/libiscsi/tests/test_logout.c -@@ -0,0 +1,51 @@ -+/* -+ * iSCSI Administration library -+ * -+ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. -+ * Copyright (C) 2008-2009 Hans de Goede -+ * maintained by open-iscsi@googlegroups.com -+ * -+ * 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 2 of the License, 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. -+ * -+ * See the file COPYING included with this distribution for more details. -+ */ -+ -+#include -+#include -+#include "libiscsi.h" -+ -+int main(void) -+{ -+ struct libiscsi_node node; -+ struct libiscsi_context *context; -+ int rc = 0; -+ -+ snprintf(node.name, LIBISCSI_VALUE_MAXLEN, "%s", -+ "iqn.2009-01.com.example:testdisk"); -+ node.tpgt = 1; -+ snprintf(node.address, NI_MAXHOST, "%s", "127.0.0.1"); -+ node.port = 3260; -+ -+ context = libiscsi_init(); -+ if (!context) { -+ fprintf(stderr, "Error initializing libiscsi\n"); -+ return 1; -+ } -+ -+ rc = libiscsi_node_logout(context, &node); -+ if (rc) -+ fprintf(stderr, "Error logging out: %s\n", -+ libiscsi_get_error_string(context)); -+ -+ libiscsi_cleanup(context); -+ -+ return rc; -+} -diff --git a/libiscsi/tests/test_params.c b/libiscsi/tests/test_params.c -new file mode 100644 -index 0000000..d3223be ---- /dev/null -+++ b/libiscsi/tests/test_params.c -@@ -0,0 +1,103 @@ -+/* -+ * iSCSI Administration library -+ * -+ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. -+ * Copyright (C) 2008-2009 Hans de Goede -+ * maintained by open-iscsi@googlegroups.com -+ * -+ * 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 2 of the License, 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. -+ * -+ * See the file COPYING included with this distribution for more details. -+ */ -+ -+#include -+#include -+#include -+#include -+#include "libiscsi.h" -+ -+int main(void) -+{ -+ struct libiscsi_node node; -+ struct libiscsi_context *context; -+ char orig_value[LIBISCSI_VALUE_MAXLEN], value[LIBISCSI_VALUE_MAXLEN]; -+ int rc = 0; -+ -+ snprintf(node.name, LIBISCSI_VALUE_MAXLEN, "%s", -+ "iqn.2009-01.com.example:testdisk"); -+ node.tpgt = 1; -+ snprintf(node.address, NI_MAXHOST, "%s", "127.0.0.1"); -+ node.port = 3260; -+ -+ context = libiscsi_init(); -+ if (!context) { -+ fprintf(stderr, "Error initializing libiscsi\n"); -+ return 1; -+ } -+ -+ rc = libiscsi_node_get_parameter(context, &node, "node.startup", -+ orig_value); -+ if (rc) { -+ fprintf(stderr, "Error getting original value: %s\n", -+ libiscsi_get_error_string(context)); -+ goto leave; -+ } -+ -+ rc = libiscsi_node_set_parameter(context, &node, "node.startup", -+ "automatic"); -+ if (rc) { -+ fprintf(stderr, "Error setting node startup param: %s\n", -+ libiscsi_get_error_string(context)); -+ goto leave; -+ } -+ -+ rc = libiscsi_node_get_parameter(context, &node, "node.startup", -+ value); -+ if (rc) { -+ fprintf(stderr, "Error getting node startup param: %s\n", -+ libiscsi_get_error_string(context)); -+ goto leave; -+ } -+ -+ if (strcmp(value, "automatic")) { -+ fprintf(stderr, "Error set and get values do not match!\n"); -+ rc = EIO; -+ goto leave; -+ } -+ -+ rc = libiscsi_node_set_parameter(context, &node, "node.startup", -+ orig_value); -+ if (rc) { -+ fprintf(stderr, "Error setting original value: %s\n", -+ libiscsi_get_error_string(context)); -+ goto leave; -+ } -+ -+ rc = libiscsi_node_get_parameter(context, &node, "node.startup", -+ value); -+ if (rc) { -+ fprintf(stderr, "Error re-getting original value: %s\n", -+ libiscsi_get_error_string(context)); -+ goto leave; -+ } -+ -+ if (strcmp(value, orig_value)) { -+ fprintf(stderr, -+ "Error set and get original values do not match!\n"); -+ rc = EIO; -+ goto leave; -+ } -+ -+leave: -+ libiscsi_cleanup(context); -+ -+ return rc; -+} -diff --git a/libiscsi/tests/test_set_auth.c b/libiscsi/tests/test_set_auth.c -new file mode 100644 -index 0000000..a21f888 ---- /dev/null -+++ b/libiscsi/tests/test_set_auth.c -@@ -0,0 +1,58 @@ -+/* -+ * iSCSI Administration library -+ * -+ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. -+ * Copyright (C) 2008-2009 Hans de Goede -+ * maintained by open-iscsi@googlegroups.com -+ * -+ * 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 2 of the License, 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. -+ * -+ * See the file COPYING included with this distribution for more details. -+ */ -+ -+#include -+#include -+#include -+#include "libiscsi.h" -+ -+int main(void) -+{ -+ struct libiscsi_node node; -+ struct libiscsi_context *context; -+ struct libiscsi_auth_info auth_info; -+ int rc = 0; -+ -+ snprintf(node.name, LIBISCSI_VALUE_MAXLEN, "%s", -+ "iqn.2009-01.com.example:testdisk"); -+ node.tpgt = 1; -+ snprintf(node.address, NI_MAXHOST, "%s", "127.0.0.1"); -+ node.port = 3260; -+ -+ memset(&auth_info, 0, sizeof(auth_info)); -+ auth_info.method = libiscsi_auth_chap; -+ strcpy(auth_info.chap.username, "joe"); -+ strcpy(auth_info.chap.password, "secret"); -+ -+ context = libiscsi_init(); -+ if (!context) { -+ fprintf(stderr, "Error initializing libiscsi\n"); -+ return 1; -+ } -+ -+ rc = libiscsi_node_set_auth(context, &node, &auth_info); -+ if (rc) -+ fprintf(stderr, "Error setting authinfo: %s\n", -+ libiscsi_get_error_string(context)); -+ -+ libiscsi_cleanup(context); -+ -+ return rc; -+} -diff --git a/usr/Makefile b/usr/Makefile -index 3d8ee22..e731545 100644 ---- a/usr/Makefile -+++ b/usr/Makefile -@@ -31,7 +31,7 @@ endif - OPTFLAGS ?= -O2 -g - WARNFLAGS ?= -Wall -Wstrict-prototypes - CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -I../include -I. -I../utils/open-isns \ -- -D$(OSNAME) $(IPC_CFLAGS) -+ -D$(OSNAME) $(IPC_CFLAGS) -DISNS_ENABLE - PROGRAMS = iscsid iscsiadm iscsistart - - # libc compat files -diff --git a/usr/discovery.c b/usr/discovery.c -index afce6c0..0c93749 100644 ---- a/usr/discovery.c -+++ b/usr/discovery.c -@@ -36,6 +36,7 @@ - #include "types.h" - #include "iscsi_proto.h" - #include "initiator.h" -+#include "config.h" - #include "log.h" - #include "idbm.h" - #include "iscsi_settings.h" -@@ -50,9 +51,11 @@ - #include "iscsi_timer.h" - #include "iscsi_err.h" - /* libisns includes */ -+#ifdef ISNS_ENABLE - #include "isns.h" - #include "paths.h" - #include "message.h" -+#endif - - #ifdef SLP_ENABLE - #include "iscsi-slp-discovery.h" -@@ -98,6 +101,7 @@ static int request_initiator_name(void) - return 0; - } - -+#ifdef ISNS_ENABLE - void discovery_isns_free_servername(void) - { - if (isns_config.ic_server_name) -@@ -377,6 +381,7 @@ retry: - discovery_isns_free_servername(); - return rc; - } -+#endif - - int discovery_fw(void *data, struct iface_rec *iface, - struct list_head *rec_list) -diff --git a/usr/idbm.c b/usr/idbm.c -index 4bb9810..c84ae69 100644 ---- a/usr/idbm.c -+++ b/usr/idbm.c -@@ -1515,9 +1515,9 @@ int idbm_print_all_discovery(int info_level) - * fn should return -1 if it skipped the rec, a ISCSI_ERR error code if - * the operation failed or 0 if fn was run successfully. - */ --static int idbm_for_each_iface(int *found, void *data, -- idbm_iface_op_fn *fn, -- char *targetname, int tpgt, char *ip, int port) -+int idbm_for_each_iface(int *found, void *data, -+ idbm_iface_op_fn *fn, -+ char *targetname, int tpgt, char *ip, int port) - { - DIR *iface_dirfd; - struct dirent *iface_dent; -diff --git a/usr/idbm.h b/usr/idbm.h -index 1e9b132..4d08b31 100644 ---- a/usr/idbm.h -+++ b/usr/idbm.h -@@ -102,6 +102,9 @@ struct rec_op_data { - node_rec_t *match_rec; - idbm_iface_op_fn *fn; - }; -+extern int idbm_for_each_iface(int *found, void *data, -+ idbm_iface_op_fn *fn, -+ char *targetname, int tpgt, char *ip, int port); - extern int idbm_for_each_portal(int *found, void *data, - idbm_portal_op_fn *fn, char *targetname); - extern int idbm_for_each_node(int *found, void *data, -diff --git a/usr/iscsi_ipc.h b/usr/iscsi_ipc.h -index b6665cb..3e7f82a 100644 ---- a/usr/iscsi_ipc.h -+++ b/usr/iscsi_ipc.h -@@ -160,4 +160,6 @@ struct iscsi_ipc { - uint32_t host_no, uint32_t sid); - }; - -+struct iscsi_ipc *ipc; -+ - #endif /* ISCSI_IPC_H */ --- -1.8.1.4 - diff --git a/0054-iscsi_tool-Add-offload-host-statistics-support.patch b/0054-iscsi_tool-Add-offload-host-statistics-support.patch new file mode 100644 index 0000000..240056e --- /dev/null +++ b/0054-iscsi_tool-Add-offload-host-statistics-support.patch @@ -0,0 +1,524 @@ +From fe6623803d1135fd382146faa847bcdf5dc6abc3 Mon Sep 17 00:00:00 2001 +From: Lalit Chandivade +Date: Fri, 22 Nov 2013 05:46:13 -0500 +Subject: [PATCH] iscsi_tool: Add offload host statistics support. + +Signed-off-by: Lalit Chandivade +Signed-off-by: Vikas Chaudhary +--- + include/iscsi_if.h | 116 ++++++++++++++++++++++++- + usr/iscsi_ipc.h | 2 + + usr/iscsiadm.c | 244 ++++++++++++++++++++++++++++++++++++++++++++++++++++- + usr/netlink.c | 47 +++++++++++ + 4 files changed, 406 insertions(+), 3 deletions(-) + +diff --git a/include/iscsi_if.h b/include/iscsi_if.h +index e59bcd0..9d15811 100644 +--- a/include/iscsi_if.h ++++ b/include/iscsi_if.h +@@ -75,8 +75,8 @@ enum iscsi_uevent_e { + ISCSI_UEVENT_LOGOUT_FLASHNODE = UEVENT_BASE + 29, + ISCSI_UEVENT_LOGOUT_FLASHNODE_SID = UEVENT_BASE + 30, + ISCSI_UEVENT_SET_CHAP = UEVENT_BASE + 31, +- +- ISCSI_UEVENT_MAX = ISCSI_UEVENT_SET_CHAP, ++ ISCSI_UEVENT_GET_HOST_STATS = UEVENT_BASE + 32, ++ ISCSI_UEVENT_MAX = ISCSI_UEVENT_GET_HOST_STATS, + + /* up events */ + ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1, +@@ -251,6 +251,10 @@ struct iscsi_uevent { + uint32_t host_no; + uint32_t sid; + } logout_flashnode_sid; ++ struct msg_get_host_stats { ++ uint32_t host_no; ++ } get_host_stats; ++ + } u; + union { + /* messages k -> u */ +@@ -854,4 +858,112 @@ struct iscsi_chap_rec { + uint8_t password_length; + }; + ++#define ISCSI_HOST_STATS_CUSTOM_MAX 32 ++#define ISCSI_HOST_STATS_CUSTOM_DESC_MAX 64 ++struct iscsi_host_stats_custom { ++ char desc[ISCSI_HOST_STATS_CUSTOM_DESC_MAX]; ++ uint64_t value; ++}; ++ ++/* struct iscsi_offload_host_stats: Host statistics, ++ * Include statistics for MAC, IP, TCP & iSCSI. ++ */ ++struct iscsi_offload_host_stats { ++ /* MAC */ ++ uint64_t mactx_frames; ++ uint64_t mactx_bytes; ++ uint64_t mactx_multicast_frames; ++ uint64_t mactx_broadcast_frames; ++ uint64_t mactx_pause_frames; ++ uint64_t mactx_control_frames; ++ uint64_t mactx_deferral; ++ uint64_t mactx_excess_deferral; ++ uint64_t mactx_late_collision; ++ uint64_t mactx_abort; ++ uint64_t mactx_single_collision; ++ uint64_t mactx_multiple_collision; ++ uint64_t mactx_collision; ++ uint64_t mactx_frames_dropped; ++ uint64_t mactx_jumbo_frames; ++ uint64_t macrx_frames; ++ uint64_t macrx_bytes; ++ uint64_t macrx_unknown_control_frames; ++ uint64_t macrx_pause_frames; ++ uint64_t macrx_control_frames; ++ uint64_t macrx_dribble; ++ uint64_t macrx_frame_length_error; ++ uint64_t macrx_jabber; ++ uint64_t macrx_carrier_sense_error; ++ uint64_t macrx_frame_discarded; ++ uint64_t macrx_frames_dropped; ++ uint64_t mac_crc_error; ++ uint64_t mac_encoding_error; ++ uint64_t macrx_length_error_large; ++ uint64_t macrx_length_error_small; ++ uint64_t macrx_multicast_frames; ++ uint64_t macrx_broadcast_frames; ++ /* IP */ ++ uint64_t iptx_packets; ++ uint64_t iptx_bytes; ++ uint64_t iptx_fragments; ++ uint64_t iprx_packets; ++ uint64_t iprx_bytes; ++ uint64_t iprx_fragments; ++ uint64_t ip_datagram_reassembly; ++ uint64_t ip_invalid_address_error; ++ uint64_t ip_error_packets; ++ uint64_t ip_fragrx_overlap; ++ uint64_t ip_fragrx_outoforder; ++ uint64_t ip_datagram_reassembly_timeout; ++ uint64_t ipv6tx_packets; ++ uint64_t ipv6tx_bytes; ++ uint64_t ipv6tx_fragments; ++ uint64_t ipv6rx_packets; ++ uint64_t ipv6rx_bytes; ++ uint64_t ipv6rx_fragments; ++ uint64_t ipv6_datagram_reassembly; ++ uint64_t ipv6_invalid_address_error; ++ uint64_t ipv6_error_packets; ++ uint64_t ipv6_fragrx_overlap; ++ uint64_t ipv6_fragrx_outoforder; ++ uint64_t ipv6_datagram_reassembly_timeout; ++ /* TCP */ ++ uint64_t tcptx_segments; ++ uint64_t tcptx_bytes; ++ uint64_t tcprx_segments; ++ uint64_t tcprx_byte; ++ uint64_t tcp_duplicate_ack_retx; ++ uint64_t tcp_retx_timer_expired; ++ uint64_t tcprx_duplicate_ack; ++ uint64_t tcprx_pure_ackr; ++ uint64_t tcptx_delayed_ack; ++ uint64_t tcptx_pure_ack; ++ uint64_t tcprx_segment_error; ++ uint64_t tcprx_segment_outoforder; ++ uint64_t tcprx_window_probe; ++ uint64_t tcprx_window_update; ++ uint64_t tcptx_window_probe_persist; ++ /* ECC */ ++ uint64_t ecc_error_correction; ++ /* iSCSI */ ++ uint64_t iscsi_pdu_tx; ++ uint64_t iscsi_data_bytes_tx; ++ uint64_t iscsi_pdu_rx; ++ uint64_t iscsi_data_bytes_rx; ++ uint64_t iscsi_io_completed; ++ uint64_t iscsi_unexpected_io_rx; ++ uint64_t iscsi_format_error; ++ uint64_t iscsi_hdr_digest_error; ++ uint64_t iscsi_data_digest_error; ++ uint64_t iscsi_sequence_error; ++ /* ++ * iSCSI Custom Host Statistics support, i.e. Transport could ++ * extend existing host statistics with its own specific statistics ++ * up to ISCSI_HOST_STATS_CUSTOM_MAX ++ */ ++ uint32_t custom_length; ++ struct iscsi_host_stats_custom custom[0] ++ __attribute__ ((aligned (sizeof(uint64_t)))); ++}; ++ + #endif +diff --git a/usr/iscsi_ipc.h b/usr/iscsi_ipc.h +index a32da1c..9d26d54 100644 +--- a/usr/iscsi_ipc.h ++++ b/usr/iscsi_ipc.h +@@ -161,6 +161,8 @@ struct iscsi_ipc { + uint32_t flashnode_idx); + int (*logout_flash_node_sid) (uint64_t transport_handle, + uint32_t host_no, uint32_t sid); ++ int (*get_host_stats) (uint64_t transport_handle, uint32_t host_no, ++ char *host_stats); + }; + + #endif /* ISCSI_IPC_H */ +diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c +index 045259b..ed2c0c3 100644 +--- a/usr/iscsiadm.c ++++ b/usr/iscsiadm.c +@@ -69,7 +69,8 @@ enum iscsiadm_mode { + MODE_FW, + MODE_PING, + MODE_CHAP, +- MODE_FLASHNODE ++ MODE_FLASHNODE, ++ MODE_HOST_STATS + }; + + enum iscsiadm_op { +@@ -137,6 +138,7 @@ iscsiadm -m session [ -hV ] [ -d debug_level ] [ -P printlevel] [ -r sessionid + iscsiadm -m iface [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I ifacename | -H hostno|MAC ] [ [ -o operation ] [ -n name ] [ -v value ] ] [ -C ping [ -a ip ] [ -b packetsize ] [ -c count ] [ -i interval ] ]\n\ + iscsiadm -m fw [ -d debug_level ] [ -l ]\n\ + iscsiadm -m host [ -P printlevel ] [ -H hostno|MAC ] [ [ -C chap [ -x chap_tbl_idx ] ] | [ -C flashnode [ -A portal_type ] [ -x flashnode_idx ] ] ] [ [ -o operation ] [ -n name ] [ -v value ] ] \n\ ++iscsiadm -m host [ -P printlevel ] [ -H hostno|MAC ] [ [ -C chap [ -o operation ] [ -v chap_tbl_idx ] ] | [ -C flashnode [ -o operation ] [ -A portal_type ] [ -x flashnode_idx ] [ -n name ] [ -v value ] ] | [ -C stats ] ]\n\ + iscsiadm -k priority\n"); + } + exit(status); +@@ -207,6 +209,9 @@ str_to_submode(char *str) + sub_mode = MODE_CHAP; + else if (!strcmp("flashnode", str)) + sub_mode = MODE_FLASHNODE; ++ else if (!strcmp("stats", str)) ++ sub_mode = MODE_HOST_STATS; ++ + else + sub_mode = -1; + +@@ -2025,6 +2030,232 @@ exit_flashnode_op: + return rc; + } + ++static void print_host_stats(struct iscsi_offload_host_stats *host_stats) ++{ ++ /* MAC */ ++ printf("Host Statistics:\n" ++ "\tmactx_frames: %lld\n" ++ "\tmactx_bytes: %lld\n" ++ "\tmactx_multicast_frames: %lld\n" ++ "\tmactx_broadcast_frames: %lld\n" ++ "\tmactx_pause_frames: %lld\n" ++ "\tmactx_control_frames: %lld\n" ++ "\tmactx_deferral: %lld\n" ++ "\tmactx_excess_deferral: %lld\n" ++ "\tmactx_late_collision: %lld\n" ++ "\tmactx_abort: %lld\n" ++ "\tmactx_single_collision: %lld\n" ++ "\tmactx_multiple_collision: %lld\n" ++ "\tmactx_collision: %lld\n" ++ "\tmactx_frames_dropped: %lld\n" ++ "\tmactx_jumbo_frames: %lld\n" ++ "\tmacrx_frames: %lld\n" ++ "\tmacrx_bytes: %lld\n" ++ "\tmacrx_unknown_control_frames: %lld\n" ++ "\tmacrx_pause_frames: %lld\n" ++ "\tmacrx_control_frames: %lld\n" ++ "\tmacrx_dribble: %lld\n" ++ "\tmacrx_frame_length_error: %lld\n" ++ "\tmacrx_jabber: %lld\n" ++ "\tmacrx_carrier_sense_error: %lld\n" ++ "\tmacrx_frame_discarded: %lld\n" ++ "\tmacrx_frames_dropped: %lld\n" ++ "\tmac_crc_error: %lld\n" ++ "\tmac_encoding_error: %lld\n" ++ "\tmacrx_length_error_large: %lld\n" ++ "\tmacrx_length_error_small: %lld\n" ++ "\tmacrx_multicast_frames: %lld\n" ++ "\tmacrx_broadcast_frames: %lld\n" ++ /* IP */ ++ "\tiptx_packets: %lld\n" ++ "\tiptx_bytes: %lld\n" ++ "\tiptx_fragments: %lld\n" ++ "\tiprx_packets: %lld\n" ++ "\tiprx_bytes: %lld\n" ++ "\tiprx_fragments: %lld\n" ++ "\tip_datagram_reassembly: %lld\n" ++ "\tip_invalid_address_error: %lld\n" ++ "\tip_error_packets: %lld\n" ++ "\tip_fragrx_overlap: %lld\n" ++ "\tip_fragrx_outoforder: %lld\n" ++ "\tip_datagram_reassembly_timeout: %lld\n" ++ "\tipv6tx_packets: %lld\n" ++ "\tipv6tx_bytes: %lld\n" ++ "\tipv6tx_fragments: %lld\n" ++ "\tipv6rx_packets: %lld\n" ++ "\tipv6rx_bytes: %lld\n" ++ "\tipv6rx_fragments: %lld\n" ++ "\tipv6_datagram_reassembly: %lld\n" ++ "\tipv6_invalid_address_error: %lld\n" ++ "\tipv6_error_packets: %lld\n" ++ "\tipv6_fragrx_overlap: %lld\n" ++ "\tipv6_fragrx_outoforder: %lld\n" ++ "\tipv6_datagram_reassembly_timeout: %lld\n" ++ /* TCP */ ++ "\ttcptx_segments: %lld\n" ++ "\ttcptx_bytes: %lld\n" ++ "\ttcprx_segments: %lld\n" ++ "\ttcprx_byte: %lld\n" ++ "\ttcp_duplicate_ack_retx: %lld\n" ++ "\ttcp_retx_timer_expired: %lld\n" ++ "\ttcprx_duplicate_ack: %lld\n" ++ "\ttcprx_pure_ackr: %lld\n" ++ "\ttcptx_delayed_ack: %lld\n" ++ "\ttcptx_pure_ack: %lld\n" ++ "\ttcprx_segment_error: %lld\n" ++ "\ttcprx_segment_outoforder: %lld\n" ++ "\ttcprx_window_probe: %lld\n" ++ "\ttcprx_window_update: %lld\n" ++ "\ttcptx_window_probe_persist: %lld\n" ++ /* ECC */ ++ "\tecc_error_correction: %lld\n" ++ /* iSCSI */ ++ "\tiscsi_pdu_tx: %lld\n" ++ "\tiscsi_data_bytes_tx: %lld\n" ++ "\tiscsi_pdu_rx: %lld\n" ++ "\tiscsi_data_bytes_rx: %lld\n" ++ "\tiscsi_io_completed: %lld\n" ++ "\tiscsi_unexpected_io_rx: %lld\n" ++ "\tiscsi_format_error: %lld\n" ++ "\tiscsi_hdr_digest_error: %lld\n" ++ "\tiscsi_data_digest_error: %lld\n" ++ "\tiscsi_sequence_error: %lld\n", ++ /* MAC */ ++ (unsigned long long)host_stats->mactx_frames, ++ (unsigned long long)host_stats->mactx_bytes, ++ (unsigned long long)host_stats->mactx_multicast_frames, ++ (unsigned long long)host_stats->mactx_broadcast_frames, ++ (unsigned long long)host_stats->mactx_pause_frames, ++ (unsigned long long)host_stats->mactx_control_frames, ++ (unsigned long long)host_stats->mactx_deferral, ++ (unsigned long long)host_stats->mactx_excess_deferral, ++ (unsigned long long)host_stats->mactx_late_collision, ++ (unsigned long long)host_stats->mactx_abort, ++ (unsigned long long)host_stats->mactx_single_collision, ++ (unsigned long long)host_stats->mactx_multiple_collision, ++ (unsigned long long)host_stats->mactx_collision, ++ (unsigned long long)host_stats->mactx_frames_dropped, ++ (unsigned long long)host_stats->mactx_jumbo_frames, ++ (unsigned long long)host_stats->macrx_frames, ++ (unsigned long long)host_stats->macrx_bytes, ++ (unsigned long long)host_stats->macrx_unknown_control_frames, ++ (unsigned long long)host_stats->macrx_pause_frames, ++ (unsigned long long)host_stats->macrx_control_frames, ++ (unsigned long long)host_stats->macrx_dribble, ++ (unsigned long long)host_stats->macrx_frame_length_error, ++ (unsigned long long)host_stats->macrx_jabber, ++ (unsigned long long)host_stats->macrx_carrier_sense_error, ++ (unsigned long long)host_stats->macrx_frame_discarded, ++ (unsigned long long)host_stats->macrx_frames_dropped, ++ (unsigned long long)host_stats->mac_crc_error, ++ (unsigned long long)host_stats->mac_encoding_error, ++ (unsigned long long)host_stats->macrx_length_error_large, ++ (unsigned long long)host_stats->macrx_length_error_small, ++ (unsigned long long)host_stats->macrx_multicast_frames, ++ (unsigned long long)host_stats->macrx_broadcast_frames, ++ /* IP */ ++ (unsigned long long)host_stats->iptx_packets, ++ (unsigned long long)host_stats->iptx_bytes, ++ (unsigned long long)host_stats->iptx_fragments, ++ (unsigned long long)host_stats->iprx_packets, ++ (unsigned long long)host_stats->iprx_bytes, ++ (unsigned long long)host_stats->iprx_fragments, ++ (unsigned long long)host_stats->ip_datagram_reassembly, ++ (unsigned long long)host_stats->ip_invalid_address_error, ++ (unsigned long long)host_stats->ip_error_packets, ++ (unsigned long long)host_stats->ip_fragrx_overlap, ++ (unsigned long long)host_stats->ip_fragrx_outoforder, ++ (unsigned long long)host_stats->ip_datagram_reassembly_timeout, ++ (unsigned long long)host_stats->ipv6tx_packets, ++ (unsigned long long)host_stats->ipv6tx_bytes, ++ (unsigned long long)host_stats->ipv6tx_fragments, ++ (unsigned long long)host_stats->ipv6rx_packets, ++ (unsigned long long)host_stats->ipv6rx_bytes, ++ (unsigned long long)host_stats->ipv6rx_fragments, ++ (unsigned long long)host_stats->ipv6_datagram_reassembly, ++ (unsigned long long)host_stats->ipv6_invalid_address_error, ++ (unsigned long long)host_stats->ipv6_error_packets, ++ (unsigned long long)host_stats->ipv6_fragrx_overlap, ++ (unsigned long long)host_stats->ipv6_fragrx_outoforder, ++ (unsigned long long)host_stats->ipv6_datagram_reassembly_timeout, ++ /* TCP */ ++ (unsigned long long)host_stats->tcptx_segments, ++ (unsigned long long)host_stats->tcptx_bytes, ++ (unsigned long long)host_stats->tcprx_segments, ++ (unsigned long long)host_stats->tcprx_byte, ++ (unsigned long long)host_stats->tcp_duplicate_ack_retx, ++ (unsigned long long)host_stats->tcp_retx_timer_expired, ++ (unsigned long long)host_stats->tcprx_duplicate_ack, ++ (unsigned long long)host_stats->tcprx_pure_ackr, ++ (unsigned long long)host_stats->tcptx_delayed_ack, ++ (unsigned long long)host_stats->tcptx_pure_ack, ++ (unsigned long long)host_stats->tcprx_segment_error, ++ (unsigned long long)host_stats->tcprx_segment_outoforder, ++ (unsigned long long)host_stats->tcprx_window_probe, ++ (unsigned long long)host_stats->tcprx_window_update, ++ (unsigned long long)host_stats->tcptx_window_probe_persist, ++ /* ECC */ ++ (unsigned long long)host_stats->ecc_error_correction, ++ /* iSCSI */ ++ (unsigned long long)host_stats->iscsi_pdu_tx, ++ (unsigned long long)host_stats->iscsi_data_bytes_tx, ++ (unsigned long long)host_stats->iscsi_pdu_rx, ++ (unsigned long long)host_stats->iscsi_data_bytes_rx, ++ (unsigned long long)host_stats->iscsi_io_completed, ++ (unsigned long long)host_stats->iscsi_unexpected_io_rx, ++ (unsigned long long)host_stats->iscsi_format_error, ++ (unsigned long long)host_stats->iscsi_hdr_digest_error, ++ (unsigned long long)host_stats->iscsi_data_digest_error, ++ (unsigned long long)host_stats->iscsi_sequence_error); ++} ++ ++static int exec_host_stats_op(int op, int info_level, uint32_t host_no) ++{ ++ struct iscsi_transport *t = NULL; ++ char *req_buf; ++ int rc = ISCSI_SUCCESS; ++ int fd = 0, buf_size = 0; ++ ++ t = iscsi_sysfs_get_transport_by_hba(host_no); ++ if (!t) { ++ log_error("Could not match hostno %u to transport.", host_no); ++ rc = ISCSI_ERR_TRANS_NOT_FOUND; ++ goto exit_host_stats; ++ } ++ ++ buf_size = sizeof(struct iscsi_offload_host_stats) + ++ sizeof(struct iscsi_uevent); ++ req_buf = calloc(1, buf_size); ++ if (!req_buf) { ++ log_error("Could not allocate memory for host stats request."); ++ rc = ISCSI_ERR_NOMEM; ++ goto exit_host_stats; ++ } ++ ++ fd = ipc->ctldev_open(); ++ if (fd < 0) { ++ rc = ISCSI_ERR_INTERNAL; ++ log_error("Netlink open failed."); ++ goto exit_host_stats; ++ } ++ ++ rc = ipc->get_host_stats(t->handle, host_no, req_buf); ++ if (rc < 0) { ++ log_error("get_host_stats failed. errno=%d", errno); ++ rc = ISCSI_ERR; ++ goto exit_host_stats; ++ } ++ ++ print_host_stats(req_buf + sizeof(struct iscsi_uevent)); ++ ++ ipc->ctldev_close(); ++ ++exit_host_stats: ++ if (req_buf) ++ free(req_buf); ++ return rc; ++} ++ + static int verify_iface_params(struct list_head *params, struct node_rec *rec) + { + struct user_param *param; +@@ -3239,6 +3470,17 @@ main(int argc, char **argv) + index, portal_type, + ¶ms); + break; ++ case MODE_HOST_STATS: ++ if (!host_no) { ++ log_error("STATS mode requires host no"); ++ rc = ISCSI_ERR_INVAL; ++ break; ++ } ++ ++ rc = exec_host_stats_op(op, info_level, ++ host_no); ++ break; ++ + default: + log_error("Invalid Sub Mode"); + break; +diff --git a/usr/netlink.c b/usr/netlink.c +index 151b56d..1c4b5cc 100644 +--- a/usr/netlink.c ++++ b/usr/netlink.c +@@ -339,6 +339,10 @@ __kipc_call(struct iovec *iovp, int count) + } else if (ev->type == ISCSI_UEVENT_GET_CHAP) { + /* kget_chap() will read */ + return 0; ++ } else if (ev->type == ISCSI_UEVENT_GET_HOST_STATS) { ++ /* kget_host_stats() will read */ ++ return 0; ++ + } else { + if ((rc = nlpayload_read(ctrl_fd, (void*)ev, + sizeof(*ev), 0)) < 0) { +@@ -1439,6 +1443,48 @@ klogout_flashnode_sid(uint64_t transport_handle, uint32_t host_no, + return 0; + } + ++static int kget_host_stats(uint64_t transport_handle, uint32_t host_no, ++ char *host_stats) ++{ ++ int rc = 0; ++ int ev_size; ++ struct iscsi_uevent ev; ++ struct iovec iov[2]; ++ char nlm_ev[NLMSG_SPACE(sizeof(struct iscsi_uevent))]; ++ struct nlmsghdr *nlh; ++ ++ memset(&ev, 0, sizeof(struct iscsi_uevent)); ++ ++ ev.type = ISCSI_UEVENT_GET_HOST_STATS; ++ ev.transport_handle = transport_handle; ++ ev.u.get_host_stats.host_no = host_no; ++ ++ iov[1].iov_base = &ev; ++ iov[1].iov_len = sizeof(ev); ++ rc = __kipc_call(iov, 2); ++ if (rc < 0) ++ return rc; ++ ++ if ((rc = nl_read(ctrl_fd, nlm_ev, ++ NLMSG_SPACE(sizeof(struct iscsi_uevent)), ++ MSG_PEEK)) < 0) { ++ log_error("can not read nlm_ev, error %d", rc); ++ return rc; ++ } ++ ++ nlh = (struct nlmsghdr *)nlm_ev; ++ ev_size = nlh->nlmsg_len - NLMSG_ALIGN(sizeof(struct nlmsghdr)); ++ ++ if ((rc = nlpayload_read(ctrl_fd, (void *)host_stats, ++ ev_size, 0)) < 0) { ++ log_error("can not read from NL socket, error %d", rc); ++ return rc; ++ } ++ ++ return rc; ++} ++ ++ + static void drop_data(struct nlmsghdr *nlh) + { + int ev_size; +@@ -1737,6 +1783,7 @@ struct iscsi_ipc nl_ipc = { + .login_flash_node = klogin_flashnode, + .logout_flash_node = klogout_flashnode, + .logout_flash_node_sid = klogout_flashnode_sid, ++ .get_host_stats = kget_host_stats, + }; + struct iscsi_ipc *ipc = &nl_ipc; + +-- +1.8.3.1 + diff --git a/0055-README-Updated-for-host-statistics.patch b/0055-README-Updated-for-host-statistics.patch new file mode 100644 index 0000000..ac404e1 --- /dev/null +++ b/0055-README-Updated-for-host-statistics.patch @@ -0,0 +1,33 @@ +From d1e8e68f440bbcf5c8b716572ccb3a0904dcd35e Mon Sep 17 00:00:00 2001 +From: Lalit Chandivade +Date: Fri, 22 Nov 2013 05:46:14 -0500 +Subject: [PATCH] README: Updated for host statistics. + +Signed-off-by: Lalit Chandivade +Signed-off-by: Vikas Chaudhary +--- + README | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/README b/README +index 813548d..06d1b6f 100644 +--- a/README ++++ b/README +@@ -1073,6 +1073,14 @@ To now log into targets it is the same as with sofware iscsi. See section + is free then entry of type bidi chap will be created at that index + with given username_in and password_in values. + ++ Host mode with stats submode: ++ ++ - Display host statistics: ++ ./iscsiadm -m host -H 6 -C stats ++ ++ This will print the aggregate statistics on the host adapter port. ++ This includes MAC, TCP/IP, ECC & iSCSI statistics. ++ + 6. Configuration + ================ + +-- +1.8.3.1 + diff --git a/0055-dont-use-static.patch b/0055-dont-use-static.patch deleted file mode 100644 index 9e43b7b..0000000 --- a/0055-dont-use-static.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ff224a16d409c4b479b3ac1ff662093cb067e281 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Mon, 19 Nov 2012 17:04:29 -0800 -Subject: dont use static - ---- - usr/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/usr/Makefile b/usr/Makefile -index 015f1b9..1669890 100644 ---- a/usr/Makefile -+++ b/usr/Makefile -@@ -61,7 +61,7 @@ iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o - - iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \ - iscsistart.o statics.o -- $(CC) $(CFLAGS) -static $^ -o $@ -+ $(CC) $(CFLAGS) $^ -o $@ - clean: - rm -f *.o $(PROGRAMS) .depend $(LIBSYS) - --- -1.7.11.7 - diff --git a/0056-iscsiadm.8-Updated-man-page-for-host-statistics.patch b/0056-iscsiadm.8-Updated-man-page-for-host-statistics.patch new file mode 100644 index 0000000..b01aa27 --- /dev/null +++ b/0056-iscsiadm.8-Updated-man-page-for-host-statistics.patch @@ -0,0 +1,51 @@ +From 4a3076b56834d444eb9e19fc5fa25fff3a9624ec Mon Sep 17 00:00:00 2001 +From: Lalit Chandivade +Date: Fri, 22 Nov 2013 05:46:15 -0500 +Subject: [PATCH] iscsiadm.8: Updated man page for host statistics. + +Signed-off-by: Lalit Chandivade +Signed-off-by: Vikas Chaudhary +--- + doc/iscsiadm.8 | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8 +index 0e8149c..d59af43 100644 +--- a/doc/iscsiadm.8 ++++ b/doc/iscsiadm.8 +@@ -18,6 +18,8 @@ iscsiadm \- open-iscsi administration utility + + \fBiscsiadm\fR \-m host [ \-P printlevel ] [ \-H hostno|MAC ] [ [ \-C chap [ \-x chap_tbl_idx ] ] | [ \-C flashnode [ \-A portal_type ] [ \-x flashnode_idx ] ] ] [ [ \-o operation ] [ \-n name ] [ \-v value ] ] + ++\fBiscsiadm\fR \-m host [ \-P printlevel ] [ \-H hostno|MAC ] [ [ \-C chap [ \-o operation ] [ \-v chap_tbl_idx ] ] | [ \-C flashnode [ \-o operation ] [ \-A portal_type ] [ \-x flashnode_idx ] [ \-n name ] [ \-v value ] ] | [ \-C stats ]] ++ + \fBiscsiadm\fR \-k priority + + .SH "DESCRIPTION" +@@ -72,12 +74,14 @@ Currently iscsiadm support ping as submode for iface. For example, + + iscsiadm -m iface -I ifacename -C ping -a ipaddr -b packetsize -c count -i interval + +-For host, it supports chap and flashnode as submodes. For example, ++For host, it supports chap , flashnode and stats as submodes. For example, + + iscsiadm -m host -H hostno -C chap -x chap_tbl_idx -o operation + + iscsiadm -m host -H hostno -C flashnode -x flashnode_idx -o operation + ++iscsiadm -m host -H hostno -C stats ++ + .TP + \fB\-d\fR, \fB\-\-debug=\fIdebug_level\fP + print debugging information. Valid values for debug_level are 0 to 8. +@@ -279,6 +283,7 @@ tuple passed in. + .TP + \fB\-s\fR, \fB\-\-stats\fR + Display session statistics. ++This option when used with host mode, displays host statistics. + + .TP + \fB\-S\fR, \fB\-\-show\fR +-- +1.8.3.1 + diff --git a/0056-remove-the-offload-boot-supported-ifdef.patch b/0056-remove-the-offload-boot-supported-ifdef.patch deleted file mode 100644 index a1ccdc7..0000000 --- a/0056-remove-the-offload-boot-supported-ifdef.patch +++ /dev/null @@ -1,45 +0,0 @@ -From aa58a042ec20575143c1a5c813c9552a286aeb0e Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Mon, 19 Nov 2012 17:09:24 -0800 -Subject: remove the offload boot supported ifdef - ---- - usr/iface.c | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - -diff --git a/usr/iface.c b/usr/iface.c -index c86892e..f5441c0 100644 ---- a/usr/iface.c -+++ b/usr/iface.c -@@ -895,6 +895,7 @@ int iface_setup_from_boot_context(struct iface_rec *iface, - { - struct iscsi_transport *t = NULL; - uint32_t hostno; -+ int rc; - - if (strlen(context->initiatorname)) - strlcpy(iface->iname, context->initiatorname, -@@ -907,10 +908,7 @@ int iface_setup_from_boot_context(struct iface_rec *iface, - return 0; - } - } else if (strlen(context->iface)) { --/* this ifdef is only temp until distros and firmwares are updated */ --#ifdef OFFLOAD_BOOT_SUPPORTED - char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN]; -- int rc; - - memset(transport_name, 0, ISCSI_TRANSPORT_NAME_MAXLEN); - /* make sure offload driver is loaded */ -@@ -936,9 +934,6 @@ int iface_setup_from_boot_context(struct iface_rec *iface, - } - - strlcpy(iface->netdev, context->iface, sizeof(iface->netdev)); --#else -- return 0; --#endif - } else - return 0; - --- -1.7.11.7 - diff --git a/0057-iscsi-tools-Fix-the-iscsiadm-help-options-for-host-m.patch b/0057-iscsi-tools-Fix-the-iscsiadm-help-options-for-host-m.patch new file mode 100644 index 0000000..8be67e1 --- /dev/null +++ b/0057-iscsi-tools-Fix-the-iscsiadm-help-options-for-host-m.patch @@ -0,0 +1,30 @@ +From 505ed9d3dbc6f3d746833a2cad7fb62d9ca20c35 Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Mon, 30 Dec 2013 06:14:40 -0500 +Subject: [PATCH] iscsi tools: Fix the iscsiadm help options for host mode + +Removing the redundant help message for host mode of iscsiadm. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + usr/iscsiadm.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c +index ed2c0c3..3cde8d1 100644 +--- a/usr/iscsiadm.c ++++ b/usr/iscsiadm.c +@@ -137,8 +137,7 @@ iscsiadm -m node [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -L all,manual,au + iscsiadm -m session [ -hV ] [ -d debug_level ] [ -P printlevel] [ -r sessionid | sysfsdir [ -R | -u | -s ] [ -o operation ] [ -n name ] [ -v value ] ]\n\ + iscsiadm -m iface [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I ifacename | -H hostno|MAC ] [ [ -o operation ] [ -n name ] [ -v value ] ] [ -C ping [ -a ip ] [ -b packetsize ] [ -c count ] [ -i interval ] ]\n\ + iscsiadm -m fw [ -d debug_level ] [ -l ]\n\ +-iscsiadm -m host [ -P printlevel ] [ -H hostno|MAC ] [ [ -C chap [ -x chap_tbl_idx ] ] | [ -C flashnode [ -A portal_type ] [ -x flashnode_idx ] ] ] [ [ -o operation ] [ -n name ] [ -v value ] ] \n\ +-iscsiadm -m host [ -P printlevel ] [ -H hostno|MAC ] [ [ -C chap [ -o operation ] [ -v chap_tbl_idx ] ] | [ -C flashnode [ -o operation ] [ -A portal_type ] [ -x flashnode_idx ] [ -n name ] [ -v value ] ] | [ -C stats ] ]\n\ ++iscsiadm -m host [ -P printlevel ] [ -H hostno|MAC ] [ [ -C chap [ -x chap_tbl_idx ] ] | [ -C flashnode [ -A portal_type ] [ -x flashnode_idx ] ] | [ -C stats ] ] [ [ -o operation ] [ -n name ] [ -v value ] ] \n\ + iscsiadm -k priority\n"); + } + exit(status); +-- +1.8.3.1 + diff --git a/0058-Man-page-correction-for-host-mode-options-of-iscsiad.patch b/0058-Man-page-correction-for-host-mode-options-of-iscsiad.patch new file mode 100644 index 0000000..f9b97c6 --- /dev/null +++ b/0058-Man-page-correction-for-host-mode-options-of-iscsiad.patch @@ -0,0 +1,31 @@ +From bd91b810918df6ac09167aa37c6dc1f32bf907be Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Mon, 30 Dec 2013 06:14:41 -0500 +Subject: [PATCH] Man page correction for host mode options of iscsiadm + +Correct the help options of iscsiadm host mode in its man page. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + doc/iscsiadm.8 | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8 +index d59af43..9a945d1 100644 +--- a/doc/iscsiadm.8 ++++ b/doc/iscsiadm.8 +@@ -16,9 +16,7 @@ iscsiadm \- open-iscsi administration utility + + \fBiscsiadm\fR \-m fw [ \-d debug_level ] [\-l] + +-\fBiscsiadm\fR \-m host [ \-P printlevel ] [ \-H hostno|MAC ] [ [ \-C chap [ \-x chap_tbl_idx ] ] | [ \-C flashnode [ \-A portal_type ] [ \-x flashnode_idx ] ] ] [ [ \-o operation ] [ \-n name ] [ \-v value ] ] +- +-\fBiscsiadm\fR \-m host [ \-P printlevel ] [ \-H hostno|MAC ] [ [ \-C chap [ \-o operation ] [ \-v chap_tbl_idx ] ] | [ \-C flashnode [ \-o operation ] [ \-A portal_type ] [ \-x flashnode_idx ] [ \-n name ] [ \-v value ] ] | [ \-C stats ]] ++\fBiscsiadm\fR \-m host [ \-P printlevel ] [ \-H hostno|MAC ] [ [ \-C chap [ \-x chap_tbl_idx ] ] | [ \-C flashnode [ \-A portal_type ] [ \-x flashnode_idx ] ] | [ \-C stats ] ] [ [ \-o operation ] [ \-n name ] [ \-v value ] ] + + \fBiscsiadm\fR \-k priority + +-- +1.8.3.1 + diff --git a/0058-iscsiuio-IPC-newroot-command.patch b/0058-iscsiuio-IPC-newroot-command.patch deleted file mode 100644 index fa3f4c7..0000000 --- a/0058-iscsiuio-IPC-newroot-command.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 6e979154c9c51dedd54c91e46106e495a65ced43 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Wed, 2 Jan 2013 14:45:05 -0800 -Subject: [PATCH 58/58] iscsiuio IPC newroot command - ---- - usr/mgmt_ipc.c | 11 +++++++++++ - usr/transport.c | 1 + - usr/transport.h | 1 + - usr/uip_mgmt_ipc.c | 14 ++++++++++++++ - usr/uip_mgmt_ipc.h | 5 +++++ - 5 files changed, 32 insertions(+) - -diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c -index 5cb7143..a8f8473 100644 ---- a/usr/mgmt_ipc.c -+++ b/usr/mgmt_ipc.c -@@ -36,6 +36,7 @@ - #include "sysdeps.h" - #include "iscsi_ipc.h" - #include "iscsi_err.h" -+#include "iscsi_sysfs.h" - - #define PEERUSER_MAX 64 - #define EXTMSG_MAX (64 * 1024) -@@ -229,8 +230,18 @@ static int - mgmt_ipc_newroot(queue_task_t *qtask) - { - char *newroot = qtask->req.u.newroot.path; -+ struct iscsi_transport *t; -+ - if (chdir(newroot) || chroot(".") || chdir("/")) - return ISCSI_ERR; -+ -+ /* if a registered transport has a separate userspace process, -+ * notify it of the root change as well */ -+ list_for_each_entry(t, &transports, list) { -+ if (t->template->newroot) -+ t->template->newroot(t, newroot); -+ } -+ - mgmt_ipc_write_rsp(qtask, ISCSI_SUCCESS); - return ISCSI_SUCCESS; - } -diff --git a/usr/transport.c b/usr/transport.c -index 4d030a8..e0488ad 100644 ---- a/usr/transport.c -+++ b/usr/transport.c -@@ -83,6 +83,7 @@ struct iscsi_transport_template bnx2i = { - .ep_poll = ktransport_ep_poll, - .ep_disconnect = ktransport_ep_disconnect, - .set_net_config = uip_broadcast_params, -+ .newroot = uip_broadcast_newroot, - }; - - struct iscsi_transport_template be2iscsi = { -diff --git a/usr/transport.h b/usr/transport.h -index 388e4b1..d4d9ec7 100644 ---- a/usr/transport.h -+++ b/usr/transport.h -@@ -39,6 +39,7 @@ struct iscsi_transport_template { - int (*set_net_config) (struct iscsi_transport *t, - struct iface_rec *iface, - struct iscsi_session *session); -+ void (*newroot) (struct iscsi_transport *t, char *path); - }; - - /* represents data path provider */ -diff --git a/usr/uip_mgmt_ipc.c b/usr/uip_mgmt_ipc.c -index f3074ee..d5d496a 100644 ---- a/usr/uip_mgmt_ipc.c -+++ b/usr/uip_mgmt_ipc.c -@@ -39,3 +39,17 @@ int uip_broadcast_params(struct iscsi_transport *t, - sizeof(iscsid_uip_broadcast_header_t) + - sizeof(*iface)); - } -+ -+int uip_broadcast_newroot(struct iscsi_transport *t, char *newroot) -+{ -+ struct iscsid_uip_broadcast broadcast; -+ -+ memset(&broadcast, 0, sizeof(broadcast)); -+ -+ broadcast.header.command = ISCSID_UIP_NEWROOT; -+ strncpy(broadcast.u.newroot.path, newroot, PATH_MAX); -+ -+ return uip_broadcast(&broadcast, -+ sizeof(iscsid_uip_broadcast_header_t) + -+ PATH_MAX + 1); -+} -diff --git a/usr/uip_mgmt_ipc.h b/usr/uip_mgmt_ipc.h -index 29a4769..3ca4fb1 100644 ---- a/usr/uip_mgmt_ipc.h -+++ b/usr/uip_mgmt_ipc.h -@@ -29,6 +29,7 @@ - typedef enum iscsid_uip_cmd { - ISCSID_UIP_IPC_UNKNOWN = 0, - ISCSID_UIP_IPC_GET_IFACE = 1, -+ ISCSID_UIP_NEWROOT = 2, - - __ISCSID_UIP_IPC_MAX_COMMAND - } iscsid_uip_cmd_e; -@@ -47,6 +48,9 @@ typedef struct iscsid_uip_broadcast { - struct ipc_broadcast_iface_rec { - struct iface_rec rec; - } iface_rec; -+ struct ipc_broadcast_newroot { -+ char path[PATH_MAX + 1]; -+ } newroot; - } u; - } iscsid_uip_broadcast_t; - -@@ -69,5 +73,6 @@ extern int uip_broadcast_params(struct iscsi_transport *t, - struct iface_rec *iface, - struct iscsi_session *session); - -+extern int uip_broadcast_newroot(struct iscsi_transport *t, char *path); - - #endif /* UIP_MGMT_IPC_H */ --- -1.8.1.4 - diff --git a/0059-ISCSIUIO-Added-tx-doorbell-override-mechanism.patch b/0059-ISCSIUIO-Added-tx-doorbell-override-mechanism.patch new file mode 100644 index 0000000..6b767d6 --- /dev/null +++ b/0059-ISCSIUIO-Added-tx-doorbell-override-mechanism.patch @@ -0,0 +1,75 @@ +From 77245b944b7d14a4e139984c3773e994c6ef6703 Mon Sep 17 00:00:00 2001 +From: Eddie Wai +Date: Wed, 11 Dec 2013 15:38:12 -0800 +Subject: [PATCH] ISCSIUIO: Added tx doorbell override mechanism + +Added a new tx doorbell field in the uio path to work with new +bnx2x/cnic drivers that supports VF_RSS. + +Signed-off-by: Eddie Wai +--- + iscsiuio/src/unix/libs/bnx2x.c | 13 ++++++++++--- + iscsiuio/src/unix/libs/bnx2x.h | 9 ++++++++- + 2 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/iscsiuio/src/unix/libs/bnx2x.c b/iscsiuio/src/unix/libs/bnx2x.c +index 36fc48e..748b59d 100644 +--- a/iscsiuio/src/unix/libs/bnx2x.c ++++ b/iscsiuio/src/unix/libs/bnx2x.c +@@ -900,8 +900,14 @@ static int bnx2x_open(nic_t *nic) + struct client_init_general_data *data = bp->bufs; + + bp->client_id = data->client_id; +- if (data->reserved0) +- bp->cid = data->reserved0; ++ if (data->uid.cid) ++ bp->cid = data->uid.cid; ++ if (bp->version.minor >= 78 && bp->version.sub_minor >= 55 && ++ data->uid.cid_override_key == UIO_USE_TX_DOORBELL) { ++ bp->tx_doorbell = data->uid.tx_db_off; ++ LOG_INFO(PFX "%s: tx doorbell override offset = 0x%x", ++ nic->log_name, bp->tx_doorbell); ++ } + } + + LOG_INFO(PFX "%s: func 0x%x, pfid 0x%x, client_id 0x%x, cid 0x%x", +@@ -928,7 +934,8 @@ static int bnx2x_open(nic_t *nic) + USTORM_RX_PRODS_E2_OFFSET(cl_qzone_id) : + USTORM_RX_PRODS_E1X_OFFSET(bp->port, bp->client_id)); + +- bp->tx_doorbell = bp->cid * 0x80 + 0x40; ++ if (!bp->tx_doorbell) ++ bp->tx_doorbell = bp->cid * 0x80 + 0x40; + + bp->get_rx_cons = bnx2x_get_rx_60; + bp->get_tx_cons = bnx2x_get_tx_60; +diff --git a/iscsiuio/src/unix/libs/bnx2x.h b/iscsiuio/src/unix/libs/bnx2x.h +index 0b74e44..ce55cfc 100644 +--- a/iscsiuio/src/unix/libs/bnx2x.h ++++ b/iscsiuio/src/unix/libs/bnx2x.h +@@ -382,6 +382,13 @@ union eth_rx_cqe_70 { + struct eth_rx_cqe_next_page_70 next_page_cqe_70; + }; + ++struct uio_init_data { ++ __u32 cid; ++ __u32 tx_db_off; ++ __u32 cid_override_key; ++#define UIO_USE_TX_DOORBELL 0x017855DB ++}; ++ + struct client_init_general_data { + __u8 client_id; + __u8 statistics_counter_id; +@@ -394,7 +401,7 @@ struct client_init_general_data { + __u8 func_id; + __u8 cos; + __u8 traffic_type; +- __u32 reserved0; ++ struct uio_init_data uid; + }; + + /****************************************************************************** +-- +1.8.3.1 + diff --git a/0059-iscsiuio-systemd-unit-files.patch b/0059-iscsiuio-systemd-unit-files.patch deleted file mode 100644 index 2d0e213..0000000 --- a/0059-iscsiuio-systemd-unit-files.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 822b53e6c9ebb0fe7236ebd3b4c73b009100592d Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Tue, 22 Jan 2013 14:27:12 -0800 -Subject: iscsiuio systemd unit files - ---- - etc/systemd/iscsiuio.service | 17 +++++++++++++++++ - etc/systemd/iscsiuio.socket | 9 +++++++++ - 2 files changed, 26 insertions(+) - create mode 100644 etc/systemd/iscsiuio.service - create mode 100644 etc/systemd/iscsiuio.socket - -diff --git a/etc/systemd/iscsiuio.service b/etc/systemd/iscsiuio.service -new file mode 100644 -index 0000000..f0410b7 ---- /dev/null -+++ b/etc/systemd/iscsiuio.service -@@ -0,0 +1,17 @@ -+[Unit] -+Description=iSCSI UserSpace I/O driver -+Documentation=man:iscsiuio(8) -+DefaultDependencies=no -+Conflicts=shutdown.target -+Requires=iscsid.service -+BindTo=iscsid.service -+After=network.target -+Before=remote-fs-pre.target iscsid.service -+ -+[Service] -+Type=forking -+PIDFile=/var/run/iscsiuio.pid -+ExecStart=/usr/sbin/iscsiuio -+ -+[Install] -+WantedBy=multi-user.target -diff --git a/etc/systemd/iscsiuio.socket b/etc/systemd/iscsiuio.socket -new file mode 100644 -index 0000000..d42cedc ---- /dev/null -+++ b/etc/systemd/iscsiuio.socket -@@ -0,0 +1,9 @@ -+[Unit] -+Description=Open-iSCSI iscsiuio Socket -+Documentation=man:iscsiuio(8) -+ -+[Socket] -+ListenStream=@ISCSID_UIP_ABSTRACT_NAMESPACE -+ -+[Install] -+WantedBy=sockets.target --- -1.7.11.7 - diff --git a/0060-ISCSIUIO-Added-fix-for-the-iface.subnet_mask-decodin.patch b/0060-ISCSIUIO-Added-fix-for-the-iface.subnet_mask-decodin.patch new file mode 100644 index 0000000..143d6c6 --- /dev/null +++ b/0060-ISCSIUIO-Added-fix-for-the-iface.subnet_mask-decodin.patch @@ -0,0 +1,29 @@ +From df68365bef167778fb59059e78090d33a01e4e7f Mon Sep 17 00:00:00 2001 +From: Eddie Wai +Date: Wed, 11 Dec 2013 15:38:13 -0800 +Subject: [PATCH] ISCSIUIO: Added fix for the iface.subnet_mask decoding for + IPv6 + +Fixed a inet_pton decode error for the iface.subnet_mask for IPv6. + +Signed-off-by: Eddie Wai +--- + iscsiuio/src/unix/iscsid_ipc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iscsiuio/src/unix/iscsid_ipc.c b/iscsiuio/src/unix/iscsid_ipc.c +index e22de0d..033308d 100644 +--- a/iscsiuio/src/unix/iscsid_ipc.c ++++ b/iscsiuio/src/unix/iscsid_ipc.c +@@ -274,7 +274,7 @@ static int decode_iface(struct iface_rec_decode *ird, struct iface_rec *rec) + sizeof(struct in6_addr)); + /* Subnet mask priority: CIDR, then rec */ + if (!ird->ipv6_subnet_mask.s6_addr) +- inet_pton(AF_INET, rec->subnet_mask, ++ inet_pton(AF_INET6, rec->subnet_mask, + &ird->ipv6_subnet_mask); + + /* For LL on, ignore the IPv6 addr in the iface */ +-- +1.8.3.1 + diff --git a/0060-use-systemctl-to-start-iscsid.patch b/0060-use-systemctl-to-start-iscsid.patch deleted file mode 100644 index 81aa2a3..0000000 --- a/0060-use-systemctl-to-start-iscsid.patch +++ /dev/null @@ -1,25 +0,0 @@ -From c3d2b8f3de5b6161845304cf46982d2c5a9918b6 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Thu Feb 21 21:05:39 PST 2013 -Subject: disable iscsid.startup from iscsiadm, prefer systemd socket activation - ---- - etc/iscsid.conf | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/etc/iscsid.conf b/etc/iscsid.conf -index ac1d231..5851fa5 100644 ---- a/etc/iscsid.conf -+++ b/etc/iscsid.conf -@@ -17,7 +17,7 @@ - # maintainers. - # - # Default for Fedora and RHEL. (uncomment to activate). --iscsid.startup = /etc/rc.d/init.d/iscsid force-start -+#iscsid.startup = /bin/systemctl start iscsid.service - # - # Default for upstream open-iscsi scripts (uncomment to activate). - # iscsid.startup = /sbin/iscsid --- -1.7.11.7 - diff --git a/0061-ISCSIUIO-Added-fix-for-the-ARP-cache-flush-mechanism.patch b/0061-ISCSIUIO-Added-fix-for-the-ARP-cache-flush-mechanism.patch new file mode 100644 index 0000000..62a8927 --- /dev/null +++ b/0061-ISCSIUIO-Added-fix-for-the-ARP-cache-flush-mechanism.patch @@ -0,0 +1,41 @@ +From 817a0831c54f06dda2727fe1118e7a65181eb128 Mon Sep 17 00:00:00 2001 +From: Eddie Wai +Date: Wed, 11 Dec 2013 15:38:14 -0800 +Subject: [PATCH] ISCSIUIO: Added fix for the ARP cache flush mechanism + +The ARP cache table wasn't being flushed correctly due to a bug +in the time stamp comparison. The same bug can also be observed +to find the oldest entry in the ARP cache table to override. + +Signed-off-by: Eddie Wai +--- + iscsiuio/src/uip/uip_arp.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/iscsiuio/src/uip/uip_arp.c b/iscsiuio/src/uip/uip_arp.c +index f7a9594..a8de07f 100644 +--- a/iscsiuio/src/uip/uip_arp.c ++++ b/iscsiuio/src/uip/uip_arp.c +@@ -112,7 +112,7 @@ void uip_arp_timer(void) + for (i = 0; i < UIP_ARPTAB_SIZE; ++i) { + tabptr = &arp_table[i]; + if ((tabptr->ipaddr[0] | tabptr->ipaddr[1]) != 0 && +- arptime - tabptr->time >= UIP_ARP_MAXAGE) ++ (u8_t)(arptime - tabptr->time) >= UIP_ARP_MAXAGE) + memset(tabptr->ipaddr, 0, 4); + } + +@@ -165,8 +165,8 @@ static void uip_arp_update(u16_t *ipaddr, struct uip_eth_addr *ethaddr) + c = 0; + for (i = 0; i < UIP_ARPTAB_SIZE; ++i) { + tabptr = &arp_table[i]; +- if (arptime - tabptr->time > tmpage) { +- tmpage = arptime - tabptr->time; ++ if ((u8_t)(arptime - tabptr->time) > tmpage) { ++ tmpage = (u8_t)(arptime - tabptr->time); + c = i; + } + } +-- +1.8.3.1 + diff --git a/0061-resolve-565245-multilib-issues-caused-by-doxygen.patch b/0061-resolve-565245-multilib-issues-caused-by-doxygen.patch deleted file mode 100644 index 1f64d9c..0000000 --- a/0061-resolve-565245-multilib-issues-caused-by-doxygen.patch +++ /dev/null @@ -1,39 +0,0 @@ -From bc4cf1487b4d6039de2a082c1786ac83ab148c88 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Tue, 22 Jan 2013 15:14:21 -0800 -Subject: resolve 565245: multilib issues caused by doxygen - ---- - libiscsi/libiscsi.doxy | 2 +- - libiscsi/no_date_footer.html | 6 ++++++ - 2 files changed, 7 insertions(+), 1 deletion(-) - create mode 100644 libiscsi/no_date_footer.html - -diff --git a/libiscsi/libiscsi.doxy b/libiscsi/libiscsi.doxy -index 663770f..7a5ff7f 100644 ---- a/libiscsi/libiscsi.doxy -+++ b/libiscsi/libiscsi.doxy -@@ -765,7 +765,7 @@ HTML_HEADER = - # each generated HTML page. If it is left blank doxygen will generate a - # standard footer. - --HTML_FOOTER = -+HTML_FOOTER = no_date_footer.html - - # The HTML_STYLESHEET tag can be used to specify a user-defined cascading - # style sheet that is used by each HTML page. It can be used to -diff --git a/libiscsi/no_date_footer.html b/libiscsi/no_date_footer.html -new file mode 100644 -index 0000000..1e0c6c4 ---- /dev/null -+++ b/libiscsi/no_date_footer.html -@@ -0,0 +1,6 @@ -+
-+Generated for $projectname by doxygen -+$doxygenversion
-+ -+ --- -1.7.11.7 - diff --git a/0062-Don-t-check-for-autostart-sessions-if-iscsi-is-not-u.patch b/0062-Don-t-check-for-autostart-sessions-if-iscsi-is-not-u.patch deleted file mode 100644 index 684463f..0000000 --- a/0062-Don-t-check-for-autostart-sessions-if-iscsi-is-not-u.patch +++ /dev/null @@ -1,30 +0,0 @@ -From ab79bdb20e37216ca969e06d63a952acfd023963 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Tue, 28 May 2013 13:12:27 -0700 -Subject: [PATCH] Don't check for autostart sessions if iscsi is not used (bug - #951951) - -Change conditional startup in iscsi.service to check for a non-empty -nodes directory, instead of initiator-name. This fits better with what -it's doing, as there's no need to scan for autostart node records if -there are no node records at all. ---- - etc/systemd/iscsi.service | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service -index bbd52fd..7b4efee 100644 ---- a/etc/systemd/iscsi.service -+++ b/etc/systemd/iscsi.service -@@ -5,7 +5,7 @@ DefaultDependencies=no - Conflicts=shutdown.target - After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service - Before=remote-fs-pre.target --ConditionPathExists=/etc/iscsi/initiatorname.iscsi -+ConditionDirectoryNotEmpty=/var/lib/iscsi/nodes - - [Service] - Type=oneshot --- -1.8.1.4 - diff --git a/0062-ISCSIUIO-Updated-RELEASE-note-and-version.patch b/0062-ISCSIUIO-Updated-RELEASE-note-and-version.patch new file mode 100644 index 0000000..435d1ae --- /dev/null +++ b/0062-ISCSIUIO-Updated-RELEASE-note-and-version.patch @@ -0,0 +1,102 @@ +From eb1d2751f989b8c9031964912ef2e952916735ca Mon Sep 17 00:00:00 2001 +From: Eddie Wai +Date: Wed, 11 Dec 2013 15:38:15 -0800 +Subject: [PATCH] ISCSIUIO: Updated RELEASE note and version + +old version: 0.7.8.1b +new version: 0.7.8.2 + +Signed-off-by: Eddie Wai +--- + iscsiuio/README | 4 ++-- + iscsiuio/RELEASE.TXT | 24 ++++++++++++++++++++++-- + iscsiuio/configure.ac | 4 ++-- + iscsiuio/docs/iscsiuio.8 | 2 +- + 4 files changed, 27 insertions(+), 7 deletions(-) + +diff --git a/iscsiuio/README b/iscsiuio/README +index e7e5fe4..a283116 100644 +--- a/iscsiuio/README ++++ b/iscsiuio/README +@@ -1,6 +1,6 @@ + Iscsiuio Userspace Tool +-Version 0.7.8.1b +-May 01, 2013 ++Version 0.7.8.2 ++Dec 10, 2013 + ------------------------------------------------------ + + This tool is to be used in conjunction with the Broadcom NetXtreme II Linux +diff --git a/iscsiuio/RELEASE.TXT b/iscsiuio/RELEASE.TXT +index de70667..22628fd 100644 +--- a/iscsiuio/RELEASE.TXT ++++ b/iscsiuio/RELEASE.TXT +@@ -1,7 +1,7 @@ + Release Notes + Broadcom uIP Linux Driver +- Version 0.7.8.1b +- 05/01/2013 ++ Version 0.7.8.2 ++ 12/10/2013 + + Broadcom Corporation + 5300 California Avenue, +@@ -10,6 +10,26 @@ + Copyright (c) 2004 - 2013 Broadcom Corporation + All rights reserved + ++uIP v0.7.8.2 (Dec 10, 2013) ++======================================================= ++ Fixes ++ ----- ++ 1. Problem: Cont00072053 - Some hardware iSCSI paths fail during test ++ Cause: The test exercised a corner case where the ARP cache flush ++ mechanism didn't work properly ++ Change: Fixed the ARP cache flush mechanism ++ Impact: All ++ ++ Enhancements ++ ------------ ++ 1. Change: Added a new tx doorbell field in the uio path to work with ++ the new bnx2x/cnic drivers that supports VF_RSS ++ Impact: 10G only ++ ++ 2. Change: Fixed the iface.subnet_mask decoding for IPv6 ++ Impact: IPv6 ++ ++ + uIP v0.7.8.1b (May 01, 2013) + ======================================================= + Enhancements +diff --git a/iscsiuio/configure.ac b/iscsiuio/configure.ac +index e9a5e32..381b94d 100644 +--- a/iscsiuio/configure.ac ++++ b/iscsiuio/configure.ac +@@ -11,9 +11,9 @@ dnl Benjamin Li (benli@broadcom.com) + dnl + + PACKAGE=iscsiuio +-VERSION=0.7.8.1b ++VERSION=0.7.8.2 + +-AC_INIT(iscsiuio, 0.7.8.1b, eddie.wai@broadcom.com) ++AC_INIT(iscsiuio, 0.7.8.2, eddie.wai@broadcom.com) + + AM_INIT_AUTOMAKE($PACKAGE, $VERSION) + AC_CONFIG_HEADER(config.h) +diff --git a/iscsiuio/docs/iscsiuio.8 b/iscsiuio/docs/iscsiuio.8 +index ea21d78..3b50409 100644 +--- a/iscsiuio/docs/iscsiuio.8 ++++ b/iscsiuio/docs/iscsiuio.8 +@@ -5,7 +5,7 @@ + .\" + .\" bnx2.4,v 0.7.8.1b + .\" +-.TH iscsiuio 8 "05/01/2013" "Broadcom Corporation" ++.TH iscsiuio 8 "12/10/2013" "Broadcom Corporation" + .\" + .\" NAME part + .\" +-- +1.8.3.1 + diff --git a/0063-ISCSIUIO-Updated-the-configure-file-to-reflect-the-n.patch b/0063-ISCSIUIO-Updated-the-configure-file-to-reflect-the-n.patch new file mode 100644 index 0000000..1782332 --- /dev/null +++ b/0063-ISCSIUIO-Updated-the-configure-file-to-reflect-the-n.patch @@ -0,0 +1,16698 @@ +From 9bd6fba5921aa98effee33071abfe7df8b0157f9 Mon Sep 17 00:00:00 2001 +From: Mike Christie +Date: Thu, 2 Jan 2014 15:00:20 -0600 +Subject: [PATCH] ISCSIUIO: Updated the configure file to reflect the new + version + +Note: Merged Eddie's configure.after attachment instead of patch +on the list becasue of troubles with git/patch/diff. +--- + iscsiuio/configure | 11538 +++++++++++++++++++++++++++++---------------------- + 1 file changed, 6521 insertions(+), 5017 deletions(-) + +diff --git a/iscsiuio/configure b/iscsiuio/configure +index 2740598..444c9c0 100755 +--- a/iscsiuio/configure ++++ b/iscsiuio/configure +@@ -1,27 +1,84 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.59 for iscsiuio 0.7.8.1b. ++# Generated by GNU Autoconf 2.63 for iscsiuio 0.7.8.2. + # + # Report bugs to . + # +-# Copyright (C) 2003 Free Software Foundation, Inc. ++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, ++# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. + ## --------------------- ## + ## M4sh Initialization. ## + ## --------------------- ## + +-# Be Bourne compatible +-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +- emulate sh +- NULLCMD=: +- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which +- # is contrary to our usage. Disable this feature. +- alias -g '${1+"$@"}'='"$@"' +-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then +- set -o posix +-fi ++# Be more Bourne compatible + DUALCASE=1; export DUALCASE # for MKS sh ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++ emulate sh ++ NULLCMD=: ++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which ++ # is contrary to our usage. Disable this feature. ++ alias -g '${1+"$@"}'='"$@"' ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++ ++ ++# PATH needs CR ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits ++ ++as_nl=' ++' ++export as_nl ++# Printing a long string crashes Solaris 7 /usr/bin/printf. ++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo ++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo ++if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then ++ as_echo='printf %s\n' ++ as_echo_n='printf %s' ++else ++ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then ++ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' ++ as_echo_n='/usr/ucb/echo -n' ++ else ++ as_echo_body='eval expr "X$1" : "X\\(.*\\)"' ++ as_echo_n_body='eval ++ arg=$1; ++ case $arg in ++ *"$as_nl"*) ++ expr "X$arg" : "X\\(.*\\)$as_nl"; ++ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; ++ esac; ++ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ++ ' ++ export as_echo_n_body ++ as_echo_n='sh -c $as_echo_n_body as_echo' ++ fi ++ export as_echo_body ++ as_echo='sh -c $as_echo_body as_echo' ++fi ++ ++# The user is always right. ++if test "${PATH_SEPARATOR+set}" != set; then ++ PATH_SEPARATOR=: ++ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { ++ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || ++ PATH_SEPARATOR=';' ++ } ++fi + + # Support unset when possible. + if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +@@ -31,33 +88,60 @@ else + fi + + ++# IFS ++# We need space, tab and new line, in precisely that order. Quoting is ++# there to prevent editors from complaining about space-tab. ++# (If _AS_PATH_WALK were called with IFS unset, it would disable word ++# splitting by setting IFS to empty value.) ++IFS=" "" $as_nl" ++ ++# Find who we are. Look in the path if we contain no directory separator. ++case $0 in ++ *[\\/]* ) as_myself=$0 ;; ++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++done ++IFS=$as_save_IFS ++ ++ ;; ++esac ++# 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 ++fi ++if test ! -f "$as_myself"; then ++ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ { (exit 1); exit 1; } ++fi ++ + # Work around bugs in pre-3.0 UWIN ksh. +-$as_unset ENV MAIL MAILPATH ++for as_var in ENV MAIL MAILPATH ++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++done + PS1='$ ' + PS2='> ' + PS4='+ ' + + # NLS nuisances. +-for as_var in \ +- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ +- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ +- LC_TELEPHONE LC_TIME +-do +- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then +- eval $as_var=C; export $as_var +- else +- $as_unset $as_var +- fi +-done ++LC_ALL=C ++export LC_ALL ++LANGUAGE=C ++export LANGUAGE + + # Required to use basename. +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + +-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename + else + as_basename=false +@@ -65,157 +149,391 @@ fi + + + # Name of the executable. +-as_me=`$as_basename "$0" || ++as_me=`$as_basename -- "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)$' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X/"$0" | +- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } +- /^X\/\(\/\/\)$/{ s//\1/; q; } +- /^X\/\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- +- +-# PATH needs CR, and LINENO needs CR and PATH. +-# Avoid depending upon Character Ranges. +-as_cr_letters='abcdefghijklmnopqrstuvwxyz' +-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +-as_cr_Letters=$as_cr_letters$as_cr_LETTERS +-as_cr_digits='0123456789' +-as_cr_alnum=$as_cr_Letters$as_cr_digits +- +-# The user is always right. +-if test "${PATH_SEPARATOR+set}" != set; then +- echo "#! /bin/sh" >conf$$.sh +- echo "exit 0" >>conf$$.sh +- chmod +x conf$$.sh +- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then +- PATH_SEPARATOR=';' +- else +- PATH_SEPARATOR=: +- fi +- rm -f conf$$.sh ++ X"$0" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X/"$0" | ++ sed '/^.*\/\([^/][^/]*\)\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ ++# CDPATH. ++$as_unset CDPATH ++ ++ ++if test "x$CONFIG_SHELL" = x; then ++ if (eval ":") 2>/dev/null; then ++ as_have_required=yes ++else ++ as_have_required=no ++fi ++ ++ if test $as_have_required = yes && (eval ": ++(as_func_return () { ++ (exit \$1) ++} ++as_func_success () { ++ as_func_return 0 ++} ++as_func_failure () { ++ as_func_return 1 ++} ++as_func_ret_success () { ++ return 0 ++} ++as_func_ret_failure () { ++ return 1 ++} ++ ++exitcode=0 ++if as_func_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_success failed. ++fi ++ ++if as_func_failure; then ++ exitcode=1 ++ echo as_func_failure succeeded. ++fi ++ ++if as_func_ret_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_ret_success failed. ++fi ++ ++if as_func_ret_failure; then ++ exitcode=1 ++ echo as_func_ret_failure succeeded. ++fi ++ ++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then ++ : ++else ++ exitcode=1 ++ echo positional parameters were not saved. + fi + ++test \$exitcode = 0) || { (exit 1); exit 1; } + +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x$as_lineno_3" = "x$as_lineno_2" || { +- # Find who we are. Look in the path if we contain no path at all +- # relative or not. +- case $0 in +- *[\\/]* ) as_myself=$0 ;; +- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +-done +- +- ;; +- esac +- # 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 +- fi +- if test ! -f "$as_myself"; then +- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 +- { (exit 1); exit 1; }; } +- fi +- case $CONFIG_SHELL in +- '') ++( ++ as_lineno_1=\$LINENO ++ as_lineno_2=\$LINENO ++ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && ++ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ++") 2> /dev/null; then ++ : ++else ++ as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for as_base in sh bash ksh sh5; do +- case $as_dir in ++ case $as_dir in + /*) +- if ("$as_dir/$as_base" -c ' +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then +- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } +- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } +- CONFIG_SHELL=$as_dir/$as_base +- export CONFIG_SHELL +- exec "$CONFIG_SHELL" "$0" ${1+"$@"} +- fi;; +- esac +- done ++ for as_base in sh bash ksh sh5; do ++ as_candidate_shells="$as_candidate_shells $as_dir/$as_base" ++ done;; ++ esac + done +-;; +- esac ++IFS=$as_save_IFS ++ ++ ++ for as_shell in $as_candidate_shells $SHELL; do ++ # Try only shells that exist, to save several forks. ++ if { test -f "$as_shell" || test -f "$as_shell.exe"; } && ++ { ("$as_shell") 2> /dev/null <<\_ASEOF ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++ emulate sh ++ NULLCMD=: ++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which ++ # is contrary to our usage. Disable this feature. ++ alias -g '${1+"$@"}'='"$@"' ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++: ++_ASEOF ++}; then ++ CONFIG_SHELL=$as_shell ++ as_have_required=yes ++ if { "$as_shell" 2> /dev/null <<\_ASEOF ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++ emulate sh ++ NULLCMD=: ++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which ++ # is contrary to our usage. Disable this feature. ++ alias -g '${1+"$@"}'='"$@"' ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++: ++(as_func_return () { ++ (exit $1) ++} ++as_func_success () { ++ as_func_return 0 ++} ++as_func_failure () { ++ as_func_return 1 ++} ++as_func_ret_success () { ++ return 0 ++} ++as_func_ret_failure () { ++ return 1 ++} ++ ++exitcode=0 ++if as_func_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_success failed. ++fi ++ ++if as_func_failure; then ++ exitcode=1 ++ echo as_func_failure succeeded. ++fi ++ ++if as_func_ret_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_ret_success failed. ++fi ++ ++if as_func_ret_failure; then ++ exitcode=1 ++ echo as_func_ret_failure succeeded. ++fi ++ ++if ( set x; as_func_ret_success y && test x = "$1" ); then ++ : ++else ++ exitcode=1 ++ echo positional parameters were not saved. ++fi ++ ++test $exitcode = 0) || { (exit 1); exit 1; } ++ ++( ++ as_lineno_1=$LINENO ++ as_lineno_2=$LINENO ++ test "x$as_lineno_1" != "x$as_lineno_2" && ++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } ++ ++_ASEOF ++}; then ++ break ++fi ++ ++fi ++ ++ done ++ ++ if test "x$CONFIG_SHELL" != x; then ++ for as_var in BASH_ENV ENV ++ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++ done ++ export CONFIG_SHELL ++ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} ++fi ++ ++ ++ if test $as_have_required = no; then ++ echo This script requires a shell more modern than all the ++ echo shells that I found on your system. Please install a ++ echo modern shell, or manually run the script under such a ++ echo shell if you do have one. ++ { (exit 1); exit 1; } ++fi ++ ++ ++fi ++ ++fi ++ ++ ++ ++(eval "as_func_return () { ++ (exit \$1) ++} ++as_func_success () { ++ as_func_return 0 ++} ++as_func_failure () { ++ as_func_return 1 ++} ++as_func_ret_success () { ++ return 0 ++} ++as_func_ret_failure () { ++ return 1 ++} ++ ++exitcode=0 ++if as_func_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_success failed. ++fi ++ ++if as_func_failure; then ++ exitcode=1 ++ echo as_func_failure succeeded. ++fi ++ ++if as_func_ret_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_ret_success failed. ++fi ++ ++if as_func_ret_failure; then ++ exitcode=1 ++ echo as_func_ret_failure succeeded. ++fi ++ ++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then ++ : ++else ++ exitcode=1 ++ echo positional parameters were not saved. ++fi ++ ++test \$exitcode = 0") || { ++ echo No shell found that supports shell functions. ++ echo Please tell bug-autoconf@gnu.org about your system, ++ echo including any error possibly output before this message. ++ echo This can help us improve future autoconf versions. ++ echo Configuration will now proceed without shell functions. ++} ++ ++ ++ ++ as_lineno_1=$LINENO ++ as_lineno_2=$LINENO ++ test "x$as_lineno_1" != "x$as_lineno_2" && ++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a +- # line-number line before each line; the second 'sed' does the real +- # work. The second script uses 'N' to pair each line-number line +- # with the numbered line, and appends trailing '-' during +- # substitution so that $LINENO is not a special case at line end. ++ # line-number line after each line using $LINENO; the second 'sed' ++ # does the real work. The second script uses 'N' to pair each ++ # line-number line with the line containing $LINENO, and appends ++ # trailing '-' during substitution so that $LINENO is not a special ++ # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the +- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) +- sed '=' <$as_myself | ++ # scripts with optimization help from Paolo Bonzini. Blame Lee ++ # E. McMahon (1931-1989) for sed's syntax. :-) ++ sed -n ' ++ p ++ /[$]LINENO/= ++ ' <$as_myself | + sed ' ++ s/[$]LINENO.*/&-/ ++ t lineno ++ b ++ :lineno + N +- s,$,-, +- : loop +- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ++ :loop ++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop +- s,-$,, +- s,^['$as_cr_digits']*\n,, ++ s/-\n.*// + ' >$as_me.lineno && +- chmod +x $as_me.lineno || +- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 ++ chmod +x "$as_me.lineno" || ++ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the +- # original and so on. Autoconf is especially sensible to this). +- . ./$as_me.lineno ++ # original and so on. Autoconf is especially sensitive to this). ++ . "./$as_me.lineno" + # Exit status is that of the last command. + exit + } + + +-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in +- *c*,-n*) ECHO_N= ECHO_C=' +-' ECHO_T=' ' ;; +- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; +- *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then ++ as_dirname=dirname ++else ++ as_dirname=false ++fi ++ ++ECHO_C= ECHO_N= ECHO_T= ++case `echo -n x` in ++-n*) ++ case `echo 'x\c'` in ++ *c*) ECHO_T=' ';; # ECHO_T is single tab character. ++ *) ECHO_C='\c';; ++ esac;; ++*) ++ ECHO_N='-n';; + esac +- +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + + rm -f conf$$ conf$$.exe conf$$.file +-echo >conf$$.file +-if ln -s conf$$.file conf$$ 2>/dev/null; then +- # We could just check for DJGPP; but this test a) works b) is more generic +- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). +- if test -f conf$$.exe; then +- # Don't use ln at all; we don't have any links +- as_ln_s='cp -p' +- else ++if test -d conf$$.dir; then ++ rm -f conf$$.dir/conf$$.file ++else ++ rm -f conf$$.dir ++ mkdir conf$$.dir 2>/dev/null ++fi ++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 -p'. ++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || ++ as_ln_s='cp -p' ++ elif ln conf$$.file conf$$ 2>/dev/null; then ++ as_ln_s=ln ++ else ++ as_ln_s='cp -p' + fi +-elif ln conf$$.file conf$$ 2>/dev/null; then +- as_ln_s=ln + else + as_ln_s='cp -p' + fi +-rm -f conf$$ conf$$.exe conf$$.file ++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file ++rmdir conf$$.dir 2>/dev/null + + if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +@@ -224,7 +542,28 @@ else + as_mkdir_p=false + fi + +-as_executable_p="test -f" ++if test -x / >/dev/null 2>&1; then ++ as_test_x='test -x' ++else ++ if ls -dL / >/dev/null 2>&1; then ++ as_ls_L_option=L ++ else ++ as_ls_L_option= ++ fi ++ as_test_x=' ++ eval sh -c '\'' ++ if test -d "$1"; then ++ test -d "$1/."; ++ else ++ case $1 in ++ -*)set "./$1";; ++ esac; ++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ++ ???[sx]*):;;*)false;;esac;fi ++ '\'' sh ++ ' ++fi ++as_executable_p=$as_test_x + + # Sed expression to map a string onto a valid CPP name. + as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +@@ -233,15 +572,6 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +-# IFS +-# We need space, tab and new line, in precisely that order. +-as_nl=' +-' +-IFS=" $as_nl" +- +-# CDPATH. +-$as_unset CDPATH +- + + + # Check that we are running under the correct shell. +@@ -397,80 +727,212 @@ tagnames=${tagnames+${tagnames},}CXX + + tagnames=${tagnames+${tagnames},}F77 + ++exec 7<&0 &1 ++ + # Name of the host. + # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, + # so uname gets run too. + ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +-exec 6>&1 +- + # + # Initializations. + # + ac_default_prefix=/usr/local ++ac_clean_files= + ac_config_libobj_dir=. ++LIBOBJS= + cross_compiling=no + subdirs= + MFLAGS= + MAKEFLAGS= + SHELL=${CONFIG_SHELL-/bin/sh} + +-# Maximum number of lines to put in a shell here document. +-# This variable seems obsolete. It should probably be removed, and +-# only ac_max_sed_lines should be used. +-: ${ac_max_here_lines=38} +- + # Identity of this package. + PACKAGE_NAME='iscsiuio' + PACKAGE_TARNAME='iscsiuio' +-PACKAGE_VERSION='0.7.8.1b' +-PACKAGE_STRING='iscsiuio 0.7.8.1b' ++PACKAGE_VERSION='0.7.8.2' ++PACKAGE_STRING='iscsiuio 0.7.8.2' + PACKAGE_BUGREPORT='eddie.wai@broadcom.com' + + # Factoring default headers for most tests. + ac_includes_default="\ + #include +-#if HAVE_SYS_TYPES_H ++#ifdef HAVE_SYS_TYPES_H + # include + #endif +-#if HAVE_SYS_STAT_H ++#ifdef HAVE_SYS_STAT_H + # include + #endif +-#if STDC_HEADERS ++#ifdef STDC_HEADERS + # include + # include + #else +-# if HAVE_STDLIB_H ++# ifdef HAVE_STDLIB_H + # include + # endif + #endif +-#if HAVE_STRING_H +-# if !STDC_HEADERS && HAVE_MEMORY_H ++#ifdef HAVE_STRING_H ++# if !defined STDC_HEADERS && defined HAVE_MEMORY_H + # include + # endif + # include + #endif +-#if HAVE_STRINGS_H ++#ifdef HAVE_STRINGS_H + # include + #endif +-#if HAVE_INTTYPES_H ++#ifdef HAVE_INTTYPES_H + # include +-#else +-# if HAVE_STDINT_H +-# include +-# endif + #endif +-#if HAVE_UNISTD_H ++#ifdef HAVE_STDINT_H ++# include ++#endif ++#ifdef HAVE_UNISTD_H + # include + #endif" + + ac_default_prefix= +-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar BASH CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB CPP EGREP ENDIAN build build_cpu build_vendor build_os host host_cpu host_vendor host_os SED LN_S ECHO AR ac_ct_AR CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL DEBUG_TRUE DEBUG_FALSE LIBOBJS LTLIBOBJS' ++ac_subst_vars='LTLIBOBJS ++LIBOBJS ++DEBUG_FALSE ++DEBUG_TRUE ++LIBTOOL ++ac_ct_F77 ++FFLAGS ++F77 ++CXXCPP ++am__fastdepCXX_FALSE ++am__fastdepCXX_TRUE ++CXXDEPMODE ++ac_ct_CXX ++CXXFLAGS ++CXX ++AR ++ECHO ++LN_S ++SED ++host_os ++host_vendor ++host_cpu ++host ++build_os ++build_vendor ++build_cpu ++build ++ENDIAN ++EGREP ++GREP ++CPP ++RANLIB ++am__fastdepCC_FALSE ++am__fastdepCC_TRUE ++CCDEPMODE ++AMDEPBACKSLASH ++AMDEP_FALSE ++AMDEP_TRUE ++am__quote ++am__include ++DEPDIR ++OBJEXT ++EXEEXT ++ac_ct_CC ++CPPFLAGS ++LDFLAGS ++CFLAGS ++CC ++BASH ++am__untar ++am__tar ++AMTAR ++am__leading_dot ++SET_MAKE ++AWK ++mkdir_p ++INSTALL_STRIP_PROGRAM ++STRIP ++install_sh ++MAKEINFO ++AUTOHEADER ++AUTOMAKE ++AUTOCONF ++ACLOCAL ++VERSION ++PACKAGE ++CYGPATH_W ++INSTALL_DATA ++INSTALL_SCRIPT ++INSTALL_PROGRAM ++target_alias ++host_alias ++build_alias ++LIBS ++ECHO_T ++ECHO_N ++ECHO_C ++DEFS ++mandir ++localedir ++libdir ++psdir ++pdfdir ++dvidir ++htmldir ++infodir ++docdir ++oldincludedir ++includedir ++localstatedir ++sharedstatedir ++sysconfdir ++datadir ++datarootdir ++libexecdir ++sbindir ++bindir ++program_transform_name ++prefix ++exec_prefix ++PACKAGE_BUGREPORT ++PACKAGE_STRING ++PACKAGE_VERSION ++PACKAGE_TARNAME ++PACKAGE_NAME ++PATH_SEPARATOR ++SHELL' + ac_subst_files='' ++ac_user_opts=' ++enable_option_checking ++enable_dependency_tracking ++enable_shared ++enable_static ++enable_fast_install ++with_gnu_ld ++enable_libtool_lock ++with_pic ++with_tags ++enable_debug ++' ++ ac_precious_vars='build_alias ++host_alias ++target_alias ++CC ++CFLAGS ++LDFLAGS ++LIBS ++CPPFLAGS ++CPP ++CXX ++CXXFLAGS ++CCC ++CXXCPP ++F77 ++FFLAGS' ++ + + # Initialize some variables set by options. + ac_init_help= + ac_init_version=false ++ac_unrecognized_opts= ++ac_unrecognized_sep= + # The variables have the same names as the options, with + # dashes changed to underlines. + cache_file=/dev/null +@@ -493,34 +955,48 @@ x_libraries=NONE + # and all the variables that are supposed to be based on exec_prefix + # by default will actually change. + # Use braces instead of parens because sh, perl, etc. also accept them. ++# (The list follows the same order as the GNU Coding Standards.) + bindir='${exec_prefix}/bin' + sbindir='${exec_prefix}/sbin' + libexecdir='${exec_prefix}/libexec' +-datadir='${prefix}/share' ++datarootdir='${prefix}/share' ++datadir='${datarootdir}' + sysconfdir='${prefix}/etc' + sharedstatedir='${prefix}/com' + localstatedir='${prefix}/var' +-libdir='${exec_prefix}/lib' + includedir='${prefix}/include' + oldincludedir='/usr/include' +-infodir='${prefix}/info' +-mandir='${prefix}/man' ++docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' ++infodir='${datarootdir}/info' ++htmldir='${docdir}' ++dvidir='${docdir}' ++pdfdir='${docdir}' ++psdir='${docdir}' ++libdir='${exec_prefix}/lib' ++localedir='${datarootdir}/locale' ++mandir='${datarootdir}/man' + + ac_prev= ++ac_dashdash= + for ac_option + do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then +- eval "$ac_prev=\$ac_option" ++ eval $ac_prev=\$ac_option + ac_prev= + continue + fi + +- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` ++ case $ac_option in ++ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; ++ *) ac_optarg=yes ;; ++ esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + +- case $ac_option in ++ case $ac_dashdash$ac_option in ++ --) ++ ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; +@@ -542,33 +1018,61 @@ do + --config-cache | -C) + cache_file=config.cache ;; + +- -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ++ -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; +- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ +- | --da=*) ++ -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + ++ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ ++ | --dataroo | --dataro | --datar) ++ ac_prev=datarootdir ;; ++ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ ++ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) ++ datarootdir=$ac_optarg ;; ++ + -disable-* | --disable-*) +- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` ++ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && ++ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } +- ac_feature=`echo $ac_feature | sed 's/-/_/g'` +- eval "enable_$ac_feature=no" ;; ++ ac_useropt_orig=$ac_useropt ++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ++ case $ac_user_opts in ++ *" ++"enable_$ac_useropt" ++"*) ;; ++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ++ ac_unrecognized_sep=', ';; ++ esac ++ eval enable_$ac_useropt=no ;; ++ ++ -docdir | --docdir | --docdi | --doc | --do) ++ ac_prev=docdir ;; ++ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) ++ docdir=$ac_optarg ;; ++ ++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ++ ac_prev=dvidir ;; ++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) ++ dvidir=$ac_optarg ;; + + -enable-* | --enable-*) +- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` ++ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && ++ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } +- ac_feature=`echo $ac_feature | sed 's/-/_/g'` +- case $ac_option in +- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; +- *) ac_optarg=yes ;; ++ ac_useropt_orig=$ac_useropt ++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ++ case $ac_user_opts in ++ *" ++"enable_$ac_useropt" ++"*) ;; ++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ++ ac_unrecognized_sep=', ';; + esac +- eval "enable_$ac_feature='$ac_optarg'" ;; ++ eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ +@@ -595,6 +1099,12 @@ do + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + ++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ++ ac_prev=htmldir ;; ++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ ++ | --ht=*) ++ htmldir=$ac_optarg ;; ++ + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; +@@ -619,13 +1129,16 @@ do + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + ++ -localedir | --localedir | --localedi | --localed | --locale) ++ ac_prev=localedir ;; ++ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) ++ localedir=$ac_optarg ;; ++ + -localstatedir | --localstatedir | --localstatedi | --localstated \ +- | --localstate | --localstat | --localsta | --localst \ +- | --locals | --local | --loca | --loc | --lo) ++ | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ +- | --localstate=* | --localstat=* | --localsta=* | --localst=* \ +- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ++ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) +@@ -690,6 +1203,16 @@ do + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + ++ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ++ ac_prev=pdfdir ;; ++ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) ++ pdfdir=$ac_optarg ;; ++ ++ -psdir | --psdir | --psdi | --psd | --ps) ++ ac_prev=psdir ;; ++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) ++ psdir=$ac_optarg ;; ++ + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; +@@ -740,26 +1263,38 @@ do + ac_init_version=: ;; + + -with-* | --with-*) +- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` ++ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid package name: $ac_package" >&2 ++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && ++ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } +- ac_package=`echo $ac_package| sed 's/-/_/g'` +- case $ac_option in +- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; +- *) ac_optarg=yes ;; ++ ac_useropt_orig=$ac_useropt ++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ++ case $ac_user_opts in ++ *" ++"with_$ac_useropt" ++"*) ;; ++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ++ ac_unrecognized_sep=', ';; + esac +- eval "with_$ac_package='$ac_optarg'" ;; ++ eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) +- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` ++ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid package name: $ac_package" >&2 ++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && ++ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } +- ac_package=`echo $ac_package | sed 's/-/_/g'` +- eval "with_$ac_package=no" ;; ++ ac_useropt_orig=$ac_useropt ++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ++ case $ac_user_opts in ++ *" ++"with_$ac_useropt" ++"*) ;; ++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ++ ac_unrecognized_sep=', ';; ++ esac ++ eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. +@@ -779,7 +1314,7 @@ do + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + +- -*) { echo "$as_me: error: unrecognized option: $ac_option ++ -*) { $as_echo "$as_me: error: unrecognized option: $ac_option + Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; +@@ -788,17 +1323,16 @@ Try \`$0 --help' for more information." >&2 + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 ++ { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } +- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` +- eval "$ac_envvar='$ac_optarg'" ++ eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. +- echo "$as_me: WARNING: you should use --build, --host, --target" >&2 ++ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && +- echo "$as_me: WARNING: invalid host type: $ac_option" >&2 ++ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + +@@ -807,31 +1341,39 @@ done + + if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` +- { echo "$as_me: error: missing argument to $ac_option" >&2 ++ { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } + fi + +-# Be sure to have absolute paths. +-for ac_var in exec_prefix prefix +-do +- eval ac_val=$`echo $ac_var` +- case $ac_val in +- [\\/$]* | ?:[\\/]* | NONE | '' ) ;; +- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 +- { (exit 1); exit 1; }; };; ++if test -n "$ac_unrecognized_opts"; then ++ case $enable_option_checking in ++ no) ;; ++ fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 ++ { (exit 1); exit 1; }; } ;; ++ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +-done ++fi + +-# Be sure to have absolute paths. +-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ +- localstatedir libdir includedir oldincludedir infodir mandir ++# Check all directory arguments for consistency. ++for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ ++ datadir sysconfdir sharedstatedir localstatedir includedir \ ++ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ ++ libdir localedir mandir + do +- eval ac_val=$`echo $ac_var` ++ eval ac_val=\$$ac_var ++ # Remove trailing slashes. + case $ac_val in +- [\\/$]* | ?:[\\/]* ) ;; +- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 +- { (exit 1); exit 1; }; };; ++ */ ) ++ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` ++ eval $ac_var=\$ac_val;; + esac ++ # Be sure to have absolute directory names. ++ case $ac_val in ++ [\\/$]* | ?:[\\/]* ) continue;; ++ NONE | '' ) case $ac_var in *prefix ) continue;; esac;; ++ esac ++ { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 ++ { (exit 1); exit 1; }; } + done + + # There might be people who depend on the old broken behavior: `$host' +@@ -845,7 +1387,7 @@ target=$target_alias + if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe +- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. ++ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes +@@ -858,94 +1400,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- + test "$silent" = yes && exec 6>/dev/null + + ++ac_pwd=`pwd` && test -n "$ac_pwd" && ++ac_ls_di=`ls -di .` && ++ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || ++ { $as_echo "$as_me: error: working directory cannot be determined" >&2 ++ { (exit 1); exit 1; }; } ++test "X$ac_ls_di" = "X$ac_pwd_ls_di" || ++ { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 ++ { (exit 1); exit 1; }; } ++ ++ + # Find the source files, if location was not specified. + if test -z "$srcdir"; then + ac_srcdir_defaulted=yes +- # Try the directory containing this script, then its parent. +- ac_confdir=`(dirname "$0") 2>/dev/null || +-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$0" : 'X\(//\)[^/]' \| \ +- X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$0" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ # Try the directory containing this script, then the parent directory. ++ ac_confdir=`$as_dirname -- "$as_myself" || ++$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$as_myself" : 'X\(//\)[^/]' \| \ ++ X"$as_myself" : 'X\(//\)$' \| \ ++ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X"$as_myself" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + srcdir=$ac_confdir +- if test ! -r $srcdir/$ac_unique_file; then ++ if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi + else + ac_srcdir_defaulted=no + fi +-if test ! -r $srcdir/$ac_unique_file; then +- if test "$ac_srcdir_defaulted" = yes; then +- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 ++if test ! -r "$srcdir/$ac_unique_file"; then ++ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." ++ { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +- else +- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +- { (exit 1); exit 1; }; } +- fi + fi +-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || +- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 ++ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ++ac_abs_confdir=`( ++ cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } +-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +-ac_env_build_alias_set=${build_alias+set} +-ac_env_build_alias_value=$build_alias +-ac_cv_env_build_alias_set=${build_alias+set} +-ac_cv_env_build_alias_value=$build_alias +-ac_env_host_alias_set=${host_alias+set} +-ac_env_host_alias_value=$host_alias +-ac_cv_env_host_alias_set=${host_alias+set} +-ac_cv_env_host_alias_value=$host_alias +-ac_env_target_alias_set=${target_alias+set} +-ac_env_target_alias_value=$target_alias +-ac_cv_env_target_alias_set=${target_alias+set} +-ac_cv_env_target_alias_value=$target_alias +-ac_env_CC_set=${CC+set} +-ac_env_CC_value=$CC +-ac_cv_env_CC_set=${CC+set} +-ac_cv_env_CC_value=$CC +-ac_env_CFLAGS_set=${CFLAGS+set} +-ac_env_CFLAGS_value=$CFLAGS +-ac_cv_env_CFLAGS_set=${CFLAGS+set} +-ac_cv_env_CFLAGS_value=$CFLAGS +-ac_env_LDFLAGS_set=${LDFLAGS+set} +-ac_env_LDFLAGS_value=$LDFLAGS +-ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +-ac_cv_env_LDFLAGS_value=$LDFLAGS +-ac_env_CPPFLAGS_set=${CPPFLAGS+set} +-ac_env_CPPFLAGS_value=$CPPFLAGS +-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +-ac_cv_env_CPPFLAGS_value=$CPPFLAGS +-ac_env_CPP_set=${CPP+set} +-ac_env_CPP_value=$CPP +-ac_cv_env_CPP_set=${CPP+set} +-ac_cv_env_CPP_value=$CPP +-ac_env_CXX_set=${CXX+set} +-ac_env_CXX_value=$CXX +-ac_cv_env_CXX_set=${CXX+set} +-ac_cv_env_CXX_value=$CXX +-ac_env_CXXFLAGS_set=${CXXFLAGS+set} +-ac_env_CXXFLAGS_value=$CXXFLAGS +-ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +-ac_cv_env_CXXFLAGS_value=$CXXFLAGS +-ac_env_CXXCPP_set=${CXXCPP+set} +-ac_env_CXXCPP_value=$CXXCPP +-ac_cv_env_CXXCPP_set=${CXXCPP+set} +-ac_cv_env_CXXCPP_value=$CXXCPP +-ac_env_F77_set=${F77+set} +-ac_env_F77_value=$F77 +-ac_cv_env_F77_set=${F77+set} +-ac_cv_env_F77_value=$F77 +-ac_env_FFLAGS_set=${FFLAGS+set} +-ac_env_FFLAGS_value=$FFLAGS +-ac_cv_env_FFLAGS_set=${FFLAGS+set} +-ac_cv_env_FFLAGS_value=$FFLAGS ++ pwd)` ++# When building in place, set srcdir=. ++if test "$ac_abs_confdir" = "$ac_pwd"; then ++ srcdir=. ++fi ++# Remove unnecessary trailing slashes from srcdir. ++# Double slashes in file names in object file debugging info ++# mess up M-x gdb in Emacs. ++case $srcdir in ++*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; ++esac ++for ac_var in $ac_precious_vars; do ++ eval ac_env_${ac_var}_set=\${${ac_var}+set} ++ eval ac_env_${ac_var}_value=\$${ac_var} ++ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} ++ eval ac_cv_env_${ac_var}_value=\$${ac_var} ++done + + # + # Report the --help message. +@@ -954,7 +1478,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 iscsiuio 0.7.8.1b to adapt to many kinds of systems. ++\`configure' configures iscsiuio 0.7.8.2 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -974,14 +1498,11 @@ Configuration: + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +-_ACEOF +- +- cat <<_ACEOF + Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX +- [$ac_default_prefix] ++ [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX +- [PREFIX] ++ [PREFIX] + + By default, \`make install' will install all the files in + \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +@@ -991,18 +1512,25 @@ for instance \`--prefix=\$HOME'. + For better control, use the options below. + + Fine tuning of the installation directories: +- --bindir=DIR user executables [EPREFIX/bin] +- --sbindir=DIR system admin executables [EPREFIX/sbin] +- --libexecdir=DIR program executables [EPREFIX/libexec] +- --datadir=DIR read-only architecture-independent data [PREFIX/share] +- --sysconfdir=DIR read-only single-machine data [PREFIX/etc] +- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] +- --localstatedir=DIR modifiable single-machine data [PREFIX/var] +- --libdir=DIR object code libraries [EPREFIX/lib] +- --includedir=DIR C header files [PREFIX/include] +- --oldincludedir=DIR C header files for non-gcc [/usr/include] +- --infodir=DIR info documentation [PREFIX/info] +- --mandir=DIR man documentation [PREFIX/man] ++ --bindir=DIR user executables [EPREFIX/bin] ++ --sbindir=DIR system admin executables [EPREFIX/sbin] ++ --libexecdir=DIR program executables [EPREFIX/libexec] ++ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] ++ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] ++ --localstatedir=DIR modifiable single-machine data [PREFIX/var] ++ --libdir=DIR object code libraries [EPREFIX/lib] ++ --includedir=DIR C header files [PREFIX/include] ++ --oldincludedir=DIR C header files for non-gcc [/usr/include] ++ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] ++ --datadir=DIR read-only architecture-independent data [DATAROOTDIR] ++ --infodir=DIR info documentation [DATAROOTDIR/info] ++ --localedir=DIR locale-dependent data [DATAROOTDIR/locale] ++ --mandir=DIR man documentation [DATAROOTDIR/man] ++ --docdir=DIR documentation root [DATAROOTDIR/doc/iscsiuio] ++ --htmldir=DIR html documentation [DOCDIR] ++ --dvidir=DIR dvi documentation [DOCDIR] ++ --pdfdir=DIR pdf documentation [DOCDIR] ++ --psdir=DIR ps documentation [DOCDIR] + _ACEOF + + cat <<\_ACEOF +@@ -1020,19 +1548,18 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of iscsiuio 0.7.8.1b:";; ++ short | recursive ) echo "Configuration of iscsiuio 0.7.8.2:";; + esac + cat <<\_ACEOF + + Optional Features: ++ --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors +- --enable-shared[=PKGS] +- build shared libraries [default=yes] +- --enable-static[=PKGS] +- build static libraries [default=yes] ++ --enable-shared[=PKGS] build shared libraries [default=yes] ++ --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) +@@ -1044,16 +1571,16 @@ Optional Packages: + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic try to use only PIC/non-PIC objects [default=use + both] +- --with-tags[=TAGS] +- include additional configurations [automatic] ++ --with-tags[=TAGS] include additional configurations [automatic] + + Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory +- CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have +- headers in a nonstandard directory ++ LIBS libraries to pass to the linker, e.g. -l ++ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if ++ you have headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags +@@ -1066,120 +1593,88 @@ it to find libraries and programs with nonstandard names/locations. + + Report bugs to . + _ACEOF ++ac_status=$? + fi + + if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. +- ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue +- test -d $ac_dir || continue ++ test -d "$ac_dir" || ++ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || ++ continue + ac_builddir=. + +-if test "$ac_dir" != .; then +- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` +- # A "../" for each directory in $ac_dir_suffix. +- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +-else +- ac_dir_suffix= ac_top_builddir= +-fi ++case "$ac_dir" in ++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; ++*) ++ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` ++ # A ".." for each directory in $ac_dir_suffix. ++ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` ++ case $ac_top_builddir_sub in ++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;; ++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; ++ esac ;; ++esac ++ac_abs_top_builddir=$ac_pwd ++ac_abs_builddir=$ac_pwd$ac_dir_suffix ++# for backward compatibility: ++ac_top_builddir=$ac_top_build_prefix + + case $srcdir in +- .) # No --srcdir option. We are building in place. ++ .) # We are building in place. + ac_srcdir=. +- if test -z "$ac_top_builddir"; then +- ac_top_srcdir=. +- else +- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` +- fi ;; +- [\\/]* | ?:[\\/]* ) # Absolute path. ++ ac_top_srcdir=$ac_top_builddir_sub ++ ac_abs_top_srcdir=$ac_pwd ;; ++ [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; +- ac_top_srcdir=$srcdir ;; +- *) # Relative path. +- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix +- ac_top_srcdir=$ac_top_builddir$srcdir ;; ++ ac_top_srcdir=$srcdir ++ ac_abs_top_srcdir=$srcdir ;; ++ *) # Relative name. ++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ++ ac_top_srcdir=$ac_top_build_prefix$srcdir ++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + esac ++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + +-# Do not use `cd foo && pwd` to compute absolute paths, because +-# the directories may not exist. +-case `pwd` in +-.) ac_abs_builddir="$ac_dir";; +-*) +- case "$ac_dir" in +- .) ac_abs_builddir=`pwd`;; +- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; +- *) ac_abs_builddir=`pwd`/"$ac_dir";; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_builddir=${ac_top_builddir}.;; +-*) +- case ${ac_top_builddir}. in +- .) ac_abs_top_builddir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; +- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_srcdir=$ac_srcdir;; +-*) +- case $ac_srcdir in +- .) ac_abs_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; +- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_srcdir=$ac_top_srcdir;; +-*) +- case $ac_top_srcdir in +- .) ac_abs_top_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; +- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; +- esac;; +-esac +- +- cd $ac_dir +- # Check for guested configure; otherwise get Cygnus style configure. +- if test -f $ac_srcdir/configure.gnu; then +- echo +- $SHELL $ac_srcdir/configure.gnu --help=recursive +- elif test -f $ac_srcdir/configure; then +- echo +- $SHELL $ac_srcdir/configure --help=recursive +- elif test -f $ac_srcdir/configure.ac || +- test -f $ac_srcdir/configure.in; then +- echo +- $ac_configure --help ++ cd "$ac_dir" || { ac_status=$?; continue; } ++ # Check for guested configure. ++ if test -f "$ac_srcdir/configure.gnu"; then ++ echo && ++ $SHELL "$ac_srcdir/configure.gnu" --help=recursive ++ elif test -f "$ac_srcdir/configure"; then ++ echo && ++ $SHELL "$ac_srcdir/configure" --help=recursive + else +- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 +- fi +- cd $ac_popdir ++ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 ++ fi || ac_status=$? ++ cd "$ac_pwd" || { ac_status=$?; break; } + done + fi + +-test -n "$ac_init_help" && exit 0 ++test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-iscsiuio configure 0.7.8.1b +-generated by GNU Autoconf 2.59 ++iscsiuio configure 0.7.8.2 ++generated by GNU Autoconf 2.63 + +-Copyright (C) 2003 Free Software Foundation, Inc. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, ++2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + _ACEOF +- exit 0 ++ exit + fi +-exec 5>config.log +-cat >&5 <<_ACEOF ++cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by iscsiuio $as_me 0.7.8.1b, which was +-generated by GNU Autoconf 2.59. Invocation command line was ++It was created by iscsiuio $as_me 0.7.8.2, which was ++generated by GNU Autoconf 2.63. Invocation command line was + + $ $0 $@ + + _ACEOF ++exec 5>>config.log + { + cat <<_ASUNAME + ## --------- ## +@@ -1198,7 +1693,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` + /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` + /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` + /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +-hostinfo = `(hostinfo) 2>/dev/null || echo unknown` ++/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` + /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` + /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` + /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` +@@ -1210,8 +1705,9 @@ for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- echo "PATH: $as_dir" ++ $as_echo "PATH: $as_dir" + done ++IFS=$as_save_IFS + + } >&5 + +@@ -1233,7 +1729,6 @@ _ACEOF + ac_configure_args= + ac_configure_args0= + ac_configure_args1= +-ac_sep= + ac_must_keep_next=false + for ac_pass in 1 2 + do +@@ -1244,8 +1739,8 @@ do + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; +- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) +- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; ++ *\'*) ++ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; +@@ -1266,9 +1761,7 @@ do + -* ) ac_must_keep_next=true ;; + esac + fi +- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" +- # Get rid of the leading space. +- ac_sep=" " ++ ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +@@ -1279,8 +1772,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ + # When interrupted or exit'd, cleanup temporary files, and complete + # config.log. We remove comments because anyway the quotes in there + # would cause problems or look ugly. +-# WARNING: Be sure not to use single quotes in there, as some shells, +-# such as our DU 5.0 friend, will then `close' the trap. ++# WARNING: Use '\'' to represent an apostrophe within the trap. ++# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. + trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { +@@ -1293,20 +1786,35 @@ trap 'exit_status=$? + _ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +-{ ++( ++ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do ++ eval ac_val=\$$ac_var ++ case $ac_val in #( ++ *${as_nl}*) ++ case $ac_var in #( ++ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 ++$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ++ esac ++ case $ac_var in #( ++ _ | IFS | as_nl) ;; #( ++ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( ++ *) $as_unset $ac_var ;; ++ esac ;; ++ esac ++ done + (set) 2>&1 | +- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in +- *ac_space=\ *) ++ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( ++ *${as_nl}ac_space=\ *) + sed -n \ +- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; +- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" +- ;; ++ "s/'\''/'\''\\\\'\'''\''/g; ++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ++ ;; #( + *) +- sed -n \ +- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; +- esac; +-} ++ esac | ++ sort ++) + echo + + cat <<\_ASBOX +@@ -1317,22 +1825,28 @@ _ASBOX + echo + for ac_var in $ac_subst_vars + do +- eval ac_val=$`echo $ac_var` +- echo "$ac_var='"'"'$ac_val'"'"'" ++ eval ac_val=\$$ac_var ++ case $ac_val in ++ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; ++ esac ++ $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +-## ------------- ## +-## Output files. ## +-## ------------- ## ++## ------------------- ## ++## File substitutions. ## ++## ------------------- ## + _ASBOX + echo + for ac_var in $ac_subst_files + do +- eval ac_val=$`echo $ac_var` +- echo "$ac_var='"'"'$ac_val'"'"'" ++ eval ac_val=\$$ac_var ++ case $ac_val in ++ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; ++ esac ++ $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi +@@ -1344,26 +1858,24 @@ _ASBOX + ## ----------- ## + _ASBOX + echo +- sed "/^$/d" confdefs.h | sort ++ cat confdefs.h + echo + fi + test "$ac_signal" != 0 && +- echo "$as_me: caught signal $ac_signal" +- echo "$as_me: exit $exit_status" ++ $as_echo "$as_me: caught signal $ac_signal" ++ $as_echo "$as_me: exit $exit_status" + } >&5 +- rm -f core *.core && +- rm -rf conftest* confdefs* conf$$* $ac_clean_files && ++ rm -f core *.core core.conftest.* && ++ rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +- ' 0 ++' 0 + for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + done + ac_signal=0 + + # confdefs.h avoids OS command line length limits that DEFS can exceed. +-rm -rf conftest* confdefs.h +-# AIX cpp loses on an empty file, so make sure it contains at least a newline. +-echo >confdefs.h ++rm -f -r conftest* confdefs.h + + # Predefined preprocessor variables. + +@@ -1393,18 +1905,24 @@ _ACEOF + + + # Let the site file select an alternate cache file if it wants to. +-# Prefer explicitly selected file to automatically selected ones. +-if test -z "$CONFIG_SITE"; then +- if test "x$prefix" != xNONE; then +- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" +- else +- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +- fi ++# Prefer an explicitly selected file to automatically selected ones. ++ac_site_file1=NONE ++ac_site_file2=NONE ++if test -n "$CONFIG_SITE"; then ++ ac_site_file1=$CONFIG_SITE ++elif test "x$prefix" != xNONE; then ++ ac_site_file1=$prefix/share/config.site ++ ac_site_file2=$prefix/etc/config.site ++else ++ ac_site_file1=$ac_default_prefix/share/config.site ++ ac_site_file2=$ac_default_prefix/etc/config.site + fi +-for ac_site_file in $CONFIG_SITE; do ++for ac_site_file in "$ac_site_file1" "$ac_site_file2" ++do ++ test "x$ac_site_file" = xNONE && continue + if test -r "$ac_site_file"; then +- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +-echo "$as_me: loading site script $ac_site_file" >&6;} ++ { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 ++$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +@@ -1414,54 +1932,61 @@ if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then +- { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +-echo "$as_me: loading cache $cache_file" >&6;} ++ { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 ++$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in +- [\\/]* | ?:[\\/]* ) . $cache_file;; +- *) . ./$cache_file;; ++ [\\/]* | ?:[\\/]* ) . "$cache_file";; ++ *) . "./$cache_file";; + esac + fi + else +- { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +-echo "$as_me: creating cache $cache_file" >&6;} ++ { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 ++$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file + fi + + # Check that the precious variables saved in the cache have kept the same + # value. + ac_cache_corrupted=false +-for ac_var in `(set) 2>&1 | +- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do ++for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set +- eval ac_old_val="\$ac_cv_env_${ac_var}_value" +- eval ac_new_val="\$ac_env_${ac_var}_value" ++ eval ac_old_val=\$ac_cv_env_${ac_var}_value ++ eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) +- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ++ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 ++$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) +- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ++ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 ++$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then +- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} +- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +-echo "$as_me: former value: $ac_old_val" >&2;} +- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +-echo "$as_me: current value: $ac_new_val" >&2;} +- ac_cache_corrupted=: ++ # differences in whitespace do not lead to failure. ++ ac_old_val_w=`echo x $ac_old_val` ++ ac_new_val_w=`echo x $ac_new_val` ++ if test "$ac_old_val_w" != "$ac_new_val_w"; then ++ { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 ++$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ++ ac_cache_corrupted=: ++ else ++ { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 ++$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} ++ eval $ac_var=\$ac_old_val ++ fi ++ { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 ++$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} ++ { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 ++$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in +- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) +- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; ++ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in +@@ -1471,13 +1996,39 @@ echo "$as_me: current value: $ac_new_val" >&2;} + fi + done + if $ac_cache_corrupted; then +- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +-echo "$as_me: error: changes in the environment can compromise the build" >&2;} +- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} ++ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++ { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 ++$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 ++$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } + fi + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +@@ -1486,56 +2037,37 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + am__api_version="1.9" + ac_aux_dir= +-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do +- if test -f $ac_dir/install-sh; then ++for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do ++ if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break +- elif test -f $ac_dir/install.sh; then ++ elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break +- elif test -f $ac_dir/shtool; then ++ elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi + done + if test -z "$ac_aux_dir"; then +- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} ++ { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 ++$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } + fi +-ac_config_guess="$SHELL $ac_aux_dir/config.guess" +-ac_config_sub="$SHELL $ac_aux_dir/config.sub" +-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. ++ ++# These three variables are undocumented and unsupported, ++# and are intended to be withdrawn in a future Autoconf release. ++# They can cause serious problems if a builder's source tree is in a directory ++# whose full name contains unusual characters. ++ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ++ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ++ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ++ + + # Find a good install program. We prefer a C program (faster), + # so one script is as good as another. But avoid the broken or +@@ -1550,11 +2082,12 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # OS/2's system install, which has a completely different semantic + # ./install, which can be erroneously created by make from ./install.sh. +-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 ++# Reject install programs that cannot install multiple files. ++{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 ++$as_echo_n "checking for a BSD-compatible install... " >&6; } + if test -z "$INSTALL"; then + if test "${ac_cv_path_install+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH +@@ -1573,7 +2106,7 @@ case $as_dir/ in + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. +@@ -1583,30 +2116,43 @@ case $as_dir/ in + # program-specific install script used by HP pwplus--don't use. + : + else +- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" +- break 3 ++ rm -rf conftest.one conftest.two conftest.dir ++ echo one > conftest.one ++ echo two > conftest.two ++ mkdir conftest.dir ++ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && ++ test -s conftest.one && test -s conftest.two && ++ test -s conftest.dir/conftest.one && ++ test -s conftest.dir/conftest.two ++ then ++ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" ++ break 3 ++ fi + fi + fi + done + done + ;; + esac ++ + done ++IFS=$as_save_IFS + ++rm -rf conftest.one conftest.two conftest.dir + + fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else +- # As a last resort, use the slow shell script. We don't cache a +- # path for INSTALL within a source directory, because that will ++ # As a last resort, use the slow shell script. Don't cache a ++ # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is +- # removed, or if the path is relative. ++ # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi + fi +-echo "$as_me:$LINENO: result: $INSTALL" >&5 +-echo "${ECHO_T}$INSTALL" >&6 ++{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 ++$as_echo "$INSTALL" >&6; } + + # Use test -z because SunOS4 sh mishandles braces in ${var-val}. + # It thinks the first close brace ends the variable substitution. +@@ -1616,8 +2162,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +-echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 ++$as_echo_n "checking whether build environment is sane... " >&6; } + # Just in case + sleep 1 + echo timestamp > conftest.file +@@ -1640,9 +2186,9 @@ if ( + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". +- { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken ++ { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken + alias in your environment" >&5 +-echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken ++$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken + alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi +@@ -1653,26 +2199,23 @@ then + # Ok. + : + else +- { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! ++ { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! + Check your system clock" >&5 +-echo "$as_me: error: newly created file is older than distributed files! ++$as_echo "$as_me: error: newly created file is older than distributed files! + Check your system clock" >&2;} + { (exit 1); exit 1; }; } + fi +-echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++{ $as_echo "$as_me:$LINENO: result: yes" >&5 ++$as_echo "yes" >&6; } + test "$program_prefix" != NONE && +- program_transform_name="s,^,$program_prefix,;$program_transform_name" ++ program_transform_name="s&^&$program_prefix&;$program_transform_name" + # Use a double $ so make ignores it. + test "$program_suffix" != NONE && +- program_transform_name="s,\$,$program_suffix,;$program_transform_name" +-# Double any \ or $. echo might interpret backslashes. ++ program_transform_name="s&\$&$program_suffix&;$program_transform_name" ++# Double any \ or $. + # By default was `s,x,x', remove it if useless. +-cat <<\_ACEOF >conftest.sed +-s/[\\$]/&&/g;s/;s,x,x,$// +-_ACEOF +-program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +-rm conftest.sed ++ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' ++program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + + # expand $ac_aux_dir to an absolute path + am_aux_dir=`cd $ac_aux_dir && pwd` +@@ -1683,8 +2226,8 @@ if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " + else + am_missing_run= +- { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 ++$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + fi + + if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then +@@ -1724,10 +2267,10 @@ for ac_prog in gawk mawk nawk awk + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AWK+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +@@ -1738,54 +2281,58 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + AWK=$ac_cv_prog_AWK + if test -n "$AWK"; then +- echo "$as_me:$LINENO: result: $AWK" >&5 +-echo "${ECHO_T}$AWK" >&6 ++ { $as_echo "$as_me:$LINENO: result: $AWK" >&5 ++$as_echo "$AWK" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + test -n "$AWK" && break + done + +-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 ++$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } ++set x ${MAKE-make} ++ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` ++if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.make <<\_ACEOF ++SHELL = /bin/sh + all: +- @echo 'ac_maketemp="$(MAKE)"' ++ @echo '@@@%%%=$(MAKE)=@@@%%%' + _ACEOF + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. +-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +-if test -n "$ac_maketemp"; then +- eval ac_cv_prog_make_${ac_make}_set=yes +-else +- eval ac_cv_prog_make_${ac_make}_set=no +-fi ++case `${MAKE-make} -f conftest.make 2>/dev/null` in ++ *@@@%%%=?*=@@@%%%*) ++ eval ac_cv_prog_make_${ac_make}_set=yes;; ++ *) ++ eval ac_cv_prog_make_${ac_make}_set=no;; ++esac + rm -f conftest.make + fi +-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then ++ { $as_echo "$as_me:$LINENO: result: yes" >&5 ++$as_echo "yes" >&6; } + SET_MAKE= + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" + fi + +@@ -1801,8 +2348,8 @@ rmdir .tst 2>/dev/null + # test to see if srcdir already configured + if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then +- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 ++$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi + +@@ -1856,10 +2403,10 @@ if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_STRIP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +@@ -1870,34 +2417,36 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + STRIP=$ac_cv_prog_STRIP + if test -n "$STRIP"; then +- echo "$as_me:$LINENO: result: $STRIP" >&5 +-echo "${ECHO_T}$STRIP" >&6 ++ { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 ++$as_echo "$STRIP" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +@@ -1908,27 +2457,37 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" + fi + fi + ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP + if test -n "$ac_ct_STRIP"; then +- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +-echo "${ECHO_T}$ac_ct_STRIP" >&6 ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 ++$as_echo "$ac_ct_STRIP" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + +- STRIP=$ac_ct_STRIP ++ if test "x$ac_ct_STRIP" = x; then ++ STRIP=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ STRIP=$ac_ct_STRIP ++ fi + else + STRIP="$ac_cv_prog_STRIP" + fi +@@ -1948,16 +2507,16 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + +- ac_config_headers="$ac_config_headers config.h" ++ac_config_headers="$ac_config_headers config.h" + + for ac_prog in bash + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_path_BASH+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + case $BASH in + [\\/]* | ?:[\\/]*) +@@ -1970,27 +2529,28 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + ;; + esac + fi + BASH=$ac_cv_path_BASH +- + if test -n "$BASH"; then +- echo "$as_me:$LINENO: result: $BASH" >&5 +-echo "${ECHO_T}$BASH" >&6 ++ { $as_echo "$as_me:$LINENO: result: $BASH" >&5 ++$as_echo "$BASH" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + test -n "$BASH" && break + done + +@@ -2003,10 +2563,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. + set dummy ${ac_tool_prefix}gcc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -2017,34 +2577,36 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 ++ { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++$as_echo "$CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +@@ -2055,38 +2617,49 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then +- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +-echo "${ECHO_T}$ac_ct_CC" >&6 ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++$as_echo "$ac_ct_CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + +- CC=$ac_ct_CC ++ if test "x$ac_ct_CC" = x; then ++ CC="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ CC=$ac_ct_CC ++ fi + else + CC="$ac_cv_prog_CC" + fi + + if test -z "$CC"; then +- if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. ++ if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + set dummy ${ac_tool_prefix}cc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -2097,76 +2670,36 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 ++ { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++$as_echo "$CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + +-fi +-if test -z "$ac_cv_prog_CC"; then +- ac_ct_CC=$CC +- # Extract the first word of "cc", so it can be a program name with args. +-set dummy cc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- 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 +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_ac_ct_CC="cc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 ++ + fi +-done +-done +- +-fi +-fi +-ac_ct_CC=$ac_cv_prog_ac_ct_CC +-if test -n "$ac_ct_CC"; then +- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +-echo "${ECHO_T}$ac_ct_CC" >&6 +-else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +-fi +- +- CC=$ac_ct_CC +-else +- CC="$ac_cv_prog_CC" +-fi +- + fi + if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -2178,17 +2711,18 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. +@@ -2206,24 +2740,25 @@ fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 ++ { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++$as_echo "$CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + fi + if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then +- for ac_prog in cl ++ for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -2234,38 +2769,40 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 ++ { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++$as_echo "$CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + test -n "$CC" && break + done + fi + if test -z "$CC"; then + ac_ct_CC=$CC +- for ac_prog in cl ++ for ac_prog in cl.exe + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +@@ -2276,58 +2813,90 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then +- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +-echo "${ECHO_T}$ac_ct_CC" >&6 ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++$as_echo "$ac_ct_CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + test -n "$ac_ct_CC" && break + done + +- CC=$ac_ct_CC ++ if test "x$ac_ct_CC" = x; then ++ CC="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ CC=$ac_ct_CC ++ fi + fi + + fi + + +-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH ++test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH + See \`config.log' for more details." >&5 +-echo "$as_me: error: no acceptable C compiler found in \$PATH ++$as_echo "$as_me: error: no acceptable C compiler found in \$PATH + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ { (exit 1); exit 1; }; }; } + + # Provide some information about the compiler. +-echo "$as_me:$LINENO:" \ +- "checking for C compiler version" >&5 +-ac_compiler=`set X $ac_compile; echo $2` +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 +- (eval $ac_compiler --version &5) 2>&5 ++$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 ++set X $ac_compile ++ac_compiler=$2 ++{ (ac_try="$ac_compiler --version >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 +- (eval $ac_compiler -v &5) 2>&5 ++{ (ac_try="$ac_compiler -v >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 +- (eval $ac_compiler -V &5) 2>&5 ++{ (ac_try="$ac_compiler -V >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + + cat >conftest.$ac_ext <<_ACEOF +@@ -2346,111 +2915,150 @@ main () + } + _ACEOF + ac_clean_files_save=$ac_clean_files +-ac_clean_files="$ac_clean_files a.out a.exe b.out" ++ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" + # Try to create an executable without -o first, disregard a.out. + # It will help us diagnose broken compilers, and finding out an intuition + # of exeext. +-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 +- (eval $ac_link_default) 2>&5 ++{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 ++$as_echo_n "checking for C compiler default output file name... " >&6; } ++ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` ++ ++# The possible output files: ++ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ++ ++ac_rmfiles= ++for ac_file in $ac_files ++do ++ case $ac_file in ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; ++ * ) ac_rmfiles="$ac_rmfiles $ac_file";; ++ esac ++done ++rm -f $ac_rmfiles ++ ++if { (ac_try="$ac_link_default" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link_default") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then +- # Find the output, starting from the most likely. This scheme is +-# not robust to junk in `.', hence go to wildcards (a.*) only as a last +-# resort. +- +-# Be careful to initialize this variable, since it used to be cached. +-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +-ac_cv_exeext= +-# b.out is created by i960 compilers. +-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out ++ # 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. ++for ac_file in $ac_files '' + do + test -f "$ac_file" || continue + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) +- ;; +- conftest.$ac_ext ) +- # This is the source file. ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) +- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` +- # FIXME: I believe we export ac_cv_exeext for Libtool, +- # but it would be cool to find out if it's true. Does anybody +- # maintain Libtool? --akim. +- export ac_cv_exeext ++ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; ++ then :; else ++ 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' ++ # 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. + break;; + * ) + break;; + esac + done ++test "$ac_cv_exeext" = no && ac_cv_exeext= ++ + else +- echo "$as_me: failed program was:" >&5 ++ ac_file='' ++fi ++ ++{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 ++$as_echo "$ac_file" >&6; } ++if test -z "$ac_file"; then ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables ++{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables + See \`config.log' for more details." >&5 +-echo "$as_me: error: C compiler cannot create executables ++$as_echo "$as_me: error: C compiler cannot create executables + See \`config.log' for more details." >&2;} +- { (exit 77); exit 77; }; } ++ { (exit 77); exit 77; }; }; } + fi + + ac_exeext=$ac_cv_exeext +-echo "$as_me:$LINENO: result: $ac_file" >&5 +-echo "${ECHO_T}$ac_file" >&6 + +-# Check the compiler produces executables we can run. If not, either ++# Check that the compiler produces executables we can run. If not, either + # the compiler is broken, or we cross compile. +-echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 ++$as_echo_n "checking whether the C compiler works... " >&6; } + # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 + # If not cross compiling, check that we can run a simple program. + if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else +- { { echo "$as_me:$LINENO: error: cannot run C compiled programs. ++ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. + If you meant to cross compile, use \`--host'. + See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot run C compiled programs. ++$as_echo "$as_me: error: cannot run C compiled programs. + If you meant to cross compile, use \`--host'. + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ { (exit 1); exit 1; }; }; } + fi + fi + fi +-echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++{ $as_echo "$as_me:$LINENO: result: yes" >&5 ++$as_echo "yes" >&6; } + +-rm -f a.out a.exe conftest$ac_cv_exeext b.out ++rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out + ac_clean_files=$ac_clean_files_save +-# Check the compiler produces executables we can run. If not, either ++# Check that the compiler produces executables we can run. If not, either + # the compiler is broken, or we cross compile. +-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +-echo "$as_me:$LINENO: result: $cross_compiling" >&5 +-echo "${ECHO_T}$cross_compiling" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 ++$as_echo_n "checking whether we are cross compiling... " >&6; } ++{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 ++$as_echo "$cross_compiling" >&6; } + +-echo "$as_me:$LINENO: checking for suffix of executables" >&5 +-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 ++$as_echo_n "checking for suffix of executables... " >&6; } ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) + # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +@@ -2459,32 +3067,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` +- export ac_cv_exeext + break;; + * ) break;; + esac + done + else +- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link ++ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link ++$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ { (exit 1); exit 1; }; }; } + fi + + rm -f conftest$ac_cv_exeext +-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +-echo "${ECHO_T}$ac_cv_exeext" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 ++$as_echo "$ac_cv_exeext" >&6; } + + rm -f conftest.$ac_ext + EXEEXT=$ac_cv_exeext + ac_exeext=$EXEEXT +-echo "$as_me:$LINENO: checking for suffix of object files" >&5 +-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 ++$as_echo_n "checking for suffix of object files... " >&6; } + if test "${ac_cv_objext+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -2502,39 +3111,48 @@ main () + } + _ACEOF + rm -f conftest.o conftest.obj +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then +- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do ++ for ac_file in conftest.o conftest.obj conftest.*; do ++ test -f "$ac_file" || continue; + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac + done + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile ++{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile + See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot compute suffix of object files: cannot compile ++$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ { (exit 1); exit 1; }; }; } + fi + + rm -f conftest.$ac_cv_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +-echo "${ECHO_T}$ac_cv_objext" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 ++$as_echo "$ac_cv_objext" >&6; } + OBJEXT=$ac_cv_objext + ac_objext=$OBJEXT +-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 ++$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } + if test "${ac_cv_c_compiler_gnu+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -2555,50 +3173,54 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_compiler_gnu=no ++ ac_compiler_gnu=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_c_compiler_gnu=$ac_compiler_gnu + + fi +-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +-GCC=`test $ac_compiler_gnu = yes && echo yes` ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 ++$as_echo "$ac_cv_c_compiler_gnu" >&6; } ++if test $ac_compiler_gnu = yes; then ++ GCC=yes ++else ++ GCC= ++fi + ac_test_CFLAGS=${CFLAGS+set} + ac_save_CFLAGS=$CFLAGS +-CFLAGS="-g" +-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 ++$as_echo_n "checking whether $CC accepts -g... " >&6; } + if test "${ac_cv_prog_cc_g+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_save_c_werror_flag=$ac_c_werror_flag ++ ac_c_werror_flag=yes ++ ac_cv_prog_cc_g=no ++ CFLAGS="-g" ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -2614,38 +3236,121 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_prog_cc_g=yes ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ CFLAGS="" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_c_werror_flag=$ac_save_c_werror_flag ++ CFLAGS="-g" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_prog_cc_g=no ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_c_werror_flag=$ac_save_c_werror_flag + fi +-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 ++$as_echo "$ac_cv_prog_cc_g" >&6; } + if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS + elif test $ac_cv_prog_cc_g = yes; then +@@ -2661,12 +3366,12 @@ else + CFLAGS= + fi + fi +-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +-if test "${ac_cv_prog_cc_stdc+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 ++$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } ++if test "${ac_cv_prog_cc_c89+set}" = set; then ++ $as_echo_n "(cached) " >&6 + else +- ac_cv_prog_cc_stdc=no ++ ac_cv_prog_cc_c89=no + ac_save_CC=$CC + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -2700,12 +3405,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) + /* 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 don't provoke an error unfortunately, instead are silently treated +- as 'x'. The following induces an error, until -std1 is added to get ++ as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something +- that's true only with -std1. */ ++ that's true only with -std. */ + int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + ++/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters ++ inside strings and character constants. */ ++#define FOO(x) 'x' ++int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; ++ + int test (int i, double x); + struct s1 {int (*f) (int a);}; + struct s2 {int (*f) (double a);}; +@@ -2720,205 +3430,58 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + return 0; + } + _ACEOF +-# Don't try gcc -ansi; that turns off useful extensions and +-# breaks some systems' header files. +-# AIX -qlanglvl=ansi +-# Ultrix and OSF/1 -std1 +-# HP-UX 10.20 and later -Ae +-# HP-UX older versions -Aa -D_HPUX_SOURCE +-# SVR4 -Xc -D__EXTENSIONS__ +-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" ++for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ ++ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" + do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_prog_cc_stdc=$ac_arg +-break ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_prog_cc_c89=$ac_arg + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext ++ ++rm -f core conftest.err conftest.$ac_objext ++ test "x$ac_cv_prog_cc_c89" != "xno" && break + done +-rm -f conftest.$ac_ext conftest.$ac_objext ++rm -f conftest.$ac_ext + CC=$ac_save_CC + + fi +- +-case "x$ac_cv_prog_cc_stdc" in +- x|xno) +- echo "$as_me:$LINENO: result: none needed" >&5 +-echo "${ECHO_T}none needed" >&6 ;; ++# AC_CACHE_VAL ++case "x$ac_cv_prog_cc_c89" in ++ x) ++ { $as_echo "$as_me:$LINENO: result: none needed" >&5 ++$as_echo "none needed" >&6; } ;; ++ xno) ++ { $as_echo "$as_me:$LINENO: result: unsupported" >&5 ++$as_echo "unsupported" >&6; } ;; + *) +- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 +- CC="$CC $ac_cv_prog_cc_stdc" ;; ++ CC="$CC $ac_cv_prog_cc_c89" ++ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 ++$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + esac + +-# Some people use a C++ compiler to compile C. Since we use `exit', +-# in C++ we need to declare it. In case someone uses the same compiler +-# for both compiling C and C++ we need to have the C++ compiler decide +-# the declaration of exit, since it's the most demanding environment. +-cat >conftest.$ac_ext <<_ACEOF +-#ifndef __cplusplus +- choke me +-#endif +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- for ac_declaration in \ +- '' \ +- 'extern "C" void std::exit (int) throw (); using std::exit;' \ +- 'extern "C" void std::exit (int); using std::exit;' \ +- 'extern "C" void exit (int) throw ();' \ +- 'extern "C" void exit (int);' \ +- 'void exit (int);' +-do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_declaration +-#include +-int +-main () +-{ +-exit (42); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-continue +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_declaration +-int +-main () +-{ +-exit (42); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- break +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-rm -f conftest* +-if test -n "$ac_declaration"; then +- echo '#ifdef __cplusplus' >>confdefs.h +- echo $ac_declaration >>confdefs.h +- echo '#endif' >>confdefs.h +-fi +- +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +@@ -2926,7 +3489,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ + ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" + +- ac_config_commands="$ac_config_commands depfiles" ++ac_config_commands="$ac_config_commands depfiles" + + + am_make=${MAKE-make} +@@ -2936,8 +3499,8 @@ am__doit: + .PHONY: am__doit + END + # If we don't find an include directive, just comment out the code. +-echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 ++$as_echo_n "checking for style of include used by $am_make... " >&6; } + am__include="#" + am__quote= + _am_result=none +@@ -2964,15 +3527,15 @@ if test "$am__include" = "#"; then + fi + + +-echo "$as_me:$LINENO: result: $_am_result" >&5 +-echo "${ECHO_T}$_am_result" >&6 ++{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 ++$as_echo "$_am_result" >&6; } + rm -f confinc confmf + +-# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. ++# Check whether --enable-dependency-tracking was given. + if test "${enable_dependency_tracking+set}" = set; then +- enableval="$enable_dependency_tracking" ++ enableval=$enable_dependency_tracking; ++fi + +-fi; + if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +@@ -2992,10 +3555,10 @@ fi + + depcc="$CC" am_compiler_list= + +-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 ++$as_echo_n "checking dependency style of $depcc... " >&6; } + if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up +@@ -3082,8 +3645,8 @@ else + fi + + fi +-echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 ++{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 ++$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } + CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + +@@ -3100,16 +3663,16 @@ fi + + + if test "x$CC" != xcc; then +- echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 +-echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 ++$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } + else +- echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 +-echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 ++$as_echo_n "checking whether cc understands -c and -o together... " >&6; } + fi +-set dummy $CC; ac_cc=`echo $2 | ++set dummy $CC; ac_cc=`$as_echo "$2" | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +-if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -3129,37 +3692,64 @@ _ACEOF + # Make sure it works both with $CC and with simple cc. + # We do the test twice because some compilers refuse to overwrite an + # existing .o file with -o, though they will create one. +-ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' +-if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' ++rm -f conftest2.* ++if { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ test -f conftest2.$ac_objext && { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; + then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.$ac_ext >&5' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +- ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' +- if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' ++ rm -f conftest2.* ++ if { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ test -f conftest2.$ac_objext && { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; + then + # cc works too. +@@ -3173,15 +3763,15 @@ then + else + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi +-rm -f conftest* ++rm -f core conftest* + + fi +-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then ++ { $as_echo "$as_me:$LINENO: result: yes" >&5 ++$as_echo "yes" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + + cat >>confdefs.h <<\_ACEOF + #define NO_MINUS_C_MINUS_O 1 +@@ -3206,10 +3796,10 @@ fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. + set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_RANLIB+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +@@ -3220,34 +3810,36 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + RANLIB=$ac_cv_prog_RANLIB + if test -n "$RANLIB"; then +- echo "$as_me:$LINENO: result: $RANLIB" >&5 +-echo "${ECHO_T}$RANLIB" >&6 ++ { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 ++$as_echo "$RANLIB" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +@@ -3258,116 +3850,41 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" + fi + fi + ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB + if test -n "$ac_ct_RANLIB"; then +- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +-echo "${ECHO_T}$ac_ct_RANLIB" >&6 ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 ++$as_echo "$ac_ct_RANLIB" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + +- RANLIB=$ac_ct_RANLIB +-else +- RANLIB="$ac_cv_prog_RANLIB" +-fi +- +- +- +-cat >>confdefs.h <<\_ACEOF +-#define _GNU_SOURCE 1 +-_ACEOF +- +- +-# Find a good install program. We prefer a C program (faster), +-# so one script is as good as another. But avoid the broken or +-# incompatible versions: +-# SysV /etc/install, /usr/sbin/install +-# SunOS /usr/etc/install +-# IRIX /sbin/install +-# AIX /bin/install +-# AmigaOS /C/install, which installs bootblocks on floppy discs +-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +-# AFS /usr/afsws/bin/install, which mishandles nonexistent args +-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +-# OS/2's system install, which has a completely different semantic +-# ./install, which can be erroneously created by make from ./install.sh. +-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +-if test -z "$INSTALL"; then +-if test "${ac_cv_path_install+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- # Account for people who put trailing slashes in PATH elements. +-case $as_dir/ in +- ./ | .// | /cC/* | \ +- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ +- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ +- /usr/ucb/* ) ;; +- *) +- # OSF1 and SCO ODT 3.0 have their own names for install. +- # Don't use installbsd from OSF since it installs stuff as root +- # by default. +- for ac_prog in ginstall scoinst install; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then +- if test $ac_prog = install && +- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then +- # AIX install. It has an incompatible calling convention. +- : +- elif test $ac_prog = install && +- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then +- # program-specific install script used by HP pwplus--don't use. +- : +- else +- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" +- break 3 +- fi +- fi +- done +- done +- ;; +-esac +-done +- +- +-fi +- if test "${ac_cv_path_install+set}" = set; then +- INSTALL=$ac_cv_path_install ++ if test "x$ac_ct_RANLIB" = x; then ++ RANLIB=":" + else +- # As a last resort, use the slow shell script. We don't cache a +- # path for INSTALL within a source directory, because that will +- # break other packages using the cache if that directory is +- # removed, or if the path is relative. +- INSTALL=$ac_install_sh ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ RANLIB=$ac_ct_RANLIB + fi ++else ++ RANLIB="$ac_cv_prog_RANLIB" + fi +-echo "$as_me:$LINENO: result: $INSTALL" >&5 +-echo "${ECHO_T}$INSTALL" >&6 + +-# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +-# It thinks the first close brace ends the variable substitution. +-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +- +-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' +- +-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + + ac_ext=c +@@ -3375,15 +3892,15 @@ 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 +-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 ++$as_echo_n "checking how to run the C preprocessor... " >&6; } + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= + fi + if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" +@@ -3410,35 +3927,35 @@ cat >>conftest.$ac_ext <<_ACEOF + #endif + Syntax error + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. + continue + fi ++ + rm -f conftest.err conftest.$ac_ext + +- # OK, works on sane cases. Now check whether non-existent headers ++ # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -3448,34 +3965,34 @@ cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + # Broken: success on invalid input. + continue + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. + ac_preproc_ok=: + break + fi ++ + rm -f conftest.err conftest.$ac_ext + + done +@@ -3493,8 +4010,8 @@ fi + else + ac_cv_prog_CPP=$CPP + fi +-echo "$as_me:$LINENO: result: $CPP" >&5 +-echo "${ECHO_T}$CPP" >&6 ++{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 ++$as_echo "$CPP" >&6; } + ac_preproc_ok=false + for ac_c_preproc_warn_flag in '' yes + do +@@ -3517,35 +4034,35 @@ cat >>conftest.$ac_ext <<_ACEOF + #endif + Syntax error + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. + continue + fi ++ + rm -f conftest.err conftest.$ac_ext + +- # OK, works on sane cases. Now check whether non-existent headers ++ # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -3555,34 +4072,34 @@ cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + # Broken: success on invalid input. + continue + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. + ac_preproc_ok=: + break + fi ++ + rm -f conftest.err conftest.$ac_ext + + done +@@ -3591,11 +4108,13 @@ rm -f conftest.err conftest.$ac_ext + if $ac_preproc_ok; then + : + else +- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check ++ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + See \`config.log' for more details." >&5 +-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check ++$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ { (exit 1); exit 1; }; }; } + fi + + ac_ext=c +@@ -3605,26 +4124,723 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +-echo "$as_me:$LINENO: checking for egrep" >&5 +-echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +-if test "${ac_cv_prog_egrep+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- if echo a | (grep -E '(a|b)') >/dev/null 2>&1 +- then ac_cv_prog_egrep='grep -E' +- else ac_cv_prog_egrep='egrep' ++{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 ++$as_echo_n "checking for grep that handles long lines and -e... " >&6; } ++if test "${ac_cv_path_GREP+set}" = set; then ++ $as_echo_n "(cached) " >&6 ++else ++ 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 ++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_prog in grep ggrep; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue ++# 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 ++*GNU*) ++ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; ++*) ++ ac_count=0 ++ $as_echo_n 0123456789 >"conftest.in" ++ while : ++ do ++ cat "conftest.in" "conftest.in" >"conftest.tmp" ++ mv "conftest.tmp" "conftest.in" ++ cp "conftest.in" "conftest.nl" ++ $as_echo 'GREP' >> "conftest.nl" ++ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break ++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ++ ac_count=`expr $ac_count + 1` ++ if test $ac_count -gt ${ac_path_GREP_max-0}; then ++ # Best one so far, save it but keep looking for a better one ++ ac_cv_path_GREP="$ac_path_GREP" ++ ac_path_GREP_max=$ac_count ++ fi ++ # 10*(2^10) chars as input seems more than enough ++ test $ac_count -gt 10 && break ++ done ++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; ++esac ++ ++ $ac_path_GREP_found && break 3 ++ done ++ done ++done ++IFS=$as_save_IFS ++ if test -z "$ac_cv_path_GREP"; then ++ { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 ++$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} ++ { (exit 1); exit 1; }; } ++ fi ++else ++ ac_cv_path_GREP=$GREP ++fi ++ ++fi ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 ++$as_echo "$ac_cv_path_GREP" >&6; } ++ GREP="$ac_cv_path_GREP" ++ ++ ++{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 ++$as_echo_n "checking for egrep... " >&6; } ++if test "${ac_cv_path_EGREP+set}" = set; then ++ $as_echo_n "(cached) " >&6 ++else ++ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 ++ then ac_cv_path_EGREP="$GREP -E" ++ else ++ if test -z "$EGREP"; then ++ ac_path_EGREP_found=false ++ # Loop through the user's path and test for each of PROGNAME-LIST ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_prog in egrep; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue ++# 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 ++*GNU*) ++ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; ++*) ++ ac_count=0 ++ $as_echo_n 0123456789 >"conftest.in" ++ while : ++ do ++ cat "conftest.in" "conftest.in" >"conftest.tmp" ++ mv "conftest.tmp" "conftest.in" ++ cp "conftest.in" "conftest.nl" ++ $as_echo 'EGREP' >> "conftest.nl" ++ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break ++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ++ ac_count=`expr $ac_count + 1` ++ if test $ac_count -gt ${ac_path_EGREP_max-0}; then ++ # Best one so far, save it but keep looking for a better one ++ ac_cv_path_EGREP="$ac_path_EGREP" ++ ac_path_EGREP_max=$ac_count + fi ++ # 10*(2^10) chars as input seems more than enough ++ test $ac_count -gt 10 && break ++ done ++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; ++esac ++ ++ $ac_path_EGREP_found && break 3 ++ done ++ done ++done ++IFS=$as_save_IFS ++ if test -z "$ac_cv_path_EGREP"; then ++ { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 ++$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} ++ { (exit 1); exit 1; }; } ++ fi ++else ++ ac_cv_path_EGREP=$EGREP ++fi ++ ++ fi ++fi ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 ++$as_echo "$ac_cv_path_EGREP" >&6; } ++ EGREP="$ac_cv_path_EGREP" ++ ++ ++{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 ++$as_echo_n "checking for ANSI C header files... " >&6; } ++if test "${ac_cv_header_stdc+set}" = set; then ++ $as_echo_n "(cached) " >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#include ++#include ++#include ++#include ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_header_stdc=yes ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_cv_header_stdc=no ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++if test $ac_cv_header_stdc = yes; then ++ # SunOS 4.x string.h does not declare mem*, contrary to ANSI. ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#include ++ ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "memchr" >/dev/null 2>&1; then ++ : ++else ++ ac_cv_header_stdc=no ++fi ++rm -f conftest* ++ ++fi ++ ++if test $ac_cv_header_stdc = yes; then ++ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#include ++ ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "free" >/dev/null 2>&1; then ++ : ++else ++ ac_cv_header_stdc=no ++fi ++rm -f conftest* ++ ++fi ++ ++if test $ac_cv_header_stdc = yes; then ++ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. ++ if test "$cross_compiling" = yes; then ++ : ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#include ++#include ++#if ((' ' & 0x0FF) == 0x020) ++# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') ++# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) ++#else ++# define ISLOWER(c) \ ++ (('a' <= (c) && (c) <= 'i') \ ++ || ('j' <= (c) && (c) <= 'r') \ ++ || ('s' <= (c) && (c) <= 'z')) ++# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) ++#endif ++ ++#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) ++int ++main () ++{ ++ int i; ++ for (i = 0; i < 256; i++) ++ if (XOR (islower (i), ISLOWER (i)) ++ || toupper (i) != TOUPPER (i)) ++ return 2; ++ return 0; ++} ++_ACEOF ++rm -f conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_try") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ : ++else ++ $as_echo "$as_me: program exited with status $ac_status" >&5 ++$as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++( exit $ac_status ) ++ac_cv_header_stdc=no ++fi ++rm -rf conftest.dSYM ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++fi ++ ++ + fi +-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +-echo "${ECHO_T}$ac_cv_prog_egrep" >&6 +- EGREP=$ac_cv_prog_egrep ++fi ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 ++$as_echo "$ac_cv_header_stdc" >&6; } ++if test $ac_cv_header_stdc = yes; then ++ ++cat >>confdefs.h <<\_ACEOF ++#define STDC_HEADERS 1 ++_ACEOF ++ ++fi ++ ++# On IRIX 5.3, sys/types and inttypes.h are conflicting. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ ++ inttypes.h stdint.h unistd.h ++do ++as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 ++$as_echo_n "checking for $ac_header... " >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ $as_echo_n "(cached) " >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++ ++#include <$ac_header> ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ eval "$as_ac_Header=yes" ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ eval "$as_ac_Header=no" ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++ac_res=`eval 'as_val=${'$as_ac_Header'} ++ $as_echo "$as_val"'` ++ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++as_val=`eval 'as_val=${'$as_ac_Header'} ++ $as_echo "$as_val"'` ++ if test "x$as_val" = x""yes; then ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi ++ ++done ++ ++ ++ ++ if test "${ac_cv_header_minix_config_h+set}" = set; then ++ { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 ++$as_echo_n "checking for minix/config.h... " >&6; } ++if test "${ac_cv_header_minix_config_h+set}" = set; then ++ $as_echo_n "(cached) " >&6 ++fi ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 ++$as_echo "$ac_cv_header_minix_config_h" >&6; } ++else ++ # Is the header compilable? ++{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 ++$as_echo_n "checking minix/config.h usability... " >&6; } ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++#include ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_header_compiler=yes ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_header_compiler=no ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ++$as_echo "$ac_header_compiler" >&6; } ++ ++# Is the header present? ++{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 ++$as_echo_n "checking minix/config.h presence... " >&6; } ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#include ++_ACEOF ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then ++ ac_header_preproc=yes ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_header_preproc=no ++fi ++ ++rm -f conftest.err conftest.$ac_ext ++{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ++$as_echo "$ac_header_preproc" >&6; } ++ ++# So? What about this header? ++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in ++ yes:no: ) ++ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 ++$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 ++$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} ++ ac_header_preproc=yes ++ ;; ++ no:yes:* ) ++ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 ++$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 ++$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 ++$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 ++$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 ++$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 ++$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} ++ ( cat <<\_ASBOX ++## ------------------------------------- ## ++## Report this to eddie.wai@broadcom.com ## ++## ------------------------------------- ## ++_ASBOX ++ ) | sed "s/^/$as_me: WARNING: /" >&2 ++ ;; ++esac ++{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 ++$as_echo_n "checking for minix/config.h... " >&6; } ++if test "${ac_cv_header_minix_config_h+set}" = set; then ++ $as_echo_n "(cached) " >&6 ++else ++ ac_cv_header_minix_config_h=$ac_header_preproc ++fi ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 ++$as_echo "$ac_cv_header_minix_config_h" >&6; } ++ ++fi ++if test "x$ac_cv_header_minix_config_h" = x""yes; then ++ MINIX=yes ++else ++ MINIX= ++fi ++ ++ ++ if test "$MINIX" = yes; then ++ ++cat >>confdefs.h <<\_ACEOF ++#define _POSIX_SOURCE 1 ++_ACEOF ++ ++ ++cat >>confdefs.h <<\_ACEOF ++#define _POSIX_1_SOURCE 2 ++_ACEOF ++ ++ ++cat >>confdefs.h <<\_ACEOF ++#define _MINIX 1 ++_ACEOF ++ ++ fi ++ ++ ++ ++ { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 ++$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } ++if test "${ac_cv_safe_to_define___extensions__+set}" = set; then ++ $as_echo_n "(cached) " >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++# define __EXTENSIONS__ 1 ++ $ac_includes_default ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_safe_to_define___extensions__=yes ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_cv_safe_to_define___extensions__=no ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 ++$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } ++ test $ac_cv_safe_to_define___extensions__ = yes && ++ cat >>confdefs.h <<\_ACEOF ++#define __EXTENSIONS__ 1 ++_ACEOF ++ ++ cat >>confdefs.h <<\_ACEOF ++#define _ALL_SOURCE 1 ++_ACEOF ++ ++ cat >>confdefs.h <<\_ACEOF ++#define _GNU_SOURCE 1 ++_ACEOF ++ ++ cat >>confdefs.h <<\_ACEOF ++#define _POSIX_PTHREAD_SEMANTICS 1 ++_ACEOF ++ ++ cat >>confdefs.h <<\_ACEOF ++#define _TANDEM_SOURCE 1 ++_ACEOF ++ ++ ++# Find a good install program. We prefer a C program (faster), ++# so one script is as good as another. But avoid the broken or ++# incompatible versions: ++# SysV /etc/install, /usr/sbin/install ++# SunOS /usr/etc/install ++# IRIX /sbin/install ++# AIX /bin/install ++# AmigaOS /C/install, which installs bootblocks on floppy discs ++# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag ++# AFS /usr/afsws/bin/install, which mishandles nonexistent args ++# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" ++# OS/2's system install, which has a completely different semantic ++# ./install, which can be erroneously created by make from ./install.sh. ++# Reject install programs that cannot install multiple files. ++{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 ++$as_echo_n "checking for a BSD-compatible install... " >&6; } ++if test -z "$INSTALL"; then ++if test "${ac_cv_path_install+set}" = set; then ++ $as_echo_n "(cached) " >&6 ++else ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ # Account for people who put trailing slashes in PATH elements. ++case $as_dir/ in ++ ./ | .// | /cC/* | \ ++ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ++ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ ++ /usr/ucb/* ) ;; ++ *) ++ # OSF1 and SCO ODT 3.0 have their own names for install. ++ # Don't use installbsd from OSF since it installs stuff as root ++ # by default. ++ for ac_prog in ginstall scoinst install; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then ++ if test $ac_prog = install && ++ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then ++ # AIX install. It has an incompatible calling convention. ++ : ++ elif test $ac_prog = install && ++ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then ++ # program-specific install script used by HP pwplus--don't use. ++ : ++ else ++ rm -rf conftest.one conftest.two conftest.dir ++ echo one > conftest.one ++ echo two > conftest.two ++ mkdir conftest.dir ++ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && ++ test -s conftest.one && test -s conftest.two && ++ test -s conftest.dir/conftest.one && ++ test -s conftest.dir/conftest.two ++ then ++ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" ++ break 3 ++ fi ++ fi ++ fi ++ done ++ done ++ ;; ++esac ++ ++done ++IFS=$as_save_IFS ++ ++rm -rf conftest.one conftest.two conftest.dir ++ ++fi ++ if test "${ac_cv_path_install+set}" = set; then ++ INSTALL=$ac_cv_path_install ++ else ++ # As a last resort, use the slow shell script. Don't cache a ++ # value for INSTALL within a source directory, because that will ++ # break other packages using the cache if that directory is ++ # removed, or if the value is a relative name. ++ INSTALL=$ac_install_sh ++ fi ++fi ++{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 ++$as_echo "$INSTALL" >&6; } ++ ++# Use test -z because SunOS4 sh mishandles braces in ${var-val}. ++# It thinks the first close brace ends the variable substitution. ++test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ++ ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + ++test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + if test $ac_cv_c_compiler_gnu = yes; then +- echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 +-echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 ++$as_echo_n "checking whether $CC needs -traditional... " >&6; } + if test "${ac_cv_prog_gcc_traditional+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_pattern="Autoconf.*'x'" + cat >conftest.$ac_ext <<_ACEOF +@@ -3663,8 +4879,8 @@ rm -f conftest* + + fi + fi +-echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 +-echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 ++$as_echo "$ac_cv_prog_gcc_traditional" >&6; } + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +@@ -3672,10 +4888,10 @@ fi + + + # Checks for typedefs, structures, and compiler characteristics. +-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 ++$as_echo_n "checking for an ANSI C-conforming const... " >&6; } + if test "${ac_cv_c_const+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -3691,10 +4907,10 @@ main () + #ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; +- const charset x; ++ const charset cs; + /* SunOS 4.1.1 cc rejects this. */ +- char const *const *ccp; +- char **p; ++ char const *const *pcpcc; ++ char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; +@@ -3703,16 +4919,17 @@ main () + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; +- ccp = &g + (g ? g-g : 0); ++ pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ +- ++ccp; +- p = (char**) ccp; +- ccp = (char const *const *) p; ++ ++pcpcc; ++ ppc = (char**) pcpcc; ++ pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; ++ if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; +@@ -3731,7 +4948,9 @@ main () + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; ++ if (!foo) return 0; + } ++ return !cs[0] && !zero.x; + #endif + + ; +@@ -3739,50 +4958,47 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_c_const=no ++ ac_cv_c_const=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +-echo "${ECHO_T}$ac_cv_c_const" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 ++$as_echo "$ac_cv_c_const" >&6; } + if test $ac_cv_c_const = no; then + + cat >>confdefs.h <<\_ACEOF +-#define const ++#define const /**/ + _ACEOF + + fi + +-echo "$as_me:$LINENO: checking for inline" >&5 +-echo $ECHO_N "checking for inline... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for inline" >&5 ++$as_echo_n "checking for inline... " >&6; } + if test "${ac_cv_c_inline+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_cv_c_inline=no + for ac_kw in inline __inline__ __inline; do +@@ -3800,39 +5016,38 @@ $ac_kw foo_t foo () {return 0; } + + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_c_inline=$ac_kw; break ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_c_inline=$ac_kw + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ test "$ac_cv_c_inline" != no && break + done + + fi +-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +-echo "${ECHO_T}$ac_cv_c_inline" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 ++$as_echo "$ac_cv_c_inline" >&6; } + + + case $ac_cv_c_inline in +@@ -3850,250 +5065,13 @@ _ACEOF + ;; + esac + +-echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +-if test "${ac_cv_header_stdc+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#include +-#include +-#include +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_header_stdc=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-ac_cv_header_stdc=no +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +- +-if test $ac_cv_header_stdc = yes; then +- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "memchr" >/dev/null 2>&1; then +- : +-else +- ac_cv_header_stdc=no +-fi +-rm -f conftest* +- +-fi +- +-if test $ac_cv_header_stdc = yes; then +- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "free" >/dev/null 2>&1; then +- : +-else +- ac_cv_header_stdc=no +-fi +-rm -f conftest* +- +-fi +- +-if test $ac_cv_header_stdc = yes; then +- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +- if test "$cross_compiling" = yes; then +- : +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#if ((' ' & 0x0FF) == 0x020) +-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +-#else +-# define ISLOWER(c) \ +- (('a' <= (c) && (c) <= 'i') \ +- || ('j' <= (c) && (c) <= 'r') \ +- || ('s' <= (c) && (c) <= 'z')) +-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +-#endif +- +-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +-int +-main () +-{ +- int i; +- for (i = 0; i < 256; i++) +- if (XOR (islower (i), ISLOWER (i)) +- || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : +-else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-ac_cv_header_stdc=no +-fi +-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +-fi +-fi +-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +-echo "${ECHO_T}$ac_cv_header_stdc" >&6 +-if test $ac_cv_header_stdc = yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define STDC_HEADERS 1 +-_ACEOF +- +-fi +- +-# On IRIX 5.3, sys/types and inttypes.h are conflicting. +- +- +- +- +- +- +- +- +- +-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ +- inttypes.h stdint.h unistd.h +-do +-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +- +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- eval "$as_ac_Header=yes" +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-eval "$as_ac_Header=no" +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +-if test `eval echo '${'$as_ac_Header'}'` = yes; then +- cat >>confdefs.h <<_ACEOF +-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF +- +-fi +- +-done +- +- +-echo "$as_me:$LINENO: checking for off_t" >&5 +-echo $ECHO_N "checking for off_t... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for off_t" >&5 ++$as_echo_n "checking for off_t... " >&6; } + if test "${ac_cv_type_off_t+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_cv_type_off_t=no ++cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4103,63 +5081,101 @@ $ac_includes_default + int + main () + { +-if ((off_t *) 0) +- return 0; + if (sizeof (off_t)) +- return 0; ++ return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++if (sizeof ((off_t))) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_type_off_t=yes ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_off_t=no ++ ac_cv_type_off_t=yes + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +-echo "${ECHO_T}$ac_cv_type_off_t" >&6 +-if test $ac_cv_type_off_t = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 ++$as_echo "$ac_cv_type_off_t" >&6; } ++if test "x$ac_cv_type_off_t" = x""yes; then + : + else + + cat >>confdefs.h <<_ACEOF +-#define off_t long ++#define off_t long int + _ACEOF + + fi + +-echo "$as_me:$LINENO: checking for size_t" >&5 +-echo $ECHO_N "checking for size_t... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 ++$as_echo_n "checking for size_t... " >&6; } + if test "${ac_cv_type_size_t+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_cv_type_size_t=no ++cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4169,63 +5185,101 @@ $ac_includes_default + int + main () + { +-if ((size_t *) 0) +- return 0; + if (sizeof (size_t)) +- return 0; ++ return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++if (sizeof ((size_t))) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_type_size_t=yes ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_size_t=no ++ ac_cv_type_size_t=yes + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +-echo "${ECHO_T}$ac_cv_type_size_t" >&6 +-if test $ac_cv_type_size_t = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 ++$as_echo "$ac_cv_type_size_t" >&6; } ++if test "x$ac_cv_type_size_t" = x""yes; then + : + else + + cat >>confdefs.h <<_ACEOF +-#define size_t unsigned ++#define size_t unsigned int + _ACEOF + + fi + +-echo "$as_me:$LINENO: checking for int8_t" >&5 +-echo $ECHO_N "checking for int8_t... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for int8_t" >&5 ++$as_echo_n "checking for int8_t... " >&6; } + if test "${ac_cv_type_int8_t+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_cv_type_int8_t=no ++cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4235,48 +5289,85 @@ $ac_includes_default + int + main () + { +-if ((int8_t *) 0) +- return 0; + if (sizeof (int8_t)) +- return 0; ++ return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++if (sizeof ((int8_t))) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_type_int8_t=yes ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_int8_t=no ++ ac_cv_type_int8_t=yes + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_int8_t" >&5 +-echo "${ECHO_T}$ac_cv_type_int8_t" >&6 +-if test $ac_cv_type_int8_t = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int8_t" >&5 ++$as_echo "$ac_cv_type_int8_t" >&6; } ++if test "x$ac_cv_type_int8_t" = x""yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_INT8_T 1 +@@ -4285,12 +5376,13 @@ _ACEOF + + fi + +-echo "$as_me:$LINENO: checking for uint8_t" >&5 +-echo $ECHO_N "checking for uint8_t... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for uint8_t" >&5 ++$as_echo_n "checking for uint8_t... " >&6; } + if test "${ac_cv_type_uint8_t+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_cv_type_uint8_t=no ++cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4300,48 +5392,85 @@ $ac_includes_default + int + main () + { +-if ((uint8_t *) 0) +- return 0; + if (sizeof (uint8_t)) +- return 0; ++ return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++if (sizeof ((uint8_t))) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_type_uint8_t=yes ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_uint8_t=no ++ ac_cv_type_uint8_t=yes + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_uint8_t" >&5 +-echo "${ECHO_T}$ac_cv_type_uint8_t" >&6 +-if test $ac_cv_type_uint8_t = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint8_t" >&5 ++$as_echo "$ac_cv_type_uint8_t" >&6; } ++if test "x$ac_cv_type_uint8_t" = x""yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_UINT8_T 1 +@@ -4350,12 +5479,13 @@ _ACEOF + + fi + +-echo "$as_me:$LINENO: checking for int16_t" >&5 +-echo $ECHO_N "checking for int16_t... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for int16_t" >&5 ++$as_echo_n "checking for int16_t... " >&6; } + if test "${ac_cv_type_int16_t+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_cv_type_int16_t=no ++cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4365,48 +5495,85 @@ $ac_includes_default + int + main () + { +-if ((int16_t *) 0) +- return 0; + if (sizeof (int16_t)) +- return 0; ++ return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++if (sizeof ((int16_t))) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_type_int16_t=yes ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_int16_t=no ++ ac_cv_type_int16_t=yes + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_int16_t" >&5 +-echo "${ECHO_T}$ac_cv_type_int16_t" >&6 +-if test $ac_cv_type_int16_t = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int16_t" >&5 ++$as_echo "$ac_cv_type_int16_t" >&6; } ++if test "x$ac_cv_type_int16_t" = x""yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_INT16_T 1 +@@ -4415,12 +5582,13 @@ _ACEOF + + fi + +-echo "$as_me:$LINENO: checking for uint16_t" >&5 +-echo $ECHO_N "checking for uint16_t... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for uint16_t" >&5 ++$as_echo_n "checking for uint16_t... " >&6; } + if test "${ac_cv_type_uint16_t+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_cv_type_uint16_t=no ++cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4430,48 +5598,85 @@ $ac_includes_default + int + main () + { +-if ((uint16_t *) 0) +- return 0; + if (sizeof (uint16_t)) +- return 0; ++ return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++if (sizeof ((uint16_t))) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_type_uint16_t=yes ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_uint16_t=no ++ ac_cv_type_uint16_t=yes + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5 +-echo "${ECHO_T}$ac_cv_type_uint16_t" >&6 +-if test $ac_cv_type_uint16_t = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5 ++$as_echo "$ac_cv_type_uint16_t" >&6; } ++if test "x$ac_cv_type_uint16_t" = x""yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_UINT16_T 1 +@@ -4480,12 +5685,13 @@ _ACEOF + + fi + +-echo "$as_me:$LINENO: checking for int32_t" >&5 +-echo $ECHO_N "checking for int32_t... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for int32_t" >&5 ++$as_echo_n "checking for int32_t... " >&6; } + if test "${ac_cv_type_int32_t+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_cv_type_int32_t=no ++cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4495,48 +5701,85 @@ $ac_includes_default + int + main () + { +-if ((int32_t *) 0) +- return 0; + if (sizeof (int32_t)) +- return 0; ++ return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++if (sizeof ((int32_t))) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_type_int32_t=yes ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_int32_t=no ++ ac_cv_type_int32_t=yes + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5 +-echo "${ECHO_T}$ac_cv_type_int32_t" >&6 +-if test $ac_cv_type_int32_t = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5 ++$as_echo "$ac_cv_type_int32_t" >&6; } ++if test "x$ac_cv_type_int32_t" = x""yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_INT32_T 1 +@@ -4545,12 +5788,13 @@ _ACEOF + + fi + +-echo "$as_me:$LINENO: checking for uint32_t" >&5 +-echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for uint32_t" >&5 ++$as_echo_n "checking for uint32_t... " >&6; } + if test "${ac_cv_type_uint32_t+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_cv_type_uint32_t=no ++cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4560,48 +5804,85 @@ $ac_includes_default + int + main () + { +-if ((uint32_t *) 0) +- return 0; + if (sizeof (uint32_t)) +- return 0; ++ return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++if (sizeof ((uint32_t))) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_type_uint32_t=yes ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_uint32_t=no ++ ac_cv_type_uint32_t=yes + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5 +-echo "${ECHO_T}$ac_cv_type_uint32_t" >&6 +-if test $ac_cv_type_uint32_t = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5 ++$as_echo "$ac_cv_type_uint32_t" >&6; } ++if test "x$ac_cv_type_uint32_t" = x""yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_UINT32_T 1 +@@ -4610,12 +5891,13 @@ _ACEOF + + fi + +-echo "$as_me:$LINENO: checking for int64_t" >&5 +-echo $ECHO_N "checking for int64_t... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for int64_t" >&5 ++$as_echo_n "checking for int64_t... " >&6; } + if test "${ac_cv_type_int64_t+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_cv_type_int64_t=no ++cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4625,48 +5907,85 @@ $ac_includes_default + int + main () + { +-if ((int64_t *) 0) +- return 0; + if (sizeof (int64_t)) +- return 0; ++ return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++if (sizeof ((int64_t))) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_type_int64_t=yes ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_int64_t=no ++ ac_cv_type_int64_t=yes + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5 +-echo "${ECHO_T}$ac_cv_type_int64_t" >&6 +-if test $ac_cv_type_int64_t = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5 ++$as_echo "$ac_cv_type_int64_t" >&6; } ++if test "x$ac_cv_type_int64_t" = x""yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_INT64_T 1 +@@ -4675,12 +5994,13 @@ _ACEOF + + fi + +-echo "$as_me:$LINENO: checking for uint64_t" >&5 +-echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for uint64_t" >&5 ++$as_echo_n "checking for uint64_t... " >&6; } + if test "${ac_cv_type_uint64_t+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_cv_type_uint64_t=no ++cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4690,48 +6010,85 @@ $ac_includes_default + int + main () + { +-if ((uint64_t *) 0) +- return 0; + if (sizeof (uint64_t)) +- return 0; ++ return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++if (sizeof ((uint64_t))) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_type_uint64_t=yes ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_type_uint64_t=no ++ ac_cv_type_uint64_t=yes + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5 +-echo "${ECHO_T}$ac_cv_type_uint64_t" >&6 +-if test $ac_cv_type_uint64_t = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5 ++$as_echo "$ac_cv_type_uint64_t" >&6; } ++if test "x$ac_cv_type_uint64_t" = x""yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_UINT64_T 1 +@@ -4740,73 +6097,15 @@ _ACEOF + + fi + +-echo "$as_me:$LINENO: checking for short" >&5 +-echo $ECHO_N "checking for short... $ECHO_C" >&6 +-if test "${ac_cv_type_short+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if ((short *) 0) +- return 0; +-if (sizeof (short)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_type_short=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-ac_cv_type_short=no +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 +-echo "${ECHO_T}$ac_cv_type_short" >&6 +- +-echo "$as_me:$LINENO: checking size of short" >&5 +-echo $ECHO_N "checking size of short... $ECHO_C" >&6 ++# 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]];'. ++# This bug is HP SR number 8606223364. ++{ $as_echo "$as_me:$LINENO: checking size of short" >&5 ++$as_echo_n "checking size of short... " >&6; } + if test "${ac_cv_sizeof_short+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- if test "$ac_cv_type_short" = yes; then +- # The cast to unsigned long 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]];'. +- # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. + cat >conftest.$ac_ext <<_ACEOF +@@ -4819,7 +6118,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)]; + test_array [0] = 0 + + ; +@@ -4827,27 +6126,23 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +@@ -4860,7 +6155,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; + test_array [0] = 0 + + ; +@@ -4868,46 +6163,43 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_lo=`expr $ac_mid + 1` +- if test $ac_lo -le $ac_mid; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid + 1` ++ ac_lo=`expr $ac_mid + 1` ++ if test $ac_lo -le $ac_mid; then ++ ac_lo= ac_hi= ++ break ++ fi ++ ac_mid=`expr 2 '*' $ac_mid + 1` + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-cat >conftest.$ac_ext <<_ACEOF ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4917,7 +6209,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)]; + test_array [0] = 0 + + ; +@@ -4925,27 +6217,23 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +@@ -4958,7 +6246,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)]; + test_array [0] = 0 + + ; +@@ -4966,50 +6254,49 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_hi=`expr '(' $ac_mid ')' - 1` +- if test $ac_mid -le $ac_hi; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid` ++ ac_hi=`expr '(' $ac_mid ')' - 1` ++ if test $ac_mid -le $ac_hi; then ++ ac_lo= ac_hi= ++ break ++ fi ++ ac_mid=`expr 2 '*' $ac_mid` + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_lo= ac_hi= ++ ac_lo= ac_hi= + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Binary search between lo and hi bounds. + while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` +@@ -5023,7 +6310,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; + test_array [0] = 0 + + ; +@@ -5031,52 +6318,48 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_lo=`expr '(' $ac_mid ')' + 1` ++ ac_lo=`expr '(' $ac_mid ')' + 1` + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + case $ac_lo in + ?*) ac_cv_sizeof_short=$ac_lo;; +-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 ++'') if test "$ac_cv_type_short" = yes; then ++ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) + See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot compute sizeof (short), 77 ++$as_echo "$as_me: error: cannot compute sizeof (short) + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ;; ++ { (exit 77); exit 77; }; }; } ++ else ++ ac_cv_sizeof_short=0 ++ fi ;; + esac + else +- if test "$cross_compiling" = yes; then +- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } +-else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -5084,8 +6367,8 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default +-long longval () { return (long) (sizeof (short)); } +-unsigned long ulongval () { return (long) (sizeof (short)); } ++static long int longval () { return (long int) (sizeof (short)); } ++static unsigned long int ulongval () { return (long int) (sizeof (short)); } + #include + #include + int +@@ -5094,133 +6377,94 @@ main () + + FILE *f = fopen ("conftest.val", "w"); + if (! f) +- exit (1); +- if (((long) (sizeof (short))) < 0) ++ return 1; ++ if (((long int) (sizeof (short))) < 0) + { +- long i = longval (); +- if (i != ((long) (sizeof (short)))) +- exit (1); +- fprintf (f, "%ld\n", i); ++ long int i = longval (); ++ if (i != ((long int) (sizeof (short)))) ++ return 1; ++ fprintf (f, "%ld", i); + } + else + { +- unsigned long i = ulongval (); +- if (i != ((long) (sizeof (short)))) +- exit (1); +- fprintf (f, "%lu\n", i); ++ unsigned long int i = ulongval (); ++ if (i != ((long int) (sizeof (short)))) ++ return 1; ++ fprintf (f, "%lu", i); + } +- exit (ferror (f) || fclose (f) != 0); ++ /* Do not output a trailing newline, as this causes \r\n confusion ++ on some platforms. */ ++ return ferror (f) || fclose (f) != 0; + + ; + return 0; + } + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_short=`cat conftest.val` + else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: program exited with status $ac_status" >&5 ++$as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ( exit $ac_status ) +-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 ++if test "$ac_cv_type_short" = yes; then ++ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) + See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot compute sizeof (short), 77 ++$as_echo "$as_me: error: cannot compute sizeof (short) + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } +-fi +-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++ { (exit 77); exit 77; }; }; } ++ else ++ ac_cv_sizeof_short=0 ++ fi + fi ++rm -rf conftest.dSYM ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + rm -f conftest.val +-else +- ac_cv_sizeof_short=0 + fi +-fi +-echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +-echo "${ECHO_T}$ac_cv_sizeof_short" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 ++$as_echo "$ac_cv_sizeof_short" >&6; } ++ ++ ++ + cat >>confdefs.h <<_ACEOF + #define SIZEOF_SHORT $ac_cv_sizeof_short + _ACEOF + + +-echo "$as_me:$LINENO: checking for int" >&5 +-echo $ECHO_N "checking for int... $ECHO_C" >&6 +-if test "${ac_cv_type_int+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if ((int *) 0) +- return 0; +-if (sizeof (int)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_type_int=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-ac_cv_type_int=no +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +-echo "${ECHO_T}$ac_cv_type_int" >&6 +- +-echo "$as_me:$LINENO: checking size of int" >&5 +-echo $ECHO_N "checking size of int... $ECHO_C" >&6 ++# 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]];'. ++# This bug is HP SR number 8606223364. ++{ $as_echo "$as_me:$LINENO: checking size of int" >&5 ++$as_echo_n "checking size of int... " >&6; } + if test "${ac_cv_sizeof_int+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- if test "$ac_cv_type_int" = yes; then +- # The cast to unsigned long 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]];'. +- # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. + cat >conftest.$ac_ext <<_ACEOF +@@ -5233,7 +6477,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; + test_array [0] = 0 + + ; +@@ -5241,27 +6485,23 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +@@ -5274,7 +6514,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; + test_array [0] = 0 + + ; +@@ -5282,46 +6522,43 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_lo=`expr $ac_mid + 1` +- if test $ac_lo -le $ac_mid; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid + 1` ++ ac_lo=`expr $ac_mid + 1` ++ if test $ac_lo -le $ac_mid; then ++ ac_lo= ac_hi= ++ break ++ fi ++ ac_mid=`expr 2 '*' $ac_mid + 1` + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-cat >conftest.$ac_ext <<_ACEOF ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -5331,7 +6568,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; + test_array [0] = 0 + + ; +@@ -5339,27 +6576,23 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +@@ -5372,7 +6605,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)]; + test_array [0] = 0 + + ; +@@ -5380,50 +6613,49 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_hi=`expr '(' $ac_mid ')' - 1` +- if test $ac_mid -le $ac_hi; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid` ++ ac_hi=`expr '(' $ac_mid ')' - 1` ++ if test $ac_mid -le $ac_hi; then ++ ac_lo= ac_hi= ++ break ++ fi ++ ac_mid=`expr 2 '*' $ac_mid` + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_lo= ac_hi= ++ ac_lo= ac_hi= + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Binary search between lo and hi bounds. + while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` +@@ -5437,7 +6669,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; + test_array [0] = 0 + + ; +@@ -5445,52 +6677,48 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_lo=`expr '(' $ac_mid ')' + 1` ++ ac_lo=`expr '(' $ac_mid ')' + 1` + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + case $ac_lo in + ?*) ac_cv_sizeof_int=$ac_lo;; +-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 ++'') if test "$ac_cv_type_int" = yes; then ++ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) + See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot compute sizeof (int), 77 ++$as_echo "$as_me: error: cannot compute sizeof (int) + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ;; ++ { (exit 77); exit 77; }; }; } ++ else ++ ac_cv_sizeof_int=0 ++ fi ;; + esac + else +- if test "$cross_compiling" = yes; then +- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } +-else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -5498,8 +6726,8 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default +-long longval () { return (long) (sizeof (int)); } +-unsigned long ulongval () { return (long) (sizeof (int)); } ++static long int longval () { return (long int) (sizeof (int)); } ++static unsigned long int ulongval () { return (long int) (sizeof (int)); } + #include + #include + int +@@ -5508,133 +6736,94 @@ main () + + FILE *f = fopen ("conftest.val", "w"); + if (! f) +- exit (1); +- if (((long) (sizeof (int))) < 0) ++ return 1; ++ if (((long int) (sizeof (int))) < 0) + { +- long i = longval (); +- if (i != ((long) (sizeof (int)))) +- exit (1); +- fprintf (f, "%ld\n", i); ++ long int i = longval (); ++ if (i != ((long int) (sizeof (int)))) ++ return 1; ++ fprintf (f, "%ld", i); + } + else + { +- unsigned long i = ulongval (); +- if (i != ((long) (sizeof (int)))) +- exit (1); +- fprintf (f, "%lu\n", i); ++ unsigned long int i = ulongval (); ++ if (i != ((long int) (sizeof (int)))) ++ return 1; ++ fprintf (f, "%lu", i); + } +- exit (ferror (f) || fclose (f) != 0); ++ /* Do not output a trailing newline, as this causes \r\n confusion ++ on some platforms. */ ++ return ferror (f) || fclose (f) != 0; + + ; + return 0; + } + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` + else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: program exited with status $ac_status" >&5 ++$as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ( exit $ac_status ) +-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 ++if test "$ac_cv_type_int" = yes; then ++ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) + See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot compute sizeof (int), 77 ++$as_echo "$as_me: error: cannot compute sizeof (int) + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } +-fi +-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++ { (exit 77); exit 77; }; }; } ++ else ++ ac_cv_sizeof_int=0 ++ fi + fi ++rm -rf conftest.dSYM ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + rm -f conftest.val +-else +- ac_cv_sizeof_int=0 + fi +-fi +-echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +-echo "${ECHO_T}$ac_cv_sizeof_int" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 ++$as_echo "$ac_cv_sizeof_int" >&6; } ++ ++ ++ + cat >>confdefs.h <<_ACEOF + #define SIZEOF_INT $ac_cv_sizeof_int + _ACEOF + + +-echo "$as_me:$LINENO: checking for long" >&5 +-echo $ECHO_N "checking for long... $ECHO_C" >&6 +-if test "${ac_cv_type_long+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if ((long *) 0) +- return 0; +-if (sizeof (long)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_type_long=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-ac_cv_type_long=no +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +-echo "${ECHO_T}$ac_cv_type_long" >&6 +- +-echo "$as_me:$LINENO: checking size of long" >&5 +-echo $ECHO_N "checking size of long... $ECHO_C" >&6 ++# 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]];'. ++# This bug is HP SR number 8606223364. ++{ $as_echo "$as_me:$LINENO: checking size of long" >&5 ++$as_echo_n "checking size of long... " >&6; } + if test "${ac_cv_sizeof_long+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- if test "$ac_cv_type_long" = yes; then +- # The cast to unsigned long 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]];'. +- # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. + cat >conftest.$ac_ext <<_ACEOF +@@ -5647,7 +6836,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)]; + test_array [0] = 0 + + ; +@@ -5655,27 +6844,23 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +@@ -5688,7 +6873,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; + test_array [0] = 0 + + ; +@@ -5696,46 +6881,43 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_lo=`expr $ac_mid + 1` +- if test $ac_lo -le $ac_mid; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid + 1` ++ ac_lo=`expr $ac_mid + 1` ++ if test $ac_lo -le $ac_mid; then ++ ac_lo= ac_hi= ++ break ++ fi ++ ac_mid=`expr 2 '*' $ac_mid + 1` + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-cat >conftest.$ac_ext <<_ACEOF ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -5745,7 +6927,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)]; + test_array [0] = 0 + + ; +@@ -5753,27 +6935,23 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +@@ -5786,7 +6964,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)]; + test_array [0] = 0 + + ; +@@ -5794,50 +6972,49 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_hi=`expr '(' $ac_mid ')' - 1` +- if test $ac_mid -le $ac_hi; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid` ++ ac_hi=`expr '(' $ac_mid ')' - 1` ++ if test $ac_mid -le $ac_hi; then ++ ac_lo= ac_hi= ++ break ++ fi ++ ac_mid=`expr 2 '*' $ac_mid` + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_lo= ac_hi= ++ ac_lo= ac_hi= + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Binary search between lo and hi bounds. + while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` +@@ -5851,7 +7028,7 @@ $ac_includes_default + int + main () + { +-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; ++static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; + test_array [0] = 0 + + ; +@@ -5859,52 +7036,48 @@ test_array [0] = 0 + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_lo=`expr '(' $ac_mid ')' + 1` ++ ac_lo=`expr '(' $ac_mid ')' + 1` + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + case $ac_lo in + ?*) ac_cv_sizeof_long=$ac_lo;; +-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 ++'') if test "$ac_cv_type_long" = yes; then ++ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) + See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot compute sizeof (long), 77 ++$as_echo "$as_me: error: cannot compute sizeof (long) + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ;; ++ { (exit 77); exit 77; }; }; } ++ else ++ ac_cv_sizeof_long=0 ++ fi ;; + esac + else +- if test "$cross_compiling" = yes; then +- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } +-else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -5912,8 +7085,8 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default +-long longval () { return (long) (sizeof (long)); } +-unsigned long ulongval () { return (long) (sizeof (long)); } ++static long int longval () { return (long int) (sizeof (long)); } ++static unsigned long int ulongval () { return (long int) (sizeof (long)); } + #include + #include + int +@@ -5922,233 +7095,404 @@ main () + + FILE *f = fopen ("conftest.val", "w"); + if (! f) +- exit (1); +- if (((long) (sizeof (long))) < 0) ++ return 1; ++ if (((long int) (sizeof (long))) < 0) + { +- long i = longval (); +- if (i != ((long) (sizeof (long)))) +- exit (1); +- fprintf (f, "%ld\n", i); ++ long int i = longval (); ++ if (i != ((long int) (sizeof (long)))) ++ return 1; ++ fprintf (f, "%ld", i); + } + else + { +- unsigned long i = ulongval (); +- if (i != ((long) (sizeof (long)))) +- exit (1); +- fprintf (f, "%lu\n", i); ++ unsigned long int i = ulongval (); ++ if (i != ((long int) (sizeof (long)))) ++ return 1; ++ fprintf (f, "%lu", i); + } +- exit (ferror (f) || fclose (f) != 0); ++ /* Do not output a trailing newline, as this causes \r\n confusion ++ on some platforms. */ ++ return ferror (f) || fclose (f) != 0; + + ; + return 0; + } + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long=`cat conftest.val` + else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: program exited with status $ac_status" >&5 ++$as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ( exit $ac_status ) +-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 ++if test "$ac_cv_type_long" = yes; then ++ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) + See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot compute sizeof (long), 77 ++$as_echo "$as_me: error: cannot compute sizeof (long) + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } +-fi +-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++ { (exit 77); exit 77; }; }; } ++ else ++ ac_cv_sizeof_long=0 ++ fi + fi ++rm -rf conftest.dSYM ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + rm -f conftest.val +-else +- ac_cv_sizeof_long=0 + fi +-fi +-echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +-echo "${ECHO_T}$ac_cv_sizeof_long" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 ++$as_echo "$ac_cv_sizeof_long" >&6; } ++ ++ ++ + cat >>confdefs.h <<_ACEOF + #define SIZEOF_LONG $ac_cv_sizeof_long + _ACEOF + + + +-echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 ++ ++ { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 ++$as_echo_n "checking whether byte ordering is bigendian... " >&6; } + if test "${ac_cv_c_bigendian+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- # See if sys/param.h defines the BYTE_ORDER macro. +-cat >conftest.$ac_ext <<_ACEOF ++ ac_cv_c_bigendian=unknown ++ # See if we're dealing with a universal compiler. ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#ifndef __APPLE_CC__ ++ not a universal capable compiler ++ #endif ++ typedef int dummy; ++ ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ++ # Check for potential -arch flags. It is not universal unless ++ # there are some -arch flags. Note that *ppc* also matches ++ # ppc64. This check is also rather less than ideal. ++ case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( ++ *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; ++ esac ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ if test $ac_cv_c_bigendian = unknown; then ++ # See if sys/param.h defines the BYTE_ORDER macro. ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include +-#include ++ #include + + int + main () + { +-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +- bogus endian macros +-#endif ++#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ ++ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ ++ && LITTLE_ENDIAN) ++ bogus endian macros ++ #endif + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. +-cat >conftest.$ac_ext <<_ACEOF ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include +-#include ++ #include + + int + main () + { + #if BYTE_ORDER != BIG_ENDIAN +- not big endian +-#endif ++ not big endian ++ #endif + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_c_bigendian=no ++ ac_cv_c_bigendian=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-# It does not; compile a test program. +-if test "$cross_compiling" = yes; then +- # try to guess the endianness by grepping values into an object file +- ac_cv_c_bigendian=unknown +- cat >conftest.$ac_ext <<_ACEOF ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ fi ++ if test $ac_cv_c_bigendian = unknown; then ++ # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +-void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +-void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } ++#include ++ + int + main () + { +- _ascii (); _ebcdic (); ++#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) ++ bogus endian macros ++ #endif ++ + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ # It does; now see whether it defined to _BIG_ENDIAN or not. ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#include ++ ++int ++main () ++{ ++#ifndef _BIG_ENDIAN ++ not big endian ++ #endif ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_cv_c_bigendian=no + fi +-if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then +- if test "$ac_cv_c_bigendian" = unknown; then +- ac_cv_c_bigendian=no +- else +- # finding both strings is unlikely to happen, but who knows? +- ac_cv_c_bigendian=unknown +- fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ + fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ fi ++ if test $ac_cv_c_bigendian = unknown; then ++ # Compile a test program. ++ if test "$cross_compiling" = yes; then ++ # Try to guess by grepping values from an object file. ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++short int ascii_mm[] = ++ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; ++ short int ascii_ii[] = ++ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; ++ int use_ascii (int i) { ++ return ascii_mm[i] + ascii_ii[i]; ++ } ++ short int ebcdic_ii[] = ++ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; ++ short int ebcdic_mm[] = ++ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; ++ int use_ebcdic (int i) { ++ return ebcdic_mm[i] + ebcdic_ii[i]; ++ } ++ extern int foo; ++ ++int ++main () ++{ ++return use_ascii (foo) == use_ebcdic (foo); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ++ ac_cv_c_bigendian=yes ++ fi ++ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then ++ if test "$ac_cv_c_bigendian" = unknown; then ++ ac_cv_c_bigendian=no ++ else ++ # finding both strings is unlikely to happen, but who knows? ++ ac_cv_c_bigendian=unknown ++ fi ++ fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -6156,70 +7500,94 @@ _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ ++$ac_includes_default + int + main () + { +- /* Are we little or big endian? From Harbison&Steele. */ +- union +- { +- long l; +- char c[sizeof (long)]; +- } u; +- u.l = 1; +- exit (u.c[sizeof (long) - 1] == 1); ++ ++ /* Are we little or big endian? From Harbison&Steele. */ ++ union ++ { ++ long int l; ++ char c[sizeof (long int)]; ++ } u; ++ u.l = 1; ++ return u.c[sizeof (long int) - 1] == 1; ++ ++ ; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no + else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: program exited with status $ac_status" >&5 ++$as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ( exit $ac_status ) + ac_cv_c_bigendian=yes + fi +-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -rf conftest.dSYM ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi ++ ++ ++ fi + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +-echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +-case $ac_cv_c_bigendian in +- yes) +- ENDIAN=BIG +- ;; +- no) +- ENDIAN=LITTLE +- ;; +- *) +- { { echo "$as_me:$LINENO: error: unknown endianness +-presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +-echo "$as_me: error: unknown endianness +-presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 ++$as_echo "$ac_cv_c_bigendian" >&6; } ++ case $ac_cv_c_bigendian in #( ++ yes) ++ ENDIAN=BIG ++;; #( ++ no) ++ ENDIAN=LITTLE ++ ;; #( ++ universal) ++ ++cat >>confdefs.h <<\_ACEOF ++#define AC_APPLE_UNIVERSAL_BUILD 1 ++_ACEOF ++ ++ ;; #( ++ *) ++ { { $as_echo "$as_me:$LINENO: error: unknown endianness ++ presetting ac_cv_c_bigendian=no (or yes) will help" >&5 ++$as_echo "$as_me: error: unknown endianness ++ presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +-esac ++ esac + + + + + + # libtool stuff +-# Check whether --enable-shared or --disable-shared was given. ++# Check whether --enable-shared was given. + if test "${enable_shared+set}" = set; then +- enableval="$enable_shared" +- p=${PACKAGE-default} ++ enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; +@@ -6238,12 +7606,12 @@ if test "${enable_shared+set}" = set; then + esac + else + enable_shared=yes +-fi; ++fi + +-# Check whether --enable-static or --disable-static was given. ++ ++# Check whether --enable-static was given. + if test "${enable_static+set}" = set; then +- enableval="$enable_static" +- p=${PACKAGE-default} ++ enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; +@@ -6262,12 +7630,12 @@ if test "${enable_static+set}" = set; then + esac + else + enable_static=yes +-fi; ++fi + +-# Check whether --enable-fast-install or --disable-fast-install was given. ++ ++# Check whether --enable-fast-install was given. + if test "${enable_fast_install+set}" = set; then +- enableval="$enable_fast_install" +- p=${PACKAGE-default} ++ enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; +@@ -6286,66 +7654,96 @@ if test "${enable_fast_install+set}" = set; then + esac + else + enable_fast_install=yes +-fi; ++fi ++ + + # Make sure we can run config.sub. +-$ac_config_sub sun4 >/dev/null 2>&1 || +- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +-echo "$as_me: error: cannot run $ac_config_sub" >&2;} ++$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || ++ { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 ++$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +-echo "$as_me:$LINENO: checking build system type" >&5 +-echo $ECHO_N "checking build system type... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking build system type" >&5 ++$as_echo_n "checking build system type... " >&6; } + if test "${ac_cv_build+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- ac_cv_build_alias=$build_alias +-test -z "$ac_cv_build_alias" && +- ac_cv_build_alias=`$ac_config_guess` +-test -z "$ac_cv_build_alias" && +- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +-echo "$as_me: error: cannot guess build type; you must specify one" >&2;} ++ ac_build_alias=$build_alias ++test "x$ac_build_alias" = x && ++ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` ++test "x$ac_build_alias" = x && ++ { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 ++$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || +- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} ++ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || ++ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 ++$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + + fi +-echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +-echo "${ECHO_T}$ac_cv_build" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 ++$as_echo "$ac_cv_build" >&6; } ++case $ac_cv_build in ++*-*-*) ;; ++*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 ++$as_echo "$as_me: error: invalid value of canonical build" >&2;} ++ { (exit 1); exit 1; }; };; ++esac + build=$ac_cv_build +-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++ac_save_IFS=$IFS; IFS='-' ++set x $ac_cv_build ++shift ++build_cpu=$1 ++build_vendor=$2 ++shift; shift ++# Remember, the first character of IFS is used to create $*, ++# except with old shells: ++build_os=$* ++IFS=$ac_save_IFS ++case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +-echo "$as_me:$LINENO: checking host system type" >&5 +-echo $ECHO_N "checking host system type... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking host system type" >&5 ++$as_echo_n "checking host system type... " >&6; } + if test "${ac_cv_host+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- ac_cv_host_alias=$host_alias +-test -z "$ac_cv_host_alias" && +- ac_cv_host_alias=$ac_cv_build_alias +-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || +- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} ++ if test "x$host_alias" = x; then ++ ac_cv_host=$ac_cv_build ++else ++ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || ++ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 ++$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } ++fi + + fi +-echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +-echo "${ECHO_T}$ac_cv_host" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 ++$as_echo "$ac_cv_host" >&6; } ++case $ac_cv_host in ++*-*-*) ;; ++*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 ++$as_echo "$as_me: error: invalid value of canonical host" >&2;} ++ { (exit 1); exit 1; }; };; ++esac + host=$ac_cv_host +-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++ac_save_IFS=$IFS; IFS='-' ++set x $ac_cv_host ++shift ++host_cpu=$1 ++host_vendor=$2 ++shift; shift ++# Remember, the first character of IFS is used to create $*, ++# except with old shells: ++host_os=$* ++IFS=$ac_save_IFS ++case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +-echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 ++$as_echo_n "checking for a sed that does not truncate output... " >&6; } + if test "${lt_cv_path_SED+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + # Loop through the user's path and test for sed and gsed. + # Then use that list of sed's as ones to test for truncation. +@@ -6398,22 +7796,22 @@ fi + + SED=$lt_cv_path_SED + +-echo "$as_me:$LINENO: result: $SED" >&5 +-echo "${ECHO_T}$SED" >&6 ++{ $as_echo "$as_me:$LINENO: result: $SED" >&5 ++$as_echo "$SED" >&6; } + + +-# Check whether --with-gnu-ld or --without-gnu-ld was given. ++# Check whether --with-gnu-ld was given. + if test "${with_gnu_ld+set}" = set; then +- withval="$with_gnu_ld" +- test "$withval" = no || with_gnu_ld=yes ++ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + else + with_gnu_ld=no +-fi; ++fi ++ + ac_prog=ld + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. +- echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 ++$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw +@@ -6442,14 +7840,14 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + ;; + esac + elif test "$with_gnu_ld" = yes; then +- echo "$as_me:$LINENO: checking for GNU ld" >&5 +-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 ++$as_echo_n "checking for GNU ld... " >&6; } + else +- echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 ++$as_echo_n "checking for non-GNU ld... " >&6; } + fi + if test "${lt_cv_path_LD+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +@@ -6479,19 +7877,19 @@ fi + + LD="$lt_cv_path_LD" + if test -n "$LD"; then +- echo "$as_me:$LINENO: result: $LD" >&5 +-echo "${ECHO_T}$LD" >&6 ++ { $as_echo "$as_me:$LINENO: result: $LD" >&5 ++$as_echo "$LD" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi +-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} ++test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 ++$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 ++$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } + if test "${lt_cv_prog_gnu_ld+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + # I'd rather use --version here, but apparently some GNU lds only accept -v. + case `$LD -v 2>&1 &1 &5 +-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 ++$as_echo "$lt_cv_prog_gnu_ld" >&6; } + with_gnu_ld=$lt_cv_prog_gnu_ld + + +-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 ++$as_echo_n "checking for $LD option to reload object files... " >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_ld_reload_flag='-r' + fi +-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 ++$as_echo "$lt_cv_ld_reload_flag" >&6; } + reload_flag=$lt_cv_ld_reload_flag + case $reload_flag in + "" | " "*) ;; +@@ -6533,10 +7931,10 @@ case $host_os in + ;; + esac + +-echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 ++$as_echo_n "checking for BSD-compatible nm... " >&6; } + if test "${lt_cv_path_NM+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$NM"; then + # Let the user override the test. +@@ -6582,25 +7980,25 @@ else + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm + fi + fi +-echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +-echo "${ECHO_T}$lt_cv_path_NM" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 ++$as_echo "$lt_cv_path_NM" >&6; } + NM="$lt_cv_path_NM" + +-echo "$as_me:$LINENO: checking whether ln -s works" >&5 +-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 ++$as_echo_n "checking whether ln -s works... " >&6; } + LN_S=$as_ln_s + if test "$LN_S" = "ln -s"; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++ { $as_echo "$as_me:$LINENO: result: yes" >&5 ++$as_echo "yes" >&6; } + else +- echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +-echo "${ECHO_T}no, using $LN_S" >&6 ++ { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 ++$as_echo "no, using $LN_S" >&6; } + fi + +-echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 +-echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 ++$as_echo_n "checking how to recognise dependent libraries... " >&6; } + if test "${lt_cv_deplibs_check_method+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_file_magic_cmd='$MAGIC_CMD' + lt_cv_file_magic_test_file= +@@ -6773,8 +8171,8 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + esac + + fi +-echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 ++$as_echo "$lt_cv_deplibs_check_method" >&6; } + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6791,11 +8189,11 @@ LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. + compiler=$CC + +-# Check whether --enable-libtool-lock or --disable-libtool-lock was given. ++# Check whether --enable-libtool-lock was given. + if test "${enable_libtool_lock+set}" = set; then +- enableval="$enable_libtool_lock" ++ enableval=$enable_libtool_lock; ++fi + +-fi; + test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + + # Some flags need to be propagated to the compiler or linker for good +@@ -6807,7 +8205,7 @@ ia64-*-hpux*) + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) +@@ -6822,11 +8220,11 @@ ia64-*-hpux*) + ;; + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 6825 "configure"' > conftest.$ac_ext ++ echo '#line 8223 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in +@@ -6863,7 +8261,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) +@@ -6907,10 +8305,10 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" +- echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 ++$as_echo_n "checking whether the C compiler needs -belf... " >&6; } + if test "${lt_cv_cc_needs_belf+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -6934,35 +8332,36 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + lt_cv_cc_needs_belf=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-lt_cv_cc_needs_belf=no ++ lt_cv_cc_needs_belf=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -6971,8 +8370,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + fi +-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 ++$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" +@@ -6984,7 +8383,7 @@ sparc*-*solaris*) + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) +@@ -7007,19 +8406,21 @@ need_locks="$enable_libtool_lock" + + for ac_header in dlfcn.h + do +-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if eval "test \"\${$as_ac_Header+set}\" = set"; then +- echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 ++$as_echo_n "checking for $ac_header... " >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ $as_echo_n "(cached) " >&6 + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval 'as_val=${'$as_ac_Header'} ++ $as_echo "$as_val"'` ++ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } + else + # Is the header compilable? +-echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 ++$as_echo_n "checking $ac_header usability... " >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -7030,41 +8431,38 @@ $ac_includes_default + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_header_compiler=no ++ ac_header_compiler=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ++$as_echo "$ac_header_compiler" >&6; } + + # Is the header present? +-echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 ++$as_echo_n "checking $ac_header presence... " >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -7073,101 +8471,107 @@ cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <$ac_header> + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + ac_header_preproc=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no + fi ++ + rm -f conftest.err conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ++$as_echo "$ac_header_preproc" >&6; } + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 ++$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 ++$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( +- cat <<\_ASBOX ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 ++$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 ++$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 ++$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 ++$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ++$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 ++$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ++ ( cat <<\_ASBOX + ## ------------------------------------- ## + ## Report this to eddie.wai@broadcom.com ## + ## ------------------------------------- ## + _ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; + esac +-echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 ++$as_echo_n "checking for $ac_header... " >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ $as_echo_n "(cached) " >&6 + else + eval "$as_ac_Header=\$ac_header_preproc" + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval 'as_val=${'$as_ac_Header'} ++ $as_echo "$as_val"'` ++ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } + + fi +-if test `eval echo '${'$as_ac_Header'}'` = yes; then ++as_val=`eval 'as_val=${'$as_ac_Header'} ++ $as_echo "$as_val"'` ++ if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + + fi + + done + +-ac_ext=cc ++ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +-if test -n "$ac_tool_prefix"; then +- for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC ++if test -z "$CXX"; then ++ if test -n "$CCC"; then ++ CXX=$CCC ++ else ++ if test -n "$ac_tool_prefix"; then ++ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_CXX+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +@@ -7178,38 +8582,40 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + CXX=$ac_cv_prog_CXX + if test -n "$CXX"; then +- echo "$as_me:$LINENO: result: $CXX" >&5 +-echo "${ECHO_T}$CXX" >&6 ++ { $as_echo "$as_me:$LINENO: result: $CXX" >&5 ++$as_echo "$CXX" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + test -n "$CXX" && break + done + fi + if test -z "$CXX"; then + ac_ct_CXX=$CXX +- for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC ++ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +@@ -7220,57 +8626,87 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + ac_ct_CXX=$ac_cv_prog_ac_ct_CXX + if test -n "$ac_ct_CXX"; then +- echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +-echo "${ECHO_T}$ac_ct_CXX" >&6 ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 ++$as_echo "$ac_ct_CXX" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + test -n "$ac_ct_CXX" && break + done +-test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + +- CXX=$ac_ct_CXX ++ if test "x$ac_ct_CXX" = x; then ++ CXX="g++" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ CXX=$ac_ct_CXX ++ fi + fi + +- ++ fi ++fi + # Provide some information about the compiler. +-echo "$as_me:$LINENO:" \ +- "checking for C++ compiler version" >&5 +-ac_compiler=`set X $ac_compile; echo $2` +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 +- (eval $ac_compiler --version &5) 2>&5 ++$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ++set X $ac_compile ++ac_compiler=$2 ++{ (ac_try="$ac_compiler --version >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 +- (eval $ac_compiler -v &5) 2>&5 ++{ (ac_try="$ac_compiler -v >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 +- (eval $ac_compiler -V &5) 2>&5 ++{ (ac_try="$ac_compiler -V >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +-echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 ++$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } + if test "${ac_cv_cxx_compiler_gnu+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -7291,50 +8727,54 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_compiler_gnu=no ++ ac_compiler_gnu=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + + fi +-echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +-GXX=`test $ac_compiler_gnu = yes && echo yes` ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 ++$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } ++if test $ac_compiler_gnu = yes; then ++ GXX=yes ++else ++ GXX= ++fi + ac_test_CXXFLAGS=${CXXFLAGS+set} + ac_save_CXXFLAGS=$CXXFLAGS +-CXXFLAGS="-g" +-echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 ++$as_echo_n "checking whether $CXX accepts -g... " >&6; } + if test "${ac_cv_prog_cxx_g+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_save_cxx_werror_flag=$ac_cxx_werror_flag ++ ac_cxx_werror_flag=yes ++ ac_cv_prog_cxx_g=no ++ CXXFLAGS="-g" ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -7350,38 +8790,121 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_prog_cxx_g=yes ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ CXXFLAGS="" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_cxx_werror_flag=$ac_save_cxx_werror_flag ++ CXXFLAGS="-g" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_prog_cxx_g=no ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_cxx_werror_flag=$ac_save_cxx_werror_flag + fi +-echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 ++$as_echo "$ac_cv_prog_cxx_g" >&6; } + if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS + elif test $ac_cv_prog_cxx_g = yes; then +@@ -7397,113 +8920,7 @@ else + CXXFLAGS= + fi + fi +-for ac_declaration in \ +- '' \ +- 'extern "C" void std::exit (int) throw (); using std::exit;' \ +- 'extern "C" void std::exit (int); using std::exit;' \ +- 'extern "C" void exit (int) throw ();' \ +- 'extern "C" void exit (int);' \ +- 'void exit (int);' +-do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_declaration +-#include +-int +-main () +-{ +-exit (42); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-continue +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_declaration +-int +-main () +-{ +-exit (42); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- break +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-rm -f conftest* +-if test -n "$ac_declaration"; then +- echo '#ifdef __cplusplus' >>confdefs.h +- echo $ac_declaration >>confdefs.h +- echo '#endif' >>confdefs.h +-fi +- +-ac_ext=cc ++ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +@@ -7511,10 +8928,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + depcc="$CXX" am_compiler_list= + +-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 ++$as_echo_n "checking dependency style of $depcc... " >&6; } + if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up +@@ -7601,8 +9018,8 @@ else + fi + + fi +-echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +-echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 ++{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 ++$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } + CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + +@@ -7623,16 +9040,16 @@ fi + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then +- ac_ext=cc ++ ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +-echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +-echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 ++$as_echo_n "checking how to run the C++ preprocessor... " >&6; } + if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" +@@ -7659,35 +9076,35 @@ cat >>conftest.$ac_ext <<_ACEOF + #endif + Syntax error + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_cxx_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ }; then + : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. + continue + fi ++ + rm -f conftest.err conftest.$ac_ext + +- # OK, works on sane cases. Now check whether non-existent headers ++ # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -7697,34 +9114,34 @@ cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_cxx_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ }; then + # Broken: success on invalid input. + continue + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. + ac_preproc_ok=: + break + fi ++ + rm -f conftest.err conftest.$ac_ext + + done +@@ -7742,8 +9159,8 @@ fi + else + ac_cv_prog_CXXCPP=$CXXCPP + fi +-echo "$as_me:$LINENO: result: $CXXCPP" >&5 +-echo "${ECHO_T}$CXXCPP" >&6 ++{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 ++$as_echo "$CXXCPP" >&6; } + ac_preproc_ok=false + for ac_cxx_preproc_warn_flag in '' yes + do +@@ -7766,35 +9183,35 @@ cat >>conftest.$ac_ext <<_ACEOF + #endif + Syntax error + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_cxx_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ }; then + : + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. + continue + fi ++ + rm -f conftest.err conftest.$ac_ext + +- # OK, works on sane cases. Now check whether non-existent headers ++ # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -7804,34 +9221,34 @@ cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_cxx_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ }; then + # Broken: success on invalid input. + continue + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. + ac_preproc_ok=: + break + fi ++ + rm -f conftest.err conftest.$ac_ext + + done +@@ -7840,14 +9257,16 @@ rm -f conftest.err conftest.$ac_ext + if $ac_preproc_ok; then + : + else +- { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check ++ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check + See \`config.log' for more details." >&5 +-echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check ++$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ { (exit 1); exit 1; }; }; } + fi + +-ac_ext=cc ++ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +@@ -7861,14 +9280,14 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' + ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_f77_compiler_gnu + if test -n "$ac_tool_prefix"; then +- for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran ++ for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_F77+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +@@ -7879,38 +9298,40 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + F77=$ac_cv_prog_F77 + if test -n "$F77"; then +- echo "$as_me:$LINENO: result: $F77" >&5 +-echo "${ECHO_T}$F77" >&6 ++ { $as_echo "$as_me:$LINENO: result: $F77" >&5 ++$as_echo "$F77" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + test -n "$F77" && break + done + fi + if test -z "$F77"; then + ac_ct_F77=$F77 +- for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran ++ for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_F77+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +@@ -7921,50 +9342,80 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_F77="$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + ac_ct_F77=$ac_cv_prog_ac_ct_F77 + if test -n "$ac_ct_F77"; then +- echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +-echo "${ECHO_T}$ac_ct_F77" >&6 ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 ++$as_echo "$ac_ct_F77" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + test -n "$ac_ct_F77" && break + done + +- F77=$ac_ct_F77 ++ if test "x$ac_ct_F77" = x; then ++ F77="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ F77=$ac_ct_F77 ++ fi + fi + + + # Provide some information about the compiler. +-echo "$as_me:7951:" \ +- "checking for Fortran 77 compiler version" >&5 +-ac_compiler=`set X $ac_compile; echo $2` +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 +- (eval $ac_compiler --version &5) 2>&5 ++$as_echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ++set X $ac_compile ++ac_compiler=$2 ++{ (ac_try="$ac_compiler --version >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 +- (eval $ac_compiler -v &5) 2>&5 ++{ (ac_try="$ac_compiler -v >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 +- (eval $ac_compiler -V &5) 2>&5 ++{ (ac_try="$ac_compiler -V >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + rm -f a.out + +@@ -7972,10 +9423,10 @@ rm -f a.out + # input file. (Note that this only needs to work for GNU compilers.) + ac_save_ext=$ac_ext + ac_ext=F +-echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +-echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 ++$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } + if test "${ac_cv_f77_compiler_gnu+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + program main +@@ -7986,48 +9437,45 @@ else + end + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_f77_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_f77_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_compiler_gnu=no ++ ac_compiler_gnu=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_f77_compiler_gnu=$ac_compiler_gnu + + fi +-echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +-echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 ++$as_echo "$ac_cv_f77_compiler_gnu" >&6; } + ac_ext=$ac_save_ext + ac_test_FFLAGS=${FFLAGS+set} + ac_save_FFLAGS=$FFLAGS + FFLAGS= +-echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +-echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 ++$as_echo_n "checking whether $F77 accepts -g... " >&6; } + if test "${ac_cv_prog_f77_g+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + FFLAGS=-g + cat >conftest.$ac_ext <<_ACEOF +@@ -8036,39 +9484,36 @@ cat >conftest.$ac_ext <<_ACEOF + end + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_f77_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_f77_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_prog_f77_g=no ++ ac_cv_prog_f77_g=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi +-echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +-echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 ++$as_echo "$ac_cv_prog_f77_g" >&6; } + if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS + elif test $ac_cv_prog_f77_g = yes; then +@@ -8085,7 +9530,11 @@ else + fi + fi + +-G77=`test $ac_compiler_gnu = yes && echo yes` ++if test $ac_compiler_gnu = yes; then ++ G77=yes ++else ++ G77= ++fi + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +@@ -8097,10 +9546,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + + # find the maximum length of command line arguments +-echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 ++$as_echo_n "checking the maximum length of command line arguments... " >&6; } + if test "${lt_cv_sys_max_cmd_len+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + i=0 + teststring="ABCD" +@@ -8206,21 +9655,21 @@ else + fi + + if test -n $lt_cv_sys_max_cmd_len ; then +- echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 ++ { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 ++$as_echo "$lt_cv_sys_max_cmd_len" >&6; } + else +- echo "$as_me:$LINENO: result: none" >&5 +-echo "${ECHO_T}none" >&6 ++ { $as_echo "$as_me:$LINENO: result: none" >&5 ++$as_echo "none" >&6; } + fi + + + + + # Check for command to grab the raw symbol name followed by C symbol from nm. +-echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +-echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 ++$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } + if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + + # These are sane defaults that work on at least a few old systems. +@@ -8325,14 +9774,14 @@ EOF + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then +@@ -8387,7 +9836,7 @@ EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +@@ -8422,17 +9871,17 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= + fi + if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then +- echo "$as_me:$LINENO: result: failed" >&5 +-echo "${ECHO_T}failed" >&6 ++ { $as_echo "$as_me:$LINENO: result: failed" >&5 ++$as_echo "failed" >&6; } + else +- echo "$as_me:$LINENO: result: ok" >&5 +-echo "${ECHO_T}ok" >&6 ++ { $as_echo "$as_me:$LINENO: result: ok" >&5 ++$as_echo "ok" >&6; } + fi + +-echo "$as_me:$LINENO: checking for objdir" >&5 +-echo $ECHO_N "checking for objdir... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 ++$as_echo_n "checking for objdir... " >&6; } + if test "${lt_cv_objdir+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null +@@ -8444,8 +9893,8 @@ else + fi + rmdir .libs 2>/dev/null + fi +-echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +-echo "${ECHO_T}$lt_cv_objdir" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 ++$as_echo "$lt_cv_objdir" >&6; } + objdir=$lt_cv_objdir + + +@@ -8496,10 +9945,10 @@ with_gnu_ld="$lt_cv_prog_gnu_ld" + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. + set dummy ${ac_tool_prefix}ar; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_AR+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +@@ -8510,34 +9959,36 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + AR=$ac_cv_prog_AR + if test -n "$AR"; then +- echo "$as_me:$LINENO: result: $AR" >&5 +-echo "${ECHO_T}$AR" >&6 ++ { $as_echo "$as_me:$LINENO: result: $AR" >&5 ++$as_echo "$AR" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. + set dummy ar; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +@@ -8548,27 +9999,37 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" + fi + fi + ac_ct_AR=$ac_cv_prog_ac_ct_AR + if test -n "$ac_ct_AR"; then +- echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +-echo "${ECHO_T}$ac_ct_AR" >&6 ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 ++$as_echo "$ac_ct_AR" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + +- AR=$ac_ct_AR ++ if test "x$ac_ct_AR" = x; then ++ AR="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ AR=$ac_ct_AR ++ fi + else + AR="$ac_cv_prog_AR" + fi +@@ -8576,10 +10037,10 @@ fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. + set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_RANLIB+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +@@ -8590,34 +10051,36 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + RANLIB=$ac_cv_prog_RANLIB + if test -n "$RANLIB"; then +- echo "$as_me:$LINENO: result: $RANLIB" >&5 +-echo "${ECHO_T}$RANLIB" >&6 ++ { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 ++$as_echo "$RANLIB" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +@@ -8628,27 +10091,37 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" + fi + fi + ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB + if test -n "$ac_ct_RANLIB"; then +- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +-echo "${ECHO_T}$ac_ct_RANLIB" >&6 ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 ++$as_echo "$ac_ct_RANLIB" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + +- RANLIB=$ac_ct_RANLIB ++ if test "x$ac_ct_RANLIB" = x; then ++ RANLIB=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ RANLIB=$ac_ct_RANLIB ++ fi + else + RANLIB="$ac_cv_prog_RANLIB" + fi +@@ -8656,10 +10129,10 @@ fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_STRIP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +@@ -8670,34 +10143,36 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + STRIP=$ac_cv_prog_STRIP + if test -n "$STRIP"; then +- echo "$as_me:$LINENO: result: $STRIP" >&5 +-echo "${ECHO_T}$STRIP" >&6 ++ { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 ++$as_echo "$STRIP" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +@@ -8708,27 +10183,37 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" + fi + fi + ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP + if test -n "$ac_ct_STRIP"; then +- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +-echo "${ECHO_T}$ac_ct_STRIP" >&6 ++ { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 ++$as_echo "$ac_ct_STRIP" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + +- STRIP=$ac_ct_STRIP ++ if test "x$ac_ct_STRIP" = x; then ++ STRIP=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ STRIP=$ac_ct_STRIP ++ fi + else + STRIP="$ac_cv_prog_STRIP" + fi +@@ -8787,10 +10272,10 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + case $deplibs_check_method in + file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then +- echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 ++$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } + if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + case $MAGIC_CMD in + [\\/*] | ?:[\\/]*) +@@ -8840,19 +10325,19 @@ fi + + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if test -n "$MAGIC_CMD"; then +- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +-echo "${ECHO_T}$MAGIC_CMD" >&6 ++ { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 ++$as_echo "$MAGIC_CMD" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then +- echo "$as_me:$LINENO: checking for file" >&5 +-echo $ECHO_N "checking for file... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for file" >&5 ++$as_echo_n "checking for file... " >&6; } + if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + case $MAGIC_CMD in + [\\/*] | ?:[\\/]*) +@@ -8902,11 +10387,11 @@ fi + + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if test -n "$MAGIC_CMD"; then +- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +-echo "${ECHO_T}$MAGIC_CMD" >&6 ++ { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 ++$as_echo "$MAGIC_CMD" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + + else +@@ -8921,21 +10406,21 @@ esac + enable_dlopen=yes + enable_win32_dll=no + +-# Check whether --enable-libtool-lock or --disable-libtool-lock was given. ++# Check whether --enable-libtool-lock was given. + if test "${enable_libtool_lock+set}" = set; then +- enableval="$enable_libtool_lock" ++ enableval=$enable_libtool_lock; ++fi + +-fi; + test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + + +-# Check whether --with-pic or --without-pic was given. ++# Check whether --with-pic was given. + if test "${with_pic+set}" = set; then +- withval="$with_pic" +- pic_mode="$withval" ++ withval=$with_pic; pic_mode="$withval" + else + pic_mode=default +-fi; ++fi ++ + test -z "$pic_mode" && pic_mode=default + + # Use C for the default configuration in the libtool script +@@ -8993,10 +10478,10 @@ if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +-echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 ++$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } + if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext +@@ -9011,11 +10496,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:9014: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:10499: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:9018: \$? = $ac_status" >&5 ++ echo "$as_me:10503: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -9028,8 +10513,8 @@ else + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 ++$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + + if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +@@ -9043,8 +10528,8 @@ lt_prog_compiler_wl= + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -9253,18 +10738,18 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + esac + fi + +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 ++$as_echo "$lt_prog_compiler_pic" >&6; } + + # + # Check to make sure the PIC flag actually works. + # + if test -n "$lt_prog_compiler_pic"; then + +-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 ++$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } + if test "${lt_prog_compiler_pic_works+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext +@@ -9279,11 +10764,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:9282: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:10767: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:9286: \$? = $ac_status" >&5 ++ echo "$as_me:10771: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -9296,8 +10781,8 @@ else + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 ++$as_echo "$lt_prog_compiler_pic_works" >&6; } + + if test x"$lt_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in +@@ -9324,10 +10809,10 @@ esac + # Check to make sure the static flag actually works. + # + wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 ++$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } + if test "${lt_prog_compiler_static_works+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" +@@ -9352,8 +10837,8 @@ else + LDFLAGS="$save_LDFLAGS" + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +-echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 ++$as_echo "$lt_prog_compiler_static_works" >&6; } + + if test x"$lt_prog_compiler_static_works" = xyes; then + : +@@ -9362,10 +10847,10 @@ else + fi + + +-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ++$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } + if test "${lt_cv_prog_compiler_c_o+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null +@@ -9383,11 +10868,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:9386: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:10871: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:9390: \$? = $ac_status" >&5 ++ echo "$as_me:10875: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -9409,34 +10894,34 @@ else + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 ++$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user +- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ++$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no +- echo "$as_me:$LINENO: result: $hard_links" >&5 +-echo "${ECHO_T}$hard_links" >&6 ++ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 ++$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then +- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 ++$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi + else + need_locks=no + fi + +-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= +@@ -9851,27 +11336,26 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'` +@@ -9879,11 +11363,14 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File S + if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'`; fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -9912,27 +11399,26 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'` +@@ -9940,11 +11426,14 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File S + if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'`; fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -10393,8 +11882,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + fi + +-echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +-echo "${ECHO_T}$ld_shlibs" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 ++$as_echo "$ld_shlibs" >&6; } + test "$ld_shlibs" = no && can_build_shared=no + + # +@@ -10414,15 +11903,15 @@ x|xyes) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. +- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ++$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest +@@ -10440,7 +11929,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no +@@ -10452,16 +11941,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& + cat conftest.err 1>&5 + fi + $rm conftest* +- echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +-echo "${ECHO_T}$archive_cmds_need_lc" >&6 ++ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 ++$as_echo "$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; + esac + +-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ++$as_echo_n "checking dynamic linker characteristics... " >&6; } + library_names_spec= + libname_spec='lib$name' + soname_spec= +@@ -10852,11 +12341,11 @@ linux*) + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) +- echo '#line 10855 "configure"' > conftest.$ac_ext ++ echo '#line 12344 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) +@@ -11069,8 +12558,8 @@ uts4*) + dynamic_linker=no + ;; + esac +-echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +-echo "${ECHO_T}$dynamic_linker" >&6 ++{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ++$as_echo "$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no + + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +@@ -11078,8 +12567,8 @@ if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + fi + +-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ++$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + hardcode_action= + if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ +@@ -11103,8 +12592,8 @@ else + # directories. + hardcode_action=unsupported + fi +-echo "$as_me:$LINENO: result: $hardcode_action" >&5 +-echo "${ECHO_T}$hardcode_action" >&6 ++{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 ++$as_echo "$hardcode_action" >&6; } + + if test "$hardcode_action" = relink; then + # Fast installation is not supported +@@ -11117,29 +12606,29 @@ fi + + striplib= + old_striplib= +-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 ++$as_echo_n "checking whether stripping libraries is possible... " >&6; } + if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++ { $as_echo "$as_me:$LINENO: result: yes" >&5 ++$as_echo "yes" >&6; } + else + # FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++ { $as_echo "$as_me:$LINENO: result: yes" >&5 ++$as_echo "yes" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi + ;; + *) +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + ;; + esac + fi +@@ -11171,10 +12660,10 @@ else + + darwin*) + # if libdl is installed we need to link against it +- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 ++$as_echo_n "checking for dlopen in -ldl... " >&6; } + if test "${ac_cv_lib_dl_dlopen+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldl $LIBS" +@@ -11185,57 +12674,58 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char dlopen (); + int + main () + { +-dlopen (); ++return dlopen (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_lib_dl_dlopen=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_dl_dlopen=no ++ ac_cv_lib_dl_dlopen=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +-if test $ac_cv_lib_dl_dlopen = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 ++$as_echo "$ac_cv_lib_dl_dlopen" >&6; } ++if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + else + +@@ -11248,10 +12738,10 @@ fi + ;; + + *) +- echo "$as_me:$LINENO: checking for shl_load" >&5 +-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 ++$as_echo_n "checking for shl_load... " >&6; } + if test "${ac_cv_func_shl_load+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -11276,75 +12766,70 @@ cat >>conftest.$ac_ext <<_ACEOF + + #undef shl_load + +-/* Override any gcc2 internal prototype to avoid an error. */ +-#ifdef __cplusplus +-extern "C" +-{ +-#endif +-/* We use char because int might match the return type of a gcc2 ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif + char shl_load (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_shl_load) || defined (__stub___shl_load) ++#if defined __stub_shl_load || defined __stub___shl_load + choke me +-#else +-char (*f) () = shl_load; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != shl_load; ++return shl_load (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_func_shl_load=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_func_shl_load=no ++ ac_cv_func_shl_load=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +-echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +-if test $ac_cv_func_shl_load = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 ++$as_echo "$ac_cv_func_shl_load" >&6; } ++if test "x$ac_cv_func_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" + else +- echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 ++$as_echo_n "checking for shl_load in -ldld... " >&6; } + if test "${ac_cv_lib_dld_shl_load+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldld $LIBS" +@@ -11355,63 +12840,64 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char shl_load (); + int + main () + { +-shl_load (); ++return shl_load (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_lib_dld_shl_load=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_dld_shl_load=no ++ ac_cv_lib_dld_shl_load=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +-if test $ac_cv_lib_dld_shl_load = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 ++$as_echo "$ac_cv_lib_dld_shl_load" >&6; } ++if test "x$ac_cv_lib_dld_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" + else +- echo "$as_me:$LINENO: checking for dlopen" >&5 +-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 ++$as_echo_n "checking for dlopen... " >&6; } + if test "${ac_cv_func_dlopen+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -11436,75 +12922,70 @@ cat >>conftest.$ac_ext <<_ACEOF + + #undef dlopen + +-/* Override any gcc2 internal prototype to avoid an error. */ +-#ifdef __cplusplus +-extern "C" +-{ +-#endif +-/* We use char because int might match the return type of a gcc2 ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif + char dlopen (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_dlopen) || defined (__stub___dlopen) ++#if defined __stub_dlopen || defined __stub___dlopen + choke me +-#else +-char (*f) () = dlopen; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != dlopen; ++return dlopen (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_func_dlopen=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_func_dlopen=no ++ ac_cv_func_dlopen=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +-if test $ac_cv_func_dlopen = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 ++$as_echo "$ac_cv_func_dlopen" >&6; } ++if test "x$ac_cv_func_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" + else +- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 ++$as_echo_n "checking for dlopen in -ldl... " >&6; } + if test "${ac_cv_lib_dl_dlopen+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldl $LIBS" +@@ -11515,63 +12996,64 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char dlopen (); + int + main () + { +-dlopen (); ++return dlopen (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_lib_dl_dlopen=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_dl_dlopen=no ++ ac_cv_lib_dl_dlopen=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +-if test $ac_cv_lib_dl_dlopen = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 ++$as_echo "$ac_cv_lib_dl_dlopen" >&6; } ++if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + else +- echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 ++$as_echo_n "checking for dlopen in -lsvld... " >&6; } + if test "${ac_cv_lib_svld_dlopen+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lsvld $LIBS" +@@ -11582,63 +13064,64 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char dlopen (); + int + main () + { +-dlopen (); ++return dlopen (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_lib_svld_dlopen=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_svld_dlopen=no ++ ac_cv_lib_svld_dlopen=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +-if test $ac_cv_lib_svld_dlopen = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 ++$as_echo "$ac_cv_lib_svld_dlopen" >&6; } ++if test "x$ac_cv_lib_svld_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + else +- echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 ++$as_echo_n "checking for dld_link in -ldld... " >&6; } + if test "${ac_cv_lib_dld_dld_link+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldld $LIBS" +@@ -11649,57 +13132,58 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char dld_link (); + int + main () + { +-dld_link (); ++return dld_link (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_lib_dld_dld_link=yes + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_dld_dld_link=no ++ ac_cv_lib_dld_dld_link=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +-if test $ac_cv_lib_dld_dld_link = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 ++$as_echo "$ac_cv_lib_dld_dld_link" >&6; } ++if test "x$ac_cv_lib_dld_dld_link" = x""yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" + fi + +@@ -11738,10 +13222,10 @@ fi + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + +- echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 ++$as_echo_n "checking whether a program can dlopen itself... " >&6; } + if test "${lt_cv_dlopen_self+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +@@ -11749,7 +13233,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <&5 + (eval $ac_link) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? +@@ -11833,15 +13317,15 @@ rm -fr conftest* + + + fi +-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +-echo "${ECHO_T}$lt_cv_dlopen_self" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 ++$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" +- echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 ++$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } + if test "${lt_cv_dlopen_self_static+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +@@ -11849,7 +13333,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <&5 + (eval $ac_link) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? +@@ -11933,8 +13417,8 @@ rm -fr conftest* + + + fi +-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 ++$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" +@@ -11956,13 +13440,13 @@ fi + + + # Report which library types will actually be built +-echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +-echo "$as_me:$LINENO: result: $can_build_shared" >&5 +-echo "${ECHO_T}$can_build_shared" >&6 ++{ $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 ++$as_echo_n "checking if libtool supports shared libraries... " >&6; } ++{ $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 ++$as_echo "$can_build_shared" >&6; } + +-echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 ++$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and +@@ -11982,15 +13466,15 @@ aix4* | aix5*) + fi + ;; + esac +-echo "$as_me:$LINENO: result: $enable_shared" >&5 +-echo "${ECHO_T}$enable_shared" >&6 ++{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 ++$as_echo "$enable_shared" >&6; } + +-echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 ++$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes +-echo "$as_me:$LINENO: result: $enable_static" >&5 +-echo "${ECHO_T}$enable_static" >&6 ++{ $as_echo "$as_me:$LINENO: result: $enable_static" >&5 ++$as_echo "$enable_static" >&6; } + + # The else clause should only fire when bootstrapping the + # libtool distribution, otherwise you forgot to ship ltmain.sh +@@ -12081,8 +13565,8 @@ if test -f "$ltmain"; then + cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" +- { echo "$as_me:$LINENO: creating $ofile" >&5 +-echo "$as_me: creating $ofile" >&6;} ++ { $as_echo "$as_me:$LINENO: creating $ofile" >&5 ++$as_echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" + #! $SHELL +@@ -12485,26 +13969,26 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + CC="$lt_save_CC" + + +-# Check whether --with-tags or --without-tags was given. ++# Check whether --with-tags was given. + if test "${with_tags+set}" = set; then +- withval="$with_tags" +- tagnames="$withval" +-fi; ++ withval=$with_tags; tagnames="$withval" ++fi ++ + + if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then +- { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +-echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 ++$as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then +- { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +-echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 ++$as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else +- { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +-echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 ++$as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then +@@ -12521,16 +14005,16 @@ echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; +- *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +-echo "$as_me: error: invalid tag name: $tagname" >&2;} ++ *) { { $as_echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 ++$as_echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then +- { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +-echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 ++$as_echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + +@@ -12543,7 +14027,7 @@ echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then +- ac_ext=cc ++ ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +@@ -12662,18 +14146,18 @@ if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +-# Check whether --with-gnu-ld or --without-gnu-ld was given. ++# Check whether --with-gnu-ld was given. + if test "${with_gnu_ld+set}" = set; then +- withval="$with_gnu_ld" +- test "$withval" = no || with_gnu_ld=yes ++ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + else + with_gnu_ld=no +-fi; ++fi ++ + ac_prog=ld + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. +- echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 ++$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw +@@ -12702,14 +14186,14 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + ;; + esac + elif test "$with_gnu_ld" = yes; then +- echo "$as_me:$LINENO: checking for GNU ld" >&5 +-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 ++$as_echo_n "checking for GNU ld... " >&6; } + else +- echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 ++$as_echo_n "checking for non-GNU ld... " >&6; } + fi + if test "${lt_cv_path_LD+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +@@ -12739,19 +14223,19 @@ fi + + LD="$lt_cv_path_LD" + if test -n "$LD"; then +- echo "$as_me:$LINENO: result: $LD" >&5 +-echo "${ECHO_T}$LD" >&6 ++ { $as_echo "$as_me:$LINENO: result: $LD" >&5 ++$as_echo "$LD" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++$as_echo "no" >&6; } + fi +-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} ++test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 ++$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 ++$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } + if test "${lt_cv_prog_gnu_ld+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + # I'd rather use --version here, but apparently some GNU lds only accept -v. + case `$LD -v 2>&1 &1 &5 +-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 ++$as_echo "$lt_cv_prog_gnu_ld" >&6; } + with_gnu_ld=$lt_cv_prog_gnu_ld + + +@@ -12814,8 +14298,8 @@ else + fi + + # PORTME: fill in a description of your system's C++ link characteristics +-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) +@@ -12927,27 +14411,26 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'` +@@ -12955,11 +14438,14 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File S + if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'`; fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -12989,27 +14475,26 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'` +@@ -13017,11 +14502,14 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File S + if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'`; fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -13752,8 +15240,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + ld_shlibs_CXX=no + ;; + esac +-echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +-echo "${ECHO_T}$ld_shlibs_CXX" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 ++$as_echo "$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + GCC_CXX="$GXX" +@@ -13773,7 +15261,7 @@ EOF + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. +@@ -13892,8 +15380,8 @@ lt_prog_compiler_wl_CXX= + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX= + +-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then +@@ -14166,18 +15654,18 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + esac + fi + +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 ++$as_echo "$lt_prog_compiler_pic_CXX" >&6; } + + # + # Check to make sure the PIC flag actually works. + # + if test -n "$lt_prog_compiler_pic_CXX"; then + +-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 ++$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } + if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext +@@ -14192,11 +15680,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:14195: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:15683: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:14199: \$? = $ac_status" >&5 ++ echo "$as_me:15687: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -14209,8 +15697,8 @@ else + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 ++$as_echo "$lt_prog_compiler_pic_works_CXX" >&6; } + + if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in +@@ -14237,10 +15725,10 @@ esac + # Check to make sure the static flag actually works. + # + wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 ++$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } + if test "${lt_prog_compiler_static_works_CXX+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" +@@ -14265,8 +15753,8 @@ else + LDFLAGS="$save_LDFLAGS" + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +-echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 ++$as_echo "$lt_prog_compiler_static_works_CXX" >&6; } + + if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +@@ -14275,10 +15763,10 @@ else + fi + + +-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ++$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } + if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null +@@ -14296,11 +15784,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:14299: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:15787: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:14303: \$? = $ac_status" >&5 ++ echo "$as_me:15791: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -14322,34 +15810,34 @@ else + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 ++$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user +- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ++$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no +- echo "$as_me:$LINENO: result: $hard_links" >&5 +-echo "${ECHO_T}$hard_links" >&6 ++ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 ++$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then +- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 ++$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi + else + need_locks=no + fi + +-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in +@@ -14373,8 +15861,8 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar + ;; + esac + +-echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +-echo "${ECHO_T}$ld_shlibs_CXX" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 ++$as_echo "$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + # +@@ -14394,15 +15882,15 @@ x|xyes) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. +- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ++$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest +@@ -14420,7 +15908,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no +@@ -14432,16 +15920,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& + cat conftest.err 1>&5 + fi + $rm conftest* +- echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +-echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 ++ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 ++$as_echo "$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; + esac + +-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ++$as_echo_n "checking dynamic linker characteristics... " >&6; } + library_names_spec= + libname_spec='lib$name' + soname_spec= +@@ -14832,11 +16320,11 @@ linux*) + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) +- echo '#line 14835 "configure"' > conftest.$ac_ext ++ echo '#line 16323 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) +@@ -15049,8 +16537,8 @@ uts4*) + dynamic_linker=no + ;; + esac +-echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +-echo "${ECHO_T}$dynamic_linker" >&6 ++{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ++$as_echo "$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no + + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +@@ -15058,8 +16546,8 @@ if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + fi + +-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ++$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + hardcode_action_CXX= + if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ +@@ -15083,8 +16571,8 @@ else + # directories. + hardcode_action_CXX=unsupported + fi +-echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +-echo "${ECHO_T}$hardcode_action_CXX" >&6 ++{ $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 ++$as_echo "$hardcode_action_CXX" >&6; } + + if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported +@@ -15612,13 +17100,13 @@ done + cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +-echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +-echo "$as_me:$LINENO: result: $can_build_shared" >&5 +-echo "${ECHO_T}$can_build_shared" >&6 ++{ $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 ++$as_echo_n "checking if libtool supports shared libraries... " >&6; } ++{ $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 ++$as_echo "$can_build_shared" >&6; } + +-echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 ++$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and +@@ -15637,15 +17125,15 @@ aix4* | aix5*) + fi + ;; + esac +-echo "$as_me:$LINENO: result: $enable_shared" >&5 +-echo "${ECHO_T}$enable_shared" >&6 ++{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 ++$as_echo "$enable_shared" >&6; } + +-echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 ++$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes +-echo "$as_me:$LINENO: result: $enable_static" >&5 +-echo "${ECHO_T}$enable_static" >&6 ++{ $as_echo "$as_me:$LINENO: result: $enable_static" >&5 ++$as_echo "$enable_static" >&6; } + + GCC_F77="$G77" + LD_F77="$LD" +@@ -15654,8 +17142,8 @@ lt_prog_compiler_wl_F77= + lt_prog_compiler_pic_F77= + lt_prog_compiler_static_F77= + +-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' +@@ -15864,18 +17352,18 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + esac + fi + +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 ++$as_echo "$lt_prog_compiler_pic_F77" >&6; } + + # + # Check to make sure the PIC flag actually works. + # + if test -n "$lt_prog_compiler_pic_F77"; then + +-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 ++$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } + if test "${lt_prog_compiler_pic_works_F77+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext +@@ -15890,11 +17378,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:15893: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:17381: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:15897: \$? = $ac_status" >&5 ++ echo "$as_me:17385: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -15907,8 +17395,8 @@ else + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 ++$as_echo "$lt_prog_compiler_pic_works_F77" >&6; } + + if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in +@@ -15935,10 +17423,10 @@ esac + # Check to make sure the static flag actually works. + # + wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 ++$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } + if test "${lt_prog_compiler_static_works_F77+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" +@@ -15963,8 +17451,8 @@ else + LDFLAGS="$save_LDFLAGS" + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +-echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 ++$as_echo "$lt_prog_compiler_static_works_F77" >&6; } + + if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +@@ -15973,10 +17461,10 @@ else + fi + + +-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ++$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } + if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null +@@ -15994,11 +17482,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:15997: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:17485: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:16001: \$? = $ac_status" >&5 ++ echo "$as_me:17489: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -16020,34 +17508,34 @@ else + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 ++$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } + + + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user +- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ++$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no +- echo "$as_me:$LINENO: result: $hard_links" >&5 +-echo "${ECHO_T}$hard_links" >&6 ++ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 ++$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then +- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 ++$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi + else + need_locks=no + fi + +-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag_F77= +@@ -16452,27 +17940,26 @@ _LT_EOF + end + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_f77_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_f77_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'` +@@ -16480,11 +17967,14 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File S + if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'`; fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -16503,27 +17993,26 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + end + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_f77_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_f77_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'` +@@ -16531,11 +18020,14 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File S + if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'`; fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -16984,8 +18476,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + fi + +-echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +-echo "${ECHO_T}$ld_shlibs_F77" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 ++$as_echo "$ld_shlibs_F77" >&6; } + test "$ld_shlibs_F77" = no && can_build_shared=no + + # +@@ -17005,15 +18497,15 @@ x|xyes) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. +- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ++$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest +@@ -17031,7 +18523,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no +@@ -17043,16 +18535,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& + cat conftest.err 1>&5 + fi + $rm conftest* +- echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +-echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 ++ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 ++$as_echo "$archive_cmds_need_lc_F77" >&6; } + ;; + esac + fi + ;; + esac + +-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ++$as_echo_n "checking dynamic linker characteristics... " >&6; } + library_names_spec= + libname_spec='lib$name' + soname_spec= +@@ -17443,11 +18935,11 @@ linux*) + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) +- echo '#line 17446 "configure"' > conftest.$ac_ext ++ echo '#line 18938 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) +@@ -17660,8 +19152,8 @@ uts4*) + dynamic_linker=no + ;; + esac +-echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +-echo "${ECHO_T}$dynamic_linker" >&6 ++{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ++$as_echo "$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no + + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +@@ -17669,8 +19161,8 @@ if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + fi + +-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ++$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + hardcode_action_F77= + if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ +@@ -17694,8 +19186,8 @@ else + # directories. + hardcode_action_F77=unsupported + fi +-echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +-echo "${ECHO_T}$hardcode_action_F77" >&6 ++{ $as_echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 ++$as_echo "$hardcode_action_F77" >&6; } + + if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported +@@ -18135,7 +19627,6 @@ CC="$lt_save_CC" + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + +- + # Source file extension for Java test sources. + ac_ext=java + +@@ -18203,10 +19694,10 @@ if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +-echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 ++$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } + if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext +@@ -18221,11 +19712,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:18224: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:19715: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:18228: \$? = $ac_status" >&5 ++ echo "$as_me:19719: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -18238,8 +19729,8 @@ else + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 ++$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + + if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +@@ -18253,8 +19744,8 @@ lt_prog_compiler_wl_GCJ= + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_static_GCJ= + +-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' +@@ -18463,18 +19954,18 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + esac + fi + +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 ++$as_echo "$lt_prog_compiler_pic_GCJ" >&6; } + + # + # Check to make sure the PIC flag actually works. + # + if test -n "$lt_prog_compiler_pic_GCJ"; then + +-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 ++$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... " >&6; } + if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext +@@ -18489,11 +19980,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:18492: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:19983: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:18496: \$? = $ac_status" >&5 ++ echo "$as_me:19987: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -18506,8 +19997,8 @@ else + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 ++$as_echo "$lt_prog_compiler_pic_works_GCJ" >&6; } + + if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in +@@ -18534,10 +20025,10 @@ esac + # Check to make sure the static flag actually works. + # + wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 ++$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } + if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" +@@ -18562,8 +20053,8 @@ else + LDFLAGS="$save_LDFLAGS" + + fi +-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +-echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 ++$as_echo "$lt_prog_compiler_static_works_GCJ" >&6; } + + if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +@@ -18572,10 +20063,10 @@ else + fi + + +-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ++$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } + if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null +@@ -18593,11 +20084,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:18596: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:20087: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:18600: \$? = $ac_status" >&5 ++ echo "$as_me:20091: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -18619,34 +20110,34 @@ else + $rm conftest* + + fi +-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 ++{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 ++$as_echo "$lt_cv_prog_compiler_c_o_GCJ" >&6; } + + + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user +- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ++$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no +- echo "$as_me:$LINENO: result: $hard_links" >&5 +-echo "${ECHO_T}$hard_links" >&6 ++ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 ++$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then +- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 ++$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi + else + need_locks=no + fi + +-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag_GCJ= +@@ -19061,27 +20552,26 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'` +@@ -19089,11 +20579,14 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File S + if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'`; fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -19122,27 +20615,26 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + + aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'` +@@ -19150,11 +20642,14 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File S + if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'`; fi + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -rf conftest.dSYM ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + +@@ -19603,8 +21098,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + esac + fi + +-echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +-echo "${ECHO_T}$ld_shlibs_GCJ" >&6 ++{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 ++$as_echo "$ld_shlibs_GCJ" >&6; } + test "$ld_shlibs_GCJ" = no && can_build_shared=no + + # +@@ -19624,15 +21119,15 @@ x|xyes) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. +- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 ++ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ++$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest +@@ -19650,7 +21145,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no +@@ -19662,16 +21157,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& + cat conftest.err 1>&5 + fi + $rm conftest* +- echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +-echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 ++ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 ++$as_echo "$archive_cmds_need_lc_GCJ" >&6; } + ;; + esac + fi + ;; + esac + +-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ++$as_echo_n "checking dynamic linker characteristics... " >&6; } + library_names_spec= + libname_spec='lib$name' + soname_spec= +@@ -20062,11 +21557,11 @@ linux*) + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) +- echo '#line 20065 "configure"' > conftest.$ac_ext ++ echo '#line 21560 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) +@@ -20279,8 +21774,8 @@ uts4*) + dynamic_linker=no + ;; + esac +-echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +-echo "${ECHO_T}$dynamic_linker" >&6 ++{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ++$as_echo "$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no + + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +@@ -20288,8 +21783,8 @@ if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + fi + +-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 ++{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ++$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + hardcode_action_GCJ= + if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ +@@ -20313,8 +21808,8 @@ else + # directories. + hardcode_action_GCJ=unsupported + fi +-echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +-echo "${ECHO_T}$hardcode_action_GCJ" >&6 ++{ $as_echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 ++$as_echo "$hardcode_action_GCJ" >&6; } + + if test "$hardcode_action_GCJ" = relink; then + # Fast installation is not supported +@@ -20753,7 +22248,6 @@ CC="$lt_save_CC" + RC) + + +- + # Source file extension for RC test sources. + ac_ext=rc + +@@ -21232,8 +22726,8 @@ CC="$lt_save_CC" + ;; + + *) +- { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +-echo "$as_me: error: Unsupported tag name: $tagname" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 ++$as_echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac +@@ -21252,8 +22746,8 @@ echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + chmod +x "$ofile" + else + rm -f "${ofile}T" +- { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +-echo "$as_me: error: unable to update list of available tagged configurations." >&2;} ++ { { $as_echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 ++$as_echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi + fi +@@ -21291,13 +22785,13 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + CFLAGS="-O2 -Wall" + ## check for --enable-debug first before checking CFLAGS before + ## so that we don't mix -O and -g +-# Check whether --enable-debug or --disable-debug was given. ++# Check whether --enable-debug was given. + if test "${enable_debug+set}" = set; then +- enableval="$enable_debug" +- if eval "test x$enable_debug = xyes"; then ++ enableval=$enable_debug; if eval "test x$enable_debug = xyes"; then + CFLAGS="${CFLAGS} -g -O0" + fi +-fi; ++fi ++ + + + if test x$debug = xtrue; then +@@ -21309,12 +22803,13 @@ else + fi + + +- ac_config_commands="$ac_config_commands default" ++ac_config_commands="$ac_config_commands default" + + + + +- ac_config_files="$ac_config_files Makefile src/Makefile src/apps/Makefile src/apps/dhcpc/Makefile src/apps/brcm-iscsi/Makefile src/uip/Makefile src/unix/Makefile src/unix/libs/Makefile" ++ac_config_files="$ac_config_files Makefile src/Makefile src/apps/Makefile src/apps/dhcpc/Makefile src/apps/brcm-iscsi/Makefile src/uip/Makefile src/unix/Makefile src/unix/libs/Makefile" ++ + cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure + # tests run on this system so they can be shared between configure +@@ -21333,39 +22828,59 @@ _ACEOF + + # The following way of writing the cache mishandles newlines in values, + # but we know of no workaround that is simple, portable, and efficient. +-# So, don't put newlines in cache variables' values. ++# So, we kill variables containing newlines. + # Ultrix sh set writes to stderr and can't be redirected directly, + # and sets the high bit in the cache file unless we assign to the vars. +-{ ++( ++ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do ++ eval ac_val=\$$ac_var ++ case $ac_val in #( ++ *${as_nl}*) ++ case $ac_var in #( ++ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 ++$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ++ esac ++ case $ac_var in #( ++ _ | IFS | as_nl) ;; #( ++ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( ++ *) $as_unset $ac_var ;; ++ esac ;; ++ esac ++ done ++ + (set) 2>&1 | +- case `(ac_space=' '; set | grep ac_space) 2>&1` in +- *ac_space=\ *) ++ case $as_nl`(ac_space=' '; set) 2>&1` in #( ++ *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + 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. +- sed -n \ +- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; +- esac; +-} | ++ esac | ++ sort ++) | + sed ' ++ /^ac_cv_env_/b end + t clear +- : clear ++ :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end +- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ +- : end' >>confcache +-if diff $cache_file confcache >/dev/null 2>&1; then :; else +- if test -w $cache_file; then +- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" ++ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ ++ :end' >>confcache ++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else ++ if test -w "$cache_file"; then ++ test "x$cache_file" != "x/dev/null" && ++ { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 ++$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else +- echo "not updating unwritable cache $cache_file" ++ { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 ++$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi + fi + rm -f confcache +@@ -21374,32 +22889,18 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix + # Let make expand exec_prefix. + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +-# VPATH may cause trouble with some makes, so we remove $(srcdir), +-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +-# trailing colons and then remove the whole line if VPATH becomes empty +-# (actually we leave an empty line to preserve line numbers). +-if test "x$srcdir" = x.; then +- ac_vpsub='/^[ ]*VPATH[ ]*=/{ +-s/:*\$(srcdir):*/:/; +-s/:*\${srcdir}:*/:/; +-s/:*@srcdir@:*/:/; +-s/^\([^=]*=[ ]*\):*/\1/; +-s/:*$//; +-s/^[^=]*=[ ]*$//; +-}' +-fi +- + DEFS=-DHAVE_CONFIG_H + + ac_libobjs= + ac_ltlibobjs= + for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. +- ac_i=`echo "$ac_i" | +- sed 's/\$U\././;s/\.o$//;s/\.obj$//'` +- # 2. Add them. +- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" +- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' ++ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ++ ac_i=`$as_echo "$ac_i" | sed "$ac_script"` ++ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR ++ # will be set to the directory where LIBOBJS objects are built. ++ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ++ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + done + LIBOBJS=$ac_libobjs + +@@ -21407,40 +22908,42 @@ LTLIBOBJS=$ac_ltlibobjs + + + if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. ++ { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. + Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"AMDEP\" was never defined. ++$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. + Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } + fi + if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. ++ { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. + Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. ++$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. + Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } + fi ++ + if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. ++ { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. + Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. ++$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. + Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } + fi + if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"DEBUG\" was never defined. ++ { { $as_echo "$as_me:$LINENO: error: conditional \"DEBUG\" was never defined. + Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"DEBUG\" was never defined. ++$as_echo "$as_me: error: conditional \"DEBUG\" was never defined. + Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } + fi + + : ${CONFIG_STATUS=./config.status} ++ac_write_fail=0 + ac_clean_files_save=$ac_clean_files + ac_clean_files="$ac_clean_files $CONFIG_STATUS" +-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +-echo "$as_me: creating $CONFIG_STATUS" >&6;} +-cat >$CONFIG_STATUS <<_ACEOF ++{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 ++$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} ++cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + #! $SHELL + # Generated by $as_me. + # Run this file to recreate the current configuration. +@@ -21453,22 +22956,78 @@ ac_cs_silent=false + SHELL=\${CONFIG_SHELL-$SHELL} + _ACEOF + +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + ## --------------------- ## + ## M4sh Initialization. ## + ## --------------------- ## + +-# Be Bourne compatible ++# Be more Bourne compatible ++DUALCASE=1; export DUALCASE # for MKS sh + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then +- set -o posix ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++ ++ ++# PATH needs CR ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits ++ ++as_nl=' ++' ++export as_nl ++# Printing a long string crashes Solaris 7 /usr/bin/printf. ++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo ++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo ++if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then ++ as_echo='printf %s\n' ++ as_echo_n='printf %s' ++else ++ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then ++ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' ++ as_echo_n='/usr/ucb/echo -n' ++ else ++ as_echo_body='eval expr "X$1" : "X\\(.*\\)"' ++ as_echo_n_body='eval ++ arg=$1; ++ case $arg in ++ *"$as_nl"*) ++ expr "X$arg" : "X\\(.*\\)$as_nl"; ++ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; ++ esac; ++ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ++ ' ++ export as_echo_n_body ++ as_echo_n='sh -c $as_echo_n_body as_echo' ++ fi ++ export as_echo_body ++ as_echo='sh -c $as_echo_body as_echo' ++fi ++ ++# The user is always right. ++if test "${PATH_SEPARATOR+set}" != set; then ++ PATH_SEPARATOR=: ++ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { ++ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || ++ PATH_SEPARATOR=';' ++ } + fi +-DUALCASE=1; export DUALCASE # for MKS sh + + # Support unset when possible. + if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +@@ -21478,33 +23037,60 @@ else + fi + + ++# IFS ++# We need space, tab and new line, in precisely that order. Quoting is ++# there to prevent editors from complaining about space-tab. ++# (If _AS_PATH_WALK were called with IFS unset, it would disable word ++# splitting by setting IFS to empty value.) ++IFS=" "" $as_nl" ++ ++# Find who we are. Look in the path if we contain no directory separator. ++case $0 in ++ *[\\/]* ) as_myself=$0 ;; ++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++done ++IFS=$as_save_IFS ++ ++ ;; ++esac ++# 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 ++fi ++if test ! -f "$as_myself"; then ++ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ { (exit 1); exit 1; } ++fi ++ + # Work around bugs in pre-3.0 UWIN ksh. +-$as_unset ENV MAIL MAILPATH ++for as_var in ENV MAIL MAILPATH ++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++done + PS1='$ ' + PS2='> ' + PS4='+ ' + + # NLS nuisances. +-for as_var in \ +- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ +- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ +- LC_TELEPHONE LC_TIME +-do +- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then +- eval $as_var=C; export $as_var +- else +- $as_unset $as_var +- fi +-done ++LC_ALL=C ++export LC_ALL ++LANGUAGE=C ++export LANGUAGE + + # Required to use basename. +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + +-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename + else + as_basename=false +@@ -21512,159 +23098,122 @@ fi + + + # Name of the executable. +-as_me=`$as_basename "$0" || ++as_me=`$as_basename -- "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)$' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X/"$0" | +- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } +- /^X\/\(\/\/\)$/{ s//\1/; q; } +- /^X\/\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ X"$0" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X/"$0" | ++ sed '/^.*\/\([^/][^/]*\)\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + ++# CDPATH. ++$as_unset CDPATH + +-# PATH needs CR, and LINENO needs CR and PATH. +-# Avoid depending upon Character Ranges. +-as_cr_letters='abcdefghijklmnopqrstuvwxyz' +-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +-as_cr_Letters=$as_cr_letters$as_cr_LETTERS +-as_cr_digits='0123456789' +-as_cr_alnum=$as_cr_Letters$as_cr_digits + +-# The user is always right. +-if test "${PATH_SEPARATOR+set}" != set; then +- echo "#! /bin/sh" >conf$$.sh +- echo "exit 0" >>conf$$.sh +- chmod +x conf$$.sh +- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then +- PATH_SEPARATOR=';' +- else +- PATH_SEPARATOR=: +- fi +- rm -f conf$$.sh +-fi + +- +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x$as_lineno_3" = "x$as_lineno_2" || { +- # Find who we are. Look in the path if we contain no path at all +- # relative or not. +- case $0 in +- *[\\/]* ) as_myself=$0 ;; +- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +-done +- +- ;; +- esac +- # 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 +- fi +- if test ! -f "$as_myself"; then +- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} +- { (exit 1); exit 1; }; } +- fi +- case $CONFIG_SHELL in +- '') +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for as_base in sh bash ksh sh5; do +- case $as_dir in +- /*) +- if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO +- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then +- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } +- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } +- CONFIG_SHELL=$as_dir/$as_base +- export CONFIG_SHELL +- exec "$CONFIG_SHELL" "$0" ${1+"$@"} +- fi;; +- esac +- done +-done +-;; +- esac ++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a +- # line-number line before each line; the second 'sed' does the real +- # work. The second script uses 'N' to pair each line-number line +- # with the numbered line, and appends trailing '-' during +- # substitution so that $LINENO is not a special case at line end. ++ # line-number line after each line using $LINENO; the second 'sed' ++ # does the real work. The second script uses 'N' to pair each ++ # line-number line with the line containing $LINENO, and appends ++ # trailing '-' during substitution so that $LINENO is not a special ++ # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the +- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) +- sed '=' <$as_myself | ++ # scripts with optimization help from Paolo Bonzini. Blame Lee ++ # E. McMahon (1931-1989) for sed's syntax. :-) ++ sed -n ' ++ p ++ /[$]LINENO/= ++ ' <$as_myself | + sed ' ++ s/[$]LINENO.*/&-/ ++ t lineno ++ b ++ :lineno + N +- s,$,-, +- : loop +- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ++ :loop ++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop +- s,-$,, +- s,^['$as_cr_digits']*\n,, ++ s/-\n.*// + ' >$as_me.lineno && +- chmod +x $as_me.lineno || +- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} ++ chmod +x "$as_me.lineno" || ++ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the +- # original and so on. Autoconf is especially sensible to this). +- . ./$as_me.lineno ++ # original and so on. Autoconf is especially sensitive to this). ++ . "./$as_me.lineno" + # Exit status is that of the last command. + exit + } + + +-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in +- *c*,-n*) ECHO_N= ECHO_C=' +-' ECHO_T=' ' ;; +- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; +- *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then ++ as_dirname=dirname ++else ++ as_dirname=false ++fi ++ ++ECHO_C= ECHO_N= ECHO_T= ++case `echo -n x` in ++-n*) ++ case `echo 'x\c'` in ++ *c*) ECHO_T=' ';; # ECHO_T is single tab character. ++ *) ECHO_C='\c';; ++ esac;; ++*) ++ ECHO_N='-n';; + esac +- +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + + rm -f conf$$ conf$$.exe conf$$.file +-echo >conf$$.file +-if ln -s conf$$.file conf$$ 2>/dev/null; then +- # We could just check for DJGPP; but this test a) works b) is more generic +- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). +- if test -f conf$$.exe; then +- # Don't use ln at all; we don't have any links +- as_ln_s='cp -p' +- else ++if test -d conf$$.dir; then ++ rm -f conf$$.dir/conf$$.file ++else ++ rm -f conf$$.dir ++ mkdir conf$$.dir 2>/dev/null ++fi ++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 -p'. ++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || ++ as_ln_s='cp -p' ++ elif ln conf$$.file conf$$ 2>/dev/null; then ++ as_ln_s=ln ++ else ++ as_ln_s='cp -p' + fi +-elif ln conf$$.file conf$$ 2>/dev/null; then +- as_ln_s=ln + else + as_ln_s='cp -p' + fi +-rm -f conf$$ conf$$.exe conf$$.file ++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file ++rmdir conf$$.dir 2>/dev/null + + if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +@@ -21673,7 +23222,28 @@ else + as_mkdir_p=false + fi + +-as_executable_p="test -f" ++if test -x / >/dev/null 2>&1; then ++ as_test_x='test -x' ++else ++ if ls -dL / >/dev/null 2>&1; then ++ as_ls_L_option=L ++ else ++ as_ls_L_option= ++ fi ++ as_test_x=' ++ eval sh -c '\'' ++ if test -d "$1"; then ++ test -d "$1/."; ++ else ++ case $1 in ++ -*)set "./$1";; ++ esac; ++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ++ ???[sx]*):;;*)false;;esac;fi ++ '\'' sh ++ ' ++fi ++as_executable_p=$as_test_x + + # Sed expression to map a string onto a valid CPP name. + as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +@@ -21682,31 +23252,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +-# IFS +-# We need space, tab and new line, in precisely that order. +-as_nl=' +-' +-IFS=" $as_nl" +- +-# CDPATH. +-$as_unset CDPATH +- + exec 6>&1 + +-# Open the log real soon, to keep \$[0] and so on meaningful, and to ++# Save the log message, to keep $[0] and so on meaningful, and to + # report actual input values of CONFIG_FILES etc. instead of their +-# values after options handling. Logging --version etc. is OK. +-exec 5>>config.log +-{ +- echo +- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +-## Running $as_me. ## +-_ASBOX +-} >&5 +-cat >&5 <<_CSEOF +- +-This file was extended by iscsiuio $as_me 0.7.8.1b, which was +-generated by GNU Autoconf 2.59. Invocation command line was ++# values after options handling. ++ac_log=" ++This file was extended by iscsiuio $as_me 0.7.8.2, which was ++generated by GNU Autoconf 2.63. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS +@@ -21714,45 +23267,45 @@ generated by GNU Autoconf 2.59. Invocation command line was + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +-_CSEOF +-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +-echo >&5 ++on `(hostname || uname -n) 2>/dev/null | sed 1q` ++" ++ + _ACEOF + ++case $ac_config_files in *" ++"*) set x $ac_config_files; shift; ac_config_files=$*;; ++esac ++ ++case $ac_config_headers in *" ++"*) set x $ac_config_headers; shift; ac_config_headers=$*;; ++esac ++ ++ ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + # Files that config.status was made for. +-if test -n "$ac_config_files"; then +- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +-fi ++config_files="$ac_config_files" ++config_headers="$ac_config_headers" ++config_commands="$ac_config_commands" + +-if test -n "$ac_config_headers"; then +- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +-fi +- +-if test -n "$ac_config_links"; then +- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +-fi +- +-if test -n "$ac_config_commands"; then +- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +-fi +- +-cat >>$CONFIG_STATUS <<\_ACEOF ++_ACEOF + ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + ac_cs_usage="\ + \`$as_me' instantiates files from templates according to the + current configuration. + +-Usage: $0 [OPTIONS] [FILE]... ++Usage: $0 [OPTION]... [FILE]... + + -h, --help print this help, then exit +- -V, --version print version number, then exit +- -q, --quiet do not print progress messages ++ -V, --version print version number and configuration settings, then exit ++ -q, --quiet, --silent ++ do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions +- --file=FILE[:TEMPLATE] +- instantiate the configuration file FILE +- --header=FILE[:TEMPLATE] +- instantiate the configuration header FILE ++ --file=FILE[:TEMPLATE] ++ instantiate the configuration file FILE ++ --header=FILE[:TEMPLATE] ++ instantiate the configuration header FILE + + Configuration files: + $config_files +@@ -21764,83 +23317,83 @@ Configuration commands: + $config_commands + + Report bugs to ." +-_ACEOF + +-cat >>$CONFIG_STATUS <<_ACEOF ++_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_version="\\ +-iscsiuio config.status 0.7.8.1b +-configured by $0, generated by GNU Autoconf 2.59, +- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" ++iscsiuio config.status 0.7.8.2 ++configured by $0, generated by GNU Autoconf 2.63, ++ with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +-Copyright (C) 2003 Free Software Foundation, Inc. ++Copyright (C) 2008 Free Software Foundation, Inc. + This config.status script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it." +-srcdir=$srcdir +-INSTALL="$INSTALL" ++ ++ac_pwd='$ac_pwd' ++srcdir='$srcdir' ++INSTALL='$INSTALL' ++AWK='$AWK' ++test -n "\$AWK" || AWK=awk + _ACEOF + +-cat >>$CONFIG_STATUS <<\_ACEOF +-# If no file are specified by the user, then we need to provide default +-# value. By we need to know if files were specified by the user. ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ++# The default lists apply if the user does not specify any file. + ac_need_defaults=: + while test $# != 0 + do + case $1 in + --*=*) +- ac_option=`expr "x$1" : 'x\([^=]*\)='` +- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ++ ac_option=`expr "X$1" : 'X\([^=]*\)='` ++ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; +- -*) ++ *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; +- *) # This is not an option, so the user has probably given explicit +- # arguments. +- ac_option=$1 +- ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +-_ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; +- --version | --vers* | -V ) +- echo "$ac_cs_version"; exit 0 ;; +- --he | --h) +- # Conflict between --help and --header +- { { echo "$as_me:$LINENO: error: ambiguous option: $1 +-Try \`$0 --help' for more information." >&5 +-echo "$as_me: error: ambiguous option: $1 +-Try \`$0 --help' for more information." >&2;} +- { (exit 1); exit 1; }; };; +- --help | --hel | -h ) +- echo "$ac_cs_usage"; exit 0 ;; +- --debug | --d* | -d ) ++ --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) ++ $as_echo "$ac_cs_version"; exit ;; ++ --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift +- CONFIG_FILES="$CONFIG_FILES $ac_optarg" ++ case $ac_optarg in ++ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; ++ esac ++ CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift +- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ++ case $ac_optarg in ++ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; ++ esac ++ CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + ac_need_defaults=false;; ++ --he | --h) ++ # Conflict between --help and --header ++ { $as_echo "$as_me: error: ambiguous option: $1 ++Try \`$0 --help' for more information." >&2 ++ { (exit 1); exit 1; }; };; ++ --help | --hel | -h ) ++ $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. +- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +-Try \`$0 --help' for more information." >&5 +-echo "$as_me: error: unrecognized option: $1 +-Try \`$0 --help' for more information." >&2;} ++ -*) { $as_echo "$as_me: error: unrecognized option: $1 ++Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + +- *) ac_config_targets="$ac_config_targets $1" ;; ++ *) ac_config_targets="$ac_config_targets $1" ++ ac_need_defaults=false ;; + + esac + shift +@@ -21854,48 +23407,62 @@ if $ac_cs_silent; then + fi + + _ACEOF +-cat >>$CONFIG_STATUS <<_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + if \$ac_cs_recheck; then +- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 +- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ++ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ++ shift ++ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 ++ CONFIG_SHELL='$SHELL' ++ export CONFIG_SHELL ++ exec "\$@" + fi + + _ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ++exec 5>>config.log ++{ ++ echo ++ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ++## Running $as_me. ## ++_ASBOX ++ $as_echo "$ac_log" ++} >&5 + +-cat >>$CONFIG_STATUS <<_ACEOF ++_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + # +-# INIT-COMMANDS section. ++# INIT-COMMANDS + # +- + AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + + _ACEOF + ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +- +-cat >>$CONFIG_STATUS <<\_ACEOF ++# Handling of arguments. + for ac_config_target in $ac_config_targets + do +- case "$ac_config_target" in +- # Handling of arguments. +- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; +- "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; +- "src/apps/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/apps/Makefile" ;; +- "src/apps/dhcpc/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/apps/dhcpc/Makefile" ;; +- "src/apps/brcm-iscsi/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/apps/brcm-iscsi/Makefile" ;; +- "src/uip/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/uip/Makefile" ;; +- "src/unix/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/unix/Makefile" ;; +- "src/unix/libs/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/unix/libs/Makefile" ;; +- "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; +- "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; +- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; +- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +-echo "$as_me: error: invalid argument: $ac_config_target" >&2;} ++ case $ac_config_target in ++ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ++ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; ++ "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; ++ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; ++ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; ++ "src/apps/Makefile") CONFIG_FILES="$CONFIG_FILES src/apps/Makefile" ;; ++ "src/apps/dhcpc/Makefile") CONFIG_FILES="$CONFIG_FILES src/apps/dhcpc/Makefile" ;; ++ "src/apps/brcm-iscsi/Makefile") CONFIG_FILES="$CONFIG_FILES src/apps/brcm-iscsi/Makefile" ;; ++ "src/uip/Makefile") CONFIG_FILES="$CONFIG_FILES src/uip/Makefile" ;; ++ "src/unix/Makefile") CONFIG_FILES="$CONFIG_FILES src/unix/Makefile" ;; ++ "src/unix/libs/Makefile") CONFIG_FILES="$CONFIG_FILES src/unix/libs/Makefile" ;; ++ ++ *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 ++$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac + done + ++ + # If the user did not use the arguments to specify the items to instantiate, + # then the envvar interface is used. Set only those that are not. + # We use the long form for the default assignment because of an extremely +@@ -21907,744 +23474,635 @@ if $ac_need_defaults; then + fi + + # Have a temporary directory for convenience. Make it in the build tree +-# simply because there is no reason to put it here, and in addition, ++# simply because there is no reason against having it here, and in addition, + # creating and moving files from /tmp can sometimes cause problems. +-# Create a temporary directory, and hook for its removal unless debugging. ++# 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'. + $debug || + { +- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 ++ tmp= ++ trap 'exit_status=$? ++ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ++' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 + } +- + # Create a (secure) tmp directory for tmp files. + + { +- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && ++ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" + } || + { +- tmp=./confstat$$-$RANDOM +- (umask 077 && mkdir $tmp) ++ tmp=./conf$$-$RANDOM ++ (umask 077 && mkdir "$tmp") + } || + { +- echo "$me: cannot create a temporary directory in ." >&2 ++ $as_echo "$as_me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } + } + +-_ACEOF +- +-cat >>$CONFIG_STATUS <<_ACEOF ++# 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'. ++if test -n "$CONFIG_FILES"; then + +-# +-# CONFIG_FILES section. +-# + +-# No need to generate the scripts if there are no CONFIG_FILES. +-# This happens for instance when ./config.status config.h +-if test -n "\$CONFIG_FILES"; then +- # Protect against being on the right side of a sed subst in config.status. +- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; +- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +-s,@SHELL@,$SHELL,;t t +-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +-s,@exec_prefix@,$exec_prefix,;t t +-s,@prefix@,$prefix,;t t +-s,@program_transform_name@,$program_transform_name,;t t +-s,@bindir@,$bindir,;t t +-s,@sbindir@,$sbindir,;t t +-s,@libexecdir@,$libexecdir,;t t +-s,@datadir@,$datadir,;t t +-s,@sysconfdir@,$sysconfdir,;t t +-s,@sharedstatedir@,$sharedstatedir,;t t +-s,@localstatedir@,$localstatedir,;t t +-s,@libdir@,$libdir,;t t +-s,@includedir@,$includedir,;t t +-s,@oldincludedir@,$oldincludedir,;t t +-s,@infodir@,$infodir,;t t +-s,@mandir@,$mandir,;t t +-s,@build_alias@,$build_alias,;t t +-s,@host_alias@,$host_alias,;t t +-s,@target_alias@,$target_alias,;t t +-s,@DEFS@,$DEFS,;t t +-s,@ECHO_C@,$ECHO_C,;t t +-s,@ECHO_N@,$ECHO_N,;t t +-s,@ECHO_T@,$ECHO_T,;t t +-s,@LIBS@,$LIBS,;t t +-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +-s,@INSTALL_DATA@,$INSTALL_DATA,;t t +-s,@CYGPATH_W@,$CYGPATH_W,;t t +-s,@PACKAGE@,$PACKAGE,;t t +-s,@VERSION@,$VERSION,;t t +-s,@ACLOCAL@,$ACLOCAL,;t t +-s,@AUTOCONF@,$AUTOCONF,;t t +-s,@AUTOMAKE@,$AUTOMAKE,;t t +-s,@AUTOHEADER@,$AUTOHEADER,;t t +-s,@MAKEINFO@,$MAKEINFO,;t t +-s,@install_sh@,$install_sh,;t t +-s,@STRIP@,$STRIP,;t t +-s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t +-s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +-s,@mkdir_p@,$mkdir_p,;t t +-s,@AWK@,$AWK,;t t +-s,@SET_MAKE@,$SET_MAKE,;t t +-s,@am__leading_dot@,$am__leading_dot,;t t +-s,@AMTAR@,$AMTAR,;t t +-s,@am__tar@,$am__tar,;t t +-s,@am__untar@,$am__untar,;t t +-s,@BASH@,$BASH,;t t +-s,@CC@,$CC,;t t +-s,@CFLAGS@,$CFLAGS,;t t +-s,@LDFLAGS@,$LDFLAGS,;t t +-s,@CPPFLAGS@,$CPPFLAGS,;t t +-s,@ac_ct_CC@,$ac_ct_CC,;t t +-s,@EXEEXT@,$EXEEXT,;t t +-s,@OBJEXT@,$OBJEXT,;t t +-s,@DEPDIR@,$DEPDIR,;t t +-s,@am__include@,$am__include,;t t +-s,@am__quote@,$am__quote,;t t +-s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t +-s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t +-s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t +-s,@CCDEPMODE@,$CCDEPMODE,;t t +-s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +-s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +-s,@RANLIB@,$RANLIB,;t t +-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +-s,@CPP@,$CPP,;t t +-s,@EGREP@,$EGREP,;t t +-s,@ENDIAN@,$ENDIAN,;t t +-s,@build@,$build,;t t +-s,@build_cpu@,$build_cpu,;t t +-s,@build_vendor@,$build_vendor,;t t +-s,@build_os@,$build_os,;t t +-s,@host@,$host,;t t +-s,@host_cpu@,$host_cpu,;t t +-s,@host_vendor@,$host_vendor,;t t +-s,@host_os@,$host_os,;t t +-s,@SED@,$SED,;t t +-s,@LN_S@,$LN_S,;t t +-s,@ECHO@,$ECHO,;t t +-s,@AR@,$AR,;t t +-s,@ac_ct_AR@,$ac_ct_AR,;t t +-s,@CXX@,$CXX,;t t +-s,@CXXFLAGS@,$CXXFLAGS,;t t +-s,@ac_ct_CXX@,$ac_ct_CXX,;t t +-s,@CXXDEPMODE@,$CXXDEPMODE,;t t +-s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t +-s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t +-s,@CXXCPP@,$CXXCPP,;t t +-s,@F77@,$F77,;t t +-s,@FFLAGS@,$FFLAGS,;t t +-s,@ac_ct_F77@,$ac_ct_F77,;t t +-s,@LIBTOOL@,$LIBTOOL,;t t +-s,@DEBUG_TRUE@,$DEBUG_TRUE,;t t +-s,@DEBUG_FALSE@,$DEBUG_FALSE,;t t +-s,@LIBOBJS@,$LIBOBJS,;t t +-s,@LTLIBOBJS@,$LTLIBOBJS,;t t +-CEOF ++ac_cr=' ' ++ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` ++if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ++ ac_cs_awk_cr='\\r' ++else ++ ac_cs_awk_cr=$ac_cr ++fi + ++echo 'BEGIN {' >"$tmp/subs1.awk" && + _ACEOF + +- cat >>$CONFIG_STATUS <<\_ACEOF +- # Split the substitutions into bite-sized pieces for seds with +- # small command number limits, like on Digital OSF/1 and HP-UX. +- ac_max_sed_lines=48 +- ac_sed_frag=1 # Number of current file. +- ac_beg=1 # First line for current file. +- ac_end=$ac_max_sed_lines # Line after last line for current file. +- ac_more_lines=: +- ac_sed_cmds= +- while $ac_more_lines; do +- if test $ac_beg -gt 1; then +- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag +- else +- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag +- fi +- if test ! -s $tmp/subs.frag; then +- ac_more_lines=false +- else +- # The purpose of the label and of the branching condition is to +- # speed up the sed processing (if there are no `@' at all, there +- # is no need to browse any of the substitutions). +- # These are the two extra sed commands mentioned above. +- (echo ':t +- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed +- if test -z "$ac_sed_cmds"; then +- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" +- else +- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" +- fi +- ac_sed_frag=`expr $ac_sed_frag + 1` +- ac_beg=$ac_end +- ac_end=`expr $ac_end + $ac_max_sed_lines` +- fi +- done +- if test -z "$ac_sed_cmds"; then +- ac_sed_cmds=cat ++ ++{ ++ echo "cat >conf$$subs.awk <<_ACEOF" && ++ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && ++ echo "_ACEOF" ++} >conf$$subs.sh || ++ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 ++$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} ++ { (exit 1); exit 1; }; } ++ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ++ac_delim='%!_!# ' ++for ac_last_try in false false false false false :; do ++ . ./conf$$subs.sh || ++ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 ++$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} ++ { (exit 1); exit 1; }; } ++ ++ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` ++ if test $ac_delim_n = $ac_delim_num; then ++ break ++ elif $ac_last_try; then ++ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 ++$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} ++ { (exit 1); exit 1; }; } ++ else ++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi ++done ++rm -f conf$$subs.sh ++ ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ++cat >>"\$tmp/subs1.awk" <<\\_ACAWK && ++_ACEOF ++sed -n ' ++h ++s/^/S["/; s/!.*/"]=/ ++p ++g ++s/^[^!]*!// ++:repl ++t repl ++s/'"$ac_delim"'$// ++t delim ++:nl ++h ++s/\(.\{148\}\).*/\1/ ++t more1 ++s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ ++p ++n ++b repl ++:more1 ++s/["\\]/\\&/g; s/^/"/; s/$/"\\/ ++p ++g ++s/.\{148\}// ++t nl ++:delim ++h ++s/\(.\{148\}\).*/\1/ ++t more2 ++s/["\\]/\\&/g; s/^/"/; s/$/"/ ++p ++b ++:more2 ++s/["\\]/\\&/g; s/^/"/; s/$/"\\/ ++p ++g ++s/.\{148\}// ++t delim ++' >$CONFIG_STATUS || ac_write_fail=1 ++rm -f conf$$subs.awk ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ++_ACAWK ++cat >>"\$tmp/subs1.awk" <<_ACAWK && ++ for (key in S) S_is_set[key] = 1 ++ FS = "" ++ ++} ++{ ++ line = $ 0 ++ nfields = split(line, field, "@") ++ substed = 0 ++ len = length(field[1]) ++ for (i = 2; i < nfields; i++) { ++ key = field[i] ++ keylen = length(key) ++ if (S_is_set[key]) { ++ value = S[key] ++ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) ++ len += length(value) + length(field[++i]) ++ substed = 1 ++ } else ++ len += 1 + keylen ++ } ++ ++ print line ++} ++ ++_ACAWK ++_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ++if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then ++ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" ++else ++ cat ++fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ ++ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 ++$as_echo "$as_me: error: could not setup config files machinery" >&2;} ++ { (exit 1); exit 1; }; } ++_ACEOF ++ ++# VPATH may cause trouble with some makes, so we remove $(srcdir), ++# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and ++# trailing colons and then remove the whole line if VPATH becomes empty ++# (actually we leave an empty line to preserve line numbers). ++if test "x$srcdir" = x.; then ++ ac_vpsub='/^[ ]*VPATH[ ]*=/{ ++s/:*\$(srcdir):*/:/ ++s/:*\${srcdir}:*/:/ ++s/:*@srcdir@:*/:/ ++s/^\([^=]*=[ ]*\):*/\1/ ++s/:*$// ++s/^[^=]*=[ ]*$// ++}' ++fi ++ ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + 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'. ++if test -n "$CONFIG_HEADERS"; then ++cat >"$tmp/defines.awk" <<\_ACAWK || ++BEGIN { + _ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF +-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue +- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". +- case $ac_file in +- - | *:- | *:-:* ) # input from stdin +- cat >$tmp/stdin +- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- * ) ac_file_in=$ac_file.in ;; ++ ++# 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. ++ ++# Create a delimiter string that does not exist in confdefs.h, to ease ++# handling of long lines. ++ac_delim='%!_!# ' ++for ac_last_try in false false :; do ++ ac_t=`sed -n "/$ac_delim/p" confdefs.h` ++ if test -z "$ac_t"; then ++ break ++ elif $ac_last_try; then ++ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 ++$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} ++ { (exit 1); exit 1; }; } ++ else ++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! " ++ fi ++done ++ ++# For the awk script, D is an array of macro values keyed by name, ++# likewise P contains macro parameters if any. Preserve backslash ++# newline sequences. ++ ++ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* ++sed -n ' ++s/.\{148\}/&'"$ac_delim"'/g ++t rset ++:rset ++s/^[ ]*#[ ]*define[ ][ ]*/ / ++t def ++d ++:def ++s/\\$// ++t bsnl ++s/["\\]/\\&/g ++s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ ++D["\1"]=" \3"/p ++s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p ++d ++:bsnl ++s/["\\]/\\&/g ++s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ ++D["\1"]=" \3\\\\\\n"\\/p ++t cont ++s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p ++t cont ++d ++:cont ++n ++s/.\{148\}/&'"$ac_delim"'/g ++t clear ++:clear ++s/\\$// ++t bsnlc ++s/["\\]/\\&/g; s/^/"/; s/$/"/p ++d ++:bsnlc ++s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p ++b cont ++' >$CONFIG_STATUS || ac_write_fail=1 ++ ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ++ for (key in D) D_is_set[key] = 1 ++ FS = "" ++} ++/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { ++ line = \$ 0 ++ split(line, arg, " ") ++ if (arg[1] == "#") { ++ defundef = arg[2] ++ mac1 = arg[3] ++ } else { ++ defundef = substr(arg[1], 2) ++ mac1 = arg[2] ++ } ++ split(mac1, mac2, "(") #) ++ macro = mac2[1] ++ prefix = substr(line, 1, index(line, defundef) - 1) ++ if (D_is_set[macro]) { ++ # Preserve the white space surrounding the "#". ++ print prefix "define", macro P[macro] D[macro] ++ next ++ } else { ++ # Replace #undef with comments. This is necessary, for example, ++ # in the case of _POSIX_SOURCE, which is predefined and required ++ # on some systems where configure will not decide to define it. ++ if (defundef == "undef") { ++ print "/*", prefix defundef, macro, "*/" ++ next ++ } ++ } ++} ++{ print } ++_ACAWK ++_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ++ { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 ++$as_echo "$as_me: error: could not setup config headers machinery" >&2;} ++ { (exit 1); exit 1; }; } ++fi # test -n "$CONFIG_HEADERS" ++ ++ ++eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" ++shift ++for ac_tag ++do ++ case $ac_tag in ++ :[FHLC]) ac_mode=$ac_tag; continue;; ++ esac ++ case $ac_mode$ac_tag in ++ :[FHL]*:*);; ++ :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 ++$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} ++ { (exit 1); exit 1; }; };; ++ :[FH]-) ac_tag=-:-;; ++ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; ++ esac ++ ac_save_IFS=$IFS ++ IFS=: ++ set x $ac_tag ++ IFS=$ac_save_IFS ++ shift ++ ac_file=$1 ++ shift ++ ++ case $ac_mode in ++ :L) ac_source=$1;; ++ :[FH]) ++ ac_file_inputs= ++ for ac_f ++ do ++ case $ac_f in ++ -) ac_f="$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 `:'. ++ test -f "$ac_f" || ++ case $ac_f in ++ [\\/$]*) false;; ++ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; ++ esac || ++ { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 ++$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} ++ { (exit 1); exit 1; }; };; ++ esac ++ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ++ ac_file_inputs="$ac_file_inputs '$ac_f'" ++ done ++ ++ # 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 '` ++ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' ++ `' by configure.' ++ if test x"$ac_file" != x-; then ++ configure_input="$ac_file. $configure_input" ++ { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 ++$as_echo "$as_me: creating $ac_file" >&6;} ++ fi ++ # Neutralize special characters interpreted by sed in replacement strings. ++ case $configure_input in #( ++ *\&* | *\|* | *\\* ) ++ ac_sed_conf_input=`$as_echo "$configure_input" | ++ sed 's/[\\\\&|]/\\\\&/g'`;; #( ++ *) ac_sed_conf_input=$configure_input;; ++ esac ++ ++ case $ac_tag in ++ *:-:* | *:-) cat >"$tmp/stdin" \ ++ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 ++$as_echo "$as_me: error: could not create $ac_file" >&2;} ++ { (exit 1); exit 1; }; } ;; ++ esac ++ ;; + esac + +- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. +- ac_dir=`(dirname "$ac_file") 2>/dev/null || ++ ac_dir=`$as_dirname -- "$ac_file" || + $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ +- X"$ac_file" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$ac_file" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- { if $as_mkdir_p; then +- mkdir -p "$ac_dir" +- else +- as_dir="$ac_dir" ++ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X"$ac_file" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ { as_dir="$ac_dir" ++ case $as_dir in #( ++ -*) as_dir=./$as_dir;; ++ esac ++ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= +- while test ! -d "$as_dir"; do +- as_dirs="$as_dir $as_dirs" +- as_dir=`(dirname "$as_dir") 2>/dev/null || ++ while :; do ++ case $as_dir in #( ++ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( ++ *) as_qdir=$as_dir;; ++ esac ++ as_dirs="'$as_qdir' $as_dirs" ++ as_dir=`$as_dirname -- "$as_dir" || + $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X"$as_dir" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ test -d "$as_dir" && break + done +- test ! -n "$as_dirs" || mkdir $as_dirs +- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} ++ test -z "$as_dirs" || eval "mkdir $as_dirs" ++ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 ++$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } +- + ac_builddir=. + +-if test "$ac_dir" != .; then +- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` +- # A "../" for each directory in $ac_dir_suffix. +- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +-else +- ac_dir_suffix= ac_top_builddir= +-fi ++case "$ac_dir" in ++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; ++*) ++ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` ++ # A ".." for each directory in $ac_dir_suffix. ++ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` ++ case $ac_top_builddir_sub in ++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;; ++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; ++ esac ;; ++esac ++ac_abs_top_builddir=$ac_pwd ++ac_abs_builddir=$ac_pwd$ac_dir_suffix ++# for backward compatibility: ++ac_top_builddir=$ac_top_build_prefix + + case $srcdir in +- .) # No --srcdir option. We are building in place. ++ .) # We are building in place. + ac_srcdir=. +- if test -z "$ac_top_builddir"; then +- ac_top_srcdir=. +- else +- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` +- fi ;; +- [\\/]* | ?:[\\/]* ) # Absolute path. ++ ac_top_srcdir=$ac_top_builddir_sub ++ ac_abs_top_srcdir=$ac_pwd ;; ++ [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; +- ac_top_srcdir=$srcdir ;; +- *) # Relative path. +- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix +- ac_top_srcdir=$ac_top_builddir$srcdir ;; +-esac ++ ac_top_srcdir=$srcdir ++ ac_abs_top_srcdir=$srcdir ;; ++ *) # Relative name. ++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ++ ac_top_srcdir=$ac_top_build_prefix$srcdir ++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;; ++esac ++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + +-# Do not use `cd foo && pwd` to compute absolute paths, because +-# the directories may not exist. +-case `pwd` in +-.) ac_abs_builddir="$ac_dir";; +-*) +- case "$ac_dir" in +- .) ac_abs_builddir=`pwd`;; +- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; +- *) ac_abs_builddir=`pwd`/"$ac_dir";; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_builddir=${ac_top_builddir}.;; +-*) +- case ${ac_top_builddir}. in +- .) ac_abs_top_builddir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; +- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_srcdir=$ac_srcdir;; +-*) +- case $ac_srcdir in +- .) ac_abs_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; +- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_srcdir=$ac_top_srcdir;; +-*) +- case $ac_top_srcdir in +- .) ac_abs_top_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; +- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; +- esac;; +-esac + ++ case $ac_mode in ++ :F) ++ # ++ # CONFIG_FILE ++ # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; +- *) ac_INSTALL=$ac_top_builddir$INSTALL ;; ++ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac ++_ACEOF + +- if test x"$ac_file" != x-; then +- { echo "$as_me:$LINENO: creating $ac_file" >&5 +-echo "$as_me: creating $ac_file" >&6;} +- rm -f "$ac_file" +- fi +- # 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. */ +- if test x"$ac_file" = x-; then +- configure_input= +- else +- configure_input="$ac_file. " +- fi +- configure_input=$configure_input"Generated from `echo $ac_file_in | +- sed 's,.*/,,'` by configure." ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ++# If the template does not know about datarootdir, expand it. ++# FIXME: This hack should be removed a few years after 2.60. ++ac_datarootdir_hack=; ac_datarootdir_seen= + +- # First look for the input files in the build tree, otherwise in the +- # src tree. +- ac_file_inputs=`IFS=: +- for f in $ac_file_in; do +- case $f in +- -) echo $tmp/stdin ;; +- [\\/$]*) +- # Absolute (can't be DOS-style, as IFS=:) +- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- echo "$f";; +- *) # Relative +- if test -f "$f"; then +- # Build tree +- echo "$f" +- elif test -f "$srcdir/$f"; then +- # Source tree +- echo "$srcdir/$f" +- else +- # /dev/null tree +- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- fi;; +- esac +- done` || { (exit 1); exit 1; } ++ac_sed_dataroot=' ++/datarootdir/ { ++ p ++ q ++} ++/@datadir@/p ++/@docdir@/p ++/@infodir@/p ++/@localedir@/p ++/@mandir@/p ++' ++case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in ++*datarootdir*) ac_datarootdir_seen=yes;; ++*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 ++$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} ++_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ++ ac_datarootdir_hack=' ++ s&@datadir@&$datadir&g ++ s&@docdir@&$docdir&g ++ s&@infodir@&$infodir&g ++ s&@localedir@&$localedir&g ++ s&@mandir@&$mandir&g ++ s&\\\${datarootdir}&$datarootdir&g' ;; ++esac + _ACEOF +-cat >>$CONFIG_STATUS <<_ACEOF +- sed "$ac_vpsub ++ ++# 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 ++ac_sed_extra="$ac_vpsub + $extrasub + _ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + :t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b +-s,@configure_input@,$configure_input,;t t +-s,@srcdir@,$ac_srcdir,;t t +-s,@abs_srcdir@,$ac_abs_srcdir,;t t +-s,@top_srcdir@,$ac_top_srcdir,;t t +-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +-s,@builddir@,$ac_builddir,;t t +-s,@abs_builddir@,$ac_abs_builddir,;t t +-s,@top_builddir@,$ac_top_builddir,;t t +-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +-s,@INSTALL@,$ac_INSTALL,;t t +-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out +- rm -f $tmp/stdin +- if test x"$ac_file" != x-; then +- mv $tmp/out $ac_file +- else +- cat $tmp/out +- rm -f $tmp/out +- fi ++s|@configure_input@|$ac_sed_conf_input|;t t ++s&@top_builddir@&$ac_top_builddir_sub&;t t ++s&@top_build_prefix@&$ac_top_build_prefix&;t t ++s&@srcdir@&$ac_srcdir&;t t ++s&@abs_srcdir@&$ac_abs_srcdir&;t t ++s&@top_srcdir@&$ac_top_srcdir&;t t ++s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t ++s&@builddir@&$ac_builddir&;t t ++s&@abs_builddir@&$ac_abs_builddir&;t t ++s&@abs_top_builddir@&$ac_abs_top_builddir&;t t ++s&@INSTALL@&$ac_INSTALL&;t t ++$ac_datarootdir_hack ++" ++eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ ++ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 ++$as_echo "$as_me: error: could not create $ac_file" >&2;} ++ { (exit 1); exit 1; }; } + +-done +-_ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF ++test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && ++ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && ++ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' ++which seems to be undefined. Please make sure it is defined." >&5 ++$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' ++which seems to be undefined. Please make sure it is defined." >&2;} + +-# +-# CONFIG_HEADER section. +-# +- +-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +-# NAME is the cpp macro being defined and VALUE is the value it is being given. +-# +-# ac_d sets the value in "#define NAME VALUE" lines. +-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +-ac_dB='[ ].*$,\1#\2' +-ac_dC=' ' +-ac_dD=',;t' +-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +-ac_uB='$,\1#\2define\3' +-ac_uC=' ' +-ac_uD=',;t' +- +-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue +- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ++ rm -f "$tmp/stdin" + case $ac_file in +- - | *:- | *:-:* ) # input from stdin +- cat >$tmp/stdin +- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- * ) ac_file_in=$ac_file.in ;; +- esac +- +- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +-echo "$as_me: creating $ac_file" >&6;} +- +- # First look for the input files in the build tree, otherwise in the +- # src tree. +- ac_file_inputs=`IFS=: +- for f in $ac_file_in; do +- case $f in +- -) echo $tmp/stdin ;; +- [\\/$]*) +- # Absolute (can't be DOS-style, as IFS=:) +- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} ++ -) cat "$tmp/out" && rm -f "$tmp/out";; ++ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; ++ esac \ ++ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 ++$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } +- # Do quote $f, to prevent DOS paths from being IFS'd. +- echo "$f";; +- *) # Relative +- if test -f "$f"; then +- # Build tree +- echo "$f" +- elif test -f "$srcdir/$f"; then +- # Source tree +- echo "$srcdir/$f" +- else +- # /dev/null tree +- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- fi;; +- esac +- done` || { (exit 1); exit 1; } +- # Remove the trailing spaces. +- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in +- +-_ACEOF +- +-# Transform confdefs.h into two sed scripts, `conftest.defines' and +-# `conftest.undefs', that substitutes the proper values into +-# config.h.in to produce config.h. The first handles `#define' +-# templates, and the second `#undef' templates. +-# And first: Protect against being on the right side of a sed subst in +-# config.status. Protect against being in an unquoted here document +-# in config.status. +-rm -f conftest.defines conftest.undefs +-# Using a here document instead of a string reduces the quoting nightmare. +-# Putting comments in sed scripts is not portable. +-# +-# `end' is used to avoid that the second main sed command (meant for +-# 0-ary CPP macros) applies to n-ary macro definitions. +-# See the Autoconf documentation for `clear'. +-cat >confdef2sed.sed <<\_ACEOF +-s/[\\&,]/\\&/g +-s,[\\$`],\\&,g +-t clear +-: clear +-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +-t end +-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +-: end +-_ACEOF +-# If some macros were called several times there might be several times +-# the same #defines, which is useless. Nevertheless, we may not want to +-# sort them, since we want the *last* AC-DEFINE to be honored. +-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +-rm -f confdef2sed.sed +- +-# This sed command replaces #undef with comments. This is necessary, for +-# example, in the case of _POSIX_SOURCE, which is predefined and required +-# on some systems where configure will not decide to define it. +-cat >>conftest.undefs <<\_ACEOF +-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +-_ACEOF +- +-# Break up conftest.defines because some shells have a limit on the size +-# of here documents, and old seds have small limits too (100 cmds). +-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +-echo ' :' >>$CONFIG_STATUS +-rm -f conftest.tail +-while grep . conftest.defines >/dev/null +-do +- # Write a limited-size here document to $tmp/defines.sed. +- echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS +- # Speed up: don't consider the non `#define' lines. +- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS +- # Work around the forget-to-reset-the-flag bug. +- echo 't clr' >>$CONFIG_STATUS +- echo ': clr' >>$CONFIG_STATUS +- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS +- echo 'CEOF +- sed -f $tmp/defines.sed $tmp/in >$tmp/out +- rm -f $tmp/in +- mv $tmp/out $tmp/in +-' >>$CONFIG_STATUS +- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail +- rm -f conftest.defines +- mv conftest.tail conftest.defines +-done +-rm -f conftest.defines +-echo ' fi # grep' >>$CONFIG_STATUS +-echo >>$CONFIG_STATUS +- +-# Break up conftest.undefs because some shells have a limit on the size +-# of here documents, and old seds have small limits too (100 cmds). +-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +-rm -f conftest.tail +-while grep . conftest.undefs >/dev/null +-do +- # Write a limited-size here document to $tmp/undefs.sed. +- echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS +- # Speed up: don't consider the non `#undef' +- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS +- # Work around the forget-to-reset-the-flag bug. +- echo 't clr' >>$CONFIG_STATUS +- echo ': clr' >>$CONFIG_STATUS +- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS +- echo 'CEOF +- sed -f $tmp/undefs.sed $tmp/in >$tmp/out +- rm -f $tmp/in +- mv $tmp/out $tmp/in +-' >>$CONFIG_STATUS +- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail +- rm -f conftest.undefs +- mv conftest.tail conftest.undefs +-done +-rm -f conftest.undefs +- +-cat >>$CONFIG_STATUS <<\_ACEOF +- # 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. */ +- if test x"$ac_file" = x-; then +- echo "/* Generated by configure. */" >$tmp/config.h +- else +- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h +- fi +- cat $tmp/in >>$tmp/config.h +- rm -f $tmp/in ++ ;; ++ :H) ++ # ++ # CONFIG_HEADER ++ # + if test x"$ac_file" != x-; then +- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then +- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +-echo "$as_me: $ac_file is unchanged" >&6;} ++ { ++ $as_echo "/* $configure_input */" \ ++ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" ++ } >"$tmp/config.h" \ ++ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 ++$as_echo "$as_me: error: could not create $ac_file" >&2;} ++ { (exit 1); exit 1; }; } ++ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then ++ { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 ++$as_echo "$as_me: $ac_file is unchanged" >&6;} + else +- ac_dir=`(dirname "$ac_file") 2>/dev/null || +-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$ac_file" : 'X\(//\)[^/]' \| \ +- X"$ac_file" : 'X\(//\)$' \| \ +- X"$ac_file" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$ac_file" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- { if $as_mkdir_p; then +- mkdir -p "$ac_dir" +- else +- as_dir="$ac_dir" +- as_dirs= +- while test ! -d "$as_dir"; do +- as_dirs="$as_dir $as_dirs" +- as_dir=`(dirname "$as_dir") 2>/dev/null || +-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$as_dir" : 'X\(//\)[^/]' \| \ +- X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- done +- test ! -n "$as_dirs" || mkdir $as_dirs +- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} +- { (exit 1); exit 1; }; }; } +- +- rm -f $ac_file +- mv $tmp/config.h $ac_file ++ rm -f "$ac_file" ++ mv "$tmp/config.h" "$ac_file" \ ++ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 ++$as_echo "$as_me: error: could not create $ac_file" >&2;} ++ { (exit 1); exit 1; }; } + fi + else +- cat $tmp/config.h +- rm -f $tmp/config.h ++ $as_echo "/* $configure_input */" \ ++ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ ++ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 ++$as_echo "$as_me: error: could not create -" >&2;} ++ { (exit 1); exit 1; }; } + fi +-# Compute $ac_file's index in $config_headers. ++# Compute "$ac_file"'s index in $config_headers. + _am_stamp_count=1 + for _am_header in $config_headers :; do + case $_am_header in +- $ac_file | $ac_file:* ) ++ "$ac_file" | "$ac_file":* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac + done +-echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || +-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X$ac_file : 'X\(//\)[^/]' \| \ +- X$ac_file : 'X\(//\)$' \| \ +- X$ac_file : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X$ac_file | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'`/stamp-h$_am_stamp_count +-done +-_ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF ++echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" || ++$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$ac_file" : 'X\(//\)[^/]' \| \ ++ X"$ac_file" : 'X\(//\)$' \| \ ++ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X"$ac_file" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'`/stamp-h$_am_stamp_count ++ ;; + +-# +-# CONFIG_COMMANDS section. +-# +-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue +- ac_dest=`echo "$ac_file" | sed 's,:.*,,'` +- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_dir=`(dirname "$ac_dest") 2>/dev/null || +-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$ac_dest" : 'X\(//\)[^/]' \| \ +- X"$ac_dest" : 'X\(//\)$' \| \ +- X"$ac_dest" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$ac_dest" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- { if $as_mkdir_p; then +- mkdir -p "$ac_dir" +- else +- as_dir="$ac_dir" +- as_dirs= +- while test ! -d "$as_dir"; do +- as_dirs="$as_dir $as_dirs" +- as_dir=`(dirname "$as_dir") 2>/dev/null || +-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$as_dir" : 'X\(//\)[^/]' \| \ +- X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- done +- test ! -n "$as_dirs" || mkdir $as_dirs +- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} +- { (exit 1); exit 1; }; }; } ++ :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 ++$as_echo "$as_me: executing $ac_file commands" >&6;} ++ ;; ++ esac + +- ac_builddir=. + +-if test "$ac_dir" != .; then +- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` +- # A "../" for each directory in $ac_dir_suffix. +- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +-else +- ac_dir_suffix= ac_top_builddir= +-fi +- +-case $srcdir in +- .) # No --srcdir option. We are building in place. +- ac_srcdir=. +- if test -z "$ac_top_builddir"; then +- ac_top_srcdir=. +- else +- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` +- fi ;; +- [\\/]* | ?:[\\/]* ) # Absolute path. +- ac_srcdir=$srcdir$ac_dir_suffix; +- ac_top_srcdir=$srcdir ;; +- *) # Relative path. +- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix +- ac_top_srcdir=$ac_top_builddir$srcdir ;; +-esac +- +-# Do not use `cd foo && pwd` to compute absolute paths, because +-# the directories may not exist. +-case `pwd` in +-.) ac_abs_builddir="$ac_dir";; +-*) +- case "$ac_dir" in +- .) ac_abs_builddir=`pwd`;; +- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; +- *) ac_abs_builddir=`pwd`/"$ac_dir";; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_builddir=${ac_top_builddir}.;; +-*) +- case ${ac_top_builddir}. in +- .) ac_abs_top_builddir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; +- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_srcdir=$ac_srcdir;; +-*) +- case $ac_srcdir in +- .) ac_abs_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; +- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_srcdir=$ac_top_srcdir;; +-*) +- case $ac_top_srcdir in +- .) ac_abs_top_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; +- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; +- esac;; +-esac +- +- +- { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +-echo "$as_me: executing $ac_dest commands" >&6;} +- case $ac_dest in +- depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do ++ case $ac_file$ac_mode in ++ "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. +@@ -22654,18 +24112,29 @@ echo "$as_me: executing $ac_dest commands" >&6;} + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then +- dirpart=`(dirname "$mf") 2>/dev/null || ++ dirpart=`$as_dirname -- "$mf" || + $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ +- X"$mf" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$mf" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ X"$mf" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X"$mf" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + else + continue + fi +@@ -22687,60 +24156,91 @@ echo X"$mf" | + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue +- fdir=`(dirname "$file") 2>/dev/null || ++ fdir=`$as_dirname -- "$file" || + $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ +- X"$file" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$file" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- { if $as_mkdir_p; then +- mkdir -p $dirpart/$fdir +- else +- as_dir=$dirpart/$fdir ++ X"$file" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X"$file" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ { as_dir=$dirpart/$fdir ++ case $as_dir in #( ++ -*) as_dir=./$as_dir;; ++ esac ++ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= +- while test ! -d "$as_dir"; do +- as_dirs="$as_dir $as_dirs" +- as_dir=`(dirname "$as_dir") 2>/dev/null || ++ while :; do ++ case $as_dir in #( ++ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( ++ *) as_qdir=$as_dir;; ++ esac ++ as_dirs="'$as_qdir' $as_dirs" ++ as_dir=`$as_dirname -- "$as_dir" || + $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X"$as_dir" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ test -d "$as_dir" && break + done +- test ! -n "$as_dirs" || mkdir $as_dirs +- fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 +-echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} ++ test -z "$as_dirs" || eval "mkdir $as_dirs" ++ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 ++$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } +- + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done + ;; +- default ) echo 'char *build_date = "'`date`'";' > src/unix/build_date.c && echo 'char *build_date;'> src/unix/build_date.h ;; ++ "default":C) echo 'char *build_date = "'`date`'";' > src/unix/build_date.c && echo 'char *build_date;'> src/unix/build_date.h ;; ++ + esac +-done +-_ACEOF ++done # for ac_tag + +-cat >>$CONFIG_STATUS <<\_ACEOF + + { (exit 0); exit 0; } + _ACEOF + chmod +x $CONFIG_STATUS + ac_clean_files=$ac_clean_files_save + ++test $ac_write_fail = 0 || ++ { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 ++$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} ++ { (exit 1); exit 1; }; } ++ + + # configure is writing to config.log, and then calls config.status. + # config.status does its own redirection, appending to config.log. +@@ -22762,4 +24262,8 @@ if test "$no_create" != yes; then + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } + fi ++if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then ++ { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 ++$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} ++fi + +-- +1.8.3.1 + diff --git a/0063-fix-order-of-setting-uid-gid-and-drop-supplementary-.patch b/0063-fix-order-of-setting-uid-gid-and-drop-supplementary-.patch deleted file mode 100644 index cedb4e0..0000000 --- a/0063-fix-order-of-setting-uid-gid-and-drop-supplementary-.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 3cac85a3f97d0a22270166f428209f873b58c319 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Tue, 11 Jun 2013 11:25:27 -0700 -Subject: [PATCH] iscsid: fix order of setting uid/gid and drop supplementary - groups - -If using the user and group ID settings together the existing order of -calling setuid first will almost always cause the setgid call to fail, -assuming the new effective user id does not have the CAP_SETGID -capability. The effective group ID needs to change first. - -While we're at it, if iscsid is started as root it should drop any -inherited supplementary group permissions. - -And if anyone is actually using this to try and isolate capabilities, -they probably care enough to want to known that it is failing. Make -iscsid startup fail instead of just calling perror. - -Signed-off-by: Chris Leech ---- - usr/iscsid.c | 23 +++++++++++++++++++---- - 1 file changed, 19 insertions(+), 4 deletions(-) - -diff --git a/usr/iscsid.c b/usr/iscsid.c -index b4bb65b..c0ea6fa 100644 ---- a/usr/iscsid.c -+++ b/usr/iscsid.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -477,11 +478,25 @@ int main(int argc, char *argv[]) - } - } - -- if (uid && setuid(uid) < 0) -- perror("setuid\n"); -+ if (gid && setgid(gid) < 0) { -+ log_error("Unable to setgid to %d\n", gid); -+ log_close(log_pid); -+ exit(ISCSI_ERR); -+ } - -- if (gid && setgid(gid) < 0) -- perror("setgid\n"); -+ if ((geteuid() == 0) && (getgroups(0, NULL))) { -+ if (setgroups(0, NULL) != 0) { -+ log_error("Unable to drop supplementary group ids\n"); -+ log_close(log_pid); -+ exit(ISCSI_ERR); -+ } -+ } -+ -+ if (uid && setuid(uid) < 0) { -+ log_error("Unable to setuid to %d\n", uid); -+ log_close(log_pid); -+ exit(ISCSI_ERR); -+ } - - memset(&daemon_config, 0, sizeof (daemon_config)); - daemon_config.pid_file = pid_file; --- -1.8.1.4 - diff --git a/0064-ISCSIUIO-Removed-the-auto-generated-COPYING-file.patch b/0064-ISCSIUIO-Removed-the-auto-generated-COPYING-file.patch new file mode 100644 index 0000000..60918a8 --- /dev/null +++ b/0064-ISCSIUIO-Removed-the-auto-generated-COPYING-file.patch @@ -0,0 +1,701 @@ +From 5f2f3d74b2503e313b7909a3b436071a0757e582 Mon Sep 17 00:00:00 2001 +From: Eddie Wai +Date: Fri, 9 Aug 2013 18:32:44 -0700 +Subject: [PATCH] ISCSIUIO: Removed the auto-generated COPYING file + +The automake generated COPYING file in the iscsiuio folder +unintentionally suggested that the iscsiuio source might be +released as GPL licensed instead of the intended 4-clause BSD +license. + +The patch is to remove the COPYING file. + +Signed-off-by: Eddie Wai +--- + iscsiuio/COPYING | 674 ------------------------------------------------------- + 1 file changed, 674 deletions(-) + delete mode 100644 iscsiuio/COPYING + +diff --git a/iscsiuio/COPYING b/iscsiuio/COPYING +deleted file mode 100644 +index 94a9ed0..0000000 +--- a/iscsiuio/COPYING ++++ /dev/null +@@ -1,674 +0,0 @@ +- GNU GENERAL PUBLIC LICENSE +- Version 3, 29 June 2007 +- +- Copyright (C) 2007 Free Software Foundation, Inc. +- Everyone is permitted to copy and distribute verbatim copies +- of this license document, but changing it is not allowed. +- +- Preamble +- +- The GNU General Public License is a free, copyleft license for +-software and other kinds of works. +- +- The licenses for most software and other practical works are designed +-to take away your freedom to share and change the works. By contrast, +-the GNU General Public License is intended to guarantee your freedom to +-share and change all versions of a program--to make sure it remains free +-software for all its users. We, the Free Software Foundation, use the +-GNU General Public License for most of our software; it applies also to +-any other work released this way by its authors. You can apply it to +-your programs, too. +- +- When we speak of free software, we are referring to freedom, not +-price. Our General Public Licenses are designed to make sure that you +-have the freedom to distribute copies of free software (and charge for +-them if you wish), that you receive source code or can get it if you +-want it, that you can change the software or use pieces of it in new +-free programs, and that you know you can do these things. +- +- To protect your rights, we need to prevent others from denying you +-these rights or asking you to surrender the rights. Therefore, you have +-certain responsibilities if you distribute copies of the software, or if +-you modify it: responsibilities to respect the freedom of others. +- +- For example, if you distribute copies of such a program, whether +-gratis or for a fee, you must pass on to the recipients the same +-freedoms that you received. You must make sure that they, too, receive +-or can get the source code. And you must show them these terms so they +-know their rights. +- +- Developers that use the GNU GPL protect your rights with two steps: +-(1) assert copyright on the software, and (2) offer you this License +-giving you legal permission to copy, distribute and/or modify it. +- +- For the developers' and authors' protection, the GPL clearly explains +-that there is no warranty for this free software. For both users' and +-authors' sake, the GPL requires that modified versions be marked as +-changed, so that their problems will not be attributed erroneously to +-authors of previous versions. +- +- Some devices are designed to deny users access to install or run +-modified versions of the software inside them, although the manufacturer +-can do so. This is fundamentally incompatible with the aim of +-protecting users' freedom to change the software. The systematic +-pattern of such abuse occurs in the area of products for individuals to +-use, which is precisely where it is most unacceptable. Therefore, we +-have designed this version of the GPL to prohibit the practice for those +-products. If such problems arise substantially in other domains, we +-stand ready to extend this provision to those domains in future versions +-of the GPL, as needed to protect the freedom of users. +- +- Finally, every program is threatened constantly by software patents. +-States should not allow patents to restrict development and use of +-software on general-purpose computers, but in those that do, we wish to +-avoid the special danger that patents applied to a free program could +-make it effectively proprietary. To prevent this, the GPL assures that +-patents cannot be used to render the program non-free. +- +- The precise terms and conditions for copying, distribution and +-modification follow. +- +- TERMS AND CONDITIONS +- +- 0. Definitions. +- +- "This License" refers to version 3 of the GNU General Public License. +- +- "Copyright" also means copyright-like laws that apply to other kinds of +-works, such as semiconductor masks. +- +- "The Program" refers to any copyrightable work licensed under this +-License. Each licensee is addressed as "you". "Licensees" and +-"recipients" may be individuals or organizations. +- +- To "modify" a work means to copy from or adapt all or part of the work +-in a fashion requiring copyright permission, other than the making of an +-exact copy. The resulting work is called a "modified version" of the +-earlier work or a work "based on" the earlier work. +- +- A "covered work" means either the unmodified Program or a work based +-on the Program. +- +- To "propagate" a work means to do anything with it that, without +-permission, would make you directly or secondarily liable for +-infringement under applicable copyright law, except executing it on a +-computer or modifying a private copy. Propagation includes copying, +-distribution (with or without modification), making available to the +-public, and in some countries other activities as well. +- +- To "convey" a work means any kind of propagation that enables other +-parties to make or receive copies. Mere interaction with a user through +-a computer network, with no transfer of a copy, is not conveying. +- +- An interactive user interface displays "Appropriate Legal Notices" +-to the extent that it includes a convenient and prominently visible +-feature that (1) displays an appropriate copyright notice, and (2) +-tells the user that there is no warranty for the work (except to the +-extent that warranties are provided), that licensees may convey the +-work under this License, and how to view a copy of this License. If +-the interface presents a list of user commands or options, such as a +-menu, a prominent item in the list meets this criterion. +- +- 1. Source Code. +- +- The "source code" for a work means the preferred form of the work +-for making modifications to it. "Object code" means any non-source +-form of a work. +- +- A "Standard Interface" means an interface that either is an official +-standard defined by a recognized standards body, or, in the case of +-interfaces specified for a particular programming language, one that +-is widely used among developers working in that language. +- +- The "System Libraries" of an executable work include anything, other +-than the work as a whole, that (a) is included in the normal form of +-packaging a Major Component, but which is not part of that Major +-Component, and (b) serves only to enable use of the work with that +-Major Component, or to implement a Standard Interface for which an +-implementation is available to the public in source code form. A +-"Major Component", in this context, means a major essential component +-(kernel, window system, and so on) of the specific operating system +-(if any) on which the executable work runs, or a compiler used to +-produce the work, or an object code interpreter used to run it. +- +- The "Corresponding Source" for a work in object code form means all +-the source code needed to generate, install, and (for an executable +-work) run the object code and to modify the work, including scripts to +-control those activities. However, it does not include the work's +-System Libraries, or general-purpose tools or generally available free +-programs which are used unmodified in performing those activities but +-which are not part of the work. For example, Corresponding Source +-includes interface definition files associated with source files for +-the work, and the source code for shared libraries and dynamically +-linked subprograms that the work is specifically designed to require, +-such as by intimate data communication or control flow between those +-subprograms and other parts of the work. +- +- The Corresponding Source need not include anything that users +-can regenerate automatically from other parts of the Corresponding +-Source. +- +- The Corresponding Source for a work in source code form is that +-same work. +- +- 2. Basic Permissions. +- +- All rights granted under this License are granted for the term of +-copyright on the Program, and are irrevocable provided the stated +-conditions are met. This License explicitly affirms your unlimited +-permission to run the unmodified Program. The output from running a +-covered work is covered by this License only if the output, given its +-content, constitutes a covered work. This License acknowledges your +-rights of fair use or other equivalent, as provided by copyright law. +- +- You may make, run and propagate covered works that you do not +-convey, without conditions so long as your license otherwise remains +-in force. You may convey covered works to others for the sole purpose +-of having them make modifications exclusively for you, or provide you +-with facilities for running those works, provided that you comply with +-the terms of this License in conveying all material for which you do +-not control copyright. Those thus making or running the covered works +-for you must do so exclusively on your behalf, under your direction +-and control, on terms that prohibit them from making any copies of +-your copyrighted material outside their relationship with you. +- +- Conveying under any other circumstances is permitted solely under +-the conditions stated below. Sublicensing is not allowed; section 10 +-makes it unnecessary. +- +- 3. Protecting Users' Legal Rights From Anti-Circumvention Law. +- +- No covered work shall be deemed part of an effective technological +-measure under any applicable law fulfilling obligations under article +-11 of the WIPO copyright treaty adopted on 20 December 1996, or +-similar laws prohibiting or restricting circumvention of such +-measures. +- +- When you convey a covered work, you waive any legal power to forbid +-circumvention of technological measures to the extent such circumvention +-is effected by exercising rights under this License with respect to +-the covered work, and you disclaim any intention to limit operation or +-modification of the work as a means of enforcing, against the work's +-users, your or third parties' legal rights to forbid circumvention of +-technological measures. +- +- 4. Conveying Verbatim Copies. +- +- You may convey verbatim copies of the Program's source code as you +-receive it, in any medium, provided that you conspicuously and +-appropriately publish on each copy an appropriate copyright notice; +-keep intact all notices stating that this License and any +-non-permissive terms added in accord with section 7 apply to the code; +-keep intact all notices of the absence of any warranty; and give all +-recipients a copy of this License along with the Program. +- +- You may charge any price or no price for each copy that you convey, +-and you may offer support or warranty protection for a fee. +- +- 5. Conveying Modified Source Versions. +- +- You may convey a work based on the Program, or the modifications to +-produce it from the Program, in the form of source code under the +-terms of section 4, provided that you also meet all of these conditions: +- +- a) The work must carry prominent notices stating that you modified +- it, and giving a relevant date. +- +- b) The work must carry prominent notices stating that it is +- released under this License and any conditions added under section +- 7. This requirement modifies the requirement in section 4 to +- "keep intact all notices". +- +- c) You must license the entire work, as a whole, under this +- License to anyone who comes into possession of a copy. This +- License will therefore apply, along with any applicable section 7 +- additional terms, to the whole of the work, and all its parts, +- regardless of how they are packaged. This License gives no +- permission to license the work in any other way, but it does not +- invalidate such permission if you have separately received it. +- +- d) If the work has interactive user interfaces, each must display +- Appropriate Legal Notices; however, if the Program has interactive +- interfaces that do not display Appropriate Legal Notices, your +- work need not make them do so. +- +- A compilation of a covered work with other separate and independent +-works, which are not by their nature extensions of the covered work, +-and which are not combined with it such as to form a larger program, +-in or on a volume of a storage or distribution medium, is called an +-"aggregate" if the compilation and its resulting copyright are not +-used to limit the access or legal rights of the compilation's users +-beyond what the individual works permit. Inclusion of a covered work +-in an aggregate does not cause this License to apply to the other +-parts of the aggregate. +- +- 6. Conveying Non-Source Forms. +- +- You may convey a covered work in object code form under the terms +-of sections 4 and 5, provided that you also convey the +-machine-readable Corresponding Source under the terms of this License, +-in one of these ways: +- +- a) Convey the object code in, or embodied in, a physical product +- (including a physical distribution medium), accompanied by the +- Corresponding Source fixed on a durable physical medium +- customarily used for software interchange. +- +- b) Convey the object code in, or embodied in, a physical product +- (including a physical distribution medium), accompanied by a +- written offer, valid for at least three years and valid for as +- long as you offer spare parts or customer support for that product +- model, to give anyone who possesses the object code either (1) a +- copy of the Corresponding Source for all the software in the +- product that is covered by this License, on a durable physical +- medium customarily used for software interchange, for a price no +- more than your reasonable cost of physically performing this +- conveying of source, or (2) access to copy the +- Corresponding Source from a network server at no charge. +- +- c) Convey individual copies of the object code with a copy of the +- written offer to provide the Corresponding Source. This +- alternative is allowed only occasionally and noncommercially, and +- only if you received the object code with such an offer, in accord +- with subsection 6b. +- +- d) Convey the object code by offering access from a designated +- place (gratis or for a charge), and offer equivalent access to the +- Corresponding Source in the same way through the same place at no +- further charge. You need not require recipients to copy the +- Corresponding Source along with the object code. If the place to +- copy the object code is a network server, the Corresponding Source +- may be on a different server (operated by you or a third party) +- that supports equivalent copying facilities, provided you maintain +- clear directions next to the object code saying where to find the +- Corresponding Source. Regardless of what server hosts the +- Corresponding Source, you remain obligated to ensure that it is +- available for as long as needed to satisfy these requirements. +- +- e) Convey the object code using peer-to-peer transmission, provided +- you inform other peers where the object code and Corresponding +- Source of the work are being offered to the general public at no +- charge under subsection 6d. +- +- A separable portion of the object code, whose source code is excluded +-from the Corresponding Source as a System Library, need not be +-included in conveying the object code work. +- +- A "User Product" is either (1) a "consumer product", which means any +-tangible personal property which is normally used for personal, family, +-or household purposes, or (2) anything designed or sold for incorporation +-into a dwelling. In determining whether a product is a consumer product, +-doubtful cases shall be resolved in favor of coverage. For a particular +-product received by a particular user, "normally used" refers to a +-typical or common use of that class of product, regardless of the status +-of the particular user or of the way in which the particular user +-actually uses, or expects or is expected to use, the product. A product +-is a consumer product regardless of whether the product has substantial +-commercial, industrial or non-consumer uses, unless such uses represent +-the only significant mode of use of the product. +- +- "Installation Information" for a User Product means any methods, +-procedures, authorization keys, or other information required to install +-and execute modified versions of a covered work in that User Product from +-a modified version of its Corresponding Source. The information must +-suffice to ensure that the continued functioning of the modified object +-code is in no case prevented or interfered with solely because +-modification has been made. +- +- If you convey an object code work under this section in, or with, or +-specifically for use in, a User Product, and the conveying occurs as +-part of a transaction in which the right of possession and use of the +-User Product is transferred to the recipient in perpetuity or for a +-fixed term (regardless of how the transaction is characterized), the +-Corresponding Source conveyed under this section must be accompanied +-by the Installation Information. But this requirement does not apply +-if neither you nor any third party retains the ability to install +-modified object code on the User Product (for example, the work has +-been installed in ROM). +- +- The requirement to provide Installation Information does not include a +-requirement to continue to provide support service, warranty, or updates +-for a work that has been modified or installed by the recipient, or for +-the User Product in which it has been modified or installed. Access to a +-network may be denied when the modification itself materially and +-adversely affects the operation of the network or violates the rules and +-protocols for communication across the network. +- +- Corresponding Source conveyed, and Installation Information provided, +-in accord with this section must be in a format that is publicly +-documented (and with an implementation available to the public in +-source code form), and must require no special password or key for +-unpacking, reading or copying. +- +- 7. Additional Terms. +- +- "Additional permissions" are terms that supplement the terms of this +-License by making exceptions from one or more of its conditions. +-Additional permissions that are applicable to the entire Program shall +-be treated as though they were included in this License, to the extent +-that they are valid under applicable law. If additional permissions +-apply only to part of the Program, that part may be used separately +-under those permissions, but the entire Program remains governed by +-this License without regard to the additional permissions. +- +- When you convey a copy of a covered work, you may at your option +-remove any additional permissions from that copy, or from any part of +-it. (Additional permissions may be written to require their own +-removal in certain cases when you modify the work.) You may place +-additional permissions on material, added by you to a covered work, +-for which you have or can give appropriate copyright permission. +- +- Notwithstanding any other provision of this License, for material you +-add to a covered work, you may (if authorized by the copyright holders of +-that material) supplement the terms of this License with terms: +- +- a) Disclaiming warranty or limiting liability differently from the +- terms of sections 15 and 16 of this License; or +- +- b) Requiring preservation of specified reasonable legal notices or +- author attributions in that material or in the Appropriate Legal +- Notices displayed by works containing it; or +- +- c) Prohibiting misrepresentation of the origin of that material, or +- requiring that modified versions of such material be marked in +- reasonable ways as different from the original version; or +- +- d) Limiting the use for publicity purposes of names of licensors or +- authors of the material; or +- +- e) Declining to grant rights under trademark law for use of some +- trade names, trademarks, or service marks; or +- +- f) Requiring indemnification of licensors and authors of that +- material by anyone who conveys the material (or modified versions of +- it) with contractual assumptions of liability to the recipient, for +- any liability that these contractual assumptions directly impose on +- those licensors and authors. +- +- All other non-permissive additional terms are considered "further +-restrictions" within the meaning of section 10. If the Program as you +-received it, or any part of it, contains a notice stating that it is +-governed by this License along with a term that is a further +-restriction, you may remove that term. If a license document contains +-a further restriction but permits relicensing or conveying under this +-License, you may add to a covered work material governed by the terms +-of that license document, provided that the further restriction does +-not survive such relicensing or conveying. +- +- If you add terms to a covered work in accord with this section, you +-must place, in the relevant source files, a statement of the +-additional terms that apply to those files, or a notice indicating +-where to find the applicable terms. +- +- Additional terms, permissive or non-permissive, may be stated in the +-form of a separately written license, or stated as exceptions; +-the above requirements apply either way. +- +- 8. Termination. +- +- You may not propagate or modify a covered work except as expressly +-provided under this License. Any attempt otherwise to propagate or +-modify it is void, and will automatically terminate your rights under +-this License (including any patent licenses granted under the third +-paragraph of section 11). +- +- However, if you cease all violation of this License, then your +-license from a particular copyright holder is reinstated (a) +-provisionally, unless and until the copyright holder explicitly and +-finally terminates your license, and (b) permanently, if the copyright +-holder fails to notify you of the violation by some reasonable means +-prior to 60 days after the cessation. +- +- Moreover, your license from a particular copyright holder is +-reinstated permanently if the copyright holder notifies you of the +-violation by some reasonable means, this is the first time you have +-received notice of violation of this License (for any work) from that +-copyright holder, and you cure the violation prior to 30 days after +-your receipt of the notice. +- +- Termination of your rights under this section does not terminate the +-licenses of parties who have received copies or rights from you under +-this License. If your rights have been terminated and not permanently +-reinstated, you do not qualify to receive new licenses for the same +-material under section 10. +- +- 9. Acceptance Not Required for Having Copies. +- +- You are not required to accept this License in order to receive or +-run a copy of the Program. Ancillary propagation of a covered work +-occurring solely as a consequence of using peer-to-peer transmission +-to receive a copy likewise does not require acceptance. However, +-nothing other than this License grants you permission to propagate or +-modify any covered work. These actions infringe copyright if you do +-not accept this License. Therefore, by modifying or propagating a +-covered work, you indicate your acceptance of this License to do so. +- +- 10. Automatic Licensing of Downstream Recipients. +- +- Each time you convey a covered work, the recipient automatically +-receives a license from the original licensors, to run, modify and +-propagate that work, subject to this License. You are not responsible +-for enforcing compliance by third parties with this License. +- +- An "entity transaction" is a transaction transferring control of an +-organization, or substantially all assets of one, or subdividing an +-organization, or merging organizations. If propagation of a covered +-work results from an entity transaction, each party to that +-transaction who receives a copy of the work also receives whatever +-licenses to the work the party's predecessor in interest had or could +-give under the previous paragraph, plus a right to possession of the +-Corresponding Source of the work from the predecessor in interest, if +-the predecessor has it or can get it with reasonable efforts. +- +- You may not impose any further restrictions on the exercise of the +-rights granted or affirmed under this License. For example, you may +-not impose a license fee, royalty, or other charge for exercise of +-rights granted under this License, and you may not initiate litigation +-(including a cross-claim or counterclaim in a lawsuit) alleging that +-any patent claim is infringed by making, using, selling, offering for +-sale, or importing the Program or any portion of it. +- +- 11. Patents. +- +- A "contributor" is a copyright holder who authorizes use under this +-License of the Program or a work on which the Program is based. The +-work thus licensed is called the contributor's "contributor version". +- +- A contributor's "essential patent claims" are all patent claims +-owned or controlled by the contributor, whether already acquired or +-hereafter acquired, that would be infringed by some manner, permitted +-by this License, of making, using, or selling its contributor version, +-but do not include claims that would be infringed only as a +-consequence of further modification of the contributor version. For +-purposes of this definition, "control" includes the right to grant +-patent sublicenses in a manner consistent with the requirements of +-this License. +- +- Each contributor grants you a non-exclusive, worldwide, royalty-free +-patent license under the contributor's essential patent claims, to +-make, use, sell, offer for sale, import and otherwise run, modify and +-propagate the contents of its contributor version. +- +- In the following three paragraphs, a "patent license" is any express +-agreement or commitment, however denominated, not to enforce a patent +-(such as an express permission to practice a patent or covenant not to +-sue for patent infringement). To "grant" such a patent license to a +-party means to make such an agreement or commitment not to enforce a +-patent against the party. +- +- If you convey a covered work, knowingly relying on a patent license, +-and the Corresponding Source of the work is not available for anyone +-to copy, free of charge and under the terms of this License, through a +-publicly available network server or other readily accessible means, +-then you must either (1) cause the Corresponding Source to be so +-available, or (2) arrange to deprive yourself of the benefit of the +-patent license for this particular work, or (3) arrange, in a manner +-consistent with the requirements of this License, to extend the patent +-license to downstream recipients. "Knowingly relying" means you have +-actual knowledge that, but for the patent license, your conveying the +-covered work in a country, or your recipient's use of the covered work +-in a country, would infringe one or more identifiable patents in that +-country that you have reason to believe are valid. +- +- If, pursuant to or in connection with a single transaction or +-arrangement, you convey, or propagate by procuring conveyance of, a +-covered work, and grant a patent license to some of the parties +-receiving the covered work authorizing them to use, propagate, modify +-or convey a specific copy of the covered work, then the patent license +-you grant is automatically extended to all recipients of the covered +-work and works based on it. +- +- A patent license is "discriminatory" if it does not include within +-the scope of its coverage, prohibits the exercise of, or is +-conditioned on the non-exercise of one or more of the rights that are +-specifically granted under this License. You may not convey a covered +-work if you are a party to an arrangement with a third party that is +-in the business of distributing software, under which you make payment +-to the third party based on the extent of your activity of conveying +-the work, and under which the third party grants, to any of the +-parties who would receive the covered work from you, a discriminatory +-patent license (a) in connection with copies of the covered work +-conveyed by you (or copies made from those copies), or (b) primarily +-for and in connection with specific products or compilations that +-contain the covered work, unless you entered into that arrangement, +-or that patent license was granted, prior to 28 March 2007. +- +- Nothing in this License shall be construed as excluding or limiting +-any implied license or other defenses to infringement that may +-otherwise be available to you under applicable patent law. +- +- 12. No Surrender of Others' Freedom. +- +- If conditions are imposed on you (whether by court order, agreement or +-otherwise) that contradict the conditions of this License, they do not +-excuse you from the conditions of this License. If you cannot convey a +-covered work so as to satisfy simultaneously your obligations under this +-License and any other pertinent obligations, then as a consequence you may +-not convey it at all. For example, if you agree to terms that obligate you +-to collect a royalty for further conveying from those to whom you convey +-the Program, the only way you could satisfy both those terms and this +-License would be to refrain entirely from conveying the Program. +- +- 13. Use with the GNU Affero General Public License. +- +- Notwithstanding any other provision of this License, you have +-permission to link or combine any covered work with a work licensed +-under version 3 of the GNU Affero General Public License into a single +-combined work, and to convey the resulting work. The terms of this +-License will continue to apply to the part which is the covered work, +-but the special requirements of the GNU Affero General Public License, +-section 13, concerning interaction through a network will apply to the +-combination as such. +- +- 14. Revised Versions of this License. +- +- The Free Software Foundation may publish revised and/or new versions of +-the GNU General Public License from time to time. Such new versions will +-be similar in spirit to the present version, but may differ in detail to +-address new problems or concerns. +- +- Each version is given a distinguishing version number. If the +-Program specifies that a certain numbered version of the GNU General +-Public License "or any later version" applies to it, you have the +-option of following the terms and conditions either of that numbered +-version or of any later version published by the Free Software +-Foundation. If the Program does not specify a version number of the +-GNU General Public License, you may choose any version ever published +-by the Free Software Foundation. +- +- If the Program specifies that a proxy can decide which future +-versions of the GNU General Public License can be used, that proxy's +-public statement of acceptance of a version permanently authorizes you +-to choose that version for the Program. +- +- Later license versions may give you additional or different +-permissions. However, no additional obligations are imposed on any +-author or copyright holder as a result of your choosing to follow a +-later version. +- +- 15. Disclaimer of Warranty. +- +- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +-ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +- +- 16. Limitation of Liability. +- +- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +-SUCH DAMAGES. +- +- 17. Interpretation of Sections 15 and 16. +- +- If the disclaimer of warranty and limitation of liability provided +-above cannot be given local legal effect according to their terms, +-reviewing courts shall apply local law that most closely approximates +-an absolute waiver of all civil liability in connection with the +-Program, unless a warranty or assumption of liability accompanies a +-copy of the Program in return for a fee. +- +- END OF TERMS AND CONDITIONS +- +- How to Apply These Terms to Your New Programs +- +- If you develop a new program, and you want it to be of the greatest +-possible use to the public, the best way to achieve this is to make it +-free software which everyone can redistribute and change under these terms. +- +- To do so, attach the following notices to the program. It is safest +-to attach them to the start of each source file to most effectively +-state the exclusion of warranty; and each file should have at least +-the "copyright" line and a pointer to where the full notice is found. +- +- +- Copyright (C) +- +- 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 3 of the License, 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, see . +- +-Also add information on how to contact you by electronic and paper mail. +- +- If the program does terminal interaction, make it output a short +-notice like this when it starts in an interactive mode: +- +- Copyright (C) +- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. +- This is free software, and you are welcome to redistribute it +- under certain conditions; type `show c' for details. +- +-The hypothetical commands `show w' and `show c' should show the appropriate +-parts of the General Public License. Of course, your program's commands +-might be different; for a GUI interface, you would use an "about box". +- +- You should also get your employer (if you work as a programmer) or school, +-if any, to sign a "copyright disclaimer" for the program, if necessary. +-For more information on this, and how to apply and follow the GNU GPL, see +-. +- +- The GNU General Public License does not permit incorporating your program +-into proprietary programs. If your program is a subroutine library, you +-may consider it more useful to permit linking proprietary applications with +-the library. If this is what you want to do, use the GNU Lesser General +-Public License instead of this License. But first, please read +-. +-- +1.8.3.1 + diff --git a/0064-libiscsi-fix-incorrect-strncpy-use.patch b/0064-libiscsi-fix-incorrect-strncpy-use.patch deleted file mode 100644 index 55d1166..0000000 --- a/0064-libiscsi-fix-incorrect-strncpy-use.patch +++ /dev/null @@ -1,52 +0,0 @@ -From fcad7de1a8c3d140d1d0eb120727966017d3727b Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Sat, 17 Aug 2013 15:50:45 -0700 -Subject: libiscsi: fix incorrect strncpy use - -Changes to internal structures make the src and dst buffers of some -copies (potentially) different sizes. Fix strncpy calls that were using -the size of the src argument as the limit. ---- - libiscsi/libiscsi.c | 19 ++++++++----------- - 1 file changed, 8 insertions(+), 11 deletions(-) - -diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c -index 6e6846a..064e4b5 100644 ---- a/libiscsi/libiscsi.c -+++ b/libiscsi/libiscsi.c -@@ -587,15 +587,13 @@ int libiscsi_get_firmware_network_config( - return ENODEV; - - config->dhcp = strlen(fw_entry.dhcp) ? 1 : 0; -- strncpy(config->iface_name, fw_entry.iface, sizeof fw_entry.iface); -- strncpy(config->mac_address, fw_entry.mac, sizeof fw_entry.mac); -- strncpy(config->ip_address, fw_entry.ipaddr, sizeof fw_entry.ipaddr); -- strncpy(config->netmask, fw_entry.mask, sizeof fw_entry.mask); -- strncpy(config->gateway, fw_entry.gateway, sizeof fw_entry.gateway); -- strncpy(config->primary_dns, fw_entry.primary_dns, -- sizeof fw_entry.primary_dns); -- strncpy(config->secondary_dns, fw_entry.secondary_dns, -- sizeof fw_entry.secondary_dns); -+ strlcpy(config->iface_name, fw_entry.iface, LIBISCSI_VALUE_MAXLEN); -+ strlcpy(config->mac_address, fw_entry.mac, LIBISCSI_VALUE_MAXLEN); -+ strlcpy(config->ip_address, fw_entry.ipaddr, LIBISCSI_VALUE_MAXLEN); -+ strlcpy(config->netmask, fw_entry.mask, LIBISCSI_VALUE_MAXLEN); -+ strlcpy(config->gateway, fw_entry.gateway, LIBISCSI_VALUE_MAXLEN); -+ strlcpy(config->primary_dns, fw_entry.primary_dns, LIBISCSI_VALUE_MAXLEN); -+ strlcpy(config->secondary_dns, fw_entry.secondary_dns, LIBISCSI_VALUE_MAXLEN); - return 0; - } - -@@ -613,8 +611,7 @@ int libiscsi_get_firmware_initiator_name(char *initiatorname) - if (fw_get_entry(&fw_entry)) - return ENODEV; - -- strncpy(initiatorname, fw_entry.initiatorname, -- sizeof fw_entry.initiatorname); -+ strlcpy(initiatorname, fw_entry.initiatorname, LIBISCSI_VALUE_MAXLEN); - - return 0; - } --- -1.8.1.4 - diff --git a/0065-fix-hardened-build-of-iscsiuio.patch b/0065-fix-hardened-build-of-iscsiuio.patch deleted file mode 100644 index 9a5c8f6..0000000 --- a/0065-fix-hardened-build-of-iscsiuio.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 436ac9074def43ae09d7ecc28eec6cdc77a9d0e2 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Fri, 13 Sep 2013 16:56:51 -0700 -Subject: [PATCH 65/65] fix hardened build of iscsiuio - -The new iscsiuio code sets CFLAGS in configure.ac, wiping out the -environment setup by rpm. Patch that out. - -Also fix local build when iscsi-initiator-utils is installed, but having -the check to prevent overwriting configuration files during install look -in DESTDIR. ---- - Makefile | 2 +- - iscsiuio/configure | 2 +- - iscsiuio/configure.ac | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - mode change 100644 => 100755 iscsiuio/configure - -diff --git a/Makefile b/Makefile -index 02346bf..172d30e 100644 ---- a/Makefile -+++ b/Makefile -@@ -123,7 +123,7 @@ install_iface: $(IFACEFILES) - $(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi/ifaces - - install_etc: $(ETCFILES) -- if [ ! -f /etc/iscsi/iscsid.conf ]; then \ -+ if [ ! -f $(DESTDIR)$(etcdir)/iscsi/iscsid.conf ]; then \ - $(INSTALL) -d $(DESTDIR)$(etcdir)/iscsi ; \ - $(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi ; \ - fi -diff --git a/iscsiuio/configure b/iscsiuio/configure -old mode 100644 -new mode 100755 -index 2740598..cd13f92 ---- a/iscsiuio/configure -+++ b/iscsiuio/configure -@@ -21288,7 +21288,7 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - --CFLAGS="-O2 -Wall" -+CFLAGS="${CFLAGS} -O2 -Wall" - ## check for --enable-debug first before checking CFLAGS before - ## so that we don't mix -O and -g - # Check whether --enable-debug or --disable-debug was given. -diff --git a/iscsiuio/configure.ac b/iscsiuio/configure.ac -index e9a5e32..d9a6bdb 100644 ---- a/iscsiuio/configure.ac -+++ b/iscsiuio/configure.ac -@@ -52,7 +52,7 @@ AC_LIBTOOL_DLOPEN - # libtool stuff - AC_PROG_LIBTOOL - --CFLAGS="-O2 -Wall" -+CFLAGS="${CFLAGS} -O2 -Wall" - ## check for --enable-debug first before checking CFLAGS before - ## so that we don't mix -O and -g - AC_ARG_ENABLE(debug, --- -1.8.1.4 - diff --git a/0066-start-socket-listeners-on-iscsiadm-command.patch b/0066-start-socket-listeners-on-iscsiadm-command.patch deleted file mode 100644 index cb363b7..0000000 --- a/0066-start-socket-listeners-on-iscsiadm-command.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 89e9c2ff66d069b812fabcd4fefe453bbcea73e4 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Mon, 25 Nov 2013 22:28:12 -0800 -Subject: [PATCH] start socket listeners on iscsiadm command - -fix for trying to run iscsiadm commands right after installing the rpm -without manually starting the systemd units ---- - etc/iscsid.conf | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/etc/iscsid.conf b/etc/iscsid.conf -index 1fd3000..412f130 100644 ---- a/etc/iscsid.conf -+++ b/etc/iscsid.conf -@@ -17,7 +17,8 @@ - # maintainers. - # - # Default for Fedora and RHEL. (uncomment to activate). --#iscsid.startup = /bin/systemctl start iscsid.service -+# Use socket activation, but try to make sure the socket units are listening -+iscsid.startup = /bin/systemctl start iscsid.socket iscsiuio.socket - # - # Default for upstream open-iscsi scripts (uncomment to activate). - # iscsid.startup = /sbin/iscsid --- -1.8.3.1 - diff --git a/0068-iscsiuio-fix-compilation.patch b/0068-iscsiuio-fix-compilation.patch new file mode 100644 index 0000000..74055ae --- /dev/null +++ b/0068-iscsiuio-fix-compilation.patch @@ -0,0 +1,23 @@ +From a877c9dc79ef2c759cc96db8ff5de2e5be8087d9 Mon Sep 17 00:00:00 2001 +From: Mike Christie +Date: Fri, 31 Jan 2014 23:28:22 -0600 +Subject: [PATCH] iscsiuio: fix compilation + +Add missing $(AM_CFLAGS) to lib_iscsi_uip_a_CFLAGS. +--- + iscsiuio/src/uip/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iscsiuio/src/uip/Makefile.am b/iscsiuio/src/uip/Makefile.am +index 65c1286..16170d7 100644 +--- a/iscsiuio/src/uip/Makefile.am ++++ b/iscsiuio/src/uip/Makefile.am +@@ -15,4 +15,4 @@ lib_iscsi_uip_a_SOURCES = uip.c \ + ipv6_ndpc.c \ + ipv6.c + +-lib_iscsi_uip_a_CFLAGS = -DBYTE_ORDER=@ENDIAN@ ++lib_iscsi_uip_a_CFLAGS = -DBYTE_ORDER=@ENDIAN@ $(AM_CFLAGS) +-- +1.8.3.1 + diff --git a/0069-Add-missing-DESTDIR.patch b/0069-Add-missing-DESTDIR.patch new file mode 100644 index 0000000..fe7a50d --- /dev/null +++ b/0069-Add-missing-DESTDIR.patch @@ -0,0 +1,44 @@ +From 9ef01a7d13358e96627ae1d263fea5537c4ed6f7 Mon Sep 17 00:00:00 2001 +From: Lee Duncan +Date: Wed, 29 Jan 2014 11:21:49 +0100 +Subject: [PATCH] Add missing DESTDIR + +Several Makefile targets are missing DESTDIR, making it +hard for packagers. + +Signed-off-by: Lee Duncan +Signed-off-by: Hannes Reinecke +--- + Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 88b3529..79bad84 100644 +--- a/Makefile ++++ b/Makefile +@@ -124,7 +124,7 @@ install_iface: $(IFACEFILES) + $(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi/ifaces + + install_etc: $(ETCFILES) +- if [ ! -f /etc/iscsi/iscsid.conf ]; then \ ++ if [ ! -f $(DESTDIR)/etc/iscsi/iscsid.conf ]; then \ + $(INSTALL) -d $(DESTDIR)$(etcdir)/iscsi ; \ + $(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi ; \ + fi +@@ -137,11 +137,11 @@ install_kernel: + $(MAKE) -C kernel install_kernel + + install_iname: +- if [ ! -f /etc/iscsi/initiatorname.iscsi ]; then \ ++ if [ ! -f $(DESTDIR)/etc/iscsi/initiatorname.iscsi ]; then \ + echo "InitiatorName=`$(DESTDIR)/sbin/iscsi-iname`" > $(DESTDIR)/etc/iscsi/initiatorname.iscsi ; \ + echo "***************************************************" ; \ + echo "Setting InitiatorName to `cat $(DESTDIR)/etc/iscsi/initiatorname.iscsi`" ; \ +- echo "To override edit /etc/iscsi/initiatorname.iscsi" ; \ ++ echo "To override edit $(DESTDIR)/etc/iscsi/initiatorname.iscsi" ; \ + echo "***************************************************" ; \ + fi + +-- +1.8.3.1 + diff --git a/0070-iscsi-tools-set-non-negotiated-params-early.patch b/0070-iscsi-tools-set-non-negotiated-params-early.patch new file mode 100644 index 0000000..2815696 --- /dev/null +++ b/0070-iscsi-tools-set-non-negotiated-params-early.patch @@ -0,0 +1,236 @@ +From ea05be3ff043efd44256283d968fa1bb9a371568 Mon Sep 17 00:00:00 2001 +From: Mike Christie +Date: Thu, 13 Feb 2014 12:37:09 -0600 +Subject: [PATCH] iscsi tools: set non negotiated params early. + +This patch has the iscsi tools pass down the non-negotiated +iscsi settings before doing iscsi login. This allows the +drivers to get info that might be neede to setup the session +early. + +This patch also adds the missing discovery_sess param to +the non negotiated params. +--- + usr/discovery.c | 15 +++++++++-- + usr/initiator.c | 22 +++++++++++----- + usr/initiator.h | 1 + + usr/initiator_common.c | 69 ++++++++++++++++++++++++++++++++++++++++++++------ + 4 files changed, 91 insertions(+), 16 deletions(-) + +diff --git a/usr/discovery.c b/usr/discovery.c +index afce6c0..635ec8d 100644 +--- a/usr/discovery.c ++++ b/usr/discovery.c +@@ -1403,6 +1403,17 @@ redirect_reconnect: + iscsi_copy_operational_params(&session->conn[0], &config->session_conf, + &config->conn_conf); + ++ if (t->caps & CAP_TEXT_NEGO) { ++ log_debug(2, "%s discovery set params\n", __FUNCTION__); ++ rc = iscsi_session_set_params(conn); ++ if (rc) { ++ log_error("Could not set iscsi params for conn %d:%d " ++ "(err %d)\n", session->id, conn->id, rc); ++ rc = ISCSI_ERR_INTERNAL; ++ goto login_failed; ++ } ++ } ++ + if ((session->t->caps & CAP_LOGIN_OFFLOAD)) + goto start_conn; + +@@ -1509,8 +1520,8 @@ redirect_reconnect: + return 0; + + start_conn: +- log_debug(2, "%s discovery set params\n", __FUNCTION__); +- rc = iscsi_session_set_params(conn); ++ log_debug(2, "%s discovery set neg params\n", __FUNCTION__); ++ rc = iscsi_session_set_neg_params(conn); + if (rc) { + log_error("Could not set iscsi params for conn %d:%d (err " + "%d)\n", session->id, conn->id, rc); +diff --git a/usr/initiator.c b/usr/initiator.c +index 79d1779..05a5b19 100644 +--- a/usr/initiator.c ++++ b/usr/initiator.c +@@ -1048,12 +1048,7 @@ setup_full_feature_phase(iscsi_conn_t *conn) + + actor_delete(&conn->login_timer); + +- if (iscsi_session_set_params(conn)) { +- iscsi_login_eh(conn, c->qtask, ISCSI_ERR_LOGIN); +- return; +- } +- +- if (iscsi_host_set_params(session)) { ++ if (iscsi_session_set_neg_params(conn)) { + iscsi_login_eh(conn, c->qtask, ISCSI_ERR_LOGIN); + return; + } +@@ -1507,6 +1502,11 @@ static void setup_offload_login_phase(iscsi_conn_t *conn) + return; + } + ++ if (iscsi_session_set_neg_params(conn)) { ++ iscsi_login_eh(conn, c->qtask, ISCSI_ERR_LOGIN); ++ return; ++ } ++ + if (iscsi_host_set_params(session)) { + iscsi_login_eh(conn, c->qtask, ISCSI_ERR_LOGIN); + return; +@@ -1618,6 +1618,16 @@ static void session_conn_poll(void *data) + return; + } + ++ if (iscsi_session_set_params(conn)) { ++ iscsi_login_eh(conn, qtask, ISCSI_ERR_LOGIN); ++ return; ++ } ++ ++ if (iscsi_host_set_params(session)) { ++ iscsi_login_eh(conn, qtask, ISCSI_ERR_LOGIN); ++ return; ++ } ++ + if (iscsi_login_begin(session, c)) { + iscsi_login_eh(conn, qtask, ISCSI_ERR_LOGIN); + return; +diff --git a/usr/initiator.h b/usr/initiator.h +index 680640c..c34625b 100644 +--- a/usr/initiator.h ++++ b/usr/initiator.h +@@ -344,6 +344,7 @@ extern void free_initiator(void); + extern void iscsi_initiator_init(void); + + /* initiator code common to discovery and normal sessions */ ++extern int iscsi_session_set_neg_params(struct iscsi_conn *conn); + extern int iscsi_session_set_params(struct iscsi_conn *conn); + extern int iscsi_host_set_params(struct iscsi_session *session); + extern int iscsi_host_set_net_params(struct iface_rec *iface, +diff --git a/usr/initiator_common.c b/usr/initiator_common.c +index e2e87a1..109e8d7 100644 +--- a/usr/initiator_common.c ++++ b/usr/initiator_common.c +@@ -345,9 +345,9 @@ void iscsi_session_init_params(struct iscsi_session *session) + } + } + +-#define MAX_SESSION_PARAMS 35 ++#define MAX_SESSION_NEG_PARAMS 16 + +-int iscsi_session_set_params(struct iscsi_conn *conn) ++int iscsi_session_set_neg_params(struct iscsi_conn *conn) + { + struct iscsi_session *session = conn->session; + int i, rc; +@@ -357,7 +357,7 @@ int iscsi_session_set_params(struct iscsi_conn *conn) + int type; + void *value; + int conn_only; +- } conntbl[MAX_SESSION_PARAMS] = { ++ } conntbl[MAX_SESSION_NEG_PARAMS] = { + { + .param = ISCSI_PARAM_MAX_RECV_DLENGTH, + .value = &conn->max_recv_dlength, +@@ -434,15 +434,58 @@ int iscsi_session_set_params(struct iscsi_conn *conn) + .type = ISCSI_INT, + .conn_only = 1, + }, { +- .param = ISCSI_PARAM_TARGET_NAME, +- .conn_only = 0, +- .type = ISCSI_STRING, +- .value = session->target_name, +- }, { + .param = ISCSI_PARAM_TPGT, + .value = &session->portal_group_tag, + .type = ISCSI_INT, + .conn_only = 0, ++ }, ++ }; ++ ++ iscsi_session_init_params(session); ++ ++ /* Entered full-feature phase! */ ++ for (i = 0; i < MAX_SESSION_NEG_PARAMS; i++) { ++ if (conn->id != 0 && !conntbl[i].conn_only) ++ continue; ++ ++ if (!(session->param_mask & (1ULL << conntbl[i].param))) ++ continue; ++ ++ rc = ipc->set_param(session->t->handle, session->id, ++ conn->id, conntbl[i].param, conntbl[i].value, ++ conntbl[i].type); ++ if (rc && rc != -ENOSYS) { ++ log_error("can't set operational parameter %d for " ++ "connection %d:%d, retcode %d (%d)", ++ conntbl[i].param, session->id, conn->id, ++ rc, errno); ++ return EPERM; ++ } ++ ++ print_param_value(conntbl[i].param, conntbl[i].value, ++ conntbl[i].type); ++ } ++ ++ return 0; ++} ++ ++#define MAX_SESSION_PARAMS 20 ++ ++int iscsi_session_set_params(struct iscsi_conn *conn) ++{ ++ struct iscsi_session *session = conn->session; ++ int i, rc; ++ struct connparam { ++ int param; ++ int type; ++ void *value; ++ int conn_only; ++ } conntbl[MAX_SESSION_PARAMS] = { ++ { ++ .param = ISCSI_PARAM_TARGET_NAME, ++ .conn_only = 0, ++ .type = ISCSI_STRING, ++ .value = session->target_name, + }, { + .param = ISCSI_PARAM_PERSISTENT_ADDRESS, + .value = session->nrec.conn[conn->id].address, +@@ -512,22 +555,32 @@ int iscsi_session_set_params(struct iscsi_conn *conn) + .param = ISCSI_PARAM_IFACE_NAME, + .value = session->nrec.iface.name, + .type = ISCSI_STRING, ++ .conn_only = 0, + }, { + .param = ISCSI_PARAM_INITIATOR_NAME, + .value = session->initiator_name, + .type = ISCSI_STRING, ++ .conn_only = 0, + }, { + .param = ISCSI_PARAM_BOOT_ROOT, + .value = session->nrec.session.boot_root, + .type = ISCSI_STRING, ++ .conn_only = 0, + }, { + .param = ISCSI_PARAM_BOOT_NIC, + .value = session->nrec.session.boot_nic, + .type = ISCSI_STRING, ++ .conn_only = 0, + }, { + .param = ISCSI_PARAM_BOOT_TARGET, + .value = session->nrec.session.boot_target, + .type = ISCSI_STRING, ++ .conn_only = 0, ++ }, { ++ .param = ISCSI_PARAM_DISCOVERY_SESS, ++ .value = &session->type, ++ .type = ISCSI_INT, ++ .conn_only = 0, + }, + }; + +-- +1.8.3.1 + diff --git a/0099-use-Red-Hat-version-string-to-match-RPM-package-vers.patch b/0099-use-Red-Hat-version-string-to-match-RPM-package-vers.patch deleted file mode 100644 index 14215d1..0000000 --- a/0099-use-Red-Hat-version-string-to-match-RPM-package-vers.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1483a176fdbb22bbfecf06eea57d1aa200f30561 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Mon, 21 Jan 2013 15:43:36 -0800 -Subject: use Red Hat version string to match RPM package version - ---- - usr/version.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/usr/version.h b/usr/version.h -index a090522..aef0c3d 100644 ---- a/usr/version.h -+++ b/usr/version.h -@@ -6,7 +6,7 @@ - * This may not be the same value as the kernel versions because - * some other maintainer could merge a patch without going through us - */ --#define ISCSI_VERSION_STR "2.0-873" -+#define ISCSI_VERSION_STR "6.2.0.873-17" - #define ISCSI_VERSION_FILE "/sys/module/scsi_transport_iscsi/version" - - #endif --- -1.7.11.7 - diff --git a/0131-iscsiadm-Fix-the-hostno-check-for-stats-submode-of-h.patch b/0131-iscsiadm-Fix-the-hostno-check-for-stats-submode-of-h.patch new file mode 100644 index 0000000..64ce02b --- /dev/null +++ b/0131-iscsiadm-Fix-the-hostno-check-for-stats-submode-of-h.patch @@ -0,0 +1,30 @@ +From 8de8ce551cbdb1250b696a5eedc5cff2b68e71e8 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Mon, 24 Feb 2014 03:14:17 -0500 +Subject: [PATCH] iscsiadm: Fix the hostno check for stats submode of host mode + +This fixes the condition where hostno value of 0 was being treated +as invalid. + +Signed-off-by: Chris Leech +Signed-off-by: Adheer Chandravanshi +--- + usr/iscsiadm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c +index 3cde8d1..36617ab 100644 +--- a/usr/iscsiadm.c ++++ b/usr/iscsiadm.c +@@ -3470,7 +3470,7 @@ main(int argc, char **argv) + ¶ms); + break; + case MODE_HOST_STATS: +- if (!host_no) { ++ if (host_no > MAX_HOST_NO) { + log_error("STATS mode requires host no"); + rc = ISCSI_ERR_INVAL; + break; +-- +1.8.3.1 + diff --git a/0132-iscsiadm-Fix-the-compile-time-warning.patch b/0132-iscsiadm-Fix-the-compile-time-warning.patch new file mode 100644 index 0000000..b6fc868 --- /dev/null +++ b/0132-iscsiadm-Fix-the-compile-time-warning.patch @@ -0,0 +1,31 @@ +From 0e6cb00eac013c270741ee2bdb9427ccc62ad705 Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Mon, 24 Feb 2014 03:14:18 -0500 +Subject: [PATCH] iscsiadm: Fix the compile time warning + +This fixes the following compile time warning message: + +iscsiadm.c:2248: warning: passing argument 1 of 'print_host_stats' from incompatible pointer type + +Signed-off-by: Adheer Chandravanshi +--- + usr/iscsiadm.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c +index 36617ab..389f4b8 100644 +--- a/usr/iscsiadm.c ++++ b/usr/iscsiadm.c +@@ -2245,7 +2245,8 @@ static int exec_host_stats_op(int op, int info_level, uint32_t host_no) + goto exit_host_stats; + } + +- print_host_stats(req_buf + sizeof(struct iscsi_uevent)); ++ print_host_stats((struct iscsi_offload_host_stats *)(req_buf + ++ sizeof(struct iscsi_uevent))); + + ipc->ctldev_close(); + +-- +1.8.3.1 + diff --git a/0143-idmb_rec_write-check-for-tpgt-first.patch b/0143-idmb_rec_write-check-for-tpgt-first.patch new file mode 100644 index 0000000..cdc958a --- /dev/null +++ b/0143-idmb_rec_write-check-for-tpgt-first.patch @@ -0,0 +1,55 @@ +From 24a4d8156786dfd91dcc17b2472653e963ebd028 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Tue, 13 Aug 2013 10:59:44 -0700 +Subject: idmb_rec_write, check for tpgt first + +Factor out the check for a tpgt to a single place, before going crazy on +the rec files. Makes flow of this function easier to follow, and preps +for splitting it up. +--- + usr/idbm.c | 18 +++++------------- + 1 file changed, 5 insertions(+), 13 deletions(-) + +diff --git a/usr/idbm.c b/usr/idbm.c +index 1e4f8c8..0a88699 100644 +--- a/usr/idbm.c ++++ b/usr/idbm.c +@@ -1849,6 +1849,10 @@ static int idbm_rec_write(node_rec_t *rec) + if (rc) + goto free_portal; + ++ if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN) ++ /* drop down to old style portal as config */ ++ goto open_conf; ++ + rc = stat(portal, &statb); + if (rc) { + rc = 0; +@@ -1857,23 +1861,11 @@ static int idbm_rec_write(node_rec_t *rec) + * set the tgpt. In new versions you must pass all the info in + * from the start + */ +- if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN) +- /* drop down to old style portal as config */ +- goto open_conf; +- else +- goto mkdir_portal; ++ goto mkdir_portal; + } + + if (!S_ISDIR(statb.st_mode)) { + /* +- * older iscsiadm versions had you create the config then set +- * set the tgpt. In new versions you must pass all the info in +- * from the start +- */ +- if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN) +- /* drop down to old style portal as config */ +- goto open_conf; +- /* + * Old style portal as a file, but with tpgt. Let's update it. + */ + if (unlink(portal)) { +-- +1.8.1.4 + diff --git a/0144-iscsid-add-initrd-option-to-set-run-from-initrd-hint.patch b/0144-iscsid-add-initrd-option-to-set-run-from-initrd-hint.patch new file mode 100644 index 0000000..358b50c --- /dev/null +++ b/0144-iscsid-add-initrd-option-to-set-run-from-initrd-hint.patch @@ -0,0 +1,61 @@ +From b1799fe84ed94a19bba6bcd7284ce8b038be4ffe Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Mon, 10 Dec 2012 13:20:47 -0800 +Subject: iscsid: add --initrd option to set run from initrd hint for systemd + +See http://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons + +Signed-off-by: Chris Leech +--- + usr/iscsid.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/usr/iscsid.c b/usr/iscsid.c +index b4bb65b..7d71085 100644 +--- a/usr/iscsid.c ++++ b/usr/iscsid.c +@@ -61,6 +61,7 @@ static pid_t log_pid; + static gid_t gid; + static int daemonize = 1; + static int mgmt_ipc_fd; ++static int initrd = 0; + + static struct option const long_options[] = { + {"config", required_argument, NULL, 'c'}, +@@ -73,6 +74,7 @@ static struct option const long_options[] = { + {"pid", required_argument, NULL, 'p'}, + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'v'}, ++ {"initrd", no_argument, &initrd, 1}, + {NULL, 0, NULL, 0}, + }; + +@@ -95,6 +97,7 @@ Open-iSCSI initiator daemon.\n\ + -p, --pid=pidfile use pid file (default " PID_FILE ").\n\ + -h, --help display this help and exit\n\ + -v, --version display version and exit\n\ ++ --initrd run from initrd\n\ + "); + } + exit(status); +@@ -383,12 +386,17 @@ int main(int argc, char *argv[]) + case 'h': + usage(0); + break; ++ case 0: ++ break; + default: + usage(1); + break; + } + } + ++ if (initrd) ++ argv[0][0] = '@'; ++ + /* initialize logger */ + log_pid = log_init(program_name, DEFAULT_AREA_SIZE, + daemonize ? log_do_log_daemon : log_do_log_std, NULL); +-- +1.7.11.7 + diff --git a/0145-idbm_rec_write-seperate-old-and-new-style-writes.patch b/0145-idbm_rec_write-seperate-old-and-new-style-writes.patch new file mode 100644 index 0000000..d138233 --- /dev/null +++ b/0145-idbm_rec_write-seperate-old-and-new-style-writes.patch @@ -0,0 +1,180 @@ +From 954a9492b5ed1de5907ad2a7d7cc0ae6215d8fac Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Tue, 13 Aug 2013 11:34:31 -0700 +Subject: idbm_rec_write, seperate old and new style writes + +Duplicates a small bit of code, but easier to understand and extened. +--- + usr/idbm.c | 116 +++++++++++++++++++++++++++++++++++++++++-------------------- + 1 file changed, 79 insertions(+), 37 deletions(-) + +diff --git a/usr/idbm.c b/usr/idbm.c +index 0a88699..cb6ffd1 100644 +--- a/usr/idbm.c ++++ b/usr/idbm.c +@@ -1808,7 +1808,7 @@ mkdir_portal: + return f; + } + +-static int idbm_rec_write(node_rec_t *rec) ++static int idbm_rec_write_new(node_rec_t *rec) + { + struct stat statb; + FILE *f; +@@ -1820,38 +1820,8 @@ static int idbm_rec_write(node_rec_t *rec) + log_error("Could not alloc portal\n"); + return ISCSI_ERR_NOMEM; + } +- +- snprintf(portal, PATH_MAX, "%s", NODE_CONFIG_DIR); +- if (access(portal, F_OK) != 0) { +- if (mkdir(portal, 0660) != 0) { +- log_error("Could not make %s: %s\n", portal, +- strerror(errno)); +- rc = ISCSI_ERR_IDBM; +- goto free_portal; +- } +- } +- +- snprintf(portal, PATH_MAX, "%s/%s", NODE_CONFIG_DIR, rec->name); +- if (access(portal, F_OK) != 0) { +- if (mkdir(portal, 0660) != 0) { +- log_error("Could not make %s: %s\n", portal, +- strerror(errno)); +- rc = ISCSI_ERR_IDBM; +- goto free_portal; +- } +- } +- + snprintf(portal, PATH_MAX, "%s/%s/%s,%d", NODE_CONFIG_DIR, + rec->name, rec->conn[0].address, rec->conn[0].port); +- log_debug(5, "Looking for config file %s", portal); +- +- rc = idbm_lock(); +- if (rc) +- goto free_portal; +- +- if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN) +- /* drop down to old style portal as config */ +- goto open_conf; + + rc = stat(portal, &statb); + if (rc) { +@@ -1872,11 +1842,11 @@ static int idbm_rec_write(node_rec_t *rec) + log_error("Could not convert %s: %s\n", portal, + strerror(errno)); + rc = ISCSI_ERR_IDBM; +- goto unlock; ++ goto free_portal; + } + } else { + rc = ISCSI_ERR_INVAL; +- goto unlock; ++ goto free_portal; + } + + mkdir_portal: +@@ -1887,24 +1857,96 @@ mkdir_portal: + log_error("Could not make dir %s: %s\n", + portal, strerror(errno)); + rc = ISCSI_ERR_IDBM; +- goto unlock; ++ goto free_portal; + } + } + + snprintf(portal, PATH_MAX, "%s/%s/%s,%d,%d/%s", NODE_CONFIG_DIR, + rec->name, rec->conn[0].address, rec->conn[0].port, rec->tpgt, + rec->iface.name); +-open_conf: ++/* open_conf: */ + f = fopen(portal, "w"); + if (!f) { + log_error("Could not open %s: %sd\n", portal, strerror(errno)); + rc = ISCSI_ERR_IDBM; +- goto unlock; ++ goto free_portal; + } + + idbm_print(IDBM_PRINT_TYPE_NODE, rec, 1, f); + fclose(f); +-unlock: ++free_portal: ++ free(portal); ++ return rc; ++} ++ ++static int idbm_rec_write_old(node_rec_t *rec) ++{ ++ FILE *f; ++ char *portal; ++ int rc = 0; ++ ++ portal = malloc(PATH_MAX); ++ if (!portal) { ++ log_error("Could not alloc portal\n"); ++ return ISCSI_ERR_NOMEM; ++ } ++ snprintf(portal, PATH_MAX, "%s/%s/%s,%d", NODE_CONFIG_DIR, ++ rec->name, rec->conn[0].address, rec->conn[0].port); ++ ++ f = fopen(portal, "w"); ++ if (!f) { ++ log_error("Could not open %s: %sd\n", portal, strerror(errno)); ++ rc = ISCSI_ERR_IDBM; ++ goto free_portal; ++ } ++ idbm_print(IDBM_PRINT_TYPE_NODE, rec, 1, f); ++ fclose(f); ++free_portal: ++ free(portal); ++ return rc; ++} ++ ++static int idbm_rec_write(node_rec_t *rec) ++{ ++ char *portal; ++ int rc = 0; ++ ++ portal = malloc(PATH_MAX); ++ if (!portal) { ++ log_error("Could not alloc portal\n"); ++ return ISCSI_ERR_NOMEM; ++ } ++ ++ snprintf(portal, PATH_MAX, "%s", NODE_CONFIG_DIR); ++ if (access(portal, F_OK) != 0) { ++ if (mkdir(portal, 0660) != 0) { ++ log_error("Could not make %s: %s\n", portal, ++ strerror(errno)); ++ rc = ISCSI_ERR_IDBM; ++ goto free_portal; ++ } ++ } ++ ++ snprintf(portal, PATH_MAX, "%s/%s", NODE_CONFIG_DIR, rec->name); ++ if (access(portal, F_OK) != 0) { ++ if (mkdir(portal, 0660) != 0) { ++ log_error("Could not make %s: %s\n", portal, ++ strerror(errno)); ++ rc = ISCSI_ERR_IDBM; ++ goto free_portal; ++ } ++ } ++ ++ rc = idbm_lock(); ++ if (rc) ++ goto free_portal; ++ ++ if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN) ++ /* old style portal as config */ ++ rc = idbm_rec_write_old(rec); ++ else ++ rc = idbm_rec_write_new(rec); ++ + idbm_unlock(); + free_portal: + free(portal); +-- +1.8.1.4 + diff --git a/0146-idbw_rec_write-pick-tpgt-from-existing-record.patch b/0146-idbw_rec_write-pick-tpgt-from-existing-record.patch new file mode 100644 index 0000000..73966eb --- /dev/null +++ b/0146-idbw_rec_write-pick-tpgt-from-existing-record.patch @@ -0,0 +1,87 @@ +From ef61cd4912e90c8202598f2fa4e9f1842a5b5822 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Tue, 13 Aug 2013 12:39:07 -0700 +Subject: idbw_rec_write, pick tpgt from existing record + +On a static add (-m node -o new) without a user specified tpgt, looks +for existing new style records with tpgt before creating an old style +record without. If one exists, take the tpgt from it an write an +updated new style record instead. +--- + usr/idbm.c | 40 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 40 insertions(+) + +diff --git a/usr/idbm.c b/usr/idbm.c +index cb6ffd1..0410079 100644 +--- a/usr/idbm.c ++++ b/usr/idbm.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -162,6 +163,8 @@ static struct idbm *db; + _n++; \ + } while(0) + ++static int idbm_remove_disc_to_node_link(node_rec_t *rec, char *portal); ++ + static void + idbm_recinfo_discovery(discovery_rec_t *r, recinfo_t *ri) + { +@@ -2082,12 +2085,49 @@ static int idbm_rec_write_old(node_rec_t *rec) + FILE *f; + char *portal; + int rc = 0; ++ glob_t globbuf; ++ int i; ++ int tpgt = PORTAL_GROUP_TAG_UNKNOWN; + + portal = malloc(PATH_MAX); + if (!portal) { + log_error("Could not alloc portal\n"); + return ISCSI_ERR_NOMEM; + } ++ ++ /* check for newer portal dir with tpgt */ ++ snprintf(portal, PATH_MAX, "%s/%s/%s,%d,*", NODE_CONFIG_DIR, ++ rec->name, rec->conn[0].address, rec->conn[0].port); ++ rc = glob(portal, GLOB_ONLYDIR, NULL, &globbuf); ++ if (!rc) { ++ if (globbuf.gl_pathc > 1) ++ log_warning("multiple tpg records for portal " ++ "%s/%s:%d found", rec->name, ++ rec->conn[0].address, rec->conn[0].port); ++ /* set pattern for sscanf matching of tpgt */ ++ snprintf(portal, PATH_MAX, "%s/%s/%s,%d,%%u", NODE_CONFIG_DIR, ++ rec->name, rec->conn[0].address, rec->conn[0].port); ++ for (i = 0; i < globbuf.gl_pathc; i++) { ++ rc = sscanf(globbuf.gl_pathv[i], portal, &tpgt); ++ if (rc == 1) ++ break; ++ } ++ if (tpgt == PORTAL_GROUP_TAG_UNKNOWN) ++ log_warning("glob match on existing records, " ++ "but no valid tpgt found"); ++ } ++ globfree(&globbuf); ++ rc = 0; ++ ++ /* if a tpgt was selected from an old record, write entry in new format */ ++ if (tpgt != PORTAL_GROUP_TAG_UNKNOWN) { ++ log_warning("using tpgt %u from existing record", tpgt); ++ rec->tpgt = tpgt; ++ rc = idbm_remove_disc_to_node_link(rec, portal); ++ free(portal); ++ return idbm_rec_write_new(rec); ++ } ++ + snprintf(portal, PATH_MAX, "%s/%s/%s,%d", NODE_CONFIG_DIR, + rec->name, rec->conn[0].address, rec->conn[0].port); + +-- +1.8.3.1 + diff --git a/0147-iscsiadm-iscsid-newroot-command-to-survive-switch_ro.patch b/0147-iscsiadm-iscsid-newroot-command-to-survive-switch_ro.patch new file mode 100644 index 0000000..537a947 --- /dev/null +++ b/0147-iscsiadm-iscsid-newroot-command-to-survive-switch_ro.patch @@ -0,0 +1,158 @@ +From e5d7c7070358a5db8b849c8c5886e67881fe8906 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Fri, 7 Dec 2012 17:01:42 -0800 +Subject: [PATCH 47/47] iscsiadm, iscsid: newroot command to survive + switch_root + +When started from initramfs, iscsid needs to be able to chroot itself +to the runtime filesystem before the switch_root occurs. In the +initramfs "iscsiadm --newroot {root fs mount before switch}" should be +called before the switch_root. + +Signed-off-by: Chris Leech +--- + usr/iscsiadm.c | 30 ++++++++++++++++++++++++++++++ + usr/mgmt_ipc.c | 11 +++++++++++ + usr/mgmt_ipc.h | 6 +++++- + 3 files changed, 46 insertions(+), 1 deletion(-) + +diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c +index da0a3ec..af6d607 100644 +--- a/usr/iscsiadm.c ++++ b/usr/iscsiadm.c +@@ -117,6 +117,7 @@ static struct option const long_options[] = + {"interval", required_argument, NULL, 'i'}, + {"flashnode_idx", optional_argument, NULL, 'x'}, + {"portal_type", optional_argument, NULL, 'A'}, ++ {"newroot", required_argument, NULL, 0}, + {NULL, 0, NULL, 0}, + }; + static char *short_options = "RlDVhm:a:b:c:C:p:P:T:H:i:I:U:k:L:d:r:n:v:o:sSt:ux:A:"; +@@ -137,6 +138,7 @@ iscsiadm -m session [ -hV ] [ -d debug_level ] [ -P printlevel] [ -r sessionid + iscsiadm -m iface [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I ifacename | -H hostno|MAC ] [ [ -o operation ] [ -n name ] [ -v value ] ] [ -C ping [ -a ip ] [ -b packetsize ] [ -c count ] [ -i interval ] ]\n\ + iscsiadm -m fw [ -d debug_level ] [ -l ]\n\ + iscsiadm -m host [ -P printlevel ] [ -H hostno|MAC ] [ [ -C chap [ -o operation ] [ -v chap_tbl_idx ] ] | [ -C flashnode [ -o operation ] [ -A portal_type ] [ -x flashnode_idx ] [ -n name ] [ -v value ] ] ]\n\ ++iscsiadm --newroot switch_root_path\n\ + iscsiadm -k priority\n"); + } + exit(status); +@@ -278,6 +280,22 @@ static void kill_iscsid(int priority) + } + } + ++static void do_newroot(char *newroot) ++{ ++ iscsiadm_req_t req; ++ iscsiadm_rsp_t rsp; ++ int rc; ++ ++ memset(&req, 0, sizeof(req)); ++ req.command = MGMT_IPC_NEWROOT; ++ strncpy(req.u.newroot.path, newroot, PATH_MAX); ++ rc = iscsid_exec_req(&req, &rsp, 0); ++ if (rc) { ++ iscsi_err_print_msg(rc); ++ log_error("Could not send NEWROOT command"); ++ } ++} ++ + /* + * TODO: we can display how the ifaces are related to node records. + * And we can add a scsi_host mode which would display how +@@ -2800,6 +2818,7 @@ main(int argc, char **argv) + { + char *ip = NULL, *name = NULL, *value = NULL; + char *targetname = NULL, *group_session_mgmt_mode = NULL; ++ char *newroot = NULL; + int ch, longindex, mode=-1, port=-1, do_login=0, do_rescan=0; + int rc=0, sid=-1, op=OP_NOOP, type=-1, do_logout=0, do_stats=0; + int do_login_all=0, do_logout_all=0, info_level=-1, num_ifaces = 0; +@@ -2837,6 +2856,12 @@ main(int argc, char **argv) + while ((ch = getopt_long(argc, argv, short_options, + long_options, &longindex)) >= 0) { + switch (ch) { ++ case 0: ++ if (long_options[longindex].flag != 0) ++ break; ++ if (!strcmp(long_options[longindex].name, "newroot")) ++ newroot = optarg; ++ break; + case 'k': + killiscsid = atoi(optarg); + if (killiscsid < 0) { +@@ -2989,6 +3014,11 @@ main(int argc, char **argv) + goto free_ifaces; + } + ++ if (newroot) { ++ do_newroot(newroot); ++ goto free_ifaces; ++ } ++ + if (mode < 0) + usage(ISCSI_ERR_INVAL); + +diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c +index 87bd346..5cb7143 100644 +--- a/usr/mgmt_ipc.c ++++ b/usr/mgmt_ipc.c +@@ -226,6 +226,16 @@ mgmt_ipc_immediate_stop(queue_task_t *qtask) + } + + static int ++mgmt_ipc_newroot(queue_task_t *qtask) ++{ ++ char *newroot = qtask->req.u.newroot.path; ++ if (chdir(newroot) || chroot(".") || chdir("/")) ++ return ISCSI_ERR; ++ mgmt_ipc_write_rsp(qtask, ISCSI_SUCCESS); ++ return ISCSI_SUCCESS; ++} ++ ++static int + mgmt_ipc_conn_remove(queue_task_t *qtask) + { + return ISCSI_ERR; +@@ -534,6 +544,7 @@ static mgmt_ipc_fn_t * mgmt_ipc_functions[__MGMT_IPC_MAX_COMMAND] = { + [MGMT_IPC_NOTIFY_DEL_NODE] = mgmt_ipc_notify_del_node, + [MGMT_IPC_NOTIFY_ADD_PORTAL] = mgmt_ipc_notify_add_portal, + [MGMT_IPC_NOTIFY_DEL_PORTAL] = mgmt_ipc_notify_del_portal, ++[MGMT_IPC_NEWROOT] = mgmt_ipc_newroot, + }; + + void mgmt_ipc_handle(int accept_fd) +diff --git a/usr/mgmt_ipc.h b/usr/mgmt_ipc.h +index 55972ed..102ffff 100644 +--- a/usr/mgmt_ipc.h ++++ b/usr/mgmt_ipc.h +@@ -22,6 +22,7 @@ + #include "types.h" + #include "iscsi_if.h" + #include "config.h" ++#include "limits.h" + + #define ISCSIADM_NAMESPACE "ISCSIADM_ABSTRACT_NAMESPACE" + #define PEERUSER_MAX 64 +@@ -46,6 +47,7 @@ typedef enum iscsiadm_cmd { + MGMT_IPC_NOTIFY_DEL_NODE = 17, + MGMT_IPC_NOTIFY_ADD_PORTAL = 18, + MGMT_IPC_NOTIFY_DEL_PORTAL = 19, ++ MGMT_IPC_NEWROOT = 20, + + __MGMT_IPC_MAX_COMMAND + } iscsiadm_cmd_e; +@@ -75,8 +77,10 @@ typedef struct iscsiadm_req { + int param; + /* TODO: make this variable len to support */ + char value[IFNAMSIZ + 1]; +- + } set_host_param; ++ struct ipc_msg_newroot { ++ char path[PATH_MAX + 1]; ++ } newroot; + } u; + } iscsiadm_req_t; + +-- +1.8.1.4 + diff --git a/0147-iscsiuio-systemd-socket-activation-support.patch b/0147-iscsiuio-systemd-socket-activation-support.patch new file mode 100644 index 0000000..896eba9 --- /dev/null +++ b/0147-iscsiuio-systemd-socket-activation-support.patch @@ -0,0 +1,58 @@ +From 8003178db245b43d04b27b559d5541ced24ec13f Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Wed, 19 Dec 2012 21:39:06 -0800 +Subject: [PATCH] iscsiuio systemd socket activation support + +--- + iscsiuio/src/unix/iscsid_ipc.c | 28 ++++++++++++++++++++++++++++ + 1 file changed, 28 insertions(+) + +diff --git a/iscsiuio/src/unix/iscsid_ipc.c b/iscsiuio/src/unix/iscsid_ipc.c +index e22de0d..4908cb7 100644 +--- a/iscsiuio/src/unix/iscsid_ipc.c ++++ b/iscsiuio/src/unix/iscsid_ipc.c +@@ -948,6 +948,30 @@ static void *iscsid_loop(void *arg) + pthread_exit(NULL); + } + ++#define SD_SOCKET_FDS_START 3 ++ ++static int ipc_systemd(void) ++{ ++ char *env; ++ ++ env = getenv("LISTEN_PID"); ++ ++ if (!env || (strtoul(env, NULL, 10) != getpid())) ++ return -EINVAL; ++ ++ env = getenv("LISTEN_FDS"); ++ ++ if (!env) ++ return -EINVAL; ++ ++ if (strtoul(env, NULL, 10) != 1) { ++ LOG_ERR("Did not receive exactly one IPC socket from systemd"); ++ return -EINVAL; ++ } ++ ++ return SD_SOCKET_FDS_START; ++} ++ + /****************************************************************************** + * Initialize/Cleanup routines + ******************************************************************************/ +@@ -961,6 +985,10 @@ int iscsid_init() + int rc, addr_len; + struct sockaddr_un addr; + ++ iscsid_opts.fd = ipc_systemd(); ++ if (iscsid_opts.fd >= 0) ++ return 0; ++ + iscsid_opts.fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (iscsid_opts.fd < 0) { + LOG_ERR(PFX "Can not create IPC socket"); +-- +1.8.3.1 + diff --git a/0148-iscsiadm-param-parsing-for-advanced-node-creation.patch b/0148-iscsiadm-param-parsing-for-advanced-node-creation.patch new file mode 100644 index 0000000..a39833b --- /dev/null +++ b/0148-iscsiadm-param-parsing-for-advanced-node-creation.patch @@ -0,0 +1,337 @@ +From b58f3b48a36821d10a3377acfcbf18113fba0c9d Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Tue, 18 Dec 2012 11:27:00 -0800 +Subject: [PATCH 48/48] iscsiadm: --param parsing for advanced node creation + +Share parse_param and apply_param code from iscsistart, allow using multiple +--param options to set arbitrary fields in node mode. + +Signed-off-by: Chris Leech +--- + usr/Makefile | 2 +- + usr/iscsi_param.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + usr/iscsi_param.h | 7 ++++ + usr/iscsiadm.c | 16 ++++++++-- + usr/iscsistart.c | 91 ++-------------------------------------------------- + 5 files changed, 120 insertions(+), 91 deletions(-) + create mode 100644 usr/iscsi_param.c + create mode 100644 usr/iscsi_param.h + +diff --git a/usr/Makefile b/usr/Makefile +index 3d8ee22..a7e80c0 100644 +--- a/usr/Makefile ++++ b/usr/Makefile +@@ -40,7 +40,7 @@ SYSDEPS_SRCS = $(wildcard ../utils/sysdeps/*.o) + ISCSI_LIB_SRCS = iscsi_util.o io.o auth.o iscsi_timer.o login.o log.o md5.o \ + sha1.o iface.o idbm.o sysfs.o host.o session_info.o iscsi_sysfs.o \ + iscsi_net_util.o iscsid_req.o transport.o iser.o cxgbi.o be2iscsi.o \ +- initiator_common.o iscsi_err.o flashnode.o uip_mgmt_ipc.o \ ++ initiator_common.o iscsi_err.o iscsi_param.o flashnode.o uip_mgmt_ipc.o \ + $(IPC_OBJ) $(SYSDEPS_SRCS) + # core initiator files + INITIATOR_SRCS = initiator.o scsi.o actor.o event_poll.o mgmt_ipc.o kern_err_table.o +diff --git a/usr/iscsi_param.c b/usr/iscsi_param.c +new file mode 100644 +index 0000000..c075e8f +--- /dev/null ++++ b/usr/iscsi_param.c +@@ -0,0 +1,95 @@ ++#include ++#include "log.h" ++#include "config.h" ++#include "idbm.h" ++#include "list.h" ++#include "iface.h" ++#include "idbm_fields.h" ++#include "iscsi_err.h" ++ ++int apply_params(struct list_head *user_params, struct node_rec *rec) ++{ ++ struct user_param *param; ++ int rc; ++ ++ /* Must init this so we can check if user overrode them */ ++ rec->session.initial_login_retry_max = -1; ++ rec->conn[0].timeo.noop_out_interval = -1; ++ rec->conn[0].timeo.noop_out_timeout = -1; ++ ++ list_for_each_entry(param, user_params, list) { ++ /* ++ * user may not have passed in all params that were set by ++ * ibft/iscsi_boot, so clear out values that might conflict ++ * with user overrides ++ */ ++ if (!strcmp(param->name, IFACE_NETNAME)) { ++ /* overriding netname so MAC will be for old netdev */ ++ memset(rec->iface.hwaddress, 0, ++ sizeof(rec->iface.hwaddress)); ++ } else if (!strcmp(param->name, IFACE_HWADDR)) { ++ /* overriding MAC so netdev will be for old MAC */ ++ memset(rec->iface.netdev, 0, sizeof(rec->iface.netdev)); ++ } else if (!strcmp(param->name, IFACE_TRANSPORTNAME)) { ++ /* ++ * switching drivers so all old binding info is no ++ * longer valid. Old values were either for offload ++ * and we are switching to software or the reverse, ++ * or switching types of cards (bnx2i to cxgb3i). ++ */ ++ memset(&rec->iface, 0, sizeof(rec->iface)); ++ iface_setup_defaults(&rec->iface); ++ } ++ } ++ ++ rc = idbm_node_set_rec_from_param(user_params, rec, 0); ++ if (rc) ++ return rc; ++ ++ /* ++ * For root boot we could not change this in older versions so ++ * if user did not override then use the defaults. ++ * ++ * Increase to account for boot using static setup. ++ */ ++ if (rec->session.initial_login_retry_max == -1) ++ rec->session.initial_login_retry_max = 30; ++ /* we used to not be able to answer so turn off */ ++ if (rec->conn[0].timeo.noop_out_interval == -1) ++ rec->conn[0].timeo.noop_out_interval = 0; ++ if (rec->conn[0].timeo.noop_out_timeout == -1) ++ rec->conn[0].timeo.noop_out_timeout = 0; ++ ++ return 0; ++} ++ ++int parse_param(struct list_head *user_params, char *param_str) ++{ ++ struct user_param *param; ++ char *name, *value; ++ ++ name = param_str; ++ ++ value = strchr(param_str, '='); ++ if (!value) { ++ log_error("Invalid --param %s. Missing value.", param_str); ++ return ISCSI_ERR_INVAL; ++ } ++ *value = '\0'; ++ ++ value++; ++ if (!strlen(value)) { ++ log_error("Invalid --param %s. Missing value.", param_str); ++ return ISCSI_ERR_INVAL; ++ } ++ ++ param = idbm_alloc_user_param(name, value); ++ if (!param) { ++ log_error("Could not allocate memory for param."); ++ return ISCSI_ERR_NOMEM; ++ } ++ ++ list_add(¶m->list, user_params); ++ return 0; ++} ++ +diff --git a/usr/iscsi_param.h b/usr/iscsi_param.h +new file mode 100644 +index 0000000..8b7956c +--- /dev/null ++++ b/usr/iscsi_param.h +@@ -0,0 +1,7 @@ ++#ifndef ISCSI_PARAM_H ++#define ISCSI_PARAM_H ++ ++extern int parse_param(struct list_head *user_params, char *param_str); ++extern int apply_params(struct list_head *user_params, struct node_rec *rec); ++ ++#endif +diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c +index af6d607..2003d48 100644 +--- a/usr/iscsiadm.c ++++ b/usr/iscsiadm.c +@@ -53,6 +53,7 @@ + #include "iscsi_err.h" + #include "iscsi_ipc.h" + #include "iscsi_timer.h" ++#include "iscsi_param.h" + #include "flashnode.h" + + static char program_name[] = "iscsiadm"; +@@ -118,6 +119,7 @@ static struct option const long_options[] = + {"flashnode_idx", optional_argument, NULL, 'x'}, + {"portal_type", optional_argument, NULL, 'A'}, + {"newroot", required_argument, NULL, 0}, ++ {"param", required_argument, NULL, 0}, + {NULL, 0, NULL, 0}, + }; + static char *short_options = "RlDVhm:a:b:c:C:p:P:T:H:i:I:U:k:L:d:r:n:v:o:sSt:ux:A:"; +@@ -133,7 +135,7 @@ iscsiadm -m discoverydb [ -hV ] [ -d debug_level ] [-P printlevel] [ -t type -p + [ -o operation ] [ -n name ] [ -v value ] [ -lD ] ] \n\ + iscsiadm -m discovery [ -hV ] [ -d debug_level ] [-P printlevel] [ -t type -p ip:port -I ifaceN ... [ -l ] ] | [ [ -p ip:port ] [ -l | -D ] ] \n\ + iscsiadm -m node [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -L all,manual,automatic ] [ -U all,manual,automatic ] [ -S ] [ [ -T targetname -p ip:port -I ifaceN ] [ -l | -u | -R | -s] ] \ +-[ [ -o operation ] [ -n name ] [ -v value ] ]\n\ ++[ [ -o operation ] [ -n name ] [ -v value ] ] [ --param=NAME=VALUE ]\n\ + iscsiadm -m session [ -hV ] [ -d debug_level ] [ -P printlevel] [ -r sessionid | sysfsdir [ -R | -u | -s ] [ -o operation ] [ -n name ] [ -v value ] ]\n\ + iscsiadm -m iface [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I ifacename | -H hostno|MAC ] [ [ -o operation ] [ -n name ] [ -v value ] ] [ -C ping [ -a ip ] [ -b packetsize ] [ -c count ] [ -i interval ] ]\n\ + iscsiadm -m fw [ -d debug_level ] [ -l ]\n\ +@@ -2834,9 +2836,11 @@ main(int argc, char **argv) + uint32_t host_no = -1; + struct user_param *param; + struct list_head params; ++ struct list_head user_params; + + INIT_LIST_HEAD(¶ms); + INIT_LIST_HEAD(&ifaces); ++ INIT_LIST_HEAD(&user_params); + /* do not allow ctrl-c for now... */ + memset(&sa_old, 0, sizeof(struct sigaction)); + memset(&sa_new, 0, sizeof(struct sigaction)); +@@ -2859,8 +2863,14 @@ main(int argc, char **argv) + case 0: + if (long_options[longindex].flag != 0) + break; +- if (!strcmp(long_options[longindex].name, "newroot")) ++ if (!strcmp(long_options[longindex].name, "newroot")) { + newroot = optarg; ++ break; ++ } ++ if (!strcmp(long_options[longindex].name, "param")) { ++ parse_param(&user_params, optarg); ++ break; ++ } + break; + case 'k': + killiscsid = atoi(optarg); +@@ -3169,6 +3179,8 @@ main(int argc, char **argv) + goto out; + } + ++ apply_params(&user_params, rec); ++ + rc = exec_node_op(op, do_login, do_logout, do_show, + do_rescan, do_stats, info_level, rec, + ¶ms); +diff --git a/usr/iscsistart.c b/usr/iscsistart.c +index 6924d49..85be35b 100644 +--- a/usr/iscsistart.c ++++ b/usr/iscsistart.c +@@ -50,6 +50,7 @@ + #include "iscsid_req.h" + #include "iscsi_err.h" + #include "iface.h" ++#include "iscsi_param.h" + + /* global config info */ + /* initiator needs initiator name/alias */ +@@ -131,99 +132,13 @@ static int stop_event_loop(void) + return rc; + } + +-static int apply_params(struct node_rec *rec) +-{ +- struct user_param *param; +- int rc; +- +- /* Must init this so we can check if user overrode them */ +- rec->session.initial_login_retry_max = -1; +- rec->conn[0].timeo.noop_out_interval = -1; +- rec->conn[0].timeo.noop_out_timeout = -1; +- +- list_for_each_entry(param, &user_params, list) { +- /* +- * user may not have passed in all params that were set by +- * ibft/iscsi_boot, so clear out values that might conflict +- * with user overrides +- */ +- if (!strcmp(param->name, IFACE_NETNAME)) { +- /* overriding netname so MAC will be for old netdev */ +- memset(rec->iface.hwaddress, 0, +- sizeof(rec->iface.hwaddress)); +- } else if (!strcmp(param->name, IFACE_HWADDR)) { +- /* overriding MAC so netdev will be for old MAC */ +- memset(rec->iface.netdev, 0, sizeof(rec->iface.netdev)); +- } else if (!strcmp(param->name, IFACE_TRANSPORTNAME)) { +- /* +- * switching drivers so all old binding info is no +- * longer valid. Old values were either for offload +- * and we are switching to software or the reverse, +- * or switching types of cards (bnx2i to cxgb3i). +- */ +- memset(&rec->iface, 0, sizeof(rec->iface)); +- iface_setup_defaults(&rec->iface); +- } +- } +- +- rc = idbm_node_set_rec_from_param(&user_params, rec, 0); +- if (rc) +- return rc; +- +- /* +- * For root boot we could not change this in older versions so +- * if user did not override then use the defaults. +- * +- * Increase to account for boot using static setup. +- */ +- if (rec->session.initial_login_retry_max == -1) +- rec->session.initial_login_retry_max = 30; +- /* we used to not be able to answer so turn off */ +- if (rec->conn[0].timeo.noop_out_interval == -1) +- rec->conn[0].timeo.noop_out_interval = 0; +- if (rec->conn[0].timeo.noop_out_timeout == -1) +- rec->conn[0].timeo.noop_out_timeout = 0; +- +- return 0; +-} +- +-static int parse_param(char *param_str) +-{ +- struct user_param *param; +- char *name, *value; +- +- name = param_str; +- +- value = strchr(param_str, '='); +- if (!value) { +- log_error("Invalid --param %s. Missing value.", param_str); +- return ISCSI_ERR_INVAL; +- } +- *value = '\0'; +- +- value++; +- if (!strlen(value)) { +- log_error("Invalid --param %s. Missing value.", param_str); +- return ISCSI_ERR_INVAL; +- } +- +- param = idbm_alloc_user_param(name, value); +- if (!param) { +- log_error("Could not allocate memory for param."); +- return ISCSI_ERR_NOMEM; +- } +- +- list_add(¶m->list, &user_params); +- return 0; +-} +- + static int login_session(struct node_rec *rec) + { + iscsiadm_req_t req; + iscsiadm_rsp_t rsp; + int rc, retries = 0; + +- rc = apply_params(rec); ++ rc = apply_params(&user_params, rec); + if (rc) + return rc; + +@@ -426,7 +341,7 @@ int main(int argc, char *argv[]) + fw_free_targets(&targets); + exit(0); + case 'P': +- err = parse_param(optarg); ++ err = parse_param(&user_params, optarg); + if (err) + exit(err); + break; +-- +1.8.1.4 + diff --git a/0149-update-systemd-service-files-add-iscsi.service-for-s.patch b/0149-update-systemd-service-files-add-iscsi.service-for-s.patch new file mode 100644 index 0000000..966bb9f --- /dev/null +++ b/0149-update-systemd-service-files-add-iscsi.service-for-s.patch @@ -0,0 +1,93 @@ +From 1c3b1d23e0b3f17399ffd4463cafad813b0444d5 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Wed, 19 Dec 2012 15:07:36 -0800 +Subject: update systemd service files, add iscsi.service for starting + sessions on boot + +Signed-off-by: Chris Leech +--- + etc/systemd/iscsi.service | 19 +++++++++++++++++++ + etc/systemd/iscsi_mark_root_nodes | 14 ++++++++++++++ + etc/systemd/iscsid.service | 7 +++++-- + etc/systemd/iscsid.socket | 2 +- + 4 files changed, 39 insertions(+), 3 deletions(-) + create mode 100644 etc/systemd/iscsi.service + create mode 100755 etc/systemd/iscsi_mark_root_nodes + +diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service +new file mode 100644 +index 0000000..bbd52fd +--- /dev/null ++++ b/etc/systemd/iscsi.service +@@ -0,0 +1,19 @@ ++[Unit] ++Description=Login and scanning of iSCSI devices ++Documentation=man:iscsid(8) man:iscsiadm(8) ++DefaultDependencies=no ++Conflicts=shutdown.target ++After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service ++Before=remote-fs-pre.target ++ConditionPathExists=/etc/iscsi/initiatorname.iscsi ++ ++[Service] ++Type=oneshot ++RemainAfterExit=true ++ExecStart=/usr/libexec/iscsi_mark_root_nodes ++ExecStart=/sbin/iscsiadm -m node --loginall=automatic ++ExecStop=/bin/sync ++ExecStop=/sbin/iscsiadm -m node --logoutall=automatic ++ ++[Install] ++WantedBy=sysinit.target +diff --git a/etc/systemd/iscsi_mark_root_nodes b/etc/systemd/iscsi_mark_root_nodes +new file mode 100755 +index 0000000..c68475c +--- /dev/null ++++ b/etc/systemd/iscsi_mark_root_nodes +@@ -0,0 +1,14 @@ ++#!/bin/bash ++ ++ISCSIADM=/sbin/iscsiadm ++SESSION_FILE=/run/initramfs/iscsi.sessions ++ ++if [ ! -f $SESSION_FILE ] ; then ++ exit 0 ++fi ++ ++while read t num i target; do ++ ip=${i%:*} ++ $ISCSIADM -m node -p $ip -T $target -o update -n node.startup -v onboot ++done < $SESSION_FILE ++ +diff --git a/etc/systemd/iscsid.service b/etc/systemd/iscsid.service +index 028e0b3..653dd08 100644 +--- a/etc/systemd/iscsid.service ++++ b/etc/systemd/iscsid.service +@@ -1,7 +1,10 @@ + [Unit] + Description=Open-iSCSI +-Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8) +-After=network.target NetworkManager-wait-online.service iscsiuio.service tgtd.service targetcli.service ++Documentation=man:iscsid(8) man:iscsiadm(8) ++DefaultDependencies=no ++Conflicts=shutdown.target ++After=network.target iscsiuio.service ++Before=remote-fs-pre.target + + [Service] + Type=forking +diff --git a/etc/systemd/iscsid.socket b/etc/systemd/iscsid.socket +index 832451d..58a8d12 100644 +--- a/etc/systemd/iscsid.socket ++++ b/etc/systemd/iscsid.socket +@@ -1,6 +1,6 @@ + [Unit] + Description=Open-iSCSI iscsid Socket +-Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8) ++Documentation=man:iscsid(8) man:iscsiadm(8) + + [Socket] + ListenStream=@ISCSIADM_ABSTRACT_NAMESPACE +-- +1.7.11.7 + diff --git a/0150-iscsi-boot-related-service-file-updates.patch b/0150-iscsi-boot-related-service-file-updates.patch new file mode 100644 index 0000000..19450ee --- /dev/null +++ b/0150-iscsi-boot-related-service-file-updates.patch @@ -0,0 +1,75 @@ +From 8f79529354b4023c371e00091f11bdd523497639 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Mon, 19 Aug 2013 07:18:25 -0700 +Subject: iscsi boot related service file updates + +make sure iscsid gets started if there are any boot sessions running +add reload target to fix double session problem when restarting from NM +don't rely on session list passed from initrd, never got fully implemented +--- + etc/systemd/iscsi-mark-root-nodes | 13 +++++++++++++ + etc/systemd/iscsi.service | 3 ++- + etc/systemd/iscsi_mark_root_nodes | 14 -------------- + 3 files changed, 15 insertions(+), 15 deletions(-) + create mode 100644 etc/systemd/iscsi-mark-root-nodes + delete mode 100644 etc/systemd/iscsi_mark_root_nodes + +diff --git a/etc/systemd/iscsi-mark-root-nodes b/etc/systemd/iscsi-mark-root-nodes +new file mode 100644 +index 0000000..157be62 +--- /dev/null ++++ b/etc/systemd/iscsi-mark-root-nodes +@@ -0,0 +1,13 @@ ++#!/bin/bash ++ ++ISCSIADM=/sbin/iscsiadm ++ ++$ISCSIADM -m session >/dev/null 2>&1 || exit 0 ++ ++$ISCSIADM -m session | while read t num i target; do ++ ip=${i%:*} ++ $ISCSIADM -m node -p $ip -T $target -o update -n node.startup -v onboot ++done ++ ++systemctl start iscsid.service ++ +diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service +index 7b4efee..d5712bd 100644 +--- a/etc/systemd/iscsi.service ++++ b/etc/systemd/iscsi.service +@@ -10,10 +10,11 @@ ConditionDirectoryNotEmpty=/var/lib/iscsi/nodes + [Service] + Type=oneshot + RemainAfterExit=true +-ExecStart=/usr/libexec/iscsi_mark_root_nodes ++ExecStart=/usr/libexec/iscsi-mark-root-nodes + ExecStart=/sbin/iscsiadm -m node --loginall=automatic + ExecStop=/bin/sync + ExecStop=/sbin/iscsiadm -m node --logoutall=automatic ++ExecReload=/sbin/iscsiadm -m node --loginall=automatic + + [Install] + WantedBy=sysinit.target +diff --git a/etc/systemd/iscsi_mark_root_nodes b/etc/systemd/iscsi_mark_root_nodes +deleted file mode 100644 +index c68475c..0000000 +--- a/etc/systemd/iscsi_mark_root_nodes ++++ /dev/null +@@ -1,14 +0,0 @@ +-#!/bin/bash +- +-ISCSIADM=/sbin/iscsiadm +-SESSION_FILE=/run/initramfs/iscsi.sessions +- +-if [ ! -f $SESSION_FILE ] ; then +- exit 0 +-fi +- +-while read t num i target; do +- ip=${i%:*} +- $ISCSIADM -m node -p $ip -T $target -o update -n node.startup -v onboot +-done < $SESSION_FILE +- +-- +1.8.1.4 + diff --git a/0151-update-initscripts-and-docs.patch b/0151-update-initscripts-and-docs.patch new file mode 100644 index 0000000..e2d4cdc --- /dev/null +++ b/0151-update-initscripts-and-docs.patch @@ -0,0 +1,130 @@ +From c255c2cd43afeaefa428237a3200f02fb238d89e Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Mon, 19 Nov 2012 16:37:13 -0800 +Subject: update initscripts and docs + +--- + README | 9 +++------ + etc/iscsid.conf | 23 +++++++++++------------ + usr/idbm.c | 4 ++++ + 3 files changed, 18 insertions(+), 18 deletions(-) + +diff --git a/README b/README +index ec22098..2a8319a 100644 +--- a/README ++++ b/README +@@ -74,11 +74,6 @@ the cache sync command will fail. + - iscsiadm's -P 3 option will not print out scsi devices. + - iscsid will not automatically online devices. + +-You need to enable "Cryptographic API" under "Cryptographic options" in the +-kernel config. And you must enable "CRC32c CRC algorithm" even if +-you do not use header or data digests. They are the kernel options, +-CONFIG_CRYPTO and CONFIG_CRYPTO_CRC32C, respectively. +- + By default the kernel's iSCSI modules will be used. Running: + + make +@@ -997,7 +992,7 @@ Red Hat or Fedora: + ----------------- + To start open-iscsi in Red Hat/Fedora you can do: + +- service open-iscsi start ++ service iscsi start + + To get open-iscsi to automatically start at run time you may have to + run: +@@ -1205,6 +1200,8 @@ iscsid will only perform rediscovery when it gets a SCN from the server. + # linux-isns (SLES's iSNS server) where it sometimes does not send SCN + # events in the proper format, so they may not get handled. + ++To set the startup value, so that nodes are not logged into automatically ++use the value "manual". + + Example: + -------- +diff --git a/etc/iscsid.conf b/etc/iscsid.conf +index ef76dc0..ac1d231 100644 +--- a/etc/iscsid.conf ++++ b/etc/iscsid.conf +@@ -17,10 +17,10 @@ + # maintainers. + # + # Default for Fedora and RHEL. (uncomment to activate). +-# iscsid.startup = /etc/rc.d/init.d/iscsid force-start ++iscsid.startup = /etc/rc.d/init.d/iscsid force-start + # + # Default for upstream open-iscsi scripts (uncomment to activate). +-iscsid.startup = /sbin/iscsid ++# iscsid.startup = /sbin/iscsid + + + ############################# +@@ -36,8 +36,8 @@ iscsid.startup = /sbin/iscsid + # To request that the iscsi initd scripts startup a session set to "automatic". + # node.startup = automatic + # +-# To manually startup the session set to "manual". The default is manual. +-node.startup = manual ++# To manually startup the session set to "manual". The default is automatic. ++node.startup = automatic + + # For "automatic" startup nodes, setting this to "Yes" will try logins on each + # available iface until one succeeds, and then stop. The default "No" will try +@@ -259,28 +259,27 @@ node.conn[0].iscsi.MaxXmitDataSegmentLength = 0 + discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768 + + # To allow the targets to control the setting of the digest checking, +-# with the initiator requesting a preference of enabling the checking, uncomment# one or both of the following lines: ++# with the initiator requesting a preference of enabling the checking, uncomment ++# the following lines (Data digests are not supported.): + #node.conn[0].iscsi.HeaderDigest = CRC32C,None +-#node.conn[0].iscsi.DataDigest = CRC32C,None ++ + # + # To allow the targets to control the setting of the digest checking, + # with the initiator requesting a preference of disabling the checking, +-# uncomment one or both of the following lines: ++# uncomment the following line: + #node.conn[0].iscsi.HeaderDigest = None,CRC32C +-#node.conn[0].iscsi.DataDigest = None,CRC32C + # + # To enable CRC32C digest checking for the header and/or data part of +-# iSCSI PDUs, uncomment one or both of the following lines: ++# iSCSI PDUs, uncomment the following line: + #node.conn[0].iscsi.HeaderDigest = CRC32C +-#node.conn[0].iscsi.DataDigest = CRC32C + # + # To disable digest checking for the header and/or data part of +-# iSCSI PDUs, uncomment one or both of the following lines: ++# iSCSI PDUs, uncomment the following line: + #node.conn[0].iscsi.HeaderDigest = None +-#node.conn[0].iscsi.DataDigest = None + # + # The default is to never use DataDigests or HeaderDigests. + # ++node.conn[0].iscsi.HeaderDigest = None + + # For multipath configurations, you may want more than one session to be + # created on each iface record. If node.session.nr_sessions is greater +diff --git a/usr/idbm.c b/usr/idbm.c +index 4d30aa9..a1d7d37 100644 +--- a/usr/idbm.c ++++ b/usr/idbm.c +@@ -399,9 +399,13 @@ idbm_recinfo_node(node_rec_t *r, recinfo_t *ri) + IDBM_SHOW, "None", "CRC32C", "CRC32C,None", + "None,CRC32C", num, 1); + sprintf(key, CONN_DATA_DIGEST, i); ++ ++#if 0 ++We do not support data digests + __recinfo_int_o4(key, ri, r, conn[i].iscsi.DataDigest, IDBM_SHOW, + "None", "CRC32C", "CRC32C,None", + "None,CRC32C", num, 1); ++#endif + sprintf(key, CONN_IFMARKER, i); + __recinfo_int_o2(key, ri, r, conn[i].iscsi.IFMarker, IDBM_SHOW, + "No", "Yes", num, 1); +-- +1.7.11.7 + diff --git a/0152-use-var-for-config.patch b/0152-use-var-for-config.patch new file mode 100644 index 0000000..2e4288c --- /dev/null +++ b/0152-use-var-for-config.patch @@ -0,0 +1,239 @@ +From be8702e609fdfd417547f758cb88956066b63023 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Mon, 19 Nov 2012 16:38:45 -0800 +Subject: use var for config + +--- + README | 33 ++++++++++++++++----------------- + doc/iscsiadm.8 | 8 ++++---- + usr/idbm.c | 6 +++--- + usr/idbm.h | 13 +++++++------ + usr/iface.h | 4 +++- + 5 files changed, 33 insertions(+), 31 deletions(-) + +diff --git a/README b/README +index 90e2074..9cc62ca 100644 +--- a/README ++++ b/README +@@ -156,8 +156,7 @@ Usage: iscsid [OPTION] + + Open-iSCSI persistent configuration is stored in a number of + directories under a configuration root directory, using a flat-file +-format. This configuration root directory is /etc/iscsi by default, +-but may also commonly be in /var/lib/iscsi. ++format. This configuration root directory is /var/lib/iscsi by default. + + Configuration is contained in directories for: + +@@ -467,7 +466,7 @@ a scsi_host per HBA port). + To manage both types of initiator stacks, iscsiadm uses the interface (iface) + structure. For each HBA port or for software iscsi for each network + device (ethX) or NIC, that you wish to bind sessions to you must create +-a iface config /etc/iscsi/ifaces. ++a iface config /var/lib/iscsi/ifaces. + + Prep: + +@@ -501,29 +500,29 @@ Running: + iface0 qla4xxx,00:c0:dd:08:63:e8,20.15.0.7,default,iqn.2005-06.com.redhat:madmax + iface1 qla4xxx,00:c0:dd:08:63:ea,20.15.0.9,default,iqn.2005-06.com.redhat:madmax + +-Will report iface configurations that are setup in /etc/iscsi/ifaces. ++Will report iface configurations that are setup in /var/lib/iscsi/ifaces. + The format is: + + iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname + + For software iscsi, you can create the iface configs by hand, but it is + reccomended that you use iscsiadm's iface mode. There is a iface.example in +-/etc/iscsi/ifaces which can be used as a template for the daring. ++/var/lib/iscsi/ifaces which can be used as a template for the daring. + + For each network object you wish to bind a session to you must create +-a seperate iface config in /etc/iscsi/ifaces and each iface config file ++a seperate iface config in /var/lib/iscsi/ifaces and each iface config file + must have a unique name which is less than or equal to 64 characters. + + Example: + + If you have NIC1 with MAC address 00:0F:1F:92:6B:BF and NIC2 with + MAC address 00:C0:DD:08:63:E7 and you wanted to do software iscsi over +-TCP/IP. Then in /etc/iscsi/ifaces/iface0 you would enter: ++TCP/IP. Then in /var/lib/iscsi/ifaces/iface0 you would enter: + + iface.transport_name = tcp + iface.hwaddress = 00:0F:1F:92:6B:BF + +-and in /etc/iscsi/ifaces/iface1 you would enter: ++and in /var/lib/iscsi/ifaces/iface1 you would enter: + + iface.transport_name = tcp + iface.hwaddress = 00:C0:DD:08:63:E7 +@@ -573,7 +572,7 @@ cxgb3i.00:07:43:05:97:07 cxgb3i,00:07:43:05:97:07,,, + qla4xxx.00:0e:1e:04:8b:2e qla4xxx,00:0e:1e:04:8b:2e,,, + + +-Will report iface configurations that are setup in /etc/iscsi/ifaces. ++Will report iface configurations that are setup in /var/lib/iscsi/ifaces. + The format is: + + iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname +@@ -659,7 +658,7 @@ need a seperate network connection to the target for discovery purposes. + *This will be fixed in the next version of open-iscsi* + + For compatibility reasons, when you run iscsiadm to do discovery, it +-will check for interfaces in /etc/iscsi/iscsi/ifaces that are using ++will check for interfaces in /var/lib/iscsi/ifaces that are using + tcp for the iface.transport and it will bind the portals that are discovered + so that they will be logged in through those ifaces. This behavior can also + be overriden by passing in the interfaces you want to use. For the case +@@ -677,7 +676,7 @@ we do not bind a session to a iface, then you can use the special iface + + iscsiadm -m discoverydb -t st -p ip:port -I default --discover -P 1 + +-And if you did not define any interfaces in /etc/iscsi/ifaces and do ++And if you did not define any interfaces in /var/lib/iscsi/ifaces and do + not pass anything into iscsiadm, running iscsiadm will do the default + behavior, where we allow the network subsystem to decide which + device to use. +@@ -719,7 +718,7 @@ To now log into targets it is the same as with sofware iscsi. See section + + ./iscsiadm -m discoverydb -t st -p 192.168.1.1:3260 --discover + +- This will search /etc/iscsi/send_targets for a record with the ++ This will search /var/lib/iscsi/send_targets for a record with the + ID [portal = 192.168.1.1:3260 and type = sendtargets. If found it + will perform discovery using the settings stored in the record. + If a record does not exist, it will be created using the iscsid.conf +@@ -728,7 +727,7 @@ To now log into targets it is the same as with sofware iscsi. See section + The argument to -p may also be a hostname instead of an address. + ./iscsiadm -m discoverydb -t st -p smoehost --discover + +- For the ifaces, iscsiadm will first search /etc/iscsi/ifaces for ++ For the ifaces, iscsiadm will first search /var/lib/iscsi/ifaces for + interfaces using software iscsi. If any are found then nodes found + during discovery will be setup so that they can logged in through + those interfaces. To specify a specific iface, pass the +@@ -784,7 +783,7 @@ To now log into targets it is the same as with sofware iscsi. See section + This command will perform discovery, but not manipulate the node DB. + + - SendTargets iSCSI Discovery with a specific interface. If you +- wish to only use a subset of the interfaces in /etc/iscsi/ifaces ++ wish to only use a subset of the interfaces in /var/lib/iscsi/ifaces + then you can pass them in during discovery: + + ./iscsiadm -m discoverydb -t sendtargets -p 192.168.1.1:3260 \ +@@ -1145,8 +1144,8 @@ where targetname is the name of the target and ip_address:port is the address + and port of the portal. tpgt, is the portal group tag of + the portal, and is not used in iscsiadm commands except for static + record creation. And iface name is the name of the iscsi interface +-defined in /etc/iscsi/ifaces. If no interface was defined in +-/etc/iscsi/ifaces or passed in, the default behavior is used. ++defined in /var/lib/iscsi/ifaces. If no interface was defined in ++/var/lib/iscsi/ifaces or passed in, the default behavior is used. + Default here is iscsi_tcp/tcp to be used over which ever NIC the + network layer decides is best. + +@@ -1261,7 +1260,7 @@ If set, iscsid will perform discovery to the address every + discovery.isns.discoveryd_poll_inval or + discovery.sendtargets.discoveryd_poll_inval seconds, + and it will log into any portals found from the discovery source using +-the ifaces in /etc/iscsi/ifaces. ++the ifaces in /var/lib/iscsi/ifaces. + + Note that for iSNS the poll_interval does not have to be set. If not set, + iscsid will only perform rediscovery when it gets a SCN from the server. +diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8 +index 6b15fcd..30811bd 100644 +--- a/doc/iscsiadm.8 ++++ b/doc/iscsiadm.8 +@@ -101,7 +101,7 @@ This option is only valid for ping submode. + .TP + \fB\-I\fR, \fB\-\-interface=\fI[iface]\fR + The interface argument specifies the iSCSI interface to use for the operation. +-iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware ++iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware + iSCSI (qla4xxx) the iface config must have the hardware address + (iface.hwaddress = port's MAC address) + and the driver/transport_name (iface.transport_name). The iface's name is +@@ -178,7 +178,7 @@ If no other options are specified: for \fIdiscoverydb\fR and \fInode\fR, all + of their respective records are displayed; for \fIsession\fR, all active + sessions and connections are displayed; for \fIfw\fR, all boot firmware + values are displayed; for \fIhost\fR, all iSCSI hosts are displayed; and +-for \fIiface\fR, all ifaces setup in /etc/iscsi/ifaces are displayed. ++for \fIiface\fR, all ifaces setup in /var/lib/iscsi/ifaces are displayed. + + .TP + \fB\-n\fR, \fB\-\-name=\fIname\fR +@@ -562,10 +562,10 @@ The configuration file read by \fBiscsid\fR and \fBiscsiadm\fR on startup. + The file containing the iSCSI InitiatorName and InitiatorAlias read by + \fBiscsid\fR and \fBiscsiadm\fR on startup. + .TP +-/etc/iscsi/nodes/ ++/var/lib/iscsi/nodes/ + This directory contains the nodes with their targets. + .TP +-/etc/iscsi/send_targets ++/var/lib/iscsi/send_targets + This directory contains the portals. + + .SH "SEE ALSO" +diff --git a/usr/idbm.c b/usr/idbm.c +index 634e547..4bb9810 100644 +--- a/usr/idbm.c ++++ b/usr/idbm.c +@@ -2721,9 +2721,9 @@ free_info: + int idbm_init(idbm_get_config_file_fn *fn) + { + /* make sure root db dir is there */ +- if (access(ISCSI_CONFIG_ROOT, F_OK) != 0) { +- if (mkdir(ISCSI_CONFIG_ROOT, 0660) != 0) { +- log_error("Could not make %s %d\n", ISCSI_CONFIG_ROOT, ++ if (access(ISCSIVAR, F_OK) != 0) { ++ if (mkdir(ISCSIVAR, 0660) != 0) { ++ log_error("Could not make %s %d\n", ISCSIVAR, + errno); + return errno; + } +diff --git a/usr/idbm.h b/usr/idbm.h +index 5e4038d..1e9b132 100644 +--- a/usr/idbm.h ++++ b/usr/idbm.h +@@ -29,12 +29,13 @@ + #include "list.h" + #include "flashnode.h" + +-#define NODE_CONFIG_DIR ISCSI_CONFIG_ROOT"nodes" +-#define SLP_CONFIG_DIR ISCSI_CONFIG_ROOT"slp" +-#define ISNS_CONFIG_DIR ISCSI_CONFIG_ROOT"isns" +-#define STATIC_CONFIG_DIR ISCSI_CONFIG_ROOT"static" +-#define FW_CONFIG_DIR ISCSI_CONFIG_ROOT"fw" +-#define ST_CONFIG_DIR ISCSI_CONFIG_ROOT"send_targets" ++#define ISCSIVAR "/var/lib/iscsi/" ++#define NODE_CONFIG_DIR ISCSIVAR"nodes" ++#define SLP_CONFIG_DIR ISCSIVAR"slp" ++#define ISNS_CONFIG_DIR ISCSIVAR"isns" ++#define STATIC_CONFIG_DIR ISCSIVAR"static" ++#define FW_CONFIG_DIR ISCSIVAR"fw" ++#define ST_CONFIG_DIR ISCSIVAR"send_targets" + #define ST_CONFIG_NAME "st_config" + #define ISNS_CONFIG_NAME "isns_config" + +diff --git a/usr/iface.h b/usr/iface.h +index 01f7074..f396918 100644 +--- a/usr/iface.h ++++ b/usr/iface.h +@@ -20,7 +20,9 @@ + #ifndef ISCSI_IFACE_H + #define ISCSI_IFACE_H + +-#define IFACE_CONFIG_DIR ISCSI_CONFIG_ROOT"ifaces" ++#include "idbm.h" ++ ++#define IFACE_CONFIG_DIR ISCSIVAR"ifaces" + + struct iface_rec; + struct list_head; +-- +1.8.1.4 + diff --git a/0153-use-red-hat-for-name.patch b/0153-use-red-hat-for-name.patch new file mode 100644 index 0000000..8888200 --- /dev/null +++ b/0153-use-red-hat-for-name.patch @@ -0,0 +1,25 @@ +From bf7f9118ab2f1a5302dafa198d3351f6f977b7bd Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Mon, 19 Nov 2012 16:40:04 -0800 +Subject: use red hat for name + +--- + utils/iscsi-iname.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/iscsi-iname.c b/utils/iscsi-iname.c +index 6347edc..cb2f6c8 100644 +--- a/utils/iscsi-iname.c ++++ b/utils/iscsi-iname.c +@@ -73,7 +73,7 @@ main(int argc, char *argv[]) + exit(0); + } + } else { +- prefix = "iqn.2005-03.org.open-iscsi"; ++ prefix = "iqn.1994-05.com.redhat"; + } + + /* try to feed some entropy from the pool to MD5 in order to get +-- +1.7.11.7 + diff --git a/0154-add-libiscsi.patch b/0154-add-libiscsi.patch new file mode 100644 index 0000000..bad1731 --- /dev/null +++ b/0154-add-libiscsi.patch @@ -0,0 +1,3927 @@ +From de47306137006436c6bc71a9a60c27287dd1a9e4 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Mon, 19 Nov 2012 16:43:15 -0800 +Subject: add libiscsi + +--- + Makefile | 2 + + libiscsi/Makefile | 61 ++ + libiscsi/libiscsi.c | 620 +++++++++++ + libiscsi/libiscsi.doxy | 1473 +++++++++++++++++++++++++++ + libiscsi/libiscsi.h | 344 +++++++ + libiscsi/pylibiscsi.c | 638 ++++++++++++ + libiscsi/setup.py | 9 + + libiscsi/tests/test_discovery_firmware.c | 53 + + libiscsi/tests/test_discovery_sendtargets.c | 60 ++ + libiscsi/tests/test_get_auth.c | 70 ++ + libiscsi/tests/test_get_initiator_name.c | 38 + + libiscsi/tests/test_get_network_config.c | 45 + + libiscsi/tests/test_login.c | 52 + + libiscsi/tests/test_logout.c | 51 + + libiscsi/tests/test_params.c | 103 ++ + libiscsi/tests/test_set_auth.c | 58 ++ + usr/Makefile | 2 +- + usr/discovery.c | 5 + + usr/idbm.c | 6 +- + usr/idbm.h | 3 + + usr/iscsi_ipc.h | 2 + + 21 files changed, 3691 insertions(+), 4 deletions(-) + create mode 100644 libiscsi/Makefile + create mode 100644 libiscsi/libiscsi.c + create mode 100644 libiscsi/libiscsi.doxy + create mode 100644 libiscsi/libiscsi.h + create mode 100644 libiscsi/pylibiscsi.c + create mode 100644 libiscsi/setup.py + create mode 100644 libiscsi/tests/test_discovery_firmware.c + create mode 100644 libiscsi/tests/test_discovery_sendtargets.c + create mode 100644 libiscsi/tests/test_get_auth.c + create mode 100644 libiscsi/tests/test_get_initiator_name.c + create mode 100644 libiscsi/tests/test_get_network_config.c + create mode 100644 libiscsi/tests/test_login.c + create mode 100644 libiscsi/tests/test_logout.c + create mode 100644 libiscsi/tests/test_params.c + create mode 100644 libiscsi/tests/test_set_auth.c + +diff --git a/Makefile b/Makefile +index 93dcbbf..5e80db9 100644 +--- a/Makefile ++++ b/Makefile +@@ -33,6 +33,7 @@ user: utils/open-isns/Makefile iscsiuio/Makefile + $(MAKE) -C usr + $(MAKE) -C utils + $(MAKE) -C iscsiuio ++ $(MAKE) -C libiscsi + @echo + @echo "Compilation complete Output file" + @echo "----------------------------------- ----------------" +@@ -61,6 +62,7 @@ kernel: force + force: ; + + clean: ++ $(MAKE) -C libiscsi clean + $(MAKE) -C utils/sysdeps clean + $(MAKE) -C utils/fwparam_ibft clean + $(MAKE) -C utils clean +diff --git a/libiscsi/Makefile b/libiscsi/Makefile +new file mode 100644 +index 0000000..317a7ec +--- /dev/null ++++ b/libiscsi/Makefile +@@ -0,0 +1,61 @@ ++# This Makefile will work only with GNU make. ++ ++OSNAME=$(shell uname -s) ++OPTFLAGS ?= -O2 -g ++WARNFLAGS ?= -Wall -Wstrict-prototypes ++CFLAGS = $(OPTFLAGS) $(WARNFLAGS) -I../include -I../usr \ ++ -D$(OSNAME) -fPIC -D_GNU_SOURCE -fvisibility=hidden ++LIB = libiscsi.so.0 ++TESTS = tests/test_discovery_sendtargets tests/test_discovery_firmware ++TESTS += tests/test_login tests/test_logout tests/test_params ++TESTS += tests/test_get_network_config tests/test_get_initiator_name ++TESTS += tests/test_set_auth tests/test_get_auth ++ ++COMMON_SRCS = sysdeps.o ++# sources shared between iscsid, iscsiadm and iscsistart ++ISCSI_LIB_SRCS = netlink.o transport.o cxgbi.o be2iscsi.o iscsi_timer.o initiator_common.o iscsi_err.o session_info.o iscsi_util.o io.o auth.o discovery.o login.o log.o md5.o sha1.o iface.o idbm.o sysfs.o iscsi_sysfs.o iscsi_net_util.o iscsid_req.o iser.o uip_mgmt_ipc.o ++FW_PARAM_SRCS = fw_entry.o prom_lex.o prom_parse.tab.o fwparam_ppc.o fwparam_sysfs.o ++ ++# sources shared with the userspace utils, note we build these separately ++# to get PIC versions. ++COMMON_OBJS = $(patsubst %.o, common-objs/%.o, $(COMMON_SRCS)) ++USR_OBJS = $(patsubst %.o, usr-objs/%.o, $(ISCSI_LIB_SRCS) strings.o) ++FW_OBJS = $(patsubst %.o, fw-objs/%.o, $(FW_PARAM_SRCS)) ++ ++# Flags for the tests ++tests/% : CFLAGS = $(OPTFLAGS) $(WARNFLAGS) -I. ++ ++all: lib tests html ++ ++lib: $(LIB) ++tests: $(TESTS) ++ ++common-objs/%.o: ../utils/sysdeps/%.c ++ mkdir -p common-objs ++ $(CC) $(CFLAGS) -c $< -o $@ ++ ++usr-objs/%.o: ../usr/%.c ++ mkdir -p usr-objs ++ $(CC) $(CFLAGS) -c $< -o $@ ++ ++fw-objs/%.o: ../utils/fwparam_ibft/%.c ++ mkdir -p fw-objs ++ $(CC) $(CFLAGS) -c $< -o $@ ++ ++$(LIB): $(COMMON_OBJS) $(FW_OBJS) $(USR_OBJS) libiscsi.o ++ $(CC) $(CFLAGS) -shared -Wl,-soname,$(LIB) $^ -o $@ ++ ln -s -f $(LIB) libiscsi.so ++ ++$(TESTS): $(FW_OBJS) $(COMMON_OBJS) $(USR_OBJS) $(LIB) ++ ++html: libiscsi.h libiscsi.doxy ++ doxygen libiscsi.doxy ++ ++clean: ++ rm -rf *.o common-objs usr-objs fw-objs libuip-objs libiscsi.so* \ ++ .depend *~ html $(TESTS) tests/*~ ++ ++depend: ++ gcc $(CFLAGS) -M `ls *.c` > .depend ++ ++-include .depend ../usr/.depend +diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c +new file mode 100644 +index 0000000..6e6846a +--- /dev/null ++++ b/libiscsi/libiscsi.c +@@ -0,0 +1,620 @@ ++/* ++ * iSCSI Administration library ++ * ++ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. ++ * Copyright (C) 2008-2009 Hans de Goede ++ * maintained by open-iscsi@googlegroups.com ++ * ++ * 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 2 of the License, 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. ++ * ++ * See the file COPYING included with this distribution for more details. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include "libiscsi.h" ++#include "idbm.h" ++#include "discovery.h" ++#include "log.h" ++#include "sysfs.h" ++#include "iscsi_sysfs.h" ++#include "session_info.h" ++#include "iscsi_util.h" ++#include "sysdeps.h" ++#include "iface.h" ++#include "iscsi_proto.h" ++#include "fw_context.h" ++#include "iscsid_req.h" ++#include "iscsi_err.h" ++ ++#define CHECK(a) { context->error_str[0] = 0; rc = a; if (rc) goto leave; } ++ ++/* UGLY, not thread safe :( */ ++static int sysfs_initialized = 0; ++ ++struct libiscsi_context { ++ char error_str[256]; ++ /* For get_parameter_helper() */ ++ const char *parameter; ++ char *value; ++}; ++ ++static void libiscsi_log(int prio, void *priv, const char *fmt, va_list ap) ++{ ++ struct libiscsi_context *context = priv; ++ ++ if (prio > LOG_ERR) /* We are only interested in errors (or worse) */ ++ return; ++ ++ vsnprintf(context->error_str, sizeof(context->error_str), fmt, ap); ++} ++ ++struct libiscsi_context *libiscsi_init(void) ++{ ++ struct libiscsi_context *context; ++ ++ context = calloc(1, sizeof *context); ++ if (!context) ++ return NULL; ++ ++ log_init("libiscsi", 1024, libiscsi_log, context); ++ if (!sysfs_initialized) { ++ sysfs_init(); ++ sysfs_initialized = 1; ++ } ++ increase_max_files(); ++ if (idbm_init(NULL)) { ++ sysfs_cleanup(); ++ free(context); ++ return NULL; ++ } ++ ++ iface_setup_host_bindings(); ++ ++ return context; ++} ++ ++void libiscsi_cleanup(struct libiscsi_context *context) ++{ ++ idbm_terminate(); ++ free_transports(); ++ sysfs_cleanup(); ++ free(context); ++} ++ ++static void free_iface_list(struct list_head *ifaces) ++{ ++ struct iface_rec *iface, *tmp_iface; ++ ++ list_for_each_entry_safe(iface, tmp_iface, ifaces, list) { ++ list_del(&iface->list); ++ free(iface); ++ } ++} ++ ++static void free_rec_list(struct list_head *rec_list) ++{ ++ struct node_rec *rec, *tmp; ++ ++ list_for_each_entry_safe(rec, tmp, rec_list, list) { ++ list_del(&rec->list); ++ free(rec); ++ } ++} ++ ++int libiscsi_discover_sendtargets(struct libiscsi_context *context, ++ const char *address, int port, ++ const struct libiscsi_auth_info *auth_info, ++ int *nr_found, struct libiscsi_node **found_nodes) ++{ ++ struct discovery_rec drec; ++ LIST_HEAD(bound_rec_list); ++ struct node_rec *rec; ++ int rc = 0, found = 0; ++ ++ INIT_LIST_HEAD(&bound_rec_list); ++ ++ if (nr_found) ++ *nr_found = 0; ++ if (found_nodes) ++ *found_nodes = NULL; ++ ++ CHECK(libiscsi_verify_auth_info(context, auth_info)) ++ ++ /* Fill the drec struct with all needed info */ ++ memset(&drec, 0, sizeof drec); ++ idbm_sendtargets_defaults(&drec.u.sendtargets); ++ drec.type = DISCOVERY_TYPE_SENDTARGETS; ++ strlcpy(drec.address, address, sizeof(drec.address)); ++ drec.port = port ? port : ISCSI_LISTEN_PORT; ++ switch(auth_info ? auth_info->method : libiscsi_auth_none) { ++ case libiscsi_auth_chap: ++ drec.u.sendtargets.auth.authmethod = AUTH_METHOD_CHAP; ++ strlcpy(drec.u.sendtargets.auth.username, ++ auth_info->chap.username, AUTH_STR_MAX_LEN); ++ strlcpy((char *)drec.u.sendtargets.auth.password, ++ auth_info->chap.password, AUTH_STR_MAX_LEN); ++ drec.u.sendtargets.auth.password_length = ++ strlen((char *)drec.u.sendtargets.auth.password); ++ strlcpy(drec.u.sendtargets.auth.username_in, ++ auth_info->chap.reverse_username, AUTH_STR_MAX_LEN); ++ strlcpy((char *)drec.u.sendtargets.auth.password_in, ++ auth_info->chap.reverse_password, AUTH_STR_MAX_LEN); ++ drec.u.sendtargets.auth.password_in_length = ++ strlen((char *)drec.u.sendtargets.auth.password_in); ++ break; ++ } ++ ++ CHECK(idbm_add_discovery(&drec)) ++ ++ CHECK(idbm_bind_ifaces_to_nodes(discovery_sendtargets, ++ &drec, NULL, &bound_rec_list)) ++ ++ /* now add/update records */ ++ list_for_each_entry(rec, &bound_rec_list, list) { ++ CHECK(idbm_add_node(rec, &drec, 1 /* overwrite */)) ++ found++; ++ } ++ ++ if (nr_found) ++ *nr_found = found; ++ ++ if (found_nodes && found) { ++ *found_nodes = calloc(found, sizeof **found_nodes); ++ if (*found_nodes == NULL) { ++ snprintf(context->error_str, ++ sizeof(context->error_str), strerror(ENOMEM)); ++ rc = ENOMEM; ++ goto leave; ++ } ++ found = 0; ++ list_for_each_entry(rec, &bound_rec_list, list) { ++ strlcpy((*found_nodes)[found].name, rec->name, ++ LIBISCSI_VALUE_MAXLEN); ++ (*found_nodes)[found].tpgt = rec->tpgt; ++ strlcpy((*found_nodes)[found].address, ++ rec->conn[0].address, NI_MAXHOST); ++ (*found_nodes)[found].port = rec->conn[0].port; ++ strlcpy((*found_nodes)[found].iface, ++ rec->iface.name, LIBISCSI_VALUE_MAXLEN); ++ found++; ++ } ++ } ++ ++leave: ++ free_rec_list(&bound_rec_list); ++ return rc; ++} ++ ++int libiscsi_discover_firmware(struct libiscsi_context *context, ++ int *nr_found, struct libiscsi_node **found_nodes) ++{ ++ struct list_head targets, ifaces, rec_list; ++ discovery_rec_t drec; ++ int rc = 0; ++ ++ INIT_LIST_HEAD(&targets); ++ INIT_LIST_HEAD(&ifaces); ++ INIT_LIST_HEAD(&rec_list); ++ ++ if (nr_found) { ++ *nr_found = 0; ++ } ++ ++ if (found_nodes) { ++ *found_nodes = NULL; ++ } ++ ++ rc = fw_get_targets(&targets); ++ if (rc) { ++ log_error("%s: Could not get list of targets from firmware " ++ "(err %d).\n", __func__, rc); ++ return rc; ++ } ++ ++ CHECK(iface_create_ifaces_from_boot_contexts(&ifaces, &targets)); ++ ++ memset(&drec, 0, sizeof(drec)); ++ drec.type = DISCOVERY_TYPE_FW; ++ rc = idbm_bind_ifaces_to_nodes(discovery_fw, &drec, &ifaces, &rec_list); ++ if (rc) { ++ log_error("%s: Could not determine target nodes from firmware " ++ "(err %d).\n", __func__, rc); ++ goto leave; ++ } ++ ++ int node_count = 0; ++ struct list_head *pos; ++ list_for_each(pos, &rec_list) { ++ ++node_count; ++ } ++ ++ struct libiscsi_node* new_nodes; ++ /* allocate enough space for all the nodes */ ++ new_nodes = calloc(node_count, sizeof *new_nodes); ++ if (new_nodes == NULL) { ++ rc = ENOMEM; ++ log_error("%s: %s.\n", __func__, strerror(ENOMEM)); ++ goto leave; ++ } ++ ++ struct node_rec *rec; ++ struct libiscsi_node *new_node = new_nodes; ++ /* in one loop, add nodes to idbm and create libiscsi_node entries */ ++ list_for_each_entry(rec, &rec_list, list) { ++ CHECK(idbm_add_node(rec, NULL, 1 /* overwrite */)); ++ ++ strlcpy(new_node->name, rec->name, LIBISCSI_VALUE_MAXLEN); ++ new_node->tpgt = rec->tpgt; ++ strlcpy(new_node->address, rec->conn[0].address, NI_MAXHOST); ++ new_node->port = rec->conn[0].port; ++ strlcpy(new_node->iface, rec->iface.name, LIBISCSI_VALUE_MAXLEN); ++ ++ ++new_node; ++ } ++ ++ /* update output parameters */ ++ if (nr_found) { ++ *nr_found = node_count; ++ } ++ if (found_nodes) { ++ *found_nodes = new_nodes; ++ } ++ ++leave: ++ fw_free_targets(&targets); ++ ++ free_iface_list(&ifaces); ++ free_rec_list(&rec_list); ++ ++ return rc; ++} ++ ++int libiscsi_verify_auth_info(struct libiscsi_context *context, ++ const struct libiscsi_auth_info *auth_info) ++{ ++ switch(auth_info ? auth_info->method : libiscsi_auth_none) { ++ case libiscsi_auth_none: ++ break; ++ case libiscsi_auth_chap: ++ if (!auth_info->chap.username[0]) { ++ strcpy(context->error_str, "Empty username"); ++ return EINVAL; ++ } ++ if (!auth_info->chap.password[0]) { ++ strcpy(context->error_str, "Empty password"); ++ return EINVAL; ++ } ++ if (auth_info->chap.reverse_username[0] && ++ !auth_info->chap.reverse_password[0]) { ++ strcpy(context->error_str, "Empty reverse password"); ++ return EINVAL; ++ } ++ break; ++ default: ++ sprintf(context->error_str, ++ "Invalid authentication method: %d", ++ (int)auth_info->method); ++ return EINVAL; ++ } ++ return 0; ++} ++ ++int libiscsi_node_set_auth(struct libiscsi_context *context, ++ const struct libiscsi_node *node, ++ const struct libiscsi_auth_info *auth_info) ++{ ++ int rc = 0; ++ ++ CHECK(libiscsi_verify_auth_info(context, auth_info)) ++ ++ switch(auth_info ? auth_info->method : libiscsi_auth_none) { ++ case libiscsi_auth_none: ++ CHECK(libiscsi_node_set_parameter(context, node, ++ "node.session.auth.authmethod", "None")) ++ CHECK(libiscsi_node_set_parameter(context, node, ++ "node.session.auth.username", "")) ++ CHECK(libiscsi_node_set_parameter(context, node, ++ "node.session.auth.password", "")) ++ CHECK(libiscsi_node_set_parameter(context, node, ++ "node.session.auth.username_in", "")) ++ CHECK(libiscsi_node_set_parameter(context, node, ++ "node.session.auth.password_in", "")) ++ break; ++ ++ case libiscsi_auth_chap: ++ CHECK(libiscsi_node_set_parameter(context, node, ++ "node.session.auth.authmethod", "CHAP")) ++ CHECK(libiscsi_node_set_parameter(context, node, ++ "node.session.auth.username", ++ auth_info->chap.username)) ++ CHECK(libiscsi_node_set_parameter(context, node, ++ "node.session.auth.password", ++ auth_info->chap.password)) ++ CHECK(libiscsi_node_set_parameter(context, node, ++ "node.session.auth.username_in", ++ auth_info->chap.reverse_username)) ++ CHECK(libiscsi_node_set_parameter(context, node, ++ "node.session.auth.password_in", ++ auth_info->chap.reverse_password)) ++ break; ++ } ++leave: ++ return rc; ++} ++ ++int libiscsi_node_get_auth(struct libiscsi_context *context, ++ const struct libiscsi_node *node, ++ struct libiscsi_auth_info *auth_info) ++{ ++ int rc = 0; ++ char value[LIBISCSI_VALUE_MAXLEN]; ++ ++ memset(auth_info, 0, sizeof *auth_info); ++ ++ CHECK(libiscsi_node_get_parameter(context, node, ++ "node.session.auth.authmethod", value)) ++ ++ if (!strcmp(value, "None")) { ++ auth_info->method = libiscsi_auth_none; ++ } else if (!strcmp(value, "CHAP")) { ++ auth_info->method = libiscsi_auth_chap; ++ CHECK(libiscsi_node_get_parameter(context, node, ++ "node.session.auth.username", ++ auth_info->chap.username)) ++ CHECK(libiscsi_node_get_parameter(context, node, ++ "node.session.auth.password", ++ auth_info->chap.password)) ++ CHECK(libiscsi_node_get_parameter(context, node, ++ "node.session.auth.username_in", ++ auth_info->chap.reverse_username)) ++ CHECK(libiscsi_node_get_parameter(context, node, ++ "node.session.auth.password_in", ++ auth_info->chap.reverse_password)) ++ } else { ++ snprintf(context->error_str, sizeof(context->error_str), ++ "unknown authentication method: %s", value); ++ rc = EINVAL; ++ } ++leave: ++ return rc; ++} ++ ++static void node_to_rec(const struct libiscsi_node *node, ++ struct node_rec *rec) ++{ ++ memset(rec, 0, sizeof *rec); ++ idbm_node_setup_defaults(rec); ++ strlcpy(rec->name, node->name, TARGET_NAME_MAXLEN); ++ rec->tpgt = node->tpgt; ++ strlcpy(rec->conn[0].address, node->address, NI_MAXHOST); ++ rec->conn[0].port = node->port; ++} ++ ++int login_helper(void *data, node_rec_t *rec) ++{ ++ char *iface = (char*)data; ++ if (strcmp(iface, rec->iface.name)) ++ /* different iface, skip it */ ++ return -1; ++ ++ int rc = iscsid_req_by_rec(MGMT_IPC_SESSION_LOGIN, rec); ++ if (rc) { ++ iscsi_err_print_msg(rc); ++ rc = ENOTCONN; ++ } ++ return rc; ++} ++ ++int libiscsi_node_login(struct libiscsi_context *context, ++ const struct libiscsi_node *node) ++{ ++ int nr_found = 0, rc; ++ ++ CHECK(idbm_for_each_iface(&nr_found, (void*)node->iface, login_helper, ++ (char *)node->name, node->tpgt, ++ (char *)node->address, node->port)) ++ if (nr_found == 0) { ++ strcpy(context->error_str, "No such node"); ++ rc = ENODEV; ++ } ++leave: ++ return rc; ++} ++ ++static int logout_helper(void *data, struct session_info *info) ++{ ++ int rc; ++ struct node_rec *rec = data; ++ ++ if (!iscsi_match_session(rec, info)) ++ /* Tell iscsi_sysfs_for_each_session this session was not a ++ match so that it will not increase nr_found. */ ++ return -1; ++ ++ rc = iscsid_req_by_sid(MGMT_IPC_SESSION_LOGOUT, info->sid); ++ if (rc) { ++ iscsi_err_print_msg(rc); ++ rc = EIO; ++ } ++ ++ return rc; ++} ++ ++int libiscsi_node_logout(struct libiscsi_context *context, ++ const struct libiscsi_node *node) ++{ ++ int nr_found = 0, rc; ++ struct node_rec rec; ++ ++ node_to_rec(node, &rec); ++ CHECK(iscsi_sysfs_for_each_session(&rec, &nr_found, logout_helper,0)) ++ if (nr_found == 0) { ++ strcpy(context->error_str, "No matching session"); ++ rc = ENODEV; ++ } ++leave: ++ return rc; ++} ++ ++int libiscsi_node_set_parameter(struct libiscsi_context *context, ++ const struct libiscsi_node *node, ++ const char *parameter, const char *value) ++{ ++ int nr_found = 0, rc; ++ struct user_param *param; ++ struct list_head params; ++ ++ INIT_LIST_HEAD(¶ms); ++ param = idbm_alloc_user_param(parameter, value); ++ if (!param) { ++ rc = ENOMEM; ++ goto leave; ++ } ++ list_add_tail(¶ms, ¶m->list); ++ ++ CHECK(idbm_for_each_iface(&nr_found, ¶ms, idbm_node_set_param, ++ (char *)node->name, node->tpgt, ++ (char *)node->address, node->port)) ++ if (nr_found == 0) { ++ strcpy(context->error_str, "No such node"); ++ rc = ENODEV; ++ } ++ free(param->name); ++ free(param); ++leave: ++ return rc; ++} ++ ++static int get_parameter_helper(void *data, node_rec_t *rec) ++{ ++ struct libiscsi_context *context = data; ++ recinfo_t *info; ++ int i; ++ ++ info = idbm_recinfo_alloc(MAX_KEYS); ++ if (!info) { ++ snprintf(context->error_str, sizeof(context->error_str), ++ strerror(ENOMEM)); ++ return ENOMEM; ++ } ++ ++ idbm_recinfo_node(rec, info); ++ ++ for (i = 0; i < MAX_KEYS; i++) { ++ if (!info[i].visible) ++ continue; ++ ++ if (strcmp(context->parameter, info[i].name)) ++ continue; ++ ++ strlcpy(context->value, info[i].value, LIBISCSI_VALUE_MAXLEN); ++ break; ++ } ++ ++ free(info); ++ ++ if (i == MAX_KEYS) { ++ strcpy(context->error_str, "No such parameter"); ++ return EINVAL; ++ } ++ ++ return 0; ++} ++ ++int libiscsi_node_get_parameter(struct libiscsi_context *context, ++ const struct libiscsi_node *node, const char *parameter, char *value) ++{ ++ int nr_found = 0, rc = 0; ++ ++ context->parameter = parameter; ++ context->value = value; ++ ++ /* Note we assume there is only one interface, if not we will get ++ the value from the last interface iterated over! ++ This (multiple interfaces) can only happen if someone explicitly ++ created ones using iscsiadm. Even then this should not be a problem ++ as most settings should be the same independent of the iface. */ ++ CHECK(idbm_for_each_iface(&nr_found, context, get_parameter_helper, ++ (char *)node->name, node->tpgt, ++ (char *)node->address, node->port)) ++ if (nr_found == 0) { ++ strcpy(context->error_str, "No such node"); ++ rc = ENODEV; ++ } ++leave: ++ return rc; ++} ++ ++const char *libiscsi_get_error_string(struct libiscsi_context *context) ++{ ++ /* Sometimes the core open-iscsi code does not give us an error ++ message */ ++ if (!context->error_str[0]) ++ return "Unknown error"; ++ ++ return context->error_str; ++} ++ ++ ++/************************** Utility functions *******************************/ ++ ++int libiscsi_get_firmware_network_config( ++ struct libiscsi_network_config *config) ++{ ++ struct boot_context fw_entry; ++ ++ if (!sysfs_initialized) { ++ sysfs_init(); ++ sysfs_initialized = 1; ++ } ++ ++ memset(config, 0, sizeof *config); ++ memset(&fw_entry, 0, sizeof fw_entry); ++ if (fw_get_entry(&fw_entry)) ++ return ENODEV; ++ ++ config->dhcp = strlen(fw_entry.dhcp) ? 1 : 0; ++ strncpy(config->iface_name, fw_entry.iface, sizeof fw_entry.iface); ++ strncpy(config->mac_address, fw_entry.mac, sizeof fw_entry.mac); ++ strncpy(config->ip_address, fw_entry.ipaddr, sizeof fw_entry.ipaddr); ++ strncpy(config->netmask, fw_entry.mask, sizeof fw_entry.mask); ++ strncpy(config->gateway, fw_entry.gateway, sizeof fw_entry.gateway); ++ strncpy(config->primary_dns, fw_entry.primary_dns, ++ sizeof fw_entry.primary_dns); ++ strncpy(config->secondary_dns, fw_entry.secondary_dns, ++ sizeof fw_entry.secondary_dns); ++ return 0; ++} ++ ++int libiscsi_get_firmware_initiator_name(char *initiatorname) ++{ ++ struct boot_context fw_entry; ++ ++ if (!sysfs_initialized) { ++ sysfs_init(); ++ sysfs_initialized = 1; ++ } ++ ++ memset(initiatorname, 0, LIBISCSI_VALUE_MAXLEN); ++ memset(&fw_entry, 0, sizeof fw_entry); ++ if (fw_get_entry(&fw_entry)) ++ return ENODEV; ++ ++ strncpy(initiatorname, fw_entry.initiatorname, ++ sizeof fw_entry.initiatorname); ++ ++ return 0; ++} +diff --git a/libiscsi/libiscsi.doxy b/libiscsi/libiscsi.doxy +new file mode 100644 +index 0000000..663770f +--- /dev/null ++++ b/libiscsi/libiscsi.doxy +@@ -0,0 +1,1473 @@ ++# Doxyfile 1.5.7.1 ++ ++# This file describes the settings to be used by the documentation system ++# doxygen (www.doxygen.org) for a project ++# ++# All text after a hash (#) is considered a comment and will be ignored ++# The format is: ++# TAG = value [value, ...] ++# For lists items can also be appended using: ++# TAG += value [value, ...] ++# Values that contain spaces should be placed between quotes (" ") ++ ++#--------------------------------------------------------------------------- ++# Project related configuration options ++#--------------------------------------------------------------------------- ++ ++# This tag specifies the encoding used for all characters in the config file ++# that follow. The default is UTF-8 which is also the encoding used for all ++# text before the first occurrence of this tag. Doxygen uses libiconv (or the ++# iconv built into libc) for the transcoding. See ++# http://www.gnu.org/software/libiconv for the list of possible encodings. ++ ++DOXYFILE_ENCODING = UTF-8 ++ ++# The PROJECT_NAME tag is a single word (or a sequence of words surrounded ++# by quotes) that should identify the project. ++ ++PROJECT_NAME = libiscsi ++ ++# The PROJECT_NUMBER tag can be used to enter a project or revision number. ++# This could be handy for archiving the generated documentation or ++# if some version control system is used. ++ ++PROJECT_NUMBER = ++ ++# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) ++# base path where the generated documentation will be put. ++# If a relative path is entered, it will be relative to the location ++# where doxygen was started. If left blank the current directory will be used. ++ ++OUTPUT_DIRECTORY = ++ ++# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create ++# 4096 sub-directories (in 2 levels) under the output directory of each output ++# format and will distribute the generated files over these directories. ++# Enabling this option can be useful when feeding doxygen a huge amount of ++# source files, where putting all generated files in the same directory would ++# otherwise cause performance problems for the file system. ++ ++CREATE_SUBDIRS = NO ++ ++# The OUTPUT_LANGUAGE tag is used to specify the language in which all ++# documentation generated by doxygen is written. Doxygen will use this ++# information to generate all constant output in the proper language. ++# The default language is English, other supported languages are: ++# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, ++# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, ++# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), ++# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, ++# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, ++# Spanish, Swedish, and Ukrainian. ++ ++OUTPUT_LANGUAGE = English ++ ++# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will ++# include brief member descriptions after the members that are listed in ++# the file and class documentation (similar to JavaDoc). ++# Set to NO to disable this. ++ ++BRIEF_MEMBER_DESC = YES ++ ++# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend ++# the brief description of a member or function before the detailed description. ++# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the ++# brief descriptions will be completely suppressed. ++ ++REPEAT_BRIEF = NO ++ ++# This tag implements a quasi-intelligent brief description abbreviator ++# that is used to form the text in various listings. Each string ++# in this list, if found as the leading text of the brief description, will be ++# stripped from the text and the result after processing the whole list, is ++# used as the annotated text. Otherwise, the brief description is used as-is. ++# If left blank, the following values are used ("$name" is automatically ++# replaced with the name of the entity): "The $name class" "The $name widget" ++# "The $name file" "is" "provides" "specifies" "contains" ++# "represents" "a" "an" "the" ++ ++ABBREVIATE_BRIEF = ++ ++# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then ++# Doxygen will generate a detailed section even if there is only a brief ++# description. ++ ++ALWAYS_DETAILED_SEC = YES ++ ++# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all ++# inherited members of a class in the documentation of that class as if those ++# members were ordinary class members. Constructors, destructors and assignment ++# operators of the base classes will not be shown. ++ ++INLINE_INHERITED_MEMB = NO ++ ++# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full ++# path before files name in the file list and in the header files. If set ++# to NO the shortest path that makes the file name unique will be used. ++ ++FULL_PATH_NAMES = YES ++ ++# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag ++# can be used to strip a user-defined part of the path. Stripping is ++# only done if one of the specified strings matches the left-hand part of ++# the path. The tag can be used to show relative paths in the file list. ++# If left blank the directory from which doxygen is run is used as the ++# path to strip. ++ ++STRIP_FROM_PATH = ++ ++# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of ++# the path mentioned in the documentation of a class, which tells ++# the reader which header file to include in order to use a class. ++# If left blank only the name of the header file containing the class ++# definition is used. Otherwise one should specify the include paths that ++# are normally passed to the compiler using the -I flag. ++ ++STRIP_FROM_INC_PATH = ++ ++# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter ++# (but less readable) file names. This can be useful is your file systems ++# doesn't support long names like on DOS, Mac, or CD-ROM. ++ ++SHORT_NAMES = NO ++ ++# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen ++# will interpret the first line (until the first dot) of a JavaDoc-style ++# comment as the brief description. If set to NO, the JavaDoc ++# comments will behave just like regular Qt-style comments ++# (thus requiring an explicit @brief command for a brief description.) ++ ++JAVADOC_AUTOBRIEF = NO ++ ++# If the QT_AUTOBRIEF tag is set to YES then Doxygen will ++# interpret the first line (until the first dot) of a Qt-style ++# comment as the brief description. If set to NO, the comments ++# will behave just like regular Qt-style comments (thus requiring ++# an explicit \brief command for a brief description.) ++ ++QT_AUTOBRIEF = NO ++ ++# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen ++# treat a multi-line C++ special comment block (i.e. a block of //! or /// ++# comments) as a brief description. This used to be the default behaviour. ++# The new default is to treat a multi-line C++ comment block as a detailed ++# description. Set this tag to YES if you prefer the old behaviour instead. ++ ++MULTILINE_CPP_IS_BRIEF = NO ++ ++# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented ++# member inherits the documentation from any documented member that it ++# re-implements. ++ ++INHERIT_DOCS = YES ++ ++# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce ++# a new page for each member. If set to NO, the documentation of a member will ++# be part of the file/class/namespace that contains it. ++ ++SEPARATE_MEMBER_PAGES = NO ++ ++# The TAB_SIZE tag can be used to set the number of spaces in a tab. ++# Doxygen uses this value to replace tabs by spaces in code fragments. ++ ++TAB_SIZE = 8 ++ ++# This tag can be used to specify a number of aliases that acts ++# as commands in the documentation. An alias has the form "name=value". ++# For example adding "sideeffect=\par Side Effects:\n" will allow you to ++# put the command \sideeffect (or @sideeffect) in the documentation, which ++# will result in a user-defined paragraph with heading "Side Effects:". ++# You can put \n's in the value part of an alias to insert newlines. ++ ++ALIASES = ++ ++# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C ++# sources only. Doxygen will then generate output that is more tailored for C. ++# For instance, some of the names that are used will be different. The list ++# of all members will be omitted, etc. ++ ++OPTIMIZE_OUTPUT_FOR_C = YES ++ ++# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java ++# sources only. Doxygen will then generate output that is more tailored for ++# Java. For instance, namespaces will be presented as packages, qualified ++# scopes will look different, etc. ++ ++OPTIMIZE_OUTPUT_JAVA = NO ++ ++# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran ++# sources only. Doxygen will then generate output that is more tailored for ++# Fortran. ++ ++OPTIMIZE_FOR_FORTRAN = NO ++ ++# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL ++# sources. Doxygen will then generate output that is tailored for ++# VHDL. ++ ++OPTIMIZE_OUTPUT_VHDL = NO ++ ++# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want ++# to include (a tag file for) the STL sources as input, then you should ++# set this tag to YES in order to let doxygen match functions declarations and ++# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. ++# func(std::string) {}). This also make the inheritance and collaboration ++# diagrams that involve STL classes more complete and accurate. ++ ++BUILTIN_STL_SUPPORT = NO ++ ++# If you use Microsoft's C++/CLI language, you should set this option to YES to ++# enable parsing support. ++ ++CPP_CLI_SUPPORT = NO ++ ++# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. ++# Doxygen will parse them like normal C++ but will assume all classes use public ++# instead of private inheritance when no explicit protection keyword is present. ++ ++SIP_SUPPORT = NO ++ ++# For Microsoft's IDL there are propget and propput attributes to indicate getter ++# and setter methods for a property. Setting this option to YES (the default) ++# will make doxygen to replace the get and set methods by a property in the ++# documentation. This will only work if the methods are indeed getting or ++# setting a simple type. If this is not the case, or you want to show the ++# methods anyway, you should set this option to NO. ++ ++IDL_PROPERTY_SUPPORT = YES ++ ++# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC ++# tag is set to YES, then doxygen will reuse the documentation of the first ++# member in the group (if any) for the other members of the group. By default ++# all members of a group must be documented explicitly. ++ ++DISTRIBUTE_GROUP_DOC = NO ++ ++# Set the SUBGROUPING tag to YES (the default) to allow class member groups of ++# the same type (for instance a group of public functions) to be put as a ++# subgroup of that type (e.g. under the Public Functions section). Set it to ++# NO to prevent subgrouping. Alternatively, this can be done per class using ++# the \nosubgrouping command. ++ ++SUBGROUPING = YES ++ ++# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum ++# is documented as struct, union, or enum with the name of the typedef. So ++# typedef struct TypeS {} TypeT, will appear in the documentation as a struct ++# with name TypeT. When disabled the typedef will appear as a member of a file, ++# namespace, or class. And the struct will be named TypeS. This can typically ++# be useful for C code in case the coding convention dictates that all compound ++# types are typedef'ed and only the typedef is referenced, never the tag name. ++ ++TYPEDEF_HIDES_STRUCT = NO ++ ++# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to ++# determine which symbols to keep in memory and which to flush to disk. ++# When the cache is full, less often used symbols will be written to disk. ++# For small to medium size projects (<1000 input files) the default value is ++# probably good enough. For larger projects a too small cache size can cause ++# doxygen to be busy swapping symbols to and from disk most of the time ++# causing a significant performance penality. ++# If the system has enough physical memory increasing the cache will improve the ++# performance by keeping more symbols in memory. Note that the value works on ++# a logarithmic scale so increasing the size by one will rougly double the ++# memory usage. The cache size is given by this formula: ++# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, ++# corresponding to a cache size of 2^16 = 65536 symbols ++ ++SYMBOL_CACHE_SIZE = 0 ++ ++#--------------------------------------------------------------------------- ++# Build related configuration options ++#--------------------------------------------------------------------------- ++ ++# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in ++# documentation are documented, even if no documentation was available. ++# Private class members and static file members will be hidden unless ++# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES ++ ++EXTRACT_ALL = YES ++ ++# If the EXTRACT_PRIVATE tag is set to YES all private members of a class ++# will be included in the documentation. ++ ++EXTRACT_PRIVATE = NO ++ ++# If the EXTRACT_STATIC tag is set to YES all static members of a file ++# will be included in the documentation. ++ ++EXTRACT_STATIC = NO ++ ++# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) ++# defined locally in source files will be included in the documentation. ++# If set to NO only classes defined in header files are included. ++ ++EXTRACT_LOCAL_CLASSES = YES ++ ++# This flag is only useful for Objective-C code. When set to YES local ++# methods, which are defined in the implementation section but not in ++# the interface are included in the documentation. ++# If set to NO (the default) only methods in the interface are included. ++ ++EXTRACT_LOCAL_METHODS = NO ++ ++# If this flag is set to YES, the members of anonymous namespaces will be ++# extracted and appear in the documentation as a namespace called ++# 'anonymous_namespace{file}', where file will be replaced with the base ++# name of the file that contains the anonymous namespace. By default ++# anonymous namespace are hidden. ++ ++EXTRACT_ANON_NSPACES = NO ++ ++# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all ++# undocumented members of documented classes, files or namespaces. ++# If set to NO (the default) these members will be included in the ++# various overviews, but no documentation section is generated. ++# This option has no effect if EXTRACT_ALL is enabled. ++ ++HIDE_UNDOC_MEMBERS = NO ++ ++# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all ++# undocumented classes that are normally visible in the class hierarchy. ++# If set to NO (the default) these classes will be included in the various ++# overviews. This option has no effect if EXTRACT_ALL is enabled. ++ ++HIDE_UNDOC_CLASSES = NO ++ ++# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all ++# friend (class|struct|union) declarations. ++# If set to NO (the default) these declarations will be included in the ++# documentation. ++ ++HIDE_FRIEND_COMPOUNDS = NO ++ ++# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any ++# documentation blocks found inside the body of a function. ++# If set to NO (the default) these blocks will be appended to the ++# function's detailed documentation block. ++ ++HIDE_IN_BODY_DOCS = NO ++ ++# The INTERNAL_DOCS tag determines if documentation ++# that is typed after a \internal command is included. If the tag is set ++# to NO (the default) then the documentation will be excluded. ++# Set it to YES to include the internal documentation. ++ ++INTERNAL_DOCS = NO ++ ++# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate ++# file names in lower-case letters. If set to YES upper-case letters are also ++# allowed. This is useful if you have classes or files whose names only differ ++# in case and if your file system supports case sensitive file names. Windows ++# and Mac users are advised to set this option to NO. ++ ++CASE_SENSE_NAMES = YES ++ ++# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen ++# will show members with their full class and namespace scopes in the ++# documentation. If set to YES the scope will be hidden. ++ ++HIDE_SCOPE_NAMES = NO ++ ++# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen ++# will put a list of the files that are included by a file in the documentation ++# of that file. ++ ++SHOW_INCLUDE_FILES = YES ++ ++# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] ++# is inserted in the documentation for inline members. ++ ++INLINE_INFO = YES ++ ++# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen ++# will sort the (detailed) documentation of file and class members ++# alphabetically by member name. If set to NO the members will appear in ++# declaration order. ++ ++SORT_MEMBER_DOCS = YES ++ ++# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the ++# brief documentation of file, namespace and class members alphabetically ++# by member name. If set to NO (the default) the members will appear in ++# declaration order. ++ ++SORT_BRIEF_DOCS = NO ++ ++# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the ++# hierarchy of group names into alphabetical order. If set to NO (the default) ++# the group names will appear in their defined order. ++ ++SORT_GROUP_NAMES = NO ++ ++# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be ++# sorted by fully-qualified names, including namespaces. If set to ++# NO (the default), the class list will be sorted only by class name, ++# not including the namespace part. ++# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. ++# Note: This option applies only to the class list, not to the ++# alphabetical list. ++ ++SORT_BY_SCOPE_NAME = NO ++ ++# The GENERATE_TODOLIST tag can be used to enable (YES) or ++# disable (NO) the todo list. This list is created by putting \todo ++# commands in the documentation. ++ ++GENERATE_TODOLIST = YES ++ ++# The GENERATE_TESTLIST tag can be used to enable (YES) or ++# disable (NO) the test list. This list is created by putting \test ++# commands in the documentation. ++ ++GENERATE_TESTLIST = YES ++ ++# The GENERATE_BUGLIST tag can be used to enable (YES) or ++# disable (NO) the bug list. This list is created by putting \bug ++# commands in the documentation. ++ ++GENERATE_BUGLIST = YES ++ ++# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or ++# disable (NO) the deprecated list. This list is created by putting ++# \deprecated commands in the documentation. ++ ++GENERATE_DEPRECATEDLIST= YES ++ ++# The ENABLED_SECTIONS tag can be used to enable conditional ++# documentation sections, marked by \if sectionname ... \endif. ++ ++ENABLED_SECTIONS = ++ ++# The MAX_INITIALIZER_LINES tag determines the maximum number of lines ++# the initial value of a variable or define consists of for it to appear in ++# the documentation. If the initializer consists of more lines than specified ++# here it will be hidden. Use a value of 0 to hide initializers completely. ++# The appearance of the initializer of individual variables and defines in the ++# documentation can be controlled using \showinitializer or \hideinitializer ++# command in the documentation regardless of this setting. ++ ++MAX_INITIALIZER_LINES = 30 ++ ++# Set the SHOW_USED_FILES tag to NO to disable the list of files generated ++# at the bottom of the documentation of classes and structs. If set to YES the ++# list will mention the files that were used to generate the documentation. ++ ++SHOW_USED_FILES = YES ++ ++# If the sources in your project are distributed over multiple directories ++# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy ++# in the documentation. The default is NO. ++ ++SHOW_DIRECTORIES = NO ++ ++# Set the SHOW_FILES tag to NO to disable the generation of the Files page. ++# This will remove the Files entry from the Quick Index and from the ++# Folder Tree View (if specified). The default is YES. ++ ++SHOW_FILES = YES ++ ++# Set the SHOW_NAMESPACES tag to NO to disable the generation of the ++# Namespaces page. This will remove the Namespaces entry from the Quick Index ++# and from the Folder Tree View (if specified). The default is YES. ++ ++SHOW_NAMESPACES = YES ++ ++# The FILE_VERSION_FILTER tag can be used to specify a program or script that ++# doxygen should invoke to get the current version for each file (typically from ++# the version control system). Doxygen will invoke the program by executing (via ++# popen()) the command , where is the value of ++# the FILE_VERSION_FILTER tag, and is the name of an input file ++# provided by doxygen. Whatever the program writes to standard output ++# is used as the file version. See the manual for examples. ++ ++FILE_VERSION_FILTER = ++ ++# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by ++# doxygen. The layout file controls the global structure of the generated output files ++# in an output format independent way. The create the layout file that represents ++# doxygen's defaults, run doxygen with the -l option. You can optionally specify a ++# file name after the option, if omitted DoxygenLayout.xml will be used as the name ++# of the layout file. ++ ++LAYOUT_FILE = ++ ++#--------------------------------------------------------------------------- ++# configuration options related to warning and progress messages ++#--------------------------------------------------------------------------- ++ ++# The QUIET tag can be used to turn on/off the messages that are generated ++# by doxygen. Possible values are YES and NO. If left blank NO is used. ++ ++QUIET = YES ++ ++# The WARNINGS tag can be used to turn on/off the warning messages that are ++# generated by doxygen. Possible values are YES and NO. If left blank ++# NO is used. ++ ++WARNINGS = YES ++ ++# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings ++# for undocumented members. If EXTRACT_ALL is set to YES then this flag will ++# automatically be disabled. ++ ++WARN_IF_UNDOCUMENTED = YES ++ ++# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for ++# potential errors in the documentation, such as not documenting some ++# parameters in a documented function, or documenting parameters that ++# don't exist or using markup commands wrongly. ++ ++WARN_IF_DOC_ERROR = YES ++ ++# This WARN_NO_PARAMDOC option can be abled to get warnings for ++# functions that are documented, but have no documentation for their parameters ++# or return value. If set to NO (the default) doxygen will only warn about ++# wrong or incomplete parameter documentation, but not about the absence of ++# documentation. ++ ++WARN_NO_PARAMDOC = NO ++ ++# The WARN_FORMAT tag determines the format of the warning messages that ++# doxygen can produce. The string should contain the $file, $line, and $text ++# tags, which will be replaced by the file and line number from which the ++# warning originated and the warning text. Optionally the format may contain ++# $version, which will be replaced by the version of the file (if it could ++# be obtained via FILE_VERSION_FILTER) ++ ++WARN_FORMAT = "$file:$line: $text" ++ ++# The WARN_LOGFILE tag can be used to specify a file to which warning ++# and error messages should be written. If left blank the output is written ++# to stderr. ++ ++WARN_LOGFILE = ++ ++#--------------------------------------------------------------------------- ++# configuration options related to the input files ++#--------------------------------------------------------------------------- ++ ++# The INPUT tag can be used to specify the files and/or directories that contain ++# documented source files. You may enter file names like "myfile.cpp" or ++# directories like "/usr/src/myproject". Separate the files or directories ++# with spaces. ++ ++INPUT = ++ ++# This tag can be used to specify the character encoding of the source files ++# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is ++# also the default input encoding. Doxygen uses libiconv (or the iconv built ++# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for ++# the list of possible encodings. ++ ++INPUT_ENCODING = UTF-8 ++ ++# If the value of the INPUT tag contains directories, you can use the ++# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp ++# and *.h) to filter out the source-files in the directories. If left ++# blank the following patterns are tested: ++# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx ++# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 ++ ++FILE_PATTERNS = ++ ++# The RECURSIVE tag can be used to turn specify whether or not subdirectories ++# should be searched for input files as well. Possible values are YES and NO. ++# If left blank NO is used. ++ ++RECURSIVE = NO ++ ++# The EXCLUDE tag can be used to specify files and/or directories that should ++# excluded from the INPUT source files. This way you can easily exclude a ++# subdirectory from a directory tree whose root is specified with the INPUT tag. ++ ++EXCLUDE = ++ ++# The EXCLUDE_SYMLINKS tag can be used select whether or not files or ++# directories that are symbolic links (a Unix filesystem feature) are excluded ++# from the input. ++ ++EXCLUDE_SYMLINKS = NO ++ ++# If the value of the INPUT tag contains directories, you can use the ++# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude ++# certain files from those directories. Note that the wildcards are matched ++# against the file with absolute path, so to exclude all test directories ++# for example use the pattern */test/* ++ ++EXCLUDE_PATTERNS = ++ ++# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names ++# (namespaces, classes, functions, etc.) that should be excluded from the ++# output. The symbol name can be a fully qualified name, a word, or if the ++# wildcard * is used, a substring. Examples: ANamespace, AClass, ++# AClass::ANamespace, ANamespace::*Test ++ ++EXCLUDE_SYMBOLS = ++ ++# The EXAMPLE_PATH tag can be used to specify one or more files or ++# directories that contain example code fragments that are included (see ++# the \include command). ++ ++EXAMPLE_PATH = ++ ++# If the value of the EXAMPLE_PATH tag contains directories, you can use the ++# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp ++# and *.h) to filter out the source-files in the directories. If left ++# blank all files are included. ++ ++EXAMPLE_PATTERNS = ++ ++# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be ++# searched for input files to be used with the \include or \dontinclude ++# commands irrespective of the value of the RECURSIVE tag. ++# Possible values are YES and NO. If left blank NO is used. ++ ++EXAMPLE_RECURSIVE = NO ++ ++# The IMAGE_PATH tag can be used to specify one or more files or ++# directories that contain image that are included in the documentation (see ++# the \image command). ++ ++IMAGE_PATH = ++ ++# The INPUT_FILTER tag can be used to specify a program that doxygen should ++# invoke to filter for each input file. Doxygen will invoke the filter program ++# by executing (via popen()) the command , where ++# is the value of the INPUT_FILTER tag, and is the name of an ++# input file. Doxygen will then use the output that the filter program writes ++# to standard output. If FILTER_PATTERNS is specified, this tag will be ++# ignored. ++ ++INPUT_FILTER = ++ ++# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern ++# basis. Doxygen will compare the file name with each pattern and apply the ++# filter if there is a match. The filters are a list of the form: ++# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further ++# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER ++# is applied to all files. ++ ++FILTER_PATTERNS = ++ ++# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using ++# INPUT_FILTER) will be used to filter the input files when producing source ++# files to browse (i.e. when SOURCE_BROWSER is set to YES). ++ ++FILTER_SOURCE_FILES = NO ++ ++#--------------------------------------------------------------------------- ++# configuration options related to source browsing ++#--------------------------------------------------------------------------- ++ ++# If the SOURCE_BROWSER tag is set to YES then a list of source files will ++# be generated. Documented entities will be cross-referenced with these sources. ++# Note: To get rid of all source code in the generated output, make sure also ++# VERBATIM_HEADERS is set to NO. ++ ++SOURCE_BROWSER = NO ++ ++# Setting the INLINE_SOURCES tag to YES will include the body ++# of functions and classes directly in the documentation. ++ ++INLINE_SOURCES = NO ++ ++# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct ++# doxygen to hide any special comment blocks from generated source code ++# fragments. Normal C and C++ comments will always remain visible. ++ ++STRIP_CODE_COMMENTS = YES ++ ++# If the REFERENCED_BY_RELATION tag is set to YES ++# then for each documented function all documented ++# functions referencing it will be listed. ++ ++REFERENCED_BY_RELATION = NO ++ ++# If the REFERENCES_RELATION tag is set to YES ++# then for each documented function all documented entities ++# called/used by that function will be listed. ++ ++REFERENCES_RELATION = NO ++ ++# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) ++# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from ++# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will ++# link to the source code. Otherwise they will link to the documentstion. ++ ++REFERENCES_LINK_SOURCE = YES ++ ++# If the USE_HTAGS tag is set to YES then the references to source code ++# will point to the HTML generated by the htags(1) tool instead of doxygen ++# built-in source browser. The htags tool is part of GNU's global source ++# tagging system (see http://www.gnu.org/software/global/global.html). You ++# will need version 4.8.6 or higher. ++ ++USE_HTAGS = NO ++ ++# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen ++# will generate a verbatim copy of the header file for each class for ++# which an include is specified. Set to NO to disable this. ++ ++VERBATIM_HEADERS = YES ++ ++#--------------------------------------------------------------------------- ++# configuration options related to the alphabetical class index ++#--------------------------------------------------------------------------- ++ ++# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index ++# of all compounds will be generated. Enable this if the project ++# contains a lot of classes, structs, unions or interfaces. ++ ++ALPHABETICAL_INDEX = NO ++ ++# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then ++# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns ++# in which this list will be split (can be a number in the range [1..20]) ++ ++COLS_IN_ALPHA_INDEX = 5 ++ ++# In case all classes in a project start with a common prefix, all ++# classes will be put under the same header in the alphabetical index. ++# The IGNORE_PREFIX tag can be used to specify one or more prefixes that ++# should be ignored while generating the index headers. ++ ++IGNORE_PREFIX = ++ ++#--------------------------------------------------------------------------- ++# configuration options related to the HTML output ++#--------------------------------------------------------------------------- ++ ++# If the GENERATE_HTML tag is set to YES (the default) Doxygen will ++# generate HTML output. ++ ++GENERATE_HTML = YES ++ ++# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. ++# If a relative path is entered the value of OUTPUT_DIRECTORY will be ++# put in front of it. If left blank `html' will be used as the default path. ++ ++HTML_OUTPUT = html ++ ++# The HTML_FILE_EXTENSION tag can be used to specify the file extension for ++# each generated HTML page (for example: .htm,.php,.asp). If it is left blank ++# doxygen will generate files with .html extension. ++ ++HTML_FILE_EXTENSION = .html ++ ++# The HTML_HEADER tag can be used to specify a personal HTML header for ++# each generated HTML page. If it is left blank doxygen will generate a ++# standard header. ++ ++HTML_HEADER = ++ ++# The HTML_FOOTER tag can be used to specify a personal HTML footer for ++# each generated HTML page. If it is left blank doxygen will generate a ++# standard footer. ++ ++HTML_FOOTER = ++ ++# The HTML_STYLESHEET tag can be used to specify a user-defined cascading ++# style sheet that is used by each HTML page. It can be used to ++# fine-tune the look of the HTML output. If the tag is left blank doxygen ++# will generate a default style sheet. Note that doxygen will try to copy ++# the style sheet file to the HTML output directory, so don't put your own ++# stylesheet in the HTML output directory as well, or it will be erased! ++ ++HTML_STYLESHEET = ++ ++# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, ++# files or namespaces will be aligned in HTML using tables. If set to ++# NO a bullet list will be used. ++ ++HTML_ALIGN_MEMBERS = YES ++ ++# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML ++# documentation will contain sections that can be hidden and shown after the ++# page has loaded. For this to work a browser that supports ++# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox ++# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). ++ ++HTML_DYNAMIC_SECTIONS = NO ++ ++# If the GENERATE_DOCSET tag is set to YES, additional index files ++# will be generated that can be used as input for Apple's Xcode 3 ++# integrated development environment, introduced with OSX 10.5 (Leopard). ++# To create a documentation set, doxygen will generate a Makefile in the ++# HTML output directory. Running make will produce the docset in that ++# directory and running "make install" will install the docset in ++# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find ++# it at startup. ++# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. ++ ++GENERATE_DOCSET = NO ++ ++# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the ++# feed. A documentation feed provides an umbrella under which multiple ++# documentation sets from a single provider (such as a company or product suite) ++# can be grouped. ++ ++DOCSET_FEEDNAME = "Doxygen generated docs" ++ ++# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that ++# should uniquely identify the documentation set bundle. This should be a ++# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen ++# will append .docset to the name. ++ ++DOCSET_BUNDLE_ID = org.doxygen.Project ++ ++# If the GENERATE_HTMLHELP tag is set to YES, additional index files ++# will be generated that can be used as input for tools like the ++# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) ++# of the generated HTML documentation. ++ ++GENERATE_HTMLHELP = NO ++ ++# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can ++# be used to specify the file name of the resulting .chm file. You ++# can add a path in front of the file if the result should not be ++# written to the html output directory. ++ ++CHM_FILE = ++ ++# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can ++# be used to specify the location (absolute path including file name) of ++# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run ++# the HTML help compiler on the generated index.hhp. ++ ++HHC_LOCATION = ++ ++# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag ++# controls if a separate .chi index file is generated (YES) or that ++# it should be included in the master .chm file (NO). ++ ++GENERATE_CHI = NO ++ ++# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING ++# is used to encode HtmlHelp index (hhk), content (hhc) and project file ++# content. ++ ++CHM_INDEX_ENCODING = ++ ++# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag ++# controls whether a binary table of contents is generated (YES) or a ++# normal table of contents (NO) in the .chm file. ++ ++BINARY_TOC = NO ++ ++# The TOC_EXPAND flag can be set to YES to add extra items for group members ++# to the contents of the HTML help documentation and to the tree view. ++ ++TOC_EXPAND = NO ++ ++# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER ++# are set, an additional index file will be generated that can be used as input for ++# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated ++# HTML documentation. ++ ++GENERATE_QHP = NO ++ ++# If the QHG_LOCATION tag is specified, the QCH_FILE tag can ++# be used to specify the file name of the resulting .qch file. ++# The path specified is relative to the HTML output folder. ++ ++QCH_FILE = ++ ++# The QHP_NAMESPACE tag specifies the namespace to use when generating ++# Qt Help Project output. For more information please see ++# Qt Help Project / Namespace. ++ ++QHP_NAMESPACE = org.doxygen.Project ++ ++# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating ++# Qt Help Project output. For more information please see ++# Qt Help Project / Virtual Folders. ++ ++QHP_VIRTUAL_FOLDER = doc ++ ++# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can ++# be used to specify the location of Qt's qhelpgenerator. ++# If non-empty doxygen will try to run qhelpgenerator on the generated ++# .qhp file . ++ ++QHG_LOCATION = ++ ++# The DISABLE_INDEX tag can be used to turn on/off the condensed index at ++# top of each HTML page. The value NO (the default) enables the index and ++# the value YES disables it. ++ ++DISABLE_INDEX = NO ++ ++# This tag can be used to set the number of enum values (range [1..20]) ++# that doxygen will group on one line in the generated HTML documentation. ++ ++ENUM_VALUES_PER_LINE = 4 ++ ++# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index ++# structure should be generated to display hierarchical information. ++# If the tag value is set to FRAME, a side panel will be generated ++# containing a tree-like index structure (just like the one that ++# is generated for HTML Help). For this to work a browser that supports ++# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, ++# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are ++# probably better off using the HTML help feature. Other possible values ++# for this tag are: HIERARCHIES, which will generate the Groups, Directories, ++# and Class Hierarchy pages using a tree view instead of an ordered list; ++# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which ++# disables this behavior completely. For backwards compatibility with previous ++# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE ++# respectively. ++ ++GENERATE_TREEVIEW = NONE ++ ++# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be ++# used to set the initial width (in pixels) of the frame in which the tree ++# is shown. ++ ++TREEVIEW_WIDTH = 250 ++ ++# Use this tag to change the font size of Latex formulas included ++# as images in the HTML documentation. The default is 10. Note that ++# when you change the font size after a successful doxygen run you need ++# to manually remove any form_*.png images from the HTML output directory ++# to force them to be regenerated. ++ ++FORMULA_FONTSIZE = 10 ++ ++#--------------------------------------------------------------------------- ++# configuration options related to the LaTeX output ++#--------------------------------------------------------------------------- ++ ++# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will ++# generate Latex output. ++ ++GENERATE_LATEX = NO ++ ++# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. ++# If a relative path is entered the value of OUTPUT_DIRECTORY will be ++# put in front of it. If left blank `latex' will be used as the default path. ++ ++LATEX_OUTPUT = latex ++ ++# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be ++# invoked. If left blank `latex' will be used as the default command name. ++ ++LATEX_CMD_NAME = latex ++ ++# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to ++# generate index for LaTeX. If left blank `makeindex' will be used as the ++# default command name. ++ ++MAKEINDEX_CMD_NAME = makeindex ++ ++# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact ++# LaTeX documents. This may be useful for small projects and may help to ++# save some trees in general. ++ ++COMPACT_LATEX = NO ++ ++# The PAPER_TYPE tag can be used to set the paper type that is used ++# by the printer. Possible values are: a4, a4wide, letter, legal and ++# executive. If left blank a4wide will be used. ++ ++PAPER_TYPE = a4wide ++ ++# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX ++# packages that should be included in the LaTeX output. ++ ++EXTRA_PACKAGES = ++ ++# The LATEX_HEADER tag can be used to specify a personal LaTeX header for ++# the generated latex document. The header should contain everything until ++# the first chapter. If it is left blank doxygen will generate a ++# standard header. Notice: only use this tag if you know what you are doing! ++ ++LATEX_HEADER = ++ ++# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated ++# is prepared for conversion to pdf (using ps2pdf). The pdf file will ++# contain links (just like the HTML output) instead of page references ++# This makes the output suitable for online browsing using a pdf viewer. ++ ++PDF_HYPERLINKS = YES ++ ++# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of ++# plain latex in the generated Makefile. Set this option to YES to get a ++# higher quality PDF documentation. ++ ++USE_PDFLATEX = YES ++ ++# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. ++# command to the generated LaTeX files. This will instruct LaTeX to keep ++# running if errors occur, instead of asking the user for help. ++# This option is also used when generating formulas in HTML. ++ ++LATEX_BATCHMODE = NO ++ ++# If LATEX_HIDE_INDICES is set to YES then doxygen will not ++# include the index chapters (such as File Index, Compound Index, etc.) ++# in the output. ++ ++LATEX_HIDE_INDICES = NO ++ ++#--------------------------------------------------------------------------- ++# configuration options related to the RTF output ++#--------------------------------------------------------------------------- ++ ++# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output ++# The RTF output is optimized for Word 97 and may not look very pretty with ++# other RTF readers or editors. ++ ++GENERATE_RTF = NO ++ ++# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. ++# If a relative path is entered the value of OUTPUT_DIRECTORY will be ++# put in front of it. If left blank `rtf' will be used as the default path. ++ ++RTF_OUTPUT = rtf ++ ++# If the COMPACT_RTF tag is set to YES Doxygen generates more compact ++# RTF documents. This may be useful for small projects and may help to ++# save some trees in general. ++ ++COMPACT_RTF = NO ++ ++# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated ++# will contain hyperlink fields. The RTF file will ++# contain links (just like the HTML output) instead of page references. ++# This makes the output suitable for online browsing using WORD or other ++# programs which support those fields. ++# Note: wordpad (write) and others do not support links. ++ ++RTF_HYPERLINKS = NO ++ ++# Load stylesheet definitions from file. Syntax is similar to doxygen's ++# config file, i.e. a series of assignments. You only have to provide ++# replacements, missing definitions are set to their default value. ++ ++RTF_STYLESHEET_FILE = ++ ++# Set optional variables used in the generation of an rtf document. ++# Syntax is similar to doxygen's config file. ++ ++RTF_EXTENSIONS_FILE = ++ ++#--------------------------------------------------------------------------- ++# configuration options related to the man page output ++#--------------------------------------------------------------------------- ++ ++# If the GENERATE_MAN tag is set to YES (the default) Doxygen will ++# generate man pages ++ ++GENERATE_MAN = NO ++ ++# The MAN_OUTPUT tag is used to specify where the man pages will be put. ++# If a relative path is entered the value of OUTPUT_DIRECTORY will be ++# put in front of it. If left blank `man' will be used as the default path. ++ ++MAN_OUTPUT = man ++ ++# The MAN_EXTENSION tag determines the extension that is added to ++# the generated man pages (default is the subroutine's section .3) ++ ++MAN_EXTENSION = .3 ++ ++# If the MAN_LINKS tag is set to YES and Doxygen generates man output, ++# then it will generate one additional man file for each entity ++# documented in the real man page(s). These additional files ++# only source the real man page, but without them the man command ++# would be unable to find the correct page. The default is NO. ++ ++MAN_LINKS = NO ++ ++#--------------------------------------------------------------------------- ++# configuration options related to the XML output ++#--------------------------------------------------------------------------- ++ ++# If the GENERATE_XML tag is set to YES Doxygen will ++# generate an XML file that captures the structure of ++# the code including all documentation. ++ ++GENERATE_XML = NO ++ ++# The XML_OUTPUT tag is used to specify where the XML pages will be put. ++# If a relative path is entered the value of OUTPUT_DIRECTORY will be ++# put in front of it. If left blank `xml' will be used as the default path. ++ ++XML_OUTPUT = xml ++ ++# The XML_SCHEMA tag can be used to specify an XML schema, ++# which can be used by a validating XML parser to check the ++# syntax of the XML files. ++ ++XML_SCHEMA = ++ ++# The XML_DTD tag can be used to specify an XML DTD, ++# which can be used by a validating XML parser to check the ++# syntax of the XML files. ++ ++XML_DTD = ++ ++# If the XML_PROGRAMLISTING tag is set to YES Doxygen will ++# dump the program listings (including syntax highlighting ++# and cross-referencing information) to the XML output. Note that ++# enabling this will significantly increase the size of the XML output. ++ ++XML_PROGRAMLISTING = YES ++ ++#--------------------------------------------------------------------------- ++# configuration options for the AutoGen Definitions output ++#--------------------------------------------------------------------------- ++ ++# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will ++# generate an AutoGen Definitions (see autogen.sf.net) file ++# that captures the structure of the code including all ++# documentation. Note that this feature is still experimental ++# and incomplete at the moment. ++ ++GENERATE_AUTOGEN_DEF = NO ++ ++#--------------------------------------------------------------------------- ++# configuration options related to the Perl module output ++#--------------------------------------------------------------------------- ++ ++# If the GENERATE_PERLMOD tag is set to YES Doxygen will ++# generate a Perl module file that captures the structure of ++# the code including all documentation. Note that this ++# feature is still experimental and incomplete at the ++# moment. ++ ++GENERATE_PERLMOD = NO ++ ++# If the PERLMOD_LATEX tag is set to YES Doxygen will generate ++# the necessary Makefile rules, Perl scripts and LaTeX code to be able ++# to generate PDF and DVI output from the Perl module output. ++ ++PERLMOD_LATEX = NO ++ ++# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be ++# nicely formatted so it can be parsed by a human reader. This is useful ++# if you want to understand what is going on. On the other hand, if this ++# tag is set to NO the size of the Perl module output will be much smaller ++# and Perl will parse it just the same. ++ ++PERLMOD_PRETTY = YES ++ ++# The names of the make variables in the generated doxyrules.make file ++# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. ++# This is useful so different doxyrules.make files included by the same ++# Makefile don't overwrite each other's variables. ++ ++PERLMOD_MAKEVAR_PREFIX = ++ ++#--------------------------------------------------------------------------- ++# Configuration options related to the preprocessor ++#--------------------------------------------------------------------------- ++ ++# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will ++# evaluate all C-preprocessor directives found in the sources and include ++# files. ++ ++ENABLE_PREPROCESSING = YES ++ ++# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro ++# names in the source code. If set to NO (the default) only conditional ++# compilation will be performed. Macro expansion can be done in a controlled ++# way by setting EXPAND_ONLY_PREDEF to YES. ++ ++MACRO_EXPANSION = NO ++ ++# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES ++# then the macro expansion is limited to the macros specified with the ++# PREDEFINED and EXPAND_AS_DEFINED tags. ++ ++EXPAND_ONLY_PREDEF = NO ++ ++# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files ++# in the INCLUDE_PATH (see below) will be search if a #include is found. ++ ++SEARCH_INCLUDES = YES ++ ++# The INCLUDE_PATH tag can be used to specify one or more directories that ++# contain include files that are not input files but should be processed by ++# the preprocessor. ++ ++INCLUDE_PATH = ++ ++# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard ++# patterns (like *.h and *.hpp) to filter out the header-files in the ++# directories. If left blank, the patterns specified with FILE_PATTERNS will ++# be used. ++ ++INCLUDE_FILE_PATTERNS = ++ ++# The PREDEFINED tag can be used to specify one or more macro names that ++# are defined before the preprocessor is started (similar to the -D option of ++# gcc). The argument of the tag is a list of macros of the form: name ++# or name=definition (no spaces). If the definition and the = are ++# omitted =1 is assumed. To prevent a macro definition from being ++# undefined via #undef or recursively expanded use the := operator ++# instead of the = operator. ++ ++PREDEFINED = ++ ++# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then ++# this tag can be used to specify a list of macro names that should be expanded. ++# The macro definition that is found in the sources will be used. ++# Use the PREDEFINED tag if you want to use a different macro definition. ++ ++EXPAND_AS_DEFINED = ++ ++# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then ++# doxygen's preprocessor will remove all function-like macros that are alone ++# on a line, have an all uppercase name, and do not end with a semicolon. Such ++# function macros are typically used for boiler-plate code, and will confuse ++# the parser if not removed. ++ ++SKIP_FUNCTION_MACROS = YES ++ ++#--------------------------------------------------------------------------- ++# Configuration::additions related to external references ++#--------------------------------------------------------------------------- ++ ++# The TAGFILES option can be used to specify one or more tagfiles. ++# Optionally an initial location of the external documentation ++# can be added for each tagfile. The format of a tag file without ++# this location is as follows: ++# TAGFILES = file1 file2 ... ++# Adding location for the tag files is done as follows: ++# TAGFILES = file1=loc1 "file2 = loc2" ... ++# where "loc1" and "loc2" can be relative or absolute paths or ++# URLs. If a location is present for each tag, the installdox tool ++# does not have to be run to correct the links. ++# Note that each tag file must have a unique name ++# (where the name does NOT include the path) ++# If a tag file is not located in the directory in which doxygen ++# is run, you must also specify the path to the tagfile here. ++ ++TAGFILES = ++ ++# When a file name is specified after GENERATE_TAGFILE, doxygen will create ++# a tag file that is based on the input files it reads. ++ ++GENERATE_TAGFILE = ++ ++# If the ALLEXTERNALS tag is set to YES all external classes will be listed ++# in the class index. If set to NO only the inherited external classes ++# will be listed. ++ ++ALLEXTERNALS = NO ++ ++# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed ++# in the modules index. If set to NO, only the current project's groups will ++# be listed. ++ ++EXTERNAL_GROUPS = YES ++ ++# The PERL_PATH should be the absolute path and name of the perl script ++# interpreter (i.e. the result of `which perl'). ++ ++PERL_PATH = /usr/bin/perl ++ ++#--------------------------------------------------------------------------- ++# Configuration options related to the dot tool ++#--------------------------------------------------------------------------- ++ ++# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will ++# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base ++# or super classes. Setting the tag to NO turns the diagrams off. Note that ++# this option is superseded by the HAVE_DOT option below. This is only a ++# fallback. It is recommended to install and use dot, since it yields more ++# powerful graphs. ++ ++CLASS_DIAGRAMS = YES ++ ++# You can define message sequence charts within doxygen comments using the \msc ++# command. Doxygen will then run the mscgen tool (see ++# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the ++# documentation. The MSCGEN_PATH tag allows you to specify the directory where ++# the mscgen tool resides. If left empty the tool is assumed to be found in the ++# default search path. ++ ++MSCGEN_PATH = ++ ++# If set to YES, the inheritance and collaboration graphs will hide ++# inheritance and usage relations if the target is undocumented ++# or is not a class. ++ ++HIDE_UNDOC_RELATIONS = YES ++ ++# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is ++# available from the path. This tool is part of Graphviz, a graph visualization ++# toolkit from AT&T and Lucent Bell Labs. The other options in this section ++# have no effect if this option is set to NO (the default) ++ ++HAVE_DOT = NO ++ ++# By default doxygen will write a font called FreeSans.ttf to the output ++# directory and reference it in all dot files that doxygen generates. This ++# font does not include all possible unicode characters however, so when you need ++# these (or just want a differently looking font) you can specify the font name ++# using DOT_FONTNAME. You need need to make sure dot is able to find the font, ++# which can be done by putting it in a standard location or by setting the ++# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory ++# containing the font. ++ ++DOT_FONTNAME = FreeSans ++ ++# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. ++# The default size is 10pt. ++ ++DOT_FONTSIZE = 10 ++ ++# By default doxygen will tell dot to use the output directory to look for the ++# FreeSans.ttf font (which doxygen will put there itself). If you specify a ++# different font using DOT_FONTNAME you can set the path where dot ++# can find it using this tag. ++ ++DOT_FONTPATH = ++ ++# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen ++# will generate a graph for each documented class showing the direct and ++# indirect inheritance relations. Setting this tag to YES will force the ++# the CLASS_DIAGRAMS tag to NO. ++ ++CLASS_GRAPH = YES ++ ++# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen ++# will generate a graph for each documented class showing the direct and ++# indirect implementation dependencies (inheritance, containment, and ++# class references variables) of the class with other documented classes. ++ ++COLLABORATION_GRAPH = YES ++ ++# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen ++# will generate a graph for groups, showing the direct groups dependencies ++ ++GROUP_GRAPHS = YES ++ ++# If the UML_LOOK tag is set to YES doxygen will generate inheritance and ++# collaboration diagrams in a style similar to the OMG's Unified Modeling ++# Language. ++ ++UML_LOOK = NO ++ ++# If set to YES, the inheritance and collaboration graphs will show the ++# relations between templates and their instances. ++ ++TEMPLATE_RELATIONS = NO ++ ++# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT ++# tags are set to YES then doxygen will generate a graph for each documented ++# file showing the direct and indirect include dependencies of the file with ++# other documented files. ++ ++INCLUDE_GRAPH = YES ++ ++# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and ++# HAVE_DOT tags are set to YES then doxygen will generate a graph for each ++# documented header file showing the documented files that directly or ++# indirectly include this file. ++ ++INCLUDED_BY_GRAPH = YES ++ ++# If the CALL_GRAPH and HAVE_DOT options are set to YES then ++# doxygen will generate a call dependency graph for every global function ++# or class method. Note that enabling this option will significantly increase ++# the time of a run. So in most cases it will be better to enable call graphs ++# for selected functions only using the \callgraph command. ++ ++CALL_GRAPH = NO ++ ++# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then ++# doxygen will generate a caller dependency graph for every global function ++# or class method. Note that enabling this option will significantly increase ++# the time of a run. So in most cases it will be better to enable caller ++# graphs for selected functions only using the \callergraph command. ++ ++CALLER_GRAPH = NO ++ ++# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen ++# will graphical hierarchy of all classes instead of a textual one. ++ ++GRAPHICAL_HIERARCHY = YES ++ ++# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES ++# then doxygen will show the dependencies a directory has on other directories ++# in a graphical way. The dependency relations are determined by the #include ++# relations between the files in the directories. ++ ++DIRECTORY_GRAPH = YES ++ ++# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images ++# generated by dot. Possible values are png, jpg, or gif ++# If left blank png will be used. ++ ++DOT_IMAGE_FORMAT = png ++ ++# The tag DOT_PATH can be used to specify the path where the dot tool can be ++# found. If left blank, it is assumed the dot tool can be found in the path. ++ ++DOT_PATH = ++ ++# The DOTFILE_DIRS tag can be used to specify one or more directories that ++# contain dot files that are included in the documentation (see the ++# \dotfile command). ++ ++DOTFILE_DIRS = ++ ++# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of ++# nodes that will be shown in the graph. If the number of nodes in a graph ++# becomes larger than this value, doxygen will truncate the graph, which is ++# visualized by representing a node as a red box. Note that doxygen if the ++# number of direct children of the root node in a graph is already larger than ++# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note ++# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. ++ ++DOT_GRAPH_MAX_NODES = 50 ++ ++# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the ++# graphs generated by dot. A depth value of 3 means that only nodes reachable ++# from the root by following a path via at most 3 edges will be shown. Nodes ++# that lay further from the root node will be omitted. Note that setting this ++# option to 1 or 2 may greatly reduce the computation time needed for large ++# code bases. Also note that the size of a graph can be further restricted by ++# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. ++ ++MAX_DOT_GRAPH_DEPTH = 0 ++ ++# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent ++# background. This is disabled by default, because dot on Windows does not ++# seem to support this out of the box. Warning: Depending on the platform used, ++# enabling this option may lead to badly anti-aliased labels on the edges of ++# a graph (i.e. they become hard to read). ++ ++DOT_TRANSPARENT = NO ++ ++# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output ++# files in one run (i.e. multiple -o and -T options on the command line). This ++# makes dot run faster, but since only newer versions of dot (>1.8.10) ++# support this, this feature is disabled by default. ++ ++DOT_MULTI_TARGETS = NO ++ ++# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will ++# generate a legend page explaining the meaning of the various boxes and ++# arrows in the dot generated graphs. ++ ++GENERATE_LEGEND = YES ++ ++# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will ++# remove the intermediate dot files that are used to generate ++# the various graphs. ++ ++DOT_CLEANUP = YES ++ ++#--------------------------------------------------------------------------- ++# Configuration::additions related to the search engine ++#--------------------------------------------------------------------------- ++ ++# The SEARCHENGINE tag specifies whether or not a search engine should be ++# used. If set to NO the values of all tags below this one will be ignored. ++ ++SEARCHENGINE = NO +diff --git a/libiscsi/libiscsi.h b/libiscsi/libiscsi.h +new file mode 100644 +index 0000000..756590e +--- /dev/null ++++ b/libiscsi/libiscsi.h +@@ -0,0 +1,344 @@ ++/* ++ * iSCSI Administration library ++ * ++ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. ++ * Copyright (C) 2008-2009 Hans de Goede ++ * maintained by open-iscsi@googlegroups.com ++ * ++ * 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 2 of the License, 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. ++ * ++ * See the file COPYING included with this distribution for more details. ++ */ ++ ++#ifndef __LIBISCSI_H ++#define __LIBISCSI_H ++ ++#include ++ ++#ifdef __cplusplus ++extern "C" { ++#endif /* __cplusplus */ ++ ++#if __GNUC__ >= 4 ++#define PUBLIC __attribute__ ((visibility("default"))) ++#else ++#define PUBLIC ++#endif ++ ++/** \brief Maximum length for iSCSI values. ++ * ++ * Maximum length for iSCSI values such as hostnames and parameter values. ++ */ ++#define LIBISCSI_VALUE_MAXLEN 256 ++ ++/** \brief supported authentication methods ++ * ++ * This enum lists all supported authentication methods. ++ */ ++enum libiscsi_auth_t { ++ libiscsi_auth_none /** No authentication */, ++ libiscsi_auth_chap /** CHAP authentication */, ++}; ++ ++/** \brief libiscsi context struct ++ * ++ * Note: even though libiscsi uses a context struct, the underlying open-iscsi ++ * code does not, so libiscsi is not thread safe, not even when using one ++ * context per thread! ++ */ ++struct libiscsi_context; ++ ++/** \brief iSCSI node record ++ * ++ * Struct holding data uniquely identifying an iSCSI node. ++ */ ++struct libiscsi_node { ++ char name[LIBISCSI_VALUE_MAXLEN] /** iSCSI iqn for the node. */; ++ int tpgt /** Portal group number. */; ++ /* Note open-iscsi has some code in place for multiple connections in one ++ node record and thus multiple address / port combi's, but this does not ++ get used anywhere, so we keep things simple and assume one connection */ ++ char address[NI_MAXHOST] /** Portal hostname or IP-address. */; ++ int port /** Portal port number. */; ++ char iface[LIBISCSI_VALUE_MAXLEN] /** Interface to connect through. */; ++}; ++ ++/** \brief libiscsi CHAP authentication information struct ++ * ++ * Struct holding all data needed for CHAP login / authentication. Note that ++ * \e reverse_username may be a 0 length string in which case only forward ++ * authentication will be done. ++ */ ++struct libiscsi_chap_auth_info { ++ char username[LIBISCSI_VALUE_MAXLEN] /** Username */; ++ char password[LIBISCSI_VALUE_MAXLEN] /** Password */; ++ char reverse_username[LIBISCSI_VALUE_MAXLEN] /** Reverse Username */; ++ char reverse_password[LIBISCSI_VALUE_MAXLEN] /** Reverse Password */; ++}; ++ ++/** \brief generic libiscsi authentication information struct ++ * ++ * Struct holding authentication information for discovery and login. ++ */ ++struct libiscsi_auth_info { ++ enum libiscsi_auth_t method /** Authentication method to use */; ++ union { ++ struct libiscsi_chap_auth_info chap /** Chap specific info */; ++ } /** Union holding method depenend info */; ++}; ++ ++/** \brief Initalize libiscsi ++ * ++ * This function creates a libiscsi context and initalizes it. This context ++ * is need to use other libiscsi funtions. ++ * ++ * \return A pointer to the created context, or NULL in case of an error. ++ */ ++PUBLIC struct libiscsi_context *libiscsi_init(void); ++ ++/** \brief Cleanup libiscsi used resource ++ * ++ * This function cleanups any used resources and then destroys the passed ++ * context. After this the passed in context may no longer be used! ++ * ++ * \param context libiscsi context to operate on. ++ */ ++PUBLIC void libiscsi_cleanup(struct libiscsi_context *context); ++ ++/** \brief Discover iSCSI nodes using sendtargets and add them to the node db. ++ * ++ * This function connects to the given address and port and then tries to ++ * discover iSCSI nodes using the sendtargets protocol. Any found nodes are ++ * added to the local iSCSI node database and are returned in a dynamically ++ * allocated array. ++ * ++ * Note that the (optional) authentication info is for authenticating the ++ * discovery, and is not for the found nodes! If the connection(s) to the ++ * node(s) need authentication too, you can set the username / password for ++ * those (which can be different!) using the libiscsi_node_set_auth() function. ++ * ++ * \param context libiscsi context to operate on. ++ * \param address Hostname or IP-address to connect to. ++ * \param port Port to connect to, or 0 for the default port. ++ * \param auth_info Authentication information, or NULL. ++ * \param nr_found The number of found nodes will be returned ++ * through this pointer if not NULL. ++ * \param found_nodes The address of the dynamically allocated array ++ * of found nodes will be returned through this ++ * pointer if not NULL. The caller must free this ++ * array using free(). ++ * \return 0 on success, otherwise a standard error code ++ * (from errno.h). ++ */ ++PUBLIC int libiscsi_discover_sendtargets(struct libiscsi_context *context, ++ const char *address, int port, const struct libiscsi_auth_info *auth_info, ++ int *nr_found, struct libiscsi_node **found_nodes); ++ ++/** \brief Read iSCSI node info from firmware and add them to the node db. ++ * ++ * This function discovers iSCSI nodes using firmware (ppc or ibft). Any found ++ * nodes are added to the local iSCSI node database and are returned in a ++ * dynamically allocated array. ++ * ++ * Note that unlike sendtargets discovery, this function will also read ++ * authentication info and store that in the database too. ++ * ++ * Note this function currently is a stub which will always return -EINVAL ++ * (IOW it is not yet implemented) ++ * ++ * \param context libiscsi context to operate on. ++ * \param nr_found The number of found nodes will be returned ++ * through this pointer if not NULL. ++ * \param found_nodes The address of the dynamically allocated array ++ * of found nodes will be returned through this ++ * pointer if not NULL. The caller must free this ++ * array using free(). ++ * \return 0 on success, otherwise a standard error code ++ * (from errno.h). ++ */ ++PUBLIC int libiscsi_discover_firmware(struct libiscsi_context *context, ++ int *nr_found, struct libiscsi_node **found_nodes); ++ ++/** \brief Check validity of the given authentication info. ++ * ++ * This function checks the validity of the given authentication info. For ++ * example in case of CHAP, if the username and password are not empty. ++ * ++ * This function is mainly intended for use by language bindings. ++ * ++ * \param context libiscsi context to operate on. ++ * \param auth_info Authentication information to check. ++ * \return 0 on success, otherwise EINVAL. ++ */ ++PUBLIC int libiscsi_verify_auth_info(struct libiscsi_context *context, ++ const struct libiscsi_auth_info *auth_info); ++ ++/** \brief Set the authentication info for the given node. ++ * ++ * This function sets the authentication information for the node described by ++ * the given node record. This will overwrite any existing authentication ++ * information. ++ * ++ * This is the way to specify authentication information for nodes found ++ * through sendtargets discovery. ++ * ++ * Note: ++ * 1) This is a convience wrapper around libiscsi_node_set_parameter(), ++ * setting the node.session.auth.* parameters. ++ * 2) For nodes found through firmware discovery the authentication information ++ * has already been set from the firmware. ++ * 3) \e auth_info may be NULL in which case any existing authinfo will be ++ * cleared. ++ * ++ * \param context libiscsi context to operate on. ++ * \param node iSCSI node to set auth information of ++ * \param auth_info Authentication information, or NULL. ++ * \return 0 on success, otherwise a standard error code ++ * (from errno.h). ++ */ ++PUBLIC int libiscsi_node_set_auth(struct libiscsi_context *context, ++ const struct libiscsi_node *node, ++ const struct libiscsi_auth_info *auth_info); ++ ++/** \brief Get the authentication info for the given node. ++ * ++ * This function gets the authentication information for the node described by ++ * the given node record. ++ * ++ * \param context libiscsi context to operate on. ++ * \param node iSCSI node to set auth information of ++ * \param auth_info Pointer to a libiscsi_auth_info struct where ++ * the retreived information will be stored. ++ * \return 0 on success, otherwise a standard error code ++ * (from errno.h). ++ */ ++PUBLIC int libiscsi_node_get_auth(struct libiscsi_context *context, ++ const struct libiscsi_node *node, ++ struct libiscsi_auth_info *auth_info); ++ ++/** \brief Login to an iSCSI node. ++ * ++ * Login to the iSCSI node described by the given node record. ++ * ++ * \param context libiscsi context to operate on. ++ * \param node iSCSI node to login to. ++ * \return 0 on success, otherwise a standard error code ++ * (from errno.h). ++ */ ++PUBLIC int libiscsi_node_login(struct libiscsi_context *context, ++ const struct libiscsi_node *node); ++ ++/** \brief Logout of an iSCSI node. ++ * ++ * Logout of the iSCSI node described by the given node record. ++ * ++ * \param context libiscsi context to operate on. ++ * \param node iSCSI node to logout from. ++ * \return 0 on success, otherwise a standard error code ++ * (from errno.h). ++ */ ++PUBLIC int libiscsi_node_logout(struct libiscsi_context *context, ++ const struct libiscsi_node *node); ++ ++/** \brief Set an iSCSI parameter for the given node ++ * ++ * Set the given nodes iSCSI parameter named by \e parameter to value \e value. ++ * ++ * \param context libiscsi context to operate on. ++ * \param node iSCSI node to change a parameter from. ++ * \param parameter Name of the parameter to set. ++ * \param value Value to set the parameter too. ++ * \return 0 on success, otherwise a standard error code ++ * (from errno.h). ++ */ ++PUBLIC int libiscsi_node_set_parameter(struct libiscsi_context *context, ++ const struct libiscsi_node *node, ++ const char *parameter, const char *value); ++ ++/** \brief Get the value of an iSCSI parameter for the given node ++ * ++ * Get the value of the given nodes iSCSI parameter named by \e parameter. ++ * ++ * \param context libiscsi context to operate on. ++ * \param node iSCSI node to change a parameter from. ++ * \param parameter Name of the parameter to get. ++ * \param value The retreived value is stored here, this buffer must be ++ * atleast LIBISCSI_VALUE_MAXLEN bytes large. ++ * \return 0 on success, otherwise a standard error code ++ * (from errno.h). ++ */ ++PUBLIC int libiscsi_node_get_parameter(struct libiscsi_context *context, ++ const struct libiscsi_node *node, const char *parameter, char *value); ++ ++/** \brief Get human readable string describing the last libiscsi error. ++ * ++ * This function can be called to get a human readable error string when a ++ * libiscsi function has returned an error. This function uses a single buffer ++ * per context, thus the result is only valid as long as no other libiscsi ++ * calls are made on the same context after the failing function call. ++ * ++ * \param context libiscsi context to operate on. ++ * ++ * \return human readable string describing the last libiscsi error. ++ */ ++PUBLIC const char *libiscsi_get_error_string(struct libiscsi_context *context); ++ ++ ++/************************** Utility functions *******************************/ ++ ++/** \brief libiscsi network config struct ++ * ++ * libiscsi network config struct. ++ */ ++struct libiscsi_network_config { ++ int dhcp /** Using DHCP? (boolean). */; ++ char iface_name[LIBISCSI_VALUE_MAXLEN] /** Interface name. */; ++ char mac_address[LIBISCSI_VALUE_MAXLEN] /** MAC address. */; ++ char ip_address[LIBISCSI_VALUE_MAXLEN] /** IP address. */; ++ char netmask[LIBISCSI_VALUE_MAXLEN] /** Netmask. */; ++ char gateway[LIBISCSI_VALUE_MAXLEN] /** IP of Default gateway. */; ++ char primary_dns[LIBISCSI_VALUE_MAXLEN] /** IP of the Primary DNS. */; ++ char secondary_dns[LIBISCSI_VALUE_MAXLEN] /** IP of the Secondary DNS. */; ++}; ++ ++/** \brief Get network configuration information from iscsi firmware ++ * ++ * Function can be called to get the network configuration information ++ * (like dhcp, ip, netmask, default gateway, etc.) from the firmware of a ++ * network adapter with iscsi boot firmware. ++ * ++ * Note that not all fields of the returned struct are necessarilly filled, ++ * unset fields contain a 0 length string. ++ * ++ * \param config pointer to a libiscsi_network_config struct to fill. ++ * ++ * \return 0 on success, ENODEV when no iscsi firmware was found. ++ */ ++PUBLIC int libiscsi_get_firmware_network_config( ++ struct libiscsi_network_config *config); ++ ++/** \brief Get the initiator name (iqn) from the iscsi firmware ++ * ++ * Get the initiator name (iqn) from the iscsi firmware. ++ * ++ * \param initiatorname The initiator name is stored here, this buffer must be ++ * atleast LIBISCSI_VALUE_MAXLEN bytes large. ++ * \return 0 on success, ENODEV when no iscsi firmware was found. ++ */ ++PUBLIC int libiscsi_get_firmware_initiator_name(char *initiatorname); ++ ++#undef PUBLIC ++ ++#ifdef __cplusplus ++} ++#endif /* __cplusplus */ ++ ++#endif +diff --git a/libiscsi/pylibiscsi.c b/libiscsi/pylibiscsi.c +new file mode 100644 +index 0000000..4b09aa7 +--- /dev/null ++++ b/libiscsi/pylibiscsi.c +@@ -0,0 +1,638 @@ ++/* ++ * iSCSI Administration library ++ * ++ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. ++ * Copyright (C) 2008-2009 Hans de Goede ++ * maintained by open-iscsi@googlegroups.com ++ * ++ * 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 2 of the License, 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. ++ * ++ * See the file COPYING included with this distribution for more details. ++ */ ++ ++#include ++#include "libiscsi.h" ++ ++static struct libiscsi_context *context = NULL; ++ ++/****************************** helpers ***********************************/ ++static int check_string(const char *string) ++{ ++ if (strlen(string) >= LIBISCSI_VALUE_MAXLEN) { ++ PyErr_SetString(PyExc_ValueError, "string too long"); ++ return -1; ++ } ++ return 0; ++} ++ ++/********************** PyIscsiChapAuthInfo ***************************/ ++ ++typedef struct { ++ PyObject_HEAD ++ ++ struct libiscsi_auth_info info; ++} PyIscsiChapAuthInfo; ++ ++static int PyIscsiChapAuthInfo_init(PyObject *self, PyObject *args, ++ PyObject *kwds) ++{ ++ int i; ++ PyIscsiChapAuthInfo *chap = (PyIscsiChapAuthInfo *)self; ++ char *kwlist[] = {"username", "password", "reverse_username", ++ "reverse_password", NULL}; ++ const char *string[4] = { NULL, NULL, NULL, NULL }; ++ ++ if (!PyArg_ParseTupleAndKeywords(args, kwds, ++ "zz|zz:chapAuthInfo.__init__", ++ kwlist, &string[0], &string[1], ++ &string[2], &string[3])) ++ return -1; ++ ++ for (i = 0; i < 4; i++) ++ if (string[i] && check_string(string[i])) ++ return -1; ++ ++ memset (&chap->info, 0, sizeof(chap->info)); ++ chap->info.method = libiscsi_auth_chap; ++ if (string[0]) ++ strcpy(chap->info.chap.username, string[0]); ++ if (string[1]) ++ strcpy(chap->info.chap.password, string[1]); ++ if (string[2]) ++ strcpy(chap->info.chap.reverse_username, string[2]); ++ if (string[3]) ++ strcpy(chap->info.chap.reverse_password, string[3]); ++ ++ if (libiscsi_verify_auth_info(context, &chap->info)) { ++ PyErr_SetString(PyExc_ValueError, ++ libiscsi_get_error_string(context)); ++ return -1; ++ } ++ return 0; ++} ++ ++static PyObject *PyIscsiChapAuthInfo_get(PyObject *self, void *data) ++{ ++ PyIscsiChapAuthInfo *chap = (PyIscsiChapAuthInfo *)self; ++ const char *attr = (const char *)data; ++ ++ if (!strcmp(attr, "username")) { ++ return PyString_FromString(chap->info.chap.username); ++ } else if (!strcmp(attr, "password")) { ++ return PyString_FromString(chap->info.chap.password); ++ } else if (!strcmp(attr, "reverse_username")) { ++ return PyString_FromString(chap->info.chap.reverse_username); ++ } else if (!strcmp(attr, "reverse_password")) { ++ return PyString_FromString(chap->info.chap.reverse_password); ++ } ++ return NULL; ++} ++ ++static int PyIscsiChapAuthInfo_set(PyObject *self, PyObject *value, void *data) ++{ ++ PyIscsiChapAuthInfo *chap = (PyIscsiChapAuthInfo *)self; ++ const char *attr = (const char *)data; ++ const char *str; ++ ++ if (!PyArg_Parse(value, "s", &str) || check_string(str)) ++ return -1; ++ ++ if (!strcmp(attr, "username")) { ++ strcpy(chap->info.chap.username, str); ++ } else if (!strcmp(attr, "password")) { ++ strcpy(chap->info.chap.password, str); ++ } else if (!strcmp(attr, "reverse_username")) { ++ strcpy(chap->info.chap.reverse_username, str); ++ } else if (!strcmp(attr, "reverse_password")) { ++ strcpy(chap->info.chap.reverse_password, str); ++ } ++ ++ return 0; ++} ++ ++static int PyIscsiChapAuthInfo_compare(PyIscsiChapAuthInfo *self, ++ PyIscsiChapAuthInfo *other) ++{ ++ int r; ++ ++ r = strcmp(self->info.chap.username, other->info.chap.username); ++ if (r) ++ return r; ++ ++ r = strcmp(self->info.chap.password, other->info.chap.password); ++ if (r) ++ return r; ++ ++ r = strcmp(self->info.chap.reverse_username, ++ other->info.chap.reverse_username); ++ if (r) ++ return r; ++ ++ r = strcmp(self->info.chap.reverse_password, ++ other->info.chap.reverse_password); ++ return r; ++} ++ ++static PyObject *PyIscsiChapAuthInfo_str(PyObject *self) ++{ ++ PyIscsiChapAuthInfo *chap = (PyIscsiChapAuthInfo *)self; ++ char s[1024], reverse[512] = ""; ++ ++ if (chap->info.chap.reverse_username[0]) ++ snprintf(reverse, sizeof(reverse), ", %s:%s", ++ chap->info.chap.reverse_username, ++ chap->info.chap.reverse_password); ++ ++ snprintf(s, sizeof(s), "%s:%s%s", chap->info.chap.username, ++ chap->info.chap.password, reverse); ++ ++ return PyString_FromString(s); ++} ++ ++static struct PyGetSetDef PyIscsiChapAuthInfo_getseters[] = { ++ {"username", (getter)PyIscsiChapAuthInfo_get, ++ (setter)PyIscsiChapAuthInfo_set, ++ "username", "username"}, ++ {"password", (getter)PyIscsiChapAuthInfo_get, ++ (setter)PyIscsiChapAuthInfo_set, ++ "password", "password"}, ++ {"reverse_username", (getter)PyIscsiChapAuthInfo_get, ++ (setter)PyIscsiChapAuthInfo_set, ++ "reverse_username", "reverse_username"}, ++ {"reverse_password", (getter)PyIscsiChapAuthInfo_get, ++ (setter)PyIscsiChapAuthInfo_set, ++ "reverse_password", "reverse_password"}, ++ {NULL} ++}; ++ ++PyTypeObject PyIscsiChapAuthInfo_Type = { ++ PyObject_HEAD_INIT(NULL) ++ .tp_name = "libiscsi.chapAuthInfo", ++ .tp_basicsize = sizeof (PyIscsiChapAuthInfo), ++ .tp_getset = PyIscsiChapAuthInfo_getseters, ++ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES | ++ Py_TPFLAGS_BASETYPE, ++ .tp_compare = (cmpfunc)PyIscsiChapAuthInfo_compare, ++ .tp_init = PyIscsiChapAuthInfo_init, ++ .tp_str = PyIscsiChapAuthInfo_str, ++ .tp_new = PyType_GenericNew, ++ .tp_doc = "iscsi chap authentication information.", ++}; ++ ++/***************************** PyIscsiNode ********************************/ ++ ++typedef struct { ++ PyObject_HEAD ++ ++ struct libiscsi_node node; ++} PyIscsiNode; ++ ++static int PyIscsiNode_init(PyObject *self, PyObject *args, PyObject *kwds) ++{ ++ PyIscsiNode *node = (PyIscsiNode *)self; ++ char *kwlist[] = {"name", "tpgt", "address", "port", "iface", NULL}; ++ const char *name = NULL, *address = NULL, *iface = NULL; ++ int tpgt = -1, port = 3260; ++ ++ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|isis:node.__init__", ++ kwlist, &name, &tpgt, &address, ++ &port, &iface)) ++ return -1; ++ if (address == NULL) { ++ PyErr_SetString(PyExc_ValueError, "address not set"); ++ return -1; ++ } ++ if (check_string(name) || check_string(address) || check_string(iface)) ++ return -1; ++ ++ strcpy(node->node.name, name); ++ node->node.tpgt = tpgt; ++ strcpy(node->node.address, address); ++ node->node.port = port; ++ strcpy(node->node.iface, iface); ++ ++ return 0; ++} ++ ++static PyObject *PyIscsiNode_get(PyObject *self, void *data) ++{ ++ PyIscsiNode *node = (PyIscsiNode *)self; ++ const char *attr = (const char *)data; ++ ++ if (!strcmp(attr, "name")) { ++ return PyString_FromString(node->node.name); ++ } else if (!strcmp(attr, "tpgt")) { ++ return PyInt_FromLong(node->node.tpgt); ++ } else if (!strcmp(attr, "address")) { ++ return PyString_FromString(node->node.address); ++ } else if (!strcmp(attr, "port")) { ++ return PyInt_FromLong(node->node.port); ++ } else if (!strcmp(attr, "iface")) { ++ return PyString_FromString(node->node.iface); ++ } ++ return NULL; ++} ++ ++static int PyIscsiNode_set(PyObject *self, PyObject *value, void *data) ++{ ++ PyIscsiNode *node = (PyIscsiNode *)self; ++ const char *attr = (const char *)data; ++ const char *str; ++ int i; ++ ++ if (!strcmp(attr, "name")) { ++ if (!PyArg_Parse(value, "s", &str) || check_string(str)) ++ return -1; ++ strcpy(node->node.name, str); ++ } else if (!strcmp(attr, "tpgt")) { ++ if (!PyArg_Parse(value, "i", &i)) ++ return -1; ++ node->node.tpgt = i; ++ } else if (!strcmp(attr, "address")) { ++ if (!PyArg_Parse(value, "s", &str) || check_string(str)) ++ return -1; ++ strcpy(node->node.address, str); ++ } else if (!strcmp(attr, "port")) { ++ if (!PyArg_Parse(value, "i", &i)) ++ return -1; ++ node->node.port = i; ++ } else if (!strcmp(attr, "iface")) { ++ if (!PyArg_Parse(value, "s", &str) || check_string(str)) ++ return -1; ++ strcpy(node->node.iface, str); ++ } ++ ++ return 0; ++} ++ ++static int PyIscsiNode_compare(PyIscsiNode *self, PyIscsiNode *other) ++{ ++ int res; ++ ++ res = strcmp(self->node.name, other->node.name); ++ if (res) ++ return res; ++ ++ if (self->node.tpgt < other->node.tpgt) ++ return -1; ++ if (self->node.tpgt > other->node.tpgt) ++ return -1; ++ ++ res = strcmp(self->node.address, other->node.address); ++ if (res) ++ return res; ++ ++ if (self->node.port < other->node.port) ++ return -1; ++ if (self->node.port > other->node.port) ++ return -1; ++ ++ res = strcmp(self->node.iface, other->node.iface); ++ if (res) ++ return res; ++ ++ return 0; ++} ++ ++static PyObject *PyIscsiNode_str(PyObject *self) ++{ ++ PyIscsiNode *node = (PyIscsiNode *)self; ++ char s[1024], tpgt[16] = ""; ++ ++ if (node->node.tpgt != -1) ++ sprintf(tpgt, ",%d", node->node.tpgt); ++ ++ snprintf(s, sizeof(s), "%s:%d%s %s", node->node.address, ++ node->node.port, tpgt, node->node.name); ++ ++ return PyString_FromString(s); ++} ++ ++static PyObject *PyIscsiNode_login(PyObject *self) ++{ ++ PyIscsiNode *node = (PyIscsiNode *)self; ++ ++ if (libiscsi_node_login(context, &node->node)) { ++ PyErr_SetString(PyExc_IOError, ++ libiscsi_get_error_string(context)); ++ return NULL; ++ } ++ Py_RETURN_NONE; ++} ++ ++static PyObject *PyIscsiNode_logout(PyObject *self) ++{ ++ PyIscsiNode *node = (PyIscsiNode *)self; ++ ++ if (libiscsi_node_logout(context, &node->node)) { ++ PyErr_SetString(PyExc_IOError, ++ libiscsi_get_error_string(context)); ++ return NULL; ++ } ++ Py_RETURN_NONE; ++} ++ ++static PyObject *PyIscsiNode_setAuth(PyObject *self, PyObject *args, ++ PyObject *kwds) ++{ ++ char *kwlist[] = {"authinfo", NULL}; ++ PyIscsiNode *node = (PyIscsiNode *)self; ++ PyObject *arg; ++ const struct libiscsi_auth_info *authinfo = NULL; ++ ++ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", kwlist, &arg)) ++ return NULL; ++ ++ if (arg == Py_None) { ++ authinfo = NULL; ++ } else if (PyObject_IsInstance(arg, (PyObject *) ++ &PyIscsiChapAuthInfo_Type)) { ++ PyIscsiChapAuthInfo *pyauthinfo = (PyIscsiChapAuthInfo *)arg; ++ authinfo = &pyauthinfo->info; ++ } else { ++ PyErr_SetString(PyExc_ValueError, "invalid authinfo type"); ++ return NULL; ++ } ++ ++ if (libiscsi_node_set_auth(context, &node->node, authinfo)) { ++ PyErr_SetString(PyExc_IOError, ++ libiscsi_get_error_string(context)); ++ return NULL; ++ } ++ Py_RETURN_NONE; ++} ++ ++static PyObject *PyIscsiNode_getAuth(PyObject *self) ++{ ++ PyIscsiNode *node = (PyIscsiNode *)self; ++ PyIscsiChapAuthInfo *pyauthinfo; ++ struct libiscsi_auth_info authinfo; ++ ++ if (libiscsi_node_get_auth(context, &node->node, &authinfo)) { ++ PyErr_SetString(PyExc_IOError, ++ libiscsi_get_error_string(context)); ++ return NULL; ++ } ++ ++ switch (authinfo.method) { ++ case libiscsi_auth_chap: ++ pyauthinfo = PyObject_New(PyIscsiChapAuthInfo, ++ &PyIscsiChapAuthInfo_Type); ++ if (!pyauthinfo) ++ return NULL; ++ ++ pyauthinfo->info = authinfo; ++ ++ return (PyObject *)pyauthinfo; ++ ++ case libiscsi_auth_none: ++ default: ++ Py_RETURN_NONE; ++ } ++} ++ ++static PyObject *PyIscsiNode_setParameter(PyObject *self, PyObject *args, ++ PyObject *kwds) ++{ ++ char *kwlist[] = {"parameter", "value", NULL}; ++ PyIscsiNode *node = (PyIscsiNode *)self; ++ const char *parameter, *value; ++ ++ if (!PyArg_ParseTupleAndKeywords(args, kwds, "ss", kwlist, ++ ¶meter, &value)) ++ return NULL; ++ if (check_string(parameter) || check_string(value)) ++ return NULL; ++ ++ if (libiscsi_node_set_parameter(context, &node->node, parameter, ++ value)) { ++ PyErr_SetString(PyExc_IOError, ++ libiscsi_get_error_string(context)); ++ return NULL; ++ } ++ Py_RETURN_NONE; ++} ++ ++static PyObject *PyIscsiNode_getParameter(PyObject *self, PyObject *args, ++ PyObject *kwds) ++{ ++ char *kwlist[] = {"parameter", NULL}; ++ PyIscsiNode *node = (PyIscsiNode *)self; ++ const char *parameter; ++ char value[LIBISCSI_VALUE_MAXLEN]; ++ ++ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, ¶meter)) ++ return NULL; ++ if (check_string(parameter)) ++ return NULL; ++ ++ if (libiscsi_node_get_parameter(context, &node->node, parameter, ++ value)) { ++ PyErr_SetString(PyExc_IOError, ++ libiscsi_get_error_string(context)); ++ return NULL; ++ } ++ return Py_BuildValue("s", value); ++} ++ ++static struct PyGetSetDef PyIscsiNode_getseters[] = { ++ {"name", (getter)PyIscsiNode_get, (setter)PyIscsiNode_set, ++ "name", "name"}, ++ {"tpgt", (getter)PyIscsiNode_get, (setter)PyIscsiNode_set, ++ "tpgt", "tpgt"}, ++ {"address", (getter)PyIscsiNode_get, (setter)PyIscsiNode_set, ++ "address", "address"}, ++ {"port", (getter)PyIscsiNode_get, (setter)PyIscsiNode_set, ++ "port", "port"}, ++ {"iface", (getter)PyIscsiNode_get, (setter)PyIscsiNode_set, ++ "iface", "iface"}, ++ {NULL} ++}; ++ ++static struct PyMethodDef PyIscsiNode_methods[] = { ++ {"login", (PyCFunction) PyIscsiNode_login, METH_NOARGS, ++ "Log in to the node"}, ++ {"logout", (PyCFunction) PyIscsiNode_logout, METH_NOARGS, ++ "Log out of the node"}, ++ {"setAuth", (PyCFunction) PyIscsiNode_setAuth, ++ METH_VARARGS|METH_KEYWORDS, ++ "Set authentication information"}, ++ {"getAuth", (PyCFunction) PyIscsiNode_getAuth, METH_NOARGS, ++ "Get authentication information"}, ++ {"setParameter", (PyCFunction) PyIscsiNode_setParameter, ++ METH_VARARGS|METH_KEYWORDS, ++ "Set an iscsi node parameter"}, ++ {"getParameter", (PyCFunction) PyIscsiNode_getParameter, ++ METH_VARARGS|METH_KEYWORDS, ++ "Get an iscsi node parameter"}, ++ {NULL} ++}; ++ ++PyTypeObject PyIscsiNode_Type = { ++ PyObject_HEAD_INIT(NULL) ++ .tp_name = "libiscsi.node", ++ .tp_basicsize = sizeof (PyIscsiNode), ++ .tp_getset = PyIscsiNode_getseters, ++ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES | ++ Py_TPFLAGS_BASETYPE, ++ .tp_methods = PyIscsiNode_methods, ++ .tp_compare = (cmpfunc)PyIscsiNode_compare, ++ .tp_init = PyIscsiNode_init, ++ .tp_str = PyIscsiNode_str, ++ .tp_new = PyType_GenericNew, ++ .tp_doc = "The iscsi node contains iscsi node information.", ++}; ++ ++/***************************************************************************/ ++ ++static PyObject *pylibiscsi_discover_sendtargets(PyObject *self, ++ PyObject *args, PyObject *kwds) ++{ ++ char *kwlist[] = {"address", "port", "authinfo", NULL}; ++ const char *address = NULL; ++ int i, nr_found, port = 3260; ++ PyObject *authinfo_arg = NULL; ++ const struct libiscsi_auth_info *authinfo = NULL; ++ struct libiscsi_node *found_nodes; ++ PyObject* found_node_list; ++ ++ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|iO", ++ kwlist, &address, &port, ++ &authinfo_arg)) ++ return NULL; ++ ++ if (authinfo_arg) { ++ if (PyObject_IsInstance(authinfo_arg, (PyObject *) ++ &PyIscsiChapAuthInfo_Type)) { ++ PyIscsiChapAuthInfo *pyauthinfo = ++ (PyIscsiChapAuthInfo *)authinfo_arg; ++ authinfo = &pyauthinfo->info; ++ } else if (authinfo_arg != Py_None) { ++ PyErr_SetString(PyExc_ValueError, ++ "invalid authinfo type"); ++ return NULL; ++ } ++ } ++ ++ if (libiscsi_discover_sendtargets(context, address, port, authinfo, ++ &nr_found, &found_nodes)) { ++ PyErr_SetString(PyExc_IOError, ++ libiscsi_get_error_string(context)); ++ return NULL; ++ } ++ ++ if (nr_found == 0) ++ Py_RETURN_NONE; ++ ++ found_node_list = PyList_New(nr_found); ++ if (!found_node_list) ++ return NULL; ++ ++ for(i = 0; i < nr_found; i++) { ++ PyIscsiNode *pynode; ++ ++ pynode = PyObject_New(PyIscsiNode, &PyIscsiNode_Type); ++ if (!pynode) { ++ /* This will deref already added nodes for us */ ++ Py_DECREF(found_node_list); ++ return NULL; ++ } ++ pynode->node = found_nodes[i]; ++ PyList_SET_ITEM(found_node_list, i, (PyObject *)pynode); ++ } ++ ++ return found_node_list; ++} ++ ++static PyObject *pylibiscsi_discover_firmware(PyObject *self) ++{ ++ int i, nr_found; ++ struct libiscsi_node *found_nodes; ++ PyObject* found_node_list; ++ ++ if (libiscsi_discover_firmware(context, &nr_found, &found_nodes)) { ++ PyErr_SetString(PyExc_IOError, ++ libiscsi_get_error_string(context)); ++ return NULL; ++ } ++ ++ if (nr_found == 0) ++ Py_RETURN_NONE; ++ ++ found_node_list = PyList_New(nr_found); ++ if (!found_node_list) ++ return NULL; ++ ++ for(i = 0; i < nr_found; i++) { ++ PyIscsiNode *pynode; ++ ++ pynode = PyObject_New(PyIscsiNode, &PyIscsiNode_Type); ++ if (!pynode) { ++ /* This will deref already added nodes for us */ ++ Py_DECREF(found_node_list); ++ return NULL; ++ } ++ pynode->node = found_nodes[i]; ++ PyList_SET_ITEM(found_node_list, i, (PyObject *)pynode); ++ } ++ ++ return found_node_list; ++} ++ ++static PyObject *pylibiscsi_get_firmware_initiator_name(PyObject *self) ++{ ++ char initiatorname[LIBISCSI_VALUE_MAXLEN]; ++ ++ if (libiscsi_get_firmware_initiator_name(initiatorname)) { ++ PyErr_SetString(PyExc_IOError, ++ libiscsi_get_error_string(context)); ++ return NULL; ++ } ++ ++ return PyString_FromString(initiatorname); ++} ++ ++static PyMethodDef pylibiscsi_functions[] = { ++ { "discover_sendtargets", ++ (PyCFunction)pylibiscsi_discover_sendtargets, ++ METH_VARARGS|METH_KEYWORDS, ++ "Do sendtargets discovery and return a list of found nodes)"}, ++ { "discover_firmware", ++ (PyCFunction)pylibiscsi_discover_firmware, METH_NOARGS, ++ "Do firmware discovery and return a list of found nodes)"}, ++ { "get_firmware_initiator_name", ++ (PyCFunction)pylibiscsi_get_firmware_initiator_name, ++ METH_NOARGS, ++ "Get initator name (iqn) from firmware"}, ++ {NULL, NULL} ++}; ++ ++PyMODINIT_FUNC initlibiscsi(void) ++{ ++ PyObject *m; ++ ++ if (!context) /* We may be called more then once */ ++ context = libiscsi_init(); ++ if (!context) ++ return; ++ ++ if (PyType_Ready(&PyIscsiChapAuthInfo_Type) < 0) ++ return; ++ ++ if (PyType_Ready(&PyIscsiNode_Type) < 0) ++ return; ++ ++ m = Py_InitModule("libiscsi", pylibiscsi_functions); ++ Py_INCREF(&PyIscsiChapAuthInfo_Type); ++ PyModule_AddObject(m, "chapAuthInfo", (PyObject *) &PyIscsiChapAuthInfo_Type); ++ Py_INCREF(&PyIscsiNode_Type); ++ PyModule_AddObject(m, "node", (PyObject *) &PyIscsiNode_Type); ++} +diff --git a/libiscsi/setup.py b/libiscsi/setup.py +new file mode 100644 +index 0000000..bb4329b +--- /dev/null ++++ b/libiscsi/setup.py +@@ -0,0 +1,9 @@ ++from distutils.core import setup, Extension ++ ++module1 = Extension('libiscsimodule', ++ sources = ['pylibiscsi.c'], ++ libraries = ['iscsi'], ++ library_dirs = ['.']) ++ ++setup (name = 'PyIscsi',version = '1.0', ++ description = 'libiscsi python bindings', ext_modules = [module1]) +diff --git a/libiscsi/tests/test_discovery_firmware.c b/libiscsi/tests/test_discovery_firmware.c +new file mode 100644 +index 0000000..76e852a +--- /dev/null ++++ b/libiscsi/tests/test_discovery_firmware.c +@@ -0,0 +1,53 @@ ++/* ++ * iSCSI Administration library ++ * ++ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. ++ * Copyright (C) 2008-2009 Hans de Goede ++ * maintained by open-iscsi@googlegroups.com ++ * ++ * 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 2 of the License, 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. ++ * ++ * See the file COPYING included with this distribution for more details. ++ */ ++ ++#include ++#include ++#include ++#include "libiscsi.h" ++ ++int main(void) ++{ ++ struct libiscsi_node *found_nodes; ++ struct libiscsi_context *context; ++ int i, found, rc = 0; ++ ++ context = libiscsi_init(); ++ if (!context) { ++ fprintf(stderr, "Error initializing libiscsi\n"); ++ return 1; ++ } ++ ++ rc = libiscsi_discover_firmware(context, &found, &found_nodes); ++ if (rc) ++ fprintf(stderr, "Error discovering: %s\n", ++ libiscsi_get_error_string(context)); ++ ++ for (i = 0; i < found; i++) { ++ fprintf(stdout, "Found node: %s, tpgt: %d, portal: %s:%d\n", ++ found_nodes[i].name, found_nodes[i].tpgt, ++ found_nodes[i].address, found_nodes[i].port); ++ } ++ ++ libiscsi_cleanup(context); ++ free (found_nodes); ++ ++ return rc; ++} +diff --git a/libiscsi/tests/test_discovery_sendtargets.c b/libiscsi/tests/test_discovery_sendtargets.c +new file mode 100644 +index 0000000..1a3c12e +--- /dev/null ++++ b/libiscsi/tests/test_discovery_sendtargets.c +@@ -0,0 +1,60 @@ ++/* ++ * iSCSI Administration library ++ * ++ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. ++ * Copyright (C) 2008-2009 Hans de Goede ++ * maintained by open-iscsi@googlegroups.com ++ * ++ * 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 2 of the License, 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. ++ * ++ * See the file COPYING included with this distribution for more details. ++ */ ++ ++#include ++#include ++#include ++#include "libiscsi.h" ++ ++int main(void) ++{ ++ struct libiscsi_node *found_nodes; ++ struct libiscsi_context *context; ++ struct libiscsi_auth_info auth_info; ++ int i, found, rc = 0; ++ ++ context = libiscsi_init(); ++ if (!context) { ++ fprintf(stderr, "Error initializing libiscsi\n"); ++ return 1; ++ } ++ ++ memset(&auth_info, 0, sizeof(auth_info)); ++ auth_info.method = libiscsi_auth_chap; ++ strcpy(auth_info.chap.username, "joe"); ++ strcpy(auth_info.chap.password, "secret"); ++ ++ rc = libiscsi_discover_sendtargets(context, "127.0.0.1", 3260, ++ &auth_info, &found, &found_nodes); ++ if (rc) ++ fprintf(stderr, "Error discovering: %s\n", ++ libiscsi_get_error_string(context)); ++ ++ for (i = 0; i < found; i++) { ++ fprintf(stdout, "Found node: %s, tpgt: %d, portal: %s:%d\n", ++ found_nodes[i].name, found_nodes[i].tpgt, ++ found_nodes[i].address, found_nodes[i].port); ++ } ++ ++ libiscsi_cleanup(context); ++ free (found_nodes); ++ ++ return rc; ++} +diff --git a/libiscsi/tests/test_get_auth.c b/libiscsi/tests/test_get_auth.c +new file mode 100644 +index 0000000..5e234da +--- /dev/null ++++ b/libiscsi/tests/test_get_auth.c +@@ -0,0 +1,70 @@ ++/* ++ * iSCSI Administration library ++ * ++ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. ++ * Copyright (C) 2008-2009 Hans de Goede ++ * maintained by open-iscsi@googlegroups.com ++ * ++ * 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 2 of the License, 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. ++ * ++ * See the file COPYING included with this distribution for more details. ++ */ ++ ++#include ++#include ++#include ++#include "libiscsi.h" ++ ++int main(void) ++{ ++ struct libiscsi_node node; ++ struct libiscsi_context *context; ++ struct libiscsi_auth_info auth_info; ++ int rc = 0; ++ ++ snprintf(node.name, LIBISCSI_VALUE_MAXLEN, "%s", ++ "iqn.2009-01.com.example:testdisk"); ++ node.tpgt = 1; ++ snprintf(node.address, NI_MAXHOST, "%s", "127.0.0.1"); ++ node.port = 3260; ++ ++ context = libiscsi_init(); ++ if (!context) { ++ fprintf(stderr, "Error initializing libiscsi\n"); ++ return 1; ++ } ++ ++ rc = libiscsi_node_get_auth(context, &node, &auth_info); ++ if (rc) { ++ fprintf(stderr, "Error setting authinfo: %s\n", ++ libiscsi_get_error_string(context)); ++ goto leave; ++ } ++ ++ switch (auth_info.method) { ++ case libiscsi_auth_none: ++ printf("Method: \"None\"\n"); ++ break; ++ case libiscsi_auth_chap: ++ printf("Method: \"CHAP\"\n"); ++ printf("User: \"%s\"\n", auth_info.chap.username); ++ printf("Pass: \"%s\"\n", auth_info.chap.password); ++ printf("RevUser: \"%s\"\n", ++ auth_info.chap.reverse_username); ++ printf("RevPass: \"%s\"\n", ++ auth_info.chap.reverse_password); ++ break; ++ } ++leave: ++ libiscsi_cleanup(context); ++ ++ return rc; ++} +diff --git a/libiscsi/tests/test_get_initiator_name.c b/libiscsi/tests/test_get_initiator_name.c +new file mode 100644 +index 0000000..997c053 +--- /dev/null ++++ b/libiscsi/tests/test_get_initiator_name.c +@@ -0,0 +1,38 @@ ++/* ++ * iSCSI Administration library ++ * ++ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. ++ * Copyright (C) 2008-2009 Hans de Goede ++ * maintained by open-iscsi@googlegroups.com ++ * ++ * 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 2 of the License, 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. ++ * ++ * See the file COPYING included with this distribution for more details. ++ */ ++ ++#include ++#include ++#include ++#include "libiscsi.h" ++ ++int main(void) ++{ ++ char initiatorname[LIBISCSI_VALUE_MAXLEN]; ++ ++ if (libiscsi_get_firmware_initiator_name(initiatorname)) { ++ fprintf(stderr, "No iscsi boot firmware found\n"); ++ return 1; ++ } ++ ++ printf("iqn:\t%s\n", initiatorname); ++ ++ return 0; ++} +diff --git a/libiscsi/tests/test_get_network_config.c b/libiscsi/tests/test_get_network_config.c +new file mode 100644 +index 0000000..2dedd61 +--- /dev/null ++++ b/libiscsi/tests/test_get_network_config.c +@@ -0,0 +1,45 @@ ++/* ++ * iSCSI Administration library ++ * ++ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. ++ * Copyright (C) 2008-2009 Hans de Goede ++ * maintained by open-iscsi@googlegroups.com ++ * ++ * 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 2 of the License, 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. ++ * ++ * See the file COPYING included with this distribution for more details. ++ */ ++ ++#include ++#include ++#include ++#include "libiscsi.h" ++ ++int main(void) ++{ ++ struct libiscsi_network_config config; ++ ++ if (libiscsi_get_firmware_network_config(&config)) { ++ fprintf(stderr, "No iscsi boot firmware found\n"); ++ return 1; ++ } ++ ++ printf("dhcp:\t%d\n", config.dhcp); ++ printf("iface:\t%s\n", config.iface_name); ++ printf("mac:\t%s\n", config.mac_address); ++ printf("ipaddr:\t%s\n", config.ip_address); ++ printf("mask:\t%s\n", config.netmask); ++ printf("gate:\t%s\n", config.gateway); ++ printf("dns1:\t%s\n", config.primary_dns); ++ printf("dns2:\t%s\n", config.secondary_dns); ++ ++ return 0; ++} +diff --git a/libiscsi/tests/test_login.c b/libiscsi/tests/test_login.c +new file mode 100644 +index 0000000..3eb70d6 +--- /dev/null ++++ b/libiscsi/tests/test_login.c +@@ -0,0 +1,52 @@ ++/* ++ * iSCSI Administration library ++ * ++ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. ++ * Copyright (C) 2008-2009 Hans de Goede ++ * maintained by open-iscsi@googlegroups.com ++ * ++ * 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 2 of the License, 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. ++ * ++ * See the file COPYING included with this distribution for more details. ++ */ ++ ++#include ++#include ++#include ++#include "libiscsi.h" ++ ++int main(void) ++{ ++ struct libiscsi_node node; ++ struct libiscsi_context *context; ++ int rc = 0; ++ ++ snprintf(node.name, LIBISCSI_VALUE_MAXLEN, "%s", ++ "iqn.2009-01.com.example:testdisk"); ++ node.tpgt = 1; ++ snprintf(node.address, NI_MAXHOST, "%s", "127.0.0.1"); ++ node.port = 3260; ++ ++ context = libiscsi_init(); ++ if (!context) { ++ fprintf(stderr, "Error initializing libiscsi\n"); ++ return 1; ++ } ++ ++ rc = libiscsi_node_login(context, &node); ++ if (rc) ++ fprintf(stderr, "Error logging in: %s\n", ++ libiscsi_get_error_string(context)); ++ ++ libiscsi_cleanup(context); ++ ++ return rc; ++} +diff --git a/libiscsi/tests/test_logout.c b/libiscsi/tests/test_logout.c +new file mode 100644 +index 0000000..b734dca +--- /dev/null ++++ b/libiscsi/tests/test_logout.c +@@ -0,0 +1,51 @@ ++/* ++ * iSCSI Administration library ++ * ++ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. ++ * Copyright (C) 2008-2009 Hans de Goede ++ * maintained by open-iscsi@googlegroups.com ++ * ++ * 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 2 of the License, 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. ++ * ++ * See the file COPYING included with this distribution for more details. ++ */ ++ ++#include ++#include ++#include "libiscsi.h" ++ ++int main(void) ++{ ++ struct libiscsi_node node; ++ struct libiscsi_context *context; ++ int rc = 0; ++ ++ snprintf(node.name, LIBISCSI_VALUE_MAXLEN, "%s", ++ "iqn.2009-01.com.example:testdisk"); ++ node.tpgt = 1; ++ snprintf(node.address, NI_MAXHOST, "%s", "127.0.0.1"); ++ node.port = 3260; ++ ++ context = libiscsi_init(); ++ if (!context) { ++ fprintf(stderr, "Error initializing libiscsi\n"); ++ return 1; ++ } ++ ++ rc = libiscsi_node_logout(context, &node); ++ if (rc) ++ fprintf(stderr, "Error logging out: %s\n", ++ libiscsi_get_error_string(context)); ++ ++ libiscsi_cleanup(context); ++ ++ return rc; ++} +diff --git a/libiscsi/tests/test_params.c b/libiscsi/tests/test_params.c +new file mode 100644 +index 0000000..d3223be +--- /dev/null ++++ b/libiscsi/tests/test_params.c +@@ -0,0 +1,103 @@ ++/* ++ * iSCSI Administration library ++ * ++ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. ++ * Copyright (C) 2008-2009 Hans de Goede ++ * maintained by open-iscsi@googlegroups.com ++ * ++ * 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 2 of the License, 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. ++ * ++ * See the file COPYING included with this distribution for more details. ++ */ ++ ++#include ++#include ++#include ++#include ++#include "libiscsi.h" ++ ++int main(void) ++{ ++ struct libiscsi_node node; ++ struct libiscsi_context *context; ++ char orig_value[LIBISCSI_VALUE_MAXLEN], value[LIBISCSI_VALUE_MAXLEN]; ++ int rc = 0; ++ ++ snprintf(node.name, LIBISCSI_VALUE_MAXLEN, "%s", ++ "iqn.2009-01.com.example:testdisk"); ++ node.tpgt = 1; ++ snprintf(node.address, NI_MAXHOST, "%s", "127.0.0.1"); ++ node.port = 3260; ++ ++ context = libiscsi_init(); ++ if (!context) { ++ fprintf(stderr, "Error initializing libiscsi\n"); ++ return 1; ++ } ++ ++ rc = libiscsi_node_get_parameter(context, &node, "node.startup", ++ orig_value); ++ if (rc) { ++ fprintf(stderr, "Error getting original value: %s\n", ++ libiscsi_get_error_string(context)); ++ goto leave; ++ } ++ ++ rc = libiscsi_node_set_parameter(context, &node, "node.startup", ++ "automatic"); ++ if (rc) { ++ fprintf(stderr, "Error setting node startup param: %s\n", ++ libiscsi_get_error_string(context)); ++ goto leave; ++ } ++ ++ rc = libiscsi_node_get_parameter(context, &node, "node.startup", ++ value); ++ if (rc) { ++ fprintf(stderr, "Error getting node startup param: %s\n", ++ libiscsi_get_error_string(context)); ++ goto leave; ++ } ++ ++ if (strcmp(value, "automatic")) { ++ fprintf(stderr, "Error set and get values do not match!\n"); ++ rc = EIO; ++ goto leave; ++ } ++ ++ rc = libiscsi_node_set_parameter(context, &node, "node.startup", ++ orig_value); ++ if (rc) { ++ fprintf(stderr, "Error setting original value: %s\n", ++ libiscsi_get_error_string(context)); ++ goto leave; ++ } ++ ++ rc = libiscsi_node_get_parameter(context, &node, "node.startup", ++ value); ++ if (rc) { ++ fprintf(stderr, "Error re-getting original value: %s\n", ++ libiscsi_get_error_string(context)); ++ goto leave; ++ } ++ ++ if (strcmp(value, orig_value)) { ++ fprintf(stderr, ++ "Error set and get original values do not match!\n"); ++ rc = EIO; ++ goto leave; ++ } ++ ++leave: ++ libiscsi_cleanup(context); ++ ++ return rc; ++} +diff --git a/libiscsi/tests/test_set_auth.c b/libiscsi/tests/test_set_auth.c +new file mode 100644 +index 0000000..a21f888 +--- /dev/null ++++ b/libiscsi/tests/test_set_auth.c +@@ -0,0 +1,58 @@ ++/* ++ * iSCSI Administration library ++ * ++ * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. ++ * Copyright (C) 2008-2009 Hans de Goede ++ * maintained by open-iscsi@googlegroups.com ++ * ++ * 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 2 of the License, 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. ++ * ++ * See the file COPYING included with this distribution for more details. ++ */ ++ ++#include ++#include ++#include ++#include "libiscsi.h" ++ ++int main(void) ++{ ++ struct libiscsi_node node; ++ struct libiscsi_context *context; ++ struct libiscsi_auth_info auth_info; ++ int rc = 0; ++ ++ snprintf(node.name, LIBISCSI_VALUE_MAXLEN, "%s", ++ "iqn.2009-01.com.example:testdisk"); ++ node.tpgt = 1; ++ snprintf(node.address, NI_MAXHOST, "%s", "127.0.0.1"); ++ node.port = 3260; ++ ++ memset(&auth_info, 0, sizeof(auth_info)); ++ auth_info.method = libiscsi_auth_chap; ++ strcpy(auth_info.chap.username, "joe"); ++ strcpy(auth_info.chap.password, "secret"); ++ ++ context = libiscsi_init(); ++ if (!context) { ++ fprintf(stderr, "Error initializing libiscsi\n"); ++ return 1; ++ } ++ ++ rc = libiscsi_node_set_auth(context, &node, &auth_info); ++ if (rc) ++ fprintf(stderr, "Error setting authinfo: %s\n", ++ libiscsi_get_error_string(context)); ++ ++ libiscsi_cleanup(context); ++ ++ return rc; ++} +diff --git a/usr/Makefile b/usr/Makefile +index 3d8ee22..e731545 100644 +--- a/usr/Makefile ++++ b/usr/Makefile +@@ -31,7 +31,7 @@ endif + OPTFLAGS ?= -O2 -g + WARNFLAGS ?= -Wall -Wstrict-prototypes + CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -I../include -I. -I../utils/open-isns \ +- -D$(OSNAME) $(IPC_CFLAGS) ++ -D$(OSNAME) $(IPC_CFLAGS) -DISNS_ENABLE + PROGRAMS = iscsid iscsiadm iscsistart + + # libc compat files +diff --git a/usr/discovery.c b/usr/discovery.c +index afce6c0..0c93749 100644 +--- a/usr/discovery.c ++++ b/usr/discovery.c +@@ -36,6 +36,7 @@ + #include "types.h" + #include "iscsi_proto.h" + #include "initiator.h" ++#include "config.h" + #include "log.h" + #include "idbm.h" + #include "iscsi_settings.h" +@@ -50,9 +51,11 @@ + #include "iscsi_timer.h" + #include "iscsi_err.h" + /* libisns includes */ ++#ifdef ISNS_ENABLE + #include "isns.h" + #include "paths.h" + #include "message.h" ++#endif + + #ifdef SLP_ENABLE + #include "iscsi-slp-discovery.h" +@@ -98,6 +101,7 @@ static int request_initiator_name(void) + return 0; + } + ++#ifdef ISNS_ENABLE + void discovery_isns_free_servername(void) + { + if (isns_config.ic_server_name) +@@ -377,6 +381,7 @@ retry: + discovery_isns_free_servername(); + return rc; + } ++#endif + + int discovery_fw(void *data, struct iface_rec *iface, + struct list_head *rec_list) +diff --git a/usr/idbm.c b/usr/idbm.c +index 81bce9e..bda31e2 100644 +--- a/usr/idbm.c ++++ b/usr/idbm.c +@@ -1709,9 +1709,9 @@ int idbm_print_all_discovery(int info_level) + * fn should return -1 if it skipped the rec, a ISCSI_ERR error code if + * the operation failed or 0 if fn was run successfully. + */ +-static int idbm_for_each_iface(int *found, void *data, +- idbm_iface_op_fn *fn, +- char *targetname, int tpgt, char *ip, int port) ++int idbm_for_each_iface(int *found, void *data, ++ idbm_iface_op_fn *fn, ++ char *targetname, int tpgt, char *ip, int port) + { + DIR *iface_dirfd; + struct dirent *iface_dent; +diff --git a/usr/idbm.h b/usr/idbm.h +index b89ddff..3631262 100644 +--- a/usr/idbm.h ++++ b/usr/idbm.h +@@ -102,6 +102,9 @@ struct rec_op_data { + node_rec_t *match_rec; + idbm_iface_op_fn *fn; + }; ++extern int idbm_for_each_iface(int *found, void *data, ++ idbm_iface_op_fn *fn, ++ char *targetname, int tpgt, char *ip, int port); + extern int idbm_for_each_portal(int *found, void *data, + idbm_portal_op_fn *fn, char *targetname); + extern int idbm_for_each_node(int *found, void *data, +diff --git a/usr/iscsi_ipc.h b/usr/iscsi_ipc.h +index 9d26d54..d23754d 100644 +--- a/usr/iscsi_ipc.h ++++ b/usr/iscsi_ipc.h +@@ -165,4 +165,6 @@ struct iscsi_ipc { + char *host_stats); + }; + ++struct iscsi_ipc *ipc; ++ + #endif /* ISCSI_IPC_H */ +-- +1.8.3.1 + diff --git a/0155-dont-use-static.patch b/0155-dont-use-static.patch new file mode 100644 index 0000000..9e43b7b --- /dev/null +++ b/0155-dont-use-static.patch @@ -0,0 +1,25 @@ +From ff224a16d409c4b479b3ac1ff662093cb067e281 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Mon, 19 Nov 2012 17:04:29 -0800 +Subject: dont use static + +--- + usr/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/Makefile b/usr/Makefile +index 015f1b9..1669890 100644 +--- a/usr/Makefile ++++ b/usr/Makefile +@@ -61,7 +61,7 @@ iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o + + iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \ + iscsistart.o statics.o +- $(CC) $(CFLAGS) -static $^ -o $@ ++ $(CC) $(CFLAGS) $^ -o $@ + clean: + rm -f *.o $(PROGRAMS) .depend $(LIBSYS) + +-- +1.7.11.7 + diff --git a/0156-remove-the-offload-boot-supported-ifdef.patch b/0156-remove-the-offload-boot-supported-ifdef.patch new file mode 100644 index 0000000..a1ccdc7 --- /dev/null +++ b/0156-remove-the-offload-boot-supported-ifdef.patch @@ -0,0 +1,45 @@ +From aa58a042ec20575143c1a5c813c9552a286aeb0e Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Mon, 19 Nov 2012 17:09:24 -0800 +Subject: remove the offload boot supported ifdef + +--- + usr/iface.c | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/usr/iface.c b/usr/iface.c +index c86892e..f5441c0 100644 +--- a/usr/iface.c ++++ b/usr/iface.c +@@ -895,6 +895,7 @@ int iface_setup_from_boot_context(struct iface_rec *iface, + { + struct iscsi_transport *t = NULL; + uint32_t hostno; ++ int rc; + + if (strlen(context->initiatorname)) + strlcpy(iface->iname, context->initiatorname, +@@ -907,10 +908,7 @@ int iface_setup_from_boot_context(struct iface_rec *iface, + return 0; + } + } else if (strlen(context->iface)) { +-/* this ifdef is only temp until distros and firmwares are updated */ +-#ifdef OFFLOAD_BOOT_SUPPORTED + char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN]; +- int rc; + + memset(transport_name, 0, ISCSI_TRANSPORT_NAME_MAXLEN); + /* make sure offload driver is loaded */ +@@ -936,9 +934,6 @@ int iface_setup_from_boot_context(struct iface_rec *iface, + } + + strlcpy(iface->netdev, context->iface, sizeof(iface->netdev)); +-#else +- return 0; +-#endif + } else + return 0; + +-- +1.7.11.7 + diff --git a/0158-iscsiuio-IPC-newroot-command.patch b/0158-iscsiuio-IPC-newroot-command.patch new file mode 100644 index 0000000..fa3f4c7 --- /dev/null +++ b/0158-iscsiuio-IPC-newroot-command.patch @@ -0,0 +1,122 @@ +From 6e979154c9c51dedd54c91e46106e495a65ced43 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Wed, 2 Jan 2013 14:45:05 -0800 +Subject: [PATCH 58/58] iscsiuio IPC newroot command + +--- + usr/mgmt_ipc.c | 11 +++++++++++ + usr/transport.c | 1 + + usr/transport.h | 1 + + usr/uip_mgmt_ipc.c | 14 ++++++++++++++ + usr/uip_mgmt_ipc.h | 5 +++++ + 5 files changed, 32 insertions(+) + +diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c +index 5cb7143..a8f8473 100644 +--- a/usr/mgmt_ipc.c ++++ b/usr/mgmt_ipc.c +@@ -36,6 +36,7 @@ + #include "sysdeps.h" + #include "iscsi_ipc.h" + #include "iscsi_err.h" ++#include "iscsi_sysfs.h" + + #define PEERUSER_MAX 64 + #define EXTMSG_MAX (64 * 1024) +@@ -229,8 +230,18 @@ static int + mgmt_ipc_newroot(queue_task_t *qtask) + { + char *newroot = qtask->req.u.newroot.path; ++ struct iscsi_transport *t; ++ + if (chdir(newroot) || chroot(".") || chdir("/")) + return ISCSI_ERR; ++ ++ /* if a registered transport has a separate userspace process, ++ * notify it of the root change as well */ ++ list_for_each_entry(t, &transports, list) { ++ if (t->template->newroot) ++ t->template->newroot(t, newroot); ++ } ++ + mgmt_ipc_write_rsp(qtask, ISCSI_SUCCESS); + return ISCSI_SUCCESS; + } +diff --git a/usr/transport.c b/usr/transport.c +index 4d030a8..e0488ad 100644 +--- a/usr/transport.c ++++ b/usr/transport.c +@@ -83,6 +83,7 @@ struct iscsi_transport_template bnx2i = { + .ep_poll = ktransport_ep_poll, + .ep_disconnect = ktransport_ep_disconnect, + .set_net_config = uip_broadcast_params, ++ .newroot = uip_broadcast_newroot, + }; + + struct iscsi_transport_template be2iscsi = { +diff --git a/usr/transport.h b/usr/transport.h +index 388e4b1..d4d9ec7 100644 +--- a/usr/transport.h ++++ b/usr/transport.h +@@ -39,6 +39,7 @@ struct iscsi_transport_template { + int (*set_net_config) (struct iscsi_transport *t, + struct iface_rec *iface, + struct iscsi_session *session); ++ void (*newroot) (struct iscsi_transport *t, char *path); + }; + + /* represents data path provider */ +diff --git a/usr/uip_mgmt_ipc.c b/usr/uip_mgmt_ipc.c +index f3074ee..d5d496a 100644 +--- a/usr/uip_mgmt_ipc.c ++++ b/usr/uip_mgmt_ipc.c +@@ -39,3 +39,17 @@ int uip_broadcast_params(struct iscsi_transport *t, + sizeof(iscsid_uip_broadcast_header_t) + + sizeof(*iface)); + } ++ ++int uip_broadcast_newroot(struct iscsi_transport *t, char *newroot) ++{ ++ struct iscsid_uip_broadcast broadcast; ++ ++ memset(&broadcast, 0, sizeof(broadcast)); ++ ++ broadcast.header.command = ISCSID_UIP_NEWROOT; ++ strncpy(broadcast.u.newroot.path, newroot, PATH_MAX); ++ ++ return uip_broadcast(&broadcast, ++ sizeof(iscsid_uip_broadcast_header_t) + ++ PATH_MAX + 1); ++} +diff --git a/usr/uip_mgmt_ipc.h b/usr/uip_mgmt_ipc.h +index 29a4769..3ca4fb1 100644 +--- a/usr/uip_mgmt_ipc.h ++++ b/usr/uip_mgmt_ipc.h +@@ -29,6 +29,7 @@ + typedef enum iscsid_uip_cmd { + ISCSID_UIP_IPC_UNKNOWN = 0, + ISCSID_UIP_IPC_GET_IFACE = 1, ++ ISCSID_UIP_NEWROOT = 2, + + __ISCSID_UIP_IPC_MAX_COMMAND + } iscsid_uip_cmd_e; +@@ -47,6 +48,9 @@ typedef struct iscsid_uip_broadcast { + struct ipc_broadcast_iface_rec { + struct iface_rec rec; + } iface_rec; ++ struct ipc_broadcast_newroot { ++ char path[PATH_MAX + 1]; ++ } newroot; + } u; + } iscsid_uip_broadcast_t; + +@@ -69,5 +73,6 @@ extern int uip_broadcast_params(struct iscsi_transport *t, + struct iface_rec *iface, + struct iscsi_session *session); + ++extern int uip_broadcast_newroot(struct iscsi_transport *t, char *path); + + #endif /* UIP_MGMT_IPC_H */ +-- +1.8.1.4 + diff --git a/0159-iscsiuio-systemd-unit-files.patch b/0159-iscsiuio-systemd-unit-files.patch new file mode 100644 index 0000000..2d0e213 --- /dev/null +++ b/0159-iscsiuio-systemd-unit-files.patch @@ -0,0 +1,53 @@ +From 822b53e6c9ebb0fe7236ebd3b4c73b009100592d Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Tue, 22 Jan 2013 14:27:12 -0800 +Subject: iscsiuio systemd unit files + +--- + etc/systemd/iscsiuio.service | 17 +++++++++++++++++ + etc/systemd/iscsiuio.socket | 9 +++++++++ + 2 files changed, 26 insertions(+) + create mode 100644 etc/systemd/iscsiuio.service + create mode 100644 etc/systemd/iscsiuio.socket + +diff --git a/etc/systemd/iscsiuio.service b/etc/systemd/iscsiuio.service +new file mode 100644 +index 0000000..f0410b7 +--- /dev/null ++++ b/etc/systemd/iscsiuio.service +@@ -0,0 +1,17 @@ ++[Unit] ++Description=iSCSI UserSpace I/O driver ++Documentation=man:iscsiuio(8) ++DefaultDependencies=no ++Conflicts=shutdown.target ++Requires=iscsid.service ++BindTo=iscsid.service ++After=network.target ++Before=remote-fs-pre.target iscsid.service ++ ++[Service] ++Type=forking ++PIDFile=/var/run/iscsiuio.pid ++ExecStart=/usr/sbin/iscsiuio ++ ++[Install] ++WantedBy=multi-user.target +diff --git a/etc/systemd/iscsiuio.socket b/etc/systemd/iscsiuio.socket +new file mode 100644 +index 0000000..d42cedc +--- /dev/null ++++ b/etc/systemd/iscsiuio.socket +@@ -0,0 +1,9 @@ ++[Unit] ++Description=Open-iSCSI iscsiuio Socket ++Documentation=man:iscsiuio(8) ++ ++[Socket] ++ListenStream=@ISCSID_UIP_ABSTRACT_NAMESPACE ++ ++[Install] ++WantedBy=sockets.target +-- +1.7.11.7 + diff --git a/0160-use-systemctl-to-start-iscsid.patch b/0160-use-systemctl-to-start-iscsid.patch new file mode 100644 index 0000000..81aa2a3 --- /dev/null +++ b/0160-use-systemctl-to-start-iscsid.patch @@ -0,0 +1,25 @@ +From c3d2b8f3de5b6161845304cf46982d2c5a9918b6 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Thu Feb 21 21:05:39 PST 2013 +Subject: disable iscsid.startup from iscsiadm, prefer systemd socket activation + +--- + etc/iscsid.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/etc/iscsid.conf b/etc/iscsid.conf +index ac1d231..5851fa5 100644 +--- a/etc/iscsid.conf ++++ b/etc/iscsid.conf +@@ -17,7 +17,7 @@ + # maintainers. + # + # Default for Fedora and RHEL. (uncomment to activate). +-iscsid.startup = /etc/rc.d/init.d/iscsid force-start ++#iscsid.startup = /bin/systemctl start iscsid.service + # + # Default for upstream open-iscsi scripts (uncomment to activate). + # iscsid.startup = /sbin/iscsid +-- +1.7.11.7 + diff --git a/0161-resolve-565245-multilib-issues-caused-by-doxygen.patch b/0161-resolve-565245-multilib-issues-caused-by-doxygen.patch new file mode 100644 index 0000000..1f64d9c --- /dev/null +++ b/0161-resolve-565245-multilib-issues-caused-by-doxygen.patch @@ -0,0 +1,39 @@ +From bc4cf1487b4d6039de2a082c1786ac83ab148c88 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Tue, 22 Jan 2013 15:14:21 -0800 +Subject: resolve 565245: multilib issues caused by doxygen + +--- + libiscsi/libiscsi.doxy | 2 +- + libiscsi/no_date_footer.html | 6 ++++++ + 2 files changed, 7 insertions(+), 1 deletion(-) + create mode 100644 libiscsi/no_date_footer.html + +diff --git a/libiscsi/libiscsi.doxy b/libiscsi/libiscsi.doxy +index 663770f..7a5ff7f 100644 +--- a/libiscsi/libiscsi.doxy ++++ b/libiscsi/libiscsi.doxy +@@ -765,7 +765,7 @@ HTML_HEADER = + # each generated HTML page. If it is left blank doxygen will generate a + # standard footer. + +-HTML_FOOTER = ++HTML_FOOTER = no_date_footer.html + + # The HTML_STYLESHEET tag can be used to specify a user-defined cascading + # style sheet that is used by each HTML page. It can be used to +diff --git a/libiscsi/no_date_footer.html b/libiscsi/no_date_footer.html +new file mode 100644 +index 0000000..1e0c6c4 +--- /dev/null ++++ b/libiscsi/no_date_footer.html +@@ -0,0 +1,6 @@ ++
++Generated for $projectname by doxygen ++$doxygenversion
++ ++ +-- +1.7.11.7 + diff --git a/0162-Don-t-check-for-autostart-sessions-if-iscsi-is-not-u.patch b/0162-Don-t-check-for-autostart-sessions-if-iscsi-is-not-u.patch new file mode 100644 index 0000000..684463f --- /dev/null +++ b/0162-Don-t-check-for-autostart-sessions-if-iscsi-is-not-u.patch @@ -0,0 +1,30 @@ +From ab79bdb20e37216ca969e06d63a952acfd023963 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Tue, 28 May 2013 13:12:27 -0700 +Subject: [PATCH] Don't check for autostart sessions if iscsi is not used (bug + #951951) + +Change conditional startup in iscsi.service to check for a non-empty +nodes directory, instead of initiator-name. This fits better with what +it's doing, as there's no need to scan for autostart node records if +there are no node records at all. +--- + etc/systemd/iscsi.service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service +index bbd52fd..7b4efee 100644 +--- a/etc/systemd/iscsi.service ++++ b/etc/systemd/iscsi.service +@@ -5,7 +5,7 @@ DefaultDependencies=no + Conflicts=shutdown.target + After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service + Before=remote-fs-pre.target +-ConditionPathExists=/etc/iscsi/initiatorname.iscsi ++ConditionDirectoryNotEmpty=/var/lib/iscsi/nodes + + [Service] + Type=oneshot +-- +1.8.1.4 + diff --git a/0163-fix-order-of-setting-uid-gid-and-drop-supplementary-.patch b/0163-fix-order-of-setting-uid-gid-and-drop-supplementary-.patch new file mode 100644 index 0000000..cedb4e0 --- /dev/null +++ b/0163-fix-order-of-setting-uid-gid-and-drop-supplementary-.patch @@ -0,0 +1,68 @@ +From 3cac85a3f97d0a22270166f428209f873b58c319 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Tue, 11 Jun 2013 11:25:27 -0700 +Subject: [PATCH] iscsid: fix order of setting uid/gid and drop supplementary + groups + +If using the user and group ID settings together the existing order of +calling setuid first will almost always cause the setgid call to fail, +assuming the new effective user id does not have the CAP_SETGID +capability. The effective group ID needs to change first. + +While we're at it, if iscsid is started as root it should drop any +inherited supplementary group permissions. + +And if anyone is actually using this to try and isolate capabilities, +they probably care enough to want to known that it is failing. Make +iscsid startup fail instead of just calling perror. + +Signed-off-by: Chris Leech +--- + usr/iscsid.c | 23 +++++++++++++++++++---- + 1 file changed, 19 insertions(+), 4 deletions(-) + +diff --git a/usr/iscsid.c b/usr/iscsid.c +index b4bb65b..c0ea6fa 100644 +--- a/usr/iscsid.c ++++ b/usr/iscsid.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -477,11 +478,25 @@ int main(int argc, char *argv[]) + } + } + +- if (uid && setuid(uid) < 0) +- perror("setuid\n"); ++ if (gid && setgid(gid) < 0) { ++ log_error("Unable to setgid to %d\n", gid); ++ log_close(log_pid); ++ exit(ISCSI_ERR); ++ } + +- if (gid && setgid(gid) < 0) +- perror("setgid\n"); ++ if ((geteuid() == 0) && (getgroups(0, NULL))) { ++ if (setgroups(0, NULL) != 0) { ++ log_error("Unable to drop supplementary group ids\n"); ++ log_close(log_pid); ++ exit(ISCSI_ERR); ++ } ++ } ++ ++ if (uid && setuid(uid) < 0) { ++ log_error("Unable to setuid to %d\n", uid); ++ log_close(log_pid); ++ exit(ISCSI_ERR); ++ } + + memset(&daemon_config, 0, sizeof (daemon_config)); + daemon_config.pid_file = pid_file; +-- +1.8.1.4 + diff --git a/0164-libiscsi-fix-incorrect-strncpy-use.patch b/0164-libiscsi-fix-incorrect-strncpy-use.patch new file mode 100644 index 0000000..55d1166 --- /dev/null +++ b/0164-libiscsi-fix-incorrect-strncpy-use.patch @@ -0,0 +1,52 @@ +From fcad7de1a8c3d140d1d0eb120727966017d3727b Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Sat, 17 Aug 2013 15:50:45 -0700 +Subject: libiscsi: fix incorrect strncpy use + +Changes to internal structures make the src and dst buffers of some +copies (potentially) different sizes. Fix strncpy calls that were using +the size of the src argument as the limit. +--- + libiscsi/libiscsi.c | 19 ++++++++----------- + 1 file changed, 8 insertions(+), 11 deletions(-) + +diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c +index 6e6846a..064e4b5 100644 +--- a/libiscsi/libiscsi.c ++++ b/libiscsi/libiscsi.c +@@ -587,15 +587,13 @@ int libiscsi_get_firmware_network_config( + return ENODEV; + + config->dhcp = strlen(fw_entry.dhcp) ? 1 : 0; +- strncpy(config->iface_name, fw_entry.iface, sizeof fw_entry.iface); +- strncpy(config->mac_address, fw_entry.mac, sizeof fw_entry.mac); +- strncpy(config->ip_address, fw_entry.ipaddr, sizeof fw_entry.ipaddr); +- strncpy(config->netmask, fw_entry.mask, sizeof fw_entry.mask); +- strncpy(config->gateway, fw_entry.gateway, sizeof fw_entry.gateway); +- strncpy(config->primary_dns, fw_entry.primary_dns, +- sizeof fw_entry.primary_dns); +- strncpy(config->secondary_dns, fw_entry.secondary_dns, +- sizeof fw_entry.secondary_dns); ++ strlcpy(config->iface_name, fw_entry.iface, LIBISCSI_VALUE_MAXLEN); ++ strlcpy(config->mac_address, fw_entry.mac, LIBISCSI_VALUE_MAXLEN); ++ strlcpy(config->ip_address, fw_entry.ipaddr, LIBISCSI_VALUE_MAXLEN); ++ strlcpy(config->netmask, fw_entry.mask, LIBISCSI_VALUE_MAXLEN); ++ strlcpy(config->gateway, fw_entry.gateway, LIBISCSI_VALUE_MAXLEN); ++ strlcpy(config->primary_dns, fw_entry.primary_dns, LIBISCSI_VALUE_MAXLEN); ++ strlcpy(config->secondary_dns, fw_entry.secondary_dns, LIBISCSI_VALUE_MAXLEN); + return 0; + } + +@@ -613,8 +611,7 @@ int libiscsi_get_firmware_initiator_name(char *initiatorname) + if (fw_get_entry(&fw_entry)) + return ENODEV; + +- strncpy(initiatorname, fw_entry.initiatorname, +- sizeof fw_entry.initiatorname); ++ strlcpy(initiatorname, fw_entry.initiatorname, LIBISCSI_VALUE_MAXLEN); + + return 0; + } +-- +1.8.1.4 + diff --git a/0165-fix-hardened-build-of-iscsiuio.patch b/0165-fix-hardened-build-of-iscsiuio.patch new file mode 100644 index 0000000..ad94daa --- /dev/null +++ b/0165-fix-hardened-build-of-iscsiuio.patch @@ -0,0 +1,42 @@ +From 95cc21cf6283ef6faaa1be7c12c9ef58d7891d25 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Fri, 13 Sep 2013 16:56:51 -0700 +Subject: [PATCH] fix hardened build of iscsiuio + +The new iscsiuio code sets CFLAGS in configure.ac, wiping out the +environment setup by rpm. Patch that out. + +--- + iscsiuio/configure | 2 +- + iscsiuio/configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/iscsiuio/configure b/iscsiuio/configure +index 444c9c0..50cfd90 100755 +--- a/iscsiuio/configure ++++ b/iscsiuio/configure +@@ -22782,7 +22782,7 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + +-CFLAGS="-O2 -Wall" ++CFLAGS="${CFLAGS} -O2 -Wall" + ## check for --enable-debug first before checking CFLAGS before + ## so that we don't mix -O and -g + # Check whether --enable-debug was given. +diff --git a/iscsiuio/configure.ac b/iscsiuio/configure.ac +index 381b94d..e4af3b2 100644 +--- a/iscsiuio/configure.ac ++++ b/iscsiuio/configure.ac +@@ -52,7 +52,7 @@ AC_LIBTOOL_DLOPEN + # libtool stuff + AC_PROG_LIBTOOL + +-CFLAGS="-O2 -Wall" ++CFLAGS="${CFLAGS} -O2 -Wall" + ## check for --enable-debug first before checking CFLAGS before + ## so that we don't mix -O and -g + AC_ARG_ENABLE(debug, +-- +1.8.3.1 + diff --git a/0166-start-socket-listeners-on-iscsiadm-command.patch b/0166-start-socket-listeners-on-iscsiadm-command.patch new file mode 100644 index 0000000..cb363b7 --- /dev/null +++ b/0166-start-socket-listeners-on-iscsiadm-command.patch @@ -0,0 +1,28 @@ +From 89e9c2ff66d069b812fabcd4fefe453bbcea73e4 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Mon, 25 Nov 2013 22:28:12 -0800 +Subject: [PATCH] start socket listeners on iscsiadm command + +fix for trying to run iscsiadm commands right after installing the rpm +without manually starting the systemd units +--- + etc/iscsid.conf | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/etc/iscsid.conf b/etc/iscsid.conf +index 1fd3000..412f130 100644 +--- a/etc/iscsid.conf ++++ b/etc/iscsid.conf +@@ -17,7 +17,8 @@ + # maintainers. + # + # Default for Fedora and RHEL. (uncomment to activate). +-#iscsid.startup = /bin/systemctl start iscsid.service ++# Use socket activation, but try to make sure the socket units are listening ++iscsid.startup = /bin/systemctl start iscsid.socket iscsiuio.socket + # + # Default for upstream open-iscsi scripts (uncomment to activate). + # iscsid.startup = /sbin/iscsid +-- +1.8.3.1 + diff --git a/0167-Revert-iscsiadm-return-error-when-login-fails.patch b/0167-Revert-iscsiadm-return-error-when-login-fails.patch new file mode 100644 index 0000000..64c9af8 --- /dev/null +++ b/0167-Revert-iscsiadm-return-error-when-login-fails.patch @@ -0,0 +1,35 @@ +From 1c0f37a8ae48daa3ae1c37cdac7c0789299180eb Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Mon, 24 Feb 2014 09:33:33 -0800 +Subject: [PATCH] Revert "iscsiadm: return error when login fails" + +This reverts commit fc2a8e9a2911bc76f961fe3e4a159fab9b8b9691. + +Done to address RHBZ #1015563 + +--- + usr/session_mgmt.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/usr/session_mgmt.c b/usr/session_mgmt.c +index 87b8e00..3815b1d 100644 +--- a/usr/session_mgmt.c ++++ b/usr/session_mgmt.c +@@ -178,12 +178,12 @@ int iscsi_login_portal(void *data, struct list_head *list, struct node_rec *rec) + goto done; + } + if (session_count >= rec->session.nr_sessions) { +- log_warning("%s: %d session%s requested, but %d " ++ log_debug(1, "%s: %d session%s requested, but %d " + "already present.", + rec->iface.name, rec->session.nr_sessions, + rec->session.nr_sessions == 1 ? "" : "s", + session_count); +- rc = ISCSI_ERR_SESS_EXISTS; ++ rc = 0; + goto done; + } + +-- +1.8.3.1 + diff --git a/0168-update-handling-of-boot-sessions.patch b/0168-update-handling-of-boot-sessions.patch new file mode 100644 index 0000000..badbdb0 --- /dev/null +++ b/0168-update-handling-of-boot-sessions.patch @@ -0,0 +1,55 @@ +From 83f291bd475f3d11abaf1f7346732f75af585ed8 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Wed, 26 Feb 2014 16:33:48 -0800 +Subject: update handling of boot sessions + +force start iscsiuio if needed, socket activation does not seem to be +working for recovery +--- + etc/systemd/iscsi-mark-root-nodes | 29 +++++++++++++++++++++++------ + 1 file changed, 23 insertions(+), 6 deletions(-) + +diff --git a/etc/systemd/iscsi-mark-root-nodes b/etc/systemd/iscsi-mark-root-nodes +index 157be62..d106ac6 100644 +--- a/etc/systemd/iscsi-mark-root-nodes ++++ b/etc/systemd/iscsi-mark-root-nodes +@@ -1,13 +1,30 @@ + #!/bin/bash + + ISCSIADM=/sbin/iscsiadm ++start_iscsid=0 ++start_iscsiuio=0 + +-$ISCSIADM -m session >/dev/null 2>&1 || exit 0 ++while read t num p target flash; do ++ # strip tag number from portal, keep "ip:port" ++ portal=${p%,*} ++ transport=${t%:} + +-$ISCSIADM -m session | while read t num i target; do +- ip=${i%:*} +- $ISCSIADM -m node -p $ip -T $target -o update -n node.startup -v onboot +-done ++ $ISCSIADM -m node -p $portal -T $target -o update -n node.startup -v onboot + +-systemctl start iscsid.service ++ start_iscsid=1 ++ ++ if [ "$transport" = bnx2i ]; then ++ start_iscsiuio=1 ++ fi ++done < <( $ISCSIADM -m session ) ++ ++# force iscsid and iscsiuio to start if needed for ++# recovering sessions created in the initrd ++ ++if [ "$start_iscsid" -eq 1 ]; then ++ systemctl --no-block start iscsid.service ++fi ++if [ "$start_iscsiuio" -eq 1 ]; then ++ systemctl --no-block start iscsiuio.service ++fi + +-- +1.8.3.1 + diff --git a/0169-update-iscsi.service-for-boot-session-recovery.patch b/0169-update-iscsi.service-for-boot-session-recovery.patch new file mode 100644 index 0000000..f7a2f79 --- /dev/null +++ b/0169-update-iscsi.service-for-boot-session-recovery.patch @@ -0,0 +1,34 @@ +From 969e26197c792ec5377d2c261a934a9c907e82f0 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Fri, 14 Mar 2014 09:22:21 -0700 +Subject: [PATCH] update iscsi.service for boot session recovery + +--- + etc/systemd/iscsi.service | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service +index d5712bd..3de76c5 100644 +--- a/etc/systemd/iscsi.service ++++ b/etc/systemd/iscsi.service +@@ -5,14 +5,15 @@ DefaultDependencies=no + Conflicts=shutdown.target + After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service + Before=remote-fs-pre.target +-ConditionDirectoryNotEmpty=/var/lib/iscsi/nodes ++ConditionDirectoryNotEmpty=|/var/lib/iscsi/nodes ++ConditionDirectoryNotEmpty=|/sys/class/iscsi_session + + [Service] + Type=oneshot + RemainAfterExit=true + ExecStart=/usr/libexec/iscsi-mark-root-nodes ++SuccessExitStatus=21 + ExecStart=/sbin/iscsiadm -m node --loginall=automatic +-ExecStop=/bin/sync + ExecStop=/sbin/iscsiadm -m node --logoutall=automatic + ExecReload=/sbin/iscsiadm -m node --loginall=automatic + +-- +1.8.3.1 + diff --git a/0199-use-Red-Hat-version-string-to-match-RPM-package-vers.patch b/0199-use-Red-Hat-version-string-to-match-RPM-package-vers.patch new file mode 100644 index 0000000..1af14f0 --- /dev/null +++ b/0199-use-Red-Hat-version-string-to-match-RPM-package-vers.patch @@ -0,0 +1,25 @@ +From 1483a176fdbb22bbfecf06eea57d1aa200f30561 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Mon, 21 Jan 2013 15:43:36 -0800 +Subject: use Red Hat version string to match RPM package version + +--- + usr/version.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/version.h b/usr/version.h +index a090522..aef0c3d 100644 +--- a/usr/version.h ++++ b/usr/version.h +@@ -6,7 +6,7 @@ + * This may not be the same value as the kernel versions because + * some other maintainer could merge a patch without going through us + */ +-#define ISCSI_VERSION_STR "2.0-873" ++#define ISCSI_VERSION_STR "6.2.0.873-21" + #define ISCSI_VERSION_FILE "/sys/module/scsi_transport_iscsi/version" + + #endif +-- +1.7.11.7 + diff --git a/04-iscsi b/04-iscsi index f142e34..864ade7 100755 --- a/04-iscsi +++ b/04-iscsi @@ -2,6 +2,6 @@ case "$2" in up|vpn-up) - /bin/systemctl reload iscsi.service || : + /bin/systemctl --no-block reload iscsi.service || : ;; esac diff --git a/iscsi-initiator-utils.spec b/iscsi-initiator-utils.spec index ef0c707..eb27ab7 100644 --- a/iscsi-initiator-utils.spec +++ b/iscsi-initiator-utils.spec @@ -4,7 +4,7 @@ Summary: iSCSI daemon and utility programs Name: iscsi-initiator-utils Version: 6.%{open_iscsi_version}.%{open_iscsi_build} -Release: 17%{?dist} +Release: 21%{?dist} Group: System Environment/Daemons License: GPLv2+ URL: http://www.open-iscsi.org @@ -41,36 +41,80 @@ Patch24: 0024-Fix-discovery-error-return-without-return-value.patch Patch25: 0025-iscsid-Fix-strlen-parameter.patch Patch26: 0026-iscsiuio-Change-socket-bind-to-use-the-same-struct-s.patch Patch27: 0027-Make-rescan-run-in-parallel.patch +Patch28: 0028-iscsiadm-Correctly-check-for-invalid-hostno-and-flas.patch +Patch29: 0029-iscsi-tools-Print-additional-session-info-for-flashn.patch +Patch30: 0030-iscsi-tools-sync-iscsi_if.h-with-kernel-space.patch +Patch31: 0031-PATCH-v5-1-3-ISCSISTART-Saved-ibft-boot-info-to-the-.patch +Patch32: 0032-ISCSID-Added-the-extraction-of-the-session-boot-info.patch +Patch33: 0033-ISCSID-Added-iface-content-override-fix.patch +Patch34: 0034-iscsi-tools-Bug-fix-on-IPC-address-copy-version-2.patch +Patch35: 0035-flashnode-Add-support-to-set-ISCSI_FLASHNODE_CHAP_OU.patch +Patch36: 0036-iscsiadm-Use-x-option-instead-of-v-to-specify-chap_t.patch +Patch37: 0037-iscsiadm-Man-page-changes-to-use-x-option-for-chap_t.patch +Patch38: 0038-README-changes-to-use-long-option-index-instead-of-f.patch +Patch39: 0039-iscsiadm-Add-support-to-set-CHAP-entry-using-host-ch.patch +Patch40: 0040-iscsi-tools-Correctly-get-username_in-and-password_i.patch +Patch41: 0041-README-changes-for-adding-support-to-set-CHAP-entry.patch +Patch42: 0042-iscsi-tools-Setup-iface-conf-file-with-all-iface-att.patch +Patch43: 0043-iscsi_if.h-Remove-numbers-used-for-network-parameter.patch +Patch44: 0044-iscsi_if.h-Additional-parameters-for-network-param-s.patch +Patch45: 0045-iscsi-tools-Use-macro-to-set-IPv4-IPv6-IP-addresses.patch +Patch46: 0046-iscsi-tools-Use-single-function-to-enable-disable-ne.patch +Patch47: 0047-iscsi-tools-Use-single-function-to-set-integer-netwo.patch +Patch48: 0048-iscsi-tools-Ignore-network-parameter-if-not-enabled-.patch +Patch49: 0049-iscsi-tools-Additional-parameters-for-network-settin.patch +Patch50: 0050-iscsi-tools-iface-params-should-be-updated-for-node_.patch +Patch51: 0051-iscsi-tools-Let-default-type-of-iface-be-ipv4.patch +Patch52: 0052-iscsi-tools-Show-iface-params-based-on-iface-type.patch +Patch53: 0053-iscsiadm-Added-document-for-description-of-iface-att.patch +Patch54: 0054-iscsi_tool-Add-offload-host-statistics-support.patch +Patch55: 0055-README-Updated-for-host-statistics.patch +Patch56: 0056-iscsiadm.8-Updated-man-page-for-host-statistics.patch +Patch57: 0057-iscsi-tools-Fix-the-iscsiadm-help-options-for-host-m.patch +Patch58: 0058-Man-page-correction-for-host-mode-options-of-iscsiad.patch +Patch59: 0059-ISCSIUIO-Added-tx-doorbell-override-mechanism.patch +Patch60: 0060-ISCSIUIO-Added-fix-for-the-iface.subnet_mask-decodin.patch +Patch61: 0061-ISCSIUIO-Added-fix-for-the-ARP-cache-flush-mechanism.patch +Patch62: 0062-ISCSIUIO-Updated-RELEASE-note-and-version.patch +Patch63: 0063-ISCSIUIO-Updated-the-configure-file-to-reflect-the-n.patch +Patch64: 0064-ISCSIUIO-Removed-the-auto-generated-COPYING-file.patch +Patch68: 0068-iscsiuio-fix-compilation.patch +Patch69: 0069-Add-missing-DESTDIR.patch +Patch70: 0070-iscsi-tools-set-non-negotiated-params-early.patch + # not (yet) upstream merged -Patch40: 0040-ISCSISTART-Saved-ibft-boot-info-to-the-session-sysfs.patch -Patch41: 0041-ISCSID-Added-the-extraction-of-the-session-boot-info.patch -Patch42: 0042-ISCSID-Added-iface-content-override-fix.patch -Patch43: 0043-idmb_rec_write-check-for-tpgt-first.patch -Patch45: 0045-idbm_rec_write-seperate-old-and-new-style-writes.patch -Patch46: 0046-idbw_rec_write-pick-tpgt-from-existing-record.patch -Patch47: 0047-iscsiuio-systemd-socket-activation-support.patch -Patch49: 0049-update-systemd-service-files-add-iscsi.service-for-s.patch -Patch50: 0050-iscsi-boot-related-service-file-updates.patch +Patch131: 0131-iscsiadm-Fix-the-hostno-check-for-stats-submode-of-h.patch +Patch132: 0132-iscsiadm-Fix-the-compile-time-warning.patch +Patch143: 0143-idmb_rec_write-check-for-tpgt-first.patch +Patch145: 0145-idbm_rec_write-seperate-old-and-new-style-writes.patch +Patch146: 0146-idbw_rec_write-pick-tpgt-from-existing-record.patch +Patch147: 0147-iscsiuio-systemd-socket-activation-support.patch +Patch149: 0149-update-systemd-service-files-add-iscsi.service-for-s.patch +Patch150: 0150-iscsi-boot-related-service-file-updates.patch # distro specific modifications -Patch51: 0051-update-initscripts-and-docs.patch -Patch52: 0052-use-var-for-config.patch -Patch53: 0053-use-red-hat-for-name.patch -Patch54: 0054-add-libiscsi.patch -Patch55: 0055-dont-use-static.patch -Patch56: 0056-remove-the-offload-boot-supported-ifdef.patch -Patch59: 0059-iscsiuio-systemd-unit-files.patch -Patch60: 0060-use-systemctl-to-start-iscsid.patch -Patch61: 0061-resolve-565245-multilib-issues-caused-by-doxygen.patch -Patch62: 0062-Don-t-check-for-autostart-sessions-if-iscsi-is-not-u.patch -Patch63: 0063-fix-order-of-setting-uid-gid-and-drop-supplementary-.patch -Patch64: 0064-libiscsi-fix-incorrect-strncpy-use.patch -Patch65: 0065-fix-hardened-build-of-iscsiuio.patch -Patch66: 0066-start-socket-listeners-on-iscsiadm-command.patch +Patch151: 0151-update-initscripts-and-docs.patch +Patch152: 0152-use-var-for-config.patch +Patch153: 0153-use-red-hat-for-name.patch +Patch154: 0154-add-libiscsi.patch +Patch155: 0155-dont-use-static.patch +Patch156: 0156-remove-the-offload-boot-supported-ifdef.patch +Patch159: 0159-iscsiuio-systemd-unit-files.patch +Patch160: 0160-use-systemctl-to-start-iscsid.patch +Patch161: 0161-resolve-565245-multilib-issues-caused-by-doxygen.patch +Patch162: 0162-Don-t-check-for-autostart-sessions-if-iscsi-is-not-u.patch +Patch163: 0163-fix-order-of-setting-uid-gid-and-drop-supplementary-.patch +Patch164: 0164-libiscsi-fix-incorrect-strncpy-use.patch +Patch165: 0165-fix-hardened-build-of-iscsiuio.patch +Patch166: 0166-start-socket-listeners-on-iscsiadm-command.patch +Patch167: 0167-Revert-iscsiadm-return-error-when-login-fails.patch +Patch168: 0168-update-handling-of-boot-sessions.patch +Patch169: 0169-update-iscsi.service-for-boot-session-recovery.patch # version string, needs to be updated with each build -Patch99: 0099-use-Red-Hat-version-string-to-match-RPM-package-vers.patch +Patch199: 0199-use-Red-Hat-version-string-to-match-RPM-package-vers.patch BuildRequires: flex bison python-devel doxygen kmod-devel systemd-devel # For dir ownership +Requires: %{name}-iscsiuio >= %{version}-%{release} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd @@ -84,6 +128,16 @@ as well as the utility programs used to manage it. iSCSI is a protocol for distributed disk access using SCSI commands sent over Internet Protocol networks. +%package iscsiuio +Summary: Userspace configuration daemon required for some iSCSI hardware +Group: System Environment/Daemons +License: BSD +Requires: %{name} = %{version}-%{release} + +%description iscsiuio +The iscsiuio configuration daemon provides network configuration help +for some iSCSI offload hardware. + %package devel Summary: Development files for %{name} Group: Development/Libraries @@ -123,33 +177,75 @@ developing applications that use %{name}. %patch25 -p1 %patch26 -p1 %patch27 -p1 -# pending upstream merge +%patch28 -p1 +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 +%patch36 -p1 +%patch37 -p1 +%patch38 -p1 +%patch39 -p1 %patch40 -p1 %patch41 -p1 %patch42 -p1 %patch43 -p1 +%patch44 -p1 %patch45 -p1 %patch46 -p1 %patch47 -p1 +%patch48 -p1 %patch49 -p1 %patch50 -p1 -# distro specific modifications %patch51 -p1 %patch52 -p1 %patch53 -p1 %patch54 -p1 %patch55 -p1 %patch56 -p1 +%patch57 -p1 +%patch58 -p1 %patch59 -p1 %patch60 -p1 %patch61 -p1 %patch62 -p1 %patch63 -p1 %patch64 -p1 -%patch65 -p1 -%patch66 -p1 +%patch68 -p1 +%patch69 -p1 +%patch70 -p1 +# pending upstream merge +%patch131 -p1 +%patch132 -p1 +%patch143 -p1 +%patch145 -p1 +%patch146 -p1 +%patch147 -p1 +%patch149 -p1 +%patch150 -p1 +# distro specific modifications +%patch151 -p1 +%patch152 -p1 +%patch153 -p1 +%patch154 -p1 +%patch155 -p1 +%patch156 -p1 +%patch159 -p1 +%patch160 -p1 +%patch161 -p1 +%patch162 -p1 +%patch163 -p1 +%patch164 -p1 +%patch165 -p1 +%patch166 -p1 +%patch167 -p1 +%patch168 -p1 +%patch169 -p1 # version string -%patch99 -p1 +%patch199 -p1 # change exec_prefix, there's no easy way to override %{__sed} -i -e 's|^exec_prefix = /$|exec_prefix = %{_exec_prefix}|' Makefile @@ -278,18 +374,28 @@ fi %{_unitdir}/iscsi.service %{_unitdir}/iscsid.service %{_unitdir}/iscsid.socket -%{_unitdir}/iscsiuio.service -%{_unitdir}/iscsiuio.socket %{_libexecdir}/iscsi-mark-root-nodes %{_sysconfdir}/NetworkManager/dispatcher.d/04-iscsi %{_tmpfilesdir}/iscsi.conf %dir %{_sysconfdir}/iscsi %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/iscsi/iscsid.conf -%{_sbindir}/* +%{_sbindir}/iscsi-iname +%{_sbindir}/iscsiadm +%{_sbindir}/iscsid +%{_sbindir}/iscsistart %{_libdir}/libiscsi.so.0 %{python_sitearch}/libiscsimodule.so -%{_mandir}/man8/* +%{_mandir}/man8/iscsi-iname.8.gz +%{_mandir}/man8/iscsiadm.8.gz +%{_mandir}/man8/iscsid.8.gz +%{_mandir}/man8/iscsistart.8.gz + +%files iscsiuio +%{_sbindir}/iscsiuio +%{_unitdir}/iscsiuio.service +%{_unitdir}/iscsiuio.socket %config(noreplace) %{_sysconfdir}/logrotate.d/iscsiuiolog +%{_mandir}/man8/iscsiuio.8.gz %files devel %doc libiscsi/html @@ -297,6 +403,13 @@ fi %{_includedir}/libiscsi.h %changelog +* Mon Apr 14 2014 Chris Leech - 6.2.0.873-21 +- boot session handling improvements +- split out iscsiuio into a seperate sub-package +- sync with new upstream additions +- revert change to return code when calling login_portal for sessions + that already exist, as it impacts users scripting around iscsiadm + * Tue Dec 10 2013 Chris Leech - 6.2.0.873-17 - fix regression in glob use, inappropriate error code escape - clean up dead node links from discovery when reusing tpgt