fcoe-utils-1.0.9/0000755000175000017500000000000011336572515012557 5ustar chuckchuckfcoe-utils-1.0.9/compile0000755000175000017500000000727111336572515014144 0ustar chuckchuck#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2009-10-06.20; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software # Foundation, Inc. # Written by Tom Tromey . # # 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, 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; esac ofile= cfile= eat= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use `[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: fcoe-utils-1.0.9/README0000644000175000017500000000125411312505503013424 0ustar chuckchuck FCoE Management Tools Installation Guide ======================================== The FCoE Management Tools included in this package are fcoeadm - program to create, reset, destroy, and display FCoE interfaces fcoemon - program to monitor the events from the DCB daemon Requirements: The HBAAPI library and the HBAAPI vendor library source must be build and installed before you can build the management tools. The HBAAPI vendor library, libhbalinux, may be downloaded from www.Open-FCoE.org. The instructions in the package describes how to download and build the libraries. See the man pages for other requirements. fcoe-utils-1.0.9/fipvlan.c0000644000175000017500000003524611312505503014357 0ustar chuckchuck/* * Copyright(c) 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Maintained at www.Open-FCoE.org */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "fcoe_utils.h" #include "fip.h" #include "log.h" #include "list.h" #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) /* global configuration */ char *exe; struct iff { int ifindex; char *ifname; unsigned char mac_addr[ETHER_ADDR_LEN]; struct list_head list; }; LIST_HEAD(interfaces); struct fcf { struct iff *interface; uint16_t vlan; unsigned char mac_addr[ETHER_ADDR_LEN]; struct list_head list; }; LIST_HEAD(fcfs); /** * packet_socket - create a packet socket bound to the FIP ethertype */ int packet_socket(void) { int s; log_debug(1, "creating ETH_P_FIP packet socket"); s = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_FIP)); if (s < 0) log_errno("packet socket error"); return s; } /** * fip_send_vlan_request - send a FIP VLAN request * @s: ETH_P_FIP packet socket * @iff: network interface to send from * * Note: sends to FIP_ALL_FCF_MACS */ ssize_t fip_send_vlan_request(int s, struct iff *iff) { struct sockaddr_ll sa = { .sll_family = AF_PACKET, .sll_protocol = htons(ETH_P_FIP), .sll_ifindex = iff->ifindex, .sll_hatype = ARPHRD_ETHER, .sll_pkttype = PACKET_MULTICAST, .sll_halen = ETHER_ADDR_LEN, .sll_addr = FIP_ALL_FCF_MACS, }; struct fiphdr fh = { .fip_version = FIP_VERSION(1), .fip_proto = htons(FIP_PROTO_VLAN), .fip_subcode = FIP_VLAN_REQ, .fip_desc_len = htons(2), .fip_flags = 0, }; struct { struct fip_tlv_mac_addr mac; } tlvs = { .mac = { .hdr.tlv_type = FIP_TLV_MAC_ADDR, .hdr.tlv_len = 2, }, }; struct iovec iov[] = { { .iov_base = &fh, .iov_len = sizeof(fh), }, { .iov_base = &tlvs, .iov_len = sizeof(tlvs), }, }; struct msghdr msg = { .msg_name = &sa, .msg_namelen = sizeof(sa), .msg_iov = iov, .msg_iovlen = ARRAY_SIZE(iov), }; int rc; memcpy(tlvs.mac.mac_addr, iff->mac_addr, ETHER_ADDR_LEN); log_debug(1, "sending FIP VLAN request"); rc = sendmsg(s, &msg, 0); if (rc < 0) log_errno("sendmsg error"); return rc; } struct fip_tlv_ptrs { struct fip_tlv_mac_addr *mac; struct fip_tlv_vlan *vlan[370]; unsigned int vlanc; }; #define SET_BIT(b, n) ((b) |= (1 << (n))) #define TLV_LEN_CHECK(t, l) ({ \ int _tlc = ((t)->tlv_len != (l)) ? 1 : 0; \ if (_tlc) \ log_warn("bad length for TLV of type %d", (t)->tlv_type); \ _tlc; \ }) /** * fip_parse_tlvs - parse type/length/value encoded FIP descriptors * @ptr: pointer to beginning of FIP TLV payload, the first descriptor * @len: total length of all TLVs, in double words * @tlv_ptrs: pointers to type specific structures to fill out */ unsigned int fip_parse_tlvs(void *ptr, int len, struct fip_tlv_ptrs *tlv_ptrs) { struct fip_tlv_hdr *tlv = ptr; unsigned int bitmap = 0; tlv_ptrs->vlanc = 0; while (len > 0) { switch (tlv->tlv_type) { case FIP_TLV_MAC_ADDR: if (TLV_LEN_CHECK(tlv, 2)) break; SET_BIT(bitmap, FIP_TLV_MAC_ADDR); tlv_ptrs->mac = (struct fip_tlv_mac_addr *) tlv; break; case FIP_TLV_VLAN: if (TLV_LEN_CHECK(tlv, 1)) break; SET_BIT(bitmap, FIP_TLV_VLAN); tlv_ptrs->vlan[tlv_ptrs->vlanc++] = (void *) tlv; break; default: /* unexpected or unrecognized descriptor */ log_warn("unrecognized TLV type %d", tlv->tlv_type); break; } len -= tlv->tlv_len; tlv = ((void *) tlv) + (tlv->tlv_len << 2); }; return bitmap; } /** * fip_recv_vlan_note - parse a FIP VLAN Notification * @fh: FIP header, the beginning of the received FIP frame * @len: total length of the received FIP frame * @iff: interface this notification was received on */ int fip_recv_vlan_note(struct fiphdr *fh, ssize_t len, struct iff *iff) { struct fip_tlv_ptrs tlvs; struct fcf *fcf; unsigned int bitmap, required_tlvs; int desc_len; int i; log_debug(1, "received FIP VLAN Notification"); desc_len = ntohs(fh->fip_desc_len); if (len < (sizeof(*fh) + (desc_len << 2))) return -1; required_tlvs = (1 << FIP_TLV_MAC_ADDR) | (1 << FIP_TLV_VLAN); bitmap = fip_parse_tlvs((fh + 1), desc_len, &tlvs); if ((bitmap & required_tlvs) != required_tlvs) return -1; for (i = 0; i < tlvs.vlanc; i++) { fcf = malloc(sizeof(*fcf)); if (!fcf) { log_errno("malloc failed"); break; } memset(fcf, 0, sizeof(*fcf)); fcf->interface = iff; fcf->vlan = ntohs(tlvs.vlan[i]->vlan); memcpy(fcf->mac_addr, tlvs.mac->mac_addr, ETHER_ADDR_LEN); list_add_tail(&fcf->list, &fcfs); } return 0; } /** * fip_recv - receive from a FIP packet socket * @s: packet socket with data ready to be received */ int fip_recv(int s) { char buf[4096]; struct sockaddr_ll sa; struct iovec iov[] = { { .iov_base = &buf[0], .iov_len = sizeof(buf), }, }; struct msghdr msg = { .msg_name = &sa, .msg_namelen = sizeof(sa), .msg_iov = iov, .msg_iovlen = ARRAY_SIZE(iov), }; struct fiphdr *fh; struct iff *iff; ssize_t len; log_debug(1, "%s", __func__); len = recvmsg(s, &msg, 0); if (len < 0) { log_errno("packet socket recv error"); return len; } if (len < sizeof(*fh)) { log_err("received packed smaller that FIP header length"); return -1; } fh = (struct fiphdr *) buf; /* We only care about VLAN Notifications */ if (ntohs(fh->fip_proto) != FIP_PROTO_VLAN) { log_debug(1, "ignoring FIP packet, protocol %d", ntohs(fh->fip_proto)); return -1; } list_for_each_entry(iff, &interfaces, list) { if (iff->ifindex == sa.sll_ifindex) break; } if (&iff->list == &interfaces) { log_warn("received packet on unexpected interface"); return -1; } switch (fh->fip_subcode) { case FIP_VLAN_NOTE: fip_recv_vlan_note(fh, len, iff); break; default: log_warn("FIP packet with unknown subcode %d", fh->fip_subcode); return -1; } return 0; } /** * rtnl_socket - create and bind a routing netlink socket */ int rtnl_socket(void) { struct sockaddr_nl sa = { .nl_family = AF_NETLINK, .nl_pid = getpid(), .nl_groups = RTMGRP_LINK, }; int s; int rc; log_debug(1, "creating netlink socket"); s = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (s < 0) { log_errno("netlink socket error"); return s; } rc = bind(s, (struct sockaddr *) &sa, sizeof(sa)); if (rc < 0) { log_errno("netlink bind error"); close(s); return rc; } return s; } /** * send_getlink_dump - send an RTM_GETLINK dump request to list all interfaces * @s: routing netlink socket to use */ ssize_t send_getlink_dump(int s) { struct sockaddr_nl sa = { .nl_family = AF_NETLINK, .nl_pid = 0, }; struct { struct nlmsghdr nh; struct ifinfomsg ifm; } req = { .nh = { .nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)), .nlmsg_type = RTM_GETLINK, .nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP, .nlmsg_pid = 0, }, .ifm = { .ifi_family = AF_UNSPEC, .ifi_type = ARPHRD_ETHER, }, }; struct iovec iov[] = { { .iov_base = &req, .iov_len = sizeof(req), }, }; struct msghdr msg = { .msg_name = &sa, .msg_namelen = sizeof(sa), .msg_iov = iov, .msg_iovlen = ARRAY_SIZE(iov), }; int rc; log_debug(1, "sending RTM_GETLINK dump request"); rc = sendmsg(s, &msg, 0); if (rc < 0) log_errno("netlink sendmsg error"); return rc; } /** * rtnl_recv_newlink - parse response to RTM_GETLINK, or an RTM_NEWLINK event * @nh: netlink message header, beginning of received netlink frame */ void rtnl_recv_newlink(struct nlmsghdr *nh) { struct ifinfomsg *ifm; struct rtattr *rta; struct iff *iff; unsigned int len; log_debug(1, "RTM_NEWLINK"); ifm = NLMSG_DATA(nh); log_debug(1, "ifindex %d, type %d", ifm->ifi_index, ifm->ifi_type); /* We only deal with Ethernet interfaces */ if (ifm->ifi_type != ARPHRD_ETHER) return; /* if there's no link, we're not going to wait for it */ if ((ifm->ifi_flags & IFF_RUNNING) != IFF_RUNNING) return; iff = malloc(sizeof(*iff)); if (!iff) { log_errno("malloc failed"); return; } memset(iff, 0, sizeof(*iff)); iff->ifindex = ifm->ifi_index; len = IFLA_PAYLOAD(nh); for (rta = IFLA_RTA(ifm); RTA_OK(rta, len); rta = RTA_NEXT(rta, len)) { switch (rta->rta_type) { case IFLA_ADDRESS: memcpy(iff->mac_addr, RTA_DATA(rta), ETHER_ADDR_LEN); log_debug(1, "\tIFLA_ADDRESS\t%x:%x:%x:%x:%x:%x", iff->mac_addr[0], iff->mac_addr[1], iff->mac_addr[2], iff->mac_addr[3], iff->mac_addr[4], iff->mac_addr[5]); break; case IFLA_IFNAME: iff->ifname = strdup(RTA_DATA(rta)); log_debug(1, "\tIFLA_IFNAME\t%s", iff->ifname); break; default: /* other attributes don't matter */ break; } } list_add_tail(&iff->list, &interfaces); } #define NLMSG(c) ((struct nlmsghdr *) (c)) /** * rtnl_recv - receive from a routing netlink socket * @s: routing netlink socket with data ready to be received * * Returns: 0 when NLMSG_DONE is received * <0 on error * >0 when more data is expected */ int rtnl_recv(int s) { char buf[8192]; struct sockaddr_nl sa; struct iovec iov[] = { [0] = { .iov_base = buf, .iov_len = sizeof(buf), }, }; struct msghdr msg = { .msg_name = &sa, .msg_namelen = sizeof(sa), .msg_iov = iov, .msg_iovlen = ARRAY_SIZE(iov), }; struct nlmsghdr *nh; int len; int rc; log_debug(1, "%s", __func__); len = recvmsg(s, &msg, 0); if (len < 0) { log_errno("netlink recvmsg error"); return len; } rc = 1; for (nh = NLMSG(buf); NLMSG_OK(nh, len); nh = NLMSG_NEXT(nh, len)) { switch (nh->nlmsg_type) { case RTM_NEWLINK: rtnl_recv_newlink(nh); break; case NLMSG_DONE: log_debug(1, "NLMSG_DONE"); break; case NLMSG_ERROR: log_debug(1, "NLMSG_ERROR"); break; default: log_warn("unexpected netlink message type %d", nh->nlmsg_type); break; } if (nh->nlmsg_type == NLMSG_DONE) { rc = 0; break; } if (!(nh->nlmsg_flags & NLM_F_MULTI)) break; } return rc; } /* command line arguments */ #define GETOPT_STR "ahv" static const struct option long_options[] = { { "auto", no_argument, NULL, 'a' }, { "help", no_argument, NULL, 'h' }, { "version", no_argument, NULL, 'v' }, { NULL, 0, NULL, 0 } }; static void help(int status) { printf( "Usage: %s [ options ] [ network interfaces ]\n" "Options:\n" " -a, --auto Auto select Ethernet interfaces\n" " -h, --help Display this help and exit\n" " -v, --version Display version information and exit\n", exe); exit(status); } /* array of interface names to use */ char **namev; /* length of namev */ int namec; int parse_cmdline(int argc, char **argv) { char c; int automode = 0; while (1) { c = getopt_long(argc, argv, GETOPT_STR, long_options, NULL); if (c < 0) break; switch (c) { case 'a': automode = 1; break; case 'h': help(0); break; case 'v': printf("%s version %s\n", exe, FCOE_UTILS_VERSION); exit(0); break; default: fprintf(stderr, "Try '%s --help' " "for more information\n", exe); exit(1); } } if ((optind == argc) && (!automode)) help(1); namev = &argv[optind]; namec = argc - optind; return automode; } /* exit after waiting 2 seconds without receiving anything */ #define TIMEOUT 2000 int autodetect() { struct pollfd pfd[1]; int ns; int rc; ns = rtnl_socket(); if (ns < 0) return ns; send_getlink_dump(ns); pfd[0].fd = ns; pfd[0].events = POLLIN; while (1) { rc = poll(pfd, ARRAY_SIZE(pfd), TIMEOUT); log_debug(1, "return from poll %d", rc); if (rc == 0) /* timeout */ break; if (rc == -1) { log_errno("poll error"); break; } if (pfd[0].revents) { rc = rtnl_recv(pfd[0].fd); if (rc == 0) break; } pfd[0].revents = 0; } close(ns); return 0; } int check_interface(char *name, int ps) { struct ifreq ifr; struct iff *iff; iff = malloc(sizeof(*iff)); if (!iff) { log_errno("malloc failed"); return -1; } memset(iff, 0, sizeof(*iff)); strncpy(ifr.ifr_name, name, IFNAMSIZ); if (ioctl(ps, SIOCGIFINDEX, &ifr) != 0) { log_errno("SIOCGIFINDEX"); goto err; } iff->ifname = strdup(ifr.ifr_name); iff->ifindex = ifr.ifr_ifindex; if (ioctl(ps, SIOCGIFHWADDR, &ifr) != 0) { log_errno("SIOCGIFHWADDR"); goto err; } if (ifr.ifr_addr.sa_family != ARPHRD_ETHER) { log_err("%s is not an Ethernet interface", name); goto err; } memcpy(iff->mac_addr, ifr.ifr_addr.sa_data, ETHER_ADDR_LEN); list_add_tail(&iff->list, &interfaces); return 0; err: free(iff); return -1; } void print_results() { struct fcf *fcf; if (list_empty(&fcfs)) { printf("No Fibre Channel Forwarders Found\n"); return; } printf("Fibre Channel Forwarders Discovered\n"); printf("%-10.10s| %-5.5s| %-10.10s\n", "interface", "VLAN", "FCF MAC"); printf("------------------------------------\n"); list_for_each_entry(fcf, &fcfs, list) { printf("%-10.10s| %-5d| %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n", fcf->interface->ifname, fcf->vlan, fcf->mac_addr[0], fcf->mac_addr[1], fcf->mac_addr[2], fcf->mac_addr[3], fcf->mac_addr[4], fcf->mac_addr[5]); } } void recv_loop(int ps) { struct pollfd pfd[1] = { [0].fd = ps, [0].events = POLLIN, }; int rc; while (1) { rc = poll(pfd, ARRAY_SIZE(pfd), TIMEOUT); log_debug(1, "return from poll %d", rc); if (rc == 0) /* timeout */ break; if (rc == -1) { log_errno("poll error"); break; } if (pfd[0].revents) fip_recv(pfd[0].fd); pfd[0].revents = 0; } } int main(int argc, char **argv) { int ps; struct iff *iff; int i; int automode; exe = strrchr(argv[0], '/'); if (exe) exe++; else exe = argv[0]; automode = parse_cmdline(argc, argv); log_start(exe, 0, 0); ps = packet_socket(); if (automode) { autodetect(); } else { for (i = 0; i < namec; i++) check_interface(namev[i], ps); } if (list_empty(&interfaces)) { log_err("no interfaces to perform discovery on"); close(ps); log_stop(); exit(1); } list_for_each_entry(iff, &interfaces, list) fip_send_vlan_request(ps, iff); recv_loop(ps); print_results(); close(ps); log_stop(); exit(0); } fcoe-utils-1.0.9/aclocal.m40000644000175000017500000012017511336572511014421 0ustar chuckchuck# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, [m4_warning([this file was generated for autoconf 2.65. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # 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. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR fcoe-utils-1.0.9/depcomp0000755000175000017500000004426711336572515014151 0ustar chuckchuck#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # 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, 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: fcoe-utils-1.0.9/fcoemon.c0000644000175000017500000014112411312505503014337 0ustar chuckchuck/* * Copyright(c) 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Maintained at www.Open-FCoE.org */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* for typedef cmd_status */ #include #include #include /* for event msg level definitions */ #include "net_types.h" #include "fc_types.h" #include "fcoe_utils.h" #include "fcoemon_utils.h" #include "fcoemon.h" #ifndef SYSCONFDIR #define SYSCONFDIR "/etc" #endif #define CONFIG_DIR SYSCONFDIR "/fcoe" #define CONFIG_MIN_VAL_LEN (1 + 2) #define CONFIG_MAX_VAL_LEN (20 + 2) #define DCB_APP_0_DEFAULT_ENABLE 1 #define DCB_APP_0_DEFAULT_WILLING 1 #define FCM_DEFAULT_QOS_MASK (1 << 3) #define FILE_NAME_LEN (NAME_MAX + 1) #define VLAN_DIR "/proc/net/vlan" #define CLIF_NAME_PATH _PATH_VARRUN "dcbd/clif" #define CLIF_PID_FILE _PATH_VARRUN "fcoemon.pid" #define CLIF_LOCAL_SUN_PATH _PATH_TMP "fcoemon.dcbd.%d" #define DCBD_CONNECT_TIMEOUT (10 * 1000 * 1000) /* 10 seconds */ #define DCBD_CONNECT_RETRY_TIMEOUT (1 * 1000 * 1000) /* 1 seconds */ #define DCBD_REQ_RETRY_TIMEOUT (200 * 1000) /* 0.2 seconds */ #define DCBD_MAX_REQ_RETRIES 10 #define FCM_PING_REQ_LEN 1 /* byte-length of dcbd PING request */ #define FCM_PING_RSP_LEN 8 /* byte-length of dcbd PING response */ static char *fcoemon_version = "fcoemon v" FCOE_UTILS_VERSION "\n Copyright (c) 2009, Intel Corporation.\n"; /* * fcoe service configuration data * Note: These information are read in from the fcoe service * files in CONFIG_DIR */ struct fcoe_port { struct fcoe_port *next; /* information from fcoe configuration files in CONFIG_DIR */ char ifname[IFNAMSIZ]; /* netif on which fcoe i/f is created */ char real_ifname[IFNAMSIZ]; /* underlying net ifname - e.g. if ifname is a VLAN */ int fcoe_enable; int dcb_required; /* following track data required to manage FCoE interface state */ u_int32_t action; /* current state */ u_int32_t last_action; /* last action */ int last_msg_type; /* last rtnetlink msg type received on if name */ }; enum fcoeport_ifname { FCP_CFG_IFNAME = 0, FCP_REAL_IFNAME }; static u_int8_t fcm_def_qos_mask = FCM_DEFAULT_QOS_MASK; struct clif; /* for dcbtool.h only */ /* * Interact with DCB daemon. */ static void fcm_dcbd_timeout(void *); static void fcm_dcbd_retry_timeout(void *); static void fcm_dcbd_disconnect(void); static int fcm_dcbd_request(char *); static void fcm_dcbd_rx(void *); static void fcm_dcbd_event(char *, size_t); static void fcm_dcbd_cmd_resp(char *, cmd_status); static void fcm_netif_advance(struct fcm_netif *); static void fcm_fcoe_action(struct fcm_netif *, struct fcoe_port *); struct fcm_clif { int cl_fd; int cl_busy; /* non-zero if command pending */ int cl_ping_pending; struct sockaddr_un cl_local; }; static struct fcm_clif fcm_clif_st; static struct fcm_clif *fcm_clif = &fcm_clif_st; static struct sa_timer fcm_dcbd_timer; char *fcm_dcbd_cmd = CONFIG_DIR "/scripts/fcoeplumb"; /* Debugging routine */ static void print_errors(int errors); struct fcm_netif_head fcm_netif_head = TAILQ_HEAD_INITIALIZER(fcm_netif_head); static int fcm_link_socket; static int fcm_link_seq; static void fcm_link_recv(void *); static void fcm_link_getlink(void); static int fcm_link_buf_check(size_t); static void clear_dcbd_info(struct fcm_netif *ff); /* * Table for getopt_long(3). */ static struct option fcm_options[] = { {"debug", 0, NULL, 'd'}, {"syslog", 0, NULL, 's'}, {"exec", 1, NULL, 'e'}, {"foreground", 0, NULL, 'f'}, {"version", 0, NULL, 'v'}, {NULL, 0, NULL, 0} }; char progname[20]; static char fcm_pidfile[] = CLIF_PID_FILE; /* * Issue with buffer size: It isn't clear how to read more than one * buffer's worth of GETLINK replies. The kernel seems to just drop the * interface messages if they don't fit in the buffer, so we just make it * large enough to fit and expand it if we ever do a read that almost fills it. */ static char *fcm_link_buf; static size_t fcm_link_buf_size = 4096; /* initial size */ static const size_t fcm_link_buf_fuzz = 300; /* "almost full" remainder */ /* * A value must be surrounded by quates, e.g. "x". * The minimum length of a value is 1 excluding the quotes. * The maximum length of a value is 20 excluding the quotes. */ static int fcm_remove_quotes(char *buf, int len) { char *s = buf; char *e = buf + len - 1; char tmp[CONFIG_MAX_VAL_LEN + 1]; if (len < CONFIG_MIN_VAL_LEN) return -1; if ((*s >= '0' && *s <= '9') || (*s >= 'a' && *s <= 'z') || (*s >= 'A' && *s <= 'Z')) return -1; if ((*e >= '0' && *e <= '9') || (*e >= 'a' && *e <= 'z') || (*e >= 'A' && *e <= 'Z')) return -1; s = buf + 1; *e = '\0'; strncpy(tmp, s, len - 1); strncpy(buf, tmp, len - 1); return 0; } /* * Read a configuration variable for a port from a config file. * There's no problem if the file doesn't exist. * The buffer is set to an empty string if the variable is not found. * * Returns: 1 found * 0 not found * -1 error in format */ static size_t fcm_read_config_variable(char *file, char *val_buf, size_t len, FILE *fp, const char *var_name) { char *s; char *var; char *val; char buf[FILE_NAME_LEN]; int n; val_buf[0] = '\0'; buf[sizeof(buf) - 1] = '\0'; while ((s = fgets(buf, sizeof(buf) - 1, fp)) != NULL) { while (isspace(*s)) s++; if (*s == '\0' || *s == '#') continue; var = s; if (!isalpha(*var)) continue; val = strchr(s, '='); if (val == NULL) continue; *val++ = '\0'; s = val; if (strcmp(var_name, var) != 0) continue; while (*s != '\0' && !isspace(*s)) s++; *s = '\0'; n = snprintf(val_buf, len, "%s", val); if (fcm_remove_quotes(val_buf, n) < 0) { FCM_LOG("Invalid format in config file" " %s: %s=%s\n", file, var_name, val); /* error */ return -1; } /* found */ return 1; } /* not found */ return 0; } static int fcm_read_config_files(void) { char file[80]; FILE *fp; char val[CONFIG_MAX_VAL_LEN + 1]; DIR *dir; struct dirent *dp; struct fcoe_port *curr; struct fcoe_port *next; int rc; dir = opendir(CONFIG_DIR); if (dir == NULL) { FCM_LOG_ERR(errno, "Failed reading directory %s\n", CONFIG_DIR); return -1; } for (;;) { dp = readdir(dir); if (dp == NULL) break; if (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || (dp->d_name[1] == '.' && dp->d_name[2] == '\0'))) continue; rc = strncmp(dp->d_name, "cfg-", strlen("cfg-")); if (rc) continue; next = (struct fcoe_port *) calloc(1, sizeof(struct fcoe_port)); if (!next) { FCM_LOG_ERR(errno, "failed to allocate fcoe_port %s", dp->d_name); continue; } strncpy(next->ifname, dp->d_name + 4, sizeof(next->ifname)); strncpy(file, CONFIG_DIR "/", sizeof(file)); strncat(file, dp->d_name, sizeof(file) - strlen(file)); fp = fopen(file, "r"); if (!fp) { FCM_LOG_ERR(errno, "Failed to read %s\n", file); free(next); continue; } next->action = FCP_WAIT; /* FCOE_ENABLE */ rc = fcm_read_config_variable(file, val, sizeof(val), fp, "FCOE_ENABLE"); if (rc < 0) { FCM_LOG("%s invalid format for FCOE_ENABLE setting"); fclose(fp); free(next); continue; } /* if not found, default to "no" */ if (!strncasecmp(val, "yes", 3) && rc == 1) next->fcoe_enable = 1; /* DCB_REQUIRED */ rc = fcm_read_config_variable(file, val, sizeof(val), fp, "DCB_REQUIRED"); if (rc < 0) { FCM_LOG("%s invalid format for DCB_REQUIRED setting"); fclose(fp); free(next); continue; } /* if not found, default to "no" */ if (!strncasecmp(val, "yes", 3) && rc == 1) { next->dcb_required = 1; } fclose(fp); if (!fcoe_config.port) { fcoe_config.port = next; curr = next; } else { curr->next = next; curr = next; } } closedir(dir); return 0; } /* * Given an fcoe_port pointer and an ifname, find the next fcoe_port * in the list with a real ifname of 'ifname'. * * Returns: fcoe_port pointer to fcoe port entry * NULL - if not found */ static struct fcoe_port *fcm_find_next_fcoe_port(struct fcoe_port *p, char *ifname) { struct fcoe_port *np; np = fcoe_config.port; while (np) { if (np == p) break; np = np->next; } if (np) np = np->next; while (np) { if (!strncmp(ifname, np->real_ifname, IFNAMSIZ)) return np; np = np->next; } return NULL; } static struct fcoe_port *fcm_find_fcoe_port(char *ifname, enum fcoeport_ifname t) { struct fcoe_port *p; char *fp_ifname; p = fcoe_config.port; while (p) { switch (t) { case FCP_CFG_IFNAME: fp_ifname = p->ifname; break; case FCP_REAL_IFNAME: fp_ifname = p->real_ifname; break; default: FCM_LOG("unhandled interface type [%d] for %s", t, ifname); return NULL; } if (!strncmp(ifname, fp_ifname, IFNAMSIZ)) return p; p = p->next; } return NULL; } static int fcm_link_init(void) { int fd; int rc; struct sockaddr_nl l_local; fcm_link_buf = malloc(fcm_link_buf_size); ASSERT(fcm_link_buf); fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); if (fd < 0) { FCM_LOG_ERR(errno, "socket error"); return fd; } memset(&l_local, 0, sizeof(l_local)); l_local.nl_family = AF_NETLINK; l_local.nl_groups = RTMGRP_LINK; l_local.nl_pid = 0; rc = bind(fd, (struct sockaddr *)&l_local, sizeof(l_local)); if (rc == -1) { FCM_LOG_ERR(errno, "bind error"); return rc; } fcm_link_socket = fd; /* Add a given file descriptor from a readfds set */ sa_select_add_fd(fd, fcm_link_recv, NULL, NULL, NULL); fcm_link_getlink(); return 0; } /* fcm_vlan_dev_real_dev - query vlan real_dev * @vlan_ifname - vlan device ifname to find real interface name for * @real_ifname - pointer to copy real ifname to * * Make an ioctl call to find the real device for vlan_ifname. * Copy to real_ifname if found. */ static void fcm_vlan_dev_real_dev(char *vlan_ifname, char *real_ifname) { int fd; struct vlan_ioctl_args ifv; real_ifname[0] = '\0'; fd = socket(PF_INET, SOCK_DGRAM, 0); if (fd <= 0) { FCM_LOG_ERR(errno, "open vlan query socket error"); return; } memset(&ifv, 0, sizeof(ifv)); ifv.cmd = GET_VLAN_REALDEV_NAME_CMD; strncpy(ifv.device1, vlan_ifname, strlen(vlan_ifname)+1); if (ioctl(fd, SIOCGIFVLAN, &ifv) == 0) strncpy(real_ifname, ifv.u.device2, strlen(ifv.u.device2)+1); close(fd); } /* fcm_is_linkinfo_vlan - parse nlmsg linkinfo rtattr for vlan kind * @ap: pointer to the linkinfo rtattr * * This function parses the linkinfo rtattr and returns * 1 if it is kind vlan otherwise returns 0. */ int fcm_is_linkinfo_vlan(struct rtattr *ap) { struct rtattr *info; int len; info = (struct rtattr *) (RTA_DATA(ap)); for (len = ap->rta_len; RTA_OK(info, len); info = RTA_NEXT(info, len)) { if (info->rta_type != IFLA_INFO_KIND) continue; if (strncmp("vlan", RTA_DATA(info), sizeof("vlan"))) return 0; else return 1; } return 0; } static void fcp_action_set(char *ifname, enum fcp_action action) { struct fcoe_port *p; p = fcm_find_fcoe_port(ifname, FCP_REAL_IFNAME); while (p) { p->action = action; p = fcm_find_next_fcoe_port(p, ifname); } } static struct sa_nameval fcm_dcbd_states[] = FCM_DCBD_STATES; static void fcm_dcbd_state_set(struct fcm_netif *ff, enum fcm_dcbd_state new_state) { if (ff->ff_operstate != IF_OPER_UP) { ff->ff_dcbd_state = FCD_INIT; return; } if (fcoe_config.debug) { char old[32]; char new[32]; FCM_LOG_DEV_DBG(ff, "%s -> %s", sa_enum_decode(old, sizeof(old), fcm_dcbd_states, ff->ff_dcbd_state), sa_enum_decode(new, sizeof(new), fcm_dcbd_states, new_state)); } if (new_state == FCD_GET_DCB_STATE) clear_dcbd_info(ff); if (new_state == FCD_INIT) { ff->dcbd_retry_cnt = 0; sa_timer_cancel(&ff->dcbd_retry_timer); } if (new_state == FCD_ERROR) { ff->dcbd_retry_cnt++; FCM_LOG_DEV_DBG(ff, "%s: SETTING dcbd RETRY TIMER = %d\n", ff->ifname, ff->dcbd_retry_cnt * DCBD_REQ_RETRY_TIMEOUT); sa_timer_set(&ff->dcbd_retry_timer, ff->dcbd_retry_cnt * DCBD_REQ_RETRY_TIMEOUT); } ff->ff_dcbd_state = new_state; ff->response_pending = 0; } static void update_fcoe_port_state(struct fcoe_port *p, unsigned int type, u_int8_t operstate, enum fcoeport_ifname t) { struct fcm_netif *ff = NULL; if (type != RTM_DELLINK) { ff = fcm_netif_lookup_create(p->real_ifname); if (!ff) return; /* Only set the ff_operstate field of the network interface * element if this routine is being called for the real * network interface, or, if the interface is a VLAN, if the * network interface element has not been intialized and the * VLAN operstate is up (if VLAN is up, then real interface is * up). */ if ((t == FCP_REAL_IFNAME) || ((t == FCP_CFG_IFNAME) && (ff->ff_operstate == IF_OPER_UNKNOWN) && (operstate == IF_OPER_UP))) ff->ff_operstate = operstate; if (!p->fcoe_enable) { p->action = FCP_DESTROY_IF; return; } if (operstate == IF_OPER_UP) { if (p->dcb_required) { /* If DCB is required, do not start the dcbd * query sequence if this routine is being * called for a real interface and the FCoE * interface is configured on a VLAN. */ if ((t == FCP_REAL_IFNAME) && strncmp(p->ifname, p->real_ifname, IFNAMSIZ)) fcm_dcbd_state_set(ff, FCD_INIT); else fcm_dcbd_state_set(ff, FCD_GET_DCB_STATE); } else { p->action = FCP_CREATE_IF; } } } else { p->action = FCP_DESTROY_IF; } } void fcm_process_link_msg(struct ifinfomsg *ip, int len, unsigned type) { struct fcoe_port *p; struct rtattr *ap; char ifname[IFNAMSIZ]; char real_dev[IFNAMSIZ]; u_int8_t operstate; u_int64_t mac; int is_vlan; mac = is_vlan = 0; operstate = IF_OPER_UNKNOWN; if (ip->ifi_type != ARPHRD_ETHER) return; len -= sizeof(*ip); for (ap = (struct rtattr *)(ip + 1); RTA_OK(ap, len); ap = RTA_NEXT(ap, len)) { switch (ap->rta_type) { case IFLA_ADDRESS: if (RTA_PAYLOAD(ap) == 6) mac = net48_get(RTA_DATA(ap)); break; case IFLA_IFNAME: sa_strncpy_safe(ifname, sizeof(ifname), RTA_DATA(ap), RTA_PAYLOAD(ap)); FCM_LOG_DBG("ifname %s", ifname); break; case IFLA_OPERSTATE: operstate = *(uint8_t *) RTA_DATA(ap); break; case IFLA_LINKINFO: if (fcm_is_linkinfo_vlan(ap)) is_vlan = 1; break; default: break; } } p = fcm_find_fcoe_port(ifname, FCP_CFG_IFNAME); if (is_vlan) { /* if not in fcoe port list, then ignore this ifname */ if (!p) return; /* try to find the real device name */ real_dev[0] = '\0'; fcm_vlan_dev_real_dev(ifname, real_dev); if (strlen(real_dev)) strncpy(p->real_ifname, real_dev, strlen(real_dev)+1); update_fcoe_port_state(p, type, operstate, FCP_CFG_IFNAME); p->last_msg_type = type; } else { /* the ifname is not a VLAN. handle the case where it has * an FCoE interface configured on it. */ if (p) { strncpy(p->real_ifname, ifname, strlen(ifname)+1); update_fcoe_port_state(p, type, operstate, FCP_REAL_IFNAME); } /* handle all FCoE ports which are on VLANs over this * ifname. */ p = fcm_find_fcoe_port(ifname, FCP_REAL_IFNAME); while (p) { update_fcoe_port_state(p, type, operstate, FCP_REAL_IFNAME); p = fcm_find_next_fcoe_port(p, ifname); } } } static void fcm_link_recv(void *arg) { int rc; char *buf; struct nlmsghdr *hp; struct ifinfomsg *ip; unsigned type; int plen; int rlen; buf = fcm_link_buf; rc = read(fcm_link_socket, buf, fcm_link_buf_size); if (rc <= 0) { if (rc < 0) FCM_LOG_ERR(errno, "read error"); return; } if (fcm_link_buf_check(rc)) { fcm_link_getlink(); return; } hp = (struct nlmsghdr *)buf; rlen = rc; for (hp = (struct nlmsghdr *)buf; NLMSG_OK(hp, rlen); hp = NLMSG_NEXT(hp, rlen)) { type = hp->nlmsg_type; if (hp->nlmsg_type == NLMSG_DONE) break; if (hp->nlmsg_type == NLMSG_ERROR) { FCM_LOG("nlmsg error"); break; } plen = NLMSG_PAYLOAD(hp, 0); ip = (struct ifinfomsg *)NLMSG_DATA(hp); if (plen < sizeof(*ip)) { FCM_LOG("too short (%d) to be a LINK message", rc); break; } switch (type) { case RTM_NEWLINK: case RTM_DELLINK: case RTM_GETLINK: FCM_LOG_DBG("Link event: %d flags %05X index %d ", type, ip->ifi_flags, ip->ifi_index); fcm_process_link_msg(ip, plen, type); break; default: break; } } } /* * Send rt_netlink request for all network interfaces. */ static void fcm_link_getlink(void) { struct { struct nlmsghdr nl; struct ifinfomsg ifi; /* link level specific information, not dependent on network protocol */ } msg; int rc; memset(&msg, 0, sizeof(msg)); msg.nl.nlmsg_len = sizeof(msg); msg.nl.nlmsg_type = RTM_GETLINK; msg.nl.nlmsg_flags = NLM_F_REQUEST | NLM_F_ROOT | NLM_F_ATOMIC; msg.nl.nlmsg_seq = ++fcm_link_seq; msg.nl.nlmsg_pid = getpid(); msg.ifi.ifi_family = AF_UNSPEC; msg.ifi.ifi_type = ARPHRD_ETHER; rc = write(fcm_link_socket, &msg, sizeof(msg)); if (rc < 0) FCM_LOG_ERR(errno, "write error"); } /* * Check for whether buffer needs to grow based on amount read. * Free's the old buffer so don't use that after this returns non-zero. */ static int fcm_link_buf_check(size_t read_len) { char *buf; size_t len = read_len; if (len > fcm_link_buf_size - fcm_link_buf_fuzz) { len = fcm_link_buf_size; len = len + len / 2; /* grow by 50% */ buf = malloc(len); if (buf != NULL) { free(fcm_link_buf); fcm_link_buf = buf; fcm_link_buf_size = len; return 1; } else { FCM_LOG_ERR(errno, "failed to allocate link buffer"); } } return 0; } static void fcm_fcoe_init(void) { if (fcm_read_config_files()) exit(1); } /* * Allocate an FCoE interface state structure. */ static struct fcm_netif *fcm_netif_alloc(void) { struct fcm_netif *ff; ff = calloc(1, sizeof(*ff)); if (ff) { ff->ff_qos_mask = fcm_def_qos_mask; ff->ff_operstate = IF_OPER_UNKNOWN; TAILQ_INSERT_TAIL(&fcm_netif_head, ff, ff_list); } else { FCM_LOG_ERR(errno, "failed to allocate fcm_netif"); } return ff; } /* * Find or create an FCoE network interface by ifname. * @ifname - interface name to create * * This creates a netif interface structure with interface name, * or if one already exists returns the existing one. */ static struct fcm_netif *fcm_netif_lookup_create(char *ifname) { struct fcm_netif *ff; TAILQ_FOREACH(ff, &fcm_netif_head, ff_list) { if (!strncmp(ifname, ff->ifname, IFNAMSIZ)) return ff; } ff = fcm_netif_alloc(); if (ff != NULL) { snprintf(ff->ifname, sizeof(ff->ifname), "%s", ifname); sa_timer_init(&ff->dcbd_retry_timer, fcm_dcbd_retry_timeout, (void *)ff); FCM_LOG_DEV_DBG(ff, "Monitoring port %s\n", ifname); } return ff; } /* * Find an FCoE interface by name. */ static struct fcm_netif *fcm_netif_lookup(char *ifname) { struct fcm_netif *ff, *curr; ff = NULL; TAILQ_FOREACH(curr, &fcm_netif_head, ff_list) { if (strcmp(curr->ifname, ifname) == 0) { ff = curr; break; } } return ff; } static void fcm_dcbd_init() { fcm_clif->cl_fd = -1; /* not connected */ fcm_clif->cl_ping_pending = 0; sa_timer_init(&fcm_dcbd_timer, fcm_dcbd_timeout, NULL); fcm_dcbd_timeout(NULL); } static int fcm_dcbd_connect(void) { int rc; int fd; struct sockaddr_un dest; struct sockaddr_un *lp; ASSERT(fcm_clif->cl_fd < 0); fd = socket(PF_UNIX, SOCK_DGRAM, 0); if (fd < 0) { FCM_LOG_ERR(errno, "clif socket open failed"); /* XXX */ return 0; } lp = &fcm_clif->cl_local; lp->sun_family = PF_UNIX; snprintf(lp->sun_path, sizeof(lp->sun_path), CLIF_LOCAL_SUN_PATH, getpid()); rc = bind(fd, (struct sockaddr *)lp, sizeof(*lp)); if (rc < 0) { FCM_LOG_ERR(errno, "clif bind failed"); close(fd); return 0; } memset(&dest, 0, sizeof(dest)); dest.sun_family = PF_UNIX; snprintf(dest.sun_path, sizeof(dest.sun_path), CLIF_NAME_PATH); rc = connect(fd, (struct sockaddr *)&dest, sizeof(dest)); if (rc < 0) { FCM_LOG_ERR(errno, "clif connect failed"); unlink(lp->sun_path); close(fd); return 0; } fcm_clif->cl_fd = fd; sa_select_add_fd(fd, fcm_dcbd_rx, NULL, NULL, fcm_clif); FCM_LOG_DBG("connected to dcbd"); return 1; } static void fcm_dcbd_timeout(void *arg) { if (fcm_clif->cl_ping_pending > 0) { fcm_dcbd_request("D"); /* DETACH_CMD */ fcm_dcbd_disconnect(); } if (fcm_clif->cl_fd < 0) { if (fcm_dcbd_connect()) fcm_dcbd_request("A"); /* ATTACH_CMD: for events */ else sa_timer_set(&fcm_dcbd_timer, DCBD_CONNECT_TIMEOUT); } else { fcm_clif->cl_ping_pending++; fcm_dcbd_request("P"); /* ping to verify connection */ } } static void fcm_dcbd_retry_timeout(void *arg) { struct fcm_netif *ff = (struct fcm_netif *)arg; ASSERT(ff); FCM_LOG_DBG("%s: dcbd retry TIMEOUT occurred [%d]", ff->ifname, ff->dcbd_retry_cnt); fcm_dcbd_state_set(ff, FCD_GET_DCB_STATE); fcm_netif_advance(ff); } static void fcm_dcbd_disconnect(void) { if (fcm_clif != NULL && fcm_clif->cl_local.sun_path[0] != '\0') { if (fcm_clif->cl_fd >= 0) sa_select_rem_fd(fcm_clif->cl_fd); unlink(fcm_clif->cl_local.sun_path); fcm_clif->cl_local.sun_path[0] = '\0'; fcm_clif->cl_fd = -1; /* mark as disconnected */ fcm_clif->cl_busy = 0; fcm_clif->cl_ping_pending = 0; FCM_LOG_DBG("Disconnected from dcbd"); } } static void fcm_dcbd_shutdown(void) { FCM_LOG_DBG("Shutdown dcbd connection\n"); fcm_dcbd_request("D"); /* DETACH_CMD */ fcm_dcbd_disconnect(); unlink(fcm_pidfile); closelog(); } static void fcm_cleanup(void) { struct fcoe_port *curr, *next; struct fcm_netif *ff, *head; for (curr = fcoe_config.port; curr; curr = next) { next = curr->next; free(curr); } for (head = TAILQ_FIRST(&fcm_netif_head); head; head = ff) { ff = TAILQ_NEXT(head, ff_list); TAILQ_REMOVE(&fcm_netif_head, head, ff_list); free(head); } free(fcm_link_buf); } static u_int32_t fcm_get_hex(char *cp, u_int32_t len, char **endptr) { u_int32_t hex = 0; while (len > 0) { len--; if (*cp >= '0' && *cp <= '9') hex = (hex << 4) | (*cp - '0'); else if (*cp >= 'A' && *cp <= 'F') hex = (hex << 4) | (*cp - 'A' + 10); else if (*cp >= 'a' && *cp <= 'f') hex = (hex << 4) | (*cp - 'a' + 10); else break; cp++; } *endptr = (len == 0) ? NULL : cp; return hex; } static void fcm_dcbd_rx(void *arg) { struct fcm_clif *clif = arg; cmd_status st; char buf[128]; size_t len; int rc; char *ep; len = sizeof(buf); rc = read(clif->cl_fd, buf, sizeof(buf) - 1); if (rc < 0) FCM_LOG_ERR(errno, "read"); else if ((rc > 0) && (rc < sizeof(buf))) { buf[rc] = '\0'; len = strlen(buf); ASSERT(len <= rc); if (len > FCM_PING_RSP_LEN) FCM_LOG_DBG("received len %d buf '%s'", len, buf); switch (buf[CLIF_RSP_MSG_OFF]) { case CMD_RESPONSE: st = fcm_get_hex(buf + CLIF_STAT_OFF, CLIF_STAT_LEN, &ep); if (ep != NULL) FCM_LOG("unexpected response code from dcbd: " "len %d buf %s rc %d", len, buf, rc); else if (st != cmd_success && st != cmd_device_not_found) { FCM_LOG("error response from dcbd: " "error %d len %d %s", st, len, buf); } fcm_clif->cl_busy = 0; switch (buf[3]) { case DCB_CMD: fcm_dcbd_cmd_resp(buf, st); break; case ATTACH_CMD: break; case DETACH_CMD: break; case PING_CMD: if (clif->cl_ping_pending > 0) --clif->cl_ping_pending; break; case LEVEL_CMD: break; default: FCM_LOG("Unexpected cmd in response " "from dcbd: len %d %s", len, buf); break; } break; case EVENT_MSG: fcm_dcbd_event(buf, len); break; default: FCM_LOG("Unexpected message from dcbd: len %d buf %s", len, buf); break; } } } /* * returns: 1 if request was successfully written * 0 if the write failed */ static int fcm_dcbd_request(char *req) { size_t len; int rc; if (fcm_clif->cl_fd < 0) return 0; len = strlen(req); ASSERT(fcm_clif->cl_busy == 0); sa_timer_set(&fcm_dcbd_timer, DCBD_CONNECT_TIMEOUT); fcm_clif->cl_busy = 1; rc = write(fcm_clif->cl_fd, req, len); if (rc < 0) { FCM_LOG_ERR(errno, "Failed write req %s len %d", req, len); fcm_clif->cl_busy = 0; fcm_dcbd_disconnect(); sa_timer_set(&fcm_dcbd_timer, DCBD_CONNECT_RETRY_TIMEOUT); return 0; } if (rc > FCM_PING_REQ_LEN) FCM_LOG_DBG("sent '%s', rc=%d bytes succeeded", req, rc); return 1; } /* * Find port for message. * The port name length starts at len_off for len_len bytes. * The entire message length is len. * The pointer to the message pointer is passed in, and updated to point * past the interface name. */ static struct fcm_netif *fcm_dcbd_get_port(char **msgp, size_t len_off, size_t len_len, size_t len) { struct fcm_netif *ff; u_int32_t if_len; char *ep; char *msg; char ifname[IFNAMSIZ]; msg = *msgp; if (len_off + len_len >= len) return NULL; if_len = fcm_get_hex(msg + len_off, len_len, &ep); if (ep != NULL) { FCM_LOG("Parse error on port len: msg %s", msg); return NULL; } if (len_off + len_len + if_len > len) { FCM_LOG("Invalid port len %d msg %s", if_len, msg); return NULL; } msg += len_off + len_len; sa_strncpy_safe(ifname, sizeof(ifname), msg, if_len); *msgp = msg + if_len; ff = fcm_netif_lookup(ifname); if (ff == NULL) { FCM_LOG("ifname '%s' not found", ifname); } return ff; } /* * (XXX) Notes: * This routine is here to help fcm_dcbd_cmd_resp() to pick up * information of the response packet from the DCBD. * Returns: 0 on success * -1 on failure */ static int dcb_rsp_parser(struct fcm_netif *ff, char *rsp) { int version; int dcb_cmd; int feature; int subtype; int plen; int doff; int i; int n; struct feature_info *f_info = NULL; char buf[20]; feature = hex2int(rsp+DCB_FEATURE_OFF); dcb_cmd = hex2int(rsp+DCB_CMD_OFF); version = rsp[DCB_VER_OFF] & 0x0f; if (version != CLIF_MSG_VERSION) { FCM_LOG_DEV(ff, "WARNING: Unexpected rsp version %d\n", version); return -1; } subtype = hex2int(rsp+DCB_SUBTYPE_OFF); plen = hex2int(rsp+DCB_PORTLEN_OFF); doff = DCB_PORT_OFF + plen; switch (feature) { case FEATURE_DCB: ff->ff_dcb_state = (*(rsp+doff+CFG_ENABLE) == '1'); return 0; case FEATURE_PFC: f_info = &ff->ff_pfc_info; break; case FEATURE_APP: f_info = &ff->ff_app_info; f_info->subtype = subtype; break; default: return -1; } switch (dcb_cmd) { case CMD_GET_CONFIG: f_info->enable = (*(rsp+doff+CFG_ENABLE) == '1'); f_info->advertise = (*(rsp+doff+CFG_ADVERTISE) == '1'); f_info->willing = (*(rsp+doff+CFG_WILLING) == '1'); doff += CFG_LEN; break; case CMD_GET_OPER: f_info->op_vers = hex2int(rsp+doff+OPER_OPER_VER); f_info->op_error = hex2int(rsp+doff+OPER_ERROR); f_info->op_mode = (*(rsp+doff+OPER_OPER_MODE) == '1'); f_info->syncd = (*(rsp+doff+OPER_SYNCD) == '1'); doff += OPER_LEN; if (feature == FEATURE_PFC) { f_info->u.pfcup = 0; for (i = 0; i < MAX_USER_PRIORITIES; i++) { if (*(rsp+doff+PFC_UP(i)) == '1') f_info->u.pfcup |= 1<u.appcfg = hex2int(buf); } break; } return 0; } /* * validate_dcbd_info - Validating DCBD configuration and status * * Returns: FCP_CREATE_IF - if the dcb netif qualifies for an fcoe interface * FCP_DESTROY_IF - if the dcb netif should not support fcoe interface * FCP_WAIT - if dcb criteria is inconclusive */ static enum fcp_action validate_dcbd_info(struct fcm_netif *ff) { int errors = 0; int dcbon; dcbon = ff->ff_dcb_state; /* check if dcb state qualifies to create the fcoe interface */ if (dcbon && ff->ff_app_info.enable && ff->ff_pfc_info.enable && ff->ff_app_info.op_mode && ff->ff_pfc_info.op_mode && ff->ff_pfc_info.u.pfcup & ff->ff_app_info.u.appcfg) { if (dcbon && !ff->ff_app_info.willing) { FCM_LOG_DEV(ff, "WARNING: FCoE willing mode is false\n"); errors++; } if (dcbon && !ff->ff_app_info.advertise) { FCM_LOG_DEV(ff, "WARNING: FCoE advertise mode is false\n"); errors++; } if (dcbon && !ff->ff_pfc_info.willing) { FCM_LOG_DEV(ff, "WARNING: PFC willing mode is false\n"); errors++; } if (dcbon && !ff->ff_pfc_info.advertise) { FCM_LOG_DEV(ff, "WARNING: PFC advertise mode is false\n"); errors++; } if (errors) FCM_LOG_DEV_DBG(ff, "WARNING: DCB may not be configured correctly\n"); else FCM_LOG_DEV_DBG(ff, "DCB is configured correctly\n"); ff->ff_qos_mask = ff->ff_pfc_info.u.pfcup & ff->ff_app_info.u.appcfg; return FCP_CREATE_IF; } /* check if dcb state qualifies to destroy the fcoe interface */ if (!dcbon || !ff->ff_app_info.enable || (ff->ff_app_info.op_mode && ff->ff_pfc_info.op_mode && !(ff->ff_pfc_info.u.pfcup & ff->ff_app_info.u.appcfg))) { if (dcbon && !ff->ff_dcb_state) FCM_LOG_DEV(ff, "WARNING: DCB is disabled\n"); if (dcbon && !ff->ff_app_info.enable) FCM_LOG_DEV(ff, "WARNING: FCoE enable is off\n"); if (dcbon && !(ff->ff_pfc_info.u.pfcup & ff->ff_app_info.u.appcfg)) FCM_LOG_DEV(ff, "WARNING: FCoE priority (0x%02x) doesn't " "intersect with PFC priority (0x%02x)\n", ff->ff_app_info.u.appcfg, ff->ff_pfc_info.u.pfcup); return FCP_DESTROY_IF; } /* The dcbd state does not match the create or destroy criteria. * Log possible problems. */ if (dcbon && !ff->ff_app_info.willing) { FCM_LOG_DEV(ff, "WARNING: FCoE willing mode is false\n"); errors++; } if (dcbon && !ff->ff_app_info.advertise) { FCM_LOG_DEV(ff, "WARNING: FCoE advertise mode is false\n"); errors++; } if (dcbon && !ff->ff_app_info.op_mode) { FCM_LOG_DEV(ff, "WARNING: FCoE operational mode is false\n"); print_errors(ff->ff_app_info.op_error); errors++; } if (dcbon && !ff->ff_pfc_info.enable) { FCM_LOG_DEV(ff, "WARNING: PFC enable is off\n"); errors++; } if (dcbon && !ff->ff_pfc_info.advertise) { FCM_LOG_DEV(ff, "WARNING: PFC advertise mode is false\n"); errors++; } if (dcbon && !ff->ff_app_info.op_mode) { FCM_LOG_DEV(ff, "WARNING: APP:0 operational mode is false\n"); print_errors(ff->ff_app_info.op_error); errors++; } if (dcbon && !ff->ff_pfc_info.op_mode) { FCM_LOG_DEV(ff, "WARNING: PFC operational mode is false\n"); print_errors(ff->ff_pfc_info.op_error); errors++; } if (dcbon && !(ff->ff_pfc_info.u.pfcup & ff->ff_app_info.u.appcfg)) { FCM_LOG_DEV(ff, "WARNING: APP:0 priority (0x%02x) doesn't " "intersect with PFC priority (0x%02x)\n", ff->ff_app_info.u.appcfg, ff->ff_pfc_info.u.pfcup); errors++; } if (errors) { FCM_LOG_DEV(ff, "WARNING: DCB may be configured incorrectly\n"); return FCP_ERROR; } return FCP_WAIT; } /* * clear_dcbd_info - clear dcbd info to unknown values * */ static void clear_dcbd_info(struct fcm_netif *ff) { memset(&ff->ff_pfc_info, 0, sizeof(struct feature_info)); memset(&ff->ff_app_info, 0, sizeof(struct feature_info)); } /** * fcm_dcbd_set_config() - Response handler for set config command * @ff: fcoe port structure * @st: status */ static void fcm_dcbd_set_config(struct fcm_netif *ff) { if (ff->ff_dcbd_state == FCD_SEND_CONF) { fcm_dcbd_state_set(ff, FCD_GET_PFC_CONFIG); } } /** * fcm_dcbd_get_config() - Response handler for get config command * @ff: fcoe port structure * @resp: response buffer * @st: status */ static void fcm_dcbd_get_config(struct fcm_netif *ff, char *resp) { switch (ff->ff_dcbd_state) { case FCD_GET_DCB_STATE: if (!dcb_rsp_parser(ff, resp)) { if (ff->ff_dcb_state) fcm_dcbd_state_set(ff, FCD_GET_PFC_CONFIG); else fcm_dcbd_state_set(ff, FCD_DONE); } else fcm_dcbd_state_set(ff, FCD_ERROR); break; case FCD_GET_PFC_CONFIG: if (!dcb_rsp_parser(ff, resp)) fcm_dcbd_state_set(ff, FCD_GET_APP_CONFIG); else fcm_dcbd_state_set(ff, FCD_ERROR); break; case FCD_GET_APP_CONFIG: if (!dcb_rsp_parser(ff, resp)) fcm_dcbd_state_set(ff, FCD_GET_PFC_OPER); else fcm_dcbd_state_set(ff, FCD_ERROR); break; default: break; } } /** * fcm_dcbd_get_oper() - Response handler for get operational state command * @ff: fcoe port structure * @resp: response buffer * @cp: response buffer pointer, points past the interface name * @st: status * * Sample msg: R00C103050004eth8010100100208 * opppssll vvmmeemsllpp */ static void fcm_dcbd_get_oper(struct fcm_netif *ff, char *resp, char *cp) { u_int32_t val; char *ep = NULL; val = fcm_get_hex(cp + OPER_ERROR, 2, &ep); if (ep) { FCM_LOG_DEV(ff, "Invalid get oper response " "parse error byte %d, resp %s", ep - cp, cp); fcm_dcbd_state_set(ff, FCD_ERROR); } else { if (val && fcoe_config.debug) print_errors(val); switch (ff->ff_dcbd_state) { case FCD_GET_PFC_OPER: if (dcb_rsp_parser(ff, resp) || !ff->ff_pfc_info.syncd) fcm_dcbd_state_set(ff, FCD_ERROR); else fcm_dcbd_state_set(ff, FCD_GET_APP_OPER); FCM_LOG_DEV_DBG(ff, "PFC feature is %ssynced", ff->ff_pfc_info.syncd ? "" : "not "); FCM_LOG_DEV_DBG(ff, "PFC operating mode is %s", ff->ff_pfc_info.op_mode ? "on" : "off "); break; case FCD_GET_APP_OPER: if (dcb_rsp_parser(ff, resp) || !ff->ff_app_info.syncd) fcm_dcbd_state_set(ff, FCD_ERROR); else fcm_dcbd_state_set(ff, FCD_DONE); FCM_LOG_DEV_DBG(ff, "FCoE feature is %ssynced", ff->ff_app_info.syncd ? "" : "not "); FCM_LOG_DEV_DBG(ff, "FCoE operating mode is %s", ff->ff_app_info.op_mode ? "on" : "off "); break; default: break; } } } /* * Handle command response. * Response buffer points past command code character in response. */ static void fcm_dcbd_cmd_resp(char *resp, cmd_status st) { struct fcm_netif *ff; u_int32_t ver; u_int32_t cmd; u_int32_t feature; u_int32_t subtype; u_int32_t state; char *ep; char *cp; size_t len; resp += CLIF_RSP_OFF; len = strlen(resp); ver = fcm_get_hex(resp + DCB_VER_OFF, DCB_VER_LEN, &ep); if (ep != NULL) { FCM_LOG("parse error: resp %s", resp); return; } else if (ver != CLIF_RSP_VERSION) { FCM_LOG("unexpected version %d resp %s", ver, resp); return; } cmd = fcm_get_hex(resp + DCB_CMD_OFF, DCB_CMD_LEN, &ep); if (ep != NULL) { FCM_LOG("parse error on resp cmd: resp %s", resp); return; } feature = fcm_get_hex(resp + DCB_FEATURE_OFF, DCB_FEATURE_LEN, &ep); if (ep != NULL) { FCM_LOG("parse error on resp feature: resp %s", resp); return; } subtype = fcm_get_hex(resp + DCB_SUBTYPE_OFF, DCB_SUBTYPE_LEN, &ep); if (ep != NULL) { FCM_LOG("parse error on resp subtype: resp %s", resp); return; } cp = resp; ff = fcm_dcbd_get_port(&cp, DCB_PORTLEN_OFF, DCB_PORTLEN_LEN, len); if (ff == NULL) { FCM_LOG("port not found. resp %s", resp); return; } /* * check that dcbd response matches the current dcbd state. */ state = ff->ff_dcbd_state; if (((cmd == CMD_GET_CONFIG) && ((state == FCD_GET_DCB_STATE && feature == FEATURE_DCB) || (state == FCD_GET_PFC_CONFIG && feature == FEATURE_PFC) || (state == FCD_GET_APP_CONFIG && feature == FEATURE_APP))) || ((cmd == CMD_GET_OPER) && ((state == FCD_GET_PFC_OPER && feature == FEATURE_PFC) || (state == FCD_GET_APP_OPER && feature == FEATURE_APP)))) { /* the response matches the current pending query */ ff->response_pending = 0; if (st != cmd_success) { fcm_dcbd_state_set(ff, FCD_ERROR); return; } } switch (cmd) { case CMD_SET_CONFIG: fcm_dcbd_set_config(ff); break; case CMD_GET_CONFIG: fcm_dcbd_get_config(ff, resp); break; case CMD_GET_OPER: fcm_dcbd_get_oper(ff, resp, cp); break; default: FCM_LOG_DEV_DBG(ff, "Unknown cmd 0x%x in response: resp %s", cmd, resp); break; } } /* * Handle incoming DCB event message. * Example message: E5104eth8050001 */ static void fcm_dcbd_event(char *msg, size_t len) { struct fcm_netif *ff; struct fcoe_port *p; u_int32_t feature; u_int32_t subtype; char *cp; char *ep; if (msg[EV_LEVEL_OFF] != MSG_DCB + '0' || len <= EV_PORT_ID_OFF) return; if (msg[EV_VERSION_OFF] != CLIF_EV_VERSION + '0') { FCM_LOG("Unexpected version in event msg %s", msg); return; } cp = msg; ff = fcm_dcbd_get_port(&cp, EV_PORT_LEN_OFF, EV_PORT_LEN_LEN, len); if (ff == NULL) return; feature = fcm_get_hex(cp + EV_FEATURE_OFF, 2, &ep); if (ep != NULL) { FCM_LOG_DEV_DBG(ff, "Invalid feature code in event msg %s", msg); return; } /* * Check if the FCoE ports which use the interface on which the * dcbd event arrived are configured to require dcb. */ p = fcm_find_fcoe_port(ff->ifname, FCP_REAL_IFNAME); while (p) { if (p->dcb_required && p->last_msg_type != RTM_DELLINK) break; p = fcm_find_next_fcoe_port(p, ff->ifname); } /* * dcb is not required or link was removed, ignore dcbd event */ if (!p) return; if (ff->ff_operstate != IF_OPER_UP) return; switch (feature) { case FEATURE_PG: /* 'E5204eth2020001' */ FCM_LOG_DEV_DBG(ff, "\n"); break; case FEATURE_PFC: /* 'E5204eth2030011' */ FCM_LOG_DEV_DBG(ff, "\n"); fcm_dcbd_state_set(ff, FCD_GET_DCB_STATE); break; case FEATURE_APP: /* 'E5204eth2050011' */ FCM_LOG_DEV_DBG(ff, "\n"); subtype = fcm_get_hex(cp + EV_SUBTYPE_OFF, 2, &ep); if (subtype != APP_FCOE_STYPE) { FCM_LOG_DEV_DBG(ff, "Unknown application subtype " "in msg %s", msg); break; } fcm_dcbd_state_set(ff, FCD_GET_DCB_STATE); break; default: FCM_LOG_DEV_DBG(ff, "Unknown feature 0x%x in msg %s", feature, msg); break; } if (fcoe_config.debug) { if (cp[EV_OP_MODE_CHG_OFF] == '1') FCM_LOG_DEV_DBG(ff, "Operational mode changed"); if (cp[EV_OP_CFG_CHG_OFF] == '1') FCM_LOG_DEV_DBG(ff, "Operational config changed"); } return; } /* * Run script to enable or disable the interface or print a message. * * Input: enable = 0 Destroy the FCoE interface * enable = 1 Create the FCoE interface * enable = 2 Reset the interface */ static void fcm_fcoe_action(struct fcm_netif *ff, struct fcoe_port *p) { char *op, *debug, *syslog = NULL; char *qos_arg; char qos[64]; u_int32_t mask; int rc; int fd; qos_arg = "--qos-enable"; switch (p->action) { case FCP_CREATE_IF: if (p->last_action == FCP_CREATE_IF) return; op = "--create"; break; case FCP_DESTROY_IF: if (p->last_action == FCP_DESTROY_IF) return; op = "--destroy"; qos_arg = "--qos-disable"; break; case FCP_RESET_IF: op = "--reset"; break; default: return; break; } p->last_action = p->action; if (p->action && !ff->ff_qos_mask) return; if (fcm_dcbd_cmd == NULL) { FCM_LOG_DEV_DBG(ff, "Should %s per op state", op); return; } /* * XXX should wait for child status */ rc = fork(); if (rc < 0) { FCM_LOG_ERR(errno, "fork error"); } else if (rc == 0) { /* child process */ for (fd = ulimit(4 /* __UL_GETOPENMAX */ , 0); fd > 2; fd--) close(fd); snprintf(qos, sizeof(qos), "%s", "0"); mask = ff->ff_qos_mask; if (mask) { int off = 0; char *sep = ""; u_int32_t bit; while (mask != 0 && off < sizeof(qos) - 1) { bit = ffs(mask) - 1; off += snprintf(qos + off, sizeof(qos) - off, "%s%u", sep, bit); mask &= ~(1 << bit); sep = ","; } } if (fcoe_config.use_syslog) syslog = "--syslog"; if (fcoe_config.debug) { debug = "--debug"; if (!p->action) FCM_LOG_DEV_DBG(ff, "%s %s %s\n", fcm_dcbd_cmd, op, syslog); else FCM_LOG_DEV_DBG(ff, "%s %s %s %s %s\n", fcm_dcbd_cmd, op, qos_arg, qos, syslog); } rc = fork(); if (rc < 0) FCM_LOG_ERR(errno, "fork error"); else if (rc == 0) { /* child process */ execlp(fcm_dcbd_cmd, fcm_dcbd_cmd, "--fcoeif", p->ifname, op, "--netif", p->real_ifname, qos_arg, qos, debug, syslog, (char *)NULL); } exit(1); } else wait(NULL); } /* * Called for all ports. For FCoE ports and candidates, * get information and send to dcbd. */ static void fcm_netif_advance(struct fcm_netif *ff) { char buf[80], params[30]; int old_qos_mask; ASSERT(ff); ASSERT(fcm_clif); if (fcm_clif->cl_busy) return; if (ff->response_pending) return; if (sa_timer_active(&ff->dcbd_retry_timer)) return; switch (ff->ff_dcbd_state) { case FCD_INIT: case FCD_ERROR: break; case FCD_GET_DCB_STATE: snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s", DCB_CMD, CLIF_RSP_VERSION, CMD_GET_CONFIG, FEATURE_DCB, 0, (u_int) strlen(ff->ifname), ff->ifname); ff->response_pending = fcm_dcbd_request(buf); break; case FCD_SEND_CONF: snprintf(params, sizeof(params), "%x1%x02%2.2x", ff->ff_app_info.enable, ff->ff_app_info.willing, ff->ff_qos_mask); snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s", DCB_CMD, CLIF_RSP_VERSION, CMD_SET_CONFIG, FEATURE_APP, APP_FCOE_STYPE, (u_int) strlen(ff->ifname), ff->ifname, params); ff->response_pending = fcm_dcbd_request(buf); break; case FCD_GET_PFC_CONFIG: snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s", DCB_CMD, CLIF_RSP_VERSION, CMD_GET_CONFIG, FEATURE_PFC, 0, (u_int) strlen(ff->ifname), ff->ifname, ""); ff->response_pending = fcm_dcbd_request(buf); break; case FCD_GET_APP_CONFIG: snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s", DCB_CMD, CLIF_RSP_VERSION, CMD_GET_CONFIG, FEATURE_APP, APP_FCOE_STYPE, (u_int) strlen(ff->ifname), ff->ifname, ""); ff->response_pending = fcm_dcbd_request(buf); break; case FCD_GET_PFC_OPER: snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s", DCB_CMD, CLIF_RSP_VERSION, CMD_GET_OPER, FEATURE_PFC, 0, (u_int) strlen(ff->ifname), ff->ifname, ""); ff->response_pending = fcm_dcbd_request(buf); break; case FCD_GET_APP_OPER: snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s", DCB_CMD, CLIF_RSP_VERSION, CMD_GET_OPER, FEATURE_APP, APP_FCOE_STYPE, (u_int) strlen(ff->ifname), ff->ifname, ""); ff->response_pending = fcm_dcbd_request(buf); break; case FCD_GET_PEER: snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s", DCB_CMD, CLIF_RSP_VERSION, CMD_GET_PEER, FEATURE_APP, APP_FCOE_STYPE, (u_int) strlen(ff->ifname), ff->ifname, ""); ff->response_pending = fcm_dcbd_request(buf); break; case FCD_DONE: /* keep qos_mask and see if it changed */ old_qos_mask = ff->ff_qos_mask; switch (validate_dcbd_info(ff)) { case FCP_DESTROY_IF: fcp_action_set(ff->ifname, FCP_DESTROY_IF); fcm_dcbd_state_set(ff, FCD_INIT); break; case FCP_CREATE_IF: if (!old_qos_mask) { FCM_LOG_DEV_DBG(ff, "Initial QOS = 0x%x\n", ff->ff_qos_mask); fcp_action_set(ff->ifname, FCP_CREATE_IF); } else if (old_qos_mask == ff->ff_qos_mask) { fcp_action_set(ff->ifname, FCP_CREATE_IF); } else { FCM_LOG_DEV_DBG(ff, "QOS changed to 0x%x\n", ff->ff_qos_mask); fcp_action_set(ff->ifname, FCP_RESET_IF); } fcm_dcbd_state_set(ff, FCD_INIT); break; case FCP_ERROR: if (ff->dcbd_retry_cnt < DCBD_MAX_REQ_RETRIES) { fcm_dcbd_state_set(ff, FCD_ERROR); } else { fcp_action_set(ff->ifname, FCP_DESTROY_IF); fcm_dcbd_state_set(ff, FCD_INIT); } break; case FCP_WAIT: default: break; } break; default: break; } } /* * Run through these steps at the end of each select loop. * 1. Process list of network interfaces * - issue next dcbd query action * - if query sequence is complete - update FCoE port objects * as necessary with a CREATE or DESTROY next action. * 2. Process FCoE port list - handle next actions, update states, clean up */ static void fcm_handle_changes() { struct fcm_netif *ff; struct fcoe_port *p; int i; /* * Perform pending actions (dcbd queries) on network interfaces. */ TAILQ_FOREACH(ff, &fcm_netif_head, ff_list) fcm_netif_advance(ff); /* * Perform actions on FCoE ports */ i = 0; p = fcoe_config.port; while (p) { ff = fcm_netif_lookup(p->real_ifname); if (!ff) goto next_port; fcm_fcoe_action(ff, p); p->action = FCP_WAIT; next_port: p = p->next; } } static void fcm_usage(void) { printf("%s\n", fcoemon_version); printf("Usage: %s\n" "\t [-e|--exec ]\n" "\t [-f|--foreground]\n" "\t [-d|--debug]\n" "\t [-s|--syslog]\n" "\t [-v|--version]\n" "\t [-h|--help]\n\n", progname); exit(1); } static void fcm_sig(int sig) { fcm_dcbd_shutdown(); sa_select_exit(); } static void fcm_pidfile_create(void) { FILE *fp; char buf[100]; char *sp; int pid; int rc; fp = fopen(fcm_pidfile, "r+"); if (fp) { sp = fgets(buf, sizeof(buf), fp); pid = atoi(sp); rc = kill(pid, 0); if (sp && (pid > 0) && !rc) { FCM_LOG("Another instance" " (pid %d) is running - exiting\n", pid); exit(1); } fclose(fp); } fp = fopen(fcm_pidfile, "w+"); if (fp) { fprintf(fp, "%d\n", getpid()); fclose(fp); } } int main(int argc, char **argv) { struct sigaction sig; int fcm_fg = 0; int rc; int c; memset(&fcoe_config, 0, sizeof(fcoe_config)); strncpy(progname, basename(argv[0]), sizeof(progname)); sa_log_prefix = progname; sa_log_flags = 0; openlog(sa_log_prefix, LOG_CONS, LOG_DAEMON); while ((c = getopt_long(argc, argv, "fde:hv", fcm_options, NULL)) != -1) { switch (c) { case 'f': fcm_fg = 1; case 'd': fcoe_config.debug = 1; break; case 's': fcoe_config.use_syslog = 1; enable_syslog(1); break; case 'e': fcm_dcbd_cmd = optarg; break; case 'v': printf("%s\n", fcoemon_version); return 0; case 'h': default: fcm_usage(); break; } } if (argc != optind) fcm_usage(); if (!fcm_fg) { pid_t pid, sid; pid = fork(); if (pid < 0) { FCM_LOG("Starting daemon failed"); exit(EXIT_FAILURE); } else if (pid) exit(EXIT_SUCCESS); /* Create a new SID for the child process */ sid = setsid(); if (sid < 0) exit(EXIT_FAILURE); } umask(0); /* Change the current working directory */ if ((chdir("/")) < 0) exit(EXIT_FAILURE); /* * Set up for signals. */ memset(&sig, 0, sizeof(sig)); sig.sa_handler = fcm_sig; rc = sigaction(SIGINT, &sig, NULL); if (rc < 0) { FCM_LOG_ERR(errno, "sigaction failed"); exit(1); } rc = sigaction(SIGTERM, &sig, NULL); if (rc < 0) { FCM_LOG_ERR(errno, "sigaction failed"); exit(1); } rc = sigaction(SIGHUP, &sig, NULL); if (rc < 0) { FCM_LOG_ERR(errno, "sigaction failed"); exit(1); } fcm_pidfile_create(); fcm_fcoe_init(); fcm_link_init(); /* NETLINK_ROUTE protocol */ fcm_dcbd_init(); sa_select_set_callback(fcm_handle_changes); rc = sa_select_loop(); if (rc < 0) { FCM_LOG_ERR(rc, "select error\n"); exit(EXIT_FAILURE); } fcm_dcbd_shutdown(); fcm_cleanup(); return 0; } /******************************************************* * The following are debug routines * *******************************************************/ static void add_msg_to_buf(char *buf, int maxlen, char *msg, char *prefix) { int len = strlen(buf); if (len + strlen(msg) + strlen(prefix) < maxlen) sprintf(buf+len, "%s%s", prefix, msg); } static void print_errors(int errors) { char msg[256]; int cnt = 0; memset(msg, 0, sizeof(msg)); sprintf(msg, "0x%02x - ", errors); if (errors & 0x01) add_msg_to_buf(msg, sizeof(msg), "mismatch with peer", (cnt++) ? ", " : ""); if (errors & 0x02) add_msg_to_buf(msg, sizeof(msg), "local configuration error", (cnt++) ? ", " : ""); if (errors & 0x04) add_msg_to_buf(msg, sizeof(msg), "multiple TLV's received", (cnt++) ? ", " : ""); if (errors & 0x08) add_msg_to_buf(msg, sizeof(msg), "peer error", (cnt++) ? ", " : ""); if (errors & 0x10) add_msg_to_buf(msg, sizeof(msg), "multiple LLDP neighbors", (cnt++) ? ", " : ""); if (errors & 0x20) add_msg_to_buf(msg, sizeof(msg), "peer feature not present", (cnt++) ? ", " : ""); if (!errors) add_msg_to_buf(msg, sizeof(msg), "none", ""); FCM_LOG("%s\n", msg); } fcoe-utils-1.0.9/debug/0000755000175000017500000000000011312505503013630 5ustar chuckchuckfcoe-utils-1.0.9/debug/dcbcheck.sh0000755000175000017500000000344311312505503015721 0ustar chuckchuck#!/bin/bash # $1 = ethX # return 0 on success # return 1 on failure IFNAME=$1 if [ -r /proc/net/vlan/$IFNAME ] ; then PHYSDEV=$(grep '^Device:' /proc/net/vlan/$IFNAME | awk '{print $2}') else PHYSDEV=$IFNAME fi ret=0 # check for DCB netlink symbols if ! grep -q "\bdcbnl_init\b" /proc/kallsyms ; then echo "DCB Netlink symbols not found in the kernel." >&2 echo "Please re-compile the kernel with CONFIG_DCB=y." >&2 exit 1 fi # Ensure that a value was passed in for the interface name if [ "${IFNAME}" == "" ] ; then echo "Please provide the interface name to check." >&2 exit 1 fi # Ensure that the interface name provided is valid if ifconfig ${IFNAME} 2>&1 | grep -q "Device not found" ; then echo "Please provide a valid interface name." >&2 exit 1 fi # Determine if we can communicate with DCBD if dcbtool gc ${PHYSDEV} dcb | grep Status | grep -q Failed ; then echo "Unable to communicate with the DCB daemon (dcbd) or DCB capable driver." >&2 exit 1 fi # Determine if DCB is on if dcbtool gc ${PHYSDEV} dcb | grep 'DCB State' | grep -q off ; then echo "DCB is not on, execute the following command to turn it on" >&2 echo "dcbtool sc ${PHYSDEV} dcb on" >&2 ret=1 fi # Determine if PFC is enabled if dcbtool gc ${PHYSDEV} pfc | grep Enable | grep -q false ; then echo "PFC is not enabled, execute the following command to turn it on" >&2 echo "dcbtool sc ${PHYSDEV} pfc e:1" >&2 ret=1 fi # Determine if the FCoE APP TLV is enabled if dcbtool gc ${PHYSDEV} app:fcoe | grep Enable | grep -q false ; then echo "The FCoE APP TLV is not enabled, execute the following command to turn it on" >&2 echo "dcbtool sc ${PHYSDEV} app:fcoe e:1" >&2 ret=1 fi if [ ${ret} -eq 0 ] ; then echo "DCB is correctly configured for FCoE" fi exit ${ret} fcoe-utils-1.0.9/debug/fcc.sh0000755000175000017500000002027411312505503014727 0ustar chuckchuck#! /bin/bash # # Copyright 2008-2009 Cisco Systems, Inc. All rights reserved. # # This program is free software; you may redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # # Author: Joe Eykholt (jeykholt at cisco dot com) # # Please send comments and changes to jeykholt at cisco dot com VERSION="fcc v1.0.2 10/07/2009" fcoe_dir=/sys/module/fcoe fdir=/sys/class/fc_host sdir=/sys/class/scsi_host cmdname=`basename $0` usage() { cat < [ ...]]' cmd: create Start FCoE on an ethernet interface. delete / del Delete an FCoE instance destroy Same as destroy enable / en Same as create help Show this usage message info Show HBA detailed info list List the HBAs with remote port and LUN status luns Show LUN list and status stats Show HBA statistics reset Reset the HBA version Show version USAGE } verify_hba() { local x=$1 if [ ! -d $fdir/$x ] then echo "$cmdname: invalid HBA name $x" >&2 exit fi } hba_stats() { local x=$1 local y verify_hba $x printf "\n$x Statistics:\n" ( cd $fdir/$x/statistics for y in * do # # avoid the write-only files. # test -r doesn't help if we're root # if [ "$y" == "reset_statistics" ] then continue fi val=`cat $y` if [ "$val" != 0xffffffffffffffff ] then printf "%-30s%8lld\n" $y: $val fi done ) } # # format a /sys file containing a hex WWN or FC_ID # from 0x123456\n to 12:34:56 or from 0xffffffff to - (unknown WWN or FC_ID) # fmt_hex() { sed -e 's/^0xff*$/-/' -e 's/0x//' -e 's/../&:/g' -e 's/:$//' < $1 } rport_list() { local x local hba=$1 rdir=/sys/class/fc_remote_ports host=`echo $hba | sed -e 's/host//'` rports=`ls -d $rdir/rport-$host:* 2>/dev/null` if [ -z "$rports" ] then return fi printf "\n$hba Remote Ports:\n" fmt="%-8s %-23s %-8s %-8s %-15s\n" printf "$fmt" Path "Port Name" "Port ID" State Roles for x in $rports do btl="`echo $x | sed -e 's/.*-\(.*-.*\)/\1/'`" printf "$fmt" "$btl" \ "`fmt_hex $x/port_name`" \ "`fmt_hex $x/port_id`" \ "`cat $x/port_state`" \ "`cat $x/roles`" done } # # Translate capacity to readable units. # compute sizes in base-10 marketing units # lun_cap() { local sizek=0 sizem=0 sizeg=0 sizet=0 local size local onek=1000 local cap size=$1 let sizek="$size * 512 / $onek" let sizem="$sizek / $onek" let sizeg="$sizem / $onek" let sizet="$sizeg / $onek" if [ "$sizet" -gt 0 ] then cap="$sizet TB" elif [ "$sizeg" -gt 0 ] then cap="$sizeg GB" elif [ "$sizem" -gt 0 ] then cap="$sizem MB" else cap="$sizek KB" fi echo $cap } lun_list() { local x local lun local hba=$1 local ddir=/sys/class/scsi_device host=`echo $hba | sed -e 's/host//'` local luns=`(cd $ddir && ls -d $host:*) 2>/dev/null` if [ -z "$luns" ] then return fi printf "\n$hba LUNs:\n" fmt="%-10s %-8s %6s %-15s %-20s %-8s\n" printf "$fmt" Path Device Size Vendor Model State for lun in $luns do ( local size=0 cap=- cd $ddir/$lun/device if [ -d block ] then dev=`ls block | tail -1` size=`cat block/$dev/size` cap=`lun_cap $size` elif [ -d char ] then dev=`ls char | tail -1` cap=- elif [ -d scsi_tape ] then dev=`ls scsi_tape | egrep '^st[0-9]*$'` cap=- elif [ -d scsi_generic ] then dev=`ls scsi_generic | tail -1` cap=- else dev="`ls -d block:* char:* 2>/dev/null | sed -e 's/.*\://'`" if [ -L block:$dev -o -d block:$dev ] then size=`cat block:$dev/size` cap=`lun_cap $size` fi fi printf "$fmt" "$lun" "$dev" "$cap"\ "`cat vendor`" \ "`cat model`" \ "`cat state`" ) done } sym_name() { local hba=$1 local file file=$fdir/$hba/symbolic_name if [ -f "$file" ] then sed -e 's/.*over //' < $file else exit 1 fi } # # Lookup the host name for a given symbolic name # hba_name() { local sym=$1 local hba if [ -d "$fdir/$sym" ] then echo $sym exit fi for hba in $all_hbas do if [ "`sym_name $hba`" = "$sym" ] then echo $hba exit fi done exit 1 } hba_state() { local x echo "FC HBAs:" fmt="%-8s %-23s %-8s %-8s %-15s\n" printf "$fmt" HBA "Port Name" "Port ID" State Device for x in $hbas do ( cd $fdir/$x printf "$fmt" "$x" \ "`fmt_hex $fdir/$x/port_name`" \ "`fmt_hex $fdir/$x/port_id`" \ "`cat $fdir/$x/port_state`" \ "`sym_name $x`" ) 2>/dev/null done } hba_info() { local x=`hba_name $1` local fmt="\t%-20s %s\n" verify_hba $x printf "\n$x Info:\n" ( cd $fdir/$x printf "$fmt" "Symbolic Name" "`cat symbolic_name`" printf "$fmt" "Port Name" "`fmt_hex port_name`" printf "$fmt" "Node Name" "`fmt_hex node_name`" printf "$fmt" "Port Type" "`cat port_type`" echo printf "$fmt" "Port State" "`cat port_state`" printf "$fmt" "Port ID" "`fmt_hex port_id`" printf "$fmt" "Fabric Name" "`fmt_hex fabric_name`" echo printf "$fmt" "Max Frame Size" "`cat maxframe_size`" printf "$fmt" "Speed" "`cat speed`" echo ) } scsi_state() { local x local dev printf "\nSCSI States:\n" fmt="%-8s %-10s %-15s %-10s %8s\n" printf "$fmt" HBA Device Mode State Busy for x in $scsi_hbas do ( cd $fdir/$x dev="`cat $sdir/$x/proc_name``cat $sdir/$x/unique_id`" printf "$fmt" "$x" "$dev" \ "`cat $sdir/$x/active_mode`" \ "`cat $sdir/$x/state`" \ "`cat $sdir/$x/host_busy`" ) 2>/dev/null done } hba_list() { local x hba_state # scsi_state for x in $hbas do rport_list $x lun_list $x done } # # Do a command for a list of arguments # repeat() { local cmd=$1 local x shift for x do $cmd $x done } fcoe_ctl() { local hba=$1 local cmd=$2 local file=$fcoe_dir/parameters/$2 local old_file=$fcoe_dir/$2 if [ -w "$old_file" ] then file=$old_file fi if [ -w "$file" ] then echo $hba > $file elif [ -f "$file" ] then echo "$cmdname: no permission to $cmd $hba" >&2 else echo "$cmdname: file $file doesn't exist. " \ "Check for fcoe module." >&2 fi } fc_host_ctl() { local hba=$1 local cmd=$2 local value=$3 local file local dir dir=$fdir/$hba if [ ! -d "$dir" ] then dir=$fdir/`hba_name $hba` if [ $? != 0 ] then echo "$cmdname: hba $hba not found" >&2 exit 1 fi fi file=$dir/$cmd if [ -w "$file" ] then echo $value > $file elif [ -f "$file" ] then echo "$cmdname: no permission to $cmd $hba" 1>&2 exit 2 else echo "$cmdname: $cmd not supported for $hba" 1>&2 exit 2 fi } # # Start of main script code. # scsi_hbas= if [ -d "$sdir" ] then scsi_hbas=`ls $sdir 2>/dev/null` fi if [ -d "$fdir" ] then all_hbas=`ls $fdir 2>/dev/null` fi hbas="$all_hbas" if [ $# -lt 1 ] then hba_list exit 0 fi if [ $# -lt 2 ] then cmd=$1 hba_spec=no else cmd=$1 hba=$2 shift if [ $# -eq 0 ] then hba_spec=n elif [ $# -eq 1 -a "$1" = all ] then hba_spec=y else hba_spec=y hbas="$@" scsi_hbas="$@" fi fi case "$cmd" in create | enable | en) if [ ! -d $fcoe_dir ] then modprobe fcoe echo "$cmdname: loading fcoe module" >&2 sleep 1 if [ ! -d $fcoe_dir ] then echo "$cmdname: $fcoe_dir not found" >&2 exit 2 fi fi fcoe_ctl $hba create ;; delete | del | destroy) if [ ! -d $fcoe_dir ] then echo "$cmdname: $fcoe_dir not found" >&2 exit 2 fi fcoe_ctl $hba destroy ;; info) repeat hba_info $hbas ;; list) hba_list ;; lun*) repeat lun_list $hbas ;; names) repeat echo $hbas ;; stat*) repeat hba_stats $hbas ;; realname) hba_name $hba ;; reset) if [ "$hba_spec" != y ] then echo "$cmdname: reset requires hba name" >&2 exit 2 fi for hba in $hbas do (fc_host_ctl $hba issue_lip 1 && echo "reset $hba") || break done ;; version) echo $VERSION ;; *) usage ;; esac fcoe-utils-1.0.9/debug/fcoedump.sh0000755000175000017500000000567111312505503016002 0ustar chuckchuck############################################################################### # # fcoe_debug: print debugging information for fcoe # $1: interface ############################################################################### if [ -z $1 ]; then echo "Usage: `basename $0` eth[0-9]" exit 1; fi DEVICE=$1 if [ -r /proc/net/vlan/$DEVICE ] ; then PHYSDEV=$(grep '^Device:' /proc/net/vlan/$DEVICE | awk '{print $2}') else PHYSDEV=$DEVICE fi kernel_info () { echo -e "\n###KERNEL INFO###" uname -a } system_info () { echo -e "\n###System Info###" echo -e "#lsscsi:" lsscsi echo -e "#lspci:" lspci echo -e "#check symbols:" grep dcbnl_init /proc/kallsyms grep fcoe /proc/kallsyms } adapter_info () { if [ $DEVICE != $PHYSDEV ] then echo -e "\n###Adapter INFO VLAN $DEVICE" echo -e "#ethtool:" ethtool $DEVICE echo -e "#ethtool interface:" ethtool -i $DEVICE echo -e "#ethtool offloads:" ethtool -k $DEVICE echo -e "#ifconfig:" ifconfig $DEVICE fi echo -e "\n###Adapter INFO $PHYSDEV" echo -e "#ethtool:" ethtool $PHYSDEV echo -e "#ethtool interface:" ethtool -i $PHYSDEV echo -e "#ethtool pause:" ethtool -a $PHYSDEV echo -e "#ethtool offloads:" ethtool -k $PHYSDEV echo -e "#ethtool stats:" ethtool -S $PHYSDEV echo -e "#ifconfig:" ifconfig $PHYSDEV } dcb_info () { echo -e "\n###DCB INFO" echo -e "#tc config" tc qdisc tc filter show dev $PHYSDEV | grep -v filter echo -e "#service dcbd status:" service dcbd status echo -e "\n########## Showing dcb for $PHYSDEV" dcbtool -v dcbtool gc $PHYSDEV dcb echo -e "\n########## Getting dcb config for $PHYSDEV" dcbtool gc $PHYSDEV pg echo dcbtool gc $PHYSDEV pfc echo dcbtool gc $PHYSDEV app:0 echo dcbtool gc $PHYSDEV ll:0 echo -e "\n########## Getting dcb oper for $PHYSDEV" dcbtool go $PHYSDEV pg echo dcbtool go $PHYSDEV pfc echo dcbtool go $PHYSDEV app:0 echo dcbtool go $PHYSDEV ll:0 echo -e "\n########## Getting dcb peer for $PHYSDEV" dcbtool gp $PHYSDEV pg echo dcbtool gp $PHYSDEV pfc echo dcbtool gp $PHYSDEV app:0 echo dcbtool gp $PHYSDEV ll:0 } fcoe_info () { echo -e "\n###FCOE Info" echo -e "#service fcoe status" service fcoe status echo -e "#fcoeadm output " fcoeadm -v echo -e "#fcoeadm -i " fcoeadm -i echo -e "#fcoeadm -t " fcoeadm -t } sysfs_dump () { echo -e "###SYSFS dump" echo -e "#sysfs fc_host dump" find /sys/class/fc_host/host*/ -type f -print -exec cat '{}' \; echo -e "#sysfs fc_transport dump" find /sys/class/fc_transport/target*/ -type f -print -exec cat '{}' \; echo -e "#sysfs fc_remote_ports dump" find /sys/class/fc_remote_ports/*/ -type f -print -exec cat '{}' \; echo -e "#sysfs fc_vport dump" find /sys/class/fc_vports/*/ -type f -print -exec cat '{}' \; } logfile_dump() { echo "###LOGFILES" echo "#/var/log/messages" cat /var/log/messages echo echo "#dmesg" dmesg } fcoe_debug () { kernel_info system_info adapter_info dcb_info fcoe_info sysfs_dump logfile_dump } fcoe_debug fcoe-utils-1.0.9/build.sh0000755000175000017500000000160111312505503014176 0ustar chuckchuck#!/bin/sh # This script parses the package name and version out of configure.ac, # uses them to assemble the names of the distribution tar.gz and source rpm, # then calls make to generate those files. # Any arguments will be passed on to configure when building the tarball. AC_INIT=`grep AC_INIT configure.ac` PACKAGE=`echo ${AC_INIT} | awk 'BEGIN { FS="[][]" }; { print $2 };'` VERSION=`echo ${AC_INIT} | awk 'BEGIN { FS="[][]" }; { print $4 };'` tgz=${PACKAGE}-${VERSION}.tar.gz srpm=${PACKAGE}-${VERSION}-1.src.rpm rm -f ${tgz} ${srpm} make -f - < #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "hbaapi.h" #include "net_types.h" #include "fc_types.h" #include "fc_scsi.h" #define __USE_GNU #include #define FCOE_MAX_LUN 255 struct opt_info { char ifname[IFNAMSIZ]; char a_flag; char t_flag; char l_flag; char l_fcid_present; HBA_UINT32 l_fcid; char l_lun_id_present; u_int32_t l_lun_id; char s_flag; char n_flag; #define DEFAULT_STATS_INTERVAL 1 int n_interval; /* seconds */ }; extern struct opt_info *opt_info; extern char build_date[]; extern void display_adapter_info(struct opt_info *opt_info); extern void display_target_info(struct opt_info *opt_info); extern void display_port_stats(struct opt_info *opt_info); #endif /* _FCOEADM_H_ */ fcoe-utils-1.0.9/missing0000755000175000017500000002623311336572515014164 0ustar chuckchuck#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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, 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: fcoe-utils-1.0.9/log.c0000644000175000017500000000353711312505503013477 0ustar chuckchuck/* * Copyright(c) 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Maintained at www.Open-FCoE.org */ #include #include #include #include static int log_syslog; static int log_debug_level; static char log_prefix[256]; void log_start(char *program, int daemon, int level) { log_syslog = daemon; log_debug_level = level; strncpy(log_prefix, program, 256); log_prefix[255] = '\0'; if (log_syslog) openlog(log_prefix, 0, LOG_DAEMON); } void log_stop() { if (log_syslog) closelog(); } void do_log(int priority, const char *fmt, va_list ap) { if (log_syslog) vsyslog(priority, fmt, ap); else { printf("%s: ", log_prefix); vprintf(fmt, ap); printf("\n"); } } void log_debug(int level, char *fmt, ...) { va_list ap; if (log_debug_level >= level) { va_start(ap, fmt); do_log(LOG_DEBUG, fmt, ap); va_end(ap); } } void log_warn(char *fmt, ...) { va_list ap; va_start(ap, fmt); do_log(LOG_WARNING, fmt, ap); va_end(ap); } void log_err(char *fmt, ...) { va_list ap; va_start(ap, fmt); do_log(LOG_ERR, fmt, ap); va_end(ap); } void _log_errno(const char *func, char *call, int errnum) { log_err("%s %s: %s", func, call, strerror(errnum)); } fcoe-utils-1.0.9/fcoeadm.c0000644000175000017500000003047211312505503014312 0ustar chuckchuck/* * Copyright(c) 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Maintained at www.Open-FCoE.org */ #include #include #include #include #include #include #include "fcoe_utils.h" #include "fcoeadm.h" static char *fcoeadm_version = "fcoeadm v" FCOE_UTILS_VERSION "\n Copyright (c) 2009, Intel Corporation.\n"; #define SYSFS_MOUNT "/sys" #define SYSFS_NET SYSFS_MOUNT "/class/net" #define SYSFS_FCHOST SYSFS_MOUNT "/class/fc_host" #define SYSFS_FCOE SYSFS_MOUNT "/module/fcoe/parameters" #define FCOE_CREATE SYSFS_FCOE "/create" #define FCOE_DESTROY SYSFS_FCOE "/destroy" #define FCHOSTBUFLEN 64 static struct option fcoeadm_opts[] = { {"create", 1, 0, 'c'}, {"destroy", 1, 0, 'd'}, {"reset", 1, 0, 'r'}, {"interface", 1, 0, 'i'}, {"target", 1, 0, 't'}, {"lun", 2, 0, 'l'}, {"stats", 1, 0, 's'}, {"help", 0, 0, 'h'}, {"version", 0, 0, 'v'}, {0, 0, 0, 0} }; struct opt_info _opt_info, *opt_info = &_opt_info; char progname[20]; static void fcoeadm_help(void) { printf("%s\n", fcoeadm_version); printf("Usage: %s\n" "\t [-c|--create] \n" "\t [-d|--destroy] \n" "\t [-r|--reset] \n" "\t [-i|--interface] []\n" "\t [-t|--target] []\n" "\t [-l|--lun] [ []]\n" "\t [-s|--stats] [-n ]\n" "\t [-v|--version]\n" "\t [-h|--help]\n\n", progname); } /* * Open and close to check if directory exists */ static int fcoeadm_checkdir(char *dir) { DIR *d = NULL; if (!dir) return -EINVAL; /* check if we have sysfs */ d = opendir(dir); if (!d) return -EINVAL; closedir(d); return 0; } /* * TODO - check this ifname before performing any action */ static int fcoeadm_check(char *ifname) { char path[256]; /* check if we have sysfs */ if (fcoeadm_checkdir(SYSFS_MOUNT)) { fprintf(stderr, "%s: Sysfs mount point %s not found!\n", progname, SYSFS_MOUNT); return -EINVAL; } /* check fcoe module */ if (fcoeadm_checkdir(SYSFS_FCOE)) { fprintf(stderr, "%s: Please make sure FCoE driver module is loaded!\n", progname); return -EINVAL; } /* check target interface */ if (!ifname) { fprintf(stderr, "%s: Invalid interface name!\n", progname); return -EINVAL; } sprintf(path, "%s/%s", SYSFS_NET, ifname); if (fcoeadm_checkdir(path)) { fprintf(stderr, "%s: Interface %s not found!\n", progname, ifname); return -EINVAL; } return 0; } /* * TODO - for now, this just writes to path */ static int fcoeadm_action(char *path, char *s) { FILE *fp = NULL; if (!path) return -EINVAL; if (!s) return -EINVAL; fp = fopen(path, "w"); if (!fp) { fprintf(stderr, "%s: Failed to open %s\n", progname, path); return -ENOENT; } if (EOF == fputs(s, fp)) fprintf(stderr, "%s: Failed to write %s to %s\n", progname, s, path); fclose(fp); return 0; } static char *fcoeadm_read(const char *path) { FILE *fp; char *buf; int size = 512; if (!path) return NULL; buf = malloc(size); if (!buf) return NULL; memset(buf, 0, size); fp = fopen(path, "r"); if (fp) { if (fgets(buf, size, fp)) { fclose(fp); return buf; } } fclose(fp); free(buf); return NULL; } static int fcoeadm_check_fchost(const char *ifname, const char *dname) { char *buf; char path[512]; if (!ifname) return -EINVAL; if (!dname) return -EINVAL; if (dname[0] == '.') return -EINVAL; sprintf(path, "%s/%s/symbolic_name", SYSFS_FCHOST, dname); buf = fcoeadm_read(path); if (!buf) return -EINVAL; if (!strstr(buf, ifname)) { free(buf); return -EINVAL; } free(buf); return 0; } static int fcoeadm_find_fchost(char *ifname, char *fchost, int len) { int n, dname_len; int found = 0; struct dirent **namelist; if (!ifname) return -EINVAL; if ((!fchost) || (len <= 0)) return -EINVAL; memset(fchost, 0, len); n = scandir(SYSFS_FCHOST, &namelist, 0, alphasort); if (n > 0) { while (n--) { /* check symbolic name */ if (!fcoeadm_check_fchost(ifname, namelist[n]->d_name)) { dname_len = strnlen(namelist[n]->d_name, len); if (dname_len != len) { /* * This assumes that d_name is always * NULL terminated. */ strncpy(fchost, namelist[n]->d_name, dname_len + 1); found = 1; } else { fprintf(stderr, "scsi_host (%s) is " "too large for a buffer that " "is only %d bytes large\n", namelist[n]->d_name, dname_len); free(namelist[n]); } } free(namelist[n]); } free(namelist); } return found; } /* * Create FCoE instance for this ifname */ static int fcoeadm_create(char *ifname) { if (fcoeadm_check(ifname)) { fprintf(stderr, "%s: Failed to create FCoE instance on %s!\n", progname, ifname); return -EINVAL; } return fcoeadm_action(FCOE_CREATE, ifname); } /* * Remove FCoE instance for this ifname */ static int fcoeadm_destroy(char *ifname) { if (fcoeadm_check(ifname)) { fprintf(stderr, "%s: Failed to destroy FCoE instance on %s!\n", progname, ifname); return -EINVAL; } return fcoeadm_action(FCOE_DESTROY, ifname); } /* * Validate an existing instance for an FC interface */ static int fcoeadm_validate_interface(char *ifname, char *fchost, int len) { if (!fcoeadm_find_fchost(ifname, fchost, len)) { fprintf(stderr, "%s: No fc_host found for %s\n", progname, ifname); return -EINVAL; } return 0; } /* * Reset the fc_host that is associated w/ this ifname */ static int fcoeadm_reset(char *ifname) { char fchost[FCHOSTBUFLEN]; char path[256]; if (fcoeadm_validate_interface(ifname, fchost, FCHOSTBUFLEN)) return -EINVAL; sprintf(path, "%s/%s/issue_lip", SYSFS_FCHOST, fchost); return fcoeadm_action(path, "1"); } /* * Parse a user-entered hex field. * Format may be xx-xx-xx OR xxxxxx OR xx:xx:xx for len bytes (up to 8). * Leading zeros may be omitted. */ static int parse_hex_ll(unsigned long long *hexp, const char *input, u_int len) { int i; unsigned long long hex = 0; unsigned long long byte; char *endptr = ""; int error = EINVAL; char sep = 0; for (i = 0; i < len; i++) { byte = strtoull(input, &endptr, 16); if (i == 0 && *endptr == '\0') { hex = byte; if (len == 8 || hex < (1ULL << (8 * len))) error = 0; break; } if (sep == 0 && (*endptr == ':' || *endptr == '-')) sep = *endptr; if ((*endptr == '\0' || *endptr == sep) && byte < 256) hex = (hex << 8) | byte; else break; input = endptr + 1; } if (i == len && *endptr == '\0') error = 0; if (error == 0) *hexp = hex; return error; } static int parse_fcid(HBA_UINT32 *fcid, const char *input) { int rc; unsigned long long hex; rc = parse_hex_ll(&hex, input, 3); if (rc == 0) *fcid = (HBA_UINT32) hex; return rc; } /* * Display adapter information */ static int fcoeadm_display_adapter_info(struct opt_info *opt_info) { HBA_STATUS retval; retval = HBA_LoadLibrary(); if (retval != HBA_STATUS_OK) { perror("HBA_LoadLibrary"); return -EINVAL; } display_adapter_info(opt_info); HBA_FreeLibrary(); return 0; } /* * Display target information */ static int fcoeadm_display_target_info(struct opt_info *opt_info) { HBA_STATUS retval; retval = HBA_LoadLibrary(); if (retval != HBA_STATUS_OK) { perror("HBA_LoadLibrary"); return -EINVAL; } display_target_info(opt_info); HBA_FreeLibrary(); return 0; } /* * Display port statistics */ static int fcoeadm_display_port_stats(struct opt_info *opt_info) { HBA_STATUS retval; if (!opt_info->s_flag) return -EINVAL; if (!opt_info->n_flag) opt_info->n_interval = DEFAULT_STATS_INTERVAL; retval = HBA_LoadLibrary(); if (retval != HBA_STATUS_OK) { perror("HBA_LoadLibrary"); return -EINVAL; } display_port_stats(opt_info); HBA_FreeLibrary(); return 0; } #define MAX_ARG_LEN 32 int main(int argc, char *argv[]) { char fchost[FCHOSTBUFLEN], *s; int opt, rc = -1; strncpy(progname, basename(argv[0]), sizeof(progname)); memset(opt_info, 0, sizeof(*opt_info)); while ((opt = getopt_long(argc, argv, "c:d:r:itls:n:hv", fcoeadm_opts, NULL)) != -1) { switch (opt) { case 'c': if ((argc < 2 || argc > 3) || strnlen(optarg, MAX_ARG_LEN) > (IFNAMSIZ - 1) || ((argc == 3) && strnlen(argv[1], MAX_ARG_LEN) > 2 && argv[1][1] != '-')) goto error; rc = fcoeadm_create(optarg); goto done; case 'd': if ((argc < 2 || argc > 3) || strnlen(optarg, MAX_ARG_LEN) > (IFNAMSIZ - 1) || ((argc == 3) && strnlen(argv[1], MAX_ARG_LEN) > 2 && argv[1][1] != '-')) goto error; rc = fcoeadm_destroy(optarg); goto done; case 'r': if ((argc < 2 || argc > 3) || strnlen(optarg, MAX_ARG_LEN) > (IFNAMSIZ - 1) || ((argc == 3) && strnlen(argv[1], MAX_ARG_LEN) > 2 && argv[1][1] != '-')) goto error; rc = fcoeadm_reset(optarg); goto done; case 'i': if (argc < 2 || argc > 3 || (argc == 3 && strnlen(argv[1], MAX_ARG_LEN) > 2 && (argv[1][1] != '-' || strchr(argv[1], '=') != NULL))) goto error; s = NULL; if (argc == 2) { if (argv[1][1] == '-') s = strchr(argv[1], '=')+1; else s = argv[1]+2; } else s = argv[2]; if (s) { if (strnlen(s, MAX_ARG_LEN) > (IFNAMSIZ - 1)) goto error; strncpy(opt_info->ifname, s, sizeof(opt_info->ifname)); } if (strnlen(opt_info->ifname, IFNAMSIZ - 1)) { if (fcoeadm_validate_interface( opt_info->ifname, fchost, FCHOSTBUFLEN)) goto done; } opt_info->a_flag = 1; rc = fcoeadm_display_adapter_info(opt_info); goto done; case 't': if (argc < 2 || argc > 3 || (argc == 3 && strnlen(argv[1], MAX_ARG_LEN) > 2 && (argv[1][1] != '-' || strchr(argv[1], '=') != NULL))) goto error; s = NULL; if (argc == 2) { if (argv[1][1] == '-') s = strchr(argv[1], '=')+1; else s = argv[1]+2; } else { s = argv[2]; } if (s) { if (strnlen(s, MAX_ARG_LEN) > (IFNAMSIZ - 1)) goto error; strncpy(opt_info->ifname, s, sizeof(opt_info->ifname)); } if (strnlen(opt_info->ifname, IFNAMSIZ - 1)) { if (fcoeadm_validate_interface( opt_info->ifname, fchost, FCHOSTBUFLEN)) goto done; } opt_info->t_flag = 1; rc = fcoeadm_display_target_info(opt_info); goto done; case 'l': if (argc < 2 || argc > 4) goto error; if (optarg) { if (parse_fcid(&opt_info->l_fcid, optarg)) goto error; opt_info->l_fcid_present = 1; if (argv[optind]) { opt_info->l_lun_id = atoi(argv[optind]); opt_info->l_lun_id_present = 1; } } opt_info->l_flag = 1; rc = fcoeadm_display_target_info(opt_info); goto done; case 's': if ((argc < 2 || argc > 5) || strnlen(optarg, MAX_ARG_LEN) > (IFNAMSIZ - 1)) goto error; if (optarg) strncpy(opt_info->ifname, optarg, sizeof(opt_info->ifname)); if (strnlen(opt_info->ifname, IFNAMSIZ - 1)) { if (fcoeadm_validate_interface( opt_info->ifname, fchost, FCHOSTBUFLEN)) goto done; } opt_info->s_flag = 1; if (argv[optind] && !strncmp(argv[optind], "-n", 2)) break; goto stats; case 'n': if (!opt_info->s_flag) goto error; opt_info->n_interval = atoi(optarg); if (opt_info->n_interval <= 0) goto error; if (argv[optind] && strnlen(argv[optind], MAX_ARG_LEN<<1) > MAX_ARG_LEN) goto error; opt_info->n_flag = 1; goto stats; case 'v': if (argc != 2) goto error; printf("%s\n", fcoeadm_version); goto done; case 'h': default: if (argc != 2) goto error; fcoeadm_help(); exit(-EINVAL); } } goto error; stats: if (!fcoeadm_display_port_stats(opt_info)) goto done; error: fprintf(stderr, "%s: Invalid command options!\n", progname); fcoeadm_help(); exit(-EINVAL); done: return rc; } fcoe-utils-1.0.9/QUICKSTART0000644000175000017500000000533111312505504014162 0ustar chuckchuckThis document is a quickstart guide for a user connected to a Fibre Channel Forwarder (FCF) and not a SW target. It covers the installation of Data Center Bridging (DCB), the HBA API wrapper library, libhbalinux and fcoe-utils. ## # Dependencies ############### git://open-fcoe.org/openfc/hbaapi_build.git git://open-fcoe.org/openfc/libhbalinux.git git://open-fcoe.org/openfc/fcoe-utils.git ## # DCB ####### DEPENDENCIES * autoconf * autotools * sysconftool * automake * libtool * gcc-c++ PROCESS 1) Obtain the source tarball from sourceforge http://sourceforge.net/project/shownotes.php?group_id=42302&release_id=605955 2) Untar the tarball and change into it's directory # tar -xvzf dcbd-x.y.z.tar.gz # cd dcbd-x.y.z/ 3) Ensure correct header files # pushd /usr/include/ # mv linux/ linux_orig/ # ln -s /include/linux/ linux # popd 3) Configure, make and make install # rpm --eval "%configure" | sh # make # make install ## # HBA API Wrapper Library ########################## DEPENDENCIES * autoconf * autotools * sysconftool * automake * libtool PROCESS 1) Obtain the source tarball from sourceforge http://sourceforge.net/projects/hbaapi/ 2) Untar the tarball and move its contents to hbaapi_build/ and change into its directory # tar -xvzf hbaapi_src_2.2.tgz # mv hbaapi_src_2.2/* hbaapi_build/ # rmdir hbaapi_src_2.2/ 3) Bootstrap, configure, make and make install # ./bootstrap.sh # rpm --eval "%configure" | sh # make # make install ## # libhbalinux ############## DEPENDENCIES * HBA API Wrapper * autoconf * autotools * sysconftool * automake * libtool * libpciaccess-devel PROCESS 1) Bootstrap, configure, make and make install # ./bootstrap.sh # rpm --eval "%configure" | sh # make # make install ## # fcoe-utils ############ DEPENDENCIES * libhbalinux * dcbd (optional configure flag to build without) * autoconf * autotools * sysconftool * automake * libtool PROCESS 1) Ensure correct header files - fcping requires certain kernel header files to be exported or it cannot be compiled. These header files were included in the 2.6.31 Linux kernel. If you are using a distribution kernel that is >= 2.6.31 then you shouldn't have to take this step. If you are building your own kernel or are using a pre-2.6.31 kernel you will need to take this step to export the appropriate header files. # pushd # make headers_install # PWD=`pwd` # ln -s $PWD/usr/include/scsi/scsi_bsg_fc.h /usr/include/scsi/ # ln -s $PWD/usr/include/scsi/fc /usr/include/scsi/fc # popd 2) Bootstrap, configure, make and make install # ./bootstrap.sh # rpm --eval "%configure" | sh # make # make install fcoe-utils-1.0.9/fcoeadm_display.c0000644000175000017500000010256111312505503016036 0ustar chuckchuck/* * Copyright(c) 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Maintained at www.Open-FCoE.org */ #include "fcoeadm.h" /* #define TEST_HBAAPI_V1 */ #ifdef TEST_HBAAPI_V1 #define HBA_FCP_SCSI_ENTRY HBA_FCPSCSIENTRY #define HBA_FCP_TARGET_MAPPING HBA_FCPTARGETMAPPING #else #define HBA_FCP_SCSI_ENTRY HBA_FCPSCSIENTRYV2 #define HBA_FCP_TARGET_MAPPING HBA_FCPTARGETMAPPINGV2 #endif /* #define TEST_REPORT_LUNS */ /* #define TEST_READ_CAP_V1 */ /* #define TEST_DEV_SERIAL_NO */ /* Maximum number of HBA the display routines support */ #define MAX_HBA_COUNT 128 /* Define FC4 Type */ #define FC_TYPE_FCP 0x08 /* SCSI FCP */ /* Constant defined in fcoe_def.h of fcoe driver */ #define FCOE_WORD_TO_BYTE 4 /* Minimum byte size of the received inquiry data */ #define MIN_INQ_DATA_SIZE 36 struct sa_nameval { char *nv_name; u_int32_t nv_val; }; struct sa_nameval port_states[] = { { "Not Present", HBA_PORTSTATE_UNKNOWN }, { "Online", HBA_PORTSTATE_ONLINE }, { "Offline", HBA_PORTSTATE_OFFLINE }, { "Blocked", HBA_PORTSTATE_UNKNOWN }, { "Bypassed", HBA_PORTSTATE_BYPASSED }, { "Diagnostics", HBA_PORTSTATE_DIAGNOSTICS }, { "Linkdown", HBA_PORTSTATE_LINKDOWN }, { "Error", HBA_PORTSTATE_ERROR }, { "Loopback", HBA_PORTSTATE_LOOPBACK }, { "Deleted", HBA_PORTSTATE_UNKNOWN }, { NULL, 0 } }; /* * table of /sys port speed strings to HBA-API values. */ struct sa_nameval port_speeds[] = { { "10 Gbit", HBA_PORTSPEED_10GBIT }, { "2 Gbit", HBA_PORTSPEED_2GBIT }, { "1 Gbit", HBA_PORTSPEED_1GBIT }, { "Not Negotiated", HBA_PORTSPEED_NOT_NEGOTIATED }, { "Unknown", HBA_PORTSPEED_UNKNOWN }, { NULL, 0 } }; /** sa_enum_decode(buf, len, tp, val) * * @param buf buffer for result (may be used or not). * @param len size of buffer (at least 32 bytes recommended). * @param tp pointer to table of names and values, struct sa_nameval. * @param val value to be decoded into a name. * @returns pointer to name string. Unknown values are put into buffer in hex. */ static const char * sa_enum_decode(char *buf, size_t len, const struct sa_nameval *tp, u_int32_t val) { snprintf(buf, len, "Unknown"); for (; tp->nv_name != NULL; tp++) { if (tp->nv_val == val) { strncpy(buf, tp->nv_name, len); break; } } return buf; } static void sa_dump_wwn(void *Data, int Length, int Break) { unsigned char *pc = (unsigned char *)Data; int i; for (i = 1; i <= Length; i++) { printf("%02X", (int)*pc++); if ((Break != 0) && (!(i % Break))) printf(" "); } } /* * Make a printable NUL-terminated copy of the string. * The source buffer might not be NUL-terminated. */ static char * sa_strncpy_safe(char *dest, size_t len, const char *src, size_t src_len) { char *dp = dest; const char *sp = src; while (len-- > 1 && src_len-- > 0 && *sp != '\0') { *dp++ = isprint(*sp) ? *sp : (isspace(*sp) ? ' ' : '.'); sp++; } *dp = '\0'; /* * Take off trailing blanks. */ while (--dp >= dest && isspace(*dp)) *dp = '\0'; return dest; } /* * Read a line from the specified file in the specified directory * into the buffer. The file is opened and closed. * Any trailing white space is trimmed off. * This is useful for accessing /sys files. * Returns 0 or an error number. */ static int sa_sys_read_line(const char *dir, const char *file, char *buf, size_t len) { FILE *fp; char file_name[256]; char *cp; int rc = 0; snprintf(file_name, sizeof(file_name), "%s/%s", dir, file); fp = fopen(file_name, "r"); if (fp == NULL) rc = -1; else { cp = fgets(buf, len, fp); if (cp == NULL) { fprintf(stderr, "read error or empty file %s," " errno=0x%x\n", file_name, errno); rc = -1; } else { /* * Trim off trailing newline or other white space. */ cp = buf + strlen(buf); while (--cp >= buf && isspace(*cp)) *cp = '\0'; } fclose(fp); } return rc; } static int sa_sys_read_u32(const char *dir, const char *file, u_int32_t *vp) { char buf[256]; int rc; u_int32_t val; char *endptr; rc = sa_sys_read_line(dir, file, buf, sizeof(buf)); if (rc == 0) { val = strtoul(buf, &endptr, 0); if (*endptr != '\0') { fprintf(stderr, "parse error. file %s/%s line '%s'\n", dir, file, buf); rc = -1; } else *vp = val; } return rc; } static void show_wwn(unsigned char *pWwn) { sa_dump_wwn(pWwn, 8, 0); } static void show_hba_info(int hba_index, HBA_ADAPTERATTRIBUTES *hba_info, int flags) { printf("\n"); printf("HBA #%d\n", hba_index); printf(" Description: %s\n", hba_info->ModelDescription); printf(" Revision: %s\n", hba_info->HardwareVersion); printf(" Manufacturer: %s\n", hba_info->Manufacturer); printf(" Serial Number: %s\n", hba_info->SerialNumber); printf(" Driver: %s %s\n", hba_info->DriverName, hba_info->DriverVersion); printf(" Number of Ports: %d\n", hba_info->NumberOfPorts); } static void show_port_info(int hba_index, int lp_index, HBA_ADAPTERATTRIBUTES *hba_info, HBA_PORTATTRIBUTES *lp_info) { char buf[256]; int len = sizeof(buf); printf("\n Port #%d\n", lp_index); printf(" Symbolic Name: %s\n", lp_info->PortSymbolicName); printf(" OS Device Name: %s\n", lp_info->OSDeviceName); printf(" Node Name: 0x"); show_wwn(lp_info->NodeWWN.wwn); printf(" \n"); printf(" Port Name: 0x"); show_wwn(lp_info->PortWWN.wwn); printf(" \n"); printf(" FabricName: 0x"); show_wwn(lp_info->FabricName.wwn); printf(" \n"); sa_enum_decode(buf, len, port_speeds, lp_info->PortSpeed); printf(" Speed: %s\n", buf); sa_enum_decode(buf, len, port_speeds, lp_info->PortSupportedSpeed); printf(" Supported Speed: %s\n", buf); printf(" MaxFrameSize: %d\n", lp_info->PortMaxFrameSize); printf(" FC-ID (Port ID): 0x%06X\n", lp_info->PortFcId); sa_enum_decode(buf, sizeof(buf), port_states, lp_info->PortState); printf(" State: %s\n", buf); /* TODO: Display PortSupportedFc4Types and PortActiveFc4Types */ } static void show_target_info(int hba_index, int lp_index, int rp_index, HBA_ADAPTERATTRIBUTES *hba_info, HBA_PORTATTRIBUTES *rp_info) { char buf[256]; u_int32_t tgt_id; int rc; printf("Target #%d @ %s\n", rp_index, hba_info->NodeSymbolicName + 5); rc = sa_sys_read_line(rp_info->OSDeviceName, "roles", buf, sizeof(buf)); printf(" Roles: %s\n", buf); printf(" Node Name: 0x"); show_wwn(rp_info->NodeWWN.wwn); printf(" \n"); printf(" Port Name: 0x"); show_wwn(rp_info->PortWWN.wwn); printf(" \n"); rc = sa_sys_read_u32(rp_info->OSDeviceName, "scsi_target_id", &tgt_id); if (tgt_id != -1) printf(" Target ID: %d\n", tgt_id); printf(" MaxFrameSize: %d\n", rp_info->PortMaxFrameSize); printf(" OS Device Name: %s\n", strrchr(rp_info->OSDeviceName, '/') + 1); printf(" FC-ID (Port ID): 0x%06X\n", rp_info->PortFcId); sa_enum_decode(buf, sizeof(buf), port_states, rp_info->PortState); printf(" State: %s\n", buf); printf(" \n"); } static void show_sense_data(char *dev, char *sense, int slen) { printf("%s", dev); if (slen >= 3) printf(" Sense Key=0x%02x", sense[2]); if (slen >= 13) printf(" ASC=0x%02x", sense[12]); if (slen >= 14) printf(" ASCQ=0x%02x\n", sense[13]); printf("\n"); } #ifdef TEST_HBAAPI_V1 static HBA_STATUS get_inquiry_data_v1(HBA_HANDLE hba_handle, HBA_FCPSCSIENTRY *ep, char *inqbuf, size_t inqlen) { char sense[128]; HBA_UINT32 rlen; HBA_UINT32 slen; HBA_STATUS status; memset(inqbuf, 0, inqlen); memset(sense, 0, sizeof(sense)); rlen = (HBA_UINT32) inqlen; slen = (HBA_UINT32) sizeof(sense); status = HBA_SendScsiInquiry(hba_handle, ep->FcpId.PortWWN, ep->FcpId.FcpLun, 0, 0, inqbuf, rlen, sense, slen); if ((status != HBA_STATUS_OK) || (rlen < MIN_INQ_DATA_SIZE)) { fprintf(stderr, "%s: HBA_SendScsiInquiry failed, " "status=0x%x, rlen=%d\n", __func__, status, rlen); show_sense_data(ep->ScsiId.OSDeviceName, sense, slen); return HBA_STATUS_ERROR; } return HBA_STATUS_OK; } #else static HBA_STATUS get_inquiry_data_v2(HBA_HANDLE hba_handle, HBA_PORTATTRIBUTES *lp_info, HBA_FCPSCSIENTRYV2 *ep, char *inqbuf, size_t inqlen) { char sense[128]; HBA_UINT32 rlen; HBA_UINT32 slen; HBA_STATUS status; HBA_UINT8 sstat; memset(inqbuf, 0, inqlen); memset(sense, 0, sizeof(sense)); rlen = (HBA_UINT32) inqlen; slen = (HBA_UINT32) sizeof(sense); sstat = SCSI_ST_GOOD; status = HBA_ScsiInquiryV2(hba_handle, lp_info->PortWWN, ep->FcpId.PortWWN, ep->FcpId.FcpLun, 0, 0, inqbuf, &rlen, &sstat, sense, &slen); if ((status != HBA_STATUS_OK) || (sstat != SCSI_ST_GOOD) || (rlen < MIN_INQ_DATA_SIZE)) { fprintf(stderr, "%s: HBA_ScsiInquiryV2 failed, " "status=0x%x, sstat=0x%x, rlen=%d\n", __func__, status, sstat, rlen); if (sstat != SCSI_ST_GOOD) show_sense_data(ep->ScsiId.OSDeviceName, sense, slen); return HBA_STATUS_ERROR; } return HBA_STATUS_OK; } #endif #ifdef TEST_HBAAPI_V1 static HBA_STATUS get_device_capacity_v1(HBA_HANDLE hba_handle, HBA_FCPSCSIENTRY *ep, char *buf, size_t len) { char sense[128]; HBA_UINT32 rlen; HBA_UINT32 slen; HBA_STATUS status; int retry_count = 10; while (retry_count--) { memset(buf, 0, len); memset(sense, 0, sizeof(sense)); rlen = (HBA_UINT32)len; slen = (HBA_UINT32)sizeof(sense); status = HBA_SendReadCapacity(hba_handle, ep->FcpId.PortWWN, ep->FcpId.FcpLun, buf, rlen, sense, slen); if (status == HBA_STATUS_OK) return HBA_STATUS_OK; if (sense[2] == 0x06) continue; fprintf(stderr, "%s: HBA_SendReadCapacity failed, " "status=0x%x, slen=%d\n", __func__, status, slen); show_sense_data(ep->ScsiId.OSDeviceName, sense, slen); return HBA_STATUS_ERROR; } /* retry count exhausted */ return HBA_STATUS_ERROR; } #else static HBA_STATUS get_device_capacity_v2(HBA_HANDLE hba_handle, HBA_PORTATTRIBUTES *lp_info, HBA_FCPSCSIENTRYV2 *ep, char *buf, size_t len) { char sense[128]; HBA_UINT32 rlen; HBA_UINT32 slen; HBA_STATUS status; HBA_UINT8 sstat; int retry_count = 10; while (retry_count--) { memset(buf, 0, len); memset(sense, 0, sizeof(sense)); rlen = (HBA_UINT32)len; slen = (HBA_UINT32)sizeof(sense); sstat = SCSI_ST_GOOD; status = HBA_ScsiReadCapacityV2(hba_handle, lp_info->PortWWN, ep->FcpId.PortWWN, ep->FcpId.FcpLun, buf, &rlen, &sstat, sense, &slen); if ((status == HBA_STATUS_OK) && (sstat == SCSI_ST_GOOD)) return HBA_STATUS_OK; if ((sstat == SCSI_ST_CHECK) && (sense[2] == 0x06)) continue; fprintf(stderr, "%s: HBA_ScsiReadCapacityV2 failed, " "status=0x%x, sstat=0x%x, slen=%d\n", __func__, status, sstat, slen); if (sstat != SCSI_ST_GOOD) show_sense_data(ep->ScsiId.OSDeviceName, sense, slen); return HBA_STATUS_ERROR; } /* retry count exhausted */ return HBA_STATUS_ERROR; } #endif #ifdef TEST_DEV_SERIAL_NO static HBA_STATUS get_device_serial_number(HBA_HANDLE hba_handle, HBA_FCPSCSIENTRYV2 *ep, char *buf, size_t buflen) { struct scsi_inquiry_unit_sn *unit_sn; char rspbuf[256]; char sense[128]; HBA_UINT32 rlen; HBA_UINT32 slen; HBA_STATUS status; memset(rspbuf, 0, sizeof(rspbuf)); memset(sense, 0, sizeof(sense)); rlen = (HBA_UINT32) sizeof(rspbuf); slen = (HBA_UINT32) sizeof(sense); status = HBA_SendScsiInquiry(hba_handle, ep->FcpId.PortWWN, ep->FcpId.FcpLun, SCSI_INQF_EVPD, SCSI_INQP_UNIT_SN, rspbuf, rlen, sense, slen); if (status != HBA_STATUS_OK) { fprintf(stderr, "%s: inquiry page 0x80 failed, status=0x%x\n", __func__, status); show_sense_data(ep->ScsiId.OSDeviceName, sense, slen); return HBA_STATUS_ERROR; } unit_sn = (struct scsi_inquiry_unit_sn *)rspbuf; unit_sn->is_serial[unit_sn->is_page_len] = '\0'; sa_strncpy_safe(buf, buflen, (char *)unit_sn->is_serial, (size_t)unit_sn->is_page_len); return HBA_STATUS_OK; } #endif #ifdef TEST_REPORT_LUNS static void show_report_luns_data(char *rspbuf) { struct scsi_report_luns_resp *rp; int list_len; net64_t *lp; u_int64_t lun_id; rp = (struct scsi_report_luns_resp *)rspbuf; list_len = net32_get(&rp->rl_len); printf("\tTotal Number of LUNs=%lu\n", list_len/sizeof(u_int64_t)); for (lp = rp->rl_lun; list_len > 0; lp++, list_len -= sizeof(*lp)) { lun_id = net64_get(lp); if (!(lun_id & ((0xfc01ULL << 48) - 1))) printf("\tLUN %u\n", (u_int32_t)(lun_id >> 48)); else printf("\tLUN %lx\n", (u_int64_t)lun_id); } } static HBA_STATUS get_report_luns_data_v1(HBA_HANDLE hba_handle, HBA_FCPSCSIENTRYV2 *ep) { HBA_STATUS status; char rspbuf[512 * sizeof(u_int64_t)]; /* max 512 luns */ char sense[128]; HBA_UINT32 rlen; HBA_UINT32 slen; int retry_count = 10; while (retry_count--) { memset(rspbuf, 0, sizeof(rspbuf)); memset(sense, 0, sizeof(sense)); rlen = (HBA_UINT32) sizeof(rspbuf); slen = (HBA_UINT32) sizeof(sense); status = HBA_SendReportLUNs(hba_handle, ep->FcpId.PortWWN, rspbuf, rlen, sense, slen); if (status == HBA_STATUS_OK) { show_report_luns_data(rspbuf); return HBA_STATUS_OK; } if (sense[2] == 0x06) continue; fprintf(stderr, "%s: HBA_SendReportLUNs failed, " "status=0x%x, slen=%d\n", __func__, status, slen); show_sense_data(ep->ScsiId.OSDeviceName, sense, slen); return HBA_STATUS_ERROR; } /* retry count exhausted */ return HBA_STATUS_ERROR; } static HBA_STATUS get_report_luns_data_v2(HBA_HANDLE hba_handle, HBA_PORTATTRIBUTES *lp_info, HBA_FCPSCSIENTRYV2 *ep) { HBA_STATUS status; char rspbuf[512 * sizeof(u_int64_t)]; /* max 512 luns */ char sense[128]; HBA_UINT32 rlen; HBA_UINT32 slen; HBA_UINT8 sstat; int retry_count = 10; while (retry_count--) { memset(rspbuf, 0, sizeof(rspbuf)); memset(sense, 0, sizeof(sense)); rlen = (HBA_UINT32) sizeof(rspbuf); slen = (HBA_UINT32) sizeof(sense); sstat = SCSI_ST_GOOD; status = HBA_ScsiReportLUNsV2(hba_handle, lp_info->PortWWN, ep->FcpId.PortWWN, rspbuf, &rlen, &sstat, sense, &slen); if ((status == HBA_STATUS_OK) && (sstat == SCSI_ST_GOOD)) { show_report_luns_data(rspbuf); return HBA_STATUS_OK; } if ((sstat == SCSI_ST_CHECK) && (sense[2] == 0x06)) continue; fprintf(stderr, "%s: HBA_ScsiReportLUNsV2 failed, " "status=0x%x, sstat=0x%x, slen=%d\n", __func__, status, sstat, slen); if (sstat != SCSI_ST_GOOD) show_sense_data(ep->ScsiId.OSDeviceName, sense, slen); return HBA_STATUS_ERROR; } /* retry count exhausted */ return HBA_STATUS_ERROR; } #endif static void show_short_lun_info_header(void) { printf(" LUN ID Device Name Capacity " "Block Size Description\n"); printf(" ------ ----------- ---------- ---------- " "----------------------------\n"); } static void show_short_lun_info(HBA_FCP_SCSI_ENTRY *ep, char *inqbuf, struct scsi_rcap10_resp *rcap_resp) { struct scsi_inquiry_std *inq = (struct scsi_inquiry_std *)inqbuf; char vendor[10]; char model[20]; char capstr[32]; char rev[16]; u_int64_t cap; double cap_abbr; char *abbr; memset(vendor, 0, sizeof(vendor)); memset(model, 0, sizeof(model)); memset(capstr, 0, sizeof(capstr)); memset(rev, 0, sizeof(rev)); /* Get device capacity */ cap = (u_int64_t) net32_get(&rcap_resp->rc_block_len) * net32_get(&rcap_resp->rc_lba); cap_abbr = cap / (1024.0 * 1024.0); abbr = "MB"; if (cap_abbr >= 1024) { cap_abbr /= 1024.0; abbr = "GB"; } if (cap_abbr >= 1024) { cap_abbr /= 1024.0; abbr = "TB"; } if (cap_abbr >= 1024) { cap_abbr /= 1024.0; abbr = "PB"; } snprintf(capstr, sizeof(capstr), "%0.2f %s", cap_abbr, abbr); /* Get the device description */ sa_strncpy_safe(vendor, sizeof(vendor), inq->is_vendor_id, sizeof(inq->is_vendor_id)); sa_strncpy_safe(model, sizeof(model), inq->is_product, sizeof(inq->is_product)); sa_strncpy_safe(rev, sizeof(rev), inq->is_rev_level, sizeof(inq->is_rev_level)); /* Show the LUN info */ printf("%10d %-11s %10s %7d %s %s (rev %s)\n", ep->ScsiId.ScsiOSLun, ep->ScsiId.OSDeviceName, capstr, net32_get(&rcap_resp->rc_block_len), vendor, model, rev); } static void show_full_lun_info(HBA_HANDLE hba_handle, HBA_ADAPTERATTRIBUTES *hba_info, HBA_PORTATTRIBUTES *lp_info, HBA_PORTATTRIBUTES *rp_info, HBA_FCP_SCSI_ENTRY *ep, char *inqbuf, struct scsi_rcap10_resp *rcap_resp) { struct scsi_inquiry_std *inq = (struct scsi_inquiry_std *)inqbuf; char vendor[10]; char model[20]; char capstr[32]; char rev[16]; double cap_abbr; char *abbr; u_int64_t cap; u_int32_t tgt_id; u_int8_t pqual; #ifdef TEST_DEV_SERIAL_NO HBA_STATUS status; char serial_number[32]; #endif memset(vendor, 0, sizeof(vendor)); memset(model, 0, sizeof(model)); memset(capstr, 0, sizeof(capstr)); memset(rev, 0, sizeof(rev)); /* Get device description */ sa_strncpy_safe(vendor, sizeof(vendor), inq->is_vendor_id, sizeof(inq->is_vendor_id)); sa_strncpy_safe(model, sizeof(model), inq->is_product, sizeof(inq->is_product)); sa_strncpy_safe(rev, sizeof(rev), inq->is_rev_level, sizeof(inq->is_rev_level)); /* Get device capacity */ cap = (u_int64_t) net32_get(&rcap_resp->rc_block_len) * net32_get(&rcap_resp->rc_lba); cap_abbr = cap / (1024.0 * 1024.0); abbr = "MB"; if (cap_abbr >= 1024) { cap_abbr /= 1024.0; abbr = "GB"; } if (cap_abbr >= 1024) { cap_abbr /= 1024.0; abbr = "TB"; } if (cap_abbr >= 1024) { cap_abbr /= 1024.0; abbr = "PB"; } snprintf(capstr, sizeof(capstr), "%0.2f %s", cap_abbr, abbr); /* Get SCSI target ID */ sa_sys_read_u32(rp_info->OSDeviceName, "scsi_target_id", &tgt_id); /* Show lun info */ printf(" LUN #%d Information:\n", ep->ScsiId.ScsiOSLun); printf(" OS Device Name: %s\n", ep->ScsiId.OSDeviceName); printf(" Description: %s %s (rev %s)\n", vendor, model, rev); printf(" Ethernet Port FCID: 0x%06X\n", lp_info->PortFcId); printf(" Target FCID: 0x%06X\n", rp_info->PortFcId); if (tgt_id == -1) printf(" Target ID: (None)\n"); else printf(" Target ID: %u\n", tgt_id); printf(" LUN ID: %d\n", ep->ScsiId.ScsiOSLun); printf(" Capacity: %s\n", capstr); printf(" Capacity in Blocks: %d\n", net32_get(&rcap_resp->rc_lba)); printf(" Block Size: %d bytes\n", net32_get(&rcap_resp->rc_block_len)); pqual = inq->is_periph & SCSI_INQ_PQUAL_MASK; if (pqual == SCSI_PQUAL_ATT) printf(" Status: Attached\n"); else if (pqual == SCSI_PQUAL_DET) printf(" Status: Detached\n"); else if (pqual == SCSI_PQUAL_NC) printf(" Status: " "Not capable of attachment\n"); #ifdef TEST_DEV_SERIAL_NO /* Show the serial number of the device */ status = get_device_serial_number(hba_handle, ep, serial_number, sizeof(serial_number)); if (status == HBA_STATUS_OK) printf(" Serial Number: %s\n", serial_number); #endif printf("\n"); } /* Compare two LUN mappings for qsort */ static int lun_compare(const void *arg1, const void *arg2) { const HBA_FCP_SCSI_ENTRY *e1 = arg1; const HBA_FCP_SCSI_ENTRY *e2 = arg2; int diff; diff = e2->FcpId.FcId - e1->FcpId.FcId; if (diff == 0) diff = e1->ScsiId.ScsiOSLun - e2->ScsiId.ScsiOSLun; return diff; } static HBA_STATUS get_device_map(HBA_HANDLE hba_handle, HBA_PORTATTRIBUTES *lp_info, HBA_FCP_TARGET_MAPPING **tgtmap, u_int32_t *lun_count) { HBA_STATUS status; HBA_FCP_TARGET_MAPPING *map = NULL; HBA_FCP_SCSI_ENTRY *ep; u_int32_t limit; u_int32_t i; #define LUN_COUNT_START 8 /* number of LUNs to start with */ #define LUN_COUNT_INCR 4 /* excess to allocate */ /* * Get buffer large enough to retrieve all the mappings. * If they don't fit, increase the size of the buffer and retry. */ *lun_count = 0; limit = LUN_COUNT_START; for (;;) { i = (limit - 1) * sizeof(*ep) + sizeof(*map); map = malloc(i); if (map == NULL) { fprintf(stderr, "%s: malloc failed\n", __func__); return HBA_STATUS_ERROR; } memset((char *)map, 0, i); map->NumberOfEntries = limit; #ifdef TEST_HBAAPI_V1 status = HBA_GetFcpTargetMapping(hba_handle, map); #else status = HBA_GetFcpTargetMappingV2( hba_handle, lp_info->PortWWN, map); #endif if (map->NumberOfEntries > limit) { limit = map->NumberOfEntries + LUN_COUNT_INCR; free(map); continue; } if (status != HBA_STATUS_OK) { fprintf(stderr, "%s: HBA_GetFcpTargetMappingV2 failed\n", __func__); free(map); return HBA_STATUS_ERROR; } break; } if (map == NULL) { fprintf(stderr, "%s: map == NULL\n", __func__); return HBA_STATUS_ERROR; } if (map->NumberOfEntries > limit) { fprintf(stderr, "%s: map->NumberOfEntries=%d too big\n", __func__, map->NumberOfEntries); return HBA_STATUS_ERROR; } ep = map->entry; limit = map->NumberOfEntries; /* Sort the response by LUN number */ qsort(ep, limit, sizeof(*ep), lun_compare); *lun_count = limit; *tgtmap = map; return HBA_STATUS_OK; } static void scan_device_map(HBA_HANDLE hba_handle, HBA_ADAPTERATTRIBUTES *hba_info, HBA_PORTATTRIBUTES *lp_info, HBA_PORTATTRIBUTES *rp_info, struct opt_info *opt_info) { HBA_STATUS status; HBA_FCP_TARGET_MAPPING *map = NULL; u_int32_t limit; HBA_FCP_SCSI_ENTRY *ep; u_int32_t i; char *dev; char inqbuf[256]; struct scsi_rcap10_resp rcap_resp; int lun_count = 0; int print_header = 0; status = get_device_map(hba_handle, lp_info, &map, &limit); if (status != HBA_STATUS_OK) { fprintf(stderr, "%s: get_device_map() failed\n", __func__); return; } ep = map->entry; for (i = 0; i < limit; i++, ep++) { if (ep->FcpId.FcId != rp_info->PortFcId) continue; if (opt_info->l_flag && opt_info->l_fcid_present && opt_info->l_lun_id_present && ep->ScsiId.ScsiOSLun != opt_info->l_lun_id) continue; dev = ep->ScsiId.OSDeviceName; if (strstr(dev, "/dev/") == dev) dev += 5; /* Issue standard inquiry */ #ifdef TEST_HBAAPI_V1 status = get_inquiry_data_v1(hba_handle, ep, inqbuf, sizeof(inqbuf)); #else status = get_inquiry_data_v2(hba_handle, lp_info, ep, inqbuf, sizeof(inqbuf)); #endif if (status != HBA_STATUS_OK) continue; lun_count++; /* Issue read capacity */ #ifdef TEST_HBAAPI_V1 status = get_device_capacity_v1(hba_handle, ep, (char *)&rcap_resp, sizeof(rcap_resp)); #else status = get_device_capacity_v2(hba_handle, lp_info, ep, (char *)&rcap_resp, sizeof(rcap_resp)); #endif if (status != HBA_STATUS_OK) continue; if (opt_info->t_flag) { if (!print_header) { show_short_lun_info_header(); print_header = 1; } show_short_lun_info(ep, inqbuf, &rcap_resp); } else if (opt_info->l_flag) show_full_lun_info(hba_handle, hba_info, lp_info, rp_info, ep, inqbuf, &rcap_resp); #ifdef TEST_REPORT_LUNS if (i == 0) { /* only issue report luns to the first LUN */ #ifdef TEST_HBAAPI_V1 get_report_luns_data_v1(hba_handle, ep); #else get_report_luns_data_v2(hba_handle, lp_info, ep); #endif } #endif } free(map); printf("\n"); } static void show_port_stats_header(struct opt_info *opt_info) { printf("\n"); printf("%-7s interval: %-2d Err Inv " "IvTx Link Cntl Input Input Output Output\n", opt_info->ifname, opt_info->n_interval); printf("Seconds TxFrames TxBytes RxFrames RxBytes " "Frms CRC Byte Fail Reqs Requests MBytes " "Requests MBytes\n"); printf("------- --------- ------------ --------- -------------- " "---- ---- ---- ---- ---- --------- --------- " "--------- ---------\n"); } static void show_port_stats_in_row(HBA_INT64 start_time, HBA_PORTSTATISTICS *port_stats, HBA_FC4STATISTICS *port_fc4stats) { printf("%-7lld ", port_stats->SecondsSinceLastReset - start_time); printf("%-9lld ", port_stats->TxFrames); printf("%-12lld ", port_stats->TxWords * FCOE_WORD_TO_BYTE); printf("%-9lld ", port_stats->RxFrames); printf("%-14lld ", port_stats->RxWords * FCOE_WORD_TO_BYTE); printf("%-4lld ", port_stats->ErrorFrames); printf("%-4lld ", port_stats->InvalidCRCCount); printf("%-4lld ", port_stats->InvalidTxWordCount * FCOE_WORD_TO_BYTE); printf("%-4lld ", port_stats->LinkFailureCount); printf("%-4lld ", port_fc4stats->ControlRequests); printf("%-9lld ", port_fc4stats->InputRequests); printf("%-9lld ", port_fc4stats->InputMegabytes); printf("%-9lld ", port_fc4stats->OutputRequests); printf("%-9lld ", port_fc4stats->OutputMegabytes); printf("\n"); } void display_port_stats(struct opt_info *opt_info) { HBA_STATUS retval; HBA_UINT32 hba_cnt; HBA_HANDLE hba_handle; HBA_ADAPTERATTRIBUTES hba_attrs; HBA_PORTATTRIBUTES port_attrs; HBA_PORTSTATISTICS port_stats; HBA_FC4STATISTICS port_fc4stats; HBA_INT64 start_time = 0; char namebuf[1028]; int i = 0, found = 0; hba_cnt = HBA_GetNumberOfAdapters(); if (!hba_cnt) { fprintf(stderr, "No FCoE interfaces created.\n"); return; } for (i = 0; i < hba_cnt; i++) { retval = HBA_GetAdapterName(i, namebuf); if (retval != HBA_STATUS_OK) { fprintf(stderr, "Failure of HBA_GetAdapterName: %d\n", retval); continue; } hba_handle = HBA_OpenAdapter(namebuf); if (!hba_handle) { fprintf(stderr, "HBA_OpenAdapter failed\n"); perror("HBA_OpenAdapter"); continue; } retval = HBA_GetAdapterAttributes(hba_handle, &hba_attrs); if (retval != HBA_STATUS_OK) { fprintf(stderr, "HBA_GetAdapterAttributes failed, retval=%d\n", retval); perror("HBA_GetAdapterAttributes"); continue; } retval = HBA_GetAdapterPortAttributes( hba_handle, 0, &port_attrs); if (retval != HBA_STATUS_OK) { fprintf(stderr, "HBA_GetAdapterPortAttributes failed, " "status=%d\n", retval); continue; } if (strstr(port_attrs.PortSymbolicName, opt_info->ifname)) { found = 1; break; } } if (!found) { fprintf(stderr, "Cannot find attributes for %s\n", opt_info->ifname); return; } i = 0; while (1) { unsigned int secs_left; retval = HBA_GetPortStatistics(hba_handle, 0, &port_stats); if (retval != HBA_STATUS_OK && retval != HBA_STATUS_ERROR_NOT_SUPPORTED) { fprintf(stderr, "HBA_GetPortStatistics failed, status=%d\n", retval); break; } if (retval == HBA_STATUS_ERROR_NOT_SUPPORTED) { fprintf(stderr, "Port Statistics not supported by %s\n", opt_info->ifname); break; } if (!start_time) start_time = port_stats.SecondsSinceLastReset; retval = HBA_GetFC4Statistics(hba_handle, port_attrs.PortWWN, FC_TYPE_FCP, &port_fc4stats); if (retval != HBA_STATUS_OK && retval != HBA_STATUS_ERROR_NOT_SUPPORTED) { fprintf(stderr, "HBA_GetFC4Statistics failed, " "status=%d\n", retval); break; } if (retval == HBA_STATUS_ERROR_NOT_SUPPORTED) { fprintf(stderr, "Port FC4 Statistics not supported by %s\n", opt_info->ifname); break; } if (!(i % 52)) show_port_stats_header(opt_info); show_port_stats_in_row(start_time, &port_stats, &port_fc4stats); i++; /* wait for the requested time interval in seconds */ secs_left = opt_info->n_interval; do { secs_left = sleep(secs_left); } while (secs_left); } HBA_CloseAdapter(hba_handle); return; } static struct hba_name_table { char SerialNumber[64]; int index; } hba_name_table[MAX_HBA_COUNT]; static int find_hba_index(char *serial_number, int *hba_index) { int i, j; j = sizeof(hba_name_table[0].SerialNumber) - 1; for (i = 0; i < MAX_HBA_COUNT; i++) { if (hba_name_table[i].index == -1) { /* not found */ hba_name_table[i].index = i; /* TODO: change to sa_strncpy_safe */ strncpy(hba_name_table[i].SerialNumber, serial_number, j); *hba_index = i; return 1; /* print hba info */ } if (!strncmp(serial_number, hba_name_table[i].SerialNumber, j)) { *hba_index = hba_name_table[i].index; return 0; /* do not print hba info */ } } /* table full */ return -1; } void display_adapter_info(struct opt_info *opt_info) { HBA_STATUS retval; HBA_UINT32 hba_cnt; HBA_UINT32 lport_cnt_per_hba = 1; /* always one port per hba */ HBA_HANDLE hba_handle; HBA_ADAPTERATTRIBUTES hba_attrs; HBA_PORTATTRIBUTES port_attrs; char namebuf[1028]; int i, j, rc; int hba_index = -1; int lp_index = -1; for (i = 0; i < MAX_HBA_COUNT; i++) { hba_name_table[i].index = -1; memset(hba_name_table[i].SerialNumber, 0, sizeof(hba_name_table[i].SerialNumber)); } hba_cnt = HBA_GetNumberOfAdapters(); if (!hba_cnt) { fprintf(stderr, "No FCoE interfaces created.\n"); return; } for (i = 0; i < hba_cnt; i++) { retval = HBA_GetAdapterName(i, namebuf); if (retval != HBA_STATUS_OK) { fprintf(stderr, "Failure of HBA_GetAdapterName: %d\n", retval); continue; } hba_handle = HBA_OpenAdapter(namebuf); if (!hba_handle) { fprintf(stderr, "HBA_OpenAdapter failed\n"); perror("HBA_OpenAdapter"); continue; } retval = HBA_GetAdapterAttributes(hba_handle, &hba_attrs); if (retval != HBA_STATUS_OK) { fprintf(stderr, "HBA_GetAdapterAttributes failed, retval=%d\n", retval); perror("HBA_GetAdapterAttributes"); continue; } rc = find_hba_index(hba_attrs.SerialNumber, &hba_index); if (rc == -1) { fprintf(stderr, "Too many adapters. Maximum %d\n", MAX_HBA_COUNT); return; } else if (rc == 1) show_hba_info(hba_index, &hba_attrs, 0); for (j = 0; j < lport_cnt_per_hba; j++) { retval = HBA_GetAdapterPortAttributes( hba_handle, j, &port_attrs); if (retval != HBA_STATUS_OK) { fprintf(stderr, "HBA_GetAdapterPortAttributes failed, " "j=%d, status=%d\n", j, retval); continue; } lp_index++; if (opt_info->ifname && !strstr(port_attrs.PortSymbolicName, opt_info->ifname)) continue; show_port_info(hba_index, lp_index, &hba_attrs, &port_attrs); } HBA_CloseAdapter(hba_handle); } } void display_target_info(struct opt_info *opt_info) { HBA_STATUS retval; HBA_UINT32 hba_cnt; HBA_UINT32 lport_cnt_per_hba = 1; /* always one port per hba */ HBA_HANDLE hba_handle; HBA_ADAPTERATTRIBUTES hba_attrs; HBA_PORTATTRIBUTES port_attrs; HBA_PORTATTRIBUTES rport_attrs; char namebuf[1028]; int i, j, rc; int hba_index = -1; int lp_index = -1; int rp_index = -1; for (i = 0; i < MAX_HBA_COUNT; i++) { hba_name_table[i].index = -1; memset(hba_name_table[i].SerialNumber, 0, sizeof(hba_name_table[i].SerialNumber)); } hba_cnt = HBA_GetNumberOfAdapters(); if (!hba_cnt) { fprintf(stderr, "No FCoE interfaces created.\n"); return; } for (i = 0; i < hba_cnt; i++) { retval = HBA_GetAdapterName(i, namebuf); if (retval != HBA_STATUS_OK) { fprintf(stderr, "Failure of HBA_GetAdapterName: %d\n", retval); continue; } hba_handle = HBA_OpenAdapter(namebuf); if (!hba_handle) { fprintf(stderr, "HBA_OpenAdapter failed\n"); perror("HBA_OpenAdapter"); continue; } retval = HBA_GetAdapterAttributes(hba_handle, &hba_attrs); if (retval != HBA_STATUS_OK) { fprintf(stderr, "HBA_GetAdapterAttributes failed, retval=%d\n", retval); perror("HBA_GetAdapterAttributes"); continue; } rc = find_hba_index(hba_attrs.SerialNumber, &hba_index); if (rc == -1) { fprintf(stderr, "Too many adapters. Maximum %d\n", MAX_HBA_COUNT); return; } for (j = 0; j < lport_cnt_per_hba; j++) { retval = HBA_GetAdapterPortAttributes( hba_handle, j, &port_attrs); if (retval != HBA_STATUS_OK) { fprintf(stderr, "HBA_GetAdapterPortAttributes failed, " "j=%d, status=%d\n", j, retval); continue; } lp_index++; if (opt_info->ifname && !strstr(port_attrs.PortSymbolicName, opt_info->ifname)) continue; for (rp_index = 0; rp_index < port_attrs.NumberofDiscoveredPorts; rp_index++) { retval = HBA_GetDiscoveredPortAttributes( hba_handle, j, rp_index, &rport_attrs); if (retval != HBA_STATUS_OK) { fprintf(stderr, "HBA_GetDiscoveredPortAttributes " "failed, j=%d, for rp_index=%d, " "status=%d\n", j, rp_index, retval); continue; } /* * If -l option and fcid are specified in the * command, filter out the targets do not have * port ID equals to fcid. */ if (opt_info->l_flag && opt_info->l_fcid_present && rport_attrs.PortFcId != opt_info->l_fcid) continue; show_target_info(hba_index, lp_index, rp_index, &hba_attrs, &rport_attrs); scan_device_map(hba_handle, &hba_attrs, &port_attrs, &rport_attrs, opt_info); } } HBA_CloseAdapter(hba_handle); } } fcoe-utils-1.0.9/fcoemon_utils.h0000644000175000017500000001673311312505503015573 0ustar chuckchuck/* * Copyright(c) 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Maintained at www.Open-FCoE.org */ #ifndef _FCOEMON_UTILS_H_ #define _FCOEMON_UTILS_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "fc_types.h" void sa_log(const char *format, ...); void sa_log_err(int, const char *func, const char *format, ...); /* * These functions can be provided outside of libsa for those environments * that want to redirect them. */ void sa_log_output(const char *); /* log message */ void sa_log_abort(const char *); /* log message and abort */ #define __SA_STRING(x) #x /* * Logging options. */ #define SA_LOGF_TIME 0x0001 /* include timestamp in message */ #define SA_LOGF_DELTA 0x0002 /* include time since last message */ extern u_int sa_log_flags; /* timestamp and other option flags */ extern int sa_log_time_delta_min; /* minimum diff to print in millisec */ extern char *sa_log_prefix; /* string to print before any message */ extern void assert_failed(const char *s, ...) __attribute__ ((format(printf, 1, 2))); #ifndef UNLIKELY #define UNLIKELY(_x) (_x) #endif /* UNLIKELY */ /* * ASSERT macros * * ASSERT(expr) - this calls assert_failed() if expr is false. This variant * is not present in production code or if DEBUG_ASSERTS is not defined. * Be careful not to rely on expr being evaluated. */ #if defined(DEBUG_ASSERTS) #define ASSERT(_x) do { \ if (UNLIKELY(!(_x))) { \ assert_failed("ASSERT FAILED (%s) @ %s:%d\n", \ "" #_x, __FILE__, __LINE__); \ } \ } while (0) #else #define ASSERT(_x) #endif /* DEBUG_ASSERTS */ /* * ASSERT_NOTIMPL(expr) - this calls assert_failed() if expr is false. * The implication is that the condition is not handled by the current * implementation, and work should be done eventually to handle this. */ #define ASSERT_NOTIMPL(_x) do { \ if (UNLIKELY(!(_x))) { \ assert_failed("ASSERT (NOT IMPL) " \ "(%s) @ %s:%d\n", \ "" #_x, __FILE__, __LINE__); \ } \ } while (0) /* * ASSERT_NOTREACHED - this is the same as ASSERT_NOTIMPL(0). */ #define ASSERT_NOTREACHED do { \ assert_failed("ASSERT (NOT REACHED) @ %s:%d\n", \ __FILE__, __LINE__); \ } while (0) /* * ASSERT_BUG(bugno, expr). This variant is used when a bug number has * been assigned to any one of the other assertion failures. It is always * present in code. It gives the bug number which helps locate * documentation and helps prevent duplicate bug filings. */ #define ASSERT_BUG(_bugNr, _x) do { \ if (UNLIKELY(!(_x))) { \ assert_failed("ASSERT (BUG %d) (%s) @ %s:%d\n", \ (_bugNr), #_x, __FILE__, __LINE__); \ } \ } while (0) #ifndef LIBSA_USE_DANGEROUS_ROUTINES #define strcpy DONT_USE_strcpy #define strcat DONT_USE_strcat #define gets DONT_USE_gets #endif /* LIBSA_USE_DANGEROUS_ROUTINES */ char *sa_strncpy_safe(char *dest, size_t len, const char *src, size_t src_len); char *sa_hex_format(char *buf, size_t buflen, const unsigned char *data, size_t data_len, unsigned int group_len, char *inter_group_sep); /* * Structure for tables encoding and decoding name-value pairs such as enums. */ struct sa_nameval { char *nv_name; u_int nv_val; }; const char *sa_enum_decode(char *, size_t, const struct sa_nameval *, u_int); int sa_enum_encode(const struct sa_nameval *tp, const char *, u_int *); const char *sa_flags_decode(char *, size_t, const struct sa_nameval *, u_int); /* * Timer facility. */ struct sa_timer { struct sa_timer *tm_next; u_int64_t tm_nsec; /* relative time to event (nSec) */ void (*tm_handler)(void *arg); void *tm_handler_arg; struct sa_timer **timer_head; }; #define SA_TIMER_UNITS (1000 * 1000UL) /* number of timer ticks per second */ /* * Initialize a pre-allocated timer structure. */ void sa_timer_init(struct sa_timer *, void (*handler)(void *), void *arg); /* * Test whether the timer is active. */ static inline int sa_timer_active(struct sa_timer *tm) { return tm->tm_nsec != 0; } /* * Allocate a timer structure. Set handler. */ struct sa_timer *sa_timer_alloc(void (*)(void *arg), void *arg); /* * Set timer to fire. Delta is in microseconds from now. */ void sa_timer_set(struct sa_timer *, u_long delta); /* * Cancel timer. */ void sa_timer_cancel(struct sa_timer *); /* * Free (and cancel) timer. */ void sa_timer_free(struct sa_timer *); /* * Handle timer checks. Called from select loop or other periodic function. * * The struct timeval passed in indicates how much time has passed since * the last call, and is set before returning to the maximum amount of time * that should elapse before the next call. * * Returns 1 if any timer handlers were invoked, 0 otherwise. */ int sa_timer_check(struct timeval *); /* * Get time in nanoseconds since some arbitrary time. */ u_int64_t sa_timer_get(void); /* * Get time in seconds since some arbitrary time. */ u_int sa_timer_get_secs(void); /* * sa_select - Server Array select facility. * * This is a thin layer to poll files with a select loop. */ /* * Enter the polling loop which never exits. */ int sa_select_loop(void); /* * Set callback for every time through the select loop. */ void sa_select_set_callback(void (*)(void)); /* * Add a deferred function call. The function is called at the start * of the next select loop cycle. * Returns a handle to the deferred call object on success, or NULL on memory * allocation failure. */ void *sa_select_add_deferred_callback(void (*func)(void *), void *arg); /* * Delete a deferred function call. * Takes the handle returned by sa_select_add_deferred_callback as an argument. */ void sa_select_del_deferred_callback(void *handle); /* * Add a callback to handle files which are ready for receive, transmit, * or to handle exceptions. */ void sa_select_add_fd(int fd, void (*rx_handler)(void *), void (*tx_handler)(void *), void (*ex_handler)(void *), void *arg); /* * Change a single callback for a descriptor that's already been added. */ void sa_select_set_rx(int fd, void (*handler)(void *)); void sa_select_set_tx(int fd, void (*handler)(void *)); void sa_select_set_ex(int fd, void (*handler)(void *)); /* * Remove all callbacks for a file descriptor. */ void sa_select_rem_fd(int fd); /* * Cause select loop to return. */ void sa_select_exit(void); /* * Convert 48-bit IEEE MAC address to 64-bit FC WWN. */ extern fc_wwn_t fc_wwn_from_mac(u_int64_t, u_int32_t scheme, u_int32_t port); extern int hex2int(char *b); int use_syslog; void enable_syslog(int); #endif /* _FCOEMON_UTILS_H_ */ fcoe-utils-1.0.9/INSTALL0000644000175000017500000000210411312505503013570 0ustar chuckchuckThis document explains how to build the Open-FCoE user space utilities. This includes fcoeadm, fcoemon and their corresponding manual pages. ## # fcoe-utils ############ DEPENDENCIES * libhbalinux * dcbd (optional configure flag to build without) * autoconf * autotools * sysconftool * automake * libtool 1) Ensure correct header files - fcping requires certain kernel header files to be exported or it cannot be compiled. These header files were included in the 2.6.31 Linux kernel. If you are using a distribution kernel that is >= 2.6.31 then you shouldn't have to take this step. If you are building your own kernel or are using a pre-2.6.31 kernel you will need to take this step to export the appropriate header files. # pushd # make headers_install # PWD=`pwd` # ln -s $PWD/usr/include/scsi/scsi_bsg_fc.h /usr/include/scsi/ # ln -s $PWD/usr/include/scsi/fc /usr/include/scsi/fc # popd 2) Bootstrap, configure, make and make install # ./bootstrap.sh # rpm --eval "%configure" | sh # make # make install fcoe-utils-1.0.9/configure0000755000175000017500000044052411336572513014475 0ustar chuckchuck#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.65 for fcoe-utils 1.0.9. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 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 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 # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else 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 # 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 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: devel@open-fcoe.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file 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 else as_ln_s='cp -p' fi 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='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi 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'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || 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` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='fcoe-utils' PACKAGE_TARNAME='fcoe-utils' PACKAGE_VERSION='1.0.9' PACKAGE_STRING='fcoe-utils 1.0.9' PACKAGE_BUGREPORT='devel@open-fcoe.org' PACKAGE_URL='' ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS DCBD_LIBS DCBD_CFLAGS WITH_DCB_FALSE WITH_DCB_TRUE HBAAPI_LIBS HBAAPI_CFLAGS PKG_CONFIG 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 am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc 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_URL 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 with_dcb ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS PKG_CONFIG HBAAPI_CFLAGS HBAAPI_LIBS DCBD_CFLAGS DCBD_LIBS' # 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 exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # 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' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' 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 ac_prev= continue fi 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_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -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_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "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_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" 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_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -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 ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --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) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --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 ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" 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_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" 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. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error "unrecognized option: \`$ac_option' Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # 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=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) 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_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= 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_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # 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 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 srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then 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. # 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 fcoe-utils 1.0.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. 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] --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/fcoe-utils] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of fcoe-utils 1.0.9:";; 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 Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-dcb disable DCB support 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 LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory PKG_CONFIG path to pkg-config utility HBAAPI_CFLAGS C compiler flags for HBAAPI, overriding pkg-config HBAAPI_LIBS linker flags for HBAAPI, overriding pkg-config DCBD_CFLAGS C compiler flags for DCBD, overriding pkg-config DCBD_LIBS linker flags for DCBD, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. 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 .) # We are building in place. ac_srcdir=. 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 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 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 $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 $ac_status if $ac_init_version; then cat <<\_ACEOF fcoe-utils configure 1.0.9 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile 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 fcoe-utils $as_me 1.0.9, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 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` /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` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # 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. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _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:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | 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" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do 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 ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do 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 if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE 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 "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$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 $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 case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # 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:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) 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 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' 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 am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # 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 # 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:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $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:${as_lineno-$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' { $as_echo "$as_me:${as_lineno-$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 # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && 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 $. # By default was `s,x,x', remove it if useless. 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` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$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 test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # 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 { 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" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $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. 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 { 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P 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. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # 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 { 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" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='fcoe-utils' VERSION='1.0.9' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $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. 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac 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. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$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. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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.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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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.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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $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. 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) 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 ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of object files: cannot compile See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* 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 -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 -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);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$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 # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$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 : $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 # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$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 if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$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=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _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 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then 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' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HBAAPI" >&5 $as_echo_n "checking for HBAAPI... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$HBAAPI_CFLAGS"; then pkg_cv_HBAAPI_CFLAGS="$HBAAPI_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"HBAAPI\""; } >&5 ($PKG_CONFIG --exists --print-errors "HBAAPI") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_HBAAPI_CFLAGS=`$PKG_CONFIG --cflags "HBAAPI" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$HBAAPI_LIBS"; then pkg_cv_HBAAPI_LIBS="$HBAAPI_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"HBAAPI\""; } >&5 ($PKG_CONFIG --exists --print-errors "HBAAPI") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_HBAAPI_LIBS=`$PKG_CONFIG --libs "HBAAPI" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then HBAAPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "HBAAPI"` else HBAAPI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "HBAAPI"` fi # Put the nasty error message in config.log where it belongs echo "$HBAAPI_PKG_ERRORS" >&5 as_fn_error "Package requirements (HBAAPI) were not met: $HBAAPI_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables HBAAPI_CFLAGS and HBAAPI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " "$LINENO" 5 elif test $pkg_failed = untried; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables HBAAPI_CFLAGS and HBAAPI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." "$LINENO" 5; } else HBAAPI_CFLAGS=$pkg_cv_HBAAPI_CFLAGS HBAAPI_LIBS=$pkg_cv_HBAAPI_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi # Check whether --with-dcb was given. if test "${with_dcb+set}" = set; then : withval=$with_dcb; else with_dcb=yes fi if test "X$with_dcb" != Xno; then WITH_DCB_TRUE= WITH_DCB_FALSE='#' else WITH_DCB_TRUE='#' WITH_DCB_FALSE= fi if test "X$with_dcb" != Xno; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DCBD" >&5 $as_echo_n "checking for DCBD... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$DCBD_CFLAGS"; then pkg_cv_DCBD_CFLAGS="$DCBD_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dcbd\""; } >&5 ($PKG_CONFIG --exists --print-errors "dcbd") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DCBD_CFLAGS=`$PKG_CONFIG --cflags "dcbd" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$DCBD_LIBS"; then pkg_cv_DCBD_LIBS="$DCBD_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dcbd\""; } >&5 ($PKG_CONFIG --exists --print-errors "dcbd") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DCBD_LIBS=`$PKG_CONFIG --libs "dcbd" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then DCBD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dcbd"` else DCBD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dcbd"` fi # Put the nasty error message in config.log where it belongs echo "$DCBD_PKG_ERRORS" >&5 as_fn_error "Package requirements (dcbd) were not met: $DCBD_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables DCBD_CFLAGS and DCBD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " "$LINENO" 5 elif test $pkg_failed = untried; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables DCBD_CFLAGS and DCBD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." "$LINENO" 5; } else DCBD_CFLAGS=$pkg_cv_DCBD_CFLAGS DCBD_LIBS=$pkg_cv_DCBD_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi fi ac_config_files="$ac_config_files Makefile fcoeplumb fcoe-utils.spec fcoe_utils.h" 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 # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _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, 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:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. 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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end 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:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.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_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. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_DCB_TRUE}" && test -z "${WITH_DCB_FALSE}"; then as_fn_error "conditional \"WITH_DCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 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_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 # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else 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 # 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 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file 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 else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi 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'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by fcoe-utils $as_me 1.0.9, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ 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 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ fcoe-utils config.status 1.0.9 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF 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_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --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. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then 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 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "fcoeplumb") CONFIG_FILES="$CONFIG_FILES fcoeplumb" ;; "fcoe-utils.spec") CONFIG_FILES="$CONFIG_FILES fcoe-utils.spec" ;; "fcoe_utils.h") CONFIG_FILES="$CONFIG_FILES fcoe_utils.h" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 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 # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # 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 ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 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_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # 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" eval set X " :F $CONFIG_FILES :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_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[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_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # 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:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. 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_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac 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 || $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"; as_fn_mkdir_p ac_builddir=. 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 .) # We are building in place. ac_srcdir=. 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 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 case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p 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:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 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 # 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 || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b 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 s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ 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 # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ 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; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi fcoe-utils-1.0.9/etc/0000755000175000017500000000000011312505503013315 5ustar chuckchuckfcoe-utils-1.0.9/etc/initd/0000755000175000017500000000000011312505503014424 5ustar chuckchuckfcoe-utils-1.0.9/etc/initd/initd.fedora0000755000175000017500000001073211312505503016723 0ustar chuckchuck#!/bin/sh # # Copyright(c) 2009 Intel Corporation. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This program is distributed in the hope it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. # # Maintained at www.Open-FCoE.org ### BEGIN INIT INFO # Provides: fcoe # Required-Start: network # Required-Stop: # Default-Start: 3 5 # Default-Stop: 3 5 # Description: Open-FCoE SAN Setup ### END INIT INFO CONFIG_DIR=/etc/fcoe CONFIG_SCRIPT=$CONFIG_DIR/scripts/fcoeplumb PID_FILE="/var/run/fcoemon.pid" LOG_FILE="/var/log/fcoemon.log" FCOEMON=/usr/sbin/fcoemon FCOEADM=/usr/sbin/fcoeadm DCBD=dcbd LOGGER="echo" FCOEMON_OPTS= . /etc/init.d/functions varify_yesno_values() { value=$1 case $value in "yes" | "YES" ) return 1 ;; "no" | "NO" ) return 2 ;; *) return 0 ;; esac } verify_configuration() { . $CONFIG_DIR/config varify_yesno_values $USE_SYSLOG if [ $? -eq 0 ]; then echo "Invalid USE_SYSLOG in $CONFIG_DIR/config" return 1 fi varify_yesno_values $DEBUG if [ $? -eq 0 ]; then echo "Invalid DEBUG in $CONFIG_DIR/config" return 1 fi for ifcfg_file in `ls $CONFIG_DIR/cfg-eth*` do . $ifcfg_file varify_yesno_values $FCOE_ENABLE if [ $? -eq 0 ]; then echo "Invalid FCOE_ENABLE in $ifcfg_file" return 1 fi varify_yesno_values $DCB_REQUIRED if [ $? -eq 0 ]; then echo "Invalid DCB_REQUIRED in $ifcfg_file" return 1 fi done return 0 } verify_configuration if [ $? -ne 0 ]; then failure fi if [ "$USE_SYSLOG" = "yes" ] || [ "$USE_SYSLOG" = "YES" ]; then LOGGER="logger -t fcoe" FCOEMON_OPTS+=" --syslog" fi if [ "$DEBUG" = "yes" ] || [ "$DEBUG" = "YES" ]; then FCOEMON_OPTS+=" --debug" fi test -x $CONFIG_SCRIPT || { $LOGGER "$CONFIG_SCRIPT not installed"; if [ "$1" = "stop" ]; then exit 0; else failure fi } test -x $FCOEADM || { $LOGGER "$FCOEADM not installed"; if [ "$1" = "stop" ]; then exit 0; else failure fi } test -x $FCOEMON || { $LOGGER "$FCOEMON not installed"; if [ "$1" = "stop" ]; then exit 0; else failure fi } service_start() { pidof $FCOEMON if [ $? -eq 0 ]; then $LOGGER "Warning: daemon already running." return fi rm -f /var/run/fcoemon.* modprobe -q libfc modprobe -q fcoe daemon --pidfile ${PID_FILE} ${FCOEMON} ${FCOEMON_OPTS} return } service_stop() { pidof $FCOEMON [ $? -eq 0 ] && kill -TERM `pidof $FCOEMON` for ifcfg_file in `ls $CONFIG_DIR/cfg-eth*` do ifname=`basename $ifcfg_file | cut -d"-" -f2` . $ifcfg_file [ "$FCOE_ENABLE" != "yes" ] && [ "$FCOE_ENABLE" != "YES" ] && continue if [ "$DCB_REQUIRED" != "yes" ] && [ "$DCB_REQUIRED" != "YES" ]; then STATUS=`$FCOEADM -i $ifname 2>&1 | \ awk '/Symbolic Name:/{print $6}'` if [ "$STATUS" = "$ifname" ]; then $FCOEADM -d $ifname fi fi done retry_count=5 while true do [ $retry_count -eq 0 ] && break ps | grep -q fcoeplumb [ $? -ne 0 ] && [ ! -f $PID_FILE ] && break sleep 1 retry_count=$(($retry_count-1)) done rm -f /var/run/fcoemon.* rm -f /tmp/fcoemon.dcbd.* } service_status() { pidof $FCOEMON if [ $? -eq 0 ]; then echo "$FCOEMON -- RUNNING, pid=`cat $PID_FILE`" else echo "$FCOEMON -- UNUSED" fi IF_LIST=`$FCOEADM -i 2>&1 | \ awk '/Symbolic Name:/{print $6}' | \ sort | awk '{printf("%s ", $1)}'` if [ -z "$IF_LIST" ]; then echo "No interfaces created." else echo "Created interfaces: $IF_LIST" fi } case "$1" in start) $LOGGER "Service starting up" service_start ;; stop) $LOGGER "Service shutting down" service_stop ;; try-restart|condrestart) if test "$1" = "condrestart"; then $LOGGER "${attn} Use try-restart ${done}(LSB)${attn} " \ "rather than condrestart ${warn}(RH)${norm}" fi $0 status if test $? = 0; then $0 restart else failure fi ;; restart) $0 stop $0 start ;; force-reload) $0 try-restart ;; reload) $LOGGER "Service reloading" failure ;; status) service_status ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" exit 1 ;; esac fcoe-utils-1.0.9/etc/initd/initd.suse0000755000175000017500000001333411312505503016443 0ustar chuckchuck#!/bin/sh # # Copyright(c) 2009 Intel Corporation. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This program is distributed in the hope it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. # # Maintained at www.Open-FCoE.org # # # Open-FCoE User-Space Software # Based on: # Template LSB system startup script for example service/daemon FOO # Copyright (C) 1995--2005 Kurt Garloff, SUSE / Novell Inc. # # /etc/init.d/fcoe This shell script takes care of starting and stopping # of the fcoemon daemon # and its symbolic link # /sbin/rcfcoe # # chkconfig: 345 20 80 # ### BEGIN INIT INFO # Provides: fcoe # Required-Start: network # Required-Stop: # Default-Start: 3 5 # Default-Stop: 3 5 # Description: Open-FCoE SAN Setup ### END INIT INFO CONFIG_DIR=/etc/fcoe CONFIG_SCRIPT=$CONFIG_DIR/scripts/fcoeplumb PID_FILE="/var/run/fcoemon.pid" LOG_FILE="/var/log/fcoemon.log" FCOEMON=/usr/sbin/fcoemon FCOEADM=/usr/sbin/fcoeadm DCBD=dcbd LOGGER="echo" FCOEMON_OPTS= . /etc/rc.status rc_reset test -r $CONFIG_DIR/config || { $LOGGER "$CONFIG_DIR/config not installed"; if [ "$1" = "stop" ]; then exit 0; else rc_failed rc_status -v rc_exit fi } varify_yesno_values() { value=$1 case $value in "yes" | "YES" ) return 1 ;; "no" | "NO" ) return 2 ;; *) return 0 ;; esac } verify_configuration() { . $CONFIG_DIR/config varify_yesno_values $USE_SYSLOG if [ $? -eq 0 ]; then echo "Invalid USE_SYSLOG in $CONFIG_DIR/config" return 1 fi varify_yesno_values $DEBUG if [ $? -eq 0 ]; then echo "Invalid DEBUG in $CONFIG_DIR/config" return 1 fi for ifcfg_file in `ls $CONFIG_DIR/cfg-eth*` do . $ifcfg_file varify_yesno_values $FCOE_ENABLE if [ $? -eq 0 ]; then echo "Invalid FCOE_ENABLE in $ifcfg_file" return 1 fi varify_yesno_values $DCB_REQUIRED if [ $? -eq 0 ]; then echo "Invalid DCB_REQUIRED in $ifcfg_file" return 1 fi done return 0 } verify_configuration if [ $? -ne 0 ]; then rc_failed rc_status -v rc_exit fi if [ "$USE_SYSLOG" = "yes" ] || [ "$USE_SYSLOG" = "YES" ]; then LOGGER="logger -t fcoe" FCOEMON_OPTS+=" --syslog" fi if [ "$DEBUG" = "yes" ] || [ "$DEBUG" = "YES" ]; then FCOEMON_OPTS+=" --debug" fi test -x $CONFIG_SCRIPT || { $LOGGER "$CONFIG_SCRIPT not installed"; if [ "$1" = "stop" ]; then exit 0; else rc_failed rc_status -v rc_exit fi } test -x $FCOEADM || { $LOGGER "$FCOEADM not installed"; if [ "$1" = "stop" ]; then exit 0; else rc_failed rc_status -v rc_exit fi } test -x $FCOEMON || { $LOGGER "$FCOEMON not installed"; if [ "$1" = "stop" ]; then exit 0; else rc_failed rc_status -v rc_exit fi } startup_fcoe_modules() { modprobe fcoe > /dev/null 2>&1 } validate_link_flow_control() { ifname=$1 retry_count=1 while true do TX_STATUS=`ethtool -a $ifname 2>&1 | awk '/TX:/{print $2}'` RX_STATUS=`ethtool -a $ifname 2>&1 | awk '/RX:/{print $2}'` if [ "$TX_STATUS" = "on" ] && [ "$RX_STATUS" = "on" ]; then return 0 fi ethtool -A $ifname rx on tx on [ $retry_count -eq 0 ] && return 0 retry_count=$(($retry_count-1)) usleep 500000 done $LOGGER "Warning: Failed to bring up link flow control of $ifname." return 1 } service_start() { checkproc ${FCOEMON} if [ $? -eq 0 ]; then $LOGGER "Warning: daemon already running." return fi rm -f /var/run/fcoemon.* startup_fcoe_modules startproc -l ${LOG_FILE} -p ${PID_FILE} ${FCOEMON} ${FCOEMON_OPTS} rc_status -v return } service_stop() { checkproc $FCOEMON [ $? -eq 0 ] && killproc -TERM $FCOEMON for ifcfg_file in `ls $CONFIG_DIR/cfg-eth*` do ifname=`basename $ifcfg_file | cut -d"-" -f2` . $ifcfg_file [ "$FCOE_ENABLE" != "yes" ] && [ "$FCOE_ENABLE" != "YES" ] && continue if [ "$DCB_REQUIRED" != "yes" ] && [ "$DCB_REQUIRED" != "YES" ]; then STATUS=`$FCOEADM -i $ifname 2>&1 | \ awk '/Symbolic Name:/{print $6}'` if [ "$STATUS" = "$ifname" ]; then $FCOEADM -d $ifname fi fi done retry_count=5 while true do [ $retry_count -eq 0 ] && break ps | grep -q fcoeplumb [ $? -ne 0 ] && [ ! -f $PID_FILE ] && break sleep 1 retry_count=$(($retry_count-1)) done rm -f /var/run/fcoemon.* rm -f /tmp/fcoemon.dcbd.* rc_status -v } service_status() { echo -n "Checking status for fcoe service " checkproc -p ${PID_FILE} ${FCOEMON} rc_status -v IF_LIST=`$FCOEADM -i 2>&1 | \ awk '/Symbolic Name:/{print $6}' | \ sort | awk '{printf("%s ", $1)}'` if [ -z "$IF_LIST" ]; then echo "No interfaces created." else echo "Created interfaces: $IF_LIST" fi } case "$1" in start) $LOGGER "Service starting up" service_start ;; stop) $LOGGER "Service shutting down" service_stop ;; try-restart|condrestart) if test "$1" = "condrestart"; then $LOGGER "${attn} Use try-restart ${done}(LSB)${attn} " \ "rather than condrestart ${warn}(RH)${norm}" fi $0 status if test $? = 0; then $0 restart else rc_reset # Not running is not a failure. fi rc_status ;; restart) $0 stop $0 start rc_status ;; force-reload) $0 try-restart rc_status ;; reload) $LOGGER "Service reloading" rc_failed 3 rc_status -v ;; status) service_status ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" exit 1 ;; esac rc_exit fcoe-utils-1.0.9/etc/initd/initd.fcoe0000755000175000017500000000440511312505503016377 0ustar chuckchuck#!/bin/sh # # Copyright(c) 2009 Intel Corporation. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This program is distributed in the hope it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. # # Maintained at www.Open-FCoE.org # # # chkconfig: 2345 92 19 # description: OpenFC and FCoE: Fibre Channel over Ethernet SAN setup PATH=/sbin:/bin:/usr/sbin:/usr/bin HBA= FCOEADM=fcoeadm FCOE_CONF=/etc/fcoe/open-fcoe.conf # validates the ifname fcoe_gethba() { HBA= if [ ! -e $FCOE_CONF ] then echo "Open-fcoe config file $FCOE_CONF not found!" return fi # get HBA= HBA=`grep -v "#" $FCOE_CONF | grep "HBA=" | cut -f2 -d=` if ! ifconfig $HBA &> /dev/null then echo "HBA $HBA not found in $FCOE_CONF!" HBA= fi } # check fcoeadm which $FCOEADM > /dev/null 2>&1 if [ "$?" -eq "1" ] then echo "$0: $FCOEADM command not installed" >&2 exit 1 fi # Switch on start / stop argument case "$1" in start) # start fcmon lsmod | grep fcoe &> /dev/null if [ "$?" -eq "1" ] then modprobe -q fcoe 2> /dev/null if [ "$?" -eq "1" ] then echo "Failed to load FCoE driver module!" exit 1 fi fi # get HBA from conf fcoe_gethba if [ -z "$HBA" ] then echo "Please setup the config file $FCOE_CONF first!" exit 1 else $FCOEADM --create $HBA >&2 fi ;; stop) lsmod | grep fcoe &> /dev/null if [ "$?" -eq "1" ] then echo "Open-FCoE driver module not loaded!" exit 1 fi fcoe_gethba if [ -n "$HBA" ] then $FCOEADM --destroy $HBA >&2 fi ;; status) lsmod | grep fcoe &> /dev/null if [ "$?" -eq "1" ] then echo "Open-FCoE driver module not loaded!" exit 1 fi fcoe_gethba $FCOEADM --query $HBA >&2 ;; restart | reload) $0 stop $0 start ;; save) ;; *) echo "Usage: $0 {start|stop|reload|restart|status}" >&2 exit 1 ;; esac fcoe-utils-1.0.9/etc/cfg-ethx0000644000175000017500000000034411312505503014746 0ustar chuckchuck## Type: yes/no ## Default: no # Enable/Disable FCoE service at the Ethernet port FCOE_ENABLE="no" ## Type: yes/no ## Default: yes # Indicate if DCB service is required at the Ethernet port DCB_REQUIRED="yes" fcoe-utils-1.0.9/etc/config0000644000175000017500000000033511312505503014506 0ustar chuckchuck## Type: yes/no ## Default: no # Switch on/off debug messages (script & C code) DEBUG="no" ## Type: yes/no ## Default: yes # All the messages go to syslog and stderr (script & C code) USE_SYSLOG="yes" fcoe-utils-1.0.9/fcoe-utils.spec.in0000644000175000017500000000256711312505503016107 0ustar chuckchuckName: fcoe-utils Version: @VERSION@ Release: 1%{?dist} Summary: Fibre Channel over Ethernet utilities Group: Applications/System License: GPLv2 URL: http://www.open-fcoe.org Source0: http://www.open-fcoe.org/openfc/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libHBAAPI-devel dcbd-devel Requires: dcbd Requires(post): chkconfig Requires(preun): chkconfig initscripts Requires(postun): initscripts %description Fibre Channel over Ethernet utilities fcoeadm - command line tool for configuring FCoE interfaces fcoemon - service to configure DCB Ethernet QOS filters, works with dcbd %prep %setup -q %build %configure make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add fcoe %preun if [ $1 = 0 ]; then /sbin/service fcoe stop /sbin/chkconfig --del fcoe fi %postun if [ $1 = 1 ]; then /sbin/service fcoe condrestart fi %files %defattr(-,root,root,-) %doc README %doc COPYING %{_sbindir}/* %{_mandir}/man8/* %{_sysconfdir}/fcoe %config(noreplace) %{_sysconfdir}/fcoe/config %{_sysconfdir}/init.d/fcoe %changelog * Mon Mar 2 2009 Chris Leech - 1.0.7-1 - initial rpm build of fcoe tools fcoe-utils-1.0.9/fcnsq.c0000644000175000017500000002372411312505503014030 0ustar chuckchuck/* * Copyright(c) 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Maintained at www.Open-FCoE.org */ #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include typedef __u8 u8; typedef __u16 u16; typedef __u32 u32; typedef __u64 u64; #include #include #include #include #include static bool quiet = false; static int print_result(const char *prefix, const char *format, ...) { va_list ap; int rc; va_start(ap, format); if (!quiet) printf("%s: ", prefix); rc = vprintf(format, ap); va_end(ap); return rc; } static int print_err(const char *format, ...) { va_list ap; int rc; if (quiet) return 0; va_start(ap, format); rc = vprintf(format, ap); va_end(ap); return rc; } #define ntoh24(n) (u32) ((n)[0] << 16 | (n)[1] << 8 | (n)[2]) #define hton24(h) { (h) >> 16 & 0xff, (h) >> 8 & 0xff, (h) & 0xff } static u64 ntohll(u64 netll) { u8 *_netll = (u8 *)&netll; return (u64) _netll[0] << (7 * 8) | (u64) _netll[1] << (6 * 8) | (u64) _netll[2] << (5 * 8) | (u64) _netll[3] << (4 * 8) | (u64) _netll[4] << (3 * 8) | (u64) _netll[5] << (2 * 8) | (u64) _netll[6] << (1 * 8) | (u64) _netll[7]; } static u64 htonll(u64 hostll) { u64 netll; u8 *_netll = (u8 *)&netll; _netll[0] = hostll >> (7 * 8) & 0xff; _netll[1] = hostll >> (6 * 8) & 0xff; _netll[2] = hostll >> (5 * 8) & 0xff; _netll[3] = hostll >> (4 * 8) & 0xff; _netll[4] = hostll >> (3 * 8) & 0xff; _netll[5] = hostll >> (2 * 8) & 0xff; _netll[6] = hostll >> (1 * 8) & 0xff; _netll[7] = hostll & 0xff; return netll; } static char* rjt_reason[] = { [1] = "Invalid command code", [2] = "Invalid version level", [3] = "Logical error", [4] = "Invalid CT_IU size", [5] = "Logical busy", [7] = "Protocol error", [9] = "Unable to perform command request", [0xB] = "Command not supported", [0xD] = "Server not available", [0xE] = "Session could not be established", }; static char* rjt_explan[] = { [0] = "No additional explanation", [1] = "Port Identifier not registered", [2] = "Port Name not registered", [3] = "Node Name not registered", [4] = "Class of Service not registered", [6] = "Initial Process Associator not registered", [7] = "FC-4 Types not registered", [8] = "Symbolic Port Name not registered", [9] = "Symbolic Node Name not registered", [0xA] = "Port Type not registered", [0xC] = "Fabric Port Name not registered", [0xD] = "Hard Address not registered", [0xF] = "FC-4 Features not registered", [0x10] = "Access denied", [0x11] = "Unacceptable Port Identifier", [0x12] = "Data base empty", [0x13] = "No object registered in the specified scope", [0x14] = "Domain ID not present", [0x15] = "Port number not present", [0x16] = "No device attached", [0xf0] = "Authorization Exception", [0xf1] = "Authentication Exception", [0xf2] = "Data base full", [0xf3] = "Data base empty", [0xf4] = "Processing request", [0xf5] = "Unable to verify connection", [0xf6] = "Devices not in a common zone", }; static u16 ct_rjt(u8 reason, u8 explan) { return (u16) reason << 8 | explan; } static u8 ct_rjt_reason(u16 rjt) { return (u8) rjt >> 8; } static u8 ct_rjt_explan(u16 rjt) { return (u8) rjt & 0xff; } static int ns_query(int bsg, void *req, int req_len, void *resp, int resp_len) { char sense[96]; struct fc_bsg_request cdb = { .msgcode = FC_BSG_HST_CT, .rqst_data.h_ct = { .port_id = hton24(0xfffffc), } }; struct sg_io_v4 sgio = { .guard = 'Q', .protocol = BSG_PROTOCOL_SCSI, .subprotocol = BSG_SUB_PROTOCOL_SCSI_TRANSPORT, .request_len = sizeof(cdb), .request = (u64) &cdb, .dout_xfer_len = req_len, .dout_xferp = (u64) req, .din_xfer_len = resp_len, .din_xferp = (u64) resp, .max_response_len = sizeof(sense), .response = (u64) &sense, .timeout = 1000, }; return ioctl(bsg, SG_IO, &sgio); } static u16 gn_id(int bsg, u32 fcid, u16 cmd, u64 *wwn) { struct { struct fc_ct_hdr hdr; u64 wwn; } __attribute__((__packed__)) gn_resp; struct { struct fc_ct_hdr hdr; u8 resv; u8 port_id[3]; } __attribute__((__packed__)) gn = { .hdr = { .ct_rev = FC_CT_REV, .ct_fs_type = FC_FST_DIR, .ct_fs_subtype = FC_NS_SUBTYPE, .ct_cmd = htons(cmd), .ct_mr_size = htons(sizeof(gn_resp)), }, .port_id = hton24(fcid), }; if (ns_query(bsg, &gn, sizeof(gn), &gn_resp, sizeof(gn_resp)) < 0) return ~0; if (gn_resp.hdr.ct_cmd != htons(FC_FS_ACC)) return ct_rjt(gn_resp.hdr.ct_reason, gn_resp.hdr.ct_explan); *wwn = ntohll(gn_resp.wwn); return 0; } #define FC_NS_GPN_ID 0x0112 static int gpn_id(int bsg, u32 fcid) { u64 wwpn; u16 rjt; rjt = gn_id(bsg, fcid, FC_NS_GPN_ID, &wwpn); if (rjt) goto fail; print_result("Port Name", "%16.16llx\n", wwpn); return 0; fail: if (rjt == ~0) print_err("%s ioctl failed: %s\n", __func__, strerror(errno)); else print_err("%s command failed: %s, %s\n", __func__, rjt_reason[ct_rjt_reason(rjt)], rjt_explan[ct_rjt_explan(rjt)]); return rjt; } #define FC_NS_GNN_ID 0x0113 static int gnn_id(int bsg, u32 fcid) { u64 wwnn; u16 rjt; rjt = gn_id(bsg, fcid, FC_NS_GNN_ID, &wwnn); if (rjt) goto fail; print_result("Node Name", "%16.16llx\n", wwnn); return 0; fail: if (rjt == ~0) print_err("%s ioctl failed: %s\n", __func__, strerror(errno)); else print_err("%s command failed: %s, %s\n", __func__, rjt_reason[ct_rjt_reason(rjt)], rjt_explan[ct_rjt_explan(rjt)]); return rjt; } #define FC_NS_GSPN_ID 0x0118 static int gspn_id(int bsg, u32 fcid) { struct { struct fc_ct_hdr hdr; u8 len; char name[255]; } __attribute__((__packed__)) gspn_resp; struct { struct fc_ct_hdr hdr; u8 resv; u8 port_id[3]; } __attribute__((__packed__)) gspn = { .hdr = { .ct_rev = FC_CT_REV, .ct_fs_type = FC_FST_DIR, .ct_fs_subtype = FC_NS_SUBTYPE, .ct_cmd = htons(FC_NS_GSPN_ID), .ct_mr_size = htons(sizeof(gspn_resp)), }, .port_id = hton24(fcid), }; if (ns_query(bsg, &gspn, sizeof(gspn), &gspn_resp, sizeof(gspn_resp)) < 0) { print_err("%s ioctl failed: %s\n", __func__, strerror(errno)); return ~0; } if (gspn_resp.hdr.ct_cmd != htons(FC_FS_ACC)) { print_err("%s command failed: %s, %s\n", __func__, rjt_reason[gspn_resp.hdr.ct_reason], rjt_explan[gspn_resp.hdr.ct_explan]); return ct_rjt(gspn_resp.hdr.ct_reason, gspn_resp.hdr.ct_explan); } print_result("Symbolic Port Name", "%s\n", gspn_resp.name); return 0; } #define FC_NS_GSNN_NN 0x0139 static int gsnn_nn(int bsg, u64 wwnn) { struct { struct fc_ct_hdr hdr; u8 len; char name[255]; } __attribute__((__packed__)) gsnn_resp; struct { struct fc_ct_hdr hdr; u64 wwnn; } __attribute__((__packed__)) gsnn = { .hdr = { .ct_rev = FC_CT_REV, .ct_fs_type = FC_FST_DIR, .ct_fs_subtype = FC_NS_SUBTYPE, .ct_cmd = htons(FC_NS_GSNN_NN), .ct_mr_size = htons(sizeof(gsnn_resp)), }, .wwnn = htonll(wwnn), }; if (ns_query(bsg, &gsnn, sizeof(gsnn), &gsnn_resp, sizeof(gsnn_resp)) < 0) { print_err("%s ioctl failed: %s\n", __func__, strerror(errno)); return ~0; } if (gsnn_resp.hdr.ct_cmd != htons(FC_FS_ACC)) { print_err("%s command failed: %s, %s\n", __func__, rjt_reason[gsnn_resp.hdr.ct_reason], rjt_explan[gsnn_resp.hdr.ct_explan]); return ct_rjt(gsnn_resp.hdr.ct_reason, gsnn_resp.hdr.ct_explan); } print_result("Symbolic Node Name", "%s\n", gsnn_resp.name); return 0; } enum commands { NONE = 0, GPN_ID, GNN_ID, GSPN_ID, GSNN_NN, }; static const struct option options[] = { { "gpn", required_argument, NULL, GPN_ID }, { "gnn", required_argument, NULL, GNN_ID }, { "gspn", required_argument, NULL, GSPN_ID }, { "gsnn", required_argument, NULL, GSNN_NN }, { "quiet", no_argument, NULL, 'q' }, { NULL, 0, NULL, 0 }, }; static void help(int status) { printf( "Usage: fcnsq [options]\n" "Commands:\n" " --gpn \n" " --gnn \n" " --gspn \n" " --gsnn \n" "Options:\n" " --quiet print minimal results on success, and no error messages\n" "\n" "Port IDs and World Wide Names must be specified in hexadecimal.\n" ); exit(status); } int main(int argc, char *argv[]) { char *bsg; int bsg_dev; u32 port_id; u64 wwnn; int rc = 0; enum commands cmd = 0; char c; while(1) { c = getopt_long_only(argc, argv, "", options, NULL); if (c < 0) break; switch(c) { case '?': help(-1); break; case 'q': quiet = true; break; case GPN_ID: case GNN_ID: case GSPN_ID: if (cmd) help(-1); cmd = c; sscanf(optarg, "%x", &port_id); break; case GSNN_NN: if (cmd) help(-1); cmd = c; sscanf(optarg, "%llx", &wwnn); break; } } if (cmd == NONE) help(-1); if (asprintf(&bsg, "/dev/bsg/fc_%s", argv[optind]) < 0) { if (!quiet) perror(NULL); return -1; } bsg_dev = open(bsg, O_RDWR); if (bsg_dev < 0) { if (!quiet) perror(bsg); return -1; } switch (cmd) { case GPN_ID: rc = gpn_id(bsg_dev, port_id); break; case GNN_ID: rc = gnn_id(bsg_dev, port_id); break; case GSPN_ID: rc = gspn_id(bsg_dev, port_id); break; case GSNN_NN: rc = gsnn_nn(bsg_dev, wwnn); break; default: help(-1); break; }; close(bsg_dev); free(bsg); return rc; } fcoe-utils-1.0.9/Makefile.am0000644000175000017500000000463711312505504014611 0ustar chuckchuck## target programs, to be built and installed in $(prefix)/sbin sbin_PROGRAMS = fcoeadm fipvlan if WITH_DCB sbin_PROGRAMS += fcoemon endif ## all targets should look for headers in the include directory AM_CPPFLAGS = -Wall -I${srcdir}/include ## pass the sysconfdir into the C proprocessor AM_CFLAGS = -DSYSCONFDIR="\"${sysconfdir}\"" ## rules for building fcoeadm ## only listed sources get packaged, so must list all headers too fcoeadm_SOURCES = fcoeadm_display.c fcoeadm.c fcoeadm.h fcoe_utils.h \ include/fc_scsi.h include/fc_types.h include/net_types.h ## fcoeadm uses HBAAPI, so get the right flags for compiling and linking fcoeadm_CFLAGS = $(HBAAPI_CFLAGS) fcoeadm_LDFLAGS = $(HBAAPI_LIBS) ## rules for building fcping ## only listed sources get packaged, so must list all headers too #fcping_SOURCES = fcping.c ## fcping uses HBAAPI, so get the right flags for compiling and linking #fcping_CFLAGS = $(HBAAPI_CFLAGS) #fcping_LDFLAGS = $(HBAAPI_LIBS) -lrt ## rules for building fcoemon ## only listed sources get packaged, so must list all headers too fcoemon_SOURCES = fcoemon_utils.c fcoemon.c fcoemon.h fcoemon_utils.h \ fcoe_utils.h include/fc_scsi.h include/fc_types.h include/net_types.h ## fcoemon needs headers from dcbd, get the right include path for them fcoemon_CFLAGS = $(DCBD_CFLAGS) fcoemon_LDFLAGS = -lrt ## rules for building fipvlan ## only listed sources get packaged, so must list all headers too fipvlan_SOURCES = fipvlan.c fcoe_utils.h include/fip.h \ log.c include/log.h include/list.h ## install configuration file in $(prefix)/etc/fcoe fcoe_configdir = ${sysconfdir}/fcoe dist_fcoe_config_DATA = etc/config etc/cfg-ethx ## install fcoeplumb script in $(prefix)/etc/fcoe/scripts fcoe_scriptsdir = ${sysconfdir}/fcoe/scripts fcoe_scripts_SCRIPTS = fcoeplumb ## man pages for fcoeadm and fcoemon dist_man_MANS = doc/fcoeadm.8 if WITH_DCB dist_man_MANS += doc/fcoemon.8 endif ## init script for fcoemon dist_noinst_SCRIPTS = etc/initd/initd.fcoe etc/initd/initd.suse etc/initd/initd.fedora CLEANFILES = etc/initd/fcoe etc/initd/fcoe: mkdir -p etc/initd if [ -f /etc/fedora-release ]; then \ ln -s ${abs_srcdir}/etc/initd/initd.fedora $@; \ elif [ -f /etc/SuSE-release ]; then \ ln -s ${abs_srcdir}/etc/initd/initd.suse $@; \ else \ ln -s ${abs_srcdir}/etc/initd/initd.fcoe $@; \ fi init_ddir = ${sysconfdir}/init.d init_d_SCRIPTS = etc/initd/fcoe dist_noinst_DATA = README COPYING INSTALL fcoe-utils.spec fcoe-utils-1.0.9/Makefile.in0000644000175000017500000011125211336572515014626 0ustar chuckchuck# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : sbin_PROGRAMS = fcoeadm$(EXEEXT) fipvlan$(EXEEXT) $(am__EXEEXT_1) @WITH_DCB_TRUE@am__append_1 = fcoemon @WITH_DCB_TRUE@am__append_2 = doc/fcoemon.8 subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_fcoe_config_DATA) \ $(dist_man_MANS) $(dist_noinst_DATA) $(dist_noinst_SCRIPTS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/fcoe-utils.spec.in $(srcdir)/fcoe_utils.h.in \ $(srcdir)/fcoeplumb.in $(top_srcdir)/configure COPYING INSTALL \ compile depcomp install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = fcoeplumb fcoe-utils.spec fcoe_utils.h CONFIG_CLEAN_VPATH_FILES = @WITH_DCB_TRUE@am__EXEEXT_1 = fcoemon$(EXEEXT) am__installdirs = "$(DESTDIR)$(sbindir)" \ "$(DESTDIR)$(fcoe_scriptsdir)" "$(DESTDIR)$(init_ddir)" \ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(fcoe_configdir)" PROGRAMS = $(sbin_PROGRAMS) am_fcoeadm_OBJECTS = fcoeadm-fcoeadm_display.$(OBJEXT) \ fcoeadm-fcoeadm.$(OBJEXT) fcoeadm_OBJECTS = $(am_fcoeadm_OBJECTS) fcoeadm_LDADD = $(LDADD) fcoeadm_LINK = $(CCLD) $(fcoeadm_CFLAGS) $(CFLAGS) $(fcoeadm_LDFLAGS) \ $(LDFLAGS) -o $@ am_fcoemon_OBJECTS = fcoemon-fcoemon_utils.$(OBJEXT) \ fcoemon-fcoemon.$(OBJEXT) fcoemon_OBJECTS = $(am_fcoemon_OBJECTS) fcoemon_LDADD = $(LDADD) fcoemon_LINK = $(CCLD) $(fcoemon_CFLAGS) $(CFLAGS) $(fcoemon_LDFLAGS) \ $(LDFLAGS) -o $@ am_fipvlan_OBJECTS = fipvlan.$(OBJEXT) log.$(OBJEXT) fipvlan_OBJECTS = $(am_fipvlan_OBJECTS) fipvlan_LDADD = $(LDADD) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' SCRIPTS = $(dist_noinst_SCRIPTS) $(fcoe_scripts_SCRIPTS) \ $(init_d_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(fcoeadm_SOURCES) $(fcoemon_SOURCES) $(fipvlan_SOURCES) DIST_SOURCES = $(fcoeadm_SOURCES) $(fcoemon_SOURCES) \ $(fipvlan_SOURCES) man8dir = $(mandir)/man8 NROFF = nroff MANS = $(dist_man_MANS) DATA = $(dist_fcoe_config_DATA) $(dist_noinst_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DCBD_CFLAGS = @DCBD_CFLAGS@ DCBD_LIBS = @DCBD_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ HBAAPI_CFLAGS = @HBAAPI_CFLAGS@ HBAAPI_LIBS = @HBAAPI_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -Wall -I${srcdir}/include AM_CFLAGS = -DSYSCONFDIR="\"${sysconfdir}\"" fcoeadm_SOURCES = fcoeadm_display.c fcoeadm.c fcoeadm.h fcoe_utils.h \ include/fc_scsi.h include/fc_types.h include/net_types.h fcoeadm_CFLAGS = $(HBAAPI_CFLAGS) fcoeadm_LDFLAGS = $(HBAAPI_LIBS) #fcping_SOURCES = fcping.c #fcping_CFLAGS = $(HBAAPI_CFLAGS) #fcping_LDFLAGS = $(HBAAPI_LIBS) -lrt fcoemon_SOURCES = fcoemon_utils.c fcoemon.c fcoemon.h fcoemon_utils.h \ fcoe_utils.h include/fc_scsi.h include/fc_types.h include/net_types.h fcoemon_CFLAGS = $(DCBD_CFLAGS) fcoemon_LDFLAGS = -lrt fipvlan_SOURCES = fipvlan.c fcoe_utils.h include/fip.h \ log.c include/log.h include/list.h fcoe_configdir = ${sysconfdir}/fcoe dist_fcoe_config_DATA = etc/config etc/cfg-ethx fcoe_scriptsdir = ${sysconfdir}/fcoe/scripts fcoe_scripts_SCRIPTS = fcoeplumb dist_man_MANS = doc/fcoeadm.8 $(am__append_2) dist_noinst_SCRIPTS = etc/initd/initd.fcoe etc/initd/initd.suse etc/initd/initd.fedora CLEANFILES = etc/initd/fcoe init_ddir = ${sysconfdir}/init.d init_d_SCRIPTS = etc/initd/fcoe dist_noinst_DATA = README COPYING INSTALL fcoe-utils.spec all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): fcoeplumb: $(top_builddir)/config.status $(srcdir)/fcoeplumb.in cd $(top_builddir) && $(SHELL) ./config.status $@ fcoe-utils.spec: $(top_builddir)/config.status $(srcdir)/fcoe-utils.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ fcoe_utils.h: $(top_builddir)/config.status $(srcdir)/fcoe_utils.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) fcoeadm$(EXEEXT): $(fcoeadm_OBJECTS) $(fcoeadm_DEPENDENCIES) @rm -f fcoeadm$(EXEEXT) $(fcoeadm_LINK) $(fcoeadm_OBJECTS) $(fcoeadm_LDADD) $(LIBS) fcoemon$(EXEEXT): $(fcoemon_OBJECTS) $(fcoemon_DEPENDENCIES) @rm -f fcoemon$(EXEEXT) $(fcoemon_LINK) $(fcoemon_OBJECTS) $(fcoemon_LDADD) $(LIBS) fipvlan$(EXEEXT): $(fipvlan_OBJECTS) $(fipvlan_DEPENDENCIES) @rm -f fipvlan$(EXEEXT) $(LINK) $(fipvlan_OBJECTS) $(fipvlan_LDADD) $(LIBS) install-fcoe_scriptsSCRIPTS: $(fcoe_scripts_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(fcoe_scriptsdir)" || $(MKDIR_P) "$(DESTDIR)$(fcoe_scriptsdir)" @list='$(fcoe_scripts_SCRIPTS)'; test -n "$(fcoe_scriptsdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(fcoe_scriptsdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(fcoe_scriptsdir)$$dir" || exit $$?; \ } \ ; done uninstall-fcoe_scriptsSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(fcoe_scripts_SCRIPTS)'; test -n "$(fcoe_scriptsdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(fcoe_scriptsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(fcoe_scriptsdir)" && rm -f $$files install-init_dSCRIPTS: $(init_d_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(init_ddir)" || $(MKDIR_P) "$(DESTDIR)$(init_ddir)" @list='$(init_d_SCRIPTS)'; test -n "$(init_ddir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(init_ddir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(init_ddir)$$dir" || exit $$?; \ } \ ; done uninstall-init_dSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(init_d_SCRIPTS)'; test -n "$(init_ddir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(init_ddir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(init_ddir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcoeadm-fcoeadm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcoeadm-fcoeadm_display.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcoemon-fcoemon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcoemon-fcoemon_utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fipvlan.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` fcoeadm-fcoeadm_display.o: fcoeadm_display.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoeadm_CFLAGS) $(CFLAGS) -MT fcoeadm-fcoeadm_display.o -MD -MP -MF $(DEPDIR)/fcoeadm-fcoeadm_display.Tpo -c -o fcoeadm-fcoeadm_display.o `test -f 'fcoeadm_display.c' || echo '$(srcdir)/'`fcoeadm_display.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fcoeadm-fcoeadm_display.Tpo $(DEPDIR)/fcoeadm-fcoeadm_display.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fcoeadm_display.c' object='fcoeadm-fcoeadm_display.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoeadm_CFLAGS) $(CFLAGS) -c -o fcoeadm-fcoeadm_display.o `test -f 'fcoeadm_display.c' || echo '$(srcdir)/'`fcoeadm_display.c fcoeadm-fcoeadm_display.obj: fcoeadm_display.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoeadm_CFLAGS) $(CFLAGS) -MT fcoeadm-fcoeadm_display.obj -MD -MP -MF $(DEPDIR)/fcoeadm-fcoeadm_display.Tpo -c -o fcoeadm-fcoeadm_display.obj `if test -f 'fcoeadm_display.c'; then $(CYGPATH_W) 'fcoeadm_display.c'; else $(CYGPATH_W) '$(srcdir)/fcoeadm_display.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fcoeadm-fcoeadm_display.Tpo $(DEPDIR)/fcoeadm-fcoeadm_display.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fcoeadm_display.c' object='fcoeadm-fcoeadm_display.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoeadm_CFLAGS) $(CFLAGS) -c -o fcoeadm-fcoeadm_display.obj `if test -f 'fcoeadm_display.c'; then $(CYGPATH_W) 'fcoeadm_display.c'; else $(CYGPATH_W) '$(srcdir)/fcoeadm_display.c'; fi` fcoeadm-fcoeadm.o: fcoeadm.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoeadm_CFLAGS) $(CFLAGS) -MT fcoeadm-fcoeadm.o -MD -MP -MF $(DEPDIR)/fcoeadm-fcoeadm.Tpo -c -o fcoeadm-fcoeadm.o `test -f 'fcoeadm.c' || echo '$(srcdir)/'`fcoeadm.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fcoeadm-fcoeadm.Tpo $(DEPDIR)/fcoeadm-fcoeadm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fcoeadm.c' object='fcoeadm-fcoeadm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoeadm_CFLAGS) $(CFLAGS) -c -o fcoeadm-fcoeadm.o `test -f 'fcoeadm.c' || echo '$(srcdir)/'`fcoeadm.c fcoeadm-fcoeadm.obj: fcoeadm.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoeadm_CFLAGS) $(CFLAGS) -MT fcoeadm-fcoeadm.obj -MD -MP -MF $(DEPDIR)/fcoeadm-fcoeadm.Tpo -c -o fcoeadm-fcoeadm.obj `if test -f 'fcoeadm.c'; then $(CYGPATH_W) 'fcoeadm.c'; else $(CYGPATH_W) '$(srcdir)/fcoeadm.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fcoeadm-fcoeadm.Tpo $(DEPDIR)/fcoeadm-fcoeadm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fcoeadm.c' object='fcoeadm-fcoeadm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoeadm_CFLAGS) $(CFLAGS) -c -o fcoeadm-fcoeadm.obj `if test -f 'fcoeadm.c'; then $(CYGPATH_W) 'fcoeadm.c'; else $(CYGPATH_W) '$(srcdir)/fcoeadm.c'; fi` fcoemon-fcoemon_utils.o: fcoemon_utils.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoemon_CFLAGS) $(CFLAGS) -MT fcoemon-fcoemon_utils.o -MD -MP -MF $(DEPDIR)/fcoemon-fcoemon_utils.Tpo -c -o fcoemon-fcoemon_utils.o `test -f 'fcoemon_utils.c' || echo '$(srcdir)/'`fcoemon_utils.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fcoemon-fcoemon_utils.Tpo $(DEPDIR)/fcoemon-fcoemon_utils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fcoemon_utils.c' object='fcoemon-fcoemon_utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoemon_CFLAGS) $(CFLAGS) -c -o fcoemon-fcoemon_utils.o `test -f 'fcoemon_utils.c' || echo '$(srcdir)/'`fcoemon_utils.c fcoemon-fcoemon_utils.obj: fcoemon_utils.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoemon_CFLAGS) $(CFLAGS) -MT fcoemon-fcoemon_utils.obj -MD -MP -MF $(DEPDIR)/fcoemon-fcoemon_utils.Tpo -c -o fcoemon-fcoemon_utils.obj `if test -f 'fcoemon_utils.c'; then $(CYGPATH_W) 'fcoemon_utils.c'; else $(CYGPATH_W) '$(srcdir)/fcoemon_utils.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fcoemon-fcoemon_utils.Tpo $(DEPDIR)/fcoemon-fcoemon_utils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fcoemon_utils.c' object='fcoemon-fcoemon_utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoemon_CFLAGS) $(CFLAGS) -c -o fcoemon-fcoemon_utils.obj `if test -f 'fcoemon_utils.c'; then $(CYGPATH_W) 'fcoemon_utils.c'; else $(CYGPATH_W) '$(srcdir)/fcoemon_utils.c'; fi` fcoemon-fcoemon.o: fcoemon.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoemon_CFLAGS) $(CFLAGS) -MT fcoemon-fcoemon.o -MD -MP -MF $(DEPDIR)/fcoemon-fcoemon.Tpo -c -o fcoemon-fcoemon.o `test -f 'fcoemon.c' || echo '$(srcdir)/'`fcoemon.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fcoemon-fcoemon.Tpo $(DEPDIR)/fcoemon-fcoemon.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fcoemon.c' object='fcoemon-fcoemon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoemon_CFLAGS) $(CFLAGS) -c -o fcoemon-fcoemon.o `test -f 'fcoemon.c' || echo '$(srcdir)/'`fcoemon.c fcoemon-fcoemon.obj: fcoemon.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoemon_CFLAGS) $(CFLAGS) -MT fcoemon-fcoemon.obj -MD -MP -MF $(DEPDIR)/fcoemon-fcoemon.Tpo -c -o fcoemon-fcoemon.obj `if test -f 'fcoemon.c'; then $(CYGPATH_W) 'fcoemon.c'; else $(CYGPATH_W) '$(srcdir)/fcoemon.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fcoemon-fcoemon.Tpo $(DEPDIR)/fcoemon-fcoemon.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fcoemon.c' object='fcoemon-fcoemon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fcoemon_CFLAGS) $(CFLAGS) -c -o fcoemon-fcoemon.obj `if test -f 'fcoemon.c'; then $(CYGPATH_W) 'fcoemon.c'; else $(CYGPATH_W) '$(srcdir)/fcoemon.c'; fi` install-man8: $(dist_man_MANS) @$(NORMAL_INSTALL) test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" @list=''; test -n "$(man8dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.8[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ done; } uninstall-man8: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man8dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.8[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } install-dist_fcoe_configDATA: $(dist_fcoe_config_DATA) @$(NORMAL_INSTALL) test -z "$(fcoe_configdir)" || $(MKDIR_P) "$(DESTDIR)$(fcoe_configdir)" @list='$(dist_fcoe_config_DATA)'; test -n "$(fcoe_configdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(fcoe_configdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(fcoe_configdir)" || exit $$?; \ done uninstall-dist_fcoe_configDATA: @$(NORMAL_UNINSTALL) @list='$(dist_fcoe_config_DATA)'; test -n "$(fcoe_configdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(fcoe_configdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(fcoe_configdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) installdirs: for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(fcoe_scriptsdir)" "$(DESTDIR)$(init_ddir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(fcoe_configdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_fcoe_configDATA \ install-fcoe_scriptsSCRIPTS install-init_dSCRIPTS install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man8 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_fcoe_configDATA \ uninstall-fcoe_scriptsSCRIPTS uninstall-init_dSCRIPTS \ uninstall-man uninstall-sbinPROGRAMS uninstall-man: uninstall-man8 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-generic clean-sbinPROGRAMS ctags dist dist-all \ dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-compile \ distclean-generic distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_fcoe_configDATA install-dvi install-dvi-am \ install-exec install-exec-am install-fcoe_scriptsSCRIPTS \ install-html install-html-am install-info install-info-am \ install-init_dSCRIPTS install-man install-man8 install-pdf \ install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-dist_fcoe_configDATA \ uninstall-fcoe_scriptsSCRIPTS uninstall-init_dSCRIPTS \ uninstall-man uninstall-man8 uninstall-sbinPROGRAMS etc/initd/fcoe: mkdir -p etc/initd if [ -f /etc/fedora-release ]; then \ ln -s ${abs_srcdir}/etc/initd/initd.fedora $@; \ elif [ -f /etc/SuSE-release ]; then \ ln -s ${abs_srcdir}/etc/initd/initd.suse $@; \ else \ ln -s ${abs_srcdir}/etc/initd/initd.fcoe $@; \ fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: fcoe-utils-1.0.9/bootstrap.sh0000755000175000017500000000005011312505503015111 0ustar chuckchuck#! /bin/sh exec autoreconf --install -s fcoe-utils-1.0.9/fcping.c0000644000175000017500000005236711312505504014172 0ustar chuckchuck/* * Copyright(c) 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Maintained at www.Open-FCoE.org */ /* * FCPing - FC fabric diagnostic. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "net_types.h" #include "fc_types.h" typedef uint8_t u8; #include #include #include #include #include static const char *cmdname; #define FC_MAX_PAYLOAD (2112U - sizeof(net32_t)) #define MAX_SENSE_LEN 96 /* SCSI_SENSE_BUFFERSIZE */ #define MAX_HBA_COUNT 128 #define FP_LEN_DEF 32 /* default ping payload length */ #define FP_LEN_PAD 32 /* extra length for response */ #define FP_MIN_INTVL 0.001 /* minimum interval in seconds */ #define FP_DEF_INTVL 1.000 /* default sending interval in seconds */ #define SYSFS_HBA_DIR "/sys/class/net" static void fp_usage() { fprintf(stderr, "Usage: %s [-fqx] -i -c -h -s \\\n" " [ -F | -P | -N ]\n" " flags: \n" " -f: Flood ping\n" " -q: Quiet! just print summary\n" " -x: Hex dump of responses\n" " -i : Wait seconds between each ping\n" " -c : Stop after sending pings\n" " -h : eth, MAC address, WWPN, or FC-ID of the HBA\n" " -s : Byte-length of ping request payload (max %ld)\n" " -F : Destination port ID\n" " -P : Destination world-wide port name\n" " -N : Destination world-wide node name\n", cmdname, FC_MAX_PAYLOAD); exit(1); } static fc_fid_t fp_did; static fc_wwn_t fp_port_wwn; static fc_wwn_t fp_node_wwn; static int fp_count = -1; /* send indefinitely by default */ static uint32_t fp_len = FP_LEN_DEF; static int fp_flood; /* send as fast as possible */ static uint32_t fp_interval = FP_DEF_INTVL * 1000; /* in milliseconds */ static int fp_quiet; static int fp_hex; static char *fp_hba; /* name of interface to be used */ static int fp_hba_type; #define FP_HBA_FCID_TYPE 1 #define FP_HBA_WWPN_TYPE 2 #define FP_HBA_HOST_TYPE 3 #define FP_HBA_ETH_TYPE 4 static char fp_dev[64]; static int fp_fd; /* file descriptor for openfc ioctls */ static void *fp_buf; /* sending buffer */ static int fp_debug; struct fp_stats { uint32_t fp_tx_frames; uint32_t fp_rx_frames; uint32_t fp_rx_errors; uint64_t fp_transit_time_us; /* total transit time in microseconds */ uint32_t fp_rx_times; /* valid times on receive */ }; static struct fp_stats fp_stats; #define hton24(p, v) \ do { \ p[0] = (((v) >> 16) & 0xFF); \ p[1] = (((v) >> 8) & 0xFF); \ p[2] = ((v) & 0xFF); \ } while (0) #define hton64(p, v) \ do { \ p[0] = (u_char) ((v) >> 56) & 0xFF; \ p[1] = (u_char) ((v) >> 48) & 0xFF; \ p[2] = (u_char) ((v) >> 40) & 0xFF; \ p[3] = (u_char) ((v) >> 32) & 0xFF; \ p[4] = (u_char) ((v) >> 24) & 0xFF; \ p[5] = (u_char) ((v) >> 16) & 0xFF; \ p[6] = (u_char) ((v) >> 8) & 0xFF; \ p[7] = (u_char) (v) & 0xFF; \ } while (0) static void sa_log_func(const char *func, const char *format, ...); static void sa_log_err(int, const char *func, const char *format, ...); static void sa_log_output(const char *buf); /* * Log message. */ #define SA_LOG(...) \ do { sa_log_func(__func__, __VA_ARGS__); } while (0) #define SA_LOG_ERR(error, ...) \ do { sa_log_err(error, NULL, __VA_ARGS__); } while (0) /* * Logging exits. */ #define SA_LOG_EXIT(...) \ do { sa_log_func(__func__, __VA_ARGS__); \ if (fp_debug) \ sa_log_func(__func__, \ "Exiting at %s:%d", __FILE__, __LINE__); \ exit(1); \ } while (0) #define SA_LOG_ERR_EXIT(error, ...) \ do { sa_log_func(__func__, __VA_ARGS__); \ if (fp_debug) \ sa_log_err(error, __func__, \ "Exiting at %s:%d", __FILE__, __LINE__); \ else \ sa_log_err(error, NULL, NULL); \ exit(1); \ } while (0) #define SA_LOG_BUF_LEN 200 /* on-stack line buffer size */ /* * log with a variable argument list. */ static void sa_log_va(const char *func, const char *format, va_list arg) { size_t len; size_t flen; int add_newline; char sa_buf[SA_LOG_BUF_LEN]; char *bp; /* * If the caller didn't provide a newline at the end, we will. */ len = strlen(format); add_newline = 0; if (!len || format[len - 1] != '\n') add_newline = 1; bp = sa_buf; len = sizeof(sa_buf); if (func) { flen = snprintf(bp, len, "%s: ", func); len -= flen; bp += flen; } flen = vsnprintf(bp, len, format, arg); if (add_newline && flen < len) { bp += flen; *bp++ = '\n'; *bp = '\0'; } sa_log_output(sa_buf); } /* * log with function name. */ static void sa_log_func(const char *func, const char *format, ...) { va_list arg; va_start(arg, format); if (fp_debug) sa_log_va(func, format, arg); else sa_log_va(NULL, format, arg); va_end(arg); } /* * log with error number. */ static void sa_log_err(int error, const char *func, const char *format, ...) { va_list arg; char buf[SA_LOG_BUF_LEN]; strerror_r(error, buf, sizeof(buf)); sa_log_func(func, "errno=%d %s", error, buf); if (format) { va_start(arg, format); sa_log_va(func, format, arg); va_end(arg); } } static void sa_log_output(const char *buf) { fprintf(stderr, "%s", buf); fflush(stderr); } static char * sa_hex_format(char *buf, size_t buflen, const unsigned char *data, size_t data_len, unsigned int group_len, char *inter_group_sep) { size_t rlen, tlen; char *bp, *sep; unsigned int i; rlen = buflen; bp = buf; sep = ""; for (i = 0; rlen > 0 && i < data_len; ) { tlen = snprintf(bp, rlen, "%s%2.2x", sep, data[i]); rlen -= tlen; bp += tlen; i++; sep = (i % group_len) ? "" : inter_group_sep; } return buf; } /* * Hex dump buffer to file. */ static void sa_hex_dump(unsigned char *bp, size_t len, FILE *fp) { char lbuf[120]; size_t tlen; uint32_t offset = 0; while (len > 0) { tlen = 16; /* bytes per line */ if (tlen > len) tlen = len; sa_hex_format(lbuf, sizeof(lbuf), bp, tlen, 4, " "); fprintf(fp, "%6x %s\n", offset, lbuf); offset += tlen; len -= tlen; bp += tlen; } } /* * Convert 48-bit IEEE MAC address to 64-bit FC WWN. */ fc_wwn_t fc_wwn_from_mac(uint64_t mac, uint32_t scheme, uint32_t port) { fc_wwn_t wwn; assert(mac < (1ULL << 48)); wwn = mac | ((fc_wwn_t) scheme << 60); switch (scheme) { case 1: assert(port == 0); break; case 2: assert(port < 0xfff); wwn |= (fc_wwn_t) port << 48; break; default: assert(1); break; } return wwn; } /* * Handle WWN/MAC arguments */ static fc_wwn_t fp_parse_wwn(const char *arg, char *msg, uint32_t scheme, uint32_t port) { char *endptr; fc_wwn_t wwn; fc_wwn_t oui; struct ether_addr mac; wwn = strtoull(arg, &endptr, 16); if (*endptr != '\0') { if (ether_aton_r(arg, &mac) == NULL && ether_hostton(arg, &mac) != 0) { SA_LOG_EXIT("invalid %s WWN or MAC addr %s", msg, arg); } oui = net48_get((net48_t *)mac.ether_addr_octet); wwn = fc_wwn_from_mac(oui, scheme, port); } return wwn; } /* * Handle options. */ static void fp_options(int argc, char *argv[]) { int opt; char *endptr; float sec; int targ_spec = 0; cmdname = basename(argv[0]); if (argc <= 1) fp_usage(); while ((opt = getopt(argc, argv, "c:fi:h:qs:xF:P:N:")) != -1) { switch (opt) { case 'c': fp_count = (int) strtoul(optarg, &endptr, 10); if (*endptr != '\0') SA_LOG_EXIT("bad count %s\n", optarg); break; case 'f': fp_flood = 1; break; case 'i': if (sscanf(optarg, "%f", &sec) != 1 || sec < FP_MIN_INTVL) SA_LOG_EXIT("bad interval %s\n", optarg); fp_interval = sec * 1000; break; case 'h': fp_hba = optarg; break; case 'q': fp_quiet = 1; break; case 's': fp_len = strtoul(optarg, &endptr, 0); if (*endptr != '\0' || fp_len > FC_MAX_PAYLOAD) SA_LOG_EXIT("bad size %s max %d\n", optarg, FC_MAX_PAYLOAD); if (fp_len < 4) SA_LOG_EXIT("bad size %s min %d\n", optarg, 4); break; case 'x': fp_hex = 1; break; /* * -F specifies the target FC_ID. */ case 'F': fp_did = strtoull(optarg, &endptr, 16); if (*endptr != '\0') SA_LOG_EXIT("bad target FC_ID %s\n", optarg); targ_spec++; break; /* * The -P and -N flags take a world-wide name in hex, * or an ethernet addr, or an etherhost entry from /etc/ethers. */ case 'N': fp_node_wwn = fp_parse_wwn(optarg, "Node", 1, 0); targ_spec++; break; case 'P': fp_port_wwn = fp_parse_wwn(optarg, "Port", 2, 0); targ_spec++; break; case '?': default: fprintf(stderr, "FC_MAX_PAYLOAD=%lu\n", FC_MAX_PAYLOAD); fp_usage(); /* exits */ break; } } argc -= optind; argv += optind; if (fp_hba == NULL) SA_LOG_EXIT("FCoE interface not specified"); if (targ_spec == 0) SA_LOG_EXIT("no target specified"); if (targ_spec > 1) SA_LOG_EXIT("too many targets specified;" " only one is allowed."); return; } /* * Lookup specified adapter using HBAAPI. */ static int fp_find_hba(void) { HBA_STATUS retval; HBA_UINT32 hba_cnt; HBA_HANDLE hba_handle = 0; HBA_ADAPTERATTRIBUTES hba_attrs; HBA_PORTATTRIBUTES port_attrs; HBA_UINT32 fcid = 0; struct stat statbuf; char namebuf[1028]; char hba_dir[256]; fc_wwn_t wwn = 0; HBA_WWN wwpn; char *endptr; int i, found = 0; /* * Parse HBA spec. if there is one. * These formats are tried: * If pass in an interface name, it does not need * to be validated here. The interface name can be * anything. It will have to be found via HBAAPI * library. It fails if not found. * host = match the index . * mac address xx:xx:xx:xx:xx:xx * otherwise, try parsing as a wwn and match that. */ snprintf(hba_dir, sizeof(hba_dir), SYSFS_HBA_DIR "/%s", fp_hba); if (!stat(hba_dir, &statbuf)) { fp_hba_type = FP_HBA_ETH_TYPE; } else if (strstr(fp_hba, "host") == fp_hba) { i = strtoul(fp_hba + 4, &endptr, 10); if (*endptr != '\0') SA_LOG_EXIT("invalid hba name %s", fp_hba); fp_hba_type = FP_HBA_HOST_TYPE; } else if (strstr(fp_hba, ":")) { wwn = fp_parse_wwn(fp_hba, "HBA", 2, 0); hton64(wwpn.wwn, wwn); fp_hba_type = FP_HBA_WWPN_TYPE; } else { wwn = strtoull(fp_hba, &endptr, 16); if (wwn < 0x1000000) { fcid = wwn; fp_hba_type = FP_HBA_FCID_TYPE; } else { if (*endptr != '\0') SA_LOG_EXIT("unsupported hba name"); wwn = fp_parse_wwn(fp_hba, "HBA", 2, 0); hton64(wwpn.wwn, wwn); fp_hba_type = FP_HBA_WWPN_TYPE; } } hba_cnt = HBA_GetNumberOfAdapters(); if (!hba_cnt) SA_LOG_EXIT("No FCoE interfaces created"); for (i = 0; i < hba_cnt; i++) { retval = HBA_GetAdapterName(i, namebuf); if (retval != HBA_STATUS_OK) { SA_LOG("HBA_GetAdapterName" " failed, retval=%d", retval); continue; } hba_handle = HBA_OpenAdapter(namebuf); if (!hba_handle) { SA_LOG("HBA_OpenAdapter failed"); continue; } retval = HBA_GetAdapterAttributes(hba_handle, &hba_attrs); if (retval != HBA_STATUS_OK) { SA_LOG("HBA_GetAdapterAttributes" " failed, retval=%d", retval); HBA_CloseAdapter(hba_handle); continue; } retval = HBA_GetAdapterPortAttributes( hba_handle, 0, &port_attrs); if (retval != HBA_STATUS_OK) { SA_LOG("HBA_GetAdapterPortAttributes" " failed, retval=%d", retval); HBA_CloseAdapter(hba_handle); continue; } switch (fp_hba_type) { case FP_HBA_FCID_TYPE: if (port_attrs.PortFcId != fcid) { HBA_CloseAdapter(hba_handle); continue; } break; case FP_HBA_WWPN_TYPE: if (memcmp(&port_attrs.PortWWN, &wwpn, sizeof(wwpn))) { HBA_CloseAdapter(hba_handle); continue; } break; case FP_HBA_HOST_TYPE: if (!strstr(port_attrs.OSDeviceName, fp_hba)) { HBA_CloseAdapter(hba_handle); continue; } break; default: if (!strstr(port_attrs.PortSymbolicName, fp_hba)) { HBA_CloseAdapter(hba_handle); continue; } break; } snprintf(fp_dev, sizeof(fp_dev), "fc_%s", port_attrs.OSDeviceName); found = 1; break; } if (!found) SA_LOG("FCoE interface %s not found", fp_hba); return found; } static void fp_report(void) { double loss; struct fp_stats *sp = &fp_stats; loss = 100.0 * (sp->fp_tx_frames - sp->fp_rx_frames) / sp->fp_tx_frames; printf("%d frames sent, %d received %d errors, %.3f%% loss, " "avg. rt time %.3f ms\n", sp->fp_tx_frames, sp->fp_rx_frames, sp->fp_rx_errors, loss, sp->fp_rx_times ? sp->fp_transit_time_us * 1.0 / (1000.0 * sp->fp_rx_times) : 0.0); } /* * Lookup ID from port name or node name. */ static int fp_ns_get_id(uint32_t op, fc_wwn_t wwn, char *response, size_t *resp_len) { struct ct_get_id { struct fc_ct_hdr hdr; net64_t wwn; } ct; struct fc_bsg_request cdb; struct fc_bsg_reply reply; struct sg_io_v4 sg_io; size_t actual_len; int cmd, rc = 0; memset((char *)&cdb, 0, sizeof(cdb)); memset(&ct, 0, sizeof(ct)); ct.hdr.ct_rev = FC_CT_REV; hton24(ct.hdr.ct_in_id, 0xfffffc); ct.hdr.ct_fs_type = FC_FST_DIR; ct.hdr.ct_fs_subtype = FC_NS_SUBTYPE; ct.hdr.ct_options = 0; ct.hdr.ct_cmd = htons(op); ct.hdr.ct_mr_size = *resp_len; net64_put(&ct.wwn, wwn); cdb.msgcode = FC_BSG_HST_CT; hton24(cdb.rqst_data.h_ct.port_id, 0xfffffc); memcpy(&cdb.rqst_data.h_ct.preamble_word0, &ct.hdr, 3 * sizeof(uint32_t)); sg_io.guard = 'Q'; sg_io.protocol = BSG_PROTOCOL_SCSI; sg_io.subprotocol = BSG_SUB_PROTOCOL_SCSI_TRANSPORT; sg_io.request_len = sizeof(cdb); sg_io.request = (__u64)&cdb; sg_io.dout_xfer_len = sizeof(ct); sg_io.dout_xferp = (unsigned long)&ct; sg_io.din_xfer_len = *resp_len; sg_io.din_xferp = (__u64)response; sg_io.max_response_len = sizeof(reply); sg_io.response = (__u64)&reply; sg_io.timeout = 1000; /* millisecond */ memset(&reply, 0, sizeof(reply)); memset(response, 0, *resp_len); rc = ioctl(fp_fd, SG_IO, &sg_io); if (rc < 0) { if (op == FC_NS_GID_PN) printf("GID_PN error: %s\n", strerror(errno)); if (op == FC_NS_GID_NN) printf("GID_NN error: %s\n", strerror(errno)); return rc; } cmd = ((response[8]<<8) | response[9]) & 0xffff; if (cmd != FC_FS_ACC) return -1; actual_len = reply.reply_payload_rcv_len; if (actual_len < *resp_len) *resp_len = actual_len; return 0; } static int fp_lookup_target() { char response[32]; size_t resp_len; int rc; if (fp_did != 0) return 0; if (fp_port_wwn != 0) { resp_len = sizeof(response); memset(&response, 0, sizeof(response)); rc = fp_ns_get_id(FC_NS_GID_PN, fp_port_wwn, response, &resp_len); if (rc == 0) { fp_did = ((response[17] << 16) & 0xff0000) | ((response[18] << 8) & 0x00ff00) | (response[19] & 0x0000ff); return 0; } SA_LOG("cannot find fcid of destination @ wwpn 0x%llX", fp_port_wwn); } if (fp_node_wwn != 0) { resp_len = sizeof(response); memset(&response, 0, sizeof(response)); rc = fp_ns_get_id(FC_NS_GID_NN, fp_node_wwn, response, &resp_len); if (rc == 0) { fp_did = ((response[17] << 16) & 0xff0000) | ((response[18] << 8) & 0x00ff00) | (response[19] & 0x0000ff); return 0; } SA_LOG("cannot find fcid of destination @ wwnn 0x%llX", fp_node_wwn); } return 1; } /* * ELS_ECHO request format being used. * Put a sequence number in the payload, followed by the pattern. */ struct fcping_echo { net8_t fe_op; /* opcode */ net24_t fe_resvd; /* reserved, must be zero */ net32_t fe_seq; /* sequence number */ }; /* * Setup buffer to be sent. */ static void fp_buf_setup(void) { struct fcping_echo *ep; net8_t *pp; int len; int i; /* * Alloc extra in case of odd len or shorter than minimum. */ len = fp_len + sizeof(*ep) + sizeof(net32_t); ep = calloc(1, len); if (ep == NULL) SA_LOG_ERR_EXIT(errno, "calloc %d bytes failed", len); ep->fe_op = ELS_ECHO; net32_put(&ep->fe_seq, 1); /* starting sequence number */ i = 0; for (pp = (net8_t *) (ep + 1); pp < (net8_t *) ep + fp_len; pp++) *pp = i++; fp_buf = ep; } static unsigned long long fp_get_time_usec(void) { #ifdef _POSIX_TIMERS struct timespec ts; int rc; rc = clock_gettime(CLOCK_MONOTONIC, &ts); if (rc) SA_LOG_ERR_EXIT(errno, "clock_gettime error"); return ts.tv_sec * 1000000ULL + ts.tv_nsec / 1000; #else #warning no _POSIX_TIMERS struct timeval ts; gettimeofday(&ts, NULL); return ts.tv_sec * 1000000ULL + ts.tv_usec; #endif /* _POSIX_TIMERS */ } static int send_els_echo(int fp_fd, void *fp_buf, uint32_t fp_len, unsigned char *resp, uint32_t *resp_len, fc_fid_t fp_did) { struct fc_bsg_request cdb; char sense[MAX_SENSE_LEN]; struct sg_io_v4 sg_io; int rc; cdb.msgcode = FC_BSG_HST_ELS_NOLOGIN; cdb.rqst_data.h_els.command_code = ELS_ECHO; hton24(cdb.rqst_data.h_els.port_id, fp_did); sg_io.guard = 'Q'; sg_io.protocol = BSG_PROTOCOL_SCSI; sg_io.subprotocol = BSG_SUB_PROTOCOL_SCSI_TRANSPORT; sg_io.request_len = sizeof(cdb); sg_io.request = (unsigned long)&cdb; sg_io.dout_xfer_len = fp_len; sg_io.dout_xferp = (unsigned long)fp_buf; sg_io.din_xfer_len = *resp_len; sg_io.din_xferp = (unsigned long)resp; sg_io.max_response_len = sizeof(sense); sg_io.response = (unsigned long)sense; sg_io.timeout = 20000; memset(sense, 0, sizeof(sense)); rc = ioctl(fp_fd, SG_IO, &sg_io); if (rc < 0) return 1; *resp_len = sg_io.din_xfer_len - sg_io.din_resid; return 0; } /* * Send ELS ECHO. */ static int fp_send_ping(void) { struct fp_stats *sp = &fp_stats; struct fcping_echo *ep; int rc; uint32_t resp_len; unsigned char *resp; unsigned long long tx_time; unsigned long long usec; char msg[80]; char time_msg[80]; resp_len = fp_len + FP_LEN_PAD; /* for odd-byte padding and then some */ resp = calloc(1, resp_len); if (resp == NULL) SA_LOG_EXIT("calloc %d bytes failed", resp_len); sp->fp_tx_frames++; if (fp_len >= sizeof(*ep)) { ep = (struct fcping_echo *) fp_buf; net32_put(&ep->fe_seq, sp->fp_tx_frames); } tx_time = fp_get_time_usec(); /* send ELS ECHO frame and receive */ rc = send_els_echo(fp_fd, fp_buf, fp_len, resp, &resp_len, fp_did); if (rc) { sp->fp_rx_errors++; printf("echo %4d error: %s\n", sp->fp_tx_frames, strerror(errno)); } else { usec = fp_get_time_usec(); sp->fp_rx_frames++; ep = (struct fcping_echo *) resp; if (usec < tx_time) { snprintf(time_msg, sizeof(time_msg), "time unknown now %llx old %llx", usec, tx_time); usec = 0; /* as if time went backwards */ } else { usec = usec - tx_time; snprintf(time_msg, sizeof(time_msg), "%6.3f ms", usec / 1000.0); sp->fp_transit_time_us += usec; sp->fp_rx_times++; } if (ep->fe_op == ELS_LS_ACC) { if (memcmp((char *) ep + 1, (char *) fp_buf + 1, fp_len - 1) == 0) snprintf(msg, sizeof(msg), "accepted"); else { sp->fp_rx_errors++; snprintf(msg, sizeof(msg), "accept data mismatches"); } } else if (ep->fe_op == ELS_LS_RJT) { sp->fp_rx_errors++; snprintf(msg, sizeof(msg), "REJECT received"); } else { sp->fp_rx_errors++; snprintf(msg, sizeof(msg), "op %x received", ep->fe_op); } if (fp_quiet == 0) printf("echo %4d %-30s %s\n", sp->fp_tx_frames, msg, time_msg); } if (fp_hex) { printf("response length %u\n", resp_len); sa_hex_dump(resp, resp_len, stdout); printf("\n"); } free(resp); return rc; } static void fp_signal_handler(int sig) { /* * Allow graceful termination of the * for loop in fp_start. */ fp_count = 0; } /* * Main loop. */ static void fp_start(void) { struct sigaction act; int i; int rc; memset(&act, 0, sizeof(act)); act.sa_handler = fp_signal_handler; act.sa_flags = 0; sigaction(SIGTERM, &act, NULL); /* Signal 15: kill */ sigaction(SIGQUIT, &act, NULL); /* Signal 3: Ctrl-\ */ sigaction(SIGINT, &act, NULL); /* Signal 2: Ctrl-C */ printf("sending echo to 0x%X\n", fp_did); for (i = 0; fp_count == -1 || i < fp_count; i++) { rc = fp_send_ping(); if (rc != 0 && errno == EMSGSIZE) break; if (rc != 0 && errno == ECONNABORTED) break; if (fp_flood == 0) usleep(fp_interval * 1000); if (!fp_count) break; } } /* * Main. */ int main(int argc, char *argv[]) { char bsg_dev[80]; int rc = 1; fp_options(argc, argv); if (HBA_LoadLibrary() != HBA_STATUS_OK) SA_LOG_ERR_EXIT(errno, "HBA_LoadLibrary failed"); if (fp_find_hba()) { sprintf(bsg_dev, "/dev/bsg/%s", fp_dev); fp_fd = open(bsg_dev, O_RDWR); if (fp_fd < 0) SA_LOG_ERR_EXIT(errno, "open of %s failed", bsg_dev); if (!fp_lookup_target()) { fp_buf_setup(); fp_start(); fp_report(); rc = 0; } close(fp_fd); } HBA_FreeLibrary(); return rc; } fcoe-utils-1.0.9/configure.ac0000644000175000017500000000104211312505503015025 0ustar chuckchuckAC_INIT([fcoe-utils], [1.0.9], [devel@open-fcoe.org]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_PROG_CC AM_PROG_CC_C_O PKG_CHECK_MODULES([HBAAPI], [HBAAPI]) AC_SUBST([HBAAPI_CFLAGS]) AC_SUBST([HBAAPI_LIBS]) AC_ARG_WITH([dcb], [AS_HELP_STRING([--without-dcb], [disable DCB support])], [], [with_dcb=yes]) AM_CONDITIONAL([WITH_DCB], [test "X$with_dcb" != Xno]) AS_IF([test "X$with_dcb" != Xno], [PKG_CHECK_MODULES([DCBD], [dcbd]) AC_SUBST([DCBD_CFLAGS])]) AC_CONFIG_FILES([Makefile fcoeplumb fcoe-utils.spec fcoe_utils.h]) AC_OUTPUT fcoe-utils-1.0.9/install-sh0000755000175000017500000003253711336572515014575 0ustar chuckchuck#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: fcoe-utils-1.0.9/COPYING0000644000175000017500000004310311312505503013576 0ustar chuckchuck GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) 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 this service 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 make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. 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. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), 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 distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the 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 a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE 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. 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 convey 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 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. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision 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, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This 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. fcoe-utils-1.0.9/autom4te.cache/0000755000175000017500000000000011336572512015360 5ustar chuckchuckfcoe-utils-1.0.9/autom4te.cache/requests0000644000175000017500000001467611336572515017177 0ustar chuckchuck# This file was generated by Autom4te Tue Dec 22 07:01:21 UTC 2009. # It contains the lists of macros which have been traced. # It can be safely removed. @request = ( bless( [ '0', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', '/usr/share/aclocal/pkg.m4', '/usr/share/aclocal-1.11/amversion.m4', '/usr/share/aclocal-1.11/auxdir.m4', '/usr/share/aclocal-1.11/cond.m4', '/usr/share/aclocal-1.11/depend.m4', '/usr/share/aclocal-1.11/depout.m4', '/usr/share/aclocal-1.11/init.m4', '/usr/share/aclocal-1.11/install-sh.m4', '/usr/share/aclocal-1.11/lead-dot.m4', '/usr/share/aclocal-1.11/make.m4', '/usr/share/aclocal-1.11/minuso.m4', '/usr/share/aclocal-1.11/missing.m4', '/usr/share/aclocal-1.11/mkdirp.m4', '/usr/share/aclocal-1.11/options.m4', '/usr/share/aclocal-1.11/runlog.m4', '/usr/share/aclocal-1.11/sanity.m4', '/usr/share/aclocal-1.11/silent.m4', '/usr/share/aclocal-1.11/strip.m4', '/usr/share/aclocal-1.11/substnot.m4', '/usr/share/aclocal-1.11/tar.m4', 'configure.ac' ], { 'm4_pattern_forbid' => 1, 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, '_AM_SET_OPTION' => 1, 'AC_DEFUN' => 1, 'AM_PROG_MKDIR_P' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'AM_MISSING_HAS_RUN' => 1, 'AM_SUBST_NOTMAKE' => 1, 'AM_MISSING_PROG' => 1, 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'AC_DEFUN_ONCE' => 1, 'AM_PROG_INSTALL_STRIP' => 1, '_PKG_SHORT_ERRORS_SUPPORTED' => 1, '_m4_warn' => 1, 'AM_SANITY_CHECK' => 1, 'PKG_CHECK_EXISTS' => 1, 'AM_SILENT_RULES' => 1, 'include' => 1, '_AM_PROG_TAR' => 1, 'AM_AUX_DIR_EXPAND' => 1, 'AM_DEP_TRACK' => 1, '_AM_SET_OPTIONS' => 1, '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'AM_RUN_LOG' => 1, '_AM_IF_OPTION' => 1, '_AM_SUBST_NOTMAKE' => 1, 'm4_pattern_allow' => 1, '_AM_AUTOCONF_VERSION' => 1, 'AM_PROG_CC_C_O' => 1, '_AM_MANGLE_OPTION' => 1, 'AM_SET_LEADING_DOT' => 1, 'AM_CONDITIONAL' => 1, 'AM_SET_DEPDIR' => 1, '_AM_DEPENDENCIES' => 1, 'AM_PROG_INSTALL_SH' => 1, 'PKG_PROG_PKG_CONFIG' => 1, 'm4_include' => 1, 'PKG_CHECK_MODULES' => 1, '_AC_AM_CONFIG_HEADER_HOOK' => 1, 'AU_DEFUN' => 1, 'AM_MAKE_INCLUDE' => 1 } ], 'Autom4te::Request' ), bless( [ '1', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', 'aclocal.m4', 'configure.ac' ], { '_LT_AC_TAGCONFIG' => 1, 'AM_PROG_F77_C_O' => 1, 'm4_pattern_forbid' => 1, 'AC_INIT' => 1, '_AM_COND_IF' => 1, 'AC_CANONICAL_TARGET' => 1, 'AC_SUBST' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, 'AC_FC_SRCEXT' => 1, 'AC_CANONICAL_HOST' => 1, 'AC_PROG_LIBTOOL' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_CONFIG_SUBDIRS' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'LT_CONFIG_LTDL_DIR' => 1, 'AC_REQUIRE_AUX_FILE' => 1, 'AC_CONFIG_LINKS' => 1, 'm4_sinclude' => 1, 'LT_SUPPORTED_TAG' => 1, 'AM_MAINTAINER_MODE' => 1, 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, '_m4_warn' => 1, 'AM_PROG_CXX_C_O' => 1, '_AM_COND_ENDIF' => 1, 'AM_ENABLE_MULTILIB' => 1, 'AM_SILENT_RULES' => 1, 'AC_CONFIG_FILES' => 1, 'LT_INIT' => 1, 'include' => 1, 'AM_GNU_GETTEXT' => 1, 'AC_LIBSOURCE' => 1, 'AM_PROG_FC_C_O' => 1, 'AC_CANONICAL_BUILD' => 1, 'AC_FC_FREEFORM' => 1, 'AH_OUTPUT' => 1, '_AM_SUBST_NOTMAKE' => 1, 'AC_CONFIG_AUX_DIR' => 1, 'sinclude' => 1, 'm4_pattern_allow' => 1, 'AM_PROG_CC_C_O' => 1, 'AC_CANONICAL_SYSTEM' => 1, 'AM_CONDITIONAL' => 1, 'AC_CONFIG_HEADERS' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, 'm4_include' => 1, '_AM_COND_ELSE' => 1, 'AC_SUBST_TRACE' => 1 } ], 'Autom4te::Request' ) ); fcoe-utils-1.0.9/autom4te.cache/output.10000644000175000017500000044147211336572512017016 0ustar chuckchuck@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.65 for fcoe-utils 1.0.9. @%:@ @%:@ Report bugs to . @%:@ @%:@ @%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 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 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 # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else 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 # 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 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in @%:@( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: devel@open-fcoe.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith @%:@ as_fn_error ERROR [LINENO LOG_FD] @%:@ --------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with status @S|@?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } @%:@ as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file 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 else as_ln_s='cp -p' fi 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='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi 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'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || 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` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='fcoe-utils' PACKAGE_TARNAME='fcoe-utils' PACKAGE_VERSION='1.0.9' PACKAGE_STRING='fcoe-utils 1.0.9' PACKAGE_BUGREPORT='devel@open-fcoe.org' PACKAGE_URL='' ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIB@&t@OBJS DCBD_LIBS DCBD_CFLAGS WITH_DCB_FALSE WITH_DCB_TRUE HBAAPI_LIBS HBAAPI_CFLAGS PKG_CONFIG 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 am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc 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_URL 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 with_dcb ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS PKG_CONFIG HBAAPI_CFLAGS HBAAPI_LIBS DCBD_CFLAGS DCBD_LIBS' # 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 exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # 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' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' 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 ac_prev= continue fi 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_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -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_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "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_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" 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_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -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 ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --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) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --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 ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" 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_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" 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. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error "unrecognized option: \`$ac_option' Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # 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=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) 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_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= 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_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # 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 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 srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then 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. # 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 fcoe-utils 1.0.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @<:@@S|@ac_default_prefix@:>@ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX @<:@PREFIX@:>@ By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. 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] --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/fcoe-utils@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of fcoe-utils 1.0.9:";; 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 Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-dcb disable DCB support 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 LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory PKG_CONFIG path to pkg-config utility HBAAPI_CFLAGS C compiler flags for HBAAPI, overriding pkg-config HBAAPI_LIBS linker flags for HBAAPI, overriding pkg-config DCBD_CFLAGS C compiler flags for DCBD, overriding pkg-config DCBD_LIBS linker flags for DCBD, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. 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 .) # We are building in place. ac_srcdir=. 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 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 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 $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 $ac_status if $ac_init_version; then cat <<\_ACEOF fcoe-utils configure 1.0.9 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## @%:@ ac_fn_c_try_compile LINENO @%:@ -------------------------- @%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_compile 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 fcoe-utils $as_me 1.0.9, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 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` /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` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # 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. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _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:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | 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" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do 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 ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do 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 if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE 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 "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$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 $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 case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # 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:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) 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 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' 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 am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # 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 # 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:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $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:${as_lineno-$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' { $as_echo "$as_me:${as_lineno-$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 # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && 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 $. # By default was `s,x,x', remove it if useless. 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` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$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 test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # 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 { 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" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $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. 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 { 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P 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. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # 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 { 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" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='fcoe-utils' VERSION='1.0.9' cat >>confdefs.h <<_ACEOF @%:@define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $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. 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac 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. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$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. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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.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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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.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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $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. 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) 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 ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of object files: cannot compile See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* 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 -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 -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);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$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 # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf @%:@ Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$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 : $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 # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$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 if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$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=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _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 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then 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' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "@%:@define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HBAAPI" >&5 $as_echo_n "checking for HBAAPI... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$HBAAPI_CFLAGS"; then pkg_cv_HBAAPI_CFLAGS="$HBAAPI_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"HBAAPI\""; } >&5 ($PKG_CONFIG --exists --print-errors "HBAAPI") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_HBAAPI_CFLAGS=`$PKG_CONFIG --cflags "HBAAPI" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$HBAAPI_LIBS"; then pkg_cv_HBAAPI_LIBS="$HBAAPI_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"HBAAPI\""; } >&5 ($PKG_CONFIG --exists --print-errors "HBAAPI") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_HBAAPI_LIBS=`$PKG_CONFIG --libs "HBAAPI" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then HBAAPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "HBAAPI"` else HBAAPI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "HBAAPI"` fi # Put the nasty error message in config.log where it belongs echo "$HBAAPI_PKG_ERRORS" >&5 as_fn_error "Package requirements (HBAAPI) were not met: $HBAAPI_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables HBAAPI_CFLAGS and HBAAPI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " "$LINENO" 5 elif test $pkg_failed = untried; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables HBAAPI_CFLAGS and HBAAPI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." "$LINENO" 5; } else HBAAPI_CFLAGS=$pkg_cv_HBAAPI_CFLAGS HBAAPI_LIBS=$pkg_cv_HBAAPI_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi @%:@ Check whether --with-dcb was given. if test "${with_dcb+set}" = set; then : withval=$with_dcb; else with_dcb=yes fi if test "X$with_dcb" != Xno; then WITH_DCB_TRUE= WITH_DCB_FALSE='#' else WITH_DCB_TRUE='#' WITH_DCB_FALSE= fi if test "X$with_dcb" != Xno; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DCBD" >&5 $as_echo_n "checking for DCBD... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$DCBD_CFLAGS"; then pkg_cv_DCBD_CFLAGS="$DCBD_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dcbd\""; } >&5 ($PKG_CONFIG --exists --print-errors "dcbd") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DCBD_CFLAGS=`$PKG_CONFIG --cflags "dcbd" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$DCBD_LIBS"; then pkg_cv_DCBD_LIBS="$DCBD_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dcbd\""; } >&5 ($PKG_CONFIG --exists --print-errors "dcbd") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DCBD_LIBS=`$PKG_CONFIG --libs "dcbd" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then DCBD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dcbd"` else DCBD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dcbd"` fi # Put the nasty error message in config.log where it belongs echo "$DCBD_PKG_ERRORS" >&5 as_fn_error "Package requirements (dcbd) were not met: $DCBD_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables DCBD_CFLAGS and DCBD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " "$LINENO" 5 elif test $pkg_failed = untried; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables DCBD_CFLAGS and DCBD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." "$LINENO" 5; } else DCBD_CFLAGS=$pkg_cv_DCBD_CFLAGS DCBD_LIBS=$pkg_cv_DCBD_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi fi ac_config_files="$ac_config_files Makefile fcoeplumb fcoe-utils.spec fcoe_utils.h" 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 # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _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, 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:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. 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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end 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:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_DCB_TRUE}" && test -z "${WITH_DCB_FALSE}"; then as_fn_error "conditional \"WITH_DCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 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_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 # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else 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 # 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 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @%:@ as_fn_error ERROR [LINENO LOG_FD] @%:@ --------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with status @S|@?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } @%:@ as_fn_error @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file 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 else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi 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'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by fcoe-utils $as_me 1.0.9, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ 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 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ fcoe-utils config.status 1.0.9 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF 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_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --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. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then 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 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "fcoeplumb") CONFIG_FILES="$CONFIG_FILES fcoeplumb" ;; "fcoe-utils.spec") CONFIG_FILES="$CONFIG_FILES fcoe-utils.spec" ;; "fcoe_utils.h") CONFIG_FILES="$CONFIG_FILES fcoe_utils.h" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 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 # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # 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 ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 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_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # 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" eval set X " :F $CONFIG_FILES :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_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[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_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # 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:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. 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_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac 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 || $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"; as_fn_mkdir_p ac_builddir=. 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 .) # We are building in place. ac_srcdir=. 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 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 case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p 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:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 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 # 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 || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b 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 s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ 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 # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ 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; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi fcoe-utils-1.0.9/autom4te.cache/output.00000644000175000017500000044147211336572511017014 0ustar chuckchuck@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.65 for fcoe-utils 1.0.9. @%:@ @%:@ Report bugs to . @%:@ @%:@ @%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 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 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 # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else 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 # 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 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in @%:@( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: devel@open-fcoe.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith @%:@ as_fn_error ERROR [LINENO LOG_FD] @%:@ --------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with status @S|@?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } @%:@ as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file 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 else as_ln_s='cp -p' fi 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='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi 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'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || 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` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='fcoe-utils' PACKAGE_TARNAME='fcoe-utils' PACKAGE_VERSION='1.0.9' PACKAGE_STRING='fcoe-utils 1.0.9' PACKAGE_BUGREPORT='devel@open-fcoe.org' PACKAGE_URL='' ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIB@&t@OBJS DCBD_LIBS DCBD_CFLAGS WITH_DCB_FALSE WITH_DCB_TRUE HBAAPI_LIBS HBAAPI_CFLAGS PKG_CONFIG 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 am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc 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_URL 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 with_dcb ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS PKG_CONFIG HBAAPI_CFLAGS HBAAPI_LIBS DCBD_CFLAGS DCBD_LIBS' # 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 exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # 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' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' 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 ac_prev= continue fi 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_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -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_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "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_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" 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_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -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 ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --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) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --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 ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" 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_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" 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. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error "unrecognized option: \`$ac_option' Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # 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=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) 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_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= 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_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # 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 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 srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then 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. # 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 fcoe-utils 1.0.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @<:@@S|@ac_default_prefix@:>@ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX @<:@PREFIX@:>@ By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. 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] --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/fcoe-utils@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of fcoe-utils 1.0.9:";; 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 Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-dcb disable DCB support 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 LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory PKG_CONFIG path to pkg-config utility HBAAPI_CFLAGS C compiler flags for HBAAPI, overriding pkg-config HBAAPI_LIBS linker flags for HBAAPI, overriding pkg-config DCBD_CFLAGS C compiler flags for DCBD, overriding pkg-config DCBD_LIBS linker flags for DCBD, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. 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 .) # We are building in place. ac_srcdir=. 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 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 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 $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 $ac_status if $ac_init_version; then cat <<\_ACEOF fcoe-utils configure 1.0.9 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## @%:@ ac_fn_c_try_compile LINENO @%:@ -------------------------- @%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_compile 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 fcoe-utils $as_me 1.0.9, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 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` /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` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # 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. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _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:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | 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" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do 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 ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do 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 if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE 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 "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$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 $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 case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # 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:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) 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 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' 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 am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # 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 # 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:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $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:${as_lineno-$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' { $as_echo "$as_me:${as_lineno-$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 # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && 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 $. # By default was `s,x,x', remove it if useless. 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` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$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 test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # 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 { 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" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $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. 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 { 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P 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. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # 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 { 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" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='fcoe-utils' VERSION='1.0.9' cat >>confdefs.h <<_ACEOF @%:@define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $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. 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac 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. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$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. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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.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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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.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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $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. 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) 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 ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of object files: cannot compile See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* 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 -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 -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);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$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 # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf @%:@ Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$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 : $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 # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$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 if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$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 { $as_echo "$as_me:${as_lineno-$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=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _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 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then 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' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "@%:@define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HBAAPI" >&5 $as_echo_n "checking for HBAAPI... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$HBAAPI_CFLAGS"; then pkg_cv_HBAAPI_CFLAGS="$HBAAPI_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"HBAAPI\""; } >&5 ($PKG_CONFIG --exists --print-errors "HBAAPI") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_HBAAPI_CFLAGS=`$PKG_CONFIG --cflags "HBAAPI" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$HBAAPI_LIBS"; then pkg_cv_HBAAPI_LIBS="$HBAAPI_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"HBAAPI\""; } >&5 ($PKG_CONFIG --exists --print-errors "HBAAPI") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_HBAAPI_LIBS=`$PKG_CONFIG --libs "HBAAPI" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then HBAAPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "HBAAPI"` else HBAAPI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "HBAAPI"` fi # Put the nasty error message in config.log where it belongs echo "$HBAAPI_PKG_ERRORS" >&5 as_fn_error "Package requirements (HBAAPI) were not met: $HBAAPI_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables HBAAPI_CFLAGS and HBAAPI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " "$LINENO" 5 elif test $pkg_failed = untried; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables HBAAPI_CFLAGS and HBAAPI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." "$LINENO" 5; } else HBAAPI_CFLAGS=$pkg_cv_HBAAPI_CFLAGS HBAAPI_LIBS=$pkg_cv_HBAAPI_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi @%:@ Check whether --with-dcb was given. if test "${with_dcb+set}" = set; then : withval=$with_dcb; else with_dcb=yes fi if test "X$with_dcb" != Xno; then WITH_DCB_TRUE= WITH_DCB_FALSE='#' else WITH_DCB_TRUE='#' WITH_DCB_FALSE= fi if test "X$with_dcb" != Xno; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DCBD" >&5 $as_echo_n "checking for DCBD... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$DCBD_CFLAGS"; then pkg_cv_DCBD_CFLAGS="$DCBD_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dcbd\""; } >&5 ($PKG_CONFIG --exists --print-errors "dcbd") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DCBD_CFLAGS=`$PKG_CONFIG --cflags "dcbd" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$DCBD_LIBS"; then pkg_cv_DCBD_LIBS="$DCBD_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dcbd\""; } >&5 ($PKG_CONFIG --exists --print-errors "dcbd") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DCBD_LIBS=`$PKG_CONFIG --libs "dcbd" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then DCBD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dcbd"` else DCBD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dcbd"` fi # Put the nasty error message in config.log where it belongs echo "$DCBD_PKG_ERRORS" >&5 as_fn_error "Package requirements (dcbd) were not met: $DCBD_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables DCBD_CFLAGS and DCBD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " "$LINENO" 5 elif test $pkg_failed = untried; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables DCBD_CFLAGS and DCBD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." "$LINENO" 5; } else DCBD_CFLAGS=$pkg_cv_DCBD_CFLAGS DCBD_LIBS=$pkg_cv_DCBD_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi fi ac_config_files="$ac_config_files Makefile fcoeplumb fcoe-utils.spec fcoe_utils.h" 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 # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _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, 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:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. 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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end 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:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_DCB_TRUE}" && test -z "${WITH_DCB_FALSE}"; then as_fn_error "conditional \"WITH_DCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 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_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 # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else 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 # 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 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @%:@ as_fn_error ERROR [LINENO LOG_FD] @%:@ --------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with status @S|@?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } @%:@ as_fn_error @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file 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 else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi 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'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by fcoe-utils $as_me 1.0.9, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ 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 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ fcoe-utils config.status 1.0.9 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF 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_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --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. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then 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 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "fcoeplumb") CONFIG_FILES="$CONFIG_FILES fcoeplumb" ;; "fcoe-utils.spec") CONFIG_FILES="$CONFIG_FILES fcoe-utils.spec" ;; "fcoe_utils.h") CONFIG_FILES="$CONFIG_FILES fcoe_utils.h" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 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 # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # 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 ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 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_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # 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" eval set X " :F $CONFIG_FILES :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_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[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_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # 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:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. 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_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac 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 || $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"; as_fn_mkdir_p ac_builddir=. 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 .) # We are building in place. ac_srcdir=. 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 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 case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p 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:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 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 # 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 || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b 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 s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ 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 # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ 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; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi fcoe-utils-1.0.9/autom4te.cache/traces.00000644000175000017500000011341511336572511016726 0ustar chuckchuckm4trace:/usr/share/aclocal/pkg.m4:26: -1- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ]) m4trace:/usr/share/aclocal/pkg.m4:56: -1- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) m4trace:/usr/share/aclocal/pkg.m4:84: -1- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ]) m4trace:/usr/share/aclocal/pkg.m4:104: -1- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ]) m4trace:/usr/share/aclocal-1.11/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) m4trace:/usr/share/aclocal-1.11/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) m4trace:/usr/share/aclocal-1.11/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) m4trace:/usr/share/aclocal-1.11/cond.m4:15: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) m4trace:/usr/share/aclocal-1.11/depend.m4:28: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) m4trace:/usr/share/aclocal-1.11/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) m4trace:/usr/share/aclocal-1.11/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) m4trace:/usr/share/aclocal-1.11/depout.m4:14: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ]) m4trace:/usr/share/aclocal-1.11/depout.m4:75: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) m4trace:/usr/share/aclocal-1.11/init.m4:26: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) m4trace:/usr/share/aclocal-1.11/init.m4:126: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) m4trace:/usr/share/aclocal-1.11/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) m4trace:/usr/share/aclocal-1.11/lead-dot.m4:12: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) m4trace:/usr/share/aclocal-1.11/make.m4:14: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) m4trace:/usr/share/aclocal-1.11/minuso.m4:14: -1- AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) m4trace:/usr/share/aclocal-1.11/missing.m4:14: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) m4trace:/usr/share/aclocal-1.11/missing.m4:24: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) m4trace:/usr/share/aclocal-1.11/mkdirp.m4:11: -1- AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) m4trace:/usr/share/aclocal-1.11/options.m4:13: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) m4trace:/usr/share/aclocal-1.11/options.m4:19: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) m4trace:/usr/share/aclocal-1.11/options.m4:25: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) m4trace:/usr/share/aclocal-1.11/options.m4:31: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) m4trace:/usr/share/aclocal-1.11/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) m4trace:/usr/share/aclocal-1.11/sanity.m4:14: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) m4trace:/usr/share/aclocal-1.11/silent.m4:14: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [ --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0')]) case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) m4trace:/usr/share/aclocal-1.11/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) m4trace:/usr/share/aclocal-1.11/substnot.m4:14: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) m4trace:/usr/share/aclocal-1.11/substnot.m4:19: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) m4trace:/usr/share/aclocal-1.11/tar.m4:24: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:1: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.ac:1: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.ac:1: -1- m4_pattern_allow([^SHELL$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PATH_SEPARATOR$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^exec_prefix$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^prefix$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^program_transform_name$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^bindir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^sbindir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^libexecdir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^datarootdir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^datadir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^sysconfdir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^sharedstatedir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^localstatedir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^includedir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^oldincludedir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^docdir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^infodir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^htmldir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^dvidir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^pdfdir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^psdir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^libdir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^localedir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^mandir$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^DEFS$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_C$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_N$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_T$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^build_alias$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^host_alias$]) m4trace:configure.ac:1: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.ac:2: -1- AM_INIT_AUTOMAKE([-Wall -Werror foreign]) m4trace:configure.ac:2: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.ac:2: -1- AM_SET_CURRENT_AUTOMAKE_VERSION m4trace:configure.ac:2: -1- AM_AUTOMAKE_VERSION([1.11.1]) m4trace:configure.ac:2: -1- _AM_AUTOCONF_VERSION([2.65]) m4trace:configure.ac:2: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.ac:2: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.ac:2: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.ac:2: -1- m4_pattern_allow([^am__isrc$]) m4trace:configure.ac:2: -1- _AM_SUBST_NOTMAKE([am__isrc]) m4trace:configure.ac:2: -1- m4_pattern_allow([^CYGPATH_W$]) m4trace:configure.ac:2: -1- _AM_SET_OPTIONS([-Wall -Werror foreign]) m4trace:configure.ac:2: -1- _AM_SET_OPTION([-Wall]) m4trace:configure.ac:2: -2- _AM_MANGLE_OPTION([-Wall]) m4trace:configure.ac:2: -1- _AM_SET_OPTION([-Werror]) m4trace:configure.ac:2: -2- _AM_MANGLE_OPTION([-Werror]) m4trace:configure.ac:2: -1- _AM_SET_OPTION([foreign]) m4trace:configure.ac:2: -2- _AM_MANGLE_OPTION([foreign]) m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:2: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:2: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])]) m4trace:configure.ac:2: -2- _AM_MANGLE_OPTION([no-define]) m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:2: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:2: -1- AM_SANITY_CHECK m4trace:configure.ac:2: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) m4trace:configure.ac:2: -1- AM_MISSING_HAS_RUN m4trace:configure.ac:2: -1- AM_AUX_DIR_EXPAND m4trace:configure.ac:2: -1- m4_pattern_allow([^ACLOCAL$]) m4trace:configure.ac:2: -1- AM_MISSING_PROG([AUTOCONF], [autoconf]) m4trace:configure.ac:2: -1- m4_pattern_allow([^AUTOCONF$]) m4trace:configure.ac:2: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) m4trace:configure.ac:2: -1- m4_pattern_allow([^AUTOMAKE$]) m4trace:configure.ac:2: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader]) m4trace:configure.ac:2: -1- m4_pattern_allow([^AUTOHEADER$]) m4trace:configure.ac:2: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo]) m4trace:configure.ac:2: -1- m4_pattern_allow([^MAKEINFO$]) m4trace:configure.ac:2: -1- AM_PROG_INSTALL_SH m4trace:configure.ac:2: -1- m4_pattern_allow([^install_sh$]) m4trace:configure.ac:2: -1- AM_PROG_INSTALL_STRIP m4trace:configure.ac:2: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.ac:2: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) m4trace:configure.ac:2: -1- AM_PROG_MKDIR_P m4trace:configure.ac:2: -1- m4_pattern_allow([^MKDIR_P$]) m4trace:configure.ac:2: -1- m4_pattern_allow([^mkdir_p$]) m4trace:configure.ac:2: -1- m4_pattern_allow([^AWK$]) m4trace:configure.ac:2: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.ac:2: -1- AM_SET_LEADING_DOT m4trace:configure.ac:2: -1- m4_pattern_allow([^am__leading_dot$]) m4trace:configure.ac:2: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) m4trace:configure.ac:2: -2- _AM_MANGLE_OPTION([tar-ustar]) m4trace:configure.ac:2: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])]) m4trace:configure.ac:2: -2- _AM_MANGLE_OPTION([tar-pax]) m4trace:configure.ac:2: -1- _AM_PROG_TAR([v7]) m4trace:configure.ac:2: -1- AM_MISSING_PROG([AMTAR], [tar]) m4trace:configure.ac:2: -1- m4_pattern_allow([^AMTAR$]) m4trace:configure.ac:2: -1- m4_pattern_allow([^am__tar$]) m4trace:configure.ac:2: -1- m4_pattern_allow([^am__untar$]) m4trace:configure.ac:2: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) m4trace:configure.ac:2: -2- _AM_MANGLE_OPTION([no-dependencies]) m4trace:configure.ac:2: -1- _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])]) m4trace:configure.ac:2: -2- _AM_MANGLE_OPTION([silent-rules]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^OBJEXT$]) m4trace:configure.ac:4: -1- _AM_DEPENDENCIES([CC]) m4trace:configure.ac:4: -1- AM_SET_DEPDIR m4trace:configure.ac:4: -1- m4_pattern_allow([^DEPDIR$]) m4trace:configure.ac:4: -1- AM_OUTPUT_DEPENDENCY_COMMANDS m4trace:configure.ac:4: -1- AM_MAKE_INCLUDE m4trace:configure.ac:4: -1- m4_pattern_allow([^am__include$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^am__quote$]) m4trace:configure.ac:4: -1- AM_DEP_TRACK m4trace:configure.ac:4: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) m4trace:configure.ac:4: -1- m4_pattern_allow([^AMDEP_TRUE$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^AMDEP_FALSE$]) m4trace:configure.ac:4: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) m4trace:configure.ac:4: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) m4trace:configure.ac:4: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) m4trace:configure.ac:4: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.ac:4: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:4: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.ac:4: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.ac:4: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.ac:5: -1- AM_PROG_CC_C_O m4trace:configure.ac:5: -1- m4_pattern_allow([^NO_MINUS_C_MINUS_O$]) m4trace:configure.ac:7: -1- PKG_CHECK_MODULES([HBAAPI], [HBAAPI]) m4trace:configure.ac:7: -1- PKG_PROG_PKG_CONFIG m4trace:configure.ac:7: -1- m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^PKG_CONFIG$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^PKG_CONFIG$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^HBAAPI_CFLAGS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^HBAAPI_LIBS$]) m4trace:configure.ac:7: -1- PKG_CHECK_EXISTS([HBAAPI], [pkg_cv_[]HBAAPI_CFLAGS=`$PKG_CONFIG --[]cflags "HBAAPI" 2>/dev/null`], [pkg_failed=yes]) m4trace:configure.ac:7: -1- PKG_CHECK_EXISTS([HBAAPI], [pkg_cv_[]HBAAPI_LIBS=`$PKG_CONFIG --[]libs "HBAAPI" 2>/dev/null`], [pkg_failed=yes]) m4trace:configure.ac:7: -1- _PKG_SHORT_ERRORS_SUPPORTED m4trace:configure.ac:8: -1- m4_pattern_allow([^HBAAPI_CFLAGS$]) m4trace:configure.ac:9: -1- m4_pattern_allow([^HBAAPI_LIBS$]) m4trace:configure.ac:16: -1- AM_CONDITIONAL([WITH_DCB], [test "X$with_dcb" != Xno]) m4trace:configure.ac:16: -1- m4_pattern_allow([^WITH_DCB_TRUE$]) m4trace:configure.ac:16: -1- m4_pattern_allow([^WITH_DCB_FALSE$]) m4trace:configure.ac:16: -1- _AM_SUBST_NOTMAKE([WITH_DCB_TRUE]) m4trace:configure.ac:16: -1- _AM_SUBST_NOTMAKE([WITH_DCB_FALSE]) m4trace:configure.ac:18: -1- PKG_CHECK_MODULES([DCBD], [dcbd]) m4trace:configure.ac:18: -1- m4_pattern_allow([^DCBD_CFLAGS$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^DCBD_LIBS$]) m4trace:configure.ac:18: -1- PKG_CHECK_EXISTS([dcbd], [pkg_cv_[]DCBD_CFLAGS=`$PKG_CONFIG --[]cflags "dcbd" 2>/dev/null`], [pkg_failed=yes]) m4trace:configure.ac:18: -1- PKG_CHECK_EXISTS([dcbd], [pkg_cv_[]DCBD_LIBS=`$PKG_CONFIG --[]libs "dcbd" 2>/dev/null`], [pkg_failed=yes]) m4trace:configure.ac:18: -1- _PKG_SHORT_ERRORS_SUPPORTED m4trace:configure.ac:18: -1- m4_pattern_allow([^DCBD_CFLAGS$]) m4trace:configure.ac:23: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:23: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.ac:23: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) m4trace:configure.ac:23: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) m4trace:configure.ac:23: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) m4trace:configure.ac:23: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) m4trace:configure.ac:23: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) m4trace:configure.ac:23: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS fcoe-utils-1.0.9/autom4te.cache/traces.10000644000175000017500000005431011336572512016726 0ustar chuckchuckm4trace:configure.ac:1: -1- AC_INIT([fcoe-utils], [1.0.9], [devel@open-fcoe.org]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:1: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.ac:1: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.ac:1: -1- AC_SUBST([SHELL]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([SHELL]) m4trace:configure.ac:1: -1- m4_pattern_allow([^SHELL$]) m4trace:configure.ac:1: -1- AC_SUBST([PATH_SEPARATOR]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PATH_SEPARATOR$]) m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_NAME]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_STRING]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_URL]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:1: -1- AC_SUBST([exec_prefix], [NONE]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([exec_prefix]) m4trace:configure.ac:1: -1- m4_pattern_allow([^exec_prefix$]) m4trace:configure.ac:1: -1- AC_SUBST([prefix], [NONE]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([prefix]) m4trace:configure.ac:1: -1- m4_pattern_allow([^prefix$]) m4trace:configure.ac:1: -1- AC_SUBST([program_transform_name], [s,x,x,]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([program_transform_name]) m4trace:configure.ac:1: -1- m4_pattern_allow([^program_transform_name$]) m4trace:configure.ac:1: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([bindir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^bindir$]) m4trace:configure.ac:1: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([sbindir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^sbindir$]) m4trace:configure.ac:1: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([libexecdir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^libexecdir$]) m4trace:configure.ac:1: -1- AC_SUBST([datarootdir], ['${prefix}/share']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([datarootdir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^datarootdir$]) m4trace:configure.ac:1: -1- AC_SUBST([datadir], ['${datarootdir}']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([datadir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^datadir$]) m4trace:configure.ac:1: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([sysconfdir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^sysconfdir$]) m4trace:configure.ac:1: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([sharedstatedir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^sharedstatedir$]) m4trace:configure.ac:1: -1- AC_SUBST([localstatedir], ['${prefix}/var']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([localstatedir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^localstatedir$]) m4trace:configure.ac:1: -1- AC_SUBST([includedir], ['${prefix}/include']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([includedir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^includedir$]) m4trace:configure.ac:1: -1- AC_SUBST([oldincludedir], ['/usr/include']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([oldincludedir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^oldincludedir$]) m4trace:configure.ac:1: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], ['${datarootdir}/doc/${PACKAGE_TARNAME}'], ['${datarootdir}/doc/${PACKAGE}'])]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([docdir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^docdir$]) m4trace:configure.ac:1: -1- AC_SUBST([infodir], ['${datarootdir}/info']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([infodir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^infodir$]) m4trace:configure.ac:1: -1- AC_SUBST([htmldir], ['${docdir}']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([htmldir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^htmldir$]) m4trace:configure.ac:1: -1- AC_SUBST([dvidir], ['${docdir}']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([dvidir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^dvidir$]) m4trace:configure.ac:1: -1- AC_SUBST([pdfdir], ['${docdir}']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([pdfdir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^pdfdir$]) m4trace:configure.ac:1: -1- AC_SUBST([psdir], ['${docdir}']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([psdir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^psdir$]) m4trace:configure.ac:1: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([libdir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^libdir$]) m4trace:configure.ac:1: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([localedir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^localedir$]) m4trace:configure.ac:1: -1- AC_SUBST([mandir], ['${datarootdir}/man']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([mandir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^mandir$]) m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ @%:@undef PACKAGE_NAME]) m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ @%:@undef PACKAGE_TARNAME]) m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ @%:@undef PACKAGE_VERSION]) m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ @%:@undef PACKAGE_STRING]) m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ @%:@undef PACKAGE_BUGREPORT]) m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */ @%:@undef PACKAGE_URL]) m4trace:configure.ac:1: -1- AC_SUBST([DEFS]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([DEFS]) m4trace:configure.ac:1: -1- m4_pattern_allow([^DEFS$]) m4trace:configure.ac:1: -1- AC_SUBST([ECHO_C]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([ECHO_C]) m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_C$]) m4trace:configure.ac:1: -1- AC_SUBST([ECHO_N]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([ECHO_N]) m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_N$]) m4trace:configure.ac:1: -1- AC_SUBST([ECHO_T]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([ECHO_T]) m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_T$]) m4trace:configure.ac:1: -1- AC_SUBST([LIBS]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.ac:1: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:1: -1- AC_SUBST([build_alias]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([build_alias]) m4trace:configure.ac:1: -1- m4_pattern_allow([^build_alias$]) m4trace:configure.ac:1: -1- AC_SUBST([host_alias]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([host_alias]) m4trace:configure.ac:1: -1- m4_pattern_allow([^host_alias$]) m4trace:configure.ac:1: -1- AC_SUBST([target_alias]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([target_alias]) m4trace:configure.ac:1: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.ac:2: -1- AM_INIT_AUTOMAKE([-Wall -Werror foreign]) m4trace:configure.ac:2: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.ac:2: -1- AM_AUTOMAKE_VERSION([1.11.1]) m4trace:configure.ac:2: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.ac:2: -1- AC_SUBST([INSTALL_PROGRAM]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) m4trace:configure.ac:2: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.ac:2: -1- AC_SUBST([INSTALL_SCRIPT]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) m4trace:configure.ac:2: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.ac:2: -1- AC_SUBST([INSTALL_DATA]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([INSTALL_DATA]) m4trace:configure.ac:2: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.ac:2: -1- AC_SUBST([am__isrc], [' -I$(srcdir)']) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([am__isrc]) m4trace:configure.ac:2: -1- m4_pattern_allow([^am__isrc$]) m4trace:configure.ac:2: -1- _AM_SUBST_NOTMAKE([am__isrc]) m4trace:configure.ac:2: -1- AC_SUBST([CYGPATH_W]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([CYGPATH_W]) m4trace:configure.ac:2: -1- m4_pattern_allow([^CYGPATH_W$]) m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME']) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PACKAGE]) m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:2: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION']) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([VERSION]) m4trace:configure.ac:2: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ @%:@undef PACKAGE]) m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) m4trace:configure.ac:2: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:2: -1- AH_OUTPUT([VERSION], [/* Version number of package */ @%:@undef VERSION]) m4trace:configure.ac:2: -1- AC_REQUIRE_AUX_FILE([missing]) m4trace:configure.ac:2: -1- AC_SUBST([ACLOCAL]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([ACLOCAL]) m4trace:configure.ac:2: -1- m4_pattern_allow([^ACLOCAL$]) m4trace:configure.ac:2: -1- AC_SUBST([AUTOCONF]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([AUTOCONF]) m4trace:configure.ac:2: -1- m4_pattern_allow([^AUTOCONF$]) m4trace:configure.ac:2: -1- AC_SUBST([AUTOMAKE]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([AUTOMAKE]) m4trace:configure.ac:2: -1- m4_pattern_allow([^AUTOMAKE$]) m4trace:configure.ac:2: -1- AC_SUBST([AUTOHEADER]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([AUTOHEADER]) m4trace:configure.ac:2: -1- m4_pattern_allow([^AUTOHEADER$]) m4trace:configure.ac:2: -1- AC_SUBST([MAKEINFO]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([MAKEINFO]) m4trace:configure.ac:2: -1- m4_pattern_allow([^MAKEINFO$]) m4trace:configure.ac:2: -1- AC_SUBST([install_sh]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([install_sh]) m4trace:configure.ac:2: -1- m4_pattern_allow([^install_sh$]) m4trace:configure.ac:2: -1- AC_SUBST([STRIP]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([STRIP]) m4trace:configure.ac:2: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.ac:2: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM]) m4trace:configure.ac:2: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) m4trace:configure.ac:2: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.ac:2: -1- AC_SUBST([MKDIR_P]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([MKDIR_P]) m4trace:configure.ac:2: -1- m4_pattern_allow([^MKDIR_P$]) m4trace:configure.ac:2: -1- AC_SUBST([mkdir_p], ["$MKDIR_P"]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([mkdir_p]) m4trace:configure.ac:2: -1- m4_pattern_allow([^mkdir_p$]) m4trace:configure.ac:2: -1- AC_SUBST([AWK]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([AWK]) m4trace:configure.ac:2: -1- m4_pattern_allow([^AWK$]) m4trace:configure.ac:2: -1- AC_SUBST([SET_MAKE]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([SET_MAKE]) m4trace:configure.ac:2: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.ac:2: -1- AC_SUBST([am__leading_dot]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([am__leading_dot]) m4trace:configure.ac:2: -1- m4_pattern_allow([^am__leading_dot$]) m4trace:configure.ac:2: -1- AC_SUBST([AMTAR]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([AMTAR]) m4trace:configure.ac:2: -1- m4_pattern_allow([^AMTAR$]) m4trace:configure.ac:2: -1- AC_SUBST([am__tar]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([am__tar]) m4trace:configure.ac:2: -1- m4_pattern_allow([^am__tar$]) m4trace:configure.ac:2: -1- AC_SUBST([am__untar]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([am__untar]) m4trace:configure.ac:2: -1- m4_pattern_allow([^am__untar$]) m4trace:configure.ac:4: -1- AC_SUBST([CC]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:4: -1- AC_SUBST([CFLAGS]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([CFLAGS]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.ac:4: -1- AC_SUBST([LDFLAGS]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.ac:4: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:4: -1- AC_SUBST([LIBS]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.ac:4: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:4: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:4: -1- AC_SUBST([CC]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:4: -1- AC_SUBST([CC]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:4: -1- AC_SUBST([CC]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:4: -1- AC_SUBST([CC]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:4: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([ac_ct_CC]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:4: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([EXEEXT]) m4trace:configure.ac:4: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.ac:4: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([OBJEXT]) m4trace:configure.ac:4: -1- m4_pattern_allow([^OBJEXT$]) m4trace:configure.ac:4: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([DEPDIR]) m4trace:configure.ac:4: -1- m4_pattern_allow([^DEPDIR$]) m4trace:configure.ac:4: -1- AC_SUBST([am__include]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([am__include]) m4trace:configure.ac:4: -1- m4_pattern_allow([^am__include$]) m4trace:configure.ac:4: -1- AC_SUBST([am__quote]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([am__quote]) m4trace:configure.ac:4: -1- m4_pattern_allow([^am__quote$]) m4trace:configure.ac:4: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) m4trace:configure.ac:4: -1- AC_SUBST([AMDEP_TRUE]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([AMDEP_TRUE]) m4trace:configure.ac:4: -1- m4_pattern_allow([^AMDEP_TRUE$]) m4trace:configure.ac:4: -1- AC_SUBST([AMDEP_FALSE]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([AMDEP_FALSE]) m4trace:configure.ac:4: -1- m4_pattern_allow([^AMDEP_FALSE$]) m4trace:configure.ac:4: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) m4trace:configure.ac:4: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) m4trace:configure.ac:4: -1- AC_SUBST([AMDEPBACKSLASH]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([AMDEPBACKSLASH]) m4trace:configure.ac:4: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) m4trace:configure.ac:4: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) m4trace:configure.ac:4: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([CCDEPMODE]) m4trace:configure.ac:4: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.ac:4: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:4: -1- AC_SUBST([am__fastdepCC_TRUE]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) m4trace:configure.ac:4: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.ac:4: -1- AC_SUBST([am__fastdepCC_FALSE]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) m4trace:configure.ac:4: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.ac:4: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.ac:4: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.ac:5: -1- AM_PROG_CC_C_O m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([NO_MINUS_C_MINUS_O]) m4trace:configure.ac:5: -1- m4_pattern_allow([^NO_MINUS_C_MINUS_O$]) m4trace:configure.ac:5: -1- AH_OUTPUT([NO_MINUS_C_MINUS_O], [/* Define to 1 if your C compiler doesn\'t accept -c and -o together. */ @%:@undef NO_MINUS_C_MINUS_O]) m4trace:configure.ac:5: -1- AC_REQUIRE_AUX_FILE([compile]) m4trace:configure.ac:7: -1- m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) m4trace:configure.ac:7: -1- AC_SUBST([PKG_CONFIG]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([PKG_CONFIG]) m4trace:configure.ac:7: -1- m4_pattern_allow([^PKG_CONFIG$]) m4trace:configure.ac:7: -1- AC_SUBST([PKG_CONFIG]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([PKG_CONFIG]) m4trace:configure.ac:7: -1- m4_pattern_allow([^PKG_CONFIG$]) m4trace:configure.ac:7: -1- AC_SUBST([HBAAPI_CFLAGS]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([HBAAPI_CFLAGS]) m4trace:configure.ac:7: -1- m4_pattern_allow([^HBAAPI_CFLAGS$]) m4trace:configure.ac:7: -1- AC_SUBST([HBAAPI_LIBS]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([HBAAPI_LIBS]) m4trace:configure.ac:7: -1- m4_pattern_allow([^HBAAPI_LIBS$]) m4trace:configure.ac:8: -1- AC_SUBST([HBAAPI_CFLAGS]) m4trace:configure.ac:8: -1- AC_SUBST_TRACE([HBAAPI_CFLAGS]) m4trace:configure.ac:8: -1- m4_pattern_allow([^HBAAPI_CFLAGS$]) m4trace:configure.ac:9: -1- AC_SUBST([HBAAPI_LIBS]) m4trace:configure.ac:9: -1- AC_SUBST_TRACE([HBAAPI_LIBS]) m4trace:configure.ac:9: -1- m4_pattern_allow([^HBAAPI_LIBS$]) m4trace:configure.ac:16: -1- AM_CONDITIONAL([WITH_DCB], [test "X$with_dcb" != Xno]) m4trace:configure.ac:16: -1- AC_SUBST([WITH_DCB_TRUE]) m4trace:configure.ac:16: -1- AC_SUBST_TRACE([WITH_DCB_TRUE]) m4trace:configure.ac:16: -1- m4_pattern_allow([^WITH_DCB_TRUE$]) m4trace:configure.ac:16: -1- AC_SUBST([WITH_DCB_FALSE]) m4trace:configure.ac:16: -1- AC_SUBST_TRACE([WITH_DCB_FALSE]) m4trace:configure.ac:16: -1- m4_pattern_allow([^WITH_DCB_FALSE$]) m4trace:configure.ac:16: -1- _AM_SUBST_NOTMAKE([WITH_DCB_TRUE]) m4trace:configure.ac:16: -1- _AM_SUBST_NOTMAKE([WITH_DCB_FALSE]) m4trace:configure.ac:18: -1- AC_SUBST([DCBD_CFLAGS]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([DCBD_CFLAGS]) m4trace:configure.ac:18: -1- m4_pattern_allow([^DCBD_CFLAGS$]) m4trace:configure.ac:18: -1- AC_SUBST([DCBD_LIBS]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([DCBD_LIBS]) m4trace:configure.ac:18: -1- m4_pattern_allow([^DCBD_LIBS$]) m4trace:configure.ac:18: -1- AC_SUBST([DCBD_CFLAGS]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([DCBD_CFLAGS]) m4trace:configure.ac:18: -1- m4_pattern_allow([^DCBD_CFLAGS$]) m4trace:configure.ac:22: -1- AC_CONFIG_FILES([Makefile fcoeplumb fcoe-utils.spec fcoe_utils.h]) m4trace:configure.ac:23: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.ac:23: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:23: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([LTLIBOBJS]) m4trace:configure.ac:23: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.ac:23: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) m4trace:configure.ac:23: -1- AC_SUBST([am__EXEEXT_TRUE]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) m4trace:configure.ac:23: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) m4trace:configure.ac:23: -1- AC_SUBST([am__EXEEXT_FALSE]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) m4trace:configure.ac:23: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) m4trace:configure.ac:23: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) m4trace:configure.ac:23: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([top_builddir]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([top_build_prefix]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([srcdir]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([abs_srcdir]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([top_srcdir]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([abs_top_srcdir]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([builddir]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([abs_builddir]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([abs_top_builddir]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([INSTALL]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([MKDIR_P]) fcoe-utils-1.0.9/doc/0000755000175000017500000000000011312505504013310 5ustar chuckchuckfcoe-utils-1.0.9/doc/fcoemon.80000644000175000017500000002051711312505504015034 0ustar chuckchuck.TH "FCOEMON" "8" "December 22, 2008" "Open-FCoE Applications" "Open-FCoE Tools" .SH "NAME" \fBfcoemon\fR \- The Fibre Channel over Ethernet (FCoE) administration tool for monitoring and processing events from the DCB daemon (\fBdcbd\fR). .SH "SYNOPSIS" \fBfcoemon\fR [\fB\-h\fR | \fB\-\-help\fR] .P \fBfcoemon\fR [\fB\-v\fR | \fB\-\-version\fR] .P \fBfcoemon\fR [\fB\-f\fR | \fB\-\-foreground\fR] .P \fBfcoemon\fR [\fB\-d\fR | \fB\-\-debug\fR] .P \fBfcoemon\fR [\fB\-s\fR | \fB\-\-syslog\fR] .P \fBfcoemon\fR [\fB\-e\fR | \fB\-\-exec\fR \fI\fR] .SH "DESCRIPTION" The \fBfcoemon\fR command is a FCoE management tool provided by the \fBfcoe-utils\fR package. \fBfcoemon\fR is the daemon of the \fBfcoe\fR system service. When \fBfcoemon\fR starts, it establishes a socket connection with the DCB daemon (\fBdcbd\fR). It then sends commands to, and receives responses and events from \fBdcbd\fR. \fBfcoemon\fR will process the responses and events and will invoke the \fBfcoeplumb\fR script to create and destroy the FCoE interfaces as needed. Since \fBfcoemon\fR can depend on \fBdcbd\fR, there may be settings required for \fBdcbd\fR before \fBfcoemon\fR can be started. See the \fIDCB Settings\fR section below. The \fBfcoe\fR system may or may not depend on the DCB service. \fBfcoemon\fR will be started by the \fBfcoe\fR service only if one of the Ethernet ports requires DCB, as specified by the \fBfcoe\fR per-interface configuration files. If no Ethernet ports require DCB then \fBfcoemon\fR will not be started and the \fBfcoe\fR service will not depend on \fBdcbd\fR. .SH "OPTIONS" .TP \fB\-h | \-v | \-\-version\fR Show the version of the \fBfcoemon\fR command. .TP \fB\-f | \-\-foreground\fR Run \fBfcoemon\fR in the foreground. .TP \fB\-d | \-\-debug\fR Enable debugging messages. .TP \fB\-s | \-\-syslog\fR Use syslogd for logging. The default behavior is to log to stdout and stderr. .TP \fB\-e | \-\-exec\fR \fI\fR Specify the location of the \fBfcoeplumb\fR script. .SH "TERMINOLOGY" .TP \fBPFC\fR \- The DCB Priority Flow Control feature. .TP \fBApp:FCoE\fR \- The DCB Fibre Channel over Ethernet feature. .TP \fBLLINK\fR \- The DCB Logical Link TLV (or Logical Link) feature. .TP \fBmultiq\fR \- See Documentation/networking/multiqueue.txt of linux kernel source, v2.6.28 or higher. .TP \fBskbedit\fR \- See Documentation/networking/multiqueue.txt of linux kernel source v2.6.28 or higher. .SH "INSTALLATION REQUIREMENTS" The DCB and FCoE kernel configuration options must be enabled, these were introduced in the kernel version v2.6.29. Both the linux kernel and iproute2 must support multiq and skbedit. The DCB package must be installed with version 0.9.4 and higher. .SH "SUPPORTED DCB EVENTS" In response to each supported event from \fBdcbd\fR, \fBfcoemon\fR collects the current settings from \fBdcbd\fR to decide whether to delete and/or re-add the multiq queue discipline and skbedit filter. .TP \fBFEATURE_APP\fR If an event message is received from dcbd and if the feature code in the event message is FEATURE_APP (5), and if the subtype field is APP_FCOE_STYPE (0), we got a mode or configuration change event of the FCoE application. \fBfcoemon\fR will then issue queries to the DCB daemon to collect the current mode and configuration information. .TP \fBFEATURE_PFC\fR If an event message is received from dcbd and if the feature code in the event message is FEATURE_PFC (3), we got a mode or configuration change event of the Priority Flow Control (PFC) feature. The \fBfcoemon\fR will then issue queries to the DCB daemon to collect the current mode and configuration information. .TP \fBFEATURE_LLINK\fR If an event message is received from dcbd and if the feature code in the event message is FEATURE_LLINK (6), and if the subtype field is LLINK_FCOE_STYPE (0), we got a mode or configuration change event of the Logical Link TLV feature. The \fBfcoemon\fR will then issue queries to the DCB daemon to collect the current mode and configuration information. .SH "CRITERIA OF CREATING, RESETTING AND DESTROYING FCOE INTERFACE" In this section the \fBdcbtool\fR is used to describe the conditions of the DCB feture status beccause the meaning is more understandable and precise. Although you may also issue the commands at run-time, the commands are intended only to be used for description purpose. .TP \fBPFC and App:FCoE\fR DCB is configured correctly if .RS .PD 0 .TP 3 .BR "1)" " The command \fBdcbtool gc ethX dcb\fR shows DCB State: on" .TP 3 .BR "2)" " The command \fBdcbtool gc ethX app:0\fR shows Enable:true," .TP 3 .BR " " " Advertise:true, Willing:true." .TP 3 .BR "3)" " The command \fBdcbtool go ethX app:0\fR shows OperMode:true." .TP 3 .BR "4)" " The command \fBdcbtool go ethX pfc\fR shows OperMode:true and" .TP 3 .BR " " " the values of pfcup." .TP 3 .BR "5)" " The command \fBdcbtool go ethX app:0\fR shows appcfg. The bits" .TP 3 .BR " " " set to 1 are also set to 1 in pfcup found in (4)." .PD .RE .TP \fBLogical Link TLV\fR The Logical Link TLV feature is configured correctly if .RS .PD 0 .TP 3 .BR "1)" " The command \fBdcbtool gc ethX ll:0\fR shows" .TP 3 .BR " " " Enable:true, Advertise:true, Willing:true." .TP 3 .BR "2)" " The command \fBdcbtool go ethX ll:0\fR shows OperMode:true." .TP 3 .BR "3)" " The command \fBdbtool gp ethX ll:0\fR shows Link Status:up." .PD .RE .TP \fBCriteria to create FCoE interface\fR If DCB is required at the Ethernet port, an FCoE interface may be created only if the DCB is configured correctly. If DCB is not required at the Ethernet port, the FCoE interface may be created. .TP \fBCriteria to Destroy FCoE Interface\fR An FCoE interface will only be destroyed when the \fBfcoe\fR system service is stopped. .TP \fBChanging DCB Configuration, Qdisc and Filters\fR Changing the DCB configuration, qdisc, and filter are considered to be administrative actions. When the \fBfcoe\fR system service starts up, it sets up the default DCB configuration, qdisc, and filter for reliable FCoE operations. Administrators may alter the configuration while the service is running. Changing the DCB parameters may cause the \fBfcoemon\fR daemon to delete the existing multiq queue discipline, skbedit filter and re-add; but the \fBfcoe\fR service will not touch (e.g. destroy or reset) the FCoE interface. Changing the DCB configuration, qdisc, and filter should be avoided while I/O traffic are in progress. .SH "FILES" Installation of the fcoe-utils management tools include the following files: .TP \fI/etc/fcoe/config\fR This is the primary configuration file for the \fBfcoe\fR system service. The default options in this file are: \fBDEBUG="no"\fR and \fBUSE_SYSLOG="yes"\fR. The former is used to enable debugging messages from the \fBfcoe\fR service script, \fBfcoemon\fR, and the \fBfcoeplumb\fR script. The latter is to indicate if the log messages are to be output to the system log. Any changes to this file will require a restart of the \fBfcoe\fR service. .TP \fI/etc/fcoe/cfg-\fR This file will be read by the \fI/etc/init.d/fcoe\fR script and the \fBfcoemon\fR daemon. The default options in this file are: \fBFCOE_ENABLE="no"\fR and \fBDCB_REQUIRED="yes"\fR. The former is used to enable/disable the FCoE service at the ethX port. The latter is to indicate if the DCB service is required (select yes) or not required (select no) at the ethX port. If the former is set to no, the latter is ignored. The selection of the settings should match the settings of the FCoE switch port connected to the local Ethernet ethX port. Use an editor to set the desired \fByes/no\fR values for the \fBethX\fR interfaces. .TP \fI/etc/init.d/fcoe\fR This is the \fBfcoe\fR system service shell script. This script is invoked by the \fBinit\fR process or by the \fBservice\fR command. .TP \fI/sbin/fcoemon\fR This is the \fBfcoemon\fR daemon only invoked by the \fBfcoe\fR system service script. .TP \fI/sbin/fcoeadm\fR This is the program used by the \fBfcoe\fR system service to create or destroy FCoE interfaces. .TP \fI/etc/fcoe/scripts/fcoeplumb\fR This is a script only used by the \fBfcoemon\fR daemon. .SH "REPORTING BUGS" If you have identified a defect please file a bug with your distribution or engage the development mailing list at . .SH "SUPPORT" Open\-FCoE is maintained at . There are resources available for both developers and users at that site. fcoe-utils-1.0.9/doc/fcoeadm.80000644000175000017500000001334311312505504015003 0ustar chuckchuck.TH "FCOEADM" "8" "November 4, 2008" "Open-FCoE Applications" "Open-FCoE Tools" .SH "NAME" \fBfcoeadm\fR \- The Fibre Channel over Ethernet (FCoE) administration tool .SH "SYNOPSIS" \fBfcoeadm\fR [\fB\-c\fR|\fB\-\-create\fR] [\fI\fR] .P \fBfcoeadm\fR [\fB\-d\fR|\fB\-\-destroy\fR] [\fI\fR] .P \fBfcoeadm\fR [\fB\-r\fR|\fB\-\-reset\fR] [\fI\fR] .P \fBfcoeadm\fR [\fB\-i\fR|\fB\-\-interface\fR] [\fI\fR] .P \fBfcoeadm\fR [\fB\-t\fR|\fB\-\-target\fR] [\fI\fR] .P \fBfcoeadm\fR [\fB\-l\fR|\fB\-\-lun\fR] [\fI\fR [\fI\fR]] .P \fBfcoeadm\fR [\fB\-s\fR|\fB\-\-stats\fR] [\fI\fR [\fB\-n\fR \fI\fR]] .P \fBfcoeadm\fR [\fB\-v\fR|\fB\-\-version\fR] .P \fBfcoeadm\fR [\fB\-h\fR|\fB\-\-help\fR] .SH "DESCRIPTION" The \fBfcoeadm\fR command is intended to be the FCoE management tool for the Linux systems. The \fB\-c\fR, \fB\-d\fR, and \fB\-r\fR options are used to create, destroy, and reset an FCoE instance on a given network interface. The other options are used to query the information of the FCoE instance which includes the interface information, target information, LUN information, and port statistics. The \fBfcoeadm\fR command invokes the \fBHBAAPI\fR library routines to obtain these information. The \fBHBAAPI\fR library routines invoke the vendor\-specific library, \fBlibhbalinux\fR, to grab the information from the /sys file system. In other words, the \fBfcoeadm\fR command requires to have \fBlibHBAAPI\fR and \fBlibhbalinux\fR installed on the system to work. The \fBlibhbalinux\fR is maintained at \fB\fIwww.Open\-FCoE.org\fR. The installation instructions of \fBlibhbalinux\fR also instructs how to download the \fBHBAAPI\fR source code, build and install with the \fBlibhbalinux\fR. The last option \fB\-h\fR is used to show a brief usage message of the supported command syntax. .SH "OPTIONS" .TP \fB\-c\fR, \fB\-\-create\fR \fI\fR Creates an FCoE instance based on the given \fI\fR. .TP \fB\-d\fR, \fB\-\-destroy\fR \fI\fR Destroys an FCoE instance based on the given \fI\fR. .TP \fB\-r\fR, \fB\-\-reset\fR \fI\fR Resets the fc_host associated with the FCoE interface given by \fI\fR. .TP \fB\-i\fR, \fB\-\-interface\fR \fI\fR Show the information of the FCoE instances created at \fI\fR. If \fI\fR is not specified the command will show the information of all the FCoE instances created on the system. .TP \fB\-t\fR, \fB\-\-target\fR \fI\fR Show the information of all the discovered targets from the FCoE instances created at \fI\fR. If \fI\fR is not specified the command will show the information of all the discovered targets from all the FCoE instances created. .TP \fB\-l\fR, \fB\-\-lun\fR \fI\fR \fI\fR Show the detailed information of a specific LUN with \fI\fR at the target with port id \fI\fR. port id is also known as FC\-ID. If \fI\fR is not specified, all the LUNs associated with the target will be shown. .TP \fB\-s\fR, \fB\-\-stats\fR \fI\fR \fB\-n\fR \fI\fR Show the statistics (including FC4 statistics) of the FCoE instances created at \fI\fR. The information will be display in one line on the screen per given time interval. \fI\fR should be specified in whole intergers greater than 0. It specifies the time interval in the unit of second. If \fI\fR is not specified, the default interval is one second. .TP \fB\-v\fR, \fB\-\-version\fR Displays the version of the \fBfcoeadm\fR command. .TP \fB\-h\fR, \fB\-\-help\fR Displays the usage message of the \fBfcoeadm\fR command. .TP where \fI\fR is the network interface name, such as eth0, eth1, etc. .SH "EXAMPLES" Creates an FCoE instance on eth2 .IP $ \fBfcoeadm\fR \-c eth2 .P Destroys the FCoE instance on eth2 .IP $ \fBfcoeadm\fR \-d eth2 .P Resets the FCoE instance on eth2 .IP $ \fBfcoeadm\fR \-r eth2 .P Show the information of all the adapters and their ports having FCoE instances created. .IP $ \fBfcoeadm\fR \-i .P Show the information of a specific interface eth3. If eth3 has no FCoE instances created, the command will show the error "No fc_host found for eth3". .IP $ \fBfcoeadm\fR \-i eth3 .P Show the information of all the discovered targets from all the ports having FCoE instances created (they may be on different adapter cards). A brief listing of discovered LUNs are listed after the target they are associated with, if any. .IP $ \fBfcoeadm\fR \-t .P Show the information of all the discovered targets from a given port (eth3) having FCoE instance created. A brief listing of discovered LUNs are listed after each target they are associated with, if any. .IP $ \fBfcoeadm\fR \-t eth3 .P Show the detailed information of all the LUNs associated with a specific target. The target is identified by its port id (aka FC\-ID) 0xD700EF. .IP $ \fBfcoeadm\fR \-l 0xD700EF .P .IP $ \fBfcoeadm\fR \-l D700EF .P .IP $ \fBfcoeadm\fR \-l 0xd700ef .P .IP $ \fBfcoeadm\fR \-l d700ef .P Show the detailed information of a LUN associated with a specific target. The target is identified by its port id (aka FC\-ID) 0xD700EF and the LUN is identified by its LUN id. .IP $ \fBfcoeadm\fR \-l 0xD700EF 1 .P Show the statistics information of a specific port eth3 having FCoE instances created. The statistics are displayed one line per time interval. The default interval is one second if \-n option is not specified. .IP $ \fBfcoeadm\fR \-s eth3 .P .IP $ \fBfcoeadm\fR \-s eth3 \-n 3 .P .IP $ \fBfcoeadm\fR \-s eth3 \-n3 .SH "REPORTING BUGS" If you have identified a defect please either file a bug or engage the development mailing list at . .SH "SUPPORT" Open\-FCoE is maintained at . There are resources available for both developers and users at that site. fcoe-utils-1.0.9/include/0000755000175000017500000000000011312505504014166 5ustar chuckchuckfcoe-utils-1.0.9/include/fip.h0000644000175000017500000000630611312505504015122 0ustar chuckchuck/* * Copyright(c) 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Maintained at www.Open-FCoE.org */ #ifndef FIP_H #define FIP_H #define ETH_P_FCOE 0x8906 #define ETH_P_FIP 0x8914 #define FIP_ALL_FCOE_MACS { 0x01, 0x10, 0x18, 0x01, 0x00, 0x00 } #define FIP_ALL_FCF_MACS { 0x01, 0x10, 0x18, 0x01, 0x00, 0x01 } #define FIP_ALL_ENODE_MACS { 0x01, 0x10, 0x18, 0x01, 0x00, 0x02 } struct fiphdr { uint8_t fip_version; /* version, upper 4 bits only */ uint8_t __resvd_0; uint16_t fip_proto; /* protocol code */ uint8_t __resvd_1; uint8_t fip_subcode; /* subcode */ uint16_t fip_desc_len; /* descriptor list length */ uint16_t fip_flags; }; #define FIP_VERSION(n) (n << 4) #define FIP_F_FP (1 << 15) /* FPMA supported/requested/granted */ #define FIP_F_SP (1 << 14) /* SPMA supported/requested/granted */ #define FIP_F_A (1 << 2) /* Available for Login */ #define FIP_F_S (1 << 1) /* Solicited advertisement */ #define FIP_F_F (1 << 0) /* FCF */ /* FCF Discovery Protocol */ #define FIP_PROTO_DISC 1 #define FIP_DISC_SOL 1 #define FIP_DISC_ADV 2 /* Virtual Link Instantiation (encapsulated ELS) */ #define FIP_PROTO_VLI 2 #define FIP_VLI_REQ 1 #define FIP_VLI_REPLY 2 /* FIP Keep Alive */ #define FIP_PROTO_FKA 3 #define FIP_FKA 1 #define FIP_FKA_CLEAR 2 /* VLAN Discovery */ #define FIP_PROTO_VLAN 4 #define FIP_VLAN_REQ 1 #define FIP_VLAN_NOTE 2 struct fip_tlv_hdr { uint8_t tlv_type; uint8_t tlv_len; /* length in quad-words of entire TLV */ }; #define FIP_TLV_PRIORITY 1 #define FIP_TLV_MAC_ADDR 2 #define FIP_TLV_FC_MAP 3 #define FIP_TLV_NAME_IDENTIFIER 4 #define FIP_TLV_FABRIC_NAME 5 #define FIP_TLV_MAX_RECV_SIZE 6 #define FIP_TLV_FLOGI 7 #define FIP_TLV_FDISC 8 #define FIP_TLV_LOGO 9 #define FIP_TLV_ELP 10 #define FIP_TLV_VLAN 14 #define DEFAULT_FIP_PRIORITY 128 /* Priority Descriptor */ struct fip_tlv_priority { struct fip_tlv_hdr hdr; unsigned char __resvd; uint8_t priority; }; /* MAC Address Descriptor */ struct fip_tlv_mac_addr { struct fip_tlv_hdr hdr; unsigned char mac_addr[ETHER_ADDR_LEN]; }; /* FC-MAP Descriptor */ struct fip_tlv_fc_map { struct fip_tlv_hdr hdr; unsigned char __resvd[3]; uint8_t map[3]; }; /* Name Identifier Descriptor (also used for Fabric Name Descriptor) */ struct fip_tlv_name_id { struct fip_tlv_hdr hdr; unsigned char __resvd[2]; unsigned char wwn[8]; }; /* Max Receive Size Descriptor */ struct fip_tlv_max_recv_size { struct fip_tlv_hdr hdr; uint16_t mtu; }; /* VLAN */ struct fip_tlv_vlan { struct fip_tlv_hdr hdr; uint16_t vlan; /* only lower 12 bits matter */ }; #endif /* FIP_H */ fcoe-utils-1.0.9/include/fc_scsi.h0000644000175000017500000003414111312505504015753 0ustar chuckchuck/* * Copyright (c) 2008, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, * version 2.1, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * */ #ifndef _FC_SCSI_H_ #define _FC_SCSI_H_ /* * SCSI definitions. * From T10 SBC-3. */ /* * Block size. */ #define SCSI_BSIZE 512 /* * Operation codes. */ enum scsi_op { SCSI_OP_TEST_UNIT_READY = 0, /* test unit ready */ SCSI_OP_REQ_SENSE = 0x03, /* request sense */ SCSI_OP_INQUIRY = 0x12, /* inquiry */ SCSI_OP_START_STOP = 0x1b, /* start/stop unit command */ SCSI_OP_READ_CAP10 = 0x25, /* read capacity (32-bit blk address) */ SCSI_OP_READ10 = 0x28, /* read (32-bit block address) */ SCSI_OP_WRITE10 = 0x2a, /* write (32-bit block address) */ SCSI_OP_READ16 = 0x88, /* read (64-bit block address) */ SCSI_OP_SA_IN_16 = 0x9e, /* serivice action in (16) */ SCSI_OP_SA_OUT_16 = 0x9f, /* serivice action out (16) */ SCSI_OP_REPORT_LUNS = 0xa0, /* report LUNs */ }; /* * Name table initializer for SCSI opcodes. * Please keep this in sync with the enum above. */ #define SCSI_OP_NAME_INIT { \ [SCSI_OP_TEST_UNIT_READY] = "test unit ready", \ [SCSI_OP_REQ_SENSE] = "request sense", \ [SCSI_OP_INQUIRY] = "inquiry", \ [SCSI_OP_START_STOP] = "start/stop unit", \ [SCSI_OP_READ_CAP10] = "read_cap(10)", \ [SCSI_OP_READ10] = "read(10)", \ [SCSI_OP_WRITE10] = "write(10)", \ [SCSI_OP_READ16] = "read(16)", \ [SCSI_OP_SA_IN_16] = "sa_in(16)", \ [SCSI_OP_SA_OUT_16] = "sa_out(16)", \ [SCSI_OP_REPORT_LUNS] = "report LUNs", \ } /* * Service action codes. * Codes for SCSI_OP_SA_IN_16 and SCSI_OP_SA_OUT_16. */ enum scsi_sa_in_16 { SCSI_SA_READ_CAP16 = 0x10, /* read capacity (16) (IN only) */ SCSI_SA_RW_LONG = 0x11, /* read/write long (16) */ }; /* * Status codes. */ enum scsi_status { SCSI_ST_GOOD = 0x00, /* good */ SCSI_ST_CHECK = 0x02, /* check condition */ SCSI_ST_COND_MET = 0x04, /* condition met */ SCSI_ST_BUSY = 0x08, /* busy */ SCSI_ST_INTMED = 0x10, /* intermediate */ SCSI_ST_INTMED_MET = 0x14, /* intermediate, condition met */ SCSI_ST_RESERVED = 0x18, /* reservation conflict */ SCSI_ST_TS_FULL = 0x28, /* task set full */ SCSI_ST_ACA_ACTV = 0x30, /* ACA active */ SCSI_ST_ABORTED = 0x40, /* task aborted */ }; /* * Control byte. */ #define SCSI_CTL_LINK (1 << 0) /* Task is linked accross multiple commands */ #define SCSI_CTL_NACA (1 << 2) /* Normal auto contingent allegiance (ACA) */ /* * Test Unit Ready command. */ struct scsi_test_unit_ready { net8_t tr_op; /* opcode (0) */ net8_t _tr_resvd[4]; /* reserved */ net8_t tr_control; /* control bits */ }; /* * Request Sense command. */ struct scsi_req_sense { net8_t rs_op; /* opcode (0x88) */ net8_t rs_flags; /* LSB is descriptor sense bit */ net8_t _rs_resvd[2]; net8_t rs_alloc_len; /* allocated reply length */ net8_t rs_control; /* control bits */ }; #define SCSI_REQ_SENSE_LEN 6 /* expected length of struct */ #define SCSI_SENSE_LEN_MAX 252 /* maximum rs_alloc_len */ /* * Start / stop command. */ struct scsi_start { net8_t ss_op; /* opcode (0x88) */ net8_t ss_immed; /* LSB is respond-immediately bit */ net8_t _ss_resvd[2]; net8_t ss_flags; /* power condition, flags */ net8_t ss_control; /* control bits */ }; #define SCSI_START_LEN 6 /* expected length of struct */ /* * ss_flags: */ #define SCSI_SSF_START 0x01 /* start */ #define SCSI_SSF_LOEJ 0x02 /* load or eject depending on start */ #define SCSI_SSF_ACTIVE 0x10 /* set active power condition */ #define SCSI_SSF_IDLE 0x20 /* set idle power condition */ #define SCSI_SSF_STANDBY 0x30 /* set idle power condition */ #define SCSI_SSF_LU_CONTROL 0x70 /* set local control of power */ #define SCSI_SSF_IDLE_0 0xa0 /* force idle timer to zero */ #define SCSI_SSF_STDBY_0 0xb0 /* force standby timer to zero */ /* * Read Capacity (10) command. */ struct scsi_rcap10 { net8_t rc_op; /* opcode */ net8_t _rc_resvd; ua_net32_t rc_lba; /* logical block address */ net8_t _rc_resvd1[2]; net8_t rc_flags; /* flags (see below) */ net8_t rc_control; /* control */ }; #define SCSI_RCAP10_LEN 10 /* expected length of struct */ #define SCSI_RCAPF_PMI (1 << 0) /* rc_flags: partial medium indicator */ struct scsi_rcap10_resp { net32_t rc_lba; /* logical block address (size) */ net32_t rc_block_len; /* block length in bytes */ }; /* * Read Capacity (16) command. */ struct scsi_rcap16 { net8_t rc_op; /* opcode (0x9e) */ net8_t rc_sa; /* serivce action sub-opcode (0x10) */ ua_net64_t rc_lba; /* logical block address */ ua_net32_t rc_alloc_len; /* allocation length */ net8_t rc_flags; /* flags (see scsi_rcap10 rc_flags) */ net8_t rc_control; /* control */ }; #define SCSI_RCAP16_LEN 16 /* expected length of struct */ struct scsi_rcap16_resp { net64_t rc_lba; /* logical block address (size) */ net32_t rc_block_len; /* block length in bytes */ }; /* * Read(10) or write(10) command. */ struct scsi_rw10 { net8_t rd_op; /* opcode */ net8_t rd_flags; ua_net32_t rd_lba; /* logical block address */ net8_t rd_group; /* group number */ ua_net16_t rd_len; /* transfer length */ net8_t rd_control; /* control */ }; #define SCSI_RW10_LEN 10 /* expected length of struct */ /* * Read(16) or write(16) command. */ struct scsi_rw16 { net8_t rd_op; /* opcode */ net8_t rd_flags; ua_net64_t rd_lba; /* logical block address */ ua_net32_t rd_len; /* transfer length */ net8_t rd_group; /* group number */ net8_t rd_control; /* control */ }; #define SCSI_RW16_LEN 16 /* expected length of struct */ /* * Flags: */ #define RDF_RWPROT_BIT 5 /* shift for RD/WRPROTECT field */ #define RDF_DPO 0x10 /* disable page out - cache advisory */ #define RDF_FUA 0x08 /* force unit access */ #define RDF_FUA_NV 0x02 /* force unit access non-volatile */ /* * REPORT LUNS. */ struct scsi_report_luns { net8_t rl_op; /* opcode (0x88) */ net8_t _rl_resvd1; net8_t rl_sel_report; /* select report field */ net8_t _rl_resvd2[3]; ua_net32_t rl_alloc_len; /* allocated length for reply */ net8_t _rl_resvd3; net8_t rl_control; /* control */ }; #define SCSI_REPORT_LUNS_LEN 12 /* expected length of struct */ /* * rl_sel_report. */ #define SCSI_RLS_WKL 1 /* req. well known LUNs only */ #define SCSI_RLS_ITL 2 /* req. LUNs accessible to I_T nexus */ /* * REPORT LUNS repsonse. */ struct scsi_report_luns_resp { net32_t rl_len; /* list length in bytes */ net8_t _rl_resvd[4]; net64_t rl_lun[1]; /* list of LUNs */ }; /* * Inquiry. */ struct scsi_inquiry { net8_t in_op; /* opcode (0x12) */ net8_t in_flags; /* LSB is EVPD */ net8_t in_page_code; /* page code */ /* * Note that the in_alloc_len field was widened to 16-bits between * SPC-2 and SPC-3, but some devices will ignore the upper 8 bits. * It makes sense to use lengths less than 256 where possible. */ ua_net16_t in_alloc_len; /* allocated length for reply */ net8_t in_control; /* control */ }; #define SCSI_INQUIRY_LEN 6 /* expected length of struct */ /* * Inquiry in_flags. */ #define SCSI_INQF_EVPD (1 << 0) /* request vital product data (VPD) page */ /* * SCSI Inquiry VPD Page Codes. */ enum scsi_inq_page { SCSI_INQP_SUPP_VPD = 0, /* supported VPD list */ SCSI_INQP_UNIT_SN = 0x80, /* Unit serial number */ SCSI_INQP_DEV_ID = 0x83, /* Device Identification */ SCSI_INQP_SW_IF_ID = 0x84, /* Software Interface Identification */ SCSI_INQP_MGMT_ADDR = 0x85, /* management network addresses */ SCSI_INQP_EXT_DATA = 0x86, /* Extended Inquiry Data */ SCSI_INQP_MD_PAGE_POL = 0x87, /* Mode Page Policy */ SCSI_INQP_SCSI_PORTS = 0x88, /* SCSI Ports */ }; /* * Inquiry - standard data format. */ struct scsi_inquiry_std { net8_t is_periph; /* peripheral qualifier and type */ net8_t is_flags1; /* flags (see below) */ net8_t is_version; net8_t is_flags2; /* flags / response data format */ net8_t is_addl_len; /* additional length */ net8_t is_flags3; /* flags (see below) */ net8_t is_flags4; net8_t is_flags5; char is_vendor_id[8]; /* ASCII T10 vendor identification */ char is_product[16]; /* ASCII product identification */ char is_rev_level[4]; /* ASCII revision level */ char is_vendor_spec[56 - 36]; /* vendor specific data */ net8_t is_clock_flags; /* clocking, QAS, IUS flags */ net8_t is_resvd; net16_t is_vers_desc[8]; /* version descriptors */ /* followed by vendor-specific fields */ }; #define SCSI_INQUIRY_STD_LEN 74 /* expected length of structure */ /* * Peripheral qualifier in is_periph field. */ #define SCSI_INQ_PQUAL_MASK 0xe0 /* mask for peripheral qualifier */ #define SCSI_INQ_PTYPE_MASK 0x1f /* mask for peripheral type */ enum scsi_inq_pqual { SCSI_PQUAL_ATT = 0, /* peripheral attached */ SCSI_PQUAL_DET = (1 << 5), /* peripheral detached */ SCSI_PQUAL_NC = (3 << 5), /* not capable of attachment */ }; enum scsi_inq_ptype { SCSI_PTYPE_DIR = 0x00, /* direct acccess block device */ SCSI_PTYPE_SEQ = 0x01, /* sequential acccess block device */ SCSI_PTYPE_PRINT = 0x02, /* printer device (obsolete) */ SCSI_PTYPE_PROC = 0x03, /* processor device */ SCSI_PTYPE_WORM = 0x04, /* write-once device */ SCSI_PTYPE_CDDVD = 0x05, /* CD/DVD device */ SCSI_PTYPE_SCANNER = 0x06, /* scanner device (obsolete) */ SCSI_PTYPE_OPTMEM = 0x07, /* optical memory device */ SCSI_PTYPE_CHANGER = 0x08, /* medium changer device */ SCSI_PTYPE_RAID = 0x0c, /* storage array controoler (RAID) */ SCSI_PTYPE_SES = 0x0d, /* enclosure services device */ SCSI_PTYPE_SDIR = 0x0e, /* simplified direct acccess */ SCSI_PTYPE_OCRW = 0x0f, /* optical card reader/writer */ SCSI_PTYPE_BCC = 0x10, /* bridge controller commands */ SCSI_PTYPE_OSD = 0x11, /* object-based storage device */ SCSI_PTYPE_ADC = 0x12, /* automation/drive interface */ SCSI_PTYPE_UNK = 0x1f, /* unknown or no device type */ }; /* * is_flags[1-5] in the standard inquiry response. */ #define SCSI_INQF1_RMB (1 << 7) /* removable medium */ #define SCSI_INQF2_NACA (1 << 5) /* normal ACA */ #define SCSI_INQF2_HISUP (1 << 4) /* hierarchical LUN support */ #define SCSI_INQF2_RDF_MASK 0xf /* response data format mask */ #define SCSI_INQF2_RDF 2 /* this response data format */ #define SCSI_INQF3_PROTECT (1 << 0) /* supports protection information */ #define SCSI_INQF3_3PC (1 << 3) /* supports third-party copy */ #define SCSI_INQF3_TPGS_IMPL (1 << 4) /* supports REPORT TARGET PORT GRPS */ #define SCSI_INQF3_TPGS_EXPL (1 << 5) /* supports SET TARGET PORT GROUPS */ #define SCSI_INQF3_ACC (1 << 6) /* access controls coordinator */ #define SCSI_INQF3_SCCS (1 << 7) /* SCC supported (see SCC-2) */ #define SCSI_INQF4_ADDR16 (1 << 0) /* parallel-SCSI only */ #define SCSI_INQF4_MULTIP (1 << 4) /* multiport compliant */ #define SCSI_INQF4_ENCSERV (1 << 6) /* embedded enclosure services */ #define SCSI_INQF4_BQUE (1 << 7) /* basic task management model */ #define SCSI_INQF5_CMDQUE (1 << 1) /* full task management model */ #define SCSI_INQF5_LINKED (1 << 3) /* linked commands supported */ #define SCSI_INQF5_SYNC (1 << 4) /* parallel-SCSI only */ #define SCSI_INQF5_WBUS16 (1 << 5) /* parallel-SCSI only */ /* * Inquiry - page 0 - supported VPD pages. */ struct scsi_inquiry_supp_vpd { net8_t is_periph; /* peripheral qualifier and type */ net8_t is_page_code; /* page code (0x00) */ net8_t _is_resvd; /* reserved */ net8_t is_list_len; /* length of page list */ net8_t is_page_list[1]; /* supported page list - var. length */ }; /* * Inquiry - page 0x80 - unit serial number VPD page. */ struct scsi_inquiry_unit_sn { net8_t is_periph; /* peripheral qualifier and type */ net8_t is_page_code; /* page code (0x80) */ net8_t _is_resvd; /* reserved */ net8_t is_page_len; /* length of serial number */ net8_t is_serial[1]; /* ASCII serial number - var. length */ }; /* * Inquiry - page 0x83 - device identification. */ struct scsi_inquiry_dev_id { net8_t is_periph; /* peripheral qualifier and type */ net8_t is_page_code; /* page code (0x83) */ net16_t is_page_len; /* len of designation descriptor list */ /* descriptor list follows */ }; /* * Inquiry - page 0x83 designation descriptor list entry. */ struct scsi_inquiry_desc { net8_t id_proto_code; /* protocol identifier and code set */ net8_t id_type_flags; /* designator type and flags */ net8_t _id_resvd; /* reserved */ net8_t id_designator_len; /* designator length */ net8_t id_designator[1]; /* designator - variable length */ }; /* * id_proto_code field. */ #define SCSI_INQ_CODE_MASK 0xf /* mask for code set in id_proto_code */ enum scsi_inq_code_set { SCSI_CS_BIN = 1, /* designator contains binary values */ SCSI_CS_ASCII = 2, /* designator contains printable ASCII */ SCSI_CS_UTF8 = 3, /* designator contains UTF-8 codes */ }; /* * id_type_flags field. */ #define SCSI_INQT_PIV (1 << 7) /* protocol identifier field valid */ #define SCSI_INQT_ASSOC_BIT 4 /* shift count for association */ #define SCSI_INQT_ASSOC_MASK 0x3 /* mask for association */ #define SCSI_INQT_TYPE_MASK 0xf /* mask for designator type */ enum scsi_inq_assoc { SCSI_ASSOC_LUN = 0, /* designator is for the LUN */ SCSI_ASSOC_PORT = 1, /* designator is for the target port */ SCSI_ASSOC_TARG = 2, /* designator is for the target dev */ }; /* * Designator type field values. */ enum scsi_inq_dtype { SCSI_DTYPE_VENDOR = 0, /* vendor specific */ SCSI_DTYPE_T10_VENDOR = 1, /* T10 vendor-ID based */ SCSI_DTYPE_EUI_64 = 2, /* EUI-64 based */ SCSI_DTYPE_NAA = 3, /* network address authority (WWN) */ SCSI_DTYPE_RTPI = 4, /* relative target port id */ SCSI_DTYPE_TPORTG = 5, /* target port group */ SCSI_DTYPE_LPORTG = 6, /* logical port group */ SCSI_DTYPE_MD5_LUN = 7, /* MD5 LU identifier */ SCSI_DTYPE_SCSI_NAME = 8, /* SCSI name string */ }; #endif /* _FC_SCSI_H_ */ fcoe-utils-1.0.9/include/log.h0000644000175000017500000000061111312505504015116 0ustar chuckchuck#ifndef LOG_H #define LOG_H void log_start(char *program, int daemon, int level); void log_stop(); void do_log(int priority, const char *fmt, va_list ap); void log_debug(int level, char *fmt, ...); void log_warn(char *fmt, ...); void log_err(char *fmt, ...); void _log_errno(const char *func, char *call, int errnum); #define log_errno(s) _log_errno(__func__, s, errno) #endif /* LOG_H */ fcoe-utils-1.0.9/include/fc_types.h0000644000175000017500000000374511312505504016164 0ustar chuckchuck/* * Copyright (c) 2008, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, * version 2.1, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * */ #ifndef _LIBFC_TYPES_H_ #define _LIBFC_TYPES_H_ #include "net_types.h" /* * Host-order type definitions for Fibre Channel. */ /* * Note, in order for fc_wwn_t to be acceptable for %qx format strings, * it cannot be declared as u_int64_t. */ typedef unsigned long long fc_wwn_t; /* world-wide name */ typedef u_int32_t fc_fid_t; /* fabric address */ typedef u_int16_t fc_xid_t; /* exchange ID */ /* * Encapsulation / port option flags. */ #define FC_OPT_DEBUG_RX 0x01 /* log debug messages */ #define FC_OPT_DEBUG_TX 0x02 /* log debug messages */ #define FC_OPT_DEBUG (FC_OPT_DEBUG_RX | FC_OPT_DEBUG_TX) #define FC_OPT_NO_TX_CRC 0x04 /* don't generate sending CRC */ #define FC_OPT_NO_RX_CRC 0x08 /* don't check received CRC */ #define FC_OPT_FCIP_NO_SFS 0x10 /* No special frame (FCIP only) */ #define FC_OPT_PASSIVE 0x20 /* Responding to connect */ #define FC_OPT_SET_MAC 0x40 /* use non-standard MAC addr (FCOE) */ #define FC_OPT_FCOE_OLD 0x80 /* use old prototype FCoE encaps */ /* * Convert 48-bit IEEE MAC address to 64-bit FC WWN. */ fc_wwn_t fc_wwn_from_mac(u_int64_t, u_int32_t scheme, u_int32_t port); fc_wwn_t fc_wwn_from_wwn(fc_wwn_t, u_int32_t scheme, u_int32_t port); #endif /* _LIBFC_TYPES_H_ */ fcoe-utils-1.0.9/include/net_types.h0000644000175000017500000002673111312505504016362 0ustar chuckchuck/* * Copyright (c) 2008, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, * version 2.1, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * */ #ifndef _LIBSA_NET_TYPES_H_ #define _LIBSA_NET_TYPES_H_ #if !defined(NTOHL) #include #endif /* NTOHL */ /* * Type definitions for network order fields in protocol packets. * The access functions below do gets and puts on these structures. */ typedef unsigned char net8_t; /* direct use and assignment allowed */ /* * Aligned network order types. */ typedef struct { u_int16_t net_data; } net16_t; typedef struct { u_int32_t net_data; } net32_t; /* * The 64-bit type only requires 32-bit alignment. */ typedef struct { u_int32_t net_data[2]; /* most significant word first */ } net64_t; /* * 24-bit type. Byte aligned, in spite of the name. */ typedef struct { unsigned char net_data[3]; } net24_t; /* * 48-bit type. Byte aligned. */ typedef struct { unsigned char net_data[6]; } net48_t; /* * Unaligned network order types. * Any of these structures can be byte aligned. No padding is implied. */ typedef struct { unsigned char net_data[2]; } ua_net16_t; typedef struct { unsigned char net_data[4]; } ua_net32_t; typedef struct { unsigned char net_data[8]; } ua_net64_t; /* * Accessor functions. */ /** * net8_get(net) - fetch from a network-order 8-bit field. * * @param net pointer to network-order 8-bit data. * @return the host-order value. */ static inline u_int8_t net8_get(const net8_t * net) { return *net; } /** * net8_put(net, val) - store to a network-order 8-bit field. * * @param net pointer to network-order 8-bit data. * @param val host-order value to be stored at net. */ static inline void net8_put(net8_t * net, u_int8_t val) { *net = val; } /** * net16_get(net) - fetch from a network-order 16-bit field. * * @param net pointer to type net16_t, network-order 16-bit data. * @return the host-order value. */ static inline u_int16_t net16_get(const net16_t * net) { return ntohs(net->net_data); } /** * net16_put(net, val) - store to a network-order 16-bit field. * * @param net pointer to a net16_t, network-order 16-bit data. * @param val host-order value to be stored at net. */ static inline void net16_put(net16_t * net, u_int16_t val) { net->net_data = htons(val); } /** * ua_net16_get(net) - fetch from an unaligned network-order 16-bit field. * * @param net pointer to type ua_net16_t, unaligned, network-order 16-bit data. * @return the host-order value. */ static inline u_int16_t ua_net16_get(const ua_net16_t * net) { return (net->net_data[0] << 8) | net->net_data[1]; } /** * ua_net16_put(net, val) - store to a network-order 16-bit field. * * @param net pointer to a ua_net16_t, network-order 16-bit data. * @param val host-order value to be stored at net. */ static inline void ua_net16_put(ua_net16_t * net, u_int16_t val) { net->net_data[0] = (u_int8_t)((val >> 8) & 0xFF); net->net_data[1] = (u_int8_t)(val & 0xFF); } /** * net24_get(net) - fetch from a network-order 24-bit field. * * @param net pointer to type net24_t, network-order 24-bit data. * @return the host-order value. */ static inline u_int32_t net24_get(const net24_t * net) { return (net->net_data[0] << 16) | (net->net_data[1] << 8) | net->net_data[2]; } /** * net24_put(net, val) - store to a network-order 24-bit field. * * @param net pointer to a net24_t, network-order 24-bit data. * @param val host-order value to be stored at net. */ static inline void net24_put(net24_t * net, u_int32_t val) { net->net_data[0] = (u_int8_t)((val >> 16) & 0xFF); net->net_data[1] = (u_int8_t)((val >> 8) & 0xFF); net->net_data[2] = (u_int8_t)(val & 0xFF); } /** * net32_get(net) - fetch from a network-order 32-bit field. * * @param net pointer to type net32_t, network-order 32-bit data. * @return the host-order value. */ static inline u_int32_t net32_get(const net32_t * net) { return ntohl(net->net_data); } /** * net32_put(net, val) - store to a network-order 32-bit field. * * @param net pointer to a net32_t, network-order 32-bit data. * @param val host-order value to be stored at net. */ static inline void net32_put(net32_t * net, u_int32_t val) { net->net_data = htonl(val); } /** * ua_net32_get(net) - fetch from an unaligned network-order 32-bit field. * * @param net pointer to type ua_net32_t, unaligned, network-order 32-bit data. * @return the host-order value. */ static inline u_int32_t ua_net32_get(const ua_net32_t * net) { return (net->net_data[0] << 24) | (net->net_data[1] << 16) | (net->net_data[2] << 8) | net->net_data[3]; } /** * ua_net32_put(net, val) - store to a network-order 32-bit field. * * @param net pointer to a ua_net32_t, network-order 32-bit data. * @param val host-order value to be stored at net. */ static inline void ua_net32_put(ua_net32_t * net, u_int32_t val) { net->net_data[0] = (u_int8_t)((val >> 24) & 0xFF); net->net_data[1] = (u_int8_t)((val >> 16) & 0xFF); net->net_data[2] = (u_int8_t)((val >> 8) & 0xFF); net->net_data[3] = (u_int8_t)(val & 0xFF); } /** * net48_get(net) - fetch from a network-order 48-bit field. * * @param net pointer to type net48_t, network-order 48-bit data. * @return the host-order value. */ static inline u_int64_t net48_get(const net48_t * net) { return ((u_int64_t) net->net_data[0] << 40) | ((u_int64_t) net->net_data[1] << 32) | ((u_int64_t) net->net_data[2] << 24) | ((u_int64_t) net->net_data[3] << 16) | ((u_int64_t) net->net_data[4] << 8) | (u_int64_t) net->net_data[5]; } /** * net48_put(net, val) - store to a network-order 48-bit field. * * @param net pointer to a net48_t, network-order 48-bit data. * @param val host-order value to be stored at net. */ static inline void net48_put(net48_t * net, u_int64_t val) { net->net_data[0] = (u_int8_t)((val >> 40) & 0xFF); net->net_data[1] = (u_int8_t)((val >> 32) & 0xFF); net->net_data[2] = (u_int8_t)((val >> 24) & 0xFF); net->net_data[3] = (u_int8_t)((val >> 16) & 0xFF); net->net_data[4] = (u_int8_t)((val >> 8) & 0xFF); net->net_data[5] = (u_int8_t)(val & 0xFF); } /** * net64_get(net) - fetch from a network-order 64-bit field. * * @param net pointer to type net64_t, network-order 64-bit data. * @return the host-order value. */ static inline u_int64_t net64_get(const net64_t * net) { return ((u_int64_t) ntohl(net->net_data[0]) << 32) | ntohl(net->net_data[1]); } /** * net64_put(net, val) - store to a network-order 64-bit field. * * @param net pointer to a net64_t, network-order 64-bit data. * @param val host-order value to be stored at net. */ static inline void net64_put(net64_t * net, u_int64_t val) { net->net_data[0] = (u_int32_t)htonl(val >> 32); net->net_data[1] = (u_int32_t)htonl((u_int32_t) val); } /** * ua_net64_get(net) - fetch from an unaligned network-order 64-bit field. * * @param net pointer to type ua_net64_t, unaligned, network-order 64-bit data. * @return the host-order value. */ static inline u_int64_t ua_net64_get(const ua_net64_t * net) { return ((u_int64_t) net->net_data[0] << 56) | ((u_int64_t) net->net_data[1] << 48) | ((u_int64_t) net->net_data[2] << 40) | ((u_int64_t) net->net_data[3] << 32) | ((u_int64_t) net->net_data[4] << 24) | ((u_int64_t) net->net_data[5] << 16) | ((u_int64_t) net->net_data[6] << 8) | (u_int64_t) net->net_data[7]; } /** * ua_net64_put(net, val) - store to a network-order 64-bit field. * * @param net pointer to a ua_net64_t, network-order 64-bit data. * @param val host-order value to be stored at net. */ static inline void ua_net64_put(ua_net64_t * net, u_int64_t val) { net->net_data[0] = (u_int8_t)((val >> 56) & 0xFF); net->net_data[1] = (u_int8_t)((val >> 48) & 0xFF); net->net_data[2] = (u_int8_t)((val >> 40) & 0xFF); net->net_data[3] = (u_int8_t)((val >> 32) & 0xFF); net->net_data[4] = (u_int8_t)((val >> 24) & 0xFF); net->net_data[5] = (u_int8_t)((val >> 16) & 0xFF); net->net_data[6] = (u_int8_t)((val >> 8) & 0xFF); net->net_data[7] = (u_int8_t)(val & 0xFF); } /* * Compile-time initializers for the network-order type structures. * Note that the upper byte of these values is not masked so the * compiler will catch initializers that don't fit in the field. */ /** * NET8_INIT(_val) - initialize a net8_t type. * * @param _val 8-bit value. * @return net8_t network-order value. */ #define NET8_INIT(_val) (_val) /** * NET24_INIT(_val) - initialize a net24_t type. * * @param _val host-order value. * @return net24_t network-order value. */ #define NET24_INIT(_val) { { \ ((_val) >> 16), \ ((_val) >> 8) & 0xff, \ ((_val) >> 0) & 0xff \ } } /** * NET48_INIT(_val) - initialize a net48_t type. * * @param _val host-order value. * @return net48_t network-order value. */ #define NET48_INIT(_val) { { \ ((_val) >> 40), \ ((_val) >> 32) & 0xff, \ ((_val) >> 24) & 0xff, \ ((_val) >> 16) & 0xff, \ ((_val) >> 8) & 0xff, \ ((_val) >> 0) & 0xff \ } } /** * NET16_INIT(_val) - initialize a net16_t type. * * @param _val host-order value. * @return net16_t network-order value. */ #define NET16_INIT(_val) { htons(_val) } /** * UA_NET16_INIT(_val) - initialize an unaligned 16-bit type. * * @param _val host-order value. * @return ua_net24_t network-order value. */ #define UA_NET16_INIT(_val) { { \ ((_val) >> 8), \ ((_val) >> 0) & 0xff \ } } /** * NET32_INIT(_val) - initialize a 32-bit type. * * @param _val host-order value. * @return net32_t network-order value. */ #define NET32_INIT(_val) { htonl(_val) } /** * UA_NET32_INIT(_val) - initialize an unaligned 32-bit type. * * @param _val host-order value. * @return ua_net32_t network-order value. */ #define UA_NET32_INIT(_val) { { \ ((_val) >> 24), \ ((_val) >> 16) & 0xff, \ ((_val) >> 8) & 0xff, \ ((_val) >> 0) & 0xff \ } } /** * UA_NET48_INIT(_val) - initialize an unaligned 48-bit type. * * @param _val host-order value. * @return ua_net48_t network-order value. */ #define UA_NET48_INIT(_val) { { \ ((_val) >> 40), \ ((_val) >> 32) & 0xff, \ ((_val) >> 24) & 0xff, \ ((_val) >> 16) & 0xff, \ ((_val) >> 8) & 0xff, \ ((_val) >> 0) & 0xff \ } } /** * NET64_INIT(_val) - initialize an unaligned 64-bit type. * * @param _val host-order value. * @return ua_net64_t network-order value. */ #define NET64_INIT(_val) { { \ htonl((_val) >> 32), \ htonl((_val) & 0xffffffff) \ } } /** * UA_NET64_INIT(_val) - initialize a 64-bit type. * * @param _val host-order value. * @return net64_t network-order value. */ #define UA_NET64_INIT(_val) { { \ ((_val) >> 56), \ ((_val) >> 48) & 0xff, \ ((_val) >> 40) & 0xff, \ ((_val) >> 32) & 0xff, \ ((_val) >> 24) & 0xff, \ ((_val) >> 16) & 0xff, \ ((_val) >> 8) & 0xff, \ ((_val) >> 0) & 0xff \ } } #endif /* _LIBSA_NET_TYPES_H_ */ fcoe-utils-1.0.9/include/list.h0000644000175000017500000003175211312505504015322 0ustar chuckchuck/* Adapted from the Linux kernel, under the terms of the GPLv2 */ #ifndef LIST_H #define LIST_H #include #define container_of(ptr, type, member) ({ \ const typeof(((type *) 0)->member) * __mptr = (ptr); \ (type *)((char *) __mptr - offsetof(type, member)); \ }) /* * Simple doubly linked list implementation. * * Some of the internal functions ("__xxx") are useful when * manipulating whole lists rather than single entries, as * sometimes we already know the next/prev entries and we can * generate better code by using them directly rather than * using the generic single-entry routines. */ struct list_head { struct list_head *next, *prev; }; #define LIST_HEAD_INIT(name) { &(name), &(name) } #define LIST_HEAD(name) \ struct list_head name = LIST_HEAD_INIT(name) static inline void INIT_LIST_HEAD(struct list_head *list) { list->next = list; list->prev = list; } /* * Insert a new entry between two known consecutive entries. * * This is only for internal list manipulation where we know * the prev/next entries already! */ static inline void __list_add(struct list_head *new, struct list_head *prev, struct list_head *next) { next->prev = new; new->next = next; new->prev = prev; prev->next = new; } /** * list_add - add a new entry * @new: new entry to be added * @head: list head to add it after * * Insert a new entry after the specified head. * This is good for implementing stacks. */ static inline void list_add(struct list_head *new, struct list_head *head) { __list_add(new, head, head->next); } /** * list_add_tail - add a new entry * @new: new entry to be added * @head: list head to add it before * * Insert a new entry before the specified head. * This is useful for implementing queues. */ static inline void list_add_tail(struct list_head *new, struct list_head *head) { __list_add(new, head->prev, head); } /* * Delete a list entry by making the prev/next entries * point to each other. * * This is only for internal list manipulation where we know * the prev/next entries already! */ static inline void __list_del(struct list_head *prev, struct list_head *next) { next->prev = prev; prev->next = next; } /** * list_del - deletes entry from list. * @entry: the element to delete from the list. * Note: list_empty() on entry does not return true after this, the entry is * in an undefined state. */ static inline void list_del(struct list_head *entry) { __list_del(entry->prev, entry->next); entry->next = NULL; entry->prev = NULL; } /** * list_replace - replace old entry by new one * @old : the element to be replaced * @new : the new element to insert * * If @old was empty, it will be overwritten. */ static inline void list_replace(struct list_head *old, struct list_head *new) { new->next = old->next; new->next->prev = new; new->prev = old->prev; new->prev->next = new; } static inline void list_replace_init(struct list_head *old, struct list_head *new) { list_replace(old, new); INIT_LIST_HEAD(old); } /** * list_del_init - deletes entry from list and reinitialize it. * @entry: the element to delete from the list. */ static inline void list_del_init(struct list_head *entry) { __list_del(entry->prev, entry->next); INIT_LIST_HEAD(entry); } /** * list_move - delete from one list and add as another's head * @list: the entry to move * @head: the head that will precede our entry */ static inline void list_move(struct list_head *list, struct list_head *head) { __list_del(list->prev, list->next); list_add(list, head); } /** * list_move_tail - delete from one list and add as another's tail * @list: the entry to move * @head: the head that will follow our entry */ static inline void list_move_tail(struct list_head *list, struct list_head *head) { __list_del(list->prev, list->next); list_add_tail(list, head); } /** * list_is_last - tests whether @list is the last entry in list @head * @list: the entry to test * @head: the head of the list */ static inline int list_is_last(const struct list_head *list, const struct list_head *head) { return list->next == head; } /** * list_empty - tests whether a list is empty * @head: the list to test. */ static inline int list_empty(const struct list_head *head) { return head->next == head; } /** * list_empty_careful - tests whether a list is empty and not being modified * @head: the list to test * * Description: * tests whether a list is empty _and_ checks that no other CPU might be * in the process of modifying either member (next or prev) * * NOTE: using list_empty_careful() without synchronization * can only be safe if the only activity that can happen * to the list entry is list_del_init(). Eg. it cannot be used * if another CPU could re-list_add() it. */ static inline int list_empty_careful(const struct list_head *head) { struct list_head *next = head->next; return (next == head) && (next == head->prev); } /** * list_is_singular - tests whether a list has just one entry. * @head: the list to test. */ static inline int list_is_singular(const struct list_head *head) { return !list_empty(head) && (head->next == head->prev); } static inline void __list_splice(const struct list_head *list, struct list_head *head) { struct list_head *first = list->next; struct list_head *last = list->prev; struct list_head *at = head->next; first->prev = head; head->next = first; last->next = at; at->prev = last; } /** * list_splice - join two lists * @list: the new list to add. * @head: the place to add it in the first list. */ static inline void list_splice(const struct list_head *list, struct list_head *head) { if (!list_empty(list)) __list_splice(list, head); } /** * list_splice_init - join two lists and reinitialise the emptied list. * @list: the new list to add. * @head: the place to add it in the first list. * * The list at @list is reinitialised */ static inline void list_splice_init(struct list_head *list, struct list_head *head) { if (!list_empty(list)) { __list_splice(list, head); INIT_LIST_HEAD(list); } } /** * list_entry - get the struct for this entry * @ptr: the &struct list_head pointer. * @type: the type of the struct this is embedded in. * @member: the name of the list_struct within the struct. */ #define list_entry(ptr, type, member) \ container_of(ptr, type, member) /** * list_first_entry - get the first element from a list * @ptr: the list head to take the element from. * @type: the type of the struct this is embedded in. * @member: the name of the list_struct within the struct. * * Note, that list is expected to be not empty. */ #define list_first_entry(ptr, type, member) \ list_entry((ptr)->next, type, member) /** * list_for_each - iterate over a list * @pos: the &struct list_head to use as a loop cursor. * @head: the head for your list. */ #define list_for_each(pos, head) \ for (pos = (head)->next; pos != (head); pos = pos->next) /** * list_for_each_prev - iterate over a list backwards * @pos: the &struct list_head to use as a loop cursor. * @head: the head for your list. */ #define list_for_each_prev(pos, head) \ for (pos = (head)->prev; pos != (head); pos = pos->prev) /** * list_for_each_safe - iterate over a list safe against removal of list entry * @pos: the &struct list_head to use as a loop cursor. * @n: another &struct list_head to use as temporary storage * @head: the head for your list. */ #define list_for_each_safe(pos, n, head) \ for (pos = (head)->next, n = pos->next; \ pos != (head); \ pos = n, n = pos->next) /** * list_for_each_prev_safe - iterate over a list backwards safe against removal of list entry * @pos: the &struct list_head to use as a loop cursor. * @n: another &struct list_head to use as temporary storage * @head: the head for your list. */ #define list_for_each_prev_safe(pos, n, head) \ for (pos = (head)->prev, n = pos->prev; \ pos != (head); \ pos = n, n = pos->prev) /** * list_for_each_entry - iterate over list of given type * @pos: the type * to use as a loop cursor. * @head: the head for your list. * @member: the name of the list_struct within the struct. */ #define list_for_each_entry(pos, head, member) \ for (pos = list_entry((head)->next, typeof(*pos), member); \ &pos->member != (head); \ pos = list_entry(pos->member.next, typeof(*pos), member)) /** * list_for_each_entry_reverse - iterate backwards over list of given type. * @pos: the type * to use as a loop cursor. * @head: the head for your list. * @member: the name of the list_struct within the struct. */ #define list_for_each_entry_reverse(pos, head, member) \ for (pos = list_entry((head)->prev, typeof(*pos), member); \ &pos->member != (head); \ pos = list_entry(pos->member.prev, typeof(*pos), member)) /** * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue() * @pos: the type * to use as a start point * @head: the head of the list * @member: the name of the list_struct within the struct. * * Prepares a pos entry for use as a start point in * list_for_each_entry_continue(). */ #define list_prepare_entry(pos, head, member) \ ((pos) ? : list_entry(head, typeof(*pos), member)) /** * list_for_each_entry_continue - continue iteration over list of given type * @pos: the type * to use as a loop cursor. * @head: the head for your list. * @member: the name of the list_struct within the struct. * * Continue to iterate over list of given type, continuing after * the current position. */ #define list_for_each_entry_continue(pos, head, member) \ for (pos = list_entry(pos->member.next, typeof(*pos), member); \ &pos->member != (head); \ pos = list_entry(pos->member.next, typeof(*pos), member)) /** * list_for_each_entry_continue_reverse - iterate backwards from the given point * @pos: the type * to use as a loop cursor. * @head: the head for your list. * @member: the name of the list_struct within the struct. * * Start to iterate over list of given type backwards, continuing after * the current position. */ #define list_for_each_entry_continue_reverse(pos, head, member) \ for (pos = list_entry(pos->member.prev, typeof(*pos), member); \ &pos->member != (head); \ pos = list_entry(pos->member.prev, typeof(*pos), member)) /** * list_for_each_entry_from - iterate over list of given type from the current point * @pos: the type * to use as a loop cursor. * @head: the head for your list. * @member: the name of the list_struct within the struct. * * Iterate over list of given type, continuing from current position. */ #define list_for_each_entry_from(pos, head, member) \ for (; &pos->member != (head); \ pos = list_entry(pos->member.next, typeof(*pos), member)) /** * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry * @pos: the type * to use as a loop cursor. * @n: another type * to use as temporary storage * @head: the head for your list. * @member: the name of the list_struct within the struct. */ #define list_for_each_entry_safe(pos, n, head, member) \ for (pos = list_entry((head)->next, typeof(*pos), member), \ n = list_entry(pos->member.next, typeof(*pos), member); \ &pos->member != (head); \ pos = n, n = list_entry(n->member.next, typeof(*n), member)) /** * list_for_each_entry_safe_continue * @pos: the type * to use as a loop cursor. * @n: another type * to use as temporary storage * @head: the head for your list. * @member: the name of the list_struct within the struct. * * Iterate over list of given type, continuing after current point, * safe against removal of list entry. */ #define list_for_each_entry_safe_continue(pos, n, head, member) \ for (pos = list_entry(pos->member.next, typeof(*pos), member), \ n = list_entry(pos->member.next, typeof(*pos), member); \ &pos->member != (head); \ pos = n, n = list_entry(n->member.next, typeof(*n), member)) /** * list_for_each_entry_safe_from * @pos: the type * to use as a loop cursor. * @n: another type * to use as temporary storage * @head: the head for your list. * @member: the name of the list_struct within the struct. * * Iterate over list of given type from current point, safe against * removal of list entry. */ #define list_for_each_entry_safe_from(pos, n, head, member) \ for (n = list_entry(pos->member.next, typeof(*pos), member); \ &pos->member != (head); \ pos = n, n = list_entry(n->member.next, typeof(*n), member)) /** * list_for_each_entry_safe_reverse * @pos: the type * to use as a loop cursor. * @n: another type * to use as temporary storage * @head: the head for your list. * @member: the name of the list_struct within the struct. * * Iterate backwards over list of given type, safe against removal * of list entry. */ #define list_for_each_entry_safe_reverse(pos, n, head, member) \ for (pos = list_entry((head)->prev, typeof(*pos), member), \ n = list_entry(pos->member.prev, typeof(*pos), member); \ &pos->member != (head); \ pos = n, n = list_entry(n->member.prev, typeof(*n), member)) #endif /* LIST_H */ fcoe-utils-1.0.9/fcrls.c0000644000175000017500000003022011312505503014014 0ustar chuckchuck/* * Copyright(c) 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Maintained at www.Open-FCoE.org */ #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include typedef __u8 u8; typedef __u16 u16; typedef __u32 u32; typedef __u64 u64; #include #include #include #include #define ntoh24(n) (u32) ((n)[0] << 16 | (n)[1] << 8 | (n)[2]) #define hton24(h) { (h) >> 16 & 0xff, (h) >> 8 & 0xff, (h) & 0xff } #define SYSFS_FC_RPORTS "/sys/class/fc_remote_ports" struct rport_info { int host_no; int channel; u32 number; u32 port_id; bool found; bool online; }; struct fcoe_fc_els_lesb { __be32 lesb_link_fail; /* link failure count */ __be32 lesb_vlink_fail; /* virtual link failure count */ __be32 lesb_miss_fka; /* missing FIP keep-alive count */ __be32 lesb_symb_err; /* symbol error during carrier count */ __be32 lesb_err_block; /* errored block count */ __be32 lesb_fcs_error; /* frame check sequence error count */ } __attribute__((__packed__)); union rls_acc { struct fc_els_lesb fs3; struct fcoe_fc_els_lesb bb5; } __attribute__((__packed__)); struct rls_rjt { u8 er_resv; u8 er_reason; u8 er_explan; u8 er_vendor; } __attribute__((__packed__)); struct rls_rsp { u8 rls_cmd; u8 rls_resv[3]; union rls_acc acc; struct rls_rjt rjt; } __attribute__((__packed__)); static char *rjt_reason[] = { [1] = "Invalid command code", [2] = "Invalid version level", [3] = "Logical error", [4] = "Invalid CT_IU size", [5] = "Logical busy", [7] = "Protocol error", [9] = "Unable to perform command request", [0xB] = "Command not supported", [0xD] = "Server not available", [0xE] = "Session could not be established", [0xFF] = "Vendor specific", [0x100] = "N/A", }; static char *rjt_explan[] = { [0] = "No additional explanation", [1] = "Port Identifier not registered", [2] = "Port Name not registered", [3] = "Node Name not registered", [4] = "Class of Service not registered", [6] = "Initial Process Associator not registered", [7] = "FC-4 Types not registered", [8] = "Symbolic Port Name not registered", [9] = "Symbolic Node Name not registered", [0xA] = "Port Type not registered", [0xC] = "Fabric Port Name not registered", [0xD] = "Hard Address not registered", [0xF] = "FC-4 Features not registered", [0x10] = "Access denied", [0x11] = "Unacceptable Port Identifier", [0x12] = "Data base empty", [0x13] = "No object registered in the specified scope", [0x14] = "Domain ID not present", [0x15] = "Port number not present", [0x16] = "No device attached", [0x17] = "invalid OX_ID-RX_ID combination", [0x19] = "Request already in progress", [0x1e] = "N_Port login required", [0x29] = "insufficient resources", [0x2a] = "unable to supply requested data", [0x2c] = "Request not supported", [0x2d] = "Invalid payload length", [0x44] = "Invalid Port/Node_Name", [0x46] = "Login Extension not supported", [0x48] = "Authentication required", [0x50] = "Periodic Scan Value not allowed", [0x51] = "Periodic Scanning not supported", [0x60] = "MAC addressing mode not supported", [0x61] = "Proposed MAC address incorrectly formed", [0xf0] = "Authorization Exception", [0xf1] = "Authentication Exception", [0xf2] = "Data base full", [0xf3] = "Data base empty", [0xf4] = "Processing request", [0xf5] = "Unable to verify connection", [0xf6] = "Devices not in a common zone", [0x100] = "N/A", }; enum commands { NONE = 0, RLS_PORT, RLS_FCID, RLS_QUIET, RLS_HELP, }; /* RLS_QUIET */ static bool quiet; /* : - has arg * :: - has optional arg * ; - arg is long opt */ static const struct option lopt[] = { { "port", required_argument, NULL, RLS_PORT }, { "fcid", required_argument, NULL, RLS_FCID }, { "quiet", no_argument, NULL, RLS_QUIET }, { "help", no_argument, NULL, RLS_HELP }, { NULL, 0, NULL, 0 }, }; static const char *lopt_usage[] = { "rport bsg name, e.g., rport-7:0-1.", "rport port FC_ID, e.g., 0xce000d.", "disable verbose output.", "print useage information.", NULL, }; #define bsg_error(format...) \ ({ \ fprintf(stderr, "ERROR: " format); \ }) #define bsg_debug(format...) \ ({ \ if (!quiet) \ printf("DEBUG: " format); \ }) static char *els_rjt2str(int type, int code) { char **str; str = (type == 0) ? rjt_reason : rjt_explan; if (code > 0xff) code = 0x100; if (!str[code]) code = 0x100; return str[code]; } static int els_print_lesb(struct fcoe_fc_els_lesb *lesb) { printf("RLS request accepted (LS_ACC), dumping status counters:\n" "\tLink Failure Count = %u\n" "\tVirtual Link Failure Count = %u\n" "\tMissed Discovery Advertisement Count = %u\n" "\tSymbol Error During Carrier Count = %u\n" "\tErrored Block Count = %u\n" "\tFrame Check Sequence Error Count = %u\n", ntohl(lesb->lesb_link_fail), ntohl(lesb->lesb_vlink_fail), ntohl(lesb->lesb_miss_fka), ntohl(lesb->lesb_symb_err), ntohl(lesb->lesb_err_block), ntohl(lesb->lesb_fcs_error)); return 0; } static int els_print_rjt(struct rls_rjt *rjt) { printf("RLS request rejected (LS_RJT), check reason code below:\n" "\tReason Code = 0x%02x, %s.\n" "\tExplain Code = 0x%02x, %s.\n", rjt->er_reason, els_rjt2str(0, rjt->er_reason), rjt->er_explan, els_rjt2str(1, rjt->er_explan)); if (rjt->er_reason == ELS_RJT_VENDOR) printf("\tVendor Code = 0x%02x (check with your vendor).\n", rjt->er_vendor); return 0; } static int bsg_rport_els(int bsg, u8 els_code, void *req, int req_len, void *rsp, int rsp_len) { int rc; char sense[96]; struct fc_bsg_reply *reply = (struct fc_bsg_reply *)sense; struct fc_bsg_request cdb = { .msgcode = FC_BSG_RPT_ELS, .rqst_data.r_els = { .els_code = els_code, } }; struct sg_io_v4 sgio = { .guard = 'Q', .protocol = BSG_PROTOCOL_SCSI, .subprotocol = BSG_SUB_PROTOCOL_SCSI_TRANSPORT, .request_len = sizeof(cdb), .request = (u64)((long)&cdb), .dout_xfer_len = req_len, .dout_xferp = (u64)((long)req), .din_xfer_len = rsp_len, .din_xferp = (u64)((long)rsp), .max_response_len = sizeof(sense), .response = (u64)((long)&sense), .timeout = 1000, }; memset(sense, 0, sizeof(sense)); rc = ioctl(bsg, SG_IO, &sgio); bsg_debug("ioctl returned %d: bsg_reply result=%d\n", rc, reply->result); return rc; } static int bsg_rport_els_rls(int bsg, struct rport_info *rpi) { int rc = EOPNOTSUPP; struct fc_els_rls rls = { .rls_cmd = ELS_RLS, .rls_port_id = hton24(rpi->port_id), }; struct rls_rsp rsp; memset(&rsp, 0, sizeof(rsp)); rc = bsg_rport_els(bsg, ELS_RLS, &rls, sizeof(rls), &rsp, sizeof(rsp)); if (rc) { bsg_error("bsg_rport_els(ELS_RLS) failed\n"); return rc; } if (rsp.rls_cmd == ELS_LS_ACC) return els_print_lesb(&rsp.acc.bb5); if (rsp.rls_cmd == ELS_LS_RJT) return els_print_rjt(&rsp.rjt); bsg_error("Unknow response!\n"); return EIO; } static int rport_getid(struct rport_info *rpi) { FILE *f; char rp_sysfs[256]; if (rpi->found) return 0; snprintf(rp_sysfs, sizeof(rp_sysfs), "%s/rport-%d:%d-%d/port_id", SYSFS_FC_RPORTS, rpi->host_no, rpi->channel, rpi->number); f = fopen(rp_sysfs, "ro"); if (!f) { bsg_error("failed to fopen(%s)!\n", rp_sysfs); return ENODEV; } if (1 != fscanf(f, "0x%6x", &rpi->port_id)) { bsg_error("failed to fscanf(%s)\n", rp_sysfs); fclose(f); return ENODEV; } if (rpi->port_id & 0xff000000) { bsg_error("rport %s:invalid fcid 0x%x\n", rp_sysfs, rpi->port_id); rpi->port_id = 0; fclose(f); return ENODEV; } fclose(f); return 0; } /* * parse a string in format of rport-%d:%d-%d, and get the * corresponding rport info. * rport-%d:%d-%d */ static int rport_parse(const char *s, struct rport_info *rpi) { if (!s) return EINVAL; memset(rpi, 0, sizeof(*rpi)); if (3 != sscanf(s, "rport-%d:%d-%d", &rpi->host_no, &rpi->channel, &rpi->number)) return ENODEV; if (rport_getid(rpi)) return ENODEV; return 0; } #define RPORT_ONLINE "Online" static int rport_check_state(struct rport_info *rpi) { FILE *f; char rp_sysfs[256]; char rp_state[256]; rpi->online = false; if (!rpi->found) return EINVAL; snprintf(rp_sysfs, sizeof(rp_sysfs), "%s/rport-%d:%d-%d/port_state", SYSFS_FC_RPORTS, rpi->host_no, rpi->channel, rpi->number); f = fopen(rp_sysfs, "ro"); if (!f) { bsg_error("failed to fopen(%s)!\n", rp_sysfs); return ENODEV; } if (!fgets(rp_state, sizeof(rp_state), f)) { bsg_error("failed to fgets(%s)!\n", rp_sysfs); fclose(f); return ENODEV; } if (strncmp(rp_state, RPORT_ONLINE, strlen(RPORT_ONLINE))) { bsg_error("rport 0x%x %s:must be %s\n", rpi->port_id, rp_state, RPORT_ONLINE); fclose(f); return ENODEV; } rpi->online = true; fclose(f); return 0; } /* locate rport by fcid */ static int rport_find(struct rport_info *rpi) { int n; struct dirent **namelist; struct rport_info rpii; if (rpi->found) return 0; if (!rpi->port_id) return ENODEV; n = scandir(SYSFS_FC_RPORTS, &namelist, 0, alphasort); if (n < 0) { bsg_error("failed to scandir %s\n", SYSFS_FC_RPORTS); return ENODEV; } while (n--) { if (namelist[n]->d_type != DT_DIR) goto free_name; if (rport_parse(namelist[n]->d_name, &rpii)) goto free_name; if (rpi->port_id != rpii.port_id) goto free_name; rpii.found = true; memcpy(rpi, &rpii, sizeof(rpii)); bsg_debug("found rport 0x%06x as rport-%d:%d-%d\n", rpi->port_id, rpi->host_no, rpi->channel, rpi->number); free_name: free(namelist[n]); } free(namelist); return 0; } static void bsg_usage(int status) { int i, n; if (status) bsg_error("Failed! %s (Errno %d)!\n", strerror(status), status); n = sizeof(lopt)/sizeof(struct option) - 1; printf("Usage: fcrls\n"); for (i = 0; i < n; i++) printf("\t--%s: %s\n", lopt[i].name, lopt_usage[i]); exit(status); } int main(int argc, char *argv[]) { int rc = ENODEV; int opt; int bsg_dev; char *endptr; char *bsg_name = NULL; struct rport_info rpi; rpi.found = false; while ((opt = getopt_long(argc, argv, "", lopt, NULL)) != -1) { switch (opt) { case RLS_PORT: if (rport_parse(optarg, &rpi)) { bsg_error("%s format incorrect, must be:" "rport-host:channel-number\n", optarg); bsg_usage(EINVAL); } rpi.found = true; goto out_rls; case RLS_FCID: rpi.found = false; rpi.port_id = strtoull(optarg, &endptr, 16); if (*endptr != '\0') { bsg_error("%s has no valid FCID\n", optarg); bsg_usage(EINVAL); } if (rport_find(&rpi)) { bsg_error("%s is not a rport\n", optarg); bsg_usage(ENODEV); } goto out_rls; case RLS_QUIET: quiet = true; break; case RLS_HELP: bsg_usage(0); break; } } out_rls: /* bsg device name */ if (!rpi.found) bsg_usage(ENODEV); if (asprintf(&bsg_name, "/dev/bsg/rport-%d:%d-%d", rpi.host_no, rpi.channel, rpi.number) < 0) { rc = ENOMEM; bsg_error("not enough memory!\n"); goto out_error; } /* open bsg device */ bsg_dev = open(bsg_name, O_RDWR); if (bsg_dev < 0) { bsg_error("failed to open %s!\n", bsg_name); goto out_free; } /* check port state */ if (rport_check_state(&rpi) || (!rpi.online)) { bsg_error("rport 0x%x is not online!\n", rpi.port_id); goto out_close; } /* send rls */ rc = bsg_rport_els_rls(bsg_dev, &rpi); if (rc) { bsg_error("Faild to bsg_rport_els_rls\n"); goto out_close; } rc = 0; out_close: close(bsg_dev); out_free: free(bsg_name); out_error: return rc; } fcoe-utils-1.0.9/fcoemon_utils.c0000644000175000017500000003667411312505503015574 0ustar chuckchuck/* * Copyright(c) 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Maintained at www.Open-FCoE.org */ #include "fcoemon_utils.h" #include "net_types.h" #include "fc_types.h" u_char libsa_lock_hier; /* for lock debugging non-log related */ int use_syslog; /* * Size of on-stack line buffers. * These shouldn't be to large for a kernel stack frame. */ #define SA_LOG_BUF_LEN 200 /* on-stack line buffer size */ void enable_syslog(int enable) { use_syslog = enable; } /* * log with a variable argument list. */ static void sa_log_va(const char *func, const char *format, va_list arg) { size_t len; size_t flen; int add_newline; char sa_buf[SA_LOG_BUF_LEN]; char *bp; /* * If the caller didn't provide a newline at the end, we will. */ len = strlen(format); add_newline = 0; if (!len || format[len - 1] != '\n') add_newline = 1; bp = sa_buf; len = sizeof(sa_buf); if (func) { flen = snprintf(bp, len, "%s: ", func); len -= flen; bp += flen; } flen = vsnprintf(bp, len, format, arg); if (add_newline && flen < len) { bp += flen; *bp++ = '\n'; *bp = '\0'; } sa_log_output(sa_buf); } /* * log */ void sa_log(const char *format, ...) { va_list arg; va_start(arg, format); sa_log_va(NULL, format, arg); va_end(arg); } /* * log with error number. */ void sa_log_err(int error, const char *func, const char *format, ...) { va_list arg; char buf[SA_LOG_BUF_LEN]; if (func) sa_log("%s: error %d %s", func, error, strerror_r(error, buf, sizeof(buf))); else sa_log("error %d %s", error, strerror_r(error, buf, sizeof(buf))); va_start(arg, format); sa_log_va(func, format, arg); va_end(arg); } /* * Size of on-stack line buffers. * These shouldn't be to large for a kernel stack frame. */ #define SA_LOG_BUF_LEN 200 /* on-stack line buffer size */ /* * Assert failures. */ void assert_failed(const char *format, ...) { va_list arg; char buf[SA_LOG_BUF_LEN]; va_start(arg, format); vsnprintf(buf, sizeof(buf), format, arg); va_end(arg); sa_log_abort(buf); } /* * Log options. * These may be set directly by callers. */ u_int sa_log_flags; /* timestamp and other option flags */ int sa_log_time_delta_min = 1; /* minimum diff to print in millisec */ char *sa_log_prefix; /* string to print before any message */ void sa_log_set_option(u_int flags) { sa_log_flags = flags; } /* * Put timestamp on front of each log line, as controlled by tunables above. */ static void sa_log_timestamp(void) { static struct timeval tlast; char ctime_buf[30]; struct timeval t; struct timeval diff; gettimeofday(&t, NULL); if (sa_log_flags & SA_LOGF_TIME) { ctime_r(&t.tv_sec, ctime_buf); ctime_buf[11 + 8] = '\0'; /* trim ctime after seconds */ fprintf(stderr, "%s.%3.3ld ", ctime_buf + 11, t.tv_usec / 1000); } if (sa_log_flags & SA_LOGF_DELTA) { if (tlast.tv_sec == 0) tlast = t; timersub(&t, &tlast, &diff); tlast = t; if (diff.tv_sec != 0 || diff.tv_usec >= sa_log_time_delta_min * 1000) fprintf(stderr, "%4ld.%3.3ld ", diff.tv_sec, diff.tv_usec / 1000); else fprintf(stderr, "%8s ", ""); } if (sa_log_prefix) fprintf(stderr, "%s: ", sa_log_prefix); } void sa_log_output(const char *buf) { if (use_syslog) { syslog(LOG_INFO, "%s", buf); return; } sa_log_timestamp(); fprintf(stderr, "%s", buf); fflush(stderr); } void sa_log_abort(const char *buf) { sa_log_output(buf); abort(); } /* * Make a printable NUL-terminated copy of the string. * The source buffer might not be NUL-terminated. */ char * sa_strncpy_safe(char *dest, size_t len, const char *src, size_t src_len) { char *dp = dest; const char *sp = src; while (len-- > 1 && src_len-- > 0 && *sp != '\0') { *dp++ = isprint(*sp) ? *sp : (isspace(*sp) ? ' ' : '.'); sp++; } *dp = '\0'; /* * Take off trailing blanks. */ while (--dp >= dest && isspace(*dp)) *dp = '\0'; return dest; } /** sa_enum_decode(buf, len, tp, val) * * @param buf buffer for result (may be used or not). * @param len size of buffer (at least 32 bytes recommended). * @param tp pointer to table of names and values, struct sa_nameval. * @param val value to be decoded into a name. * @returns pointer to name string. Unknown values are put into buffer in hex. */ const char * sa_enum_decode(char *buf, size_t len, const struct sa_nameval *tp, u_int val) { for (; tp->nv_name != NULL; tp++) { if (tp->nv_val == val) return tp->nv_name; } snprintf(buf, len, "Unknown (code 0x%X)", val); return buf; } #define SA_TIMER_HZ (1000 * 1000 * 1000ULL) /* nanoseconds per second */ #define SA_TIMER_FUZZ (500 * 1000ULL) /* 500 microseconds is close enough */ static struct sa_timer *sa_timer_head; /* queue of scheduled events */ static u_int64_t sa_timer_nsec; /* nanoseconds since start */ /* * Initialize a timer structure. Set handler. */ void sa_timer_init(struct sa_timer *tm, void (*handler)(void *), void *arg) { ASSERT(handler != NULL); memset(tm, 0, sizeof(*tm)); tm->tm_handler = handler; tm->tm_handler_arg = arg; } /* * Allocate a timer structure. Set handler. */ struct sa_timer * sa_timer_alloc(void (*handler)(void *arg), void *arg) { struct sa_timer *tm; tm = malloc(sizeof(*tm)); if (tm) sa_timer_init(tm, handler, arg); return tm; } u_int64_t sa_timer_get(void) { u_int64_t nsec; #ifndef _POSIX_TIMERS struct timeval tv; gettimeofday(&tv, NULL); /* XXX want monotonic time, not TOD */ nsec = tv.tv_sec * SA_TIMER_HZ + tv.tv_usec * 1000; #else /* _POSIX_TIMERS */ struct timespec ts; int rc; rc = clock_gettime(CLOCK_MONOTONIC, &ts); ASSERT_NOTIMPL(rc == 0); nsec = ts.tv_sec * SA_TIMER_HZ + ts.tv_nsec; #endif /* _POSIX_TIMERS */ #if 0 /* XXX */ ASSERT(nsec >= sa_timer_nsec); /* really must be monotonic */ #else if (nsec < sa_timer_nsec) sa_log("sa_timer_get: negative time lapse " "old %qud new %qud diff %qd nsec\n", (long long unsigned int) sa_timer_nsec, (long long unsigned int) nsec, (long long int) (nsec - sa_timer_nsec)); #endif sa_timer_nsec = nsec; return nsec; } /* * Get monotonic time since some arbitrary time in the past. * If _POSIX_MONOTONIC_CLOCK isn't available, we'll use time of day. */ u_int sa_timer_get_secs(void) { u_int sec; #ifndef _POSIX_TIMERS struct timeval tv; gettimeofday(&tv, NULL); /* XXX want monotonic time, not TOD */ sec = tv.tv_sec; #else /* _POSIX_TIMERS */ struct timespec ts; int rc; rc = clock_gettime(CLOCK_MONOTONIC, &ts); ASSERT_NOTIMPL(rc == 0); sec = ts.tv_sec; #endif /* _POSIX_TIMERS */ return sec; } /* * Set timer to fire. Delta is in microseconds from now. */ void sa_timer_set(struct sa_timer *tm, u_long delta_usec) { struct sa_timer *cur; struct sa_timer **prev; ASSERT(delta_usec != 0); ASSERT(tm->tm_handler != NULL); sa_timer_cancel(tm); ASSERT(sa_timer_active(tm) == 0); tm->tm_nsec = sa_timer_get() + delta_usec * SA_TIMER_HZ / SA_TIMER_UNITS; ASSERT(tm->tm_nsec != 0); /* * Insert timer into sorted linked list. * Find insertion point, before cur. */ for (prev = &sa_timer_head; (cur = *prev) != NULL && cur->tm_nsec <= tm->tm_nsec; prev = &cur->tm_next) ; *prev = tm; tm->tm_next = cur; } /* * Cancel timer if it is active. */ void sa_timer_cancel(struct sa_timer *tm) { struct sa_timer *cur; struct sa_timer **prev; if (sa_timer_active(tm)) { for (prev = &sa_timer_head; (cur = *prev) != NULL; prev = &cur->tm_next) if (cur == tm) { tm->tm_nsec = 0; *prev = tm->tm_next; break; } ASSERT(cur == tm); } } /* * Free (and cancel) timer. */ void sa_timer_free(struct sa_timer *tm) { if (sa_timer_active(tm)) sa_timer_cancel(tm); free(tm); } /* * Handle timer checks. Called from select loop or other periodic function. * * The struct timeval is set before returning to the maximum amount of time * that should elapse before the next call. * * Returns 1 if any timer functions were called, 0 otherwise. */ int sa_timer_check(struct timeval *tv) { u_int64_t now = 0; u_int64_t next_due = 0; struct sa_timer *tm; int ret = 0; /* * Remember, the list may change during the handler. */ for (;;) { now = sa_timer_get(); tm = sa_timer_head; if (tm == NULL) { next_due = now; break; } next_due = tm->tm_nsec; if (next_due > now + SA_TIMER_FUZZ) break; /* * Remove this element from the list. */ sa_timer_head = tm->tm_next; tm->tm_next = NULL; /* * Mark cancelled and call handler. */ tm->tm_nsec = 0; ASSERT(tm->tm_handler != NULL); (*tm->tm_handler)(tm->tm_handler_arg); ret = 1; } ASSERT(next_due >= now); next_due -= now; tv->tv_sec = (time_t) (next_due / SA_TIMER_HZ); tv->tv_usec = (long) (next_due % SA_TIMER_HZ) / 1000; return ret; } #define NFC_NFDS 64 /* * Deferred procedure call. */ struct sa_defer_ent { TAILQ_ENTRY(sa_defer_ent) de_next; void (*de_func)(void *arg); void *de_arg; }; /* * Static module state. */ static struct sa_sel_state { fd_set ts_rx_fds; fd_set ts_tx_fds; fd_set ts_ex_fds; int ts_max_fd; u_char ts_exit; struct sa_sel_fd { void (*ts_rx_handler)(void *); void (*ts_tx_handler)(void *); void (*ts_ex_handler)(void *); void *ts_handler_arg; } ts_fd[NFC_NFDS]; void (*ts_callback)(void); TAILQ_HEAD(, sa_defer_ent) ts_defer_list; } sa_sel_state; static void sa_select_call_deferred_funcs(void) { struct sa_sel_state *ss = &sa_sel_state; struct sa_defer_ent *de, *de_next; de = ss->ts_defer_list.tqh_first; TAILQ_INIT(&ss->ts_defer_list); for (; de != NULL; de = de_next) { de_next = de->de_next.tqe_next; if (de->de_func != NULL) (*de->de_func)(de->de_arg); free(de); } } int sa_select_loop(void) { struct sa_sel_state *ss = &sa_sel_state; struct sa_sel_fd *fp; fd_set rx_fds; fd_set tx_fds; fd_set ex_fds; struct timeval tval; struct timeval *tvp; int rv, i; ss->ts_exit = 0; while (ss->ts_exit == 0) { sa_timer_check(&tval); if (ss->ts_exit) break; if (ss->ts_defer_list.tqh_first != NULL) { /* * If a timer or deferred function added a new deferred * function, just poll through select (zero-timeout). */ tval.tv_sec = tval.tv_usec = 0; tvp = &tval; } else if (tval.tv_sec == 0 && tval.tv_usec == 0) tvp = NULL; else tvp = &tval; rx_fds = ss->ts_rx_fds; tx_fds = ss->ts_tx_fds; ex_fds = ss->ts_ex_fds; rv = select(ss->ts_max_fd + 1, &rx_fds, &tx_fds, &ex_fds, tvp); if (rv == -1) { if (errno == EINTR) continue; return errno; } fp = ss->ts_fd; for (i = 0; rv > 0 && i <= sa_sel_state.ts_max_fd; i++, fp++) { if (FD_ISSET(i, &rx_fds)) { if (fp->ts_rx_handler != NULL) (*fp->ts_rx_handler) (fp->ts_handler_arg); else ASSERT(!FD_ISSET(i, &ss->ts_rx_fds)); --rv; } if (FD_ISSET(i, &tx_fds)) { if (fp->ts_tx_handler != NULL) (*fp->ts_tx_handler) (fp->ts_handler_arg); else ASSERT(!FD_ISSET(i, &ss->ts_tx_fds)); --rv; } if (FD_ISSET(i, &ex_fds)) { if (fp->ts_ex_handler != NULL) (*fp->ts_ex_handler) (fp->ts_handler_arg); else ASSERT(!FD_ISSET(i, &ss->ts_ex_fds)); --rv; } } if (ss->ts_callback != NULL) (*ss->ts_callback)(); if (ss->ts_defer_list.tqh_first != NULL) sa_select_call_deferred_funcs(); } return 0; } void sa_select_add_fd(int fd, void (*rx_handler)(void *), void (*tx_handler)(void *), void (*ex_handler)(void *), void *arg) { struct sa_sel_state *ss = &sa_sel_state; struct sa_sel_fd *fp; ASSERT_NOTIMPL(fd < NFC_NFDS); ASSERT(rx_handler != NULL || tx_handler != NULL || ex_handler != NULL); if (ss->ts_max_fd < fd) ss->ts_max_fd = fd; fp = &ss->ts_fd[fd]; fp->ts_handler_arg = arg; if (rx_handler != NULL) { fp->ts_rx_handler = rx_handler; FD_SET(fd, &ss->ts_rx_fds); } if (tx_handler != NULL) { fp->ts_tx_handler = tx_handler; FD_SET(fd, &ss->ts_tx_fds); } if (ex_handler != NULL) { fp->ts_ex_handler = ex_handler; FD_SET(fd, &ss->ts_ex_fds); } } void sa_select_set_rx(int fd, void (*handler)(void *)) { struct sa_sel_state *ss = &sa_sel_state; ASSERT(fd <= ss->ts_max_fd); ss->ts_fd[fd].ts_rx_handler = handler; if (handler != NULL) FD_SET(fd, &ss->ts_rx_fds); else FD_CLR(fd, &ss->ts_rx_fds); } void sa_select_set_tx(int fd, void (*handler)(void *)) { struct sa_sel_state *ss = &sa_sel_state; ASSERT(fd <= ss->ts_max_fd); ss->ts_fd[fd].ts_tx_handler = handler; if (handler != NULL) FD_SET(fd, &ss->ts_tx_fds); else FD_CLR(fd, &ss->ts_tx_fds); } void sa_select_set_ex(int fd, void (*handler)(void *)) { struct sa_sel_state *ss = &sa_sel_state; ASSERT(fd <= ss->ts_max_fd); ss->ts_fd[fd].ts_ex_handler = handler; if (handler != NULL) FD_SET(fd, &ss->ts_ex_fds); else FD_CLR(fd, &ss->ts_ex_fds); } void sa_select_rem_fd(int fd) { struct sa_sel_state *ss = &sa_sel_state; struct sa_sel_fd *fp; ASSERT_NOTIMPL(fd < NFC_NFDS); FD_CLR(fd, &ss->ts_rx_fds); FD_CLR(fd, &ss->ts_tx_fds); FD_CLR(fd, &ss->ts_ex_fds); fp = &ss->ts_fd[fd]; fp->ts_rx_handler = NULL; fp->ts_tx_handler = NULL; fp->ts_ex_handler = NULL; fp->ts_handler_arg = NULL; } /* * Set callback for every time through the select loop. */ void sa_select_set_callback(void (*cb)(void)) { sa_sel_state.ts_callback = cb; } /* * Add a deferred function call. */ void * sa_select_add_deferred_callback(void (*func)(void *), void *arg) { struct sa_sel_state *ss = &sa_sel_state; struct sa_defer_ent *de; ASSERT(func != NULL); de = malloc(sizeof(*de)); if (de != NULL) { de->de_func = func; de->de_arg = arg; if (ss->ts_defer_list.tqh_first == NULL) TAILQ_INIT(&ss->ts_defer_list); TAILQ_INSERT_TAIL(&ss->ts_defer_list, de, de_next); } return de; } /* * Delete (cancel) a deferred function call. */ void sa_select_del_deferred_callback(void *handle) { struct sa_defer_ent *de = handle; de->de_func = NULL; } /* * Cause select loop to exit. * This is invoked from a handler which wants the select loop to return * after the handler is finished. For example, during receipt of a network * packet, the program may decide to clean up and exit, but in order to do * this cleanly, all lower-level protocol handlers should return first. */ void sa_select_exit(void) { sa_sel_state.ts_exit = 1; } /* * Convert 48-bit IEEE MAC address to 64-bit FC WWN. */ fc_wwn_t fc_wwn_from_mac(u_int64_t mac, u_int scheme, u_int port) { fc_wwn_t wwn; ASSERT(mac < (1ULL << 48)); wwn = mac | ((fc_wwn_t) scheme << 60); switch (scheme) { case 1: ASSERT(port == 0); break; case 2: ASSERT(port < 0xfff); wwn |= (fc_wwn_t) port << 48; break; default: ASSERT_NOTREACHED; break; } return wwn; } /* assumes input is pointer to two hex digits */ /* returns -1 on error */ int hex2int(char *b) { int i; int n = 0; int m; for (i = 0, m = 1; i < 2; i++, m--) { if (isxdigit(*(b+i))) { if (*(b+i) <= '9') n |= (*(b+i) & 0x0f) << (4*m); else n |= ((*(b+i) & 0x0f) + 9) << (4*m); } else return -1; } return n; } fcoe-utils-1.0.9/CONFIGURE0000644000175000017500000002245011312505503014011 0ustar chuckchuckInstallation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 6. Often, you can also type `make uninstall' to remove the installed files again. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. fcoe-utils-1.0.9/fcoe_utils.h.in0000644000175000017500000000016311312505503015454 0ustar chuckchuck#ifndef _FCOE_UTILS_H_ #define _FCOE_UTILS_H_ #define FCOE_UTILS_VERSION "@VERSION@" #endif /* _FCOE_UTILS_H_ */ fcoe-utils-1.0.9/fcoeplumb.in0000755000175000017500000002276211312505503015062 0ustar chuckchuck#! /bin/bash # # Copyright(c) 2009 Intel Corporation. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This program is distributed in the hope it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. # # Maintained at www.Open-FCoE.org cmdname=`basename $0` usage() { echo usage: $cmdname \ '[--fcoeif --reset | --create | --destroy]' \ '[--debug] [--syslog]' \ '[--netif --qos-disable |' \ '--qos-enable [,]...]' >&2 exit 1 } # # Tunable parameters # QOS_DEF=3 # default user priority FCOE_ETHERTYPE=35078 # Ethertype (0x8906): tc filter show is base 10 FIP_ETHERTYPE=35092 # Ethertype (0x8914): tc filter show is base 10 FCOE_FILTER=0xfc0e # filter handle (must be lower-case hex) FCOE_FILTER_KEY=12345 FIP_FILTER_KEY=67890 qdisc_id=1: qos_list= cmd= # automake paths prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ sbindir=@sbindir@ sysconfdir=@sysconfdir@ # make sure there's a sane path to find basic commands and system tools (tc) PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin FCOEADM=${sbindir}/fcoeadm # command to create/destroy FCoE instances CONFIG_DIR=${sysconfdir}/fcoe LOGGER= DEBUG_LOGGING= find_multiq_qdisc() { ifname=$1 found=0 type=unknown if set -- `tc qdisc show dev $ifname` none none none then type=$2 qdisc_id=$3 fi [ "$type" == "multiq" ] && found=1 return $found } add_multiq_qdisc() { ifname=$1 qdisc_id=$2 [ ${DEBUG_LOGGING} ] && $LOGGER \ "tc qdisc add dev $ifname root handle $qdisc_id multiq" tc qdisc add dev $ifname root handle $qdisc_id multiq } get_filter_id() { ifname=$1 filter_key=$2 retry_count=0 while true do [ $retry_count -eq 0 ] && break [ -f /var/run/fcoemon.pid ] && break sleep 1 retry_count=$(($retry_count-1)) done echo "`echo "$ifname $filter_key" | \ awk '{ printf("0x%x%06x", substr($1,4), $2) }'`" } find_skbedit_filter() { ifname=$1 ethertype=$2 filter_id=$3 found=`tc filter show dev $ifname | awk ' BEGIN { x1 = 0 x2 = 0 x3 = 0 queue = 8 } /^filter.*parent.*protocol \['$ethertype'\].* handle '$filter_id'/ { if (x1 == 0 && x2 == 0 && x3 == 0) x1 = 1 } /cmp.*u16 at 12 layer 1 mask 0xffff eq '$ethertype'.*\)/ { if (x1 == 1 && x2 == 0 && x3 == 0) x2 = 1 } /action order [0-9][0-9]*: skbedit queue_mapping/ { if (x1 == 1 && x2 == 1 && x3 == 0) { x3 = 1 queue = $6 } } END { print queue }'` return $found } delete_skbedit_filter() { ifname=$1 queue=$2 ethertype=$3 filter_id=$4 [ ${DEBUG_LOGGING} ] && $LOGGER \ "tc filter delete dev $ifname skbedit queue_mapping $queue" PARENT=`tc filter show dev $ifname | awk \ '/^filter.*parent.*protocol \['$ethertype'\].* handle '$filter_id'/ \ { print $3 }'` PRIO=`tc filter show dev $ifname | awk \ '/^filter.*parent.*protocol \['$ethertype'\].* handle '$filter_id'/ \ { print $7 }'` tc filter delete dev $ifname parent $PARENT \ protocol $ethertype pref $PRIO handle $filter_id basic match \ 'cmp(u16' at 12 layer 1 mask 0xffff eq $ethertype')' \ action skbedit queue_mapping $queue tc filter delete dev $ifname parent $PARENT \ protocol $ethertype pref $PRIO basic } add_skbedit_filter() { ifname=$1 qdisc_id=$2 queue=$3 ethertype=$4 filter_id=$5 [ ${DEBUG_LOGGING} ] && $LOGGER \ "tc filter add dev $ifname skbedit queue_mapping $queue" tc filter add dev $ifname parent $qdisc_id protocol $ethertype \ handle $filter_id basic match 'cmp(u16' at 12 \ layer 1 mask 0xffff eq $ethertype')' \ action skbedit queue_mapping $queue } replace_skbedit_filter() { ifname=$1 queue=$2 ethertype=$3 filter_id=$4 [ ${DEBUG_LOGGING} ] && $LOGGER \ "tc filter replace dev $ifname skbedit queue_mapping $queue" PARENT=`tc filter show dev $ifname | awk \ '/^filter.*parent.*protocol \['$ethertype'\].* handle '$filter_id'/ \ { print $3 }'` PRIO=`tc filter show dev $ifname | \ awk '/^filter.*parent.*protocol \['$ethertype'\].* handle '$filter_id'/ \ { print $7 }'` tc filter replace dev $ifname parent $PARENT protocol \ $ethertype pref $PRIO handle $filter_id basic match \ 'cmp(u16' at 12 layer 1 mask 0xffff eq $ethertype')' \ action skbedit queue_mapping $queue } remove_fcoe_interface() { ifname=$1 STATUS=`$FCOEADM -i $ifname 2>&1 | \ awk '/Symbolic Name:/ && /'$ifname'$/{print $6}'` if [ "$STATUS" == "$ifname" ]; then [ ${DEBUG_LOGGING} ] && $LOGGER "$FCOEADM -d $ifname" $FCOEADM -d $ifname else [ ${DEBUG_LOGGING} ] && $LOGGER \ "FCoE interface $ifname doesn't exist" fi } create_fcoe_interface() { ifname=$1 STATUS=`$FCOEADM -i $ifname 2>&1 | \ awk '/Symbolic Name:/ && /'$ifname'$/{print $6}'` if [ -z "$STATUS" ]; then [ ${DEBUG_LOGGING} ] && $LOGGER "$FCOEADM -c $ifname" $FCOEADM -c $ifname else [ ${DEBUG_LOGGING} ] && $LOGGER \ "FCoE interface $ifname already created" fi } config_logging() { if [ $DEBUG_LOGGING ] ; then if [ $USE_SYSLOG ] ; then LOGGER="logger -t fcoeplumb" else LOGGER="echo" fi else LOGGER= fi } [ "$#" -lt 2 ] && usage [ ${DEBUG_LOGGING} ] && $LOGGER "fcoeplumb arguments: ($*)" while [ "$#" -ge 1 ] do case "$1" in --fcoeif) shift fcoe_ifname=$1 shift case "$1" in --reset | -r) cmd=reset ;; --create | -c) cmd=create ;; --destroy | -d) cmd=destroy ;; *) echo "$cmdname: unknown fcoe parameter '$1'" >&2 usage ;; esac ;; --netif) shift net_ifname=$1 shift case "$1" in --qos-enable) [ "$#" -lt 2 ] && usage qos_list=$2 shift ;; --qos-disable) [[ "$2" =~ ^[0-9]+$ ]] && shift qos_list="disable" ;; *) echo "$cmdname: unknown qos parameter '$1'" >&2 usage ;; esac ;; --debug) DEBUG_LOGGING=1 config_logging ;; --syslog) USE_SYSLOG=1 config_logging ;; *) echo "$cmdname: unknown parameter '$1'" >&2 usage ;; esac shift done # This must be the first to do after parsing the command arguments! # Notice that the filter ID is used in find_skbedit_filter(), # add_skbedit_filter(), replace_skbedit_filter(). fcoe_filter_id=`get_filter_id $net_ifname $FCOE_FILTER_KEY` fip_filter_id=`get_filter_id $net_ifname $FIP_FILTER_KEY` if [ "$cmd" == "destroy" ]; then remove_fcoe_interface $fcoe_ifname elif [ "$cmd" == "create" ]; then create_fcoe_interface $fcoe_ifname fi if [ "$qos_list" == "disable" ]; then # Remove the FCoE filters find_skbedit_filter $net_ifname $FCOE_ETHERTYPE $fcoe_filter_id found_filter=$? [ $found_filter -le 7 ] && delete_skbedit_filter $net_ifname \ $found_filter $FCOE_ETHERTYPE $fcoe_filter_id # Remove the FIP filters find_skbedit_filter $net_ifname $FIP_ETHERTYPE $fip_filter_id found_filter=$? [ $found_filter -le 7 ] && delete_skbedit_filter $net_ifname \ $found_filter $FIP_ETHERTYPE $fip_filter_id elif [ -n $qos_list ]; then # # Choose the best QOS to use for FCoE out of the listed choices. # # Parse QOS List QOS_BEST= if [ -n "$qos_list" ]; then OLD_IFS="$IFS" IFS=,"$IFS" set -- $qos_list IFS="$OLD_IFS" while [ "$#" -ge 1 ] do case "$1" in [0-7]) ;; *) echo "$cmdname: bad QOS value '$1'" >&2 usage ;; esac if [ -z "$QOS_BEST" ]; then QOS_BEST=$1 elif [ "$1" -eq "$QOS_DEF" ]; then QOS_BEST=$1 fi shift done fi # If the best QOS is not found, do nothing. [ -z "$QOS_BEST" ] && exit 0 [ ${DEBUG_LOGGING} ] && $LOGGER "$net_ifname - Choosing QOS '$QOS_BEST'" # # Setup the traffic classifier for FCoE # First see if it is already set up. # qos_queue=`expr $QOS_BEST` find_multiq_qdisc $net_ifname found_qdisc=$? if [ $found_qdisc -eq 1 ]; then # Adjust the FCoE filter [ ${DEBUG_LOGGING} ] && $LOGGER "$net_ifname: Qdisc is found" find_skbedit_filter $net_ifname $FCOE_ETHERTYPE $fcoe_filter_id found_filter=$? if [ $found_filter -gt 7 ]; then add_skbedit_filter $net_ifname $qdisc_id $qos_queue \ $FCOE_ETHERTYPE $fcoe_filter_id elif [ $found_filter -ne $qos_queue ]; then [ ${DEBUG_LOGGING} ] && $LOGGER \ "$net_ifname: Filter is found and QOS is different" replace_skbedit_filter $net_ifname $qos_queue \ $FCOE_ETHERTYPE $fcoe_filter_id else [ ${DEBUG_LOGGING} ] && $LOGGER \ "$net_ifname: Filter is found and is identical" fi # Adjust the FIP filter [ ${DEBUG_LOGGING} ] && $LOGGER "$net_ifname: Qdisc is found" find_skbedit_filter $net_ifname $FIP_ETHERTYPE $fip_filter_id found_filter=$? if [ $found_filter -gt 7 ]; then add_skbedit_filter $net_ifname $qdisc_id $qos_queue \ $FIP_ETHERTYPE $fip_filter_id elif [ $found_filter -ne $qos_queue ]; then [ ${DEBUG_LOGGING} ] && $LOGGER \ "$net_ifname: Filter is found and QOS is different" replace_skbedit_filter $net_ifname $qos_queue \ $FIP_ETHERTYPE $fip_filter_id else [ ${DEBUG_LOGGING} ] && $LOGGER \ "$net_ifname: Filter is found and is identical" fi else add_multiq_qdisc $net_ifname $qdisc_id add_skbedit_filter $net_ifname $qdisc_id $qos_queue \ $FCOE_ETHERTYPE $fcoe_filter_id add_skbedit_filter $net_ifname $qdisc_id $qos_queue \ $FIP_ETHERTYPE $fip_filter_id fi fi exit 0 fcoe-utils-1.0.9/fcoemon.h0000644000175000017500000001163011312505504014343 0ustar chuckchuck/* * Copyright(c) 2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Maintained at www.Open-FCoE.org */ #ifndef _FCOEMON_H_ #define _FCOEMON_H_ struct fcoe_config { int debug; int use_syslog; struct fcoe_port *port; } fcoe_config; /* * Log message. */ #define FCM_LOG(...) \ do { \ sa_log(__VA_ARGS__); \ } while (0) #define FCM_LOG_ERR(error, ...) \ do { \ sa_log_err(error, NULL, __VA_ARGS__); \ } while (0) #define FCM_LOG_DBG(fmt, args...) \ do { \ if (fcoe_config.debug) \ sa_log(fmt, ##args); \ } while (0) #define FCM_LOG_DEV_DBG(fcm, fmt, args...) \ do { \ if (fcoe_config.debug) \ sa_log("%s, " fmt, fcm->ifname, ##args); \ } while (0) #define FCM_LOG_DEV(fcm, fmt, args...) \ do { \ sa_log("%s, " fmt, fcm->ifname, ##args); \ } while (0) /* * States for HBAs relative to the DCB daemon. * States advance sequentially if conditions are right. */ enum fcm_dcbd_state { FCD_INIT = 0, /* starting state */ FCD_GET_DCB_STATE, /* getting DCB state */ FCD_SEND_CONF, /* set proposed configuration */ FCD_GET_PFC_CONFIG, /* getting PFC configuration */ FCD_GET_APP_CONFIG, /* getting APP configuration */ FCD_GET_PFC_OPER, /* getting PFC operational mode */ FCD_GET_APP_OPER, /* getting operational mode */ FCD_GET_PEER, /* getting peer configuration */ FCD_DONE, /* DCB exchanges complete */ FCD_ERROR, /* DCB error or port unknown by DCB */ }; /* * Action codes for FCoE ports */ enum fcp_action { FCP_WAIT = 0, /* waiting for something to happen */ FCP_CREATE_IF, /* create FCoE interface */ FCP_DESTROY_IF, /* destroy FCoE interface */ FCP_RESET_IF, /* reset FCoE interface */ FCP_ERROR, /* error condition */ }; #define FCM_DCBD_STATES { \ { "INIT", FCD_INIT }, \ { "GET_DCB_STATE", FCD_GET_DCB_STATE }, \ { "SEND_CONF", FCD_SEND_CONF }, \ { "GET_PFC_CONFIG", FCD_GET_PFC_CONFIG }, \ { "GET_APP_CONFIG", FCD_GET_APP_CONFIG }, \ { "GET_PFC_OPER", FCD_GET_PFC_OPER }, \ { "GET_APP_OPER", FCD_GET_APP_OPER }, \ { "GET_PEER", FCD_GET_PEER }, \ { "DONE", FCD_DONE }, \ { "ERROR", FCD_ERROR }, \ { NULL, 0 } \ } struct feature_info { u_int32_t enable; /* enable/disable feature */ u_int32_t advertise; /* enable/disable advertise */ u_int32_t willing; /* enable/disable willing mode */ u_int32_t syncd; /* synchronized with switch */ u_int32_t op_mode; /* operational mode */ u_int32_t op_vers; /* feature operational version */ u_int32_t op_error; /* operational error */ u_int32_t subtype; /* subtype */ union { u_int32_t pfcup; u_int32_t appcfg; } u; }; /* * Description of potential FCoE network interface. */ struct fcm_netif { TAILQ_ENTRY(fcm_netif) ff_list; /* list linkage */ u_int32_t ff_enabled:1; /* operational status */ u_int32_t ff_dcb_state; /* DCB feature state */ struct feature_info ff_pfc_info; /* PFC feature info */ struct feature_info ff_app_info; /* App feature info */ u_int8_t ff_operstate; /* RFC 2863 operational status */ u_int8_t ff_qos_mask; /* 801.p priority mask */ enum fcm_dcbd_state ff_dcbd_state; /* DCB daemon state */ char ifname[IFNAMSIZ]; /* Ethernet interface name */ int response_pending; /* dcbd query in progress */ int dcbd_retry_cnt; /* Number of query attempts */ struct sa_timer dcbd_retry_timer; /* dcbd retry timer */ }; TAILQ_HEAD(fcm_netif_head, fcm_netif); struct fcm_netif_head fcm_netif_head; extern char build_date[]; static void fcm_dcbd_init(void); static void fcm_dcbd_shutdown(void); static void fcm_fcoe_init(void); static struct fcm_netif *fcm_netif_lookup(char *); static struct fcm_netif *fcm_netif_lookup_create(char *); static int fcm_link_init(void); static void fcm_dcbd_state_set(struct fcm_netif *, enum fcm_dcbd_state); #endif /* _FCOEMON_H_ */